summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/constants/flags.h3
-rw-r--r--include/event_data.h1
-rw-r--r--include/event_scripts.h4
-rw-r--r--include/field_camera.h1
-rw-r--r--include/field_message_box.h1
-rw-r--r--include/field_screen_effect.h2
-rw-r--r--include/field_specials.h2
-rw-r--r--include/field_weather.h1
-rw-r--r--include/fieldmap.h7
-rw-r--r--include/global.fieldmap.h19
-rw-r--r--include/global.h4
-rw-r--r--include/heal_location.h2
-rw-r--r--include/m4a.h2
-rw-r--r--include/metatile_behavior.h2
-rw-r--r--include/overworld.h36
-rw-r--r--include/quest_log.h20
-rw-r--r--include/script.h4
-rw-r--r--include/vs_seeker.h1
18 files changed, 67 insertions, 45 deletions
diff --git a/include/constants/flags.h b/include/constants/flags.h
index 6fd532a0e..212718bc9 100644
--- a/include/constants/flags.h
+++ b/include/constants/flags.h
@@ -1319,6 +1319,7 @@
#define FLAG_SYS_SAFARI_MODE (SYS_FLAGS + 0x0)
#define FLAG_SYS_VS_SEEKER_CHARGING (SYS_FLAGS + 0x1)
+#define FLAG_SYS_CRUISE_MODE (SYS_FLAGS + 0x2)
#define FLAG_SYS_WHITE_FLUTE_ACTIVE (SYS_FLAGS + 0x3)
#define FLAG_SYS_BLACK_FLUTE_ACTIVE (SYS_FLAGS + 0x4)
#define FLAG_SYS_USE_STRENGTH (SYS_FLAGS + 0x5)
@@ -1437,7 +1438,7 @@
#define SPECIAL_FLAGS_START 0x4000
#define SPECIAL_FLAGS_COUNT 16
#define FLAG_SPECIAL_FLAG_0x4000 0x4000
-#define FLAG_SPECIAL_FLAG_0x4001 0x4001
+#define FLAG_DONT_TRANSITION_MUSIC 0x4001
#define FLAG_SPECIAL_FLAG_0x4002 0x4002
#define FLAG_SPECIAL_FLAG_0x4003 0x4003
#define FLAG_SPECIAL_FLAG_0x4004 0x4004
diff --git a/include/event_data.h b/include/event_data.h
index e635cbc6d..269762b23 100644
--- a/include/event_data.h
+++ b/include/event_data.h
@@ -58,5 +58,6 @@ void ResetMysteryEventFlags(void);
void ResetMysteryEventVars(void);
bool32 IsNationalPokedexEnabled(void);
void sub_806E190(void);
+void ClearTempFieldEventData(void);
#endif // GUARD_EVENT_DATA_H
diff --git a/include/event_scripts.h b/include/event_scripts.h
index 9b78854fa..add2da0d1 100644
--- a/include/event_scripts.h
+++ b/include/event_scripts.h
@@ -1259,4 +1259,8 @@ extern const u8 EventScript_FieldPoison[];
extern const u8 EventScript_EggHatch[];
extern const u8 EventScript_1C1361[];
+// overworld
+
+extern const u8 EventScript_ResetEliteFourEnd[];
+
#endif //GUARD_EVENT_SCRIPTS_H
diff --git a/include/field_camera.h b/include/field_camera.h
index 2d1ce2ce9..9c23bb774 100644
--- a/include/field_camera.h
+++ b/include/field_camera.h
@@ -31,5 +31,6 @@ void SetCameraPanning(s16 x, s16 y);
void UpdateCameraPanning(void);
void InstallCameraPanAheadCallback(void);
void DrawDoorMetatileAt(int x, int y, const u16 *data);
+void move_tilemap_camera_to_upper_left_corner(void);
#endif //GUARD_FIELD_CAMERA_H
diff --git a/include/field_message_box.h b/include/field_message_box.h
index a6ef14aae..b822fb8f7 100644
--- a/include/field_message_box.h
+++ b/include/field_message_box.h
@@ -9,5 +9,6 @@ bool8 ShowFieldAutoScrollMessage(const u8 *message);
void HideFieldMessageBox(void);
bool8 IsFieldMessageBoxHidden(void);
bool8 textbox_any_visible(void);
+void sub_8069348(void);
#endif // GUARD_FIELD_MESSAGE_BOX_H
diff --git a/include/field_screen_effect.h b/include/field_screen_effect.h
index aee7dc5a7..a15d99120 100644
--- a/include/field_screen_effect.h
+++ b/include/field_screen_effect.h
@@ -11,4 +11,6 @@ void DoOutwardBarnDoorWipe(void);
void Task_BarnDoorWipe(u8 taskId);
void sub_807F5F0(void);
+extern const s32 gMaxFlashLevel;
+
#endif // GUARD_FIELD_SCREEN_EFFECT_H
diff --git a/include/field_specials.h b/include/field_specials.h
index 9c44c35bc..cc51eea87 100644
--- a/include/field_specials.h
+++ b/include/field_specials.h
@@ -31,5 +31,7 @@ void CutMoveOpenDottedHoleDoor(void);
void RunMassageCooldownStepCounter(void);
void IncrementResortGorgeousStepCounter(void);
void IncrementBirthIslandRockStepCount(void);
+void ResetCyclingRoadChallengeData(void);
+void ResetFieldTasksArgs(void);
#endif // GUARD_FIELD_SPECIALS_H
diff --git a/include/field_weather.h b/include/field_weather.h
index 432c8c100..44d9e5268 100644
--- a/include/field_weather.h
+++ b/include/field_weather.h
@@ -143,6 +143,7 @@ void sub_807AC98(void);
void SetRainStrengthFromSoundEffect(u16 soundEffect);
void sub_807A790(s8 gammaIndex);
void sub_807A7C4(u8 gammaIndex, u8 gammaTargetIndex, u8 gammaStepDelay);
+void ApplyWeatherGammaShiftToPal(u8 paletteIndex);
extern const u16 gCloudsWeatherPalette[];
extern const u16 gSandstormWeatherPalette[];
diff --git a/include/fieldmap.h b/include/fieldmap.h
index cc4a0f7ed..1971104fc 100644
--- a/include/fieldmap.h
+++ b/include/fieldmap.h
@@ -24,7 +24,7 @@ void GetCameraCoords(u16*, u16*);
bool8 MapGridIsImpassableAt(s32, s32);
s32 GetMapBorderIdAt(s32, s32);
bool32 CanCameraMoveInDirection(s32);
-u32 GetBehaviorByMetatileIdAndMapLayout(struct MapLayout *mapLayout, u16 metatile, u8 attr);
+u32 GetBehaviorByMetatileIdAndMapLayout(const struct MapLayout *mapLayout, u16 metatile, u8 attr);
const struct MapHeader * mapconnection_get_mapheader(struct MapConnection * connection);
struct MapConnection * GetMapConnectionAtPos(s16 x, s16 y);
void sub_8059948(u8 a0, u8 a1);
@@ -34,5 +34,10 @@ u32 GetMetatileAttributeFromRawMetatileBehavior(u32 original, u8 bit);
u32 MapGridGetMetatileAttributeAt(s16 x, s16 y, u8 attr);
void MapGridSetMetatileImpassabilityAt(s32 x, s32 y, bool32 arg2);
bool8 CameraMove(s32 x, s32 y);
+void copy_map_tileset1_tileset2_to_vram(struct MapLayout const * mapLayout);
+void apply_map_tileset1_tileset2_palette(struct MapLayout const * mapLayout);
+void InitMap(void);
+void copy_map_tileset2_to_vram_2(const struct MapLayout * mapLayout);
+void apply_map_tileset2_palette(const struct MapLayout * mapLayout);
#endif //GUARD_FIELDMAP_H
diff --git a/include/global.fieldmap.h b/include/global.fieldmap.h
index 1858d3344..0d45a6d68 100644
--- a/include/global.fieldmap.h
+++ b/include/global.fieldmap.h
@@ -185,22 +185,31 @@ struct MapConnections
struct MapHeader
{
- /* 0x00 */ struct MapLayout *mapLayout;
- /* 0x04 */ struct MapEvents *events;
- /* 0x08 */ u8 *mapScripts;
- /* 0x0C */ struct MapConnections *connections;
+ /* 0x00 */ const struct MapLayout *mapLayout;
+ /* 0x04 */ const struct MapEvents *events;
+ /* 0x08 */ const u8 *mapScripts;
+ /* 0x0C */ const struct MapConnections *connections;
/* 0x10 */ u16 music;
/* 0x12 */ u16 mapLayoutId;
/* 0x14 */ u8 regionMapSectionId;
/* 0x15 */ u8 cave;
/* 0x16 */ u8 weather;
/* 0x17 */ u8 mapType;
- /* 0x18 */ u8 filler_18;
+ /* 0x18 */ u8 bikingAllowed;
/* 0x19 */ u8 escapeRope;
/* 0x1A */ s8 flags;
/* 0x1B */ u8 battleType;
};
+// Flags for gMapHeader.flags, as defined in the map_header_flags macro
+#define MAP_ALLOW_BIKE (1 << 0)
+#define MAP_ALLOW_ESCAPE_ROPE (1 << 1)
+#define MAP_ALLOW_RUN (1 << 2)
+#define MAP_SHOW_MAP_NAME (1 << 3)
+#define UNUSED_MAP_FLAGS (1 << 4 | 1 << 5 | 1 << 6 | 1 << 7)
+
+#define SHOW_MAP_NAME_ENABLED ((gMapHeader.flags & (MAP_SHOW_MAP_NAME | UNUSED_MAP_FLAGS)) == MAP_SHOW_MAP_NAME)
+
struct ObjectEvent
{
/*0x00*/ /* 0*/ u32 active:1;
diff --git a/include/global.h b/include/global.h
index b2fd67b4b..aa60be994 100644
--- a/include/global.h
+++ b/include/global.h
@@ -743,8 +743,8 @@ struct SaveBlock1
{
/*0x0000*/ struct Coords16 pos;
/*0x0004*/ struct WarpData location;
- /*0x000C*/ struct WarpData warp1;
- /*0x0014*/ struct WarpData warp2;
+ /*0x000C*/ struct WarpData continueGameWarp;
+ /*0x0014*/ struct WarpData dynamicWarp;
/*0x001C*/ struct WarpData lastHealLocation;
/*0x0024*/ struct WarpData escapeWarp;
/*0x002C*/ u16 savedMusic;
diff --git a/include/heal_location.h b/include/heal_location.h
index 9680f8fdd..2480d1723 100644
--- a/include/heal_location.h
+++ b/include/heal_location.h
@@ -11,7 +11,7 @@ struct HealLocation
s16 y;
};
-const struct HealLocation *GetHealLocationPointer(u32 loc);
+const struct HealLocation *GetHealLocation(u32 loc);
void SetWhiteoutRespawnWarpAndHealerNpc(struct WarpData * warp);
#endif // GUARD_HEAL_LOCATION_H
diff --git a/include/m4a.h b/include/m4a.h
index ee23d917a..b67dd0492 100644
--- a/include/m4a.h
+++ b/include/m4a.h
@@ -25,4 +25,6 @@ void m4aMPlayFadeOutTemporarily(struct MusicPlayerInfo *mplayInfo, u16 speed);
void m4aMPlayFadeIn(struct MusicPlayerInfo *mplayInfo, u16 speed);
void m4aMPlayImmInit(struct MusicPlayerInfo *mplayInfo);
+extern const struct SongHeader mus_win_gym;
+
#endif //GUARD_M4A_H
diff --git a/include/metatile_behavior.h b/include/metatile_behavior.h
index a5f5a81b7..899586e0f 100644
--- a/include/metatile_behavior.h
+++ b/include/metatile_behavior.h
@@ -24,7 +24,7 @@ bool8 MetatileBehavior_IsUnknownWarp6F(u8 metatileBehavior);
bool8 MetatileBehavior_IsUnknownWarp6C_to_6F(u8 metatileBehavior);
bool8 MetatileBehavior_IsLadder(u8 metatileBehavior);
bool8 MetatileBehavior_IsNonAnimDoor(u8 metatileBehavior);
-bool8 MetatileBehavior_ReturnFalse_2(u8 metatileBehavior);
+bool8 MetatileBehavior_IsDeepSouthWarp(u8 metatileBehavior);
bool8 MetatileBehavior_IsSurfable(u8 metatileBehavior);
bool8 MetatileBehavior_IsSemiDeepWater(u8 metatileBehavior);
bool8 MetatileBehavior_IsEastArrowWarp(u8 metatileBehavior);
diff --git a/include/overworld.h b/include/overworld.h
index 730df3667..b0311c51c 100644
--- a/include/overworld.h
+++ b/include/overworld.h
@@ -53,13 +53,13 @@ struct CreditsOverworldCmd
#define MUSIC_DISABLE_STOP 1
#define MUSIC_DISABLE_KEEP 2
-extern struct UCoords32 gDirectionToVectors[];
+extern const struct UCoords32 gDirectionToVectors[];
extern struct LinkPlayerObjectEvent gLinkPlayerObjectEvents[4];
extern MainCallback gFieldCallback;
-extern struct WarpData gUnknown_2031DB4;
-extern struct WarpData gUnknown_2031DBC;
+extern struct WarpData gLastUsedWarp;
+extern struct WarpData sWarpDestination;
extern u8 gUnknown_2031DE0;
extern u8 gFieldLinkPlayerCount;
@@ -68,7 +68,7 @@ extern u8 gLocalLinkPlayerId;
void IncrementGameStat(u8 index);
void Overworld_SetMapObjTemplateCoords(u8, s16, s16);
-void Overworld_SetMapObjTemplateMovementType(u8, u8);
+void Overworld_SetObjEventTemplateMovementType(u8, u8);
void SetWarpDestination(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y);
@@ -82,8 +82,8 @@ 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 sub_80555E0(void);
-void copy_saved_warp3_bank_and_enter_x_to_warp1(void);
+void SetWarpDestinationToEscapeWarp(void);
+void SetWarpDestinationToLastHealLocation(void);
u8 IsMapTypeOutdoors(u8 mapType);
void Overworld_ClearSavedMusic(void);
bool32 sub_8056124(u16 song);
@@ -100,14 +100,14 @@ void Overworld_ChangeMusicTo(u16);
bool32 IsUpdateLinkStateCBActive(void);
void ClearLinkPlayerObjectEvents(void);
-const struct MapHeader *Overworld_GetMapHeaderByGroupAndId(u16, u16);
+const struct MapHeader *const Overworld_GetMapHeaderByGroupAndId(u16, u16);
void ObjectEventMoveDestCoords(struct ObjectEvent *, u32, s16 *, s16 *);
void sub_8086230(void);
void CB2_ReturnToField(void);
bool32 sub_8087598(void);
void CB2_ReturnToFieldContinueScriptPlayMapMusic(void);
void WarpIntoMap(void);
-u8 get_map_light_level_by_bank_and_number(s8 mapGroup, s8 mapNum);
+u8 GetMapTypeByGroupAndId(s8 mapGroup, s8 mapNum);
void sub_8086194(void);
void sub_8084CCC(u8 spawn);
void SetWarpDestinationToMapWarp(s8 mapGroup, s8 mapNum, s8 warpNum);
@@ -116,7 +116,7 @@ void SetWarpDestinationToDynamicWarp(u8 unused);
void mapldr_default(void);
u32 GetGameStat(u8 statId);
-u32 SetGameStat(u8 statId, u32 value);
+void SetGameStat(u8 statId, u32 value);
void CB2_ContinueSavedGame(void);
void sub_8055D5C(struct WarpData *);
@@ -141,7 +141,7 @@ extern u8 gUnknown_2036E28;
extern bool8 (* gFieldCallback2)(void);
void SetLastHealLocationWarp(u8 healLocaionId);
-void sub_8055864(u8 mapGroup, u8 mapNum);
+void LoadMapFromCameraTransition(u8 mapGroup, u8 mapNum);
void CB2_Overworld(void);
void CB2_OverworldBasic(void);
void CB2_NewGame(void);
@@ -153,13 +153,13 @@ void Overworld_FadeOutMapMusic(void);
void CB2_LoadMap(void);
bool8 BGMusicStopped(void);
bool8 IsMapTypeIndoors(u8 mapType);
-bool32 sub_8055C9C(void);
+bool32 Overworld_IsBikingAllowed(void);
void Overworld_ResetStateAfterDigEscRope(void);
bool32 sub_8058244(void);
u8 GetCurrentMapType(void);
u8 GetLastUsedWarpMapType(void);
-const struct MapHeader *warp1_get_mapheader(void);
+const struct MapHeader *const GetDestinationWarpMapHeader(void);
void TryFadeOutOldMapMusic(void);
void CB2_ReturnToFieldCableClub(void);
void ResetGameStats(void);
@@ -172,19 +172,19 @@ bool32 sub_8058318(void);
void CB2_ReturnToFieldWithOpenMenu(void);
void CB2_WhiteOut(void);
void c2_8056854(void);
-void sub_8054F38(u32 newKey);
-void sub_8055778(int);
+void ApplyNewEncryptionKeyToGameStats(u32 newKey);
+void SetContinueGameWarpToDynamicWarp(int);
-void sub_8055738(u8 loc);
+void SetContinueGameWarpToHealLocation(u8 loc);
-void sub_8056078(void *, void *);
-void sub_805546C(u8 a0);
+void UpdateAmbientCry(s16 *state, u16 *delayCounter);
+void SetWarpDestinationToHealLocation(u8 a0);
bool32 sub_80582E0(void);
bool32 sub_8058274(void);
u8 GetCurrentMapBattleScene(void);
void Overworld_ResetStateAfterFly(void);
bool8 sub_8055B38(u16 metatileBehavior);
-void sub_8055DB8(void);
+void Overworld_ResetMapMusic(void);
void sub_8057F5C(void);
void sub_8057F34(void);
u32 sub_8057EC0(void);
diff --git a/include/quest_log.h b/include/quest_log.h
index 28c69505b..a353cf709 100644
--- a/include/quest_log.h
+++ b/include/quest_log.h
@@ -4,23 +4,10 @@
#include "global.h"
#include "quest_log_battle.h"
#include "constants/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;
-};
+#include "field_control_avatar.h"
extern u8 gQuestLogState;
extern u8 gUnknown_3005E88;
-extern u16 sNumEventsInLogEntry;
-extern struct UnkStruct_3005E90 gUnknown_3005E90;
-extern struct QuestLogEntry * sCurQuestLogEntry;
extern const u16 gUnknown_84566A8[];
void sub_8112720(u8);
@@ -59,5 +46,10 @@ void sub_8112628(u8 movementActionId);
void sub_81126AC(u8 movementActionId, u8 duration);
void sub_8112588(u8 localId, u8 mapNum, u8 mapGroup, u8 movementActionId, u8 duration);
void sub_8112C9C(void);
+void sub_8110920(void);
+void sub_8111708(void);
+void sub_81127F8(struct FieldInput * a0);
+void sub_8112B3C(void);
+void RunQuestLogCB(void);
#endif //GUARD_QUEST_LOG_H
diff --git a/include/script.h b/include/script.h
index 3dd91ca59..48b169ef1 100644
--- a/include/script.h
+++ b/include/script.h
@@ -49,10 +49,10 @@ u8 *mapheader_get_tagged_pointer(u8 tag);
void mapheader_run_script_by_tag(u8 tag);
u8 *mapheader_get_first_match_from_tagged_ptr_list(u8 tag);
void RunOnLoadMapScript(void);
-void mapheader_run_script_with_tag_x3(void);
+void RunOnTransitionMapScript(void);
void mapheader_run_script_with_tag_x5(void);
void mapheader_run_script_with_tag_x7(void);
-void mapheader_run_script_with_tag_x6(void);
+void RunOnDiveWarpMapScript(void);
bool8 TryRunOnFrameMapScript(void);
void mapheader_run_first_tag4_script_list_match(void);
u32 CalculateRamScriptChecksum(void);
diff --git a/include/vs_seeker.h b/include/vs_seeker.h
index d80e558ea..8c3b86194 100644
--- a/include/vs_seeker.h
+++ b/include/vs_seeker.h
@@ -15,5 +15,6 @@ u8 sub_810CF54();
void sub_810D0D0(void);
void sub_810CB90(void);
bool8 sub_810C4EC(void);
+void TryUpdateRandomTrainerRematches(u16 mapGroup, u16 mapNum);
#endif //GUARD_VS_SEEKER_H