mirror of https://github.com/zeldaret/tmc.git
name transition handler functions
This commit is contained in:
parent
96a3e64280
commit
d602b93c8d
|
@ -200,7 +200,7 @@ void InitParachuteRoom(void);
|
|||
* @param onEnter Room enter callback.
|
||||
* @param onExit Room exit callback.
|
||||
*/
|
||||
void RegisterTransitionManager(void* mgr, void (*onEnter)(void*), void (*onExit)(void*));
|
||||
void RegisterTransitionHandler(void* mgr, void (*onEnter)(), void (*onExit)());
|
||||
|
||||
/**
|
||||
* Call the room exit callback.
|
||||
|
|
|
@ -152,11 +152,6 @@ extern void (*const gMiscManagerunctions[58])();
|
|||
|
||||
Manager* GetEmptyManager(void);
|
||||
|
||||
/**
|
||||
* @brief Set manager responsible for handling room changes
|
||||
*/
|
||||
extern void RegisterTransitionManager(void* mgr, void (*onEnter)(), void (*onExit)());
|
||||
|
||||
extern u32 sub_0805ACC0(Entity*);
|
||||
extern void sub_0801855C(void);
|
||||
extern void SetNextAreaHint(u32 textId);
|
||||
|
|
|
@ -9,10 +9,10 @@
|
|||
#include "collision.h"
|
||||
#include "enemy.h"
|
||||
#include "enemy/gyorg.h"
|
||||
#include "entity.h"
|
||||
#include "functions.h"
|
||||
#include "sound.h"
|
||||
#include "assets/map_offsets.h"
|
||||
#include "game.h"
|
||||
#include "functions.h"
|
||||
|
||||
extern u8 gEntCount;
|
||||
extern u8 gMapDataTopSpecial[];
|
||||
|
@ -20,11 +20,10 @@ extern u8 gMapDataTopSpecial[];
|
|||
extern u16 gMapDataBottomSpecial[];
|
||||
|
||||
extern u32 sub_08000E62(u32);
|
||||
extern void RegisterTransitionManager(void*, void (*)(), void (*)());
|
||||
|
||||
void sub_08046498();
|
||||
void GyorgFemale_OnEnterRoom();
|
||||
void sub_0804660C(GyorgFemaleEntity*, u32);
|
||||
void sub_080464C0(GyorgFemaleEntity*);
|
||||
void GyorgFemale_Reset(GyorgFemaleEntity*);
|
||||
void GyorgFemale_SpawnChildren(GyorgFemaleEntity* this, bool32 unlimit_tmp);
|
||||
void sub_080465C8(void);
|
||||
void GyorgFemale_ProcessEyeHit(GyorgFemaleEntity* this);
|
||||
|
@ -92,13 +91,13 @@ void GyorgFemale_Setup(GyorgFemaleEntity* this) {
|
|||
MemClear(&gMapDataBottomSpecial, 0x8000);
|
||||
MemClear(&gMapDataTopSpecial, 0x8000);
|
||||
sub_0804660C(this, 0);
|
||||
sub_080464C0(this);
|
||||
GyorgFemale_Reset(this);
|
||||
gPlayerEntity.base.collisionLayer = 2;
|
||||
UpdateSpriteForCollisionLayer(&gPlayerEntity.base);
|
||||
#ifndef EU
|
||||
RegisterTransitionManager(this, sub_08046498, 0);
|
||||
RegisterTransitionHandler(this, GyorgFemale_OnEnterRoom, NULL);
|
||||
#else
|
||||
RegisterTransitionManager(this, sub_080464C0, 0);
|
||||
RegisterTransitionHandler(this, GyorgFemale_Reset, NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -110,7 +109,7 @@ void GyorgFemale_Action1(GyorgFemaleEntity* this) {
|
|||
} else {
|
||||
if (this->unk_79 & 0x40) {
|
||||
this->unk_79 &= ~0x40;
|
||||
sub_080464C0(this);
|
||||
GyorgFemale_Reset(this);
|
||||
}
|
||||
}
|
||||
sub_080465C8();
|
||||
|
@ -217,14 +216,14 @@ void GyorgFemale_Action3(GyorgFemaleEntity* this) {
|
|||
}
|
||||
|
||||
#ifndef EU
|
||||
void sub_08046498(GyorgFemaleEntity* this) {
|
||||
void GyorgFemale_OnEnterRoom(GyorgFemaleEntity* this) {
|
||||
MemClear(&gMapDataBottomSpecial, 0x8000);
|
||||
MemClear(&gMapDataTopSpecial, 0x8000);
|
||||
sub_080464C0(this);
|
||||
GyorgFemale_Reset(this);
|
||||
}
|
||||
#endif
|
||||
|
||||
void sub_080464C0(GyorgFemaleEntity* this) {
|
||||
void GyorgFemale_Reset(GyorgFemaleEntity* this) {
|
||||
static const MapDataDefinition* const gyorgMappings[] = {
|
||||
gGyorgMapping0,
|
||||
gGyorgMapping1,
|
||||
|
|
|
@ -531,7 +531,7 @@ u32 GetFlagBankOffset(u32 idx) {
|
|||
return gLocalFlagBanks[a_hdr->flag_bank];
|
||||
}
|
||||
|
||||
void RegisterTransitionManager(void* mgr, void (*onEnter)(), void (*onExit)()) {
|
||||
void RegisterTransitionHandler(void* mgr, void (*onEnter)(), void (*onExit)()) {
|
||||
if (gMain.substate != GAMEMAIN_SUBTASK) {
|
||||
gArea.transitionManager = mgr;
|
||||
gArea.onEnter = onEnter;
|
||||
|
|
|
@ -6,19 +6,20 @@
|
|||
*/
|
||||
#include "manager/cloudOverlayManager.h"
|
||||
#include "area.h"
|
||||
#include "functions.h"
|
||||
#include "screen.h"
|
||||
#include "game.h"
|
||||
#include "functions.h"
|
||||
|
||||
void sub_0805AEDC(CloudOverlayManager*);
|
||||
void sub_0805AF3C(CloudOverlayManager*);
|
||||
void CloudOverlayManager_OnEnterRoom(CloudOverlayManager*);
|
||||
void CloudOverlayManager_OnExitRoom(CloudOverlayManager*);
|
||||
|
||||
void CloudOverlayManager_Main(CloudOverlayManager* this) {
|
||||
static const u16 gUnk_0810865C[] = {
|
||||
0xf01, 0xe02, 0xe03, 0xe04, 0, 0,
|
||||
};
|
||||
if (this == NULL) {
|
||||
if (gArea.onEnter != sub_0805AEDC) {
|
||||
sub_0805AEDC(NULL);
|
||||
if (gArea.onEnter != CloudOverlayManager_OnEnterRoom) {
|
||||
CloudOverlayManager_OnEnterRoom(NULL);
|
||||
}
|
||||
} else {
|
||||
if (super->action == 0) {
|
||||
|
@ -29,7 +30,7 @@ void CloudOverlayManager_Main(CloudOverlayManager* this) {
|
|||
this->field_0x20 = gUnk_0810865C[0];
|
||||
SetEntityPriority((Entity*)this, PRIO_PLAYER_EVENT);
|
||||
if (gArea.onEnter == NULL) {
|
||||
RegisterTransitionManager(this, sub_0805AEDC, sub_0805AF3C);
|
||||
RegisterTransitionHandler(this, CloudOverlayManager_OnEnterRoom, CloudOverlayManager_OnExitRoom);
|
||||
} else {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
|
@ -49,7 +50,7 @@ void CloudOverlayManager_Main(CloudOverlayManager* this) {
|
|||
}
|
||||
}
|
||||
|
||||
void sub_0805AEDC(CloudOverlayManager* this) {
|
||||
void CloudOverlayManager_OnEnterRoom(CloudOverlayManager* this) {
|
||||
gScreen.bg3.control = BGCNT_SCREENBASE(30) | BGCNT_PRIORITY(1) | BGCNT_CHARBASE(1);
|
||||
gScreen.lcd.displayControl |= DISPCNT_BG3_ON;
|
||||
gScreen.controls.layerFXControl =
|
||||
|
@ -62,7 +63,7 @@ void sub_0805AEDC(CloudOverlayManager* this) {
|
|||
}
|
||||
}
|
||||
|
||||
void sub_0805AF3C(CloudOverlayManager* this) {
|
||||
void CloudOverlayManager_OnExitRoom(CloudOverlayManager* this) {
|
||||
super->flags &= ~ENT_PERSIST;
|
||||
gScreen.lcd.displayControl &= ~DISPCNT_BG3_ON;
|
||||
gScreen.controls.layerFXControl = 0;
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include "object.h"
|
||||
#include "room.h"
|
||||
#include "screen.h"
|
||||
#include "game.h"
|
||||
#include "manager/lightManager.h"
|
||||
#include "assets/gfx_offsets.h"
|
||||
#include "functions.h"
|
||||
|
@ -155,7 +156,7 @@ void HoleManager_Main(HoleManager* this) {
|
|||
bool32 IsPlayerOnHole(HoleManager*);
|
||||
void DoHoleTransition(HoleManager*);
|
||||
void HoleManager_UpdateParallaxBackground(HoleManager*);
|
||||
void HoleManager_InitParallaxBackground(HoleManager*);
|
||||
void HoleManager_OnEnterRoom(HoleManager*);
|
||||
|
||||
void HoleManager_Init(HoleManager* this) {
|
||||
const HoleTransition* transition;
|
||||
|
@ -185,8 +186,8 @@ void HoleManager_Init(HoleManager* this) {
|
|||
this->persistance_y = transition->parallax_background->y;
|
||||
UnDarkRoom();
|
||||
HoleManager_UpdateParallaxBackground(this);
|
||||
HoleManager_InitParallaxBackground(this);
|
||||
RegisterTransitionManager(this, HoleManager_InitParallaxBackground, NULL);
|
||||
HoleManager_OnEnterRoom(this);
|
||||
RegisterTransitionHandler(this, HoleManager_OnEnterRoom, NULL);
|
||||
}
|
||||
if (!transition->parallax_entity)
|
||||
return;
|
||||
|
@ -297,7 +298,7 @@ void HoleManager_UpdateParallaxBackground(HoleManager* this) {
|
|||
gScreen.bg3.yOffset = gRoomControls.bg3OffsetY.HALF.HI = gRoomControls.scroll_y + this->persistance_offset_y + y;
|
||||
}
|
||||
|
||||
void HoleManager_InitParallaxBackground(HoleManager* this) {
|
||||
void HoleManager_OnEnterRoom(HoleManager* this) {
|
||||
const HoleTransition* transition;
|
||||
if (!super->type2)
|
||||
return;
|
||||
|
|
|
@ -6,11 +6,12 @@
|
|||
*/
|
||||
#include "manager/horizontalMinishPathBackgroundManager.h"
|
||||
#include "common.h"
|
||||
#include "functions.h"
|
||||
#include "screen.h"
|
||||
#include "game.h"
|
||||
#include "functions.h"
|
||||
|
||||
void sub_08057F20(HorizontalMinishPathBackgroundManager*);
|
||||
void sub_08057EFC(void*);
|
||||
void HorizontalMinishPathBackgroundManager_OnEnterRoom(HorizontalMinishPathBackgroundManager*);
|
||||
void sub_08058034(void);
|
||||
void sub_08058084(u16*, u16*);
|
||||
void sub_08058004(u32, void*, void*);
|
||||
|
@ -24,38 +25,38 @@ void HorizontalMinishPathBackgroundManager_Main(HorizontalMinishPathBackgroundMa
|
|||
super->action = 1;
|
||||
gScreen.bg1.updated = 0;
|
||||
gScreen.bg3.updated = 0;
|
||||
RegisterTransitionManager(this, sub_08057EFC, NULL);
|
||||
RegisterTransitionHandler(this, HorizontalMinishPathBackgroundManager_OnEnterRoom, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08057EFC(void* this) {
|
||||
LoadGfxGroup((u32)gRoomVars.graphicsGroups[0]);
|
||||
void HorizontalMinishPathBackgroundManager_OnEnterRoom(HorizontalMinishPathBackgroundManager* this) {
|
||||
LoadGfxGroup(gRoomVars.graphicsGroups[0]);
|
||||
sub_08058034();
|
||||
((HorizontalMinishPathBackgroundManager*)this)->unk_3c = 0;
|
||||
((HorizontalMinishPathBackgroundManager*)this)->unk_38 = 0;
|
||||
sub_08057F20(((HorizontalMinishPathBackgroundManager*)this));
|
||||
this->unk_3c = 0;
|
||||
this->unk_38 = 0;
|
||||
sub_08057F20(this);
|
||||
}
|
||||
|
||||
void sub_08057F20(HorizontalMinishPathBackgroundManager* this) {
|
||||
u32 tmp;
|
||||
tmp = gRoomControls.scroll_x - gRoomControls.origin_x;
|
||||
tmp = tmp + (tmp >> 3) + ((0x400 - gRoomControls.width) / 2);
|
||||
tmp = tmp + (tmp >> 3) + (0x400 - gRoomControls.width) / 2;
|
||||
gScreen.bg3.xOffset = tmp & 0xF;
|
||||
gScreen.bg3.yOffset = 0x30 - ((0x30 - (gRoomControls.scroll_y - gRoomControls.origin_y)) >> 2);
|
||||
gScreen.bg3.subTileMap = gBG3Buffer;
|
||||
sub_08058004(tmp, gUnk_02006F00, gBG3Buffer);
|
||||
tmp = ((tmp >> 4) << 1);
|
||||
tmp = (tmp >> 4) << 1;
|
||||
if (this->unk_38 != tmp) {
|
||||
this->unk_38 = tmp;
|
||||
gScreen.bg3.updated = 1;
|
||||
}
|
||||
tmp = (gRoomControls.scroll_x - gRoomControls.origin_x);
|
||||
tmp = tmp + (tmp >> 2) + ((0x400 - gRoomControls.width) / 2);
|
||||
tmp = gRoomControls.scroll_x - gRoomControls.origin_x;
|
||||
tmp = tmp + (tmp >> 2) + (0x400 - gRoomControls.width) / 2;
|
||||
gScreen.bg1.xOffset = tmp & 0xF;
|
||||
gScreen.bg1.yOffset = 0x30 - ((0x30 - (gRoomControls.scroll_y - gRoomControls.origin_y)) >> 1);
|
||||
gScreen.bg1.subTileMap = gBG3Buffer + 0x400;
|
||||
sub_08058004(tmp, gUnk_02006F00 + 0x2000, gBG3Buffer + 0x400);
|
||||
tmp = ((tmp >> 4) << 1);
|
||||
tmp = (tmp >> 4) << 1;
|
||||
if (this->unk_3c != tmp) {
|
||||
this->unk_3c = tmp;
|
||||
gScreen.bg1.updated = 1;
|
||||
|
|
|
@ -11,11 +11,12 @@
|
|||
#include "main.h"
|
||||
#include "room.h"
|
||||
#include "tiles.h"
|
||||
#include "game.h"
|
||||
#include "assets/gfx_offsets.h"
|
||||
#include "functions.h"
|
||||
|
||||
void HyruleTownTileSetManager_UpdateLoadGfxGroups(HyruleTownTileSetManager*);
|
||||
void HyruleTownTileSetManager_Reset(HyruleTownTileSetManager*);
|
||||
void HyruleTownTileSetManager_OnEnterRoom(HyruleTownTileSetManager*);
|
||||
|
||||
// clang-format off
|
||||
static const u16 gHyruleTownTileSetManager_regions0[] = {
|
||||
|
@ -86,13 +87,13 @@ void HyruleTownTileSetManager_Main(HyruleTownTileSetManager* this) {
|
|||
this->gfxGroup2 = 0xff;
|
||||
this->gfxGroup1 = 0xff;
|
||||
this->gfxGroup0 = 0xff;
|
||||
RegisterTransitionManager(this, HyruleTownTileSetManager_Reset, NULL);
|
||||
RegisterTransitionHandler(this, HyruleTownTileSetManager_OnEnterRoom, NULL);
|
||||
SetEntityPriority((Entity*)this, PRIO_PLAYER_EVENT);
|
||||
}
|
||||
HyruleTownTileSetManager_UpdateLoadGfxGroups(this);
|
||||
}
|
||||
|
||||
void HyruleTownTileSetManager_Reset(HyruleTownTileSetManager* this) {
|
||||
void HyruleTownTileSetManager_OnEnterRoom(HyruleTownTileSetManager* this) {
|
||||
gRoomVars.graphicsGroups[2] = 0xff;
|
||||
gRoomVars.graphicsGroups[1] = 0xff;
|
||||
gRoomVars.graphicsGroups[0] = 0xff;
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include "functions.h"
|
||||
#include "main.h"
|
||||
#include "screen.h"
|
||||
#include "game.h"
|
||||
|
||||
extern void DisableVBlankDMA(void);
|
||||
|
||||
|
@ -47,7 +48,7 @@ void LightRayManager_Main(LightRayManager* this) {
|
|||
}
|
||||
}
|
||||
|
||||
static void LightRayManager_EnterRoom(LightRayManager* this) {
|
||||
static void LightRayManager_OnEnterRoom(LightRayManager* this) {
|
||||
u8* pbVar1;
|
||||
|
||||
LoadGfxGroup(this->gfxGroup);
|
||||
|
@ -60,7 +61,7 @@ static void LightRayManager_EnterRoom(LightRayManager* this) {
|
|||
}
|
||||
}
|
||||
|
||||
static void LightRayManager_ExitRoom(void) {
|
||||
static void LightRayManager_OnExitRoom(void) {
|
||||
gScreen.lcd.displayControl &= ~DISPCNT_BG3_ON;
|
||||
gScreen.controls.layerFXControl = 0;
|
||||
DisableVBlankDMA();
|
||||
|
@ -76,7 +77,7 @@ void LightRayManager_Init(LightRayManager* this) {
|
|||
gScreen.lcd.displayControl |= DISPCNT_BG3_ON;
|
||||
gScreen.controls.layerFXControl = 0x3648;
|
||||
gScreen.controls.alphaBlend = 0x1000;
|
||||
RegisterTransitionManager(this, LightRayManager_EnterRoom, LightRayManager_ExitRoom);
|
||||
RegisterTransitionHandler(this, LightRayManager_OnEnterRoom, LightRayManager_OnExitRoom);
|
||||
}
|
||||
|
||||
void LightRayManager_Action1(LightRayManager* this) {
|
||||
|
|
|
@ -6,10 +6,11 @@
|
|||
*/
|
||||
#include "manager/minishRaftersBackgroundManager.h"
|
||||
#include "common.h"
|
||||
#include "functions.h"
|
||||
#include "room.h"
|
||||
#include "game.h"
|
||||
#include "functions.h"
|
||||
|
||||
void sub_08058204(MinishRaftersBackgroundManager*);
|
||||
void MinishRaftersBackgroundManager_OnEnterRoom(MinishRaftersBackgroundManager*);
|
||||
void sub_08058210(MinishRaftersBackgroundManager*);
|
||||
u32 sub_08058244(int);
|
||||
void sub_080582A0(u32, u32*, u16*);
|
||||
|
@ -23,11 +24,11 @@ void MinishRaftersBackgroundManager_Main(MinishRaftersBackgroundManager* this) {
|
|||
if (super->action == 0) {
|
||||
super->action = 1;
|
||||
gScreen.bg1.updated = 0;
|
||||
RegisterTransitionManager(this, sub_08058204, NULL);
|
||||
RegisterTransitionHandler(this, MinishRaftersBackgroundManager_OnEnterRoom, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08058204(MinishRaftersBackgroundManager* this) {
|
||||
void MinishRaftersBackgroundManager_OnEnterRoom(MinishRaftersBackgroundManager* this) {
|
||||
sub_08058324(super->type);
|
||||
}
|
||||
|
||||
|
|
|
@ -8,10 +8,11 @@
|
|||
#include "asm.h"
|
||||
#include "common.h"
|
||||
#include "main.h"
|
||||
#include "game.h"
|
||||
#include "assets/gfx_offsets.h"
|
||||
#include "functions.h"
|
||||
|
||||
void MinishVillageTileSetManager_LoadRoomGfxGroup(void*);
|
||||
void MinishVillageTileSetManager_OnEnterRoom(void*);
|
||||
bool32 MinishVillageTileSetManager_UpdateRoomGfxGroup(MinishVillageTileSetManager*);
|
||||
void MinishVillageTileSetManager_LoadGfxGroup(u32);
|
||||
|
||||
|
@ -106,7 +107,7 @@ void MinishVillageTileSetManager_Main(MinishVillageTileSetManager* this) {
|
|||
#ifndef EU
|
||||
SetEntityPriority((Entity*)this, PRIO_PLAYER_EVENT);
|
||||
#endif
|
||||
RegisterTransitionManager(this, MinishVillageTileSetManager_LoadRoomGfxGroup, 0);
|
||||
RegisterTransitionHandler(this, MinishVillageTileSetManager_OnEnterRoom, NULL);
|
||||
}
|
||||
#ifdef EU
|
||||
if (gRoomControls.reload_flags)
|
||||
|
@ -175,7 +176,7 @@ void MinishVillageTileSetManager_Main(MinishVillageTileSetManager* this) {
|
|||
#endif
|
||||
}
|
||||
|
||||
void MinishVillageTileSetManager_LoadRoomGfxGroup(void* this) {
|
||||
void MinishVillageTileSetManager_OnEnterRoom(void* this) {
|
||||
MinishVillageTileSetManager_LoadGfxGroup(gRoomVars.graphicsGroups[0]);
|
||||
}
|
||||
|
||||
|
|
|
@ -8,13 +8,14 @@
|
|||
#include "area.h"
|
||||
#include "room.h"
|
||||
#include "screen.h"
|
||||
#include "game.h"
|
||||
|
||||
void sub_0805AFFC(PowBackgroundManager*);
|
||||
void PowBackgroundManager_OnEnterRoom(PowBackgroundManager*);
|
||||
|
||||
void PowBackgroundManager_Main(PowBackgroundManager* this) {
|
||||
if (this == NULL) {
|
||||
if ((void*)gArea.onEnter != sub_0805AFFC) {
|
||||
sub_0805AFFC(this);
|
||||
if ((void*)gArea.onEnter != PowBackgroundManager_OnEnterRoom) {
|
||||
PowBackgroundManager_OnEnterRoom(this);
|
||||
}
|
||||
} else {
|
||||
if (super->action == 0) {
|
||||
|
@ -22,7 +23,7 @@ void PowBackgroundManager_Main(PowBackgroundManager* this) {
|
|||
super->flags |= ENT_PERSIST;
|
||||
SetEntityPriority((Entity*)this, PRIO_PLAYER_EVENT);
|
||||
if (gArea.onEnter == NULL) {
|
||||
RegisterTransitionManager(this, sub_0805AFFC, NULL);
|
||||
RegisterTransitionHandler(this, PowBackgroundManager_OnEnterRoom, NULL);
|
||||
} else {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
|
@ -34,7 +35,7 @@ void PowBackgroundManager_Main(PowBackgroundManager* this) {
|
|||
}
|
||||
}
|
||||
|
||||
void sub_0805AFFC(PowBackgroundManager* this) {
|
||||
void PowBackgroundManager_OnEnterRoom(PowBackgroundManager* this) {
|
||||
gScreen.bg3.control = BGCNT_PRIORITY(3) | BGCNT_SCREENBASE(30);
|
||||
gScreen.lcd.displayControl |= DISPCNT_BG3_ON;
|
||||
gScreen.bg3.xOffset = gRoomControls.scroll_x + gRoomControls.bg3OffsetX.HALF.HI;
|
||||
|
|
|
@ -8,21 +8,21 @@
|
|||
#include "area.h"
|
||||
#include "common.h"
|
||||
#include "flags.h"
|
||||
#include "functions.h"
|
||||
#include "main.h"
|
||||
#include "physics.h"
|
||||
#include "room.h"
|
||||
#include "save.h"
|
||||
#include "screen.h"
|
||||
#include "sound.h"
|
||||
#include "structures.h"
|
||||
#include "game.h"
|
||||
#include "functions.h"
|
||||
|
||||
extern struct BgAffineDstData gUnk_02017AA0[];
|
||||
extern struct BgAffineDstData gUnk_02017BA0[];
|
||||
extern u8 gUpdateVisibleTiles;
|
||||
extern u32 gUsedPalettes;
|
||||
|
||||
void sub_08058D34(void);
|
||||
void RollingBarrelManager_OnEnterRoom(void);
|
||||
void sub_08058BC8(RollingBarrelManager*);
|
||||
void sub_08058CB0(RollingBarrelManager*);
|
||||
void sub_08058CFC(void);
|
||||
|
@ -52,7 +52,7 @@ void RollingBarrelManager_Init(RollingBarrelManager* this) {
|
|||
this->unk_28 = 0x1234;
|
||||
super->timer = CheckLocalFlags(0x15, 0x2) != 0;
|
||||
sub_08058CB0(this);
|
||||
RegisterTransitionManager(this, sub_08058D34, 0);
|
||||
RegisterTransitionHandler(this, RollingBarrelManager_OnEnterRoom, NULL);
|
||||
}
|
||||
|
||||
void RollingBarrelManager_Action1(RollingBarrelManager* this) {
|
||||
|
@ -256,7 +256,7 @@ void sub_08058CFC(void) {
|
|||
}
|
||||
}
|
||||
|
||||
void sub_08058D34(void) {
|
||||
void RollingBarrelManager_OnEnterRoom(void) {
|
||||
u16 tmp;
|
||||
u32 tmp2;
|
||||
LoadPaletteGroup(0x28);
|
||||
|
|
|
@ -6,10 +6,11 @@
|
|||
*/
|
||||
#include "manager/staticBackgroundManager.h"
|
||||
#include "common.h"
|
||||
#include "functions.h"
|
||||
#include "screen.h"
|
||||
#include "game.h"
|
||||
#include "functions.h"
|
||||
|
||||
void sub_0805B4B4(StaticBackgroundManager*);
|
||||
void StaticBackgroundManager_OnEnterRoom(StaticBackgroundManager*);
|
||||
void sub_0805B448(StaticBackgroundManager*);
|
||||
void sub_0805B474(StaticBackgroundManager*);
|
||||
|
||||
|
@ -37,7 +38,7 @@ void StaticBackgroundManager_Main(StaticBackgroundManager* this) {
|
|||
super->flags |= ENT_PERSIST;
|
||||
SetEntityPriority((Entity*)this, PRIO_PLAYER_EVENT);
|
||||
if (super->type != 0) {
|
||||
RegisterTransitionManager(this, sub_0805B4B4, NULL);
|
||||
RegisterTransitionHandler(this, StaticBackgroundManager_OnEnterRoom, NULL);
|
||||
}
|
||||
iVar3 = 0x100 - (u32)gRoomControls.height;
|
||||
if (iVar3 < 0) {
|
||||
|
@ -62,7 +63,7 @@ void sub_0805B474(StaticBackgroundManager* this) {
|
|||
gScreen.bg3.xOffset = gRoomControls.scroll_x - ((gRoomControls.width - 0x100) / 2);
|
||||
}
|
||||
|
||||
void sub_0805B4B4(StaticBackgroundManager* this) {
|
||||
void StaticBackgroundManager_OnEnterRoom(StaticBackgroundManager* this) {
|
||||
LoadStaticBackground(super->type);
|
||||
if (super->type == 2) {
|
||||
sub_0806D0F8();
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include "physics.h"
|
||||
#include "room.h"
|
||||
#include "screen.h"
|
||||
#include "game.h"
|
||||
|
||||
const u16 gUnk_08108588[] = { 0x1000, 0xF01, 0xE02, 0xD03, 0xC04, 0xB05, 0xA06, 0x907, 0x808 };
|
||||
|
||||
|
@ -26,8 +27,8 @@ void sub_0805A098(SteamOverlayManager*);
|
|||
void SteamOverlayManager_Action3(SteamOverlayManager*);
|
||||
void sub_0805A114(u32, u32);
|
||||
void sub_0805A1D8(SteamOverlayManager*);
|
||||
void nullsub_495(void*);
|
||||
void sub_0805A25C(void*);
|
||||
void SteamOverlayManager_OnEnterRoom(void*);
|
||||
void SteamOverlayManager_OnExitRoom(void*);
|
||||
|
||||
void SteamOverlayManager_Main(SteamOverlayManager* this) {
|
||||
static void (*const SteamOverlayManager_Actions[])(SteamOverlayManager*) = {
|
||||
|
@ -55,7 +56,7 @@ void SteamOverlayManager_Init(SteamOverlayManager* this) {
|
|||
gScreen.controls.alphaBlend = 0x1000;
|
||||
gScreen.bg3.xOffset = 0x80;
|
||||
gScreen.bg3.yOffset = 0;
|
||||
RegisterTransitionManager(this, nullsub_495, sub_0805A25C);
|
||||
RegisterTransitionHandler(this, SteamOverlayManager_OnEnterRoom, SteamOverlayManager_OnExitRoom);
|
||||
}
|
||||
|
||||
void SteamOverlayManager_Action4(SteamOverlayManager* this) {
|
||||
|
@ -85,11 +86,11 @@ u32 sub_08059F9C(SteamOverlayManager* this) {
|
|||
if (CheckLocalFlag(0x16)) {
|
||||
return 0;
|
||||
}
|
||||
sub_0805A25C(this);
|
||||
SteamOverlayManager_OnExitRoom(this);
|
||||
DeleteThisEntity();
|
||||
break;
|
||||
case 7:
|
||||
sub_0805A25C(this);
|
||||
SteamOverlayManager_OnExitRoom(this);
|
||||
DeleteThisEntity();
|
||||
break;
|
||||
case 0:
|
||||
|
@ -185,10 +186,10 @@ void sub_0805A1D8(SteamOverlayManager* this) {
|
|||
}
|
||||
}
|
||||
|
||||
void nullsub_495(void* this) {
|
||||
void SteamOverlayManager_OnEnterRoom(void* this) {
|
||||
}
|
||||
|
||||
void sub_0805A25C(void* this) {
|
||||
void SteamOverlayManager_OnExitRoom(void* this) {
|
||||
gScreen.controls.layerFXControl = 0;
|
||||
gScreen.lcd.displayControl &= ~DISPCNT_BG3_ON;
|
||||
DisableVBlankDMA();
|
||||
|
|
|
@ -7,10 +7,11 @@
|
|||
#include "manager/templeOfDropletsManager.h"
|
||||
#include "enemy.h"
|
||||
#include "flags.h"
|
||||
#include "functions.h"
|
||||
#include "object.h"
|
||||
#include "screen.h"
|
||||
#include "sound.h"
|
||||
#include "game.h"
|
||||
#include "functions.h"
|
||||
#include "structures.h"
|
||||
|
||||
static const u16 gUnk_081085B8[] = { 0x1008, 0x1007, 0x1006, 0x1005, 0x1006, 0x1007, 0x1008, 0x1009,
|
||||
|
@ -399,7 +400,7 @@ void TempleOfDropletsManager_Type7(TempleOfDropletsManager* this) {
|
|||
}
|
||||
}
|
||||
|
||||
void sub_0805AAC8(TempleOfDropletsManager*);
|
||||
void TempleOfDropletsManager_OnEnterRoom(TempleOfDropletsManager*);
|
||||
|
||||
void sub_0805A89C(TempleOfDropletsManager* this) {
|
||||
SetEntityPriority((Entity*)this, PRIO_PLAYER_EVENT);
|
||||
|
@ -412,7 +413,7 @@ void sub_0805A89C(TempleOfDropletsManager* this) {
|
|||
this->unk_20 = gRoomControls.room;
|
||||
this->unk_24 = gRoomControls.origin_x;
|
||||
this->unk_26 = gRoomControls.origin_y;
|
||||
RegisterTransitionManager(this, sub_0805AAC8, 0);
|
||||
RegisterTransitionHandler(this, TempleOfDropletsManager_OnEnterRoom, NULL);
|
||||
}
|
||||
|
||||
void sub_0805A94C(TempleOfDropletsManager* this);
|
||||
|
@ -505,7 +506,7 @@ void sub_0805AA58(TempleOfDropletsManager* this) {
|
|||
}
|
||||
}
|
||||
|
||||
void sub_0805AAC8(TempleOfDropletsManager* this) {
|
||||
void TempleOfDropletsManager_OnEnterRoom(TempleOfDropletsManager* this) {
|
||||
sub_0805AAF0(this->unk_23);
|
||||
TempleOfDropletsManager_Main(this);
|
||||
}
|
||||
|
|
|
@ -7,16 +7,17 @@
|
|||
#include "manager/vaati3BackgroundManager.h"
|
||||
#include "area.h"
|
||||
#include "common.h"
|
||||
#include "functions.h"
|
||||
#include "room.h"
|
||||
#include "screen.h"
|
||||
#include "game.h"
|
||||
#include "functions.h"
|
||||
|
||||
void sub_0805D470(Vaati3BackgroundManager*);
|
||||
void Vaati3BackgroundManager_OnEnterRoom(Vaati3BackgroundManager*);
|
||||
|
||||
void Vaati3BackgroundManager_Main(Vaati3BackgroundManager* this) {
|
||||
if (this == NULL) {
|
||||
if (gArea.onEnter != sub_0805D470) {
|
||||
sub_0805D470(NULL);
|
||||
if (gArea.onEnter != Vaati3BackgroundManager_OnEnterRoom) {
|
||||
Vaati3BackgroundManager_OnEnterRoom(NULL);
|
||||
}
|
||||
} else {
|
||||
if (super->action == 0) {
|
||||
|
@ -24,7 +25,7 @@ void Vaati3BackgroundManager_Main(Vaati3BackgroundManager* this) {
|
|||
super->flags |= ENT_PERSIST;
|
||||
SetEntityPriority((Entity*)this, PRIO_PLAYER_EVENT);
|
||||
if (gArea.onEnter == NULL) {
|
||||
RegisterTransitionManager(this, sub_0805D470, NULL);
|
||||
RegisterTransitionHandler(this, Vaati3BackgroundManager_OnEnterRoom, NULL);
|
||||
} else {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
|
@ -37,7 +38,7 @@ void Vaati3BackgroundManager_Main(Vaati3BackgroundManager* this) {
|
|||
}
|
||||
}
|
||||
|
||||
void sub_0805D470(Vaati3BackgroundManager* this) {
|
||||
void Vaati3BackgroundManager_OnEnterRoom(Vaati3BackgroundManager* this) {
|
||||
LoadGfxGroup(0x4c);
|
||||
gScreen.bg3.control = 0x1e07;
|
||||
gScreen.lcd.displayControl |= DISPCNT_BG3_ON;
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include "functions.h"
|
||||
#include "game.h"
|
||||
#include "screen.h"
|
||||
extern void sub_080576A0(void*);
|
||||
extern void VerticalMinishPathBackgroundManager_OnEnterRoom(void*);
|
||||
extern void sub_0805754C(VerticalMinishPathBackgroundManager*);
|
||||
|
||||
extern u8 gMapDataTopSpecial[];
|
||||
|
@ -19,7 +19,7 @@ void VerticalMinishPathBackgroundManager_Main(VerticalMinishPathBackgroundManage
|
|||
super->action = 1;
|
||||
gScreen.bg3.updated = 0;
|
||||
gScreen.bg1.updated = 0;
|
||||
RegisterTransitionManager(this, sub_080576A0, NULL);
|
||||
RegisterTransitionHandler(this, VerticalMinishPathBackgroundManager_OnEnterRoom, NULL);
|
||||
}
|
||||
sub_0805754C(this);
|
||||
}
|
||||
|
@ -79,7 +79,7 @@ void sub_08057688(void) {
|
|||
gScreen.bg1.control = BGCNT_SCREENBASE(30) | BGCNT_CHARBASE(2) | BGCNT_MOSAIC;
|
||||
}
|
||||
|
||||
void sub_080576A0(void* this) {
|
||||
void VerticalMinishPathBackgroundManager_OnEnterRoom(void* this) {
|
||||
LoadGfxGroup(gRoomVars.graphicsGroups[0]);
|
||||
((VerticalMinishPathBackgroundManager*)this)->field_0x38 = NULL;
|
||||
((VerticalMinishPathBackgroundManager*)this)->field_0x3c = NULL;
|
||||
|
|
|
@ -8,14 +8,14 @@
|
|||
#include "area.h"
|
||||
#include "asm.h"
|
||||
#include "common.h"
|
||||
#include "fileselect.h"
|
||||
#include "functions.h"
|
||||
#include "main.h"
|
||||
#include "room.h"
|
||||
#include "screen.h"
|
||||
#include "sound.h"
|
||||
#include "game.h"
|
||||
#include "functions.h"
|
||||
|
||||
void sub_080595E4(WeatherChangeManager*);
|
||||
void WeatherChangeManager_OnEnterRoom(WeatherChangeManager*);
|
||||
void sub_08059608(WeatherChangeManager*);
|
||||
void sub_08059690(WeatherChangeManager*);
|
||||
void sub_080596E0(WeatherChangeManager*);
|
||||
|
@ -45,14 +45,14 @@ void WeatherChangeManager_Main(WeatherChangeManager* this) {
|
|||
this->unk_22 = 5;
|
||||
}
|
||||
gRoomVars.graphicsGroups[0] = 0xFF;
|
||||
RegisterTransitionManager(this, sub_080595E4, 0);
|
||||
RegisterTransitionHandler(this, WeatherChangeManager_OnEnterRoom, NULL);
|
||||
}
|
||||
sub_08059608(this);
|
||||
sub_08059690(this);
|
||||
sub_080596E0(this);
|
||||
}
|
||||
|
||||
void sub_080595E4(WeatherChangeManager* this) {
|
||||
void WeatherChangeManager_OnEnterRoom(WeatherChangeManager* this) {
|
||||
gRoomVars.graphicsGroups[0] = 0xFF;
|
||||
sub_08059690(this);
|
||||
sub_080596E0(this);
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
*
|
||||
* @brief Giant Book Ladder object
|
||||
*/
|
||||
#include "manager.h"
|
||||
#include "map.h"
|
||||
#include "object.h"
|
||||
#include "tiles.h"
|
||||
#include "game.h"
|
||||
|
||||
typedef struct {
|
||||
Entity base;
|
||||
|
@ -16,7 +16,7 @@ typedef struct {
|
|||
u16 unk76;
|
||||
} GiantBookLadderEntity;
|
||||
|
||||
void sub_0808E55C(GiantBookLadderEntity*);
|
||||
void GiantBookLadder_OnEnterRoom(GiantBookLadderEntity*);
|
||||
u32 sub_0808E670(GiantBookLadderEntity*);
|
||||
|
||||
void GiantBookLadder(Entity* this) {
|
||||
|
@ -33,14 +33,14 @@ void GiantBookLadder(Entity* this) {
|
|||
this->spritePriority.b0 = spriteDefPtr[1];
|
||||
((GiantBookLadderEntity*)this)->unk76 = 0;
|
||||
((GiantBookLadderEntity*)this)->unk74 = COORD_TO_TILE(this);
|
||||
sub_0808E55C((GiantBookLadderEntity*)this);
|
||||
RegisterTransitionManager(this, sub_0808E55C, 0);
|
||||
GiantBookLadder_OnEnterRoom((GiantBookLadderEntity*)this);
|
||||
RegisterTransitionHandler(this, GiantBookLadder_OnEnterRoom, NULL);
|
||||
} else if ((this->type & 1) == 0) {
|
||||
sub_0808E670((GiantBookLadderEntity*)this);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0808E55C(GiantBookLadderEntity* this) {
|
||||
void GiantBookLadder_OnEnterRoom(GiantBookLadderEntity* this) {
|
||||
u32 type;
|
||||
u32 uVar4;
|
||||
u32 unaff_r9;
|
||||
|
|
|
@ -20,7 +20,7 @@ extern u32 sub_08060354(void);
|
|||
extern void MinishVillageTileSetManger_LoadInitialGfxGroup(void);
|
||||
extern void sub_0809F814(u32);
|
||||
extern void sub_080300E8(void);
|
||||
extern void sub_08058D34(void);
|
||||
extern void RollingBarrelManager_OnEnterRoom(void);
|
||||
extern void sub_0807BB98(u32, u32, u32, u32);
|
||||
extern void sub_080AF2E4(void);
|
||||
extern void sub_08059994(void);
|
||||
|
@ -2342,7 +2342,7 @@ u32 sub_unk3_DeepwoodShrine_InsideBarrel(void) {
|
|||
}
|
||||
|
||||
void sub_StateChange_DeepwoodShrine_InsideBarrel(void) {
|
||||
sub_08058D34();
|
||||
RollingBarrelManager_OnEnterRoom();
|
||||
gArea.areaMetadata |= AR_HAS_NO_ENEMIES;
|
||||
gMain.substate = GAMEMAIN_BARRELUPDATE;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue