2018-02-14 00:58:22 +01:00
|
|
|
#ifndef GUARD_OVERWORLD_H
|
|
|
|
#define GUARD_OVERWORLD_H
|
2017-10-23 00:55:07 +02:00
|
|
|
|
2018-09-05 00:31:37 +02:00
|
|
|
struct InitialPlayerAvatarState
|
2017-10-12 09:06:19 +02:00
|
|
|
{
|
2018-09-05 00:31:37 +02:00
|
|
|
u8 transitionFlags;
|
|
|
|
u8 direction;
|
2017-10-12 09:06:19 +02:00
|
|
|
};
|
|
|
|
|
2018-06-12 02:11:48 +02:00
|
|
|
struct LinkPlayerEventObject
|
2017-10-12 09:06:19 +02:00
|
|
|
{
|
|
|
|
u8 active;
|
|
|
|
u8 linkPlayerId;
|
2018-06-12 02:11:48 +02:00
|
|
|
u8 eventObjId;
|
2017-10-12 09:06:19 +02:00
|
|
|
u8 mode;
|
|
|
|
};
|
|
|
|
|
2018-04-18 14:12:41 +02:00
|
|
|
// Exported RAM declarations
|
2018-09-05 00:31:37 +02:00
|
|
|
extern struct WarpData gLastUsedWarp;
|
2018-06-12 02:11:48 +02:00
|
|
|
extern struct LinkPlayerEventObject gLinkPlayerEventObjects[4];
|
2018-02-14 00:58:22 +01:00
|
|
|
|
2018-04-18 14:12:41 +02:00
|
|
|
extern u16 *gBGTilemapBuffers1;
|
|
|
|
extern u16 *gBGTilemapBuffers2;
|
|
|
|
extern u16 *gBGTilemapBuffers3;
|
2018-11-19 17:16:01 +01:00
|
|
|
extern u16 gUnknown_03005DA8;
|
2018-05-11 01:36:57 +02:00
|
|
|
extern void (*gFieldCallback)(void);
|
2018-11-19 17:16:01 +01:00
|
|
|
extern bool8 (*gFieldCallback2)(void);
|
2018-10-13 19:41:10 +02:00
|
|
|
extern u8 gUnknown_03005DB4;
|
|
|
|
extern u8 gFieldLinkPlayerCount;
|
|
|
|
|
2018-04-18 14:12:41 +02:00
|
|
|
// Exported ROM declarations
|
2018-09-05 00:31:37 +02:00
|
|
|
extern const struct UCoords32 gDirectionToVectors[];
|
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 ResetGameStats(void);
|
|
|
|
void IncrementGameStat(u8 index);
|
|
|
|
u32 GetGameStat(u8 index);
|
|
|
|
void SetGameStat(u8 index, u32 value);
|
|
|
|
void ApplyNewEncryptionKeyToGameStats(u32 newKey);
|
2018-06-12 02:11:48 +02:00
|
|
|
void LoadEventObjTemplatesFromHeader(void);
|
|
|
|
void LoadSaveblockEventObjScripts(void);
|
|
|
|
void Overworld_SetEventObjTemplateCoords(u8 localId, s16 x, s16 y);
|
|
|
|
void Overworld_SetEventObjTemplateMovementType(u8 localId, u8 movementType);
|
2018-06-21 00:41:51 +02:00
|
|
|
const struct MapLayout *GetMapLayout(void);
|
2018-02-12 15:01:43 +01:00
|
|
|
void ApplyCurrentWarp(void);
|
|
|
|
void set_warp2_warp3_to_neg_1(void);
|
2018-05-09 12:07:56 +02:00
|
|
|
struct MapHeader const *const Overworld_GetMapHeaderByGroupAndId(u16 mapGroup, u16 mapNum);
|
2018-09-05 00:31:37 +02:00
|
|
|
struct MapHeader const *const GetDestinationWarpMapHeader(void);
|
|
|
|
void WarpIntoMap(void);
|
2018-02-12 15:01:43 +01:00
|
|
|
void Overworld_SetWarpDestination(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y);
|
|
|
|
void warp1_set_2(s8 mapGroup, s8 mapNum, s8 warpId);
|
2018-02-14 00:58:22 +01:00
|
|
|
void saved_warp2_set(s32 unused, s8 mapGroup, s8 mapNum, s8 warpId);
|
|
|
|
void saved_warp2_set_2(s32 unused, s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y);
|
2018-02-12 15:01:43 +01:00
|
|
|
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);
|
2018-02-14 00:58:22 +01:00
|
|
|
void sub_8084E14(void);
|
2018-09-05 00:31:37 +02:00
|
|
|
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 SetFixedHoleWarpAsDestination(s16 x, s16 y);
|
2018-02-14 00:58:22 +01:00
|
|
|
void warp1_set_to_sav1w(void);
|
|
|
|
void sub_8084F2C(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y);
|
|
|
|
void sub_8084F6C(u8 a1);
|
2018-11-18 19:37:18 +01:00
|
|
|
void sub_8084FAC(int unused);
|
2018-02-14 00:58:22 +01:00
|
|
|
const struct MapConnection *GetMapConnection(u8 dir);
|
2018-09-05 00:31:37 +02:00
|
|
|
bool8 SetDiveWarpEmerge(u16 x, u16 y);
|
|
|
|
bool8 SetDiveWarpDive(u16 x, u16 y);
|
2018-02-14 00:58:22 +01:00
|
|
|
void mliX_load_map(u8 mapGroup, u8 mapNum);
|
2018-09-05 00:31:37 +02:00
|
|
|
void ResetInitialPlayerAvatarState(void);
|
|
|
|
void StoreInitialPlayerAvatarState(void);
|
2018-02-12 18:26:26 +01:00
|
|
|
bool32 Overworld_IsBikingAllowed(void);
|
|
|
|
void SetDefaultFlashLevel(void);
|
2018-02-14 00:58:22 +01:00
|
|
|
void Overworld_SetFlashLevel(s32 flashLevel);
|
|
|
|
u8 Overworld_GetFlashLevel(void);
|
2018-06-21 00:41:51 +02:00
|
|
|
void sub_8085524(u16 mapLayoutId);
|
2018-02-14 00:58:22 +01:00
|
|
|
void sub_8085540(u8 var);
|
|
|
|
u8 sub_808554C(void);
|
|
|
|
u16 GetLocationMusic(struct WarpData *warp);
|
|
|
|
u16 GetCurrLocationDefaultMusic(void);
|
|
|
|
u16 GetWarpDestinationMusic(void);
|
|
|
|
void Overworld_ResetMapMusic(void);
|
|
|
|
void Overworld_PlaySpecialMapMusic(void);
|
|
|
|
void Overworld_SetSavedMusic(u16 songNum);
|
2018-02-12 18:26:26 +01:00
|
|
|
void Overworld_ClearSavedMusic(void);
|
2018-02-14 00:58:22 +01:00
|
|
|
void Overworld_ChangeMusicToDefault(void);
|
|
|
|
void Overworld_ChangeMusicTo(u16 newMusic);
|
|
|
|
u8 GetMapMusicFadeoutSpeed(void);
|
|
|
|
void music_something(void);
|
2018-09-05 00:31:37 +02:00
|
|
|
bool8 BGMusicStopped(void);
|
2018-02-14 00:58:22 +01:00
|
|
|
void Overworld_FadeOutMapMusic(void);
|
|
|
|
void UpdateAmbientCry(s16 *state, u16 *delayCounter);
|
2018-02-12 15:01:43 +01:00
|
|
|
u8 GetMapTypeByGroupAndId(s8 mapGroup, s8 mapNum);
|
2018-02-14 00:58:22 +01:00
|
|
|
u8 GetMapTypeByWarpData(struct WarpData *warp);
|
2018-02-12 15:01:43 +01:00
|
|
|
u8 Overworld_GetMapTypeOfSaveblockLocation(void);
|
2018-10-17 02:11:44 +02:00
|
|
|
u8 GetLastUsedWarpMapType(void);
|
2018-05-11 01:36:57 +02:00
|
|
|
bool8 is_map_type_1_2_3_5_or_6(u8 mapType);
|
2018-01-02 02:21:30 +01:00
|
|
|
bool8 Overworld_MapTypeAllowsTeleportAndFly(u8 mapType);
|
2018-02-14 00:58:22 +01:00
|
|
|
bool8 Overworld_MapTypeIsIndoors(u8 mapType);
|
|
|
|
u8 sav1_saved_warp2_map_get_name(void);
|
|
|
|
u8 sav1_map_get_name(void);
|
|
|
|
u8 GetCurrentMapBattleScene(void);
|
|
|
|
void overworld_free_bg_tilemaps(void);
|
2017-10-12 09:06:19 +02:00
|
|
|
bool32 is_c1_link_related_active(void);
|
2018-02-14 00:58:22 +01:00
|
|
|
void CB1_Overworld(void);
|
|
|
|
void CB2_OverworldBasic(void);
|
|
|
|
void CB2_Overworld(void);
|
|
|
|
void SetMainCallback1(void (*cb)(void));
|
|
|
|
void sub_8085E94(void *a0);
|
|
|
|
void CB2_NewGame(void);
|
|
|
|
void CB2_WhiteOut(void);
|
|
|
|
void CB2_LoadMap(void);
|
|
|
|
void sub_8086024(void);
|
|
|
|
void sub_8086074(void);
|
|
|
|
void CB2_ReturnToField(void);
|
|
|
|
void CB2_ReturnToFieldLocal(void);
|
|
|
|
void CB2_ReturnToFieldLink(void);
|
|
|
|
void c2_8056854(void);
|
|
|
|
void CB2_ReturnToFieldWithOpenMenu(void);
|
|
|
|
void CB2_ReturnToFieldContinueScript(void);
|
2018-07-25 06:18:23 +02:00
|
|
|
void CB2_ReturnToFieldContinueScriptPlayMapMusic(void);
|
2018-02-14 00:58:22 +01:00
|
|
|
void sub_80861E8(void);
|
|
|
|
void CB2_ContinueSavedGame(void);
|
|
|
|
void sub_8086C2C(void);
|
|
|
|
u32 sub_8087214(void);
|
|
|
|
bool32 sub_808727C(void);
|
|
|
|
u16 sub_8087288(void);
|
|
|
|
u16 sub_808729C(void);
|
|
|
|
u16 sub_80872B0(void);
|
|
|
|
u16 sub_80872C4(void);
|
2017-10-14 15:52:56 +02:00
|
|
|
bool32 sub_8087598(void);
|
2017-11-13 07:01:27 +01:00
|
|
|
bool32 sub_80875C8(void);
|
|
|
|
bool32 sub_8087634(void);
|
|
|
|
bool32 sub_808766C(void);
|
2018-06-14 00:51:26 +02:00
|
|
|
void ClearLinkPlayerEventObjects(void);
|
2018-01-01 17:41:34 +01:00
|
|
|
|
2018-02-14 00:58:22 +01:00
|
|
|
#endif // GUARD_OVERWORLD_H
|