mirror of https://github.com/AxioDL/metaforce.git
Fixed enum cast
This commit is contained in:
parent
0a214e4d99
commit
23bc343d2b
|
@ -62,7 +62,6 @@ struct SCAN : BigYAML
|
||||||
Delete __delete;
|
Delete __delete;
|
||||||
UniqueID32 texture;
|
UniqueID32 texture;
|
||||||
Value<float> appearanceRange;
|
Value<float> appearanceRange;
|
||||||
<<<<<<< HEAD
|
|
||||||
enum class Position : atInt32
|
enum class Position : atInt32
|
||||||
{
|
{
|
||||||
Pane0,
|
Pane0,
|
||||||
|
@ -88,9 +87,6 @@ struct SCAN : BigYAML
|
||||||
Invalid = -1
|
Invalid = -1
|
||||||
};
|
};
|
||||||
Value<Position> position;
|
Value<Position> position;
|
||||||
=======
|
|
||||||
Value<atUint32> position;
|
|
||||||
>>>>>>> 18c4b1aa6d84fcf828f474c100f880569c7b9d04
|
|
||||||
Value<atUint32> width; // width of animation cell
|
Value<atUint32> width; // width of animation cell
|
||||||
Value<atUint32> height; // height of animation cell
|
Value<atUint32> height; // height of animation cell
|
||||||
Value<float> interval; // 0.0 - 1.0
|
Value<float> interval; // 0.0 - 1.0
|
||||||
|
@ -103,7 +99,7 @@ struct SCAN : BigYAML
|
||||||
/* appearanceRange */
|
/* appearanceRange */
|
||||||
appearanceRange = __dna_reader.readFloatBig();
|
appearanceRange = __dna_reader.readFloatBig();
|
||||||
/* position */
|
/* position */
|
||||||
position = __dna_reader.readUint32Big();
|
position = Position(__dna_reader.readUint32Big());
|
||||||
/* width */
|
/* width */
|
||||||
width = __dna_reader.readUint32Big();
|
width = __dna_reader.readUint32Big();
|
||||||
/* height */
|
/* height */
|
||||||
|
@ -121,7 +117,7 @@ struct SCAN : BigYAML
|
||||||
/* appearanceRange */
|
/* appearanceRange */
|
||||||
__dna_writer.writeFloatBig(appearanceRange);
|
__dna_writer.writeFloatBig(appearanceRange);
|
||||||
/* position */
|
/* position */
|
||||||
__dna_writer.writeUint32Big(position);
|
__dna_writer.writeUint32Big(atUint32(position));
|
||||||
/* width */
|
/* width */
|
||||||
__dna_writer.writeUint32Big(width);
|
__dna_writer.writeUint32Big(width);
|
||||||
/* height */
|
/* height */
|
||||||
|
@ -143,9 +139,9 @@ struct SCAN : BigYAML
|
||||||
|
|
||||||
auto idx = std::find(PaneNames.begin(), PaneNames.end(), tmp);
|
auto idx = std::find(PaneNames.begin(), PaneNames.end(), tmp);
|
||||||
if (idx != PaneNames.end())
|
if (idx != PaneNames.end())
|
||||||
position = idx - PaneNames.begin();
|
position = Position(idx - PaneNames.begin());
|
||||||
else
|
else
|
||||||
position = -1;
|
position = Position::Invalid;
|
||||||
|
|
||||||
/* width */
|
/* width */
|
||||||
width = __dna_docin.readUint32("width");
|
width = __dna_docin.readUint32("width");
|
||||||
|
@ -164,8 +160,8 @@ struct SCAN : BigYAML
|
||||||
/* appearanceRange */
|
/* appearanceRange */
|
||||||
__dna_docout.writeFloat("appearanceRange", appearanceRange);
|
__dna_docout.writeFloat("appearanceRange", appearanceRange);
|
||||||
/* position */
|
/* position */
|
||||||
if (position != -1)
|
if (position != Position::Invalid)
|
||||||
__dna_docout.writeString("position", PaneNames.at(position));
|
__dna_docout.writeString("position", PaneNames.at(atUint32(position)));
|
||||||
else
|
else
|
||||||
__dna_docout.writeString("position", "undefined");
|
__dna_docout.writeString("position", "undefined");
|
||||||
/* width */
|
/* width */
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
add_executable(rude WIN32
|
||||||
|
main.cpp)
|
||||||
|
|
||||||
|
target_link_libraries(rude
|
||||||
|
RuntimeCommonCharacter
|
||||||
|
RuntimeCommonInput
|
||||||
|
RuntimeCommon
|
||||||
|
DNAMP3 DNAMP2 DNAMP1
|
||||||
|
DNACommon Specter
|
||||||
|
HECLDatabase HECLBlender HECLCommon AthenaCore NOD
|
||||||
|
LogVisor AthenaLibYaml Boo ${PNG_LIB} squish xxhash Math
|
||||||
|
${ZLIB_LIBRARIES} ${LZO_LIB}
|
||||||
|
${BOO_SYS_LIBS})
|
Loading…
Reference in New Issue