mirror of https://github.com/AxioDL/metaforce.git
Merge branch 'master' of https://github.com/AxioDL/PathShagged
This commit is contained in:
commit
0a214e4d99
|
@ -1 +1,2 @@
|
|||
*.user
|
||||
version.h
|
||||
*.user
|
||||
|
|
|
@ -49,3 +49,16 @@ if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
|
|||
add_subdirectory(Editor)
|
||||
add_subdirectory(Runtime)
|
||||
endif()
|
||||
|
||||
find_package(Git)
|
||||
if(GIT_FOUND)
|
||||
message("git found: ${GIT_EXECUTABLE}")
|
||||
# Get the current working branch
|
||||
execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} OUTPUT_VARIABLE GIT_BRANCH OUTPUT_STRIP_TRAILING_WHITESPACE )
|
||||
|
||||
# Get the latest abbreviated commit hash of the working branch
|
||||
execute_process(COMMAND ${GIT_EXECUTABLE} log -1 --format=%h WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} OUTPUT_VARIABLE GIT_COMMIT_HASH OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse HEAD WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} OUTPUT_VARIABLE GIT_COMMIT_HASH_FULL OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
configure_file(${CMAKE_SOURCE_DIR}/version.h.in ${CMAKE_SOURCE_DIR}/version.h)
|
||||
endif()
|
||||
|
|
|
@ -8,6 +8,30 @@ namespace Retro
|
|||
{
|
||||
namespace DNAMP1
|
||||
{
|
||||
static const std::vector<std::string> PaneNames =
|
||||
{
|
||||
"imagepane_pane0",
|
||||
"imagepane_pane1",
|
||||
"imagepane_pane2",
|
||||
"imagepane_pane3",
|
||||
"imagepane_pane01",
|
||||
"imagepane_pane12",
|
||||
"imagepane_pane23",
|
||||
"imagepane_pane012",
|
||||
"imagepane_pane123",
|
||||
"imagepane_pane0123",
|
||||
"imagepane_pane4",
|
||||
"imagepane_pane5",
|
||||
"imagepane_pane6",
|
||||
"imagepane_pane7",
|
||||
"imagepane_pane45",
|
||||
"imagepane_pane56",
|
||||
"imagepane_pane67",
|
||||
"imagepane_pane456",
|
||||
"imagepane_pane567",
|
||||
"imagepane_pane4567"
|
||||
};
|
||||
|
||||
struct SCAN : BigYAML
|
||||
{
|
||||
DECL_YAML
|
||||
|
@ -35,9 +59,10 @@ struct SCAN : BigYAML
|
|||
|
||||
struct Texture : BigYAML
|
||||
{
|
||||
DECL_YAML
|
||||
Delete __delete;
|
||||
UniqueID32 texture;
|
||||
Value<float> appearanceRange;
|
||||
<<<<<<< HEAD
|
||||
enum class Position : atInt32
|
||||
{
|
||||
Pane0,
|
||||
|
@ -63,10 +88,103 @@ struct SCAN : BigYAML
|
|||
Invalid = -1
|
||||
};
|
||||
Value<Position> position;
|
||||
=======
|
||||
Value<atUint32> position;
|
||||
>>>>>>> 18c4b1aa6d84fcf828f474c100f880569c7b9d04
|
||||
Value<atUint32> width; // width of animation cell
|
||||
Value<atUint32> height; // height of animation cell
|
||||
Value<float> interval; // 0.0 - 1.0
|
||||
Value<float> fadeDuration; // 0.0 - 1.0
|
||||
|
||||
void read(Athena::io::IStreamReader& __dna_reader)
|
||||
{
|
||||
/* texture */
|
||||
texture.read(__dna_reader);
|
||||
/* appearanceRange */
|
||||
appearanceRange = __dna_reader.readFloatBig();
|
||||
/* position */
|
||||
position = __dna_reader.readUint32Big();
|
||||
/* width */
|
||||
width = __dna_reader.readUint32Big();
|
||||
/* height */
|
||||
height = __dna_reader.readUint32Big();
|
||||
/* interval */
|
||||
interval = __dna_reader.readFloatBig();
|
||||
/* fadeDuration */
|
||||
fadeDuration = __dna_reader.readFloatBig();
|
||||
}
|
||||
|
||||
void write(Athena::io::IStreamWriter& __dna_writer) const
|
||||
{
|
||||
/* texture */
|
||||
texture.write(__dna_writer);
|
||||
/* appearanceRange */
|
||||
__dna_writer.writeFloatBig(appearanceRange);
|
||||
/* position */
|
||||
__dna_writer.writeUint32Big(position);
|
||||
/* width */
|
||||
__dna_writer.writeUint32Big(width);
|
||||
/* height */
|
||||
__dna_writer.writeUint32Big(height);
|
||||
/* interval */
|
||||
__dna_writer.writeFloatBig(interval);
|
||||
/* fadeDuration */
|
||||
__dna_writer.writeFloatBig(fadeDuration);
|
||||
}
|
||||
|
||||
void fromYAML(Athena::io::YAMLDocReader& __dna_docin)
|
||||
{
|
||||
/* texture */
|
||||
__dna_docin.enumerate("texture", texture);
|
||||
/* appearanceRange */
|
||||
appearanceRange = __dna_docin.readFloat("appearanceRange");
|
||||
/* position */
|
||||
std::string tmp = __dna_docin.readString("position");
|
||||
|
||||
auto idx = std::find(PaneNames.begin(), PaneNames.end(), tmp);
|
||||
if (idx != PaneNames.end())
|
||||
position = idx - PaneNames.begin();
|
||||
else
|
||||
position = -1;
|
||||
|
||||
/* width */
|
||||
width = __dna_docin.readUint32("width");
|
||||
/* height */
|
||||
height = __dna_docin.readUint32("height");
|
||||
/* interval */
|
||||
interval = __dna_docin.readFloat("interval");
|
||||
/* fadeDuration */
|
||||
fadeDuration = __dna_docin.readFloat("fadeDuration");
|
||||
}
|
||||
|
||||
void toYAML(Athena::io::YAMLDocWriter& __dna_docout) const
|
||||
{
|
||||
/* texture */
|
||||
__dna_docout.enumerate("texture", texture);
|
||||
/* appearanceRange */
|
||||
__dna_docout.writeFloat("appearanceRange", appearanceRange);
|
||||
/* position */
|
||||
if (position != -1)
|
||||
__dna_docout.writeString("position", PaneNames.at(position));
|
||||
else
|
||||
__dna_docout.writeString("position", "undefined");
|
||||
/* width */
|
||||
__dna_docout.writeUint32("width", width);
|
||||
/* height */
|
||||
__dna_docout.writeUint32("height", height);
|
||||
/* interval */
|
||||
__dna_docout.writeFloat("interval", interval);
|
||||
/* fadeDuration */
|
||||
__dna_docout.writeFloat("fadeDuration", fadeDuration);
|
||||
}
|
||||
|
||||
const char* DNAType() { return "Retro::DNAMP1::SCAN::Texture"; }
|
||||
size_t binarySize(size_t __isz) const
|
||||
{
|
||||
__isz = texture.binarySize(__isz);
|
||||
return __isz + 24;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
Texture textures[4];
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
#ifndef VERSION_H
|
||||
#define VERSION_H
|
||||
|
||||
#define GIT_BRANCH "@GIT_BRANCH@"
|
||||
#define GIT_COMMIT_HASH "@GIT_COMMIT_HASH@"
|
||||
#define GIT_COMMIT_HASH_FULL "@GIT_COMMIT_HASH_FULL@"
|
||||
#endif
|
Loading…
Reference in New Issue