pokeemerald/include/overworld.h

121 lines
4.3 KiB
C
Raw Normal View History

2017-10-12 09:06:19 +02:00
#ifndef GUARD_ROM4_H
#define GUARD_ROM4_H
Decoration + decoration_inventory (#89) * SetDecorationInventoriesPointers * ClearDecorationInventories * CheckHasDecoration * DecorationAdd * DecorationCheckSpace * DecorationRemove * sub_8161A38 * CountDecorations; Funcion renaming * Disassemble decoration data structs, tilemaps, and descriptions * sub_8126968 * sub_81269D4 * through sub_8126A88 * through sub_8126B2C * sub_8126B80 * sub_8126C08 * sub_8126C48 * sub_8126CA4 * sub_8126D10 * sub_8126E44 * sub_8126E8C * sub_8126F68 * sub_8127058 * sub_8127088 * sub_81270E8 * through sub_8127208 * through sub_8127268 * sub_8127284 * through sub_81272F8 * sub_8127330 * through sub_8127480 * sub_81274A0 * sub_8127500; makefile now tells scaninc to scan headers * Actual real fix to mapfile being in build/emerald instead of wd * through sub_812759C * through sub_812764C * through sub_8127744 * through sub_81277BC * sub_81277E8 * sub_8127814 * through sub_81279C4 * through sub_8127ACC * sub_8127B04 * sub_8127B54 * sub_8127B90 * sub_8127D38 * sub_8127E18 * sub_8127F68 * sub_8128060 * ConfigureCameraObjectForPlacingDecoration * SetUpPlacingDecorationPlayerAvatar * sub_812826C * through sub_8128414 * through sub_81284F4 * sub_812853C * sub_8128950 * through sub_8128AAC * through sub_8128BBC * c1_overworld_prev_quest * sub_8128C64 * sub_8128CD4 * sub_8128D10 * sub_8128DB4 * through sub_8128E18 * through sub_8129068 * sub_8129088 * through sub_81291E8 * sub_812925C * sub_81292D0 * sub_81292E8 * gpu_pal_decompress_alloc_tag_and_upload * AddDecorationIconObjectFromIconTable * GetDecorationIconPicOrPalette * AddDecorationIconObjectFromFieldObject * AddDecorationIconObject * through sub_8129708 * sub_81297F8 * sub_81298EC * SetUpPuttingAwayDecorationPlayerAvatar * sub_8129ABC * sub_8129B34 * sub_8129BCC * through sub_8129C74 * through sub_8129D8C * sub_8129E0C * sub_8129E74 * sub_8129F20 * sub_8129FC8 * sub_812A040 * nonmatching sub_812A0E8 * through sub_812A22C * sub_812A25C * sub_812A2C4 * through sub_812A39C * Remaining fns in decoration.s * Decompile decoration headers * Decompile all remaining decoration data that had already been disassembled * Disassemble two data objects * Suggest structure of list menu template * decompile through decoration list menu template * Disassemble decoration icon graphics table * Rip icon gfx * Decompile deco icon table * Decompile more data related to drawing decorations * Decompile gUnknown_085A7250 structs * Decompile two sprite templates * Decompile remaining data in decoration.s * Decompile decoration ewram * deco -> decor
2017-10-23 00:55:07 +02:00
#include "main.h"
2017-10-12 09:06:19 +02:00
struct UnkPlayerStruct
{
u8 player_field_0;
u8 player_field_1;
};
struct LinkPlayerMapObject
{
u8 active;
u8 linkPlayerId;
u8 mapObjId;
u8 mode;
};
struct UCoords32
{
u32 x, y;
};
extern struct LinkPlayerMapObject gLinkPlayerMapObjects[4];
Decoration + decoration_inventory (#89) * SetDecorationInventoriesPointers * ClearDecorationInventories * CheckHasDecoration * DecorationAdd * DecorationCheckSpace * DecorationRemove * sub_8161A38 * CountDecorations; Funcion renaming * Disassemble decoration data structs, tilemaps, and descriptions * sub_8126968 * sub_81269D4 * through sub_8126A88 * through sub_8126B2C * sub_8126B80 * sub_8126C08 * sub_8126C48 * sub_8126CA4 * sub_8126D10 * sub_8126E44 * sub_8126E8C * sub_8126F68 * sub_8127058 * sub_8127088 * sub_81270E8 * through sub_8127208 * through sub_8127268 * sub_8127284 * through sub_81272F8 * sub_8127330 * through sub_8127480 * sub_81274A0 * sub_8127500; makefile now tells scaninc to scan headers * Actual real fix to mapfile being in build/emerald instead of wd * through sub_812759C * through sub_812764C * through sub_8127744 * through sub_81277BC * sub_81277E8 * sub_8127814 * through sub_81279C4 * through sub_8127ACC * sub_8127B04 * sub_8127B54 * sub_8127B90 * sub_8127D38 * sub_8127E18 * sub_8127F68 * sub_8128060 * ConfigureCameraObjectForPlacingDecoration * SetUpPlacingDecorationPlayerAvatar * sub_812826C * through sub_8128414 * through sub_81284F4 * sub_812853C * sub_8128950 * through sub_8128AAC * through sub_8128BBC * c1_overworld_prev_quest * sub_8128C64 * sub_8128CD4 * sub_8128D10 * sub_8128DB4 * through sub_8128E18 * through sub_8129068 * sub_8129088 * through sub_81291E8 * sub_812925C * sub_81292D0 * sub_81292E8 * gpu_pal_decompress_alloc_tag_and_upload * AddDecorationIconObjectFromIconTable * GetDecorationIconPicOrPalette * AddDecorationIconObjectFromFieldObject * AddDecorationIconObject * through sub_8129708 * sub_81297F8 * sub_81298EC * SetUpPuttingAwayDecorationPlayerAvatar * sub_8129ABC * sub_8129B34 * sub_8129BCC * through sub_8129C74 * through sub_8129D8C * sub_8129E0C * sub_8129E74 * sub_8129F20 * sub_8129FC8 * sub_812A040 * nonmatching sub_812A0E8 * through sub_812A22C * sub_812A25C * sub_812A2C4 * through sub_812A39C * Remaining fns in decoration.s * Decompile decoration headers * Decompile all remaining decoration data that had already been disassembled * Disassemble two data objects * Suggest structure of list menu template * decompile through decoration list menu template * Disassemble decoration icon graphics table * Rip icon gfx * Decompile deco icon table * Decompile more data related to drawing decorations * Decompile gUnknown_085A7250 structs * Decompile two sprite templates * Decompile remaining data in decoration.s * Decompile decoration ewram * deco -> decor
2017-10-23 00:55:07 +02:00
extern MainCallback gFieldCallback;
2017-10-12 09:06:19 +02:00
2018-02-12 15:01:43 +01:00
void DoWhiteOut(void);
void Overworld_ResetStateAfterFly(void);
void Overworld_ResetStateAfterTeleport(void);
void Overworld_ResetStateAfterDigEscRope(void);
void sub_8084788(void);
void ResetGameStats(void);
void IncrementGameStat(u8 index);
u32 GetGameStat(u8 index);
void SetGameStat(u8 index, u32 value);
void ApplyNewEncryptionKeyToGameStats(u32 newKey);
void LoadMapObjTemplatesFromHeader(void);
void LoadSaveblockMapObjScripts(void);
void Overworld_SetMapObjTemplateCoords(u8 localId, s16 x, s16 y);
void Overworld_SetMapObjTemplateMovementType(u8 localId, u8 movementType);
void mapdata_load_assets_to_gpu_and_full_redraw(void);
struct MapData *get_mapdata_header(void);
void ApplyCurrentWarp(void);
void set_warp2_warp3_to_neg_1(void);
void SetWarpData(struct WarpData *warp, s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y);
bool32 warp_data_is_not_neg_1(struct WarpData *warp);
struct MapHeader *const Overworld_GetMapHeaderByGroupAndId(u16 mapGroup, u16 mapNum);
struct MapHeader *const warp1_get_mapheader(void);
void set_current_map_header_from_sav1_save_old_name(void);
void LoadSaveblockMapHeader(void);
void update_camera_pos_from_warpid(void);
void warp_in(void);
void Overworld_SetWarpDestination(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y);
void warp1_set_2(s8 mapGroup, s8 mapNum, s8 warpId);
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 copy_saved_warp2_bank_and_enter_x_to_warp1(u8 unused);
void sub_8084CCC(u8 a1);
void Overworld_SetWarpDestToLastHealLoc(void);
void Overworld_SetHealLocationWarp(u8 healLocationId);
void sub_8084D5C(s16 a1, s16 a2);
void sub_8084DD4(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y);
// to erase later
2018-02-12 18:26:26 +01:00
bool32 Overworld_IsBikingAllowed(void);
u8 sub_808532C(struct UnkPlayerStruct *playerStruct, u16 a2, u8 a3);
u8 sub_808538C(struct UnkPlayerStruct *playerStruct, u8 a2, u16 a3, u8 a4);
u16 cur_mapdata_block_role_at_screen_center_acc_to_sav1(void);
bool8 Overworld_MapTypeIsIndoors(u8 mapType);
void SetDefaultFlashLevel(void);
void Overworld_ClearSavedMusic(void);
void sub_8085810(void);
2018-02-12 15:01:43 +01:00
u8 GetMapTypeByGroupAndId(s8 mapGroup, s8 mapNum);
u8 Overworld_GetMapTypeOfSaveblockLocation(void);
2017-10-12 09:06:19 +02:00
void Overworld_SetMapObjTemplateCoords(u8, s16, s16);
void Overworld_SetMapObjTemplateMovementType(u8, u8);
void Overworld_SetWarpDestination(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y);
2017-10-25 03:27:46 +02:00
void saved_warp2_set(int unused, s8 mapGroup, s8 mapNum, s8 warpId);
2017-10-12 09:06:19 +02:00
void saved_warp2_set_2(int unused, 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);
void sub_8084E80(s8, s8, s8, s8, s8);
void sub_8084EBC(s16, s16);
void player_avatar_init_params_reset(void);
2018-01-02 02:21:30 +01:00
bool8 Overworld_MapTypeAllowsTeleportAndFly(u8 mapType);
void Overworld_ResetStateAfterTeleport(void);
2017-10-12 09:06:19 +02:00
void Overworld_SetFlashLevel(s32 a1);
//u8 Overworld_GetFlashLevel(void);
void sub_8085524(u16);
void Overworld_SetSavedMusic(u16);
void Overworld_ChangeMusicToDefault(void);
void Overworld_ChangeMusicTo(u16);
bool32 is_c1_link_related_active(void);
2017-11-10 03:48:27 +01:00
extern u16 gUnknown_03005DA8;
2017-10-12 09:06:19 +02:00
void strange_npc_table_clear(void);
void FieldObjectMoveDestCoords(struct MapObject *, u32, s16 *, s16 *);
void sub_8086230(void);
void c2_exit_to_overworld_2_switch(void);
2017-10-14 15:52:56 +02:00
bool32 sub_8087598(void);
2017-10-12 09:06:19 +02:00
void c2_exit_to_overworld_1_continue_scripts_restart_music(void);
Decoration + decoration_inventory (#89) * SetDecorationInventoriesPointers * ClearDecorationInventories * CheckHasDecoration * DecorationAdd * DecorationCheckSpace * DecorationRemove * sub_8161A38 * CountDecorations; Funcion renaming * Disassemble decoration data structs, tilemaps, and descriptions * sub_8126968 * sub_81269D4 * through sub_8126A88 * through sub_8126B2C * sub_8126B80 * sub_8126C08 * sub_8126C48 * sub_8126CA4 * sub_8126D10 * sub_8126E44 * sub_8126E8C * sub_8126F68 * sub_8127058 * sub_8127088 * sub_81270E8 * through sub_8127208 * through sub_8127268 * sub_8127284 * through sub_81272F8 * sub_8127330 * through sub_8127480 * sub_81274A0 * sub_8127500; makefile now tells scaninc to scan headers * Actual real fix to mapfile being in build/emerald instead of wd * through sub_812759C * through sub_812764C * through sub_8127744 * through sub_81277BC * sub_81277E8 * sub_8127814 * through sub_81279C4 * through sub_8127ACC * sub_8127B04 * sub_8127B54 * sub_8127B90 * sub_8127D38 * sub_8127E18 * sub_8127F68 * sub_8128060 * ConfigureCameraObjectForPlacingDecoration * SetUpPlacingDecorationPlayerAvatar * sub_812826C * through sub_8128414 * through sub_81284F4 * sub_812853C * sub_8128950 * through sub_8128AAC * through sub_8128BBC * c1_overworld_prev_quest * sub_8128C64 * sub_8128CD4 * sub_8128D10 * sub_8128DB4 * through sub_8128E18 * through sub_8129068 * sub_8129088 * through sub_81291E8 * sub_812925C * sub_81292D0 * sub_81292E8 * gpu_pal_decompress_alloc_tag_and_upload * AddDecorationIconObjectFromIconTable * GetDecorationIconPicOrPalette * AddDecorationIconObjectFromFieldObject * AddDecorationIconObject * through sub_8129708 * sub_81297F8 * sub_81298EC * SetUpPuttingAwayDecorationPlayerAvatar * sub_8129ABC * sub_8129B34 * sub_8129BCC * through sub_8129C74 * through sub_8129D8C * sub_8129E0C * sub_8129E74 * sub_8129F20 * sub_8129FC8 * sub_812A040 * nonmatching sub_812A0E8 * through sub_812A22C * sub_812A25C * sub_812A2C4 * through sub_812A39C * Remaining fns in decoration.s * Decompile decoration headers * Decompile all remaining decoration data that had already been disassembled * Disassemble two data objects * Suggest structure of list menu template * decompile through decoration list menu template * Disassemble decoration icon graphics table * Rip icon gfx * Decompile deco icon table * Decompile more data related to drawing decorations * Decompile gUnknown_085A7250 structs * Decompile two sprite templates * Decompile remaining data in decoration.s * Decompile decoration ewram * deco -> decor
2017-10-23 00:55:07 +02:00
void warp_in(void);
2017-10-31 02:08:28 +01:00
u8 get_map_light_level_by_bank_and_number(s8 mapGroup, s8 mapNum);
2017-11-01 03:34:12 +01:00
void sub_8086194(void);
void sub_8084CCC(u8 spawn);
2017-10-25 03:10:58 +02:00
void warp1_set_2(s8 mapGroup, s8 mapNum, s8 warpNum);
2017-10-25 03:27:46 +02:00
void c2_load_new_map(void);
2017-10-25 14:34:41 +02:00
void copy_saved_warp2_bank_and_enter_x_to_warp1(u8 unused);
void mapldr_default(void);
2018-01-29 15:55:34 +01:00
u8 get_map_light_from_warp0(void);
bool8 is_light_level_1_2_3_5_or_6(u8 a1);
2017-11-13 07:01:27 +01:00
bool32 sub_80875C8(void);
bool32 sub_8087634(void);
bool32 sub_808766C(void);
2017-12-05 18:55:48 +01:00
void IncrementGameStat(u8);
u32 GetGameStat(u8);
2018-01-01 17:41:34 +01:00
void CB2_OverworldBasic(void);
2017-10-12 09:06:19 +02:00
#endif //GUARD_ROM4_H