summaryrefslogtreecommitdiff
path: root/include/global.fieldmap.h
diff options
context:
space:
mode:
authorPikalaxALT <PikalaxALT@users.noreply.github.com>2019-10-03 20:57:28 -0400
committerGitHub <noreply@github.com>2019-10-03 20:57:28 -0400
commit0cf4c9f25c2fe165c53a0c24f93a31a27ea42d6a (patch)
treeb88f7cf114f3f0c79ba6816255f27cda21f335d7 /include/global.fieldmap.h
parentd9ab841b0d72a52676131846447de26e59e7a16d (diff)
parentaa0ac46b7145951f1d6f65e7af005a3fe561ff63 (diff)
Merge pull request #108 from PikalaxALT/itemfinder
Itemfinder
Diffstat (limited to 'include/global.fieldmap.h')
-rw-r--r--include/global.fieldmap.h36
1 files changed, 22 insertions, 14 deletions
diff --git a/include/global.fieldmap.h b/include/global.fieldmap.h
index 3623737ea..bf142d265 100644
--- a/include/global.fieldmap.h
+++ b/include/global.fieldmap.h
@@ -120,26 +120,34 @@ 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 hiddenItem;
+
+ // secret base type
+ u32 secretBaseId;
+
+};
+
struct BgEvent
{
u16 x, y;
u8 unk4;
u8 kind;
// 0x2 padding for the union beginning.
- union { // 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 {
- u8 filler6[0x2];
- u16 hiddenItemId; // flag offset to determine flag lookup
- } hiddenItem;
-
- // secret base type
- u32 secretBaseId;
-
- } bgUnion;
+ union BgUnion bgUnion;
};
struct MapEvents