summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/battle.h10
-rwxr-xr-xinclude/decoration.h123
-rw-r--r--[-rwxr-xr-x]include/global.fieldmap.h0
-rw-r--r--include/menu.h8
-rw-r--r--include/songs.h34
-rwxr-xr-xinclude/sprite.h2
6 files changed, 113 insertions, 64 deletions
diff --git a/include/battle.h b/include/battle.h
index 858e493f1..9714c6add 100644
--- a/include/battle.h
+++ b/include/battle.h
@@ -35,7 +35,7 @@ extern u8 unk_2000000[];
// to do: maybe try to reduce the defines needed to match?
#define BATTLE_STRUCT ((struct BattleStruct *)(unk_2000000))
#define AI_THINKING_STRUCT ((struct AI_ThinkingStruct *)(unk_2000000 + 0x16800))
-#define UNK_2016A00_STRUCT ((struct UnknownStruct1 *)(unk_2000000 + 0x16A00))
+#define UNK_2016A00_STRUCT ((struct UnkBattleStruct1 *)(unk_2000000 + 0x16A00))
#define AI_STACK ((struct AI_Stack *)(unk_2000000 + 0x16C00))
#define AI_ARRAY_160CC ((struct SmallItemStruct *)(unk_2000000 + 0x160CC))
@@ -61,7 +61,7 @@ struct Trainer
/*0x24*/ void *party;
};
-struct UnknownStruct1 // AI_Opponent_Info?
+struct UnkBattleStruct1 // AI_Opponent_Info?
{
/*0x00*/ u16 movesUsed[2][8]; // 0xFFFF means move not used (confuse self hit, etc)
/*0x20*/ u8 unk20[2];
@@ -119,10 +119,10 @@ struct BattleStruct /* 0x2000000 */
u8 filler2[0x72E];
/* 0x16800 */ struct AI_ThinkingStruct ai; /* 0x2016800 */
u8 filler1681C[0x1E4];
- /* 0x16A00 */ struct UnknownStruct1 unk_2016A00_2;
+ /* 0x16A00 */ struct UnkBattleStruct1 unk_2016A00_2;
};
-struct UnknownStruct4
+struct UnkBattleStruct4
{
/*0x00*/ u8 filler0[0x3];
/*0x04*/ u16 unk4;
@@ -143,7 +143,7 @@ struct UnknownStruct4
};
extern struct UnknownStruct1 unk_2016A00;
-extern struct UnknownStruct4 gUnknown_02024CA8[];
+extern struct UnkBattleStruct4 gUnknown_02024CA8[];
extern struct AI_ThinkingStruct gAIThinkingSpace;
struct UnknownStruct11
diff --git a/include/decoration.h b/include/decoration.h
index abeb43086..01a00ee91 100755
--- a/include/decoration.h
+++ b/include/decoration.h
@@ -1,17 +1,6 @@
#ifndef GUARD_DECORATION_H
#define GUARD_DECORATION_H
-enum DecoCat {
- /*0*/ DECOCAT_DESK,
- /*1*/ DECOCAT_CHAIR,
- /*2*/ DECOCAT_PLANT,
- /*3*/ DECOCAT_ORNAMENT,
- /*4*/ DECOCAT_MAT,
- /*5*/ DECOCAT_POSTER,
- /*6*/ DECOCAT_DOLL,
- /*7*/ DECOCAT_CUSHION
-};
-
enum DecoId {
/*000*/ DECOR_NONE,
/*001*/ DECOR_SMALL_DESK,
@@ -136,16 +125,57 @@ enum DecoId {
/*120*/ DECOR_REGISTEEL_DOLL
};
+enum DecorPerm {
+ /*
+ * The nomenclature here describes collision and placement permissions, in that order.
+ */
+ DECORPERM_SOLID_FLOOR,
+ DECORPERM_PASS_FLOOR,
+ DECORPERM_BEHIND_FLOOR,
+ DECORPERM_NA_WALL,
+ DECORPERM_SOLID_MAT
+};
+
+enum DecorShape {
+ /*
+ * Width-x-height
+ */
+ DECORSHAPE_1x1,
+ DECORSHAPE_2x1,
+ DECORSHAPE_3x1, // unused
+ DECORSHAPE_4x2,
+ DECORSHAPE_2x2,
+ DECORSHAPE_1x2,
+ DECORSHAPE_1x3, // unused
+ DECORSHAPE_2x4,
+ DECORSHAPE_3x3,
+ DECORSHAPE_3x2
+};
+
+enum DecoCat {
+ /*
+ * In which category you can find the decoration in the PC.
+ */
+ /*0*/ DECORCAT_DESK,
+ /*1*/ DECORCAT_CHAIR,
+ /*2*/ DECORCAT_PLANT,
+ /*3*/ DECORCAT_ORNAMENT,
+ /*4*/ DECORCAT_MAT,
+ /*5*/ DECORCAT_POSTER,
+ /*6*/ DECORCAT_DOLL,
+ /*7*/ DECORCAT_CUSHION
+};
+
struct Decoration
{
/*0x00*/ u8 id;
/*0x01*/ u8 name[16];
- /*0x11*/ u8 decor_field_11;
- /*0x12*/ u8 decor_field_12;
- /*0x13*/ u8 decor_field_13;
+ /*0x11*/ u8 permission;
+ /*0x12*/ u8 shape;
+ /*0x13*/ u8 category;
/*0x14*/ u16 price;
- /*0x18*/ u8 *description;
- /*0x1c*/ u16 *tiles;
+ /*0x18*/ const u8 *description;
+ /*0x1c*/ const u16 *tiles;
};
struct DecoPCPointers
@@ -164,9 +194,9 @@ struct DecorationInventory
struct UnkStruct_803EC860
{
- u8 *var0;
- u8 *var4;
- u8 *var8;
+ const u8 *tiles;
+ const u8 *y;
+ const u8 *x;
u8 size;
};
@@ -177,38 +207,36 @@ extern u8 ewram[];
struct UnkStruct_02038900
{
- /*0x000; 0x02038900*/ struct Decoration *decoration;
- /*0x004; 0x02038904*/ u16 unk_004[0x40];
- /*0x084; 0x02038984*/ u8 unk_084[0x800];
- /*0x884; 0x02039184*/ u16 unk_884[16];
+ /*0x000; 0x02038900*/ const struct Decoration *decoration;
+ /*0x004; 0x02038904*/ u16 tiles[0x40];
+ /*0x084; 0x02038984*/ u8 image[0x800];
+ /*0x884; 0x02039184*/ u16 palette[16];
};
struct UnkStruct_083EC900
{
- u8 unk_0;
- u8 unk_1;
- u8 unk_2;
- u8 unk_3;
+ u8 shape;
+ u8 size;
+ u8 x;
+ u8 y;
};
struct UnkStruct_020391B4
{
- u8 var00;
- u8 var01;
- u8 var02;
- u8 var03;
- u16 var04;
- u8 pad06[2];
+ u8 decorId;
+ u8 width;
+ u8 height;
+ u16 flagId;
};
-extern const struct UnkStruct_083EC900 gUnknown_083EC900[10];
+extern const struct UnkStruct_083EC900 gUnknown_083EC900[];
extern const struct SpritePalette gUnknown_083EC954;
extern const struct SpritePalette gUnknown_083ECA5C;
extern const struct SpritePalette gUnknown_083ECA64;
extern const struct SpriteTemplate gSpriteTemplate_83EC93C;
extern const struct SpriteTemplate gSpriteTemplate_83ECA88;
-extern struct Decoration gDecorations[0x77];
+extern const struct Decoration gDecorations[];
extern struct UnkStruct_02038900 gUnknown_02038900;
extern u8 *gUnknown_020388D0;
extern u8 gUnknown_081A2F7B[];
@@ -235,13 +263,13 @@ extern u8 gUnknown_020391A9;
extern u8 gUnknown_020391AA;
extern u8 gUnknown_02039234;
extern void (*gUnknown_0300485C)(void);
-extern void (*gUnknown_083EC96C[2][2])(u8);
+extern const struct YesNoFuncTable gUnknown_083EC96C[];
extern struct UnkStruct_020391B4 gUnknown_020391B4[16];
extern const u16 gUnknown_083EC654[3];
extern const struct DecorationInventory gDecorationInventories[];
-extern const u8 *gUnknown_083EC5E4[];
-extern const u8 *gUnknown_083EC624[];
+extern const u8 *const gUnknown_083EC5E4[];
+extern const u8 *const gUnknown_083EC624[];
extern u8 gUnknown_020388F7[];
extern const struct MenuAction2 gUnknown_083EC604[];
extern const struct MenuAction3 gUnknown_083EC634[];
@@ -326,4 +354,23 @@ void sub_81016F4(void);
void sub_8101824(u8);
void sub_8109A30(u8);
+void sub_80FF160(u8);
+void sub_80FF5BC(u8);
+void sub_80FF058(u8);
+void sub_8100A0C(u8);
+void sub_8101700(u8);
+void sub_81017A0(u8);
+void sub_8109D04(u8);
+
+void sub_80FED3C(u8);
+void sub_80FFAB0(u8);
+void sub_80FFB08(u8);
+void sub_81000C4(u8);
+void sub_810026C(u8);
+void sub_8100F88(u8);
+void sub_8100FB4(u8);
+void sub_810153C(u8);
+void sub_8101590(u8);
+void sub_8101848(u8);
+
#endif // GUARD_DECORATION_H
diff --git a/include/global.fieldmap.h b/include/global.fieldmap.h
index b8bab45d8..b8bab45d8 100755..100644
--- a/include/global.fieldmap.h
+++ b/include/global.fieldmap.h
diff --git a/include/menu.h b/include/menu.h
index 04ab78b27..98d7afcc3 100644
--- a/include/menu.h
+++ b/include/menu.h
@@ -12,13 +12,13 @@ struct MenuAction
struct MenuAction2
{
const u8 *text;
- u8 (*func)(u8);
+ void (*func)(u8);
};
struct MenuAction3
{
- u8 (*func1)(u8);
- u8 (*func2)(u8);
+ void (*func1)(u8);
+ void (*func2)(u8);
};
void CloseMenu(void);
@@ -64,7 +64,7 @@ s8 ProcessMenuInputNoWrap_(void);
u8 MenuPrint_PixelCoords(const u8 *, u8, u16, u8);
u8 sub_8072A18(const u8 *, u8, u16, u8, u32);
u8 unref_sub_8072A5C(u8 *, u8 *, u8, u16, u8, u32);
-int sub_8072AB0(u8 *, u8, u16, u8, u8, u32);
+int sub_8072AB0(const u8 *, u8, u16, u8, u8, u32);
void MenuPrint_RightAligned(u8 *, u8, u8);
void sub_8072B80(u8 *, u8, u8, u8 *);
void sub_8072BD8(const u8 *, u8, u8, u16);
diff --git a/include/songs.h b/include/songs.h
index c465ac562..d7829479f 100644
--- a/include/songs.h
+++ b/include/songs.h
@@ -3,23 +3,23 @@
enum
{
- SE_STOP,
- SE_KAIFUKU,
- SE_PC_LOGON,
- SE_PC_OFF,
- SE_PC_ON,
- SE_SELECT,
- SE_WIN_OPEN,
- SE_WALL_HIT,
- SE_DOOR,
- SE_KAIDAN,
- SE_DANSA,
- SE_JITENSYA,
- SE_KOUKA_L,
- SE_KOUKA_M,
- SE_KOUKA_H,
- SE_BOWA2,
- SE_POKE_DEAD,
+ /*0x00*/ SE_STOP,
+ /*0x01*/ SE_KAIFUKU,
+ /*0x02*/ SE_PC_LOGON,
+ /*0x03*/ SE_PC_OFF,
+ /*0x04*/ SE_PC_ON,
+ /*0x05*/ SE_SELECT,
+ /*0x06*/ SE_WIN_OPEN,
+ /*0x07*/ SE_WALL_HIT,
+ /*0x08*/ SE_DOOR,
+ /*0x09*/ SE_KAIDAN,
+ /*0x0A*/ SE_DANSA,
+ /*0x0B*/ SE_JITENSYA,
+ /*0x0C*/ SE_KOUKA_L,
+ /*0x0D*/ SE_KOUKA_M,
+ /*0x0E*/ SE_KOUKA_H,
+ /*0x0F*/ SE_BOWA2,
+ /*0x10*/ SE_POKE_DEAD,
SE_NIGERU,
SE_JIDO_DOA,
SE_NAMINORI,
diff --git a/include/sprite.h b/include/sprite.h
index 6bf7a38c5..dd9d5efb7 100755
--- a/include/sprite.h
+++ b/include/sprite.h
@@ -16,6 +16,8 @@ struct SpriteFrameImage
u16 size;
};
+#define obj_frame_tiles(ptr) {.data = (u8 *)ptr, .size = sizeof ptr}
+
struct SpritePalette
{
const u16 *data;