diff options
author | PikalaxALT <PikalaxALT@gmail.com> | 2020-03-28 11:06:04 -0400 |
---|---|---|
committer | PikalaxALT <PikalaxALT@gmail.com> | 2020-03-28 11:06:04 -0400 |
commit | 9c62fd51aabaf9301d6a89a03a8e3ddf91d61164 (patch) | |
tree | 072c4a942b805d7b8c2a2a4e27e729a38f99c0e2 | |
parent | 816e7ad1f8f38f3eee152913c416200e4caf1f5e (diff) |
sub_8056126
-rw-r--r-- | asm/overworld.s | 33 | ||||
-rw-r--r-- | src/overworld.c | 33 |
2 files changed, 33 insertions, 33 deletions
diff --git a/asm/overworld.s b/asm/overworld.s index 7ac5c3e06..cba7113e4 100644 --- a/asm/overworld.s +++ b/asm/overworld.s @@ -5,39 +5,6 @@ .text - thumb_func_start sub_8056124 -sub_8056124: @ 8056124 - push {lr} - lsls r0, 16 - lsrs r1, r0, 16 - movs r0, 0x8D - lsls r0, 1 - cmp r1, r0 - beq _08056138 - adds r0, 0x17 - cmp r1, r0 - bne _08056150 -_08056138: - ldr r0, _0805614C @ =gMapHeader - ldrb r0, [r0, 0x14] - cmp r0, 0x84 - beq _08056148 - cmp r0, 0x7B - beq _08056148 - cmp r0, 0x61 - bne _08056150 -_08056148: - movs r0, 0 - b _08056152 - .align 2, 0 -_0805614C: .4byte gMapHeader -_08056150: - movs r0, 0x1 -_08056152: - pop {r1} - bx r1 - thumb_func_end sub_8056124 - thumb_func_start GetMapTypeByGroupAndId GetMapTypeByGroupAndId: @ 8056158 push {lr} diff --git a/src/overworld.c b/src/overworld.c index 0fa93414a..a7d23d870 100644 --- a/src/overworld.c +++ b/src/overworld.c @@ -29,6 +29,7 @@ #include "constants/maps.h" #include "constants/flags.h" #include "constants/species.h" +#include "constants/region_map_sections.h" #include "constants/songs.h" struct InitialPlayerAvatarState @@ -42,7 +43,11 @@ EWRAM_DATA struct WarpData gLastUsedWarp = {}; EWRAM_DATA struct WarpData sWarpDestination = {}; EWRAM_DATA struct WarpData gFixedDiveWarp = {}; EWRAM_DATA struct WarpData gFixedHoleWarp = {}; + +// File boundary perhaps? EWRAM_DATA struct InitialPlayerAvatarState gInitialPlayerAvatarState = {}; + +// File boundary perhaps? EWRAM_DATA bool8 gDisableMapMusicChangeOnMapLoad = FALSE; EWRAM_DATA u16 sAmbientCrySpecies = SPECIES_NONE; EWRAM_DATA bool8 sIsAmbientCryWaterMon = FALSE; @@ -70,6 +75,8 @@ void ChooseAmbientCrySpecies(void); extern const struct MapLayout * gMapLayouts[]; extern const struct MapHeader *const *gMapGroups[]; +// Routines related to game state on warping in + static const u8 sWhiteOutMoneyLossMultipliers[] = { 2, 4, @@ -197,6 +204,8 @@ void sub_8054E40(void) RoamerMoveToOtherLocationSet(); } +// Routines related to game stats + void ResetGameStats(void) { int i; @@ -244,6 +253,8 @@ void ApplyNewEncryptionKeyToGameStats(u32 newKey) } } +// Routines related to object events + void sub_8054F68(void) { u8 i, j; @@ -321,6 +332,8 @@ void Overworld_SetObjEventTemplateMovementType(u8 localId, u8 movementType) } } +// Routines related to the map layout + void mapdata_load_assets_to_gpu_and_full_redraw(void) { move_tilemap_camera_to_upper_left_corner(); @@ -338,6 +351,8 @@ const struct MapLayout *GetMapLayout(void) return NULL; } +// Routines related to warps + const struct WarpData sDummyWarpData = { .mapGroup = MAP_GROUP(UNDEFINED), .mapNum = MAP_NUM(UNDEFINED), @@ -588,6 +603,8 @@ bool8 SetDiveWarpDive(u16 x, u16 y) return SetDiveWarp(CONNECTION_DIVE, x, y); } +// Map loaders + void LoadMapFromCameraTransition(u8 mapGroup, u8 mapNum) { int paletteIndex; @@ -668,6 +685,8 @@ void sub_80559A8(void) InitMap(); } +// Routines related to the initial player avatar state + void ResetInitialPlayerAvatarState(void) { gInitialPlayerAvatarState.direction = DIR_SOUTH; @@ -777,6 +796,8 @@ u16 GetCenterScreenMetatileBehavior(void) return MapGridGetMetatileBehaviorAt(gSaveBlock1Ptr->pos.x + 7, gSaveBlock1Ptr->pos.y + 7); } +// Routines related to flash level and map perms + bool32 Overworld_IsBikingAllowed(void) { if (!gMapHeader.bikingAllowed) @@ -818,6 +839,8 @@ void sub_8055D5C(struct WarpData * warp) sWarpDestination = *warp; } +// Routines related to map music + u16 GetLocationMusic(struct WarpData * warp) { return Overworld_GetMapHeaderByGroupAndId(warp->mapGroup, warp->mapNum)->music; @@ -1024,3 +1047,13 @@ void ChooseAmbientCrySpecies(void) { sAmbientCrySpecies = GetLocalWildMon(&sIsAmbientCryWaterMon); } + +bool32 sub_8056124(u16 music) +{ + if (music == MUS_CYCLING || music == MUS_NAMINORI) + { + if (gMapHeader.regionMapSectionId == MAPSEC_KANTO_VICTORY_ROAD || gMapHeader.regionMapSectionId == MAPSEC_ROUTE_23 || gMapHeader.regionMapSectionId == MAPSEC_INDIGO_PLATEAU) + return FALSE; + } + return TRUE; +} |