sub_8056126
This commit is contained in:
@@ -5,39 +5,6 @@
|
|||||||
|
|
||||||
.text
|
.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
|
thumb_func_start GetMapTypeByGroupAndId
|
||||||
GetMapTypeByGroupAndId: @ 8056158
|
GetMapTypeByGroupAndId: @ 8056158
|
||||||
push {lr}
|
push {lr}
|
||||||
|
|||||||
@@ -29,6 +29,7 @@
|
|||||||
#include "constants/maps.h"
|
#include "constants/maps.h"
|
||||||
#include "constants/flags.h"
|
#include "constants/flags.h"
|
||||||
#include "constants/species.h"
|
#include "constants/species.h"
|
||||||
|
#include "constants/region_map_sections.h"
|
||||||
#include "constants/songs.h"
|
#include "constants/songs.h"
|
||||||
|
|
||||||
struct InitialPlayerAvatarState
|
struct InitialPlayerAvatarState
|
||||||
@@ -42,7 +43,11 @@ EWRAM_DATA struct WarpData gLastUsedWarp = {};
|
|||||||
EWRAM_DATA struct WarpData sWarpDestination = {};
|
EWRAM_DATA struct WarpData sWarpDestination = {};
|
||||||
EWRAM_DATA struct WarpData gFixedDiveWarp = {};
|
EWRAM_DATA struct WarpData gFixedDiveWarp = {};
|
||||||
EWRAM_DATA struct WarpData gFixedHoleWarp = {};
|
EWRAM_DATA struct WarpData gFixedHoleWarp = {};
|
||||||
|
|
||||||
|
// File boundary perhaps?
|
||||||
EWRAM_DATA struct InitialPlayerAvatarState gInitialPlayerAvatarState = {};
|
EWRAM_DATA struct InitialPlayerAvatarState gInitialPlayerAvatarState = {};
|
||||||
|
|
||||||
|
// File boundary perhaps?
|
||||||
EWRAM_DATA bool8 gDisableMapMusicChangeOnMapLoad = FALSE;
|
EWRAM_DATA bool8 gDisableMapMusicChangeOnMapLoad = FALSE;
|
||||||
EWRAM_DATA u16 sAmbientCrySpecies = SPECIES_NONE;
|
EWRAM_DATA u16 sAmbientCrySpecies = SPECIES_NONE;
|
||||||
EWRAM_DATA bool8 sIsAmbientCryWaterMon = FALSE;
|
EWRAM_DATA bool8 sIsAmbientCryWaterMon = FALSE;
|
||||||
@@ -70,6 +75,8 @@ void ChooseAmbientCrySpecies(void);
|
|||||||
extern const struct MapLayout * gMapLayouts[];
|
extern const struct MapLayout * gMapLayouts[];
|
||||||
extern const struct MapHeader *const *gMapGroups[];
|
extern const struct MapHeader *const *gMapGroups[];
|
||||||
|
|
||||||
|
// Routines related to game state on warping in
|
||||||
|
|
||||||
static const u8 sWhiteOutMoneyLossMultipliers[] = {
|
static const u8 sWhiteOutMoneyLossMultipliers[] = {
|
||||||
2,
|
2,
|
||||||
4,
|
4,
|
||||||
@@ -197,6 +204,8 @@ void sub_8054E40(void)
|
|||||||
RoamerMoveToOtherLocationSet();
|
RoamerMoveToOtherLocationSet();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Routines related to game stats
|
||||||
|
|
||||||
void ResetGameStats(void)
|
void ResetGameStats(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
@@ -244,6 +253,8 @@ void ApplyNewEncryptionKeyToGameStats(u32 newKey)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Routines related to object events
|
||||||
|
|
||||||
void sub_8054F68(void)
|
void sub_8054F68(void)
|
||||||
{
|
{
|
||||||
u8 i, j;
|
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)
|
void mapdata_load_assets_to_gpu_and_full_redraw(void)
|
||||||
{
|
{
|
||||||
move_tilemap_camera_to_upper_left_corner();
|
move_tilemap_camera_to_upper_left_corner();
|
||||||
@@ -338,6 +351,8 @@ const struct MapLayout *GetMapLayout(void)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Routines related to warps
|
||||||
|
|
||||||
const struct WarpData sDummyWarpData = {
|
const struct WarpData sDummyWarpData = {
|
||||||
.mapGroup = MAP_GROUP(UNDEFINED),
|
.mapGroup = MAP_GROUP(UNDEFINED),
|
||||||
.mapNum = MAP_NUM(UNDEFINED),
|
.mapNum = MAP_NUM(UNDEFINED),
|
||||||
@@ -588,6 +603,8 @@ bool8 SetDiveWarpDive(u16 x, u16 y)
|
|||||||
return SetDiveWarp(CONNECTION_DIVE, x, y);
|
return SetDiveWarp(CONNECTION_DIVE, x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Map loaders
|
||||||
|
|
||||||
void LoadMapFromCameraTransition(u8 mapGroup, u8 mapNum)
|
void LoadMapFromCameraTransition(u8 mapGroup, u8 mapNum)
|
||||||
{
|
{
|
||||||
int paletteIndex;
|
int paletteIndex;
|
||||||
@@ -668,6 +685,8 @@ void sub_80559A8(void)
|
|||||||
InitMap();
|
InitMap();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Routines related to the initial player avatar state
|
||||||
|
|
||||||
void ResetInitialPlayerAvatarState(void)
|
void ResetInitialPlayerAvatarState(void)
|
||||||
{
|
{
|
||||||
gInitialPlayerAvatarState.direction = DIR_SOUTH;
|
gInitialPlayerAvatarState.direction = DIR_SOUTH;
|
||||||
@@ -777,6 +796,8 @@ u16 GetCenterScreenMetatileBehavior(void)
|
|||||||
return MapGridGetMetatileBehaviorAt(gSaveBlock1Ptr->pos.x + 7, gSaveBlock1Ptr->pos.y + 7);
|
return MapGridGetMetatileBehaviorAt(gSaveBlock1Ptr->pos.x + 7, gSaveBlock1Ptr->pos.y + 7);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Routines related to flash level and map perms
|
||||||
|
|
||||||
bool32 Overworld_IsBikingAllowed(void)
|
bool32 Overworld_IsBikingAllowed(void)
|
||||||
{
|
{
|
||||||
if (!gMapHeader.bikingAllowed)
|
if (!gMapHeader.bikingAllowed)
|
||||||
@@ -818,6 +839,8 @@ void sub_8055D5C(struct WarpData * warp)
|
|||||||
sWarpDestination = *warp;
|
sWarpDestination = *warp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Routines related to map music
|
||||||
|
|
||||||
u16 GetLocationMusic(struct WarpData * warp)
|
u16 GetLocationMusic(struct WarpData * warp)
|
||||||
{
|
{
|
||||||
return Overworld_GetMapHeaderByGroupAndId(warp->mapGroup, warp->mapNum)->music;
|
return Overworld_GetMapHeaderByGroupAndId(warp->mapGroup, warp->mapNum)->music;
|
||||||
@@ -1024,3 +1047,13 @@ void ChooseAmbientCrySpecies(void)
|
|||||||
{
|
{
|
||||||
sAmbientCrySpecies = GetLocalWildMon(&sIsAmbientCryWaterMon);
|
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;
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user