diff options
author | Cameron Hall <camthesaxman@users.noreply.github.com> | 2016-10-25 23:38:35 -0500 |
---|---|---|
committer | YamaArashi <YamaArashi@users.noreply.github.com> | 2016-10-25 21:38:35 -0700 |
commit | e65f3ef73280c94549452f4142cbee70887fad65 (patch) | |
tree | 559fcbab5c0c20c5cb3959bbd1d58d286bf21e3a /include | |
parent | 6cb3764a0952f7b343f192f4055a937953a41218 (diff) |
decompile wild_encounter.c (#71)
* start decompiling wild_encounter
* decompile more code
* decompile more code
* decompile a few more functions
* try (unsuccessfully) to decompile StandardWildEncounter
* more work trying to get it to match
* finish decompiling all that I can
* clean up a bit and fix whitespace issues
* tab to spaces
Diffstat (limited to 'include')
-rw-r--r-- | include/fieldmap.h | 20 | ||||
-rw-r--r-- | include/global.h | 45 |
2 files changed, 38 insertions, 27 deletions
diff --git a/include/fieldmap.h b/include/fieldmap.h index 852a6c337..a7a45218d 100644 --- a/include/fieldmap.h +++ b/include/fieldmap.h @@ -36,16 +36,16 @@ struct MapData struct MapObjectTemplate { - u8 localId; - u8 filler_1[0x3]; - s16 x; - s16 y; - u8 elevation; - u8 movementType; - u8 filler_A[0x6]; - u8 *script; - u8 filler_14[0x4]; -}; + /*0x00*/ u8 localId; + /*0x01*/ u8 filler_1[0x3]; + /*0x04*/ s16 x; + /*0x06*/ s16 y; + /*0x08*/ u8 elevation; + /*0x09*/ u8 movementType; + /*0x0A*/ u8 filler_A[0x6]; + /*0x10*/ u8 *script; + /*0x14*/ u8 filler_14[0x4]; +}; /*size = 0x18*/ struct WarpEvent { diff --git a/include/global.h b/include/global.h index 207e9b6b2..1691b7776 100644 --- a/include/global.h +++ b/include/global.h @@ -162,17 +162,17 @@ struct SB1_2EFC_Struct struct SaveBlock1 { - struct Coords16 pos; - struct WarpData location; - struct WarpData warp1; - struct WarpData warp2; - struct WarpData warp3; - struct WarpData warp4; - u16 battleMusic; - u8 weather; - u8 filler_2F; - u8 flashUsed; - u16 mapDataId; + /*0x00*/ struct Coords16 pos; + /*0x04*/ struct WarpData location; + /*0x0C*/ struct WarpData warp1; + /*0x14*/ struct WarpData warp2; + /*0x1C*/ struct WarpData warp3; + /*0x24*/ struct WarpData warp4; + /*0x2C*/ u16 battleMusic; + /*0x2E*/ u8 weather; + /*0x2F*/ u8 filler_2F; + /*0x30*/ u8 flashUsed; + /*0x32*/ u16 mapDataId; u16 mapView[0x100]; u8 playerPartyCount; struct Pokemon playerParty[6]; @@ -192,11 +192,11 @@ struct SaveBlock1 u16 trainerRematchStepCounter; u8 trainerRematches[100]; struct MapObject mapObjects[16]; - struct MapObjectTemplate mapObjectTemplates[64]; - u8 flags[0x120]; - u16 vars[0x100]; - u32 gameStats[NUM_GAME_STATS]; - struct BerryTree berryTrees[128]; + /*0xC20*/ struct MapObjectTemplate mapObjectTemplates[64]; + /*0x1220*/ u8 flags[0x120]; + /*0x1340*/ u16 vars[0x100]; + /*0x1540*/ u32 gameStats[NUM_GAME_STATS]; + /*0x1608*/ struct BerryTree berryTrees[128]; /*0x1A08*/ struct SecretBaseRecord secretBases[20]; /*0x2688*/ u8 playerRoomDecor[12]; /*0x2694*/ u8 playerRoomDecorPos[12]; @@ -210,7 +210,18 @@ struct SaveBlock1 u8 decorCushion[10]; u8 padding_2736[2]; u8 tvShows[24][36]; // TODO: TV show struct - u8 filler_2A98[0x464]; + /*0x2A98*/ u8 filler_2A98[0x64]; + /*0x2AFC*/ u16 outbreakPokemonSpecies; + /*0x2AFE*/ u8 outbreakLocationMapNum; + /*0x2AFF*/ u8 outbreakLocationMapGroup; + /*0x2B00*/ u8 outbreakPokemonLevel; + /*0x2B01*/ u8 filler_2B01[3]; + /*0x2B04*/ u16 outbreakPokemonMoves[4]; + /*0x2B0C*/ u8 unk2B0C; + /*0x2B0D*/ u8 outbreakPokemonProbability; + /*0x2B0E*/ u8 filler_2B0E[0x2C8]; + /*0x2DD6*/ u16 feebasLocationSeed; + /*0x2DD8*/ u8 filler_2DD8[0x124]; struct SB1_2EFC_Struct sb1_2EFC_struct[5]; u8 filler_2F9C[0x1A8]; /*0x3144*/ struct Roamer roamer; |