diff options
author | GriffinR <griffin.g.richards@gmail.com> | 2020-12-31 14:36:01 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-31 14:36:01 -0500 |
commit | 22cd65bd55eb66a83d7d48cbfaf7aa8b8dc0d4ef (patch) | |
tree | 76b8c07967f50421adae2f847b6e6ce143e31332 /include/global.fieldmap.h | |
parent | 2183626229f0a6cebc2d0d8b2fed28080b9a55a6 (diff) | |
parent | 9509797b98cf187a9595741c0c196b4103984292 (diff) |
Merge pull request #375 from GriffinRichards/deadname
Remove deadnaming, sync BgEvent
Diffstat (limited to 'include/global.fieldmap.h')
-rw-r--r-- | include/global.fieldmap.h | 37 |
1 files changed, 12 insertions, 25 deletions
diff --git a/include/global.fieldmap.h b/include/global.fieldmap.h index a266b8ce1..c481968cf 100644 --- a/include/global.fieldmap.h +++ b/include/global.fieldmap.h @@ -125,35 +125,22 @@ struct CoordEvent u8 *script; }; -struct HiddenItemStruct -{ - u32 itemId:16; - u32 hiddenItemId:8; // flag offset to determine flag lookup - u32 quantity:7; - u32 isUnderfoot:1; -}; - -union BgUnion -{ // carried over from diego's FR/LG work, seems to be the same struct - // in gen 3, "kind" (0x3 in BgEvent struct) determines the method to read the union. - u8 *script; - - // hidden item type probably - struct HiddenItemStruct hiddenItemStr; - u32 hiddenItem; - - // secret base type - u32 secretBaseId; - -}; - struct BgEvent { u16 x, y; u8 elevation; - u8 kind; - // 0x2 padding for the union beginning. - union BgUnion bgUnion; + u8 kind; // The "kind" field determines how to access bgUnion union below. + union { + u8 *script; + struct { + u32 itemId:16; + u32 hiddenItemId:8; // flag offset to determine flag lookup + u32 quantity:7; + u32 isUnderfoot:1; + } hiddenItemStr; + u32 hiddenItem; + u32 secretBaseId; + } bgUnion; }; struct MapEvents |