Normalize union room UnkStruct arrays; remove STAT_STAGE_ defines

This commit is contained in:
PikalaxALT
2020-01-23 10:10:57 -05:00
parent 90c99d1ce2
commit 7824a413de
5 changed files with 46 additions and 53 deletions
-10
View File
@@ -170,16 +170,6 @@
#define STAT_ACC 6 // only in battles
#define STAT_EVASION 7 // only in battles
// TODO: Why do we need these as separate defines?
#define STAT_STAGE_HP 0
#define STAT_STAGE_ATK 1
#define STAT_STAGE_DEF 2
#define STAT_STAGE_SPEED 3
#define STAT_STAGE_SPATK 4
#define STAT_STAGE_SPDEF 5
#define STAT_STAGE_ACC 6
#define STAT_STAGE_EVASION 7
#define NUM_STATS 6
#define NUM_BATTLE_STATS 8
+17 -16
View File
@@ -28,26 +28,27 @@ struct UnkStruct_x20
u8 field_1F;
};
// These arrays are dynamically allocated but must be
// represented as structs to match.
// Don't ask me why.
// FIXME: Find a way around this.
struct UnkStruct_Main0
{
struct UnkStruct_x20 arr[8];
struct UnkStruct_x20 arr[0];
};
struct UnkStruct_Main4
{
struct UnkStruct_x1C arr[5];
};
struct UnkStruct_Main8
{
struct UnkStruct_x20 arr[5];
struct UnkStruct_x1C arr[0];
};
struct UnkStruct_Leader
{
struct UnkStruct_Main0 *field_0;
struct UnkStruct_Main4 *field_4;
struct UnkStruct_Main8 *field_8;
struct UnkStruct_Main0 * field_0;
struct UnkStruct_Main4 * field_4;
struct UnkStruct_Main0 * field_8;
u8 state;
u8 textState;
u8 field_E;
@@ -67,8 +68,8 @@ struct UnkStruct_Leader
struct UnkStruct_Group
{
struct UnkStruct_Main0 *field_0;
struct UnkStruct_Main4 *field_4;
struct UnkStruct_Main0 * field_0;
struct UnkStruct_Main4 * field_4;
u8 state;
u8 textState;
u8 field_A;
@@ -95,10 +96,10 @@ struct UnionObj
struct UnkStruct_URoom
{
/* 0x000 */ struct UnkStruct_Main0 *field_0;
/* 0x004 */ struct UnkStruct_Main4 *field_4;
/* 0x008 */ struct UnkStruct_Main0 *field_8;
/* 0x00C */ struct UnkStruct_Main4 *field_C;
/* 0x000 */ struct UnkStruct_Main0 * field_0;
/* 0x004 */ struct UnkStruct_Main4 * field_4;
/* 0x008 */ struct UnkStruct_Main0 * field_8;
/* 0x00C */ struct UnkStruct_Main4 * field_C;
/* 0x010 */ u16 field_10;
/* 0x012 */ u16 field_12;
/* 0x014 */ u8 state;