summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authoryenatch <yenatch@gmail.com>2017-06-14 00:05:22 -0400
committerGitHub <noreply@github.com>2017-06-14 00:05:22 -0400
commit48a15638c63f2b3d4b2d12d346e466ddca006570 (patch)
tree89942e8cf1e40968b48759bf2b4e575912a2271b /include
parente09e1da6c252e17cf6db429ad142b05dbf156548 (diff)
parent4e7297790f29987b1dd502fcf3b03ca76042c622 (diff)
Merge pull request #316 from PikalaxALT/decoration
Decoration
Diffstat (limited to 'include')
-rw-r--r--include/battle.h48
-rw-r--r--include/contest_painting.h8
-rwxr-xr-x[-rw-r--r--]include/decoration.h371
-rw-r--r--include/fieldmap.h2
-rw-r--r--include/gba/io_reg.h2
-rw-r--r--include/global.fieldmap.h26
-rw-r--r--include/global.h18
-rw-r--r--include/items.h758
-rw-r--r--include/menu.h14
-rw-r--r--include/naming_screen.h2
-rw-r--r--include/palette.h32
-rw-r--r--include/save.h12
-rw-r--r--include/script.h2
-rw-r--r--include/sprite.h4
-rw-r--r--include/task.h12
15 files changed, 844 insertions, 467 deletions
diff --git a/include/battle.h b/include/battle.h
index 9714c6add..47ddef71d 100644
--- a/include/battle.h
+++ b/include/battle.h
@@ -107,9 +107,9 @@ struct SmallItemStruct
struct BattleStruct /* 0x2000000 */
{
u8 filler0[0x15DDE];
- /*0x15DDE*/ u8 unk15DDE;
- /*0x15DDF*/ u8 unk15DDF;
- /*0x15DE0*/ u8 filler15DE0[0x23C]; // 0xAF off?
+ /*0x15DDE*/ u8 unk15DDE;
+ /*0x15DDF*/ u8 unk15DDF;
+ /*0x15DE0*/ u8 filler15DE0[0x23C]; // 0xAF off?
struct SmallBattleStruct1 unk;
u8 filler1[0x68];
/* 0x16089 */ u8 safariFleeRate;
@@ -148,27 +148,27 @@ extern struct AI_ThinkingStruct gAIThinkingSpace;
struct UnknownStruct11
{
- u8 unk0;
- u8 unk1;
- u8 unk2;
- u8 unk3;
- u8 unk4;
- u8 unk5_0:1;
- u8 unk5_1:1;
- u16 unk6;
- u8 unk8[10];
- u8 unk12;
- u8 unk13;
- u8 unk14[10];
- u8 filler1E[2];
- u16 unk20;
- u16 unk22;
- u16 unk24;
- u16 unk26;
- u16 unk28;
- u8 unk2A[10];
- u8 filler34[2];
- u8 unk36[10];
+ u8 unk0;
+ u8 unk1;
+ u8 unk2;
+ u8 unk3;
+ u8 unk4;
+ u8 unk5_0:1;
+ u8 unk5_1:1;
+ u16 unk6;
+ u8 unk8[10];
+ u8 unk12;
+ u8 unk13;
+ u8 unk14[10];
+ u8 filler1E[2];
+ u16 unk20;
+ u16 unk22;
+ u16 unk24;
+ u16 unk26;
+ u16 unk28;
+ u8 unk2A[10];
+ u8 filler34[2];
+ u8 unk36[10];
};
#endif // GUARD_BATTLE_H
diff --git a/include/contest_painting.h b/include/contest_painting.h
index a67748d02..5c1b065c2 100644
--- a/include/contest_painting.h
+++ b/include/contest_painting.h
@@ -8,10 +8,10 @@
enum
{
- NORMAL_RANK,
- SUPER_RANK,
- HYPER_RANK,
- MASTER_RANK,
+ NORMAL_RANK,
+ SUPER_RANK,
+ HYPER_RANK,
+ MASTER_RANK,
};
enum
diff --git a/include/decoration.h b/include/decoration.h
index d041a8007..01a00ee91 100644..100755
--- a/include/decoration.h
+++ b/include/decoration.h
@@ -1,19 +1,376 @@
#ifndef GUARD_DECORATION_H
#define GUARD_DECORATION_H
+enum DecoId {
+ /*000*/ DECOR_NONE,
+ /*001*/ DECOR_SMALL_DESK,
+ /*002*/ DECOR_POKEMON_DESK,
+ /*003*/ DECOR_HEAVY_DESK,
+ /*004*/ DECOR_RAGGED_DESK,
+ /*005*/ DECOR_COMFORT_DESK,
+ /*006*/ DECOR_PRETTY_DESK,
+ /*007*/ DECOR_BRICK_DESK,
+ /*008*/ DECOR_CAMP_DESK,
+ /*009*/ DECOR_HARD_DESK,
+ /*010*/ DECOR_SMALL_CHAIR,
+ /*011*/ DECOR_POKEMON_CHAIR,
+ /*012*/ DECOR_HEAVY_CHAIR,
+ /*013*/ DECOR_PRETTY_CHAIR,
+ /*014*/ DECOR_COMFORT_CHAIR,
+ /*015*/ DECOR_RAGGED_CHAIR,
+ /*016*/ DECOR_BRICK_CHAIR,
+ /*017*/ DECOR_CAMP_CHAIR,
+ /*018*/ DECOR_HARD_CHAIR,
+ /*019*/ DECOR_RED_PLANT,
+ /*020*/ DECOR_TROPICAL_PLANT,
+ /*021*/ DECOR_PRETTY_FLOWERS,
+ /*022*/ DECOR_COLORFUL_PLANT,
+ /*023*/ DECOR_BIG_PLANT,
+ /*024*/ DECOR_GORGEOUS_PLANT,
+ /*025*/ DECOR_RED_BRICK,
+ /*026*/ DECOR_YELLOW_BRICK,
+ /*027*/ DECOR_BLUE_BRICK,
+ /*028*/ DECOR_RED_BALLOON,
+ /*029*/ DECOR_BLUE_BALLOON,
+ /*030*/ DECOR_YELLOW_BALLOON,
+ /*031*/ DECOR_RED_TENT,
+ /*032*/ DECOR_BLUE_TENT,
+ /*033*/ DECOR_SOLID_BOARD,
+ /*034*/ DECOR_SLIDE,
+ /*035*/ DECOR_FENCE_LENGTH,
+ /*036*/ DECOR_FENCE_WIDTH,
+ /*037*/ DECOR_TIRE,
+ /*038*/ DECOR_STAND,
+ /*039*/ DECOR_MUD_BALL,
+ /*040*/ DECOR_BREAKABLE_DOOR,
+ /*041*/ DECOR_SAND_ORNAMENT,
+ /*042*/ DECOR_SILVER_SHIELD,
+ /*043*/ DECOR_GOLD_SHIELD,
+ /*044*/ DECOR_GLASS_ORNAMENT,
+ /*045*/ DECOR_TV,
+ /*046*/ DECOR_ROUND_TV,
+ /*047*/ DECOR_CUTE_TV,
+ /*048*/ DECOR_GLITTER_MAT,
+ /*049*/ DECOR_JUMP_MAT,
+ /*050*/ DECOR_SPIN_MAT,
+ /*051*/ DECOR_C_LOW_NOTE_MAT,
+ /*052*/ DECOR_D_NOTE_MAT,
+ /*053*/ DECOR_E_NOTE_MAT,
+ /*054*/ DECOR_F_NOTE_MAT,
+ /*055*/ DECOR_G_NOTE_MAT,
+ /*056*/ DECOR_A_NOTE_MAT,
+ /*057*/ DECOR_B_NOTE_MAT,
+ /*058*/ DECOR_C_HIGH_NOTE_MAT,
+ /*059*/ DECOR_SURF_MAT,
+ /*060*/ DECOR_THUNDER_MAT,
+ /*061*/ DECOR_FIRE_BLAST_MAT,
+ /*062*/ DECOR_POWDER_SNOW_MAT,
+ /*063*/ DECOR_ATTRACT_MAT,
+ /*064*/ DECOR_FISSURE_MAT,
+ /*065*/ DECOR_SPIKES_MAT,
+ /*066*/ DECOR_BALL_POSTER,
+ /*067*/ DECOR_GREEN_POSTER,
+ /*068*/ DECOR_RED_POSTER,
+ /*069*/ DECOR_BLUE_POSTER,
+ /*070*/ DECOR_CUTE_POSTER,
+ /*071*/ DECOR_PIKA_POSTER,
+ /*072*/ DECOR_LONG_POSTER,
+ /*073*/ DECOR_SEA_POSTER,
+ /*074*/ DECOR_SKY_POSTER,
+ /*075*/ DECOR_KISS_POSTER,
+ /*076*/ DECOR_PICHU_DOLL,
+ /*077*/ DECOR_PIKACHU_DOLL,
+ /*078*/ DECOR_MARILL_DOLL,
+ /*079*/ DECOR_TOGEPI_DOLL,
+ /*080*/ DECOR_CYNDAQUIL_DOLL,
+ /*081*/ DECOR_CHIKORITA_DOLL,
+ /*082*/ DECOR_TOTODILE_DOLL,
+ /*083*/ DECOR_JIGGLYPUFF_DOLL,
+ /*084*/ DECOR_MEOWTH_DOLL,
+ /*085*/ DECOR_CLEFAIRY_DOLL,
+ /*086*/ DECOR_DITTO_DOLL,
+ /*087*/ DECOR_SMOOCHUM_DOLL,
+ /*088*/ DECOR_TREECKO_DOLL,
+ /*089*/ DECOR_TORCHIC_DOLL,
+ /*090*/ DECOR_MUDKIP_DOLL,
+ /*091*/ DECOR_DUSKULL_DOLL,
+ /*092*/ DECOR_WYNAUT_DOLL,
+ /*093*/ DECOR_BALTOY_DOLL,
+ /*094*/ DECOR_KECLEON_DOLL,
+ /*095*/ DECOR_AZURILL_DOLL,
+ /*096*/ DECOR_SKITTY_DOLL,
+ /*097*/ DECOR_SWABLU_DOLL,
+ /*098*/ DECOR_GULPIN_DOLL,
+ /*099*/ DECOR_LOTAD_DOLL,
+ /*100*/ DECOR_SEEDOT_DOLL,
+ /*101*/ DECOR_PIKA_CUSHION,
+ /*102*/ DECOR_ROUND_CUSHION,
+ /*103*/ DECOR_KISS_CUSHION,
+ /*104*/ DECOR_ZIGZAG_CUSHION,
+ /*105*/ DECOR_SPIN_CUSHION,
+ /*106*/ DECOR_DIAMOND_CUSHION,
+ /*107*/ DECOR_BALL_CUSHION,
+ /*108*/ DECOR_GRASS_CUSHION,
+ /*109*/ DECOR_FIRE_CUSHION,
+ /*110*/ DECOR_WATER_CUSHION,
+ /*111*/ DECOR_SNORLAX_DOLL,
+ /*112*/ DECOR_RHYDON_DOLL,
+ /*113*/ DECOR_LAPRAS_DOLL,
+ /*114*/ DECOR_VENUSAUR_DOLL,
+ /*115*/ DECOR_CHARIZARD_DOLL,
+ /*116*/ DECOR_BLASTOISE_DOLL,
+ /*117*/ DECOR_WAILMER_DOLL,
+ /*118*/ DECOR_REGIROCK_DOLL,
+ /*119*/ DECOR_REGICE_DOLL,
+ /*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
+{
+ /* 0x00 */ u8 *items;
+ /* 0x04 */ u8 *pos;
+ /* 0x08 */ u8 size;
+ /* 0x09 */ u8 isPlayerRoom;
+};
+
+struct DecorationInventory
+{
+ u8 *items;
+ u8 size;
};
-extern struct Decoration gDecorations[0x77];
-extern void sub_80FF394(u16 unkr0, u16 unkr1, u16 unkr2);
+struct UnkStruct_803EC860
+{
+ const u8 *tiles;
+ const u8 *y;
+ const u8 *x;
+ u8 size;
+};
+
+extern const struct UnkStruct_803EC860 gUnknown_083EC860[];
+
+extern u8 ewram[];
+#define ewram_1f000 (*(struct DecoPCPointers *)(ewram + 0x1f000))
+
+struct UnkStruct_02038900
+{
+ /*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 shape;
+ u8 size;
+ u8 x;
+ u8 y;
+};
+
+struct UnkStruct_020391B4
+{
+ u8 decorId;
+ u8 width;
+ u8 height;
+ u16 flagId;
+};
+
+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 const struct Decoration gDecorations[];
+extern struct UnkStruct_02038900 gUnknown_02038900;
+extern u8 *gUnknown_020388D0;
+extern u8 gUnknown_081A2F7B[];
+extern u8 gUnknown_081A2F8A[];
+extern struct OamData gUnknown_020391AC;
+
+extern u8 gUnknown_020388D4;
+extern u8 gUnknown_020388D5;
+extern u8 gUnknown_020388F2;
+extern u8 gUnknown_020388F3;
+extern u8 gUnknown_020388F4;
+extern u8 gUnknown_020388F5;
+extern u8 gUnknown_020388F6;
+extern u8 gUnknown_020388D6[16];
+extern u8 gUnknown_020388E6[12];
+extern u16 gSpecialVar_0x8004;
+extern u16 gSpecialVar_0x8005;
+extern u16 gSpecialVar_0x8006;
+extern u16 gSpecialVar_0x8007;
+extern u16 gUnknown_020391A4;
+extern u16 gUnknown_020391A6;
+extern u8 gUnknown_020391A8;
+extern u8 gUnknown_020391A9;
+extern u8 gUnknown_020391AA;
+extern u8 gUnknown_02039234;
+extern void (*gUnknown_0300485C)(void);
+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 *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[];
+extern const u8 gUnknown_083EC65A[];
+extern const u8 gUnknown_083EC97C[];
+extern const u8 gUnknown_083EC984[];
+extern void sub_80B3068(u8); // src/shop
+extern const struct YesNoFuncTable gUnknown_083EC95C;
+extern const struct YesNoFuncTable gUnknown_083EC964;
+extern const struct YesNoFuncTable gUnknown_083EC9CC;
+extern const struct YesNoFuncTable gUnknown_083EC9D4;
+extern const struct YesNoFuncTable gUnknown_083ECAA0;
+
+extern u8 sub_8134194(u8); // src/decoration_inventory
+extern bool8 sub_81341D4(void); // src/decoration_inventory
+extern void sub_8134104(u8); // src/decoration_inventory
+extern bool8 sub_807D770(void);
+extern void sub_80F944C(void); // src/menu_helpers
+extern void sub_80F9480(u8 *, u8); // src/menu_helpers
+extern void sub_80F94A4(u8, u8 *, u8, s16); // src/menu_helpers
+extern void sub_80F94F8(u8 *); // src/menu_helpers
+extern void sub_80F9520(u8 *, u8); // src/menu_helpers
+extern void DestroyVerticalScrollIndicator(u8); // src/menu_helpers
+extern void CreateVerticalScrollIndicators(u8, u8, u8); // src/menu_helpers
+extern void LoadScrollIndicatorPalette(void); // src/menu_helpers
+extern void DisplayItemMessageOnField(u8, const u8 *, TaskFunc, u16); // src/menu_helpers
+extern void BuyMenuFreeMemory(void); // src/menu_helpers
+extern void sub_8109DAC(u8); // src/trader
+extern void ReshowPlayerPC(u8); // src/player_pc
+
+void sub_80FE2B4(void);
+void Task_DecorationPCProcessMenuInput(u8);
+void sub_80FE394(void);
+void gpu_pal_decompress_alloc_tag_and_upload(u8);
+void sub_80FE5AC(u8);
+void sub_80FE604(u8);
+void sub_80FE728(u8);
+void sub_80FE758(u8);
+void sub_80FE868(u8);
+void sub_80FE948(u8);
+void sub_80FEABC(u8, u8);
+void sub_80FEC94(u8);
+void sub_80FECB8(u8);
+void sub_80FECE0(u8);
+void sub_80FEF50(u8);
+void sub_80FF394(u16, u16, u16);
+void sub_80FF6AC(u8);
+void sub_80FF960(u8);
+void AddDecorationIconObjectFromFieldObject(struct UnkStruct_02038900 *, u8);
+void SetUpPlacingDecorationPlayerAvatar(u8, struct UnkStruct_02038900 *);
+void sub_8100038(u8);
+void sub_81000A0(u8);
+void sub_8100174(u8);
+void sub_8100248(u8);
+void sub_810028C(u8);
+void c1_overworld_prev_quest(u8);
+void sub_8100364(void);
+void sub_810045C(void);
+void sub_810065C(u8);
+void sub_81006A8(u8);
+void sub_81006D0(struct UnkStruct_02038900 *);
+void sub_810070C(u16 *, u16);
+void sub_8100874(struct UnkStruct_02038900 *);
+void sub_81008BC(struct UnkStruct_02038900 *);
+void sub_8100930(u8);
+void sub_81009A8(struct Sprite *);
+void sub_81009C0(struct Sprite *);
+bool8 sub_8100D38(u8);
+void sub_8100E70(u8);
+void sub_8100EEC(u8);
+void sub_8101024(u8);
+void sub_81010F0(u8);
+void sub_8101460(u8);
+void sub_8101518(u8);
+void sub_81015B0(u8);
+void sub_81015E0(u8);
+void sub_810156C(u8);
+void sub_8101678(void);
+void sub_8101698(struct Sprite *);
+void sub_81016C8(void);
+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/fieldmap.h b/include/fieldmap.h
index 1aa99031d..d08627ddc 100644
--- a/include/fieldmap.h
+++ b/include/fieldmap.h
@@ -7,5 +7,7 @@ struct MapHeader *mapconnection_get_mapheader(struct MapConnection *connection);
int GetMapBorderIdAt(int x, int y);
extern bool8 IsMetatileDirectionallyImpassable(struct MapObject *mapObject, s16 x, s16 y, u8 direction);
int CanCameraMoveInDirection(int direction);
+u32 GetBehaviorByMetatileId(u16 metatile);
+void MapGridSetMetatileEntryAt(int, int, u16);
#endif
diff --git a/include/gba/io_reg.h b/include/gba/io_reg.h
index c0874bcbb..d483d4ddc 100644
--- a/include/gba/io_reg.h
+++ b/include/gba/io_reg.h
@@ -639,6 +639,8 @@
#define KEY_INTR_ENABLE 0x0400
#define KEY_OR_INTR 0x0000
#define KEY_AND_INTR 0x8000
+#define DPAD_ANY 0x00F0
+#define JOY_EXCL_DPAD 0x030F
// interrupt flags
#define INTR_FLAG_VBLANK (1 << 0)
diff --git a/include/global.fieldmap.h b/include/global.fieldmap.h
index a0fe0e6ab..b8bab45d8 100644
--- a/include/global.fieldmap.h
+++ b/include/global.fieldmap.h
@@ -44,23 +44,23 @@ typedef void (*TilesetCB)(void);
struct Tileset
{
- bool8 isCompressed;
- bool8 isSecondary;
- void *tiles;
- void *palettes;
- void *metatiles;
- void *metatileAttributes;
- TilesetCB callback;
+ /*0x00*/ bool8 isCompressed;
+ /*0x01*/ bool8 isSecondary;
+ /*0x04*/ void *tiles;
+ /*0x08*/ void *palettes;
+ /*0x0c*/ void *metatiles;
+ /*0x10*/ void *metatileAttributes;
+ /*0x14*/ TilesetCB callback;
};
struct MapData
{
- s32 width;
- s32 height;
- u16 *border;
- u16 *map;
- struct Tileset *primaryTileset;
- struct Tileset *secondaryTileset;
+ /*0x00*/ s32 width;
+ /*0x04*/ s32 height;
+ /*0x08*/ u16 *border;
+ /*0x0c*/ u16 *map;
+ /*0x10*/ struct Tileset *primaryTileset;
+ /*0x14*/ struct Tileset *secondaryTileset;
};
struct BackupMapData
diff --git a/include/global.h b/include/global.h
index 9a95cf41f..c4c78e65d 100644
--- a/include/global.h
+++ b/include/global.h
@@ -98,7 +98,7 @@ struct SecretBaseRecord
/*0x1A09*/ u8 sbr_field_1_0:4;
/*0x1A09*/ u8 gender:1;
/*0x1A09*/ u8 sbr_field_1_5:1;
- /*0x1A09*/ u8 sbr_field_1_6:2;
+ /*0x1A09*/ u8 sbr_field_1_6:2;
/*0x1A0A*/ u8 sbr_field_2[7]; // 0xFF bytes?
/*0x1A12*/ u8 trainerId[4]; // byte 0 is used for determining trainer class
/*0x1A16*/ u16 sbr_field_e;
@@ -219,7 +219,7 @@ struct TVShowRecentHappenings {
/*0x00*/ u8 var00;
/*0x01*/ u8 var01;
/*0x02*/ u16 var02;
- /*0x04*/ u16 var04[6];
+ /*0x04*/ u16 var04[6];
/*0x10*/ u8 playerName[8];
/*0x18*/ u8 language;
/*0x19*/ u8 pad19[10];
@@ -446,9 +446,9 @@ typedef union SB_Struct {
// size is 0x198
struct UnknownSaveStruct2ABC {
- u8 val0;
- u8 val1;
- u16 val2;
+ u8 val0;
+ u8 val1;
+ u16 val2;
};
struct GabbyAndTyData {
@@ -473,7 +473,7 @@ struct GabbyAndTyData {
};
struct RecordMixing_UnknownStruct {
- u8 data[0x38];
+ u8 data[0x38];
};
struct SaveBlock1 /* 0x02025734 */
@@ -525,7 +525,7 @@ struct SaveBlock1 /* 0x02025734 */
/*0x2704*/ u8 decorDoll[40];
/*0x272C*/ u8 decorCushion[10];
/*0x2736*/ u8 padding_2736[2];
- /*0x2738*/ TVShow tvShows[25];
+ /*0x2738*/ TVShow tvShows[25];
/*0x2ABC*/ struct UnknownSaveStruct2ABC unknown_2ABC[16];
/*0x2AFC*/ u16 outbreakPokemonSpecies;
/*0x2AFE*/ u8 outbreakLocationMapNum;
@@ -592,8 +592,8 @@ struct Pokedex
struct SaveBlock2_Sub
{
/*0x0000, 0x00A4*/ u8 filler_000[0x3D8];
- /*0x03D8, 0x0480*/ u16 var_480;
- /*0x03DA, 0x0482*/ u16 var_482;
+ /*0x03D8, 0x0480*/ u16 var_480;
+ /*0x03DA, 0x0482*/ u16 var_482;
/*0x03DC, 0x0484*/ u8 filler_3DC[0xD1];
/*0x04AD, 0x0555*/ u8 var_4AD;
/*0x04AE, 0x0556*/ u8 var_4AE;
diff --git a/include/items.h b/include/items.h
index 11cc2113c..f3c506b43 100644
--- a/include/items.h
+++ b/include/items.h
@@ -2,387 +2,387 @@
#define GUARD_ITEMS_H
enum {
- ITEM_NONE, // 0x000
- ITEM_MASTER_BALL, // 0x001
- ITEM_ULTRA_BALL, // 0x002
- ITEM_GREAT_BALL, // 0x003
- ITEM_POKE_BALL, // 0x004
- ITEM_SAFARI_BALL, // 0x005
- ITEM_NET_BALL, // 0x006
- ITEM_DIVE_BALL, // 0x007
- ITEM_NEST_BALL, // 0x008
- ITEM_REPEAT_BALL, // 0x009
- ITEM_TIMER_BALL, // 0x00a
- ITEM_LUXURY_BALL, // 0x00b
- ITEM_PREMIER_BALL, // 0x00c
- ITEM_POTION, // 0x00d
- ITEM_ANTIDOTE, // 0x00e
- ITEM_BURN_HEAL, // 0x00f
- ITEM_ICE_HEAL, // 0x010
- ITEM_AWAKENING, // 0x011
- ITEM_PARALYZE_HEAL, // 0x012
- ITEM_FULL_RESTORE, // 0x013
- ITEM_MAX_POTION, // 0x014
- ITEM_HYPER_POTION, // 0x015
- ITEM_SUPER_POTION, // 0x016
- ITEM_FULL_HEAL, // 0x017
- ITEM_REVIVE, // 0x018
- ITEM_MAX_REVIVE, // 0x019
- ITEM_FRESH_WATER, // 0x01a
- ITEM_SODA_POP, // 0x01b
- ITEM_LEMONADE, // 0x01c
- ITEM_MOOMOO_MILK, // 0x01d
- ITEM_ENERGY_POWDER, // 0x01e
- ITEM_ENERGY_ROOT, // 0x01f
- ITEM_HEAL_POWDER, // 0x020
- ITEM_REVIVAL_HERB, // 0x021
- ITEM_ETHER, // 0x022
- ITEM_MAX_ETHER, // 0x023
- ITEM_ELIXIR, // 0x024
- ITEM_MAX_ELIXIR, // 0x025
- ITEM_LAVA_COOKIE, // 0x026
- ITEM_BLUE_FLUTE, // 0x027
- ITEM_YELLOW_FLUTE, // 0x028
- ITEM_RED_FLUTE, // 0x029
- ITEM_BLACK_FLUTE, // 0x02a
- ITEM_WHITE_FLUTE, // 0x02b
- ITEM_BERRY_JUICE, // 0x02c
- ITEM_SACRED_ASH, // 0x02d
- ITEM_SHOAL_SALT, // 0x02e
- ITEM_SHOAL_SHELL, // 0x02f
- ITEM_RED_SHARD, // 0x030
- ITEM_BLUE_SHARD, // 0x031
- ITEM_YELLOW_SHARD, // 0x032
- ITEM_GREEN_SHARD, // 0x033
- ITEM_034,
- ITEM_035,
- ITEM_036,
- ITEM_037,
- ITEM_038,
- ITEM_039,
- ITEM_03A,
- ITEM_03B,
- ITEM_03C,
- ITEM_03D,
- ITEM_03E,
- ITEM_HP_UP, // 0x03f
- ITEM_PROTEIN, // 0x040
- ITEM_IRON, // 0x041
- ITEM_CARBOS, // 0x042
- ITEM_CALCIUM, // 0x043
- ITEM_RARE_CANDY, // 0x044
- ITEM_PP_UP, // 0x045
- ITEM_ZINC, // 0x046
- ITEM_PP_MAX, // 0x047
- ITEM_048,
- ITEM_GUARD_SPEC, // 0x049
- ITEM_DIRE_HIT, // 0x04a
- ITEM_X_ATTACK, // 0x04b
- ITEM_X_DEFEND, // 0x04c
- ITEM_X_SPEED, // 0x04d
- ITEM_X_ACCURACY, // 0x04e
- ITEM_X_SPECIAL, // 0x04f
- ITEM_POKE_DOLL, // 0x050
- ITEM_FLUFFY_TAIL, // 0x051
- ITEM_052,
- ITEM_SUPER_REPEL, // 0x053
- ITEM_MAX_REPEL, // 0x054
- ITEM_ESCAPE_ROPE, // 0x055
- ITEM_REPEL, // 0x056
- ITEM_057,
- ITEM_058,
- ITEM_059,
- ITEM_05A,
- ITEM_05B,
- ITEM_05C,
- ITEM_SUN_STONE, // 0x05d
- ITEM_MOON_STONE, // 0x05e
- ITEM_FIRE_STONE, // 0x05f
- ITEM_THUNDER_STONE, // 0x060
- ITEM_WATER_STONE, // 0x061
- ITEM_LEAF_STONE, // 0x062
- ITEM_063,
- ITEM_064,
- ITEM_065,
- ITEM_066,
- ITEM_TINY_MUSHROOM, // 0x067
- ITEM_BIG_MUSHROOM, // 0x068
- ITEM_069,
- ITEM_PEARL, // 0x06a
- ITEM_BIG_PEARL, // 0x06b
- ITEM_STARDUST, // 0x06c
- ITEM_STAR_PIECE, // 0x06d
- ITEM_NUGGET, // 0x06e
- ITEM_HEART_SCALE, // 0x06f
- ITEM_070,
- ITEM_071,
- ITEM_072,
- ITEM_073,
- ITEM_074,
- ITEM_075,
- ITEM_076,
- ITEM_077,
- ITEM_078,
- ITEM_ORANGE_MAIL, // 0x079
- ITEM_HARBOR_MAIL, // 0x07a
- ITEM_GLITTER_MAIL, // 0x07b
- ITEM_MECH_MAIL, // 0x07c
- ITEM_WOOD_MAIL, // 0x07d
- ITEM_WAVE_MAIL, // 0x07e
- ITEM_BEAD_MAIL, // 0x07f
- ITEM_SHADOW_MAIL, // 0x080
- ITEM_TROPIC_MAIL, // 0x081
- ITEM_DREAM_MAIL, // 0x082
- ITEM_FAB_MAIL, // 0x083
- ITEM_RETRO_MAIL, // 0x084
- ITEM_CHERI_BERRY, // 0x085
- ITEM_CHESTO_BERRY, // 0x086
- ITEM_PECHA_BERRY, // 0x087
- ITEM_RAWST_BERRY, // 0x088
- ITEM_ASPEAR_BERRY, // 0x089
- ITEM_LEPPA_BERRY, // 0x08a
- ITEM_ORAN_BERRY, // 0x08b
- ITEM_PERSIM_BERRY, // 0x08c
- ITEM_LUM_BERRY, // 0x08d
- ITEM_SITRUS_BERRY, // 0x08e
- ITEM_FIGY_BERRY, // 0x08f
- ITEM_WIKI_BERRY, // 0x090
- ITEM_MAGO_BERRY, // 0x091
- ITEM_AGUAV_BERRY, // 0x092
- ITEM_IAPAPA_BERRY, // 0x093
- ITEM_RAZZ_BERRY, // 0x094
- ITEM_BLUK_BERRY, // 0x095
- ITEM_NANAB_BERRY, // 0x096
- ITEM_WEPEAR_BERRY, // 0x097
- ITEM_PINAP_BERRY, // 0x098
- ITEM_POMEG_BERRY, // 0x099
- ITEM_KELPSY_BERRY, // 0x09a
- ITEM_QUALOT_BERRY, // 0x09b
- ITEM_HONDEW_BERRY, // 0x09c
- ITEM_GREPA_BERRY, // 0x09d
- ITEM_TAMATO_BERRY, // 0x09e
- ITEM_CORNN_BERRY, // 0x09f
- ITEM_MAGOST_BERRY, // 0x0a0
- ITEM_RABUTA_BERRY, // 0x0a1
- ITEM_NOMEL_BERRY, // 0x0a2
- ITEM_SPELON_BERRY, // 0x0a3
- ITEM_PAMTRE_BERRY, // 0x0a4
- ITEM_WATMEL_BERRY, // 0x0a5
- ITEM_DURIN_BERRY, // 0x0a6
- ITEM_BELUE_BERRY, // 0x0a7
- ITEM_LIECHI_BERRY, // 0x0a8
- ITEM_GANLON_BERRY, // 0x0a9
- ITEM_SALAC_BERRY, // 0x0aa
- ITEM_PETAYA_BERRY, // 0x0ab
- ITEM_APICOT_BERRY, // 0x0ac
- ITEM_LANSAT_BERRY, // 0x0ad
- ITEM_STARF_BERRY, // 0x0ae
- ITEM_ENIGMA_BERRY, // 0x0af
- ITEM_0B0,
- ITEM_0B1,
- ITEM_0B2,
- ITEM_BRIGHT_POWDER, // 0x0b3
- ITEM_WHITE_HERB, // 0x0b4
- ITEM_MACHO_BRACE, // 0x0b5
- ITEM_EXP_SHARE, // 0x0b6
- ITEM_QUICK_CLAW, // 0x0b7
- ITEM_SOOTHE_BELL, // 0x0b8
- ITEM_MENTAL_HERB, // 0x0b9
- ITEM_CHOICE_BAND, // 0x0ba
- ITEM_KINGS_ROCK, // 0x0bb
- ITEM_SILVER_POWDER, // 0x0bc
- ITEM_AMULET_COIN, // 0x0bd
- ITEM_CLEANSE_TAG, // 0x0be
- ITEM_SOUL_DEW, // 0x0bf
- ITEM_DEEP_SEA_TOOTH, // 0x0c0
- ITEM_DEEP_SEA_SCALE, // 0x0c1
- ITEM_SMOKE_BALL, // 0x0c2
- ITEM_EVERSTONE, // 0x0c3
- ITEM_FOCUS_BAND, // 0x0c4
- ITEM_LUCKY_EGG, // 0x0c5
- ITEM_SCOPE_LENS, // 0x0c6
- ITEM_METAL_COAT, // 0x0c7
- ITEM_LEFTOVERS, // 0x0c8
- ITEM_DRAGON_SCALE, // 0x0c9
- ITEM_LIGHT_BALL, // 0x0ca
- ITEM_SOFT_SAND, // 0x0cb
- ITEM_HARD_STONE, // 0x0cc
- ITEM_MIRACLE_SEED, // 0x0cd
- ITEM_BLACK_GLASSES, // 0x0ce
- ITEM_BLACK_BELT, // 0x0cf
- ITEM_MAGNET, // 0x0d0
- ITEM_MYSTIC_WATER, // 0x0d1
- ITEM_SHARP_BEAK, // 0x0d2
- ITEM_POISON_BARB, // 0x0d3
- ITEM_NEVER_MELT_ICE, // 0x0d4
- ITEM_SPELL_TAG, // 0x0d5
- ITEM_TWISTED_SPOON, // 0x0d6
- ITEM_CHARCOAL, // 0x0d7
- ITEM_DRAGON_FANG, // 0x0d8
- ITEM_SILK_SCARF, // 0x0d9
- ITEM_UP_GRADE, // 0x0da
- ITEM_SHELL_BELL, // 0x0db
- ITEM_SEA_INCENSE, // 0x0dc
- ITEM_LAX_INCENSE, // 0x0dd
- ITEM_LUCKY_PUNCH, // 0x0de
- ITEM_METAL_POWDER, // 0x0df
- ITEM_THICK_CLUB, // 0x0e0
- ITEM_STICK, // 0x0e1
- ITEM_0E2,
- ITEM_0E3,
- ITEM_0E4,
- ITEM_0E5,
- ITEM_0E6,
- ITEM_0E7,
- ITEM_0E8,
- ITEM_0E9,
- ITEM_0EA,
- ITEM_0EB,
- ITEM_0EC,
- ITEM_0ED,
- ITEM_0EE,
- ITEM_0EF,
- ITEM_0F0,
- ITEM_0F1,
- ITEM_0F2,
- ITEM_0F3,
- ITEM_0F4,
- ITEM_0F5,
- ITEM_0F6,
- ITEM_0F7,
- ITEM_0F8,
- ITEM_0F9,
- ITEM_0FA,
- ITEM_0FB,
- ITEM_0FC,
- ITEM_0FD,
- ITEM_RED_SCARF, // 0x0fe
- ITEM_BLUE_SCARF, // 0x0ff
- ITEM_PINK_SCARF, // 0x100
- ITEM_GREEN_SCARF, // 0x101
- ITEM_YELLOW_SCARF, // 0x102
- ITEM_MACH_BIKE, // 0x103
- ITEM_COIN_CASE, // 0x104
- ITEM_ITEMFINDER, // 0x105
- ITEM_OLD_ROD, // 0x106
- ITEM_GOOD_ROD, // 0x107
- ITEM_SUPER_ROD, // 0x108
- ITEM_SS_TICKET, // 0x109
- ITEM_CONTEST_PASS, // 0x10a
- ITEM_10B,
- ITEM_WAILMER_PAIL, // 0x10c
- ITEM_DEVON_GOODS, // 0x10d
- ITEM_SOOT_SACK, // 0x10e
- ITEM_BASEMENT_KEY, // 0x10f
- ITEM_ACRO_BIKE, // 0x110
- ITEM_POKEBLOCK_CASE, // 0x111
- ITEM_LETTER, // 0x112
- ITEM_EON_TICKET, // 0x113
- ITEM_RED_ORB, // 0x114
- ITEM_BLUE_ORB, // 0x115
- ITEM_SCANNER, // 0x116
- ITEM_GO_GOGGLES, // 0x117
- ITEM_METEORITE, // 0x118
- ITEM_ROOM_1_KEY, // 0x119
- ITEM_ROOM_2_KEY, // 0x11a
- ITEM_ROOM_4_KEY, // 0x11b
- ITEM_ROOM_6_KEY, // 0x11c
- ITEM_STORAGE_KEY, // 0x11d
- ITEM_ROOT_FOSSIL, // 0x11e
- ITEM_CLAW_FOSSIL, // 0x11f
- ITEM_DEVON_SCOPE, // 0x120
- ITEM_TM01, // 0x121
- ITEM_TM02, // 0x122
- ITEM_TM03, // 0x123
- ITEM_TM04, // 0x124
- ITEM_TM05, // 0x125
- ITEM_TM06, // 0x126
- ITEM_TM07, // 0x127
- ITEM_TM08, // 0x128
- ITEM_TM09, // 0x129
- ITEM_TM10, // 0x12a
- ITEM_TM11, // 0x12b
- ITEM_TM12, // 0x12c
- ITEM_TM13, // 0x12d
- ITEM_TM14, // 0x12e
- ITEM_TM15, // 0x12f
- ITEM_TM16, // 0x130
- ITEM_TM17, // 0x131
- ITEM_TM18, // 0x132
- ITEM_TM19, // 0x133
- ITEM_TM20, // 0x134
- ITEM_TM21, // 0x135
- ITEM_TM22, // 0x136
- ITEM_TM23, // 0x137
- ITEM_TM24, // 0x138
- ITEM_TM25, // 0x139
- ITEM_TM26, // 0x13a
- ITEM_TM27, // 0x13b
- ITEM_TM28, // 0x13c
- ITEM_TM29, // 0x13d
- ITEM_TM30, // 0x13e
- ITEM_TM31, // 0x13f
- ITEM_TM32, // 0x140
- ITEM_TM33, // 0x141
- ITEM_TM34, // 0x142
- ITEM_TM35, // 0x143
- ITEM_TM36, // 0x144
- ITEM_TM37, // 0x145
- ITEM_TM38, // 0x146
- ITEM_TM39, // 0x147
- ITEM_TM40, // 0x148
- ITEM_TM41, // 0x149
- ITEM_TM42, // 0x14a
- ITEM_TM43, // 0x14b
- ITEM_TM44, // 0x14c
- ITEM_TM45, // 0x14d
- ITEM_TM46, // 0x14e
- ITEM_TM47, // 0x14f
- ITEM_TM48, // 0x150
- ITEM_TM49, // 0x151
- ITEM_TM50, // 0x152
- ITEM_HM01, // 0x153
- ITEM_HM02, // 0x154
- ITEM_HM03, // 0x155
- ITEM_HM04, // 0x156
- ITEM_HM05, // 0x157
- ITEM_HM06, // 0x158
- ITEM_HM07, // 0x159
- ITEM_HM08, // 0x15a
- ITEM_15B,
- ITEM_15C,
+ ITEM_NONE, // 0x000
+ ITEM_MASTER_BALL, // 0x001
+ ITEM_ULTRA_BALL, // 0x002
+ ITEM_GREAT_BALL, // 0x003
+ ITEM_POKE_BALL, // 0x004
+ ITEM_SAFARI_BALL, // 0x005
+ ITEM_NET_BALL, // 0x006
+ ITEM_DIVE_BALL, // 0x007
+ ITEM_NEST_BALL, // 0x008
+ ITEM_REPEAT_BALL, // 0x009
+ ITEM_TIMER_BALL, // 0x00a
+ ITEM_LUXURY_BALL, // 0x00b
+ ITEM_PREMIER_BALL, // 0x00c
+ ITEM_POTION, // 0x00d
+ ITEM_ANTIDOTE, // 0x00e
+ ITEM_BURN_HEAL, // 0x00f
+ ITEM_ICE_HEAL, // 0x010
+ ITEM_AWAKENING, // 0x011
+ ITEM_PARALYZE_HEAL, // 0x012
+ ITEM_FULL_RESTORE, // 0x013
+ ITEM_MAX_POTION, // 0x014
+ ITEM_HYPER_POTION, // 0x015
+ ITEM_SUPER_POTION, // 0x016
+ ITEM_FULL_HEAL, // 0x017
+ ITEM_REVIVE, // 0x018
+ ITEM_MAX_REVIVE, // 0x019
+ ITEM_FRESH_WATER, // 0x01a
+ ITEM_SODA_POP, // 0x01b
+ ITEM_LEMONADE, // 0x01c
+ ITEM_MOOMOO_MILK, // 0x01d
+ ITEM_ENERGY_POWDER, // 0x01e
+ ITEM_ENERGY_ROOT, // 0x01f
+ ITEM_HEAL_POWDER, // 0x020
+ ITEM_REVIVAL_HERB, // 0x021
+ ITEM_ETHER, // 0x022
+ ITEM_MAX_ETHER, // 0x023
+ ITEM_ELIXIR, // 0x024
+ ITEM_MAX_ELIXIR, // 0x025
+ ITEM_LAVA_COOKIE, // 0x026
+ ITEM_BLUE_FLUTE, // 0x027
+ ITEM_YELLOW_FLUTE, // 0x028
+ ITEM_RED_FLUTE, // 0x029
+ ITEM_BLACK_FLUTE, // 0x02a
+ ITEM_WHITE_FLUTE, // 0x02b
+ ITEM_BERRY_JUICE, // 0x02c
+ ITEM_SACRED_ASH, // 0x02d
+ ITEM_SHOAL_SALT, // 0x02e
+ ITEM_SHOAL_SHELL, // 0x02f
+ ITEM_RED_SHARD, // 0x030
+ ITEM_BLUE_SHARD, // 0x031
+ ITEM_YELLOW_SHARD, // 0x032
+ ITEM_GREEN_SHARD, // 0x033
+ ITEM_034,
+ ITEM_035,
+ ITEM_036,
+ ITEM_037,
+ ITEM_038,
+ ITEM_039,
+ ITEM_03A,
+ ITEM_03B,
+ ITEM_03C,
+ ITEM_03D,
+ ITEM_03E,
+ ITEM_HP_UP, // 0x03f
+ ITEM_PROTEIN, // 0x040
+ ITEM_IRON, // 0x041
+ ITEM_CARBOS, // 0x042
+ ITEM_CALCIUM, // 0x043
+ ITEM_RARE_CANDY, // 0x044
+ ITEM_PP_UP, // 0x045
+ ITEM_ZINC, // 0x046
+ ITEM_PP_MAX, // 0x047
+ ITEM_048,
+ ITEM_GUARD_SPEC, // 0x049
+ ITEM_DIRE_HIT, // 0x04a
+ ITEM_X_ATTACK, // 0x04b
+ ITEM_X_DEFEND, // 0x04c
+ ITEM_X_SPEED, // 0x04d
+ ITEM_X_ACCURACY, // 0x04e
+ ITEM_X_SPECIAL, // 0x04f
+ ITEM_POKE_DOLL, // 0x050
+ ITEM_FLUFFY_TAIL, // 0x051
+ ITEM_052,
+ ITEM_SUPER_REPEL, // 0x053
+ ITEM_MAX_REPEL, // 0x054
+ ITEM_ESCAPE_ROPE, // 0x055
+ ITEM_REPEL, // 0x056
+ ITEM_057,
+ ITEM_058,
+ ITEM_059,
+ ITEM_05A,
+ ITEM_05B,
+ ITEM_05C,
+ ITEM_SUN_STONE, // 0x05d
+ ITEM_MOON_STONE, // 0x05e
+ ITEM_FIRE_STONE, // 0x05f
+ ITEM_THUNDER_STONE, // 0x060
+ ITEM_WATER_STONE, // 0x061
+ ITEM_LEAF_STONE, // 0x062
+ ITEM_063,
+ ITEM_064,
+ ITEM_065,
+ ITEM_066,
+ ITEM_TINY_MUSHROOM, // 0x067
+ ITEM_BIG_MUSHROOM, // 0x068
+ ITEM_069,
+ ITEM_PEARL, // 0x06a
+ ITEM_BIG_PEARL, // 0x06b
+ ITEM_STARDUST, // 0x06c
+ ITEM_STAR_PIECE, // 0x06d
+ ITEM_NUGGET, // 0x06e
+ ITEM_HEART_SCALE, // 0x06f
+ ITEM_070,
+ ITEM_071,
+ ITEM_072,
+ ITEM_073,
+ ITEM_074,
+ ITEM_075,
+ ITEM_076,
+ ITEM_077,
+ ITEM_078,
+ ITEM_ORANGE_MAIL, // 0x079
+ ITEM_HARBOR_MAIL, // 0x07a
+ ITEM_GLITTER_MAIL, // 0x07b
+ ITEM_MECH_MAIL, // 0x07c
+ ITEM_WOOD_MAIL, // 0x07d
+ ITEM_WAVE_MAIL, // 0x07e
+ ITEM_BEAD_MAIL, // 0x07f
+ ITEM_SHADOW_MAIL, // 0x080
+ ITEM_TROPIC_MAIL, // 0x081
+ ITEM_DREAM_MAIL, // 0x082
+ ITEM_FAB_MAIL, // 0x083
+ ITEM_RETRO_MAIL, // 0x084
+ ITEM_CHERI_BERRY, // 0x085
+ ITEM_CHESTO_BERRY, // 0x086
+ ITEM_PECHA_BERRY, // 0x087
+ ITEM_RAWST_BERRY, // 0x088
+ ITEM_ASPEAR_BERRY, // 0x089
+ ITEM_LEPPA_BERRY, // 0x08a
+ ITEM_ORAN_BERRY, // 0x08b
+ ITEM_PERSIM_BERRY, // 0x08c
+ ITEM_LUM_BERRY, // 0x08d
+ ITEM_SITRUS_BERRY, // 0x08e
+ ITEM_FIGY_BERRY, // 0x08f
+ ITEM_WIKI_BERRY, // 0x090
+ ITEM_MAGO_BERRY, // 0x091
+ ITEM_AGUAV_BERRY, // 0x092
+ ITEM_IAPAPA_BERRY, // 0x093
+ ITEM_RAZZ_BERRY, // 0x094
+ ITEM_BLUK_BERRY, // 0x095
+ ITEM_NANAB_BERRY, // 0x096
+ ITEM_WEPEAR_BERRY, // 0x097
+ ITEM_PINAP_BERRY, // 0x098
+ ITEM_POMEG_BERRY, // 0x099
+ ITEM_KELPSY_BERRY, // 0x09a
+ ITEM_QUALOT_BERRY, // 0x09b
+ ITEM_HONDEW_BERRY, // 0x09c
+ ITEM_GREPA_BERRY, // 0x09d
+ ITEM_TAMATO_BERRY, // 0x09e
+ ITEM_CORNN_BERRY, // 0x09f
+ ITEM_MAGOST_BERRY, // 0x0a0
+ ITEM_RABUTA_BERRY, // 0x0a1
+ ITEM_NOMEL_BERRY, // 0x0a2
+ ITEM_SPELON_BERRY, // 0x0a3
+ ITEM_PAMTRE_BERRY, // 0x0a4
+ ITEM_WATMEL_BERRY, // 0x0a5
+ ITEM_DURIN_BERRY, // 0x0a6
+ ITEM_BELUE_BERRY, // 0x0a7
+ ITEM_LIECHI_BERRY, // 0x0a8
+ ITEM_GANLON_BERRY, // 0x0a9
+ ITEM_SALAC_BERRY, // 0x0aa
+ ITEM_PETAYA_BERRY, // 0x0ab
+ ITEM_APICOT_BERRY, // 0x0ac
+ ITEM_LANSAT_BERRY, // 0x0ad
+ ITEM_STARF_BERRY, // 0x0ae
+ ITEM_ENIGMA_BERRY, // 0x0af
+ ITEM_0B0,
+ ITEM_0B1,
+ ITEM_0B2,
+ ITEM_BRIGHT_POWDER, // 0x0b3
+ ITEM_WHITE_HERB, // 0x0b4
+ ITEM_MACHO_BRACE, // 0x0b5
+ ITEM_EXP_SHARE, // 0x0b6
+ ITEM_QUICK_CLAW, // 0x0b7
+ ITEM_SOOTHE_BELL, // 0x0b8
+ ITEM_MENTAL_HERB, // 0x0b9
+ ITEM_CHOICE_BAND, // 0x0ba
+ ITEM_KINGS_ROCK, // 0x0bb
+ ITEM_SILVER_POWDER, // 0x0bc
+ ITEM_AMULET_COIN, // 0x0bd
+ ITEM_CLEANSE_TAG, // 0x0be
+ ITEM_SOUL_DEW, // 0x0bf
+ ITEM_DEEP_SEA_TOOTH, // 0x0c0
+ ITEM_DEEP_SEA_SCALE, // 0x0c1
+ ITEM_SMOKE_BALL, // 0x0c2
+ ITEM_EVERSTONE, // 0x0c3
+ ITEM_FOCUS_BAND, // 0x0c4
+ ITEM_LUCKY_EGG, // 0x0c5
+ ITEM_SCOPE_LENS, // 0x0c6
+ ITEM_METAL_COAT, // 0x0c7
+ ITEM_LEFTOVERS, // 0x0c8
+ ITEM_DRAGON_SCALE, // 0x0c9
+ ITEM_LIGHT_BALL, // 0x0ca
+ ITEM_SOFT_SAND, // 0x0cb
+ ITEM_HARD_STONE, // 0x0cc
+ ITEM_MIRACLE_SEED, // 0x0cd
+ ITEM_BLACK_GLASSES, // 0x0ce
+ ITEM_BLACK_BELT, // 0x0cf
+ ITEM_MAGNET, // 0x0d0
+ ITEM_MYSTIC_WATER, // 0x0d1
+ ITEM_SHARP_BEAK, // 0x0d2
+ ITEM_POISON_BARB, // 0x0d3
+ ITEM_NEVER_MELT_ICE, // 0x0d4
+ ITEM_SPELL_TAG, // 0x0d5
+ ITEM_TWISTED_SPOON, // 0x0d6
+ ITEM_CHARCOAL, // 0x0d7
+ ITEM_DRAGON_FANG, // 0x0d8
+ ITEM_SILK_SCARF, // 0x0d9
+ ITEM_UP_GRADE, // 0x0da
+ ITEM_SHELL_BELL, // 0x0db
+ ITEM_SEA_INCENSE, // 0x0dc
+ ITEM_LAX_INCENSE, // 0x0dd
+ ITEM_LUCKY_PUNCH, // 0x0de
+ ITEM_METAL_POWDER, // 0x0df
+ ITEM_THICK_CLUB, // 0x0e0
+ ITEM_STICK, // 0x0e1
+ ITEM_0E2,
+ ITEM_0E3,
+ ITEM_0E4,
+ ITEM_0E5,
+ ITEM_0E6,
+ ITEM_0E7,
+ ITEM_0E8,
+ ITEM_0E9,
+ ITEM_0EA,
+ ITEM_0EB,
+ ITEM_0EC,
+ ITEM_0ED,
+ ITEM_0EE,
+ ITEM_0EF,
+ ITEM_0F0,
+ ITEM_0F1,
+ ITEM_0F2,
+ ITEM_0F3,
+ ITEM_0F4,
+ ITEM_0F5,
+ ITEM_0F6,
+ ITEM_0F7,
+ ITEM_0F8,
+ ITEM_0F9,
+ ITEM_0FA,
+ ITEM_0FB,
+ ITEM_0FC,
+ ITEM_0FD,
+ ITEM_RED_SCARF, // 0x0fe
+ ITEM_BLUE_SCARF, // 0x0ff
+ ITEM_PINK_SCARF, // 0x100
+ ITEM_GREEN_SCARF, // 0x101
+ ITEM_YELLOW_SCARF, // 0x102
+ ITEM_MACH_BIKE, // 0x103
+ ITEM_COIN_CASE, // 0x104
+ ITEM_ITEMFINDER, // 0x105
+ ITEM_OLD_ROD, // 0x106
+ ITEM_GOOD_ROD, // 0x107
+ ITEM_SUPER_ROD, // 0x108
+ ITEM_SS_TICKET, // 0x109
+ ITEM_CONTEST_PASS, // 0x10a
+ ITEM_10B,
+ ITEM_WAILMER_PAIL, // 0x10c
+ ITEM_DEVON_GOODS, // 0x10d
+ ITEM_SOOT_SACK, // 0x10e
+ ITEM_BASEMENT_KEY, // 0x10f
+ ITEM_ACRO_BIKE, // 0x110
+ ITEM_POKEBLOCK_CASE, // 0x111
+ ITEM_LETTER, // 0x112
+ ITEM_EON_TICKET, // 0x113
+ ITEM_RED_ORB, // 0x114
+ ITEM_BLUE_ORB, // 0x115
+ ITEM_SCANNER, // 0x116
+ ITEM_GO_GOGGLES, // 0x117
+ ITEM_METEORITE, // 0x118
+ ITEM_ROOM_1_KEY, // 0x119
+ ITEM_ROOM_2_KEY, // 0x11a
+ ITEM_ROOM_4_KEY, // 0x11b
+ ITEM_ROOM_6_KEY, // 0x11c
+ ITEM_STORAGE_KEY, // 0x11d
+ ITEM_ROOT_FOSSIL, // 0x11e
+ ITEM_CLAW_FOSSIL, // 0x11f
+ ITEM_DEVON_SCOPE, // 0x120
+ ITEM_TM01, // 0x121
+ ITEM_TM02, // 0x122
+ ITEM_TM03, // 0x123
+ ITEM_TM04, // 0x124
+ ITEM_TM05, // 0x125
+ ITEM_TM06, // 0x126
+ ITEM_TM07, // 0x127
+ ITEM_TM08, // 0x128
+ ITEM_TM09, // 0x129
+ ITEM_TM10, // 0x12a
+ ITEM_TM11, // 0x12b
+ ITEM_TM12, // 0x12c
+ ITEM_TM13, // 0x12d
+ ITEM_TM14, // 0x12e
+ ITEM_TM15, // 0x12f
+ ITEM_TM16, // 0x130
+ ITEM_TM17, // 0x131
+ ITEM_TM18, // 0x132
+ ITEM_TM19, // 0x133
+ ITEM_TM20, // 0x134
+ ITEM_TM21, // 0x135
+ ITEM_TM22, // 0x136
+ ITEM_TM23, // 0x137
+ ITEM_TM24, // 0x138
+ ITEM_TM25, // 0x139
+ ITEM_TM26, // 0x13a
+ ITEM_TM27, // 0x13b
+ ITEM_TM28, // 0x13c
+ ITEM_TM29, // 0x13d
+ ITEM_TM30, // 0x13e
+ ITEM_TM31, // 0x13f
+ ITEM_TM32, // 0x140
+ ITEM_TM33, // 0x141
+ ITEM_TM34, // 0x142
+ ITEM_TM35, // 0x143
+ ITEM_TM36, // 0x144
+ ITEM_TM37, // 0x145
+ ITEM_TM38, // 0x146
+ ITEM_TM39, // 0x147
+ ITEM_TM40, // 0x148
+ ITEM_TM41, // 0x149
+ ITEM_TM42, // 0x14a
+ ITEM_TM43, // 0x14b
+ ITEM_TM44, // 0x14c
+ ITEM_TM45, // 0x14d
+ ITEM_TM46, // 0x14e
+ ITEM_TM47, // 0x14f
+ ITEM_TM48, // 0x150
+ ITEM_TM49, // 0x151
+ ITEM_TM50, // 0x152
+ ITEM_HM01, // 0x153
+ ITEM_HM02, // 0x154
+ ITEM_HM03, // 0x155
+ ITEM_HM04, // 0x156
+ ITEM_HM05, // 0x157
+ ITEM_HM06, // 0x158
+ ITEM_HM07, // 0x159
+ ITEM_HM08, // 0x15a
+ ITEM_15B,
+ ITEM_15C,
- // FireRed/LeafGreen
- ITEM_OAKS_PARCEL, // 0x15d
- ITEM_POKE_FLUTE, // 0x15e
- ITEM_SECRET_KEY, // 0x15f
- ITEM_BIKE_VOUCHER, // 0x160
- ITEM_GOLD_TEETH, // 0x161
- ITEM_OLD_AMBER, // 0x162
- ITEM_CARD_KEY, // 0x163
- ITEM_LIFT_KEY, // 0x164
- ITEM_HELIX_FOSSIL, // 0x165
- ITEM_DOME_FOSSIL, // 0x166
- ITEM_SILPH_SCOPE, // 0x167
- ITEM_BICYCLE, // 0x168
- ITEM_TOWN_MAP, // 0x169
- ITEM_VS_SEEKER, // 0x16a
- ITEM_FAME_CHECKER, // 0x16b
- ITEM_TM_CASE, // 0x16c
- ITEM_BERRY_POUCH, // 0x16d
- ITEM_TEACHY_TV, // 0x16e
- ITEM_TRI_PASS, // 0x16f
- ITEM_RAINBOW_PASS, // 0x170
- ITEM_TEA, // 0x171
- ITEM_MYSTIC_TICKET, // 0x172
- ITEM_AURORA_TICKET, // 0x173
- ITEM_POWDER_JAR, // 0x174
- ITEM_RUBY, // 0x175
- ITEM_SAPPHIRE, // 0x176
+ // FireRed/LeafGreen
+ ITEM_OAKS_PARCEL, // 0x15d
+ ITEM_POKE_FLUTE, // 0x15e
+ ITEM_SECRET_KEY, // 0x15f
+ ITEM_BIKE_VOUCHER, // 0x160
+ ITEM_GOLD_TEETH, // 0x161
+ ITEM_OLD_AMBER, // 0x162
+ ITEM_CARD_KEY, // 0x163
+ ITEM_LIFT_KEY, // 0x164
+ ITEM_HELIX_FOSSIL, // 0x165
+ ITEM_DOME_FOSSIL, // 0x166
+ ITEM_SILPH_SCOPE, // 0x167
+ ITEM_BICYCLE, // 0x168
+ ITEM_TOWN_MAP, // 0x169
+ ITEM_VS_SEEKER, // 0x16a
+ ITEM_FAME_CHECKER, // 0x16b
+ ITEM_TM_CASE, // 0x16c
+ ITEM_BERRY_POUCH, // 0x16d
+ ITEM_TEACHY_TV, // 0x16e
+ ITEM_TRI_PASS, // 0x16f
+ ITEM_RAINBOW_PASS, // 0x170
+ ITEM_TEA, // 0x171
+ ITEM_MYSTIC_TICKET, // 0x172
+ ITEM_AURORA_TICKET, // 0x173
+ ITEM_POWDER_JAR, // 0x174
+ ITEM_RUBY, // 0x175
+ ITEM_SAPPHIRE, // 0x176
- // Emerald
- ITEM_MAGMA_EMBLEM, // 0x177
- ITEM_OLD_SEA_MAP, // 0x178
+ // Emerald
+ ITEM_MAGMA_EMBLEM, // 0x177
+ ITEM_OLD_SEA_MAP, // 0x178
};
#endif // GUARD_ITEMS_H
diff --git a/include/menu.h b/include/menu.h
index cb5efa448..98d7afcc3 100644
--- a/include/menu.h
+++ b/include/menu.h
@@ -9,6 +9,18 @@ struct MenuAction
u8 (*func)();
};
+struct MenuAction2
+{
+ const u8 *text;
+ void (*func)(u8);
+};
+
+struct MenuAction3
+{
+ void (*func1)(u8);
+ void (*func2)(u8);
+};
+
void CloseMenu(void);
void AppendToList(u8 *list, u8 *pindex, u32 value);
void InitMenuWindow(const struct WindowConfig *);
@@ -52,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/naming_screen.h b/include/naming_screen.h
index 62d0c0029..d136417ba 100644
--- a/include/naming_screen.h
+++ b/include/naming_screen.h
@@ -45,7 +45,7 @@ struct NamingScreenData
/*0x10*/ u8 unk10;
/*0x11*/ u8 textBuffer[0x10];
/*0x21*/ u8 filler21[0x13];
- const struct NamingScreenTemplate *template;
+ const struct NamingScreenTemplate *template;
/*0x38*/ u8 *destBuffer;
/*0x3C*/ u16 unk3C; //savedKeyRepeatStartDelay
/*0x3E*/ u16 unk3E;
diff --git a/include/palette.h b/include/palette.h
index 37fcb4d65..193773d24 100644
--- a/include/palette.h
+++ b/include/palette.h
@@ -16,22 +16,22 @@ enum
struct PaletteFadeControl
{
- u32 multipurpose1;
- u8 delayCounter:6;
- u16 y:5; // blend coefficient
- u16 targetY:5; // target blend coefficient
- u16 blendColor:15;
- u16 active:1;
- u16 multipurpose2:6;
- u16 yDec:1; // whether blend coefficient is decreasing
- u16 bufferTransferDisabled:1;
- u16 mode:2;
- u16 shouldResetBlendRegisters:1;
- u16 hardwareFadeFinishing:1;
- u16 softwareFadeFinishingCounter:5;
- u16 softwareFadeFinishing:1;
- u16 objPaletteToggle:1;
- u8 deltaY:4; // rate of change of blend coefficient
+ /*0x00*/ u32 multipurpose1;
+ /*0x04*/ u8 delayCounter:6;
+ /*0x05*/ u16 y:5; // blend coefficient
+ /*0x05-06*/ u16 targetY:5; // target blend coefficient
+ /*0x07*/ u16 blendColor:15;
+ /*0x07*/ u16 active:1;
+ /*0x08*/ u16 multipurpose2:6;
+ /*0x08*/ u16 yDec:1; // whether blend coefficient is decreasing
+ /*0x08*/ u16 bufferTransferDisabled:1;
+ /*0x09*/ u16 mode:2;
+ /*0x09*/ u16 shouldResetBlendRegisters:1;
+ /*0x09*/ u16 hardwareFadeFinishing:1;
+ /*0x09-0a*/ u16 softwareFadeFinishingCounter:5;
+ /*0x0a*/ u16 softwareFadeFinishing:1;
+ /*0x0a*/ u16 objPaletteToggle:1;
+ /*0x0a*/ u8 deltaY:4; // rate of change of blend coefficient
};
extern struct PaletteFadeControl gPaletteFade;
diff --git a/include/save.h b/include/save.h
index 46bf48d60..3feaa1f3d 100644
--- a/include/save.h
+++ b/include/save.h
@@ -39,12 +39,12 @@ enum
// Do save types
enum
{
- NORMAL_SAVE,
- LINK_SAVE,
- EREADER_SAVE, // mossdeep event
- HOF_SAVE,
- DIFFERENT_FILE_SAVE,
- HOF_DELETE_SAVE // unused
+ NORMAL_SAVE,
+ LINK_SAVE,
+ EREADER_SAVE, // mossdeep event
+ HOF_SAVE,
+ DIFFERENT_FILE_SAVE,
+ HOF_DELETE_SAVE // unused
};
void ClearSaveData(void);
diff --git a/include/script.h b/include/script.h
index a4c7dd575..4070a838f 100644
--- a/include/script.h
+++ b/include/script.h
@@ -4,6 +4,7 @@
struct ScriptContext;
typedef bool8 (*ScrCmdFunc)(struct ScriptContext *);
+typedef u8 Script[];
struct ScriptContext
{
@@ -54,5 +55,6 @@ u32 CalculateRamScriptChecksum(void);
void ClearRamScript(void);
bool8 InitRamScript(u8 *script, u16 scriptSize, u8 mapGroup, u8 mapNum, u8 objectId);
u8 *GetRamScript(u8 objectId, u8 *script);
+u16 gScriptResult;
#endif // GUARD_SCRIPT_H
diff --git a/include/sprite.h b/include/sprite.h
index bda635885..13c03ab51 100644
--- 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;
@@ -142,7 +144,7 @@ struct SpriteTemplate
u16 paletteTag;
const struct OamData *oam;
const union AnimCmd *const *anims;
- struct SpriteFrameImage *images;
+ const struct SpriteFrameImage *images;
const union AffineAnimCmd *const *affineAnims;
void (*callback)(struct Sprite *);
};
diff --git a/include/task.h b/include/task.h
index d2b2302cf..6c6efdf4f 100644
--- a/include/task.h
+++ b/include/task.h
@@ -5,12 +5,12 @@ typedef void (*TaskFunc)(u8 taskId);
struct Task
{
- TaskFunc func;
- bool8 isActive;
- u8 prev;
- u8 next;
- u8 priority;
- s16 data[16];
+ /*0x00*/ TaskFunc func;
+ /*0x04*/ bool8 isActive;
+ /*0x05*/ u8 prev;
+ /*0x06*/ u8 next;
+ /*0x07*/ u8 priority;
+ /*0x08*/ s16 data[16];
};
extern struct Task gTasks[];