summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPikalaxALT <PikalaxALT@users.noreply.github.com>2020-03-02 12:11:22 -0500
committerGitHub <noreply@github.com>2020-03-02 12:11:22 -0500
commitae08a402904b8c4069bdfba61f0af8f433083f91 (patch)
tree7bc8513f997cbf0ee4457df9341919b4e9eabe08 /include
parent5198a05272716990bcd98b9b216d3431adb25a3e (diff)
parent2d820809d74eaf4775ad0e2cc50e57bb65ed61a6 (diff)
Merge pull request #279 from PikalaxALT/field_effect
Field effect
Diffstat (limited to 'include')
-rw-r--r--include/constants/event_object_movement.h2
-rw-r--r--include/constants/field_effects.h4
-rw-r--r--include/data.h2
-rw-r--r--include/event_object_movement.h6
-rw-r--r--include/field_camera.h7
-rw-r--r--include/field_control_avatar.h1
-rw-r--r--include/field_effect.h16
-rw-r--r--include/field_effect_helpers.h1
-rw-r--r--include/field_effect_scripts.h6
-rw-r--r--include/field_fadetransition.h5
-rw-r--r--include/field_player_avatar.h1
-rw-r--r--include/field_screen_effect.h1
-rw-r--r--include/field_weather.h3
-rw-r--r--include/fldeff.h2
-rw-r--r--include/global.fieldmap.h11
-rw-r--r--include/overworld.h10
-rw-r--r--include/quest_log.h4
-rw-r--r--include/special_field_anim.h2
18 files changed, 57 insertions, 27 deletions
diff --git a/include/constants/event_object_movement.h b/include/constants/event_object_movement.h
index 08713a602..d2f0a945b 100644
--- a/include/constants/event_object_movement.h
+++ b/include/constants/event_object_movement.h
@@ -153,7 +153,7 @@
#define MOVEMENT_ACTION_PLAYER_RUN_UP_SLOW 0x42
#define MOVEMENT_ACTION_PLAYER_RUN_LEFT_SLOW 0x43
#define MOVEMENT_ACTION_PLAYER_RUN_RIGHT_SLOW 0x44
-#define MOVEMENT_ACTION_UNKNOWN_STEP_45 0x45
+#define MOVEMENT_ACTION_START_ANIM_IN_DIRECTION 0x45
#define MOVEMENT_ACTION_JUMP_SPECIAL_DOWN 0x46
#define MOVEMENT_ACTION_JUMP_SPECIAL_UP 0x47
#define MOVEMENT_ACTION_JUMP_SPECIAL_LEFT 0x48
diff --git a/include/constants/field_effects.h b/include/constants/field_effects.h
index c56c97d73..5aa885b37 100644
--- a/include/constants/field_effects.h
+++ b/include/constants/field_effects.h
@@ -66,9 +66,9 @@
#define FLDEFF_HALL_OF_FAME_RECORD 62
#define FLDEFF_USE_TELEPORT 63
#define FLDEFF_SMILEY_FACE_ICON 64
-#define FLDEFF_UNK_41 65 // TODO: related to vs_seeker
+#define FLDEFF_USE_VS_SEEKER 65
#define FLDEFF_DOUBLE_EXCL_MARK_ICON 66
-#define FLDEFF_UNK_43 67 // TODO: related to deoxys
+#define FLDEFF_MOVE_DEOXYS_ROCK 67
#define FLDEFF_UNK_44 68 // TODO: related to ???
#define FLDEFF_UNK_45 69 // TODO: related to fame checker photos
diff --git a/include/data.h b/include/data.h
index f308b044c..90c8e0ace 100644
--- a/include/data.h
+++ b/include/data.h
@@ -28,7 +28,7 @@ extern const struct MonCoords gMonFrontPicCoords[];
extern const struct CompressedSpriteSheet gMonFrontPicTable[];
extern const struct MonCoords gMonBackPicCoords[];
extern const struct CompressedSpriteSheet gMonBackPicTable[];
-extern const struct CompressedSpritePalette gMonPaletteTable[];
+extern struct CompressedSpritePalette gMonPaletteTable[];
extern const struct CompressedSpritePalette gMonShinyPaletteTable[];
extern const union AnimCmd *const *const gTrainerFrontAnimsPtrTable[];
extern const struct MonCoords gTrainerFrontPicCoords[];
diff --git a/include/event_object_movement.h b/include/event_object_movement.h
index baf66d737..edc5c8b11 100644
--- a/include/event_object_movement.h
+++ b/include/event_object_movement.h
@@ -41,7 +41,7 @@ void sub_808E16C(s16, s16);
void sub_808F28C(u8 localId, u8 mapNum, u8 mapGroup, u8 decorCat);
void sub_8092FF0(s16, s16, s16 *, s16 *);
u8 ObjectEventDirectionToImageAnimId(u8);
-void sub_80930E0(s16 *, s16 *, s16, s16);
+void sub_8063BC4(s16 *, s16 *, s16, s16);
void ObjectEventClearAnim(struct ObjectEvent *);
void ObjectEventClearAnimIfSpecialAnimActive(struct ObjectEvent *);
void SpawnObjectEventsInView(s16, s16);
@@ -116,6 +116,9 @@ void RfuUnionObjectToggleInvisibility(u8 objectEventId, bool32 invisible);
bool32 RfuUnionObjectIsInvisible(u8 objectEventId);
void RfuUnionObjectStartWarp(u8 objectEventId, u8 animNo);
bool32 RfuUnionObjectIsWarping(u8 objectEventId);
+u8 sub_8063F2C(u8 direction);
+u8 sub_8064194(u8 direction);
+u8 sub_80641C0(u8 direction);
void sub_805F378(s16 x, s16 y);
@@ -128,5 +131,6 @@ extern const struct OamData gObjectEventBaseOam_32x32;
extern const struct UCoords16 gUnknown_83A64C8[];
extern const u16 gUnknown_8398648[];
extern const u16 gUnknown_8398688[];
+void sub_805F724(struct ObjectEvent *, s16 x, s16 y);
#endif // GUARD_EVENT_OBJECT_MOVEMENT_H
diff --git a/include/field_camera.h b/include/field_camera.h
index fb9861014..fdab03255 100644
--- a/include/field_camera.h
+++ b/include/field_camera.h
@@ -15,12 +15,12 @@ struct CameraObject
s32 y;
};
-extern struct CameraObject gUnknown_03005DD0;
+extern struct CameraObject gFieldCamera;
// Exported RAM declarations
-extern u16 gUnknown_03005DEC;
-extern u16 gUnknown_03005DE8;
+extern u16 gTotalCameraPixelOffsetX;
+extern u16 gTotalCameraPixelOffsetY;
// Exported ROM declarations
@@ -29,6 +29,7 @@ void CurrentMapDrawMetatileAt(int x, int y);
void sub_805A658(s16 *x, s16 *y);
void SetCameraPanningCallback(void (*cb)(void));
void SetCameraPanning(s16 x, s16 y);
+void UpdateCameraPanning(void);
void InstallCameraPanAheadCallback(void);
void DrawDoorMetatileAt(int x, int y, const u16 *data);
diff --git a/include/field_control_avatar.h b/include/field_control_avatar.h
index 57a2fab66..a9ddd4b5c 100644
--- a/include/field_control_avatar.h
+++ b/include/field_control_avatar.h
@@ -8,5 +8,6 @@ extern u32 gUnknown_3005078;
void RestartWildEncounterImmunitySteps(void);
void ClearPoisonStepCounter(void);
void SetCableClubWarp(void);
+void dive_warp(struct MapPosition * pos, u16 behavior);
#endif //GUARD_FIELD_CONTROL_AVATAR_H
diff --git a/include/field_effect.h b/include/field_effect.h
index 3e30fa897..3c92afb6a 100644
--- a/include/field_effect.h
+++ b/include/field_effect.h
@@ -13,16 +13,16 @@ bool8 FieldEffectActiveListContains(u8 id);
void sub_80B69DC(void);
void CreateTeleportFieldEffectTask(void);
void FieldEffectActiveListRemove(u8 id);
-void sub_8085620(void);
+void StartEscapeRopeFieldEffect(void);
void FieldEffectStop(struct Sprite *sprite, u8 id);
u8 CreateTrainerSprite(u8 trainerSpriteID, s16 x, s16 y, u8 subpriority, u8 *buffer);
-void sub_8084454(void);
-void sub_8084784(u8 a0, u8 a1);
-void sub_8084F2C(u8 a0);
-void sub_80853CC(u8 a0);
+void FieldCB_FallWarpExit(void);
+void StartEscalatorWarp(u8 metatileBehavior, u8 priority);
+void StartLavaridgeGymB1FWarp(u8 a0);
+void StartLavaridgeGym1FWarp(u8 a0);
void sub_8083598(u8 a0);
-void sub_8083A5C(struct Sprite * sprite, u8 spriteId);
-u8 sub_8083970(u16 species, s16 x, s16 y, bool8 unused);
-void sub_80842C8(void);
+void FreeResourcesAndDestroySprite(struct Sprite * sprite, u8 spriteId);
+u8 CreateMonSprite_PicBox(u16 species, s16 x, s16 y, bool8 unused);
+void ReturnToFieldFromFlyMapSelect(void);
#endif //GUARD_FIELD_EFFECTS_H
diff --git a/include/field_effect_helpers.h b/include/field_effect_helpers.h
index e1a56a26c..c3e5ae29a 100644
--- a/include/field_effect_helpers.h
+++ b/include/field_effect_helpers.h
@@ -15,6 +15,7 @@
u8 sub_8154228(void);
bool8 sub_8155DA0(struct ObjectEvent *);
void sub_80DC44C(u8, u8);
+void sub_80DC478(u8, u8);
void StartAshFieldEffect(s16, s16, u16, s16);
#endif //GUARD_FIELD_EFFECT_HELPERS_H
diff --git a/include/field_effect_scripts.h b/include/field_effect_scripts.h
new file mode 100644
index 000000000..fd3609d93
--- /dev/null
+++ b/include/field_effect_scripts.h
@@ -0,0 +1,6 @@
+#ifndef GUARD_FIELD_EFFECT_SCRIPTS_H
+#define GUARD_FIELD_EFFECT_SCRIPTS_H
+
+extern const u8 *const gFieldEffectScriptPointers[];
+
+#endif //GUARD_FIELD_EFFECT_SCRIPTS_H
diff --git a/include/field_fadetransition.h b/include/field_fadetransition.h
index 6683f5e2e..a1fe590fa 100644
--- a/include/field_fadetransition.h
+++ b/include/field_fadetransition.h
@@ -12,10 +12,11 @@ void DoFallWarp(void);
void sub_807E59C(void);
void sub_807E500(void);
void sub_807DF64(void);
-void sub_807DC18(void);
+void WarpFadeOutScreen(void);
void FieldCallback_ReturnToEventScript2(void);
-void sub_807DC00(void);
+void FadeInFromBlack(void);
void FadeTransition_FadeInOnReturnToStartMenu(void);
+void WarpFadeInScreen(void);
void sub_807DCE4(void);
diff --git a/include/field_player_avatar.h b/include/field_player_avatar.h
index e9553025c..5565fb64b 100644
--- a/include/field_player_avatar.h
+++ b/include/field_player_avatar.h
@@ -36,5 +36,6 @@ bool32 sub_805DC24(void);
bool8 PartyHasMonWithSurf(void);
bool8 IsPlayerSurfingNorth(void);
void player_get_pos_including_state_based_drift(s16 *x, s16 *y);
+void sub_805CBE8(void);
#endif //GUARD_FIELD_PLAYER_AVATAR_H
diff --git a/include/field_screen_effect.h b/include/field_screen_effect.h
index ca7625782..aee7dc5a7 100644
--- a/include/field_screen_effect.h
+++ b/include/field_screen_effect.h
@@ -9,7 +9,6 @@ void sub_80B0244(void);
void sub_807E3EC(void);
void DoOutwardBarnDoorWipe(void);
void Task_BarnDoorWipe(u8 taskId);
-void sub_807DC00(void);
void sub_807F5F0(void);
#endif // GUARD_FIELD_SCREEN_EFFECT_H
diff --git a/include/field_weather.h b/include/field_weather.h
index de2543edb..7488c8c5a 100644
--- a/include/field_weather.h
+++ b/include/field_weather.h
@@ -18,5 +18,8 @@ void SetWeatherScreenFadeOut(void);
void sub_807B070(void);
u8 GetCurrentWeather(void);
void FieldWeather_StartFadingOutCreditsMap(u8, u8, u32);
+void sub_807AA8C(u8 palIdx);
+void ResetPreservedPalettesInWeather(void);
+void PreservePaletteInWeather(u8 palIdx);
#endif // GUARD_WEATHER_H
diff --git a/include/fldeff.h b/include/fldeff.h
index 56e2dfbd9..00f2d01f4 100644
--- a/include/fldeff.h
+++ b/include/fldeff.h
@@ -37,7 +37,7 @@ bool32 FldEffPoison_IsActive(void);
// strength
bool8 SetUpFieldMove_Strength(void);
-bool8 sub_80D0860(void);
+bool8 FldEff_UseStrength(void);
// teleport
bool8 SetUpFieldMove_Teleport(void);
diff --git a/include/global.fieldmap.h b/include/global.fieldmap.h
index 57d8d0a35..b3f5b1d42 100644
--- a/include/global.fieldmap.h
+++ b/include/global.fieldmap.h
@@ -4,6 +4,13 @@
#define OBJECT_EVENTS_COUNT 16
#define METATILE_COLLISION_MASK 0x0C00
+#define METATILE_ID_MASK 0x03FF
+#define METATILE_ID_UNDEFINED 0x03FF
+#define METATILE_ELEVATION_SHIFT 12
+#define METATILE_COLLISION_SHIFT 10
+#define METATILE_ELEVATION_MASK 0xF000
+
+#define METATILE_ID(tileset, name) (METATILE_##tileset##_##name)
enum
{
@@ -17,8 +24,6 @@ enum
typedef void (*TilesetCB)(void);
-#define METATILE_ID(tileset, name) (METATILE_##tileset##_##name)
-
struct Tileset
{
/*0x00*/ bool8 isCompressed;
@@ -280,7 +285,7 @@ struct PlayerAvatar /* 0x202E858 */
/*0x03*/ u8 tileTransitionState; // this is a transition running state: 00 is not moving, 01 is transition between tiles, 02 means you are on the frame in which you have centered on a tile but are about to keep moving, even if changing directions. 2 is also used for a ledge hop, since you are transitioning.
/*0x04*/ u8 spriteId;
/*0x05*/ u8 objectEventId;
- /*0x06*/ u8 unk6;
+ /*0x06*/ bool8 preventStep;
/*0x07*/ u8 gender;
u8 acroBikeState;
u8 unk9;
diff --git a/include/overworld.h b/include/overworld.h
index 60bf34ae7..1775a6896 100644
--- a/include/overworld.h
+++ b/include/overworld.h
@@ -82,12 +82,16 @@ 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);
+u8 IsMapTypeOutdoors(u8 mapType);
+void sav1_reset_battle_music_maybe(void);
+bool32 sub_8056124(u16 song);
void player_avatar_init_params_reset(void);
void Overworld_SetFlashLevel(s32 a1);
u8 Overworld_GetFlashLevel(void);
-void sub_8085524(u16);
void Overworld_SetSavedMusic(u16);
void Overworld_ChangeMusicToDefault(void);
@@ -155,7 +159,7 @@ u8 GetCurrentMapType(void);
u8 get_map_light_from_warp0(void);
const struct MapHeader *warp1_get_mapheader(void);
-void sub_8055F88(void);
+void TryFadeOutOldMapMusic(void);
void CB2_ReturnToFieldCableClub(void);
void ResetGameStats(void);
@@ -177,6 +181,8 @@ void sub_805546C(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 sub_8057F5C(void);
void sub_8057F34(void);
diff --git a/include/quest_log.h b/include/quest_log.h
index 6497ef69c..3241046bc 100644
--- a/include/quest_log.h
+++ b/include/quest_log.h
@@ -29,7 +29,7 @@ void sub_811539C(void);
void sub_8115748(u16);
u8 sub_8112CAC(void);
bool8 QuestLog_SchedulePlaybackCB(void (*func)(void));
-void sub_8111F38(u16, u16);
+void sub_8111F38(u16 offset, u16 idx);
void sub_8111134(void);
void DestroyHelpMessageWindow(u8 a0);
u8 CreateHelpMessageWindow(void);
@@ -50,6 +50,8 @@ void QuestLogSetFlagOrVar(bool8 isFlag, u16 idx, u16 value);
void sub_8110840(void *oldSave);
void sub_8112F18(u8 windowId);
bool8 sub_8111C2C(void);
+void sub_81128BC(u8 a0);
+void sub_811278C(u8, u8);
void Special_UpdateTrainerFansAfterLinkBattle(void);
#endif //GUARD_QUEST_LOG_H
diff --git a/include/special_field_anim.h b/include/special_field_anim.h
index d21c932bf..37c31f97b 100644
--- a/include/special_field_anim.h
+++ b/include/special_field_anim.h
@@ -3,7 +3,7 @@
#include "global.h"
-void StartEscalator(u8 a0);
+void StartEscalator(bool8 goingUp);
void StopEscalator(void);
bool8 IsEscalatorMoving(void);