Add typedefs for MAPSEC and METLOC values (#2183)
Added typedefs: mapsec_t, metloc_t, and variants for MAPSEC and METLOC values. There are some rough edges that could do with smoothing out, but for now, this gets us close to ideal with a ROM that compares equal. Per feedback, all typedefs to mention the underlying type within the typedef name. The documentation comments reflect and explain the naming convention. Updated comments to reflect the fact that we're no longer using SET8 for a Pokemon's met locations, in favor of a new macro (added by this PR) that adjusts to match the width of whatever is being set.
This commit is contained in:
@@ -226,7 +226,7 @@ typedef union // size = 0x24
|
||||
/*0x04*/ u8 filler_04[2];
|
||||
/*0x06*/ u16 itemIds[SMARTSHOPPER_NUM_ITEMS];
|
||||
/*0x0C*/ u16 itemAmounts[SMARTSHOPPER_NUM_ITEMS];
|
||||
/*0x12*/ u8 shopLocation;
|
||||
/*0x12*/ mapsec_u8_t shopLocation;
|
||||
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
/*0x1B*/ //u8 padding;
|
||||
} smartshopperShow;
|
||||
@@ -241,7 +241,7 @@ typedef union // size = 0x24
|
||||
/*0x0E*/ u16 species2;
|
||||
/*0x10*/ u8 nBallsUsed;
|
||||
/*0x11*/ u8 outcome;
|
||||
/*0x12*/ u8 location;
|
||||
/*0x12*/ mapsec_u8_t location;
|
||||
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
/*0x1B*/ //u8 padding;
|
||||
} pokemonTodayFailed;
|
||||
@@ -267,7 +267,7 @@ typedef union // size = 0x24
|
||||
/*0x04*/ u16 caughtPoke;
|
||||
/*0x06*/ u16 steps;
|
||||
/*0x08*/ u16 species;
|
||||
/*0x0A*/ u8 location;
|
||||
/*0x0A*/ mapsec_u8_t location;
|
||||
/*0x0B*/ u8 language;
|
||||
/*0x0C*/ u8 filler_0C[7];
|
||||
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
@@ -282,7 +282,7 @@ typedef union // size = 0x24
|
||||
/*0x04*/ u8 badgeCount;
|
||||
/*0x05*/ u8 nSilverSymbols;
|
||||
/*0x06*/ u8 nGoldSymbols;
|
||||
/*0x07*/ u8 location;
|
||||
/*0x07*/ mapsec_u8_t location;
|
||||
/*0x08*/ u16 battlePoints;
|
||||
/*0x0A*/ u16 mapLayoutId;
|
||||
/*0x0C*/ u8 language;
|
||||
@@ -309,7 +309,7 @@ typedef union // size = 0x24
|
||||
/*0x00*/ u8 kind;
|
||||
/*0x01*/ bool8 active;
|
||||
/*0x02*/ u16 item;
|
||||
/*0x04*/ u8 location;
|
||||
/*0x04*/ mapsec_u8_t location;
|
||||
/*0x05*/ u8 language;
|
||||
/*0x06*/ u16 mapLayoutId;
|
||||
/*0x08*/ u8 filler_08[11];
|
||||
@@ -336,7 +336,7 @@ typedef union // size = 0x24
|
||||
/*0x00*/ u8 kind;
|
||||
/*0x01*/ bool8 active;
|
||||
/*0x02*/ u16 lastOpponentSpecies;
|
||||
/*0x04*/ u8 location;
|
||||
/*0x04*/ mapsec_u8_t location;
|
||||
/*0x05*/ u8 outcome;
|
||||
/*0x06*/ u16 caughtMonBall;
|
||||
/*0x08*/ u16 balls;
|
||||
@@ -505,7 +505,7 @@ struct GabbyAndTyData
|
||||
/*2BA6*/ u16 mon2;
|
||||
/*2BA8*/ u16 lastMove;
|
||||
/*2BAA*/ u16 quote[1];
|
||||
/*2BAC*/ u8 mapnum;
|
||||
/*2BAC*/ mapsec_u8_t mapnum;
|
||||
/*2BAD*/ u8 battleNum;
|
||||
/*2BAE*/ u8 battleTookMoreThanOneTurn:1;
|
||||
u8 playerLostAMon:1;
|
||||
|
||||
Reference in New Issue
Block a user