summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/constants/region_map_sections.h2
-rw-r--r--include/event_object_movement.h9
-rw-r--r--include/gba/io_reg.h2
-rw-r--r--include/overworld.h40
-rw-r--r--include/sprite.h2
5 files changed, 29 insertions, 26 deletions
diff --git a/include/constants/region_map_sections.h b/include/constants/region_map_sections.h
index 8ff75dfa9..12c894367 100644
--- a/include/constants/region_map_sections.h
+++ b/include/constants/region_map_sections.h
@@ -220,4 +220,6 @@
#define MAPSEC_IN_GAME_TRADE 0xFE
#define MAPSEC_FATEFUL_ENCOUNTER 0xFF
+#define MAPSEC_SUBTRACT_KANTO (MAPSEC_SPECIAL_AREA - MAPSEC_DYNAMIC)
+
#endif //GUARD_REGIONMAPSEC_H
diff --git a/include/event_object_movement.h b/include/event_object_movement.h
index 1a473eea9..d43dd78ea 100644
--- a/include/event_object_movement.h
+++ b/include/event_object_movement.h
@@ -89,10 +89,10 @@ u8 GetEventObjectIdByXY(s16, s16);
void SetEventObjectDirection(struct EventObject *, u8);
u8 GetFirstInactiveEventObjectId(void);
void RemoveEventObjectByLocalIdAndMap(u8, u8, u8);
-void npc_load_two_palettes__no_record(u16, u8);
-void npc_load_two_palettes__and_record(u16, u8);
+void LoadPlayerObjectReflectionPalette(u16, u8);
+void LoadSpecialObjectReflectionPalette(u16, u8);
void sub_808EBA8(u8, u8, u8, s16, s16);
-void pal_patch_for_npc(u16, u8);
+void PatchObjectPalette(u16, u8);
void sub_808E16C(s16, s16);
void sub_808F28C(u8 localId, u8 mapNum, u8 mapGroup, u8 decorCat);
void sub_8092FF0(s16, s16, s16 *, s16 *);
@@ -113,7 +113,7 @@ void EventObjectTurn(struct EventObject *, u8);
void EventObjectTurnByLocalIdAndMap(u8, u8, u8, u8);
const struct EventObjectGraphicsInfo *GetEventObjectGraphicsInfo(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 FreeAndReserveObjectSpritePalettes(void);
void sub_808E82C(u8, u8, u8, s16, s16);
void sub_808E7E4(u8, u8, u8);
void sub_808E78C(u8, u8, u8, u8);
@@ -122,6 +122,7 @@ void EventObjectGetLocalIdAndMap(struct EventObject *eventObject, void *localId,
void ShiftEventObjectCoords(struct EventObject *, s16, s16);
void sub_808EB08(struct EventObject *, s16, s16);
void sub_808F254(u8, u8, u8);
+void InitEventObjectPalettes(u8 palSlot);
void UpdateEventObjectCurrentMovement(struct EventObject *, struct Sprite *, bool8(struct EventObject *, struct Sprite *));
u8 EventObjectFaceOppositeDirection(struct EventObject *, u8);
u8 GetOppositeDirection(u8);
diff --git a/include/gba/io_reg.h b/include/gba/io_reg.h
index 9327d6cb0..03faa1a87 100644
--- a/include/gba/io_reg.h
+++ b/include/gba/io_reg.h
@@ -574,8 +574,6 @@
#define WINOUT_WINOBJ_OBJ (1 << 12)
#define WINOUT_WINOBJ_CLR (1 << 13)
-#define WINHV_COORDS(m, n) (((m) << 8) | (n))
-
// BLDCNT
// Bits 0-5 select layers for the 1st target
#define BLDCNT_TGT1_BG0 (1 << 0)
diff --git a/include/overworld.h b/include/overworld.h
index 341e44278..f6856ab0c 100644
--- a/include/overworld.h
+++ b/include/overworld.h
@@ -1,10 +1,10 @@
#ifndef GUARD_OVERWORLD_H
#define GUARD_OVERWORLD_H
-struct UnkPlayerStruct
+struct InitialPlayerAvatarState
{
- u8 player_field_0;
- u8 player_field_1;
+ u8 transitionFlags;
+ u8 direction;
};
struct LinkPlayerEventObject
@@ -16,7 +16,7 @@ struct LinkPlayerEventObject
};
// Exported RAM declarations
-extern struct WarpData gUnknown_020322DC;
+extern struct WarpData gLastUsedWarp;
extern struct LinkPlayerEventObject gLinkPlayerEventObjects[4];
extern u16 *gBGTilemapBuffers1;
@@ -26,7 +26,7 @@ extern u16 *gBGTilemapBuffers3;
extern void (*gFieldCallback)(void);
// Exported ROM declarations
-extern const struct UCoords32 gUnknown_08339D64[];
+extern const struct UCoords32 gDirectionToVectors[];
void DoWhiteOut(void);
void Overworld_ResetStateAfterFly(void);
@@ -45,13 +45,13 @@ const struct MapLayout *GetMapLayout(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);
+bool32 IsDummyWarp(struct WarpData *warp);
struct MapHeader const *const Overworld_GetMapHeaderByGroupAndId(u16 mapGroup, u16 mapNum);
-struct MapHeader const *const warp1_get_mapheader(void);
-void set_current_map_header_from_sav1_save_old_name(void);
+struct MapHeader const *const GetDestinationWarpMapHeader(void);
+void LoadCurrentMapData(void);
void LoadSaveblockMapHeader(void);
-void update_camera_pos_from_warpid(void);
-void warp_in(void);
+void SetPlayerCoordsFromWarp(void);
+void WarpIntoMap(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(s32 unused, s8 mapGroup, s8 mapNum, s8 warpId);
@@ -63,21 +63,21 @@ 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);
void sub_8084E14(void);
-void sub_8084E2C(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y);
-void warp1_set_to_warp2(void);
-void sub_8084E80(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y);
-void sub_8084EBC(s16 x, s16 y);
+void SetFixedDiveWarp(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y);
+void SetFixedDiveWarpAsDestination(void);
+void SetFixedHoleWarp(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y);
+void SetFixedHoleWarpAsDestination(s16 x, s16 y);
void warp1_set_to_sav1w(void);
void sub_8084F2C(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y);
void sub_8084F6C(u8 a1);
void sub_8084FAC(void);
const struct MapConnection *GetMapConnection(u8 dir);
-bool8 sub_8084FF8(u8 dir, u16 x, u16 y);
-bool8 sub_8085058(u16 x, u16 y);
-bool8 sub_8085078(u16 x, u16 y);
+bool8 SetDiveWarp(u8 dir, u16 x, u16 y);
+bool8 SetDiveWarpEmerge(u16 x, u16 y);
+bool8 SetDiveWarpDive(u16 x, u16 y);
void mliX_load_map(u8 mapGroup, u8 mapNum);
-void player_avatar_init_params_reset(void);
-void walkrun_find_lowest_active_bit_in_bitfield(void);
+void ResetInitialPlayerAvatarState(void);
+void StoreInitialPlayerAvatarState(void);
bool32 Overworld_IsBikingAllowed(void);
void SetDefaultFlashLevel(void);
void Overworld_SetFlashLevel(s32 flashLevel);
@@ -96,7 +96,7 @@ void Overworld_ChangeMusicToDefault(void);
void Overworld_ChangeMusicTo(u16 newMusic);
u8 GetMapMusicFadeoutSpeed(void);
void music_something(void);
-bool8 sub_80859A0(void);
+bool8 BGMusicStopped(void);
void Overworld_FadeOutMapMusic(void);
void UpdateAmbientCry(s16 *state, u16 *delayCounter);
u8 GetMapTypeByGroupAndId(s8 mapGroup, s8 mapNum);
diff --git a/include/sprite.h b/include/sprite.h
index f972d09cc..26263737b 100644
--- a/include/sprite.h
+++ b/include/sprite.h
@@ -26,6 +26,8 @@ struct SpriteFrameImage
#define obj_frame_tiles(ptr) {.data = (u8 *)ptr, .size = sizeof ptr}
+#define overworld_frame(ptr, width, height, frame) {.data = (u8 *)ptr + (width * height * frame * 64)/2, .size = (width * height * 64)/2}
+
struct SpritePalette
{
const u16 *data; // Raw uncompressed palette data