summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/decompress.h1
-rw-r--r--include/global.fieldmap.h19
-rw-r--r--include/global.h51
-rw-r--r--include/link_rfu.h6
-rw-r--r--include/unk_815C980.h24
5 files changed, 85 insertions, 16 deletions
diff --git a/include/decompress.h b/include/decompress.h
index 9a2093b9f..19b507525 100644
--- a/include/decompress.h
+++ b/include/decompress.h
@@ -36,5 +36,6 @@ void LoadSpecialPokePic_DontHandleDeoxys(const struct CompressedSpriteSheet *src
u32 sub_8034974(const u8 *ptr);
void sub_800F034(const struct CompressedSpriteSheet *src);
+u32 GetDecompressedDataSize(const u8 *ptr);
#endif // GUARD_DECOMPRESS_H
diff --git a/include/global.fieldmap.h b/include/global.fieldmap.h
index b602741a6..801606d50 100644
--- a/include/global.fieldmap.h
+++ b/include/global.fieldmap.h
@@ -74,6 +74,14 @@ struct BackupMapData
u16 *map;
};
+union __attribute__((packed)) MapObjectRange {
+ u8 as_byte;
+ struct __attribute__((packed)) {
+ u8 x:4;
+ u8 y:4;
+ } __attribute__((aligned (1))) as_nybbles;
+} __attribute__((aligned (1)));
+
struct MapObjectTemplate
{
/*0x00*/ u8 localId;
@@ -83,8 +91,7 @@ struct MapObjectTemplate
/*0x06*/ s16 y;
/*0x08*/ u8 elevation;
/*0x09*/ u8 movementType;
- /*0x0A*/ u8 unkA_0:4;
- u8 unkA_4:4;
+ /*0x0A*/ union MapObjectRange range;
///*0x0B*/ u8 fillerB[1];
/*0x0C*/ u16 unkC;
/*0x0E*/ u16 unkE;
@@ -228,13 +235,7 @@ struct MapObject
/*0x14*/ struct Coords16 coords3;
/*0x18*/ u8 mapobj_unk_18:4; //current direction?
/*0x18*/ u8 placeholder18:4;
- /*0x19*/ union __attribute__((packed)) {
- u8 as_byte;
- struct __attribute__((packed)) {
- u8 x:4;
- u8 y:4;
- } __attribute__((aligned (1))) as_nybbles;
- } __attribute__((aligned (1))) range;
+ /*0x19*/ union MapObjectRange range;
/*0x1A*/ u8 mapobj_unk_1A;
/*0x1B*/ u8 mapobj_unk_1B;
/*0x1C*/ u8 mapobj_unk_1C;
diff --git a/include/global.h b/include/global.h
index 461402f1f..b10f4af49 100644
--- a/include/global.h
+++ b/include/global.h
@@ -565,6 +565,12 @@ typedef union QuestLogScene QuestLogScene;
// This name is a complete guess and may change.
+#define MAP_OBJECTS_COUNT 16
+#define BERRY_TREES_COUNT 128
+#define FLAGS_COUNT 288 // 300
+#define VARS_COUNT 256
+#define MAIL_COUNT 16
+
// Declare here so that it can be recursively referenced.
union QuestLogMovement;
@@ -578,6 +584,43 @@ union QuestLogMovement
} ident_struct;
};
+struct QuestLogMapObject
+{
+ /*0x00*/ u8 active:1;
+ /*0x00*/ u8 mapobj_bit_3:1;
+ /*0x00*/ u8 mapobj_bit_4:1;
+ /*0x00*/ u8 mapobj_bit_5:1;
+ /*0x00*/ u8 mapobj_bit_8:1;
+ /*0x00*/ u8 mapobj_bit_9:1;
+ /*0x00*/ u8 mapobj_bit_10:1;
+ /*0x00*/ u8 mapobj_bit_11:1;
+ /*0x01*/ u8 mapobj_bit_12:1;
+ /*0x01*/ u8 mapobj_bit_13:1;
+ /*0x01*/ u8 mapobj_bit_14:1;
+ /*0x01*/ u8 mapobj_bit_15:1;
+ /*0x01*/ u8 mapobj_bit_16:1;
+ /*0x01*/ u8 mapobj_bit_23:1;
+ /*0x01*/ u8 mapobj_bit_24:1;
+ /*0x01*/ u8 mapobj_bit_25:1;
+ /*0x02*/ u8 mapobj_bit_26:1;
+ /*0x02*/ u8 mapobj_unk_18:4;
+ /*0x02*/ u8 unused_02_5:3;
+ /*0x03*/ u8 mapobj_unk_0B_0:4;
+ /*0x03*/ u8 elevation:4;
+ /*0x04*/ u8 graphicsId;
+ /*0x05*/ u8 animPattern;
+ /*0x06*/ u8 trainerType;
+ /*0x07*/ u8 localId;
+ /*0x08*/ u8 mapNum;
+ /*0x09*/ u8 mapGroup;
+ /*0x0a*/ s16 x;
+ /*0x0c*/ s16 y;
+ /*0x0e*/ u8 trainerRange_berryTreeId;
+ /*0x0f*/ u8 mapobj_unk_1F;
+ /*0x10*/ u8 mapobj_unk_21;
+ /*0x11*/ u8 animId;
+};
+
struct QuestLog
{
/*0x0000*/ u8 unk_000;
@@ -586,7 +629,7 @@ struct QuestLog
/*0x0003*/ s8 unk_003;
/*0x0004*/ s16 unk_004;
/*0x0006*/ s16 unk_006;
- /*0x0008*/ u8 filler_008[0x140];
+ /*0x0008*/ struct QuestLogMapObject unk_008[MAP_OBJECTS_COUNT];
// These arrays hold the game state for
// playing back the quest log
@@ -606,12 +649,6 @@ struct FameCheckerSaveData
u16 unk_0_E:2;
};
-#define MAP_OBJECTS_COUNT 16
-#define BERRY_TREES_COUNT 128
-#define FLAGS_COUNT 288 // 300
-#define VARS_COUNT 256
-#define MAIL_COUNT 16
-
#define NUM_EASY_CHAT_EXTRA_PHRASES 33
#define EASY_CHAT_EXTRA_PHRASES_SIZE ((NUM_EASY_CHAT_EXTRA_PHRASES >> 3) + (NUM_EASY_CHAT_EXTRA_PHRASES % 8 ? 1 : 0))
diff --git a/include/link_rfu.h b/include/link_rfu.h
index d076efae6..8d02577a5 100644
--- a/include/link_rfu.h
+++ b/include/link_rfu.h
@@ -1,6 +1,11 @@
#ifndef GUARD_LINK_RFU_H
#define GUARD_LINK_RFU_H
+struct Padded_U8
+{
+ u8 value;
+};
+
void AddTextPrinterToWindow1(const u8 *str);
bool32 MG_PrintTextOnWindow1AndWaitButton(u8 * cmdPtr, const u8 * src);
void sub_80FA190(void);
@@ -11,5 +16,6 @@ void DestroyWirelessStatusIndicatorSprite(void);
void MEvent_CreateTask_CardOrNewsWithFriend(u8);
void MEvent_CreateTask_CardOrNewsOverWireless(u8);
void MEvent_CreateTask_Leader(u8);
+void sub_80F9E2C(void * data);
#endif //GUARD_LINK_RFU_H
diff --git a/include/unk_815C980.h b/include/unk_815C980.h
new file mode 100644
index 000000000..78d4bd73b
--- /dev/null
+++ b/include/unk_815C980.h
@@ -0,0 +1,24 @@
+#ifndef GUARD_UNK_815C980_H
+#define GUARD_UNK_815C980_H
+
+struct UnkStruct3
+{
+ u8 field_0_0:2;
+ u8 shape:2;
+ u8 size:2;
+ u8 priority:2;
+ u8 field_1;
+ u8 xDelta;
+ s16 x;
+ s16 y;
+ const struct SpriteSheet *spriteSheet;
+ const struct SpritePalette *spritePal;
+};
+
+void sub_815C9F4(void);
+void sub_815D108(u32 id);
+void sub_815CD70(u32 id, s32 arg1);
+u8 sub_815D324(u32 shape, u32 size);
+bool32 sub_815CA40(u32 id, s32 arg1, const struct UnkStruct3 *arg2);
+
+#endif //GUARD_UNK_815C980_H