diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/battle.h | 2 | ||||
-rw-r--r-- | include/event_data.h | 4 | ||||
-rw-r--r-- | include/event_scripts.h | 3 | ||||
-rw-r--r-- | include/field_control_avatar.h | 6 | ||||
-rw-r--r-- | include/field_fadetransition.h | 2 | ||||
-rw-r--r-- | include/field_map_obj.h | 2 | ||||
-rw-r--r-- | include/field_player_avatar.h | 2 | ||||
-rw-r--r-- | include/field_weather.h | 1 | ||||
-rw-r--r-- | include/gba/gba.h | 1 | ||||
-rw-r--r-- | include/global.h | 93 | ||||
-rw-r--r-- | include/help_system.h | 6 | ||||
-rw-r--r-- | include/item.h | 2 | ||||
-rw-r--r-- | include/map_name_popup.h | 1 | ||||
-rw-r--r-- | include/map_obj_80688E4.h | 6 | ||||
-rw-r--r-- | include/map_obj_lock.h | 1 | ||||
-rw-r--r-- | include/menu.h | 2 | ||||
-rw-r--r-- | include/menu_helpers.h | 1 | ||||
-rw-r--r-- | include/overworld.h | 12 | ||||
-rw-r--r-- | include/palette.h | 7 | ||||
-rw-r--r-- | include/pokemon_storage_system.h | 5 | ||||
-rw-r--r-- | include/quest_log.h | 20 | ||||
-rw-r--r-- | include/quest_log_8150454.h | 6 | ||||
-rw-r--r-- | include/region_map.h | 1 | ||||
-rw-r--r-- | include/save.h | 2 | ||||
-rw-r--r-- | include/unk_8159F40.h | 7 | ||||
-rw-r--r-- | include/wild_encounter.h | 1 |
26 files changed, 162 insertions, 34 deletions
diff --git a/include/battle.h b/include/battle.h index ee707f78b..d89db4656 100644 --- a/include/battle.h +++ b/include/battle.h @@ -977,4 +977,6 @@ extern u8 gBattlersCount; extern u16 gBattlerPartyIndexes[MAX_BATTLERS_COUNT]; extern s32 gBattleMoveDamage; +extern u8 gUnknown_2023E8A; + #endif // GUARD_BATTLE_H diff --git a/include/event_data.h b/include/event_data.h index f28ed4f75..398e03264 100644 --- a/include/event_data.h +++ b/include/event_data.h @@ -29,8 +29,9 @@ u8 *GetFlagPointer(u16 id); u8 FlagSet(u16 id); u8 FlagClear(u16 id); bool8 FlagGet(u16 id); -u16 * sub_806E454(u16 id); +u16 * GetVarPointer(u16 id); bool32 sub_806E2BC(void); +void sub_806E6FC(void); extern u16 gSpecialVar_0x8000; extern u16 gSpecialVar_0x8001; @@ -52,5 +53,6 @@ extern u16 gSpecialVar_MonBoxPos; extern u16 gSpecialVar_0x8014; extern u16 gUnknown_20370D0; +extern u16 gUnknown_20370C0; #endif // GUARD_EVENT_DATA_H diff --git a/include/event_scripts.h b/include/event_scripts.h index 844f1052a..6b9025ec2 100644 --- a/include/event_scripts.h +++ b/include/event_scripts.h @@ -372,4 +372,7 @@ extern const u8 SecretBase_RedCave1_Text_274E75[]; extern const u8 SecretBase_RedCave1_Text_2751E1[]; extern const u8 SecretBase_RedCave1_Text_2754F6[]; extern const u8 SecretBase_RedCave1_Text_2758CC[]; + +extern const u8 gUnknown_84178D0[]; +extern const u8 gUnknown_84178DA[]; #endif //GUARD_EVENT_SCRIPTS_H diff --git a/include/field_control_avatar.h b/include/field_control_avatar.h new file mode 100644 index 000000000..5b2184561 --- /dev/null +++ b/include/field_control_avatar.h @@ -0,0 +1,6 @@ +#ifndef GUARD_FIELD_CONTROL_AVATAR_H +#define GUARD_FIELD_CONTROL_AVATAR_H + +extern u32 gUnknown_3005078; + +#endif //GUARD_FIELD_CONTROL_AVATAR_H diff --git a/include/field_fadetransition.h b/include/field_fadetransition.h index 7c2d16a24..2cd01601e 100644 --- a/include/field_fadetransition.h +++ b/include/field_fadetransition.h @@ -8,5 +8,7 @@ void sp13F_fall_to_last_warp(void); void sub_80AF848(void); void sub_80AF87C(void); +void sub_807DF64(void); +void sub_807DF7C(void); #endif // GUARD_FIELD_FADETRANSITION_H diff --git a/include/field_map_obj.h b/include/field_map_obj.h index 0107fa10f..22d2d4a78 100644 --- a/include/field_map_obj.h +++ b/include/field_map_obj.h @@ -76,6 +76,8 @@ void MoveCoords(u8, s16 *, s16 *); bool8 FieldObjectIsSpecialAnimActive(struct MapObject *); u8 FieldObjectClearAnimIfSpecialAnimFinished(struct MapObject *); u8 GetFieldObjectIdByXYZ(u16 x, u16 y, u8 z); +void sub_8063E28(struct MapObject *, struct Sprite *); +void sub_8063CA4(struct MapObject *, u8); // Exported data declarations diff --git a/include/field_player_avatar.h b/include/field_player_avatar.h index 25b7f2d71..4bbc197aa 100644 --- a/include/field_player_avatar.h +++ b/include/field_player_avatar.h @@ -11,6 +11,8 @@ u8 player_get_direction_upper_nybble(void); u8 player_get_x22(void); void sub_808D074(u8); +void sub_805C270(); +void sub_805C780(); void GetXYCoordsOneStepInFrontOfPlayer(s16 *xPtr, s16 *yPtr); #endif //GUARD_FIELD_PLAYER_AVATAR_H diff --git a/include/field_weather.h b/include/field_weather.h index e12107e70..3f7741f00 100644 --- a/include/field_weather.h +++ b/include/field_weather.h @@ -8,5 +8,6 @@ u8 GetSav1Weather(void); void sub_80AEDBC(void); void DoCurrentWeather(void); +void sub_807B0C4(u16 *, u16 *, u32); #endif // GUARD_WEATHER_H diff --git a/include/gba/gba.h b/include/gba/gba.h index 7e58efb9f..4b5f2de95 100644 --- a/include/gba/gba.h +++ b/include/gba/gba.h @@ -1,6 +1,7 @@ #ifndef GUARD_GBA_GBA_H #define GUARD_GBA_GBA_H +#include <string.h> #include "defines.h" #include "io_reg.h" #include "types.h" diff --git a/include/global.h b/include/global.h index b05c87d88..b1604e1d6 100644 --- a/include/global.h +++ b/include/global.h @@ -243,7 +243,9 @@ struct SaveBlock2 /*0x098*/ struct Time localTimeOffset; /*0x0A0*/ struct Time lastBerryTreeUpdate; /*0x0A8*/ u32 field_A8; - /*0x0AC*/ u8 filler_AC[0xE74]; + /*0x0AC*/ u8 filler_AC[0x9ec]; + /*0xA98*/ u8 unk_A98[2][16]; + /*0xAB8*/ u8 filler_AB8[0x468]; /*0xF20*/ u32 encryptionKey; }; @@ -491,9 +493,35 @@ struct MysteryEventStruct u8 unk_1; }; +struct QuestLogNPCData +{ + u32 x:8; + u32 negx:1; + u32 y:8; + u32 negy:1; + u32 elevation:6; + u32 movementType:8; +}; + +struct QuestLog +{ + /*0x0000*/ u8 unk_000; + /*0x0001*/ s8 unk_001; + /*0x0002*/ s8 unk_002; + /*0x0003*/ s8 unk_003; + /*0x0004*/ s16 unk_004; + /*0x0006*/ s16 unk_006; + /*0x0008*/ u8 filler_008[0x140]; + /*0x0148*/ u8 unk_148[0x120]; + /*0x02c8*/ u8 unk_268[0x200]; + /*0x0468*/ struct QuestLogNPCData npcData[64]; + /*0x0568*/ u16 unk_568[0x80]; + /*0x0668*/ u16 end[0]; +}; + #define MAP_OBJECTS_COUNT 16 #define BERRY_TREES_COUNT 128 -#define FLAGS_COUNT 300 +#define FLAGS_COUNT 288 // 300 #define VARS_COUNT 256 #define MAIL_COUNT 16 @@ -501,32 +529,41 @@ struct SaveBlock1 { /*0x0000*/ struct Coords16 pos; /*0x0004*/ struct WarpData location; - /*0x000C*/ struct WarpData warp1; - /*0x0014*/ struct WarpData warp2; - /*0x001C*/ struct WarpData lastHealLocation; - /*0x0024*/ struct WarpData warp4; - /*0x002C*/ u8 filler2C[0x8]; - /*0x0034*/ u8 playerPartyCount; - /*0x0038*/ struct Pokemon playerParty[PARTY_SIZE]; - /*0x0290*/ u32 money; - /*0x0294*/ u16 coins; - /*0x0296*/ u8 filler296[0x7A]; - /*0x0310*/ struct ItemSlot bagPocket_Items[BAG_ITEMS_COUNT]; - struct ItemSlot bagPocket_KeyItems[BAG_KEYITEMS_COUNT]; - struct ItemSlot bagPocket_PokeBalls[BAG_POKEBALLS_COUNT]; - struct ItemSlot bagPocket_TMHM[BAG_TMHM_COUNT]; - struct ItemSlot bagPocket_Berries[BAG_BERRIES_COUNT]; - u8 filler5F8[0x40]; - /*0x0638*/ u8 trainerRematchStepCounter; - u8 filler_639; - /*0x063a*/ u8 trainerRematches[100]; - /*0x06A0*/ struct MapObject mapObjects[MAP_OBJECTS_COUNT]; - /*0x08E0*/ struct MapObjectTemplate mapObjectTemplates[64]; - /*0x0EE0*/ u8 fillerEE0[0x1DF0]; - /*0x2CD0*/ struct MailStruct mail[MAIL_COUNT]; - u8 filler2F10[0x1DA]; - /*0x30EA*/ struct EnigmaBerry enigmaBerry; - /*0x3120*/ u8 filler3120[0x340]; + /*0x0C*/ struct WarpData warp1; + /*0x14*/ struct WarpData warp2; + /*0x1C*/ struct WarpData lastHealLocation; + /*0x24*/ struct WarpData warp4; + /*0x2C*/ u16 savedMusic; + /*0x2E*/ u8 weather; + /*0x2F*/ u8 filler_2F; + /*0x30*/ u8 flashLevel; + /*0x32*/ u16 mapDataId; + /*0x234*/ u8 playerPartyCount; + /*0x238*/ struct Pokemon playerParty[PARTY_SIZE]; + /*0x490*/ u32 money; + /*0x494*/ u16 coins; + /*0x496*/ u16 registeredItem; // registered for use with SELECT button + /*0x0298*/ u8 filler298[0x78]; + /*0x0310*/ struct ItemSlot bagPocket_Items[BAG_ITEMS_COUNT]; + /*0x????*/ struct ItemSlot bagPocket_KeyItems[BAG_KEYITEMS_COUNT]; + /*0x????*/ struct ItemSlot bagPocket_PokeBalls[BAG_POKEBALLS_COUNT]; + /*0x????*/ struct ItemSlot bagPocket_TMHM[BAG_TMHM_COUNT]; + /*0x????*/ struct ItemSlot bagPocket_Berries[BAG_BERRIES_COUNT]; + /*0x05F8*/ u8 filler5F8[0x40]; + /*0x638*/ u8 trainerRematchStepCounter; + u8 filler_639; + /*0x63A*/ u8 trainerRematches[100]; + /*0x06A0*/ struct MapObject mapObjects[MAP_OBJECTS_COUNT]; + /*0x08E0*/ struct MapObjectTemplate mapObjectTemplates[64]; + /*0x0EE0*/ u8 flags[FLAGS_COUNT]; + /*0x1000*/ u16 vars[VARS_COUNT]; + /*0x1200*/ u8 filler1200[0x100]; + /*0x1300*/ struct QuestLog questLog[4]; + /*0x2CA0*/ u8 filler2CA0[0x30]; + /*0x2CD0*/ struct MailStruct mail[MAIL_COUNT]; + /*0x2F10*/ u8 filler2F10[0x1DA]; + /*0x30EC*/ struct EnigmaBerry enigmaBerry; + /*0x3120*/ u8 filler3120[0x340]; /*0x3460*/ struct MysteryEventStruct unk_3460; /*0x3464*/ u8 filler_3464[0x1b8]; /*0x361C*/ struct RamScript ramScript; diff --git a/include/help_system.h b/include/help_system.h new file mode 100644 index 000000000..3a4c52f2e --- /dev/null +++ b/include/help_system.h @@ -0,0 +1,6 @@ +#ifndef GUARD_HELP_SYSTEM_H +#define GUARD_HELP_SYSTEM_H + +extern bool8 gUnknown_3005ECC; + +#endif //GUARD_HELP_SYSTEM_H diff --git a/include/item.h b/include/item.h index a136f03ec..199b3b65e 100644 --- a/include/item.h +++ b/include/item.h @@ -60,5 +60,7 @@ u8 ItemId_GetBattleUsage(u16 itemId); ItemUseFunc ItemId_GetBattleFunc(u16 itemId); u8 ItemId_GetSecondaryId(u16 itemId); u16 itemid_get_market_price(u16 itemId); +void sub_809A2DC(void); +void sub_809A2A4(void); #endif // ITEM_H diff --git a/include/map_name_popup.h b/include/map_name_popup.h index 8a9043a3f..0cb0c49ad 100644 --- a/include/map_name_popup.h +++ b/include/map_name_popup.h @@ -7,5 +7,6 @@ // Exported ROM declarations void HideMapNamePopUpWindow(void); +void sub_8098110(u8); #endif //GUARD_MAP_NAME_POPUP_H diff --git a/include/map_obj_80688E4.h b/include/map_obj_80688E4.h new file mode 100644 index 000000000..b131a1a54 --- /dev/null +++ b/include/map_obj_80688E4.h @@ -0,0 +1,6 @@ +#ifndef GUARD_MAP_OBJ_80688E4_H +#define GUARD_MAP_OBJ_80688E4_H + +void player_bitmagic(void); + +#endif //GUARD_MAP_OBJ_80688E4_H diff --git a/include/map_obj_lock.h b/include/map_obj_lock.h index a10648f2f..cf1f714d7 100644 --- a/include/map_obj_lock.h +++ b/include/map_obj_lock.h @@ -7,5 +7,6 @@ bool8 sub_809847C(void); void LockSelectedMapObject(void); void sub_8098630(void); bool8 sub_8098734(void); +void sub_80696C0(void); #endif // GUARD_MAP_OBJ_LOCK_H diff --git a/include/menu.h b/include/menu.h index 99ff35adb..86a67adc4 100644 --- a/include/menu.h +++ b/include/menu.h @@ -32,7 +32,7 @@ void CreateYesNoMenu(const struct WindowTemplate *windowTemplate, u16 borderFirs s8 ProcessMenuInputNoWrap_(void); void do_scheduled_bg_tilemap_copies_to_vram(void); void clear_scheduled_bg_copies_to_vram(void); -void AddTextPrinterParametrized2(u8 windowId, u8 fontId, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, struct TextColor *color, s8 speed, const u8 *str); +void AddTextPrinterParametrized2(u8 windowId, u8 fontId, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, const struct TextColor *color, s8 speed, const u8 *str); void sub_8197B1C(u8 windowId, bool8 copyToVram, u16 a2, u16 a3); #endif // GUARD_MENU_H diff --git a/include/menu_helpers.h b/include/menu_helpers.h index f083a10e2..e88385f94 100644 --- a/include/menu_helpers.h +++ b/include/menu_helpers.h @@ -16,5 +16,6 @@ void sub_812225C(u16 *, u16 *, u8, u8); void sub_8122298(u16 *, u16 *, u8, u8, u8); void sub_8121F68(u8 taskId, const struct YesNoFuncTable *data); bool8 sub_81221AC(void); +bool8 sub_80BF708(void); #endif //GUARD_MENU_HELPERS_H diff --git a/include/overworld.h b/include/overworld.h index a5fba0c10..d497ddbe1 100644 --- a/include/overworld.h +++ b/include/overworld.h @@ -71,4 +71,16 @@ void mapldr_default(void); void IncrementGameStat(u8); u32 GetGameStat(u8); +void sub_8056938(void); +void sub_8055D5C(struct WarpData *); +void sub_80572A8(void); +void sub_805726C(void); +void sub_8057430(void); +void sub_8055DC4(void); + +extern u8 gUnknown_2031DD8; +extern u8 gUnknown_2036E28; + +extern bool8 (* gUnknown_3005024)(void); + #endif //GUARD_ROM4_H diff --git a/include/palette.h b/include/palette.h index d3bcd2271..90112947a 100644 --- a/include/palette.h +++ b/include/palette.h @@ -42,8 +42,8 @@ struct PaletteFadeControl extern struct PaletteFadeControl gPaletteFade; extern u32 gPlttBufferTransferPending; extern u8 gPaletteDecompressionBuffer[]; -extern u16 gPlttBufferUnfaded[]; -extern u16 gPlttBufferFaded[]; +extern u16 gPlttBufferUnfaded[PLTT_BUFFER_SIZE]; +extern u16 gPlttBufferFaded[PLTT_BUFFER_SIZE]; void LoadCompressedPalette(const void *, u16, u16); void LoadPalette(const void *, u16, u16); @@ -67,5 +67,8 @@ void BeginFastPaletteFade(u8); void BeginHardwarePaletteFade(u8, u8, u8, u8, u8); void BlendPalettes(u32, u8, u16); void BlendPalettesUnfaded(u32, u8, u16); +void sub_80716F8(const u16 *, u16 *, u16, u8); + +extern struct PaletteFadeControl gPaletteFade; #endif // GUARD_PALETTE_H diff --git a/include/pokemon_storage_system.h b/include/pokemon_storage_system.h index 9fcfdba96..04d739314 100644 --- a/include/pokemon_storage_system.h +++ b/include/pokemon_storage_system.h @@ -5,9 +5,10 @@ #define IN_BOX_COUNT 30 u8* GetBoxNamePtr(u8 boxNumber); -struct BoxPokemon *GetBoxedMonPtr(u8, u8); -void SetBoxMonNickFromAnyBox(u8, u8, u8 *); +struct BoxPokemon *GetBoxedMonPtr(u8 boxId, u8 monPosition); +void SetBoxMonNickFromAnyBox(u8 boxId, u8 monPosition, u8 * newNick); void CompactPartySlots(void); u32 GetBoxMonDataFromAnyBox(u8 boxId, u8 monPosition, u32 request); +void sub_808BCB4(u8 boxId, u8 monPosition); #endif // GUARD_POKEMON_STORAGE_SYSTEM_H diff --git a/include/quest_log.h b/include/quest_log.h new file mode 100644 index 000000000..f3fc04f41 --- /dev/null +++ b/include/quest_log.h @@ -0,0 +1,20 @@ +#ifndef GUARD_QUEST_LOG_H +#define GUARD_QUEST_LOG_H + +struct UnkStruct_3005E90 +{ + u8 unk_0; + u8 unk_1_0:1; + u8 unk_1_1:1; + u8 unk_1_2:1; + u8 unk_1_3:1; + u8 unk_1_4:1; + u8 unk_2; +}; + +extern u8 gUnknown_3005E88; +extern u16 gUnknown_3005E8C; +extern struct UnkStruct_3005E90 gUnknown_3005E90; +extern struct UnkStruct_203AE98 * gUnknown_3005E94; + +#endif //GUARD_QUEST_LOG_H diff --git a/include/quest_log_8150454.h b/include/quest_log_8150454.h new file mode 100644 index 000000000..05bebdd75 --- /dev/null +++ b/include/quest_log_8150454.h @@ -0,0 +1,6 @@ +#ifndef GUARD_QUEST_LOG_8150454_H +#define GUARD_QUEST_LOG_8150454_H + +void sub_8150454(void); + +#endif //GUARD_QUEST_LOG_8150454_H diff --git a/include/region_map.h b/include/region_map.h index 91384d166..eb84a71b1 100644 --- a/include/region_map.h +++ b/include/region_map.h @@ -310,5 +310,6 @@ void CreateRegionMapPlayerIcon(u16 x, u16 y); void CreateRegionMapCursor(u16 tileTag, u16 paletteTag); u8 *GetMapName(u8 *, u16, u16); bool32 sub_8124668(u8 mapSecId); +void sub_80C4DF8(u8 *, u8); #endif //GUARD_REGION_MAP_H diff --git a/include/save.h b/include/save.h index 38ad63170..29524a7e2 100644 --- a/include/save.h +++ b/include/save.h @@ -117,6 +117,8 @@ u8 sub_80DA45C(void); bool8 sub_80DA4A0(void); u8 Save_LoadGameData(u8 a1); u32 TryCopySpecialSaveSection(u8 sector, u8* dst); +u32 sub_8153634(u8 sector, u8* src); +void sub_8153688(u8 taskId); u32 sub_80DA5E0(u8 sector, u8* src); void sub_80DA634(u8 taskId); diff --git a/include/unk_8159F40.h b/include/unk_8159F40.h new file mode 100644 index 000000000..b7666766f --- /dev/null +++ b/include/unk_8159F40.h @@ -0,0 +1,7 @@ +#ifndef GUARD_UNK_8159F40_H +#define GUARD_UNK_8159F40_H + +void sub_815A008(struct QuestLog *); +void sub_815A1F8(struct QuestLog *, struct MapObjectTemplate *); + +#endif //GUARD_UNK_8159F40_H diff --git a/include/wild_encounter.h b/include/wild_encounter.h index 55bbaa7dd..a1e26fe45 100644 --- a/include/wild_encounter.h +++ b/include/wild_encounter.h @@ -40,5 +40,6 @@ void FishingWildEncounter(u8 rod); u16 GetLocalWildMon(bool8 *isWaterMon); u16 GetLocalWaterMon(void); bool8 UpdateRepelCounter(void); +void sub_8082740(u8); #endif // GUARD_WILD_ENCOUNTER_H |