diff options
author | PikalaxALT <pikalaxalt@gmail.com> | 2019-01-07 18:39:27 -0500 |
---|---|---|
committer | PikalaxALT <pikalaxalt@gmail.com> | 2019-01-07 18:39:27 -0500 |
commit | f7eef0735bb70a7fed17b6fabb15f30c092209bc (patch) | |
tree | 17f9256f07ff23163cf13af85fdc36847549cbbe /include | |
parent | f50bc217ae5daeb2c2788f502f604e3684249256 (diff) | |
parent | 8f7400809626c0f72dfe751665126f94181fd7c1 (diff) |
Merge branch 'master' into trainer_tower
Diffstat (limited to 'include')
-rw-r--r-- | include/battle_setup.h | 4 | ||||
-rw-r--r-- | include/field_fadetransition.h | 14 | ||||
-rw-r--r-- | include/field_map_obj.h | 8 | ||||
-rw-r--r-- | include/field_map_obj_helpers.h | 2 | ||||
-rw-r--r-- | include/field_player_avatar.h | 1 | ||||
-rw-r--r-- | include/field_screen_effect.h | 2 | ||||
-rw-r--r-- | include/field_specials.h | 1 | ||||
-rw-r--r-- | include/field_weather.h | 1 | ||||
-rw-r--r-- | include/fieldmap.h | 21 | ||||
-rw-r--r-- | include/global.fieldmap.h | 14 | ||||
-rw-r--r-- | include/global.h | 3 | ||||
-rw-r--r-- | include/item.h | 5 | ||||
-rw-r--r-- | include/map_obj_lock.h | 4 | ||||
-rw-r--r-- | include/map_preview_screen.h | 6 | ||||
-rw-r--r-- | include/menu.h | 1 | ||||
-rw-r--r-- | include/new_menu_helpers.h | 4 | ||||
-rw-r--r-- | include/overworld.h | 13 | ||||
-rw-r--r-- | include/palette.h | 2 | ||||
-rw-r--r-- | include/party_menu.h | 2 | ||||
-rw-r--r-- | include/pokemon_storage_system.h | 1 | ||||
-rw-r--r-- | include/quest_log.h | 6 | ||||
-rw-r--r-- | include/scrcmd.h | 6 | ||||
-rw-r--r-- | include/script.h | 9 | ||||
-rw-r--r-- | include/script_menu.h | 3 | ||||
-rw-r--r-- | include/script_movement.h | 2 | ||||
-rw-r--r-- | include/script_pokemon_util_80A0058.h | 8 | ||||
-rw-r--r-- | include/sound.h | 1 |
27 files changed, 106 insertions, 38 deletions
diff --git a/include/battle_setup.h b/include/battle_setup.h index 86a84f471..61395811b 100644 --- a/include/battle_setup.h +++ b/include/battle_setup.h @@ -11,8 +11,8 @@ void BattleSetup_StartWildBattle(void); void BattleSetup_StartRoamerBattle(void); u8 HasTrainerAlreadyBeenFought(u16); -void trainer_flag_set(u16); -void trainer_flag_clear(u16); +void SetTrainerFlag(u16); +void ClearTrainerFlag(u16); void BattleSetup_StartTrainerBattle(void); u8 *BattleSetup_GetScriptAddrAfterBattle(void); u8 *BattleSetup_GetTrainerPostBattleScript(void); diff --git a/include/field_fadetransition.h b/include/field_fadetransition.h index 051865210..a2a4d3eac 100644 --- a/include/field_fadetransition.h +++ b/include/field_fadetransition.h @@ -3,14 +3,14 @@ #include "global.h" -void sub_80AF734(void); -void sp13E_warp_to_last_warp(void); -void sub_80AF7D0(void); -void sp13F_fall_to_last_warp(void); +void sub_807DF7C(void); +void DoWarp(void); +void DoDiveWarp(void); +void DoDoorWarp(void); -void sub_80AF848(void); -void sub_80AF87C(void); +void DoFallWarp(void); +void sub_807E59C(void); +void sub_807E500(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 d2ec58979..69e3419de 100644 --- a/include/field_map_obj.h +++ b/include/field_map_obj.h @@ -35,7 +35,7 @@ u8 sub_808D4F4(void); void RemoveFieldObjectByLocalIdAndMap(u8, u8, u8); void npc_load_two_palettes__no_record(u16, u8); void npc_load_two_palettes__and_record(u16, u8); -void sub_808EBA8(u8, u8, u8, s16, s16); +void sub_805F7C4(u8, u8, u8, s16, s16); void pal_patch_for_npc(u16, u8); void sub_808E16C(s16, s16); void sub_808F28C(u8 localId, u8 mapNum, u8 mapGroup, u8 decorCat); @@ -59,13 +59,13 @@ const struct MapObjectGraphicsInfo *GetFieldObjectGraphicsInfo(u8); void npc_by_local_id_and_map_set_field_1_bit_x20(u8, u8, u8, u8); void gpu_pal_allocator_reset__manage_upper_four(void); void sub_808E82C(u8, u8, u8, s16, s16); -void sub_808E7E4(u8, u8, u8); -void sub_808E78C(u8, u8, u8, u8); +void sub_805F400(u8, u8, u8); +void sub_805F3A8(u8, u8, u8, u8); void sub_808E75C(s16, s16); void FieldObjectGetLocalIdAndMap(struct MapObject *, u8 *, u8 *, u8 *); void npc_coords_shift(struct MapObject *, s16, s16); void sub_808EB08(struct MapObject *, s16, s16); -void sub_808F254(u8, u8, u8); +void sub_805FE94(u8, u8, u8); void FieldObjectStep(struct MapObject *, struct Sprite *, bool8(struct MapObject *, struct Sprite *)); u8 FieldObjectFaceOppositeDirection(struct MapObject *, u8); u8 GetOppositeDirection(u8); diff --git a/include/field_map_obj_helpers.h b/include/field_map_obj_helpers.h index 2d3f69d95..cd1b19eaf 100644 --- a/include/field_map_obj_helpers.h +++ b/include/field_map_obj_helpers.h @@ -4,6 +4,6 @@ #include "global.h" void UnfreezeMapObjects(void); -void sub_8097B78(u8, u8); +void sub_8069058(u8, u8); #endif diff --git a/include/field_player_avatar.h b/include/field_player_avatar.h index 297d66441..bb78bd0f3 100644 --- a/include/field_player_avatar.h +++ b/include/field_player_avatar.h @@ -20,5 +20,6 @@ u8 sub_805C808(u8); void SetPlayerAvatarStateMask(u8 mask); void sub_805D9C4(struct Sprite *sprite); void sub_805D154(u8 direction); +void sub_805DAE4(u8 direction); #endif //GUARD_FIELD_PLAYER_AVATAR_H diff --git a/include/field_screen_effect.h b/include/field_screen_effect.h index add61d57c..14d7e5d81 100644 --- a/include/field_screen_effect.h +++ b/include/field_screen_effect.h @@ -4,7 +4,7 @@ #include "global.h" void sub_80AF79C(void); -void sub_80B009C(u8); +void sub_807F028(u8); void sub_80B0244(void); #endif // GUARD_FIELD_SCREEN_EFFECT_H diff --git a/include/field_specials.h b/include/field_specials.h index 2b7991b55..2d495fdd5 100644 --- a/include/field_specials.h +++ b/include/field_specials.h @@ -4,6 +4,7 @@ #include "global.h" u8 GetLeadMonIndex(void); +u8 CountDigits(u16 number); void TV_PrintIntToStringVar(u8, int); #endif // GUARD_FIELD_SPECIALS_H diff --git a/include/field_weather.h b/include/field_weather.h index b896259e9..eb80c455a 100644 --- a/include/field_weather.h +++ b/include/field_weather.h @@ -10,6 +10,7 @@ u8 GetSav1Weather(void); void sub_80AEDBC(void); void DoCurrentWeather(void); +void SetSav1WeatherFromCurrMapHeader(void); void sub_807B0C4(u16 *, u16 *, u32); #endif // GUARD_WEATHER_H diff --git a/include/fieldmap.h b/include/fieldmap.h index c5abdb2e1..537626edc 100644 --- a/include/fieldmap.h +++ b/include/fieldmap.h @@ -3,19 +3,24 @@ #include "global.h" -extern struct MapCoords { - int width; - int height; -} gUnknown_03005DC0; +#define NUM_TILES_IN_PRIMARY 640 +#define NUM_TILES_TOTAL 1024 +#define NUM_METATILES_IN_PRIMARY 640 +#define NUM_METATILES_TOTAL 1024 +#define NUM_PALS_IN_PRIMARY 7 +#define NUM_PALS_TOTAL 13 +#define VIRTUAL_MAP_SIZE 0x2800 + +extern struct BackupMapData VMap; u32 MapGridGetMetatileIdAt(int, int); u32 MapGridGetMetatileBehaviorAt(int, int); void MapGridSetMetatileIdAt(int, int, u16); void MapGridSetMetatileEntryAt(int, int, u16); void GetCameraCoords(u16*, u16*); -bool8 MapGridIsImpassableAt(s16, s16); -s32 GetMapBorderIdAt(s16, s16); -bool32 CanCameraMoveInDirection(u8); -u16 GetBehaviorByMetatileId(u16 metatileId); +bool8 MapGridIsImpassableAt(s32, s32); +s32 GetMapBorderIdAt(s32, s32); +bool32 CanCameraMoveInDirection(s32); +u32 GetBehaviorByMetatileIdAndMapData(struct MapData *mapData, u16 metatile, u8 attr); #endif //GUARD_FIELDMAP_H diff --git a/include/global.fieldmap.h b/include/global.fieldmap.h index ed5054b7d..b602741a6 100644 --- a/include/global.fieldmap.h +++ b/include/global.fieldmap.h @@ -51,8 +51,8 @@ struct Tileset /*0x04*/ void *tiles; /*0x08*/ void *palettes; /*0x0c*/ void *metatiles; - /*0x10*/ void *metatileAttributes; /*0x14*/ TilesetCB callback; + /*0x10*/ void *metatileAttributes; }; struct MapData @@ -63,12 +63,14 @@ struct MapData /*0x0c*/ u16 *map; /*0x10*/ struct Tileset *primaryTileset; /*0x14*/ struct Tileset *secondaryTileset; + /*0x18*/ u8 unk18; + /*0x19*/ u8 unk19; }; struct BackupMapData { - s32 width; - s32 height; + s32 Xsize; + s32 Ysize; u16 *map; }; @@ -149,9 +151,9 @@ struct MapEvents struct MapConnection { /*0x00*/ u8 direction; - /*0x01*/ u32 offset; - /*0x05*/ u8 mapGroup; - /*0x06*/ u8 mapNum; + /*0x04*/ u32 offset; + /*0x08*/ u8 mapGroup; + /*0x09*/ u8 mapNum; }; struct MapConnections diff --git a/include/global.h b/include/global.h index f418ff757..26ce4a8cc 100644 --- a/include/global.h +++ b/include/global.h @@ -328,7 +328,8 @@ struct SaveBlock2 /*0x0AC*/ u8 filler_AC[0x3F4]; /*0x4A0*/ u32 unk_4A0[0x2F]; /*0x55c*/ struct UnkSaveBlock2Substruct_55C unk_55C; - /*0x574*/ u8 filler_574[0x524]; + /*0x574*/ u8 filler_574[0x324]; + /*0x898*/ u16 mapView[0x100]; /*0xA98*/ struct LinkBattleRecords linkBattleRecords; /*0xAF0*/ struct BerryCrush berryCrush; /*0xB00*/ u8 filler_B00[0x420]; diff --git a/include/item.h b/include/item.h index bc1a49766..25177cb6e 100644 --- a/include/item.h +++ b/include/item.h @@ -62,7 +62,8 @@ u8 ItemId_GetSecondaryId(u16 itemId); u16 itemid_get_market_price(u16 itemId); void sub_809A2DC(void); void sub_809A2A4(void); -void sub_8099E90(u16, u8 *); -bool8 sub_809A084(u16 itemId, u16 amount); +void CopyItemName(u16, u8 *); +void sub_809A824(u16 itemId); +bool8 AddBagItem(u16 itemId, u16 amount); #endif // ITEM_H diff --git a/include/map_obj_lock.h b/include/map_obj_lock.h index c8e075658..2927ca26d 100644 --- a/include/map_obj_lock.h +++ b/include/map_obj_lock.h @@ -3,9 +3,9 @@ #include "global.h" -bool8 sub_80983C4(void); +bool8 sub_8069590(void); void ScriptFreezeMapObjects(void); -bool8 sub_809847C(void); +bool8 sub_8069648(void); void LockSelectedMapObject(void); void sub_8098630(void); bool8 sub_8098734(void); diff --git a/include/map_preview_screen.h b/include/map_preview_screen.h new file mode 100644 index 000000000..8d9114b82 --- /dev/null +++ b/include/map_preview_screen.h @@ -0,0 +1,6 @@ +#ifndef GUARD_MAP_PREVIEW_SCREEN_H +#define GUARD_MAP_PREVIEW_SCREEN_H + +void sub_80F85BC(u16 a0); + +#endif //GUARD_MAP_PREVIEW_SCREEN_H diff --git a/include/menu.h b/include/menu.h index b932693f7..b5078df5e 100644 --- a/include/menu.h +++ b/include/menu.h @@ -37,5 +37,6 @@ void clear_scheduled_bg_copies_to_vram(void); 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); void sub_810F4D8(u8 windowId, bool32 someBool); +void *sub_80F68F0(u8 bgId, const void *src, u32 size, u16 offset, u8 mode); #endif // GUARD_MENU_H diff --git a/include/new_menu_helpers.h b/include/new_menu_helpers.h index 2a68a35e6..32b46b552 100644 --- a/include/new_menu_helpers.h +++ b/include/new_menu_helpers.h @@ -19,5 +19,9 @@ void sub_80F6F54(u8, u8); u8 sub_80F78A8(void); void sub_80F6E9C(void); void sub_80F6EE4(u8 windowId, bool8 transfer); +void sub_80F7974(const u8 *); +u8 GetStartMenuWindowId(void); +void sub_80F7998(void); +void sub_80F69E8(u8 bgId, const void *src, u32 size, u16 offset, u8 mode); #endif // GUARD_NEW_MENU_HELPERS_H diff --git a/include/overworld.h b/include/overworld.h index 5e2e4c11c..b32d9cf48 100644 --- a/include/overworld.h +++ b/include/overworld.h @@ -24,6 +24,8 @@ struct UCoords32 u32 x, y; }; +extern struct UCoords32 gDirectionToVectors[]; + extern struct LinkPlayerMapObject gLinkPlayerMapObjects[4]; extern MainCallback gFieldCallback; @@ -35,7 +37,10 @@ void Overworld_SetMapObjTemplateMovementType(u8, u8); void Overworld_SetWarpDestination(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y); void saved_warp2_set(int unused, s8 mapGroup, s8 mapNum, s8 warpId); -void saved_warp2_set_2(int unused, s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y); +void SetDynamicWarpWithCoords(int unused, s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y); +void SetFixedDiveWarp(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y); +void SetFixedHoleWarp(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y); +void SetEscapeWarp(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y); void Overworld_SetHealLocationWarp(u8); void sub_8084DD4(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y); void sub_8084E2C(s8, s8, s8, s8, s8); @@ -81,6 +86,10 @@ void sub_8055DC4(void); u8 sav1_map_get_name(void); +void SetCurrentMapLayout(u16 mapDataId); +void SetWarpDestinationToFixedHoleWarp(s16 x, s16 y); + +void ResetInitialPlayerAvatarState(void); void sub_8055D40(u16 mapDataId); void sub_80563F0(void); @@ -88,5 +97,7 @@ extern u8 gUnknown_2031DD8; extern u8 gUnknown_2036E28; extern bool8 (* gUnknown_3005024)(void); +void SetLastHealLocationWarp(u8 healLocaionId); +void sub_8055864(u8 mapGroup, u8 mapNum); #endif //GUARD_ROM4_H diff --git a/include/palette.h b/include/palette.h index 3af0d5d7b..31c8ffefe 100644 --- a/include/palette.h +++ b/include/palette.h @@ -70,6 +70,8 @@ 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); +void TintPalette_GrayScale(u16 *, u16); +void TintPalette_SepiaTone(u16 *, u16); extern struct PaletteFadeControl gPaletteFade; diff --git a/include/party_menu.h b/include/party_menu.h index 19e1f7d4e..2e83c1496 100644 --- a/include/party_menu.h +++ b/include/party_menu.h @@ -12,7 +12,7 @@ enum { AILMENT_BRN }; -bool8 pokemon_has_move(struct Pokemon *, u16); +bool8 MonKnowsMove(struct Pokemon *, u16); void sub_81B58A8(void); void DoWallyTutorialBagMenu(void); u8 pokemon_ailments_get_primary(u32 status); diff --git a/include/pokemon_storage_system.h b/include/pokemon_storage_system.h index 5b2d2052b..897c5a42e 100644 --- a/include/pokemon_storage_system.h +++ b/include/pokemon_storage_system.h @@ -12,5 +12,6 @@ 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); +u8 * GetBoxNamePtr(u8 boxId); #endif // GUARD_POKEMON_STORAGE_SYSTEM_H diff --git a/include/quest_log.h b/include/quest_log.h index 9f8a0ea21..7f4bafada 100644 --- a/include/quest_log.h +++ b/include/quest_log.h @@ -21,5 +21,11 @@ extern struct UnkStruct_203AE98 * gUnknown_3005E94; void sub_8112720(u8); void sub_8113550(u16, const u16 *); +void sub_8115748(u16); +u8 sub_8112CAC(void); +bool8 sub_81119D4(void (*func)(void)); +void sub_8111F38(u16, u16); + +extern u8 gUnknown_203ADFA; #endif //GUARD_QUEST_LOG_H diff --git a/include/scrcmd.h b/include/scrcmd.h new file mode 100644 index 000000000..0ef357ece --- /dev/null +++ b/include/scrcmd.h @@ -0,0 +1,6 @@ +#ifndef GUARD_SCRCMD_H +#define GUARD_SCRCMD_H + +extern struct ScriptContext * gUnknown_3005070; + +#endif //GUARD_SCRCMD_H diff --git a/include/script.h b/include/script.h index ebb4caa86..8ffbe1563 100644 --- a/include/script.h +++ b/include/script.h @@ -65,5 +65,14 @@ void sub_80992A0(u8 *script, u16 scriptSize); bool32 sub_8069DFC(void); void sub_8069EA4(u8 * script, u16 scriptSize); u8 * sub_8069E48(void); +void sub_8069998(u8 var); +void sub_80699F8(void); +void sub_8069964(void); +void sub_80699A4(void); +void sub_8069970(void); +void sub_8069A20(void); +void sub_8069A2C(void); + +extern const u8 *gRAMScriptPtr; #endif // GUARD_SCRIPT_H diff --git a/include/script_menu.h b/include/script_menu.h index 1e95570b3..f82b061a5 100644 --- a/include/script_menu.h +++ b/include/script_menu.h @@ -3,7 +3,7 @@ #include "global.h" -extern const u8 *const gUnknown_0858BAF0[9]; +extern const u8 *const gStdStringPtrs[9]; bool8 ScriptMenu_Multichoice(u8 left, u8 top, u8 var3, u8 var4); bool8 ScriptMenu_MultichoiceWithDefault(u8 left, u8 top, u8 var3, u8 var4, u8 var5); @@ -11,5 +11,6 @@ bool8 ScriptMenu_YesNo(u8 var1, u8 var2); bool8 ScriptMenu_MultichoiceGrid(u8 left, u8 top, u8 multichoiceId, u8 a4, u8 columnCount); bool8 ScriptMenu_ShowPokemonPic(u16 var1, u8 var2, u8 var3); bool8 (*ScriptMenu_GetPicboxWaitFunc(void))(void); +void sub_809D6D4(void); #endif //GUARD_SCRIPT_MENU_H diff --git a/include/script_movement.h b/include/script_movement.h index ae446812e..2a6dbd2a7 100644 --- a/include/script_movement.h +++ b/include/script_movement.h @@ -5,6 +5,6 @@ bool8 ScriptMovement_StartObjectMovementScript(u8, u8, u8, const u8 *); bool8 ScriptMovement_IsObjectMovementFinished(u8, u8, u8); -void sub_80D338C(void); +void sub_80974D8(void); #endif // GUARD_SCRIPT_MOVEMENT_H diff --git a/include/script_pokemon_util_80A0058.h b/include/script_pokemon_util_80A0058.h new file mode 100644 index 000000000..e1d228589 --- /dev/null +++ b/include/script_pokemon_util_80A0058.h @@ -0,0 +1,8 @@ +#ifndef GUARD_SCRIPT_POKEMON_UTIL_80A0058_H +#define GUARD_SCRIPT_POKEMON_UTIL_80A0058_H + +bool8 ScriptGiveMon(u16 species, u8 level, u16 item, u32 unk1, u32 unk2, u8 unk3); +bool8 ScriptGiveEgg(u16 species); +void ScriptSetMonMoveSlot(u8 partyIdx, u16 move, u8 slot); + +#endif //GUARD_SCRIPT_POKEMON_UTIL_80A0058_H diff --git a/include/sound.h b/include/sound.h index 34fdfc839..e720fc1a2 100644 --- a/include/sound.h +++ b/include/sound.h @@ -31,6 +31,7 @@ void PlayCry3(u16 species, s8 pan, u8 mode); void PlayCry4(u16 species, s8 pan, u8 mode); void PlayCry5(u16 species, u8 mode); void PlayCry6(u16 species, s8 pan, u8 mode); +void PlayCry7(u16 species, u8 mode); void PlayCryInternal(u16 species, s8 pan, s8 volume, u8 priority, u8 mode); bool8 IsCryFinished(void); void StopCryAndClearCrySongs(void); |