mirror of
https://github.com/izzy2lost/2ship2harkinian-Android.git
synced 2026-06-19 01:20:08 -07:00
Add ActorResetFunc for variable cleanup (#98)
* add actor reset func handling * reset func for day transitions * reset func for deku playground * reset func for dog race * reset func for grass * reset func for goron shrine chandelier * reset func for lost woods intro sparkles * reset func for deku palace patrol guards * reset func for dampe * reset func for beaver race rings * reset func for butler race doors * reset funcs for deep sea python * reset func for dogs * reset func for deku curse mad scrubs * reset func for keaton grass * reset func for marine lab fish * reset func for shooting gallery scrubs * reset func for Stone Tower FloorSwitch * reset func for ice platforms * reset func for punchable pillar * reset func for blue warps * reset func for odolwa * reset func for twinmold * reset func for gyorg * reset func for wart * reset func for igos window * reset func for majora * reset func for snow head central pillar
This commit is contained in:
@@ -27,6 +27,10 @@ typedef void (*ActorFunc)(struct Actor* this, struct PlayState* play);
|
||||
typedef u16 (*NpcGetTextIdFunc)(struct PlayState*, struct Actor*);
|
||||
typedef s16 (*NpcUpdateTalkStateFunc)(struct PlayState*, struct Actor*);
|
||||
|
||||
// #region 2S2H [Port] Reset func used for cleaning up static variables
|
||||
typedef void (*ActorResetFunc)(void);
|
||||
// #endregion
|
||||
|
||||
typedef struct PosRot {
|
||||
/* 0x00 */ Vec3f pos;
|
||||
/* 0x0C */ Vec3s rot;
|
||||
@@ -47,6 +51,9 @@ typedef struct ActorInit {
|
||||
/* 0x14 */ ActorFunc destroy;
|
||||
/* 0x18 */ ActorFunc update;
|
||||
/* 0x1C */ ActorFunc draw;
|
||||
// #region 2S2H [Port]
|
||||
/* */ ActorResetFunc reset;
|
||||
// #endregion
|
||||
} ActorInit; // size = 0x20
|
||||
|
||||
typedef enum AllocType {
|
||||
|
||||
+24
-7
@@ -3254,6 +3254,14 @@ Actor* Actor_RemoveFromCategory(PlayState* play, ActorContext* actorCtx, Actor*
|
||||
|
||||
void Actor_FreeOverlay(ActorOverlay* entry) {
|
||||
if (entry->numLoaded == 0) {
|
||||
// #region 2S2H [Port] Added reset function is called when loaded count is 0
|
||||
// to clean up static variables
|
||||
if (entry->initInfo->reset != NULL) {
|
||||
entry->initInfo->reset();
|
||||
}
|
||||
// #endregion
|
||||
|
||||
// 2S2H [Port] ramAddr will always be NULL for the port, so this block will never run
|
||||
void* ramAddr = entry->loadedRamAddr;
|
||||
|
||||
if (ramAddr != NULL) {
|
||||
@@ -3282,6 +3290,7 @@ ActorInit* Actor_LoadOverlay(ActorContext* actorCtx, s16 index) {
|
||||
|
||||
overlaySize = (uintptr_t)overlayEntry->vramEnd - (uintptr_t)overlayEntry->vramStart;
|
||||
|
||||
// 2S2H [Port] vramStart will always be NULL in the port, so the else block is never run
|
||||
if (overlayEntry->vramStart == NULL) {
|
||||
actorInit = overlayEntry->initInfo;
|
||||
} else {
|
||||
@@ -3348,7 +3357,12 @@ Actor* Actor_SpawnAsChildAndCutscene(ActorContext* actorCtx, PlayState* play, s1
|
||||
}
|
||||
|
||||
overlayEntry = &gActorOverlayTable[index];
|
||||
if (overlayEntry->vramStart != NULL) {
|
||||
// #region 2S2H [Port] Our actors are always loaded and have no vramStart
|
||||
// but we want to simulate them being unloaded to execute our actor reset funcs
|
||||
// for static variable cleanup
|
||||
// if (overlayEntry->vramStart != NULL) {
|
||||
if (true) {
|
||||
// #endregion
|
||||
overlayEntry->numLoaded++;
|
||||
}
|
||||
|
||||
@@ -3499,12 +3513,15 @@ Actor* Actor_Delete(ActorContext* actorCtx, Actor* actor, PlayState* play) {
|
||||
|
||||
newHead = Actor_RemoveFromCategory(play, actorCtx, actor);
|
||||
ZeldaArena_Free(actor);
|
||||
// BENTODO shouldn't need this check
|
||||
if (overlayEntry != NULL) {
|
||||
if (overlayEntry->vramStart != NULL) {
|
||||
overlayEntry->numLoaded--;
|
||||
Actor_FreeOverlay(overlayEntry);
|
||||
}
|
||||
|
||||
// #region 2S2H [Port] Our actors are always loaded and have no vramStart
|
||||
// but we want to simulate them being unloaded to execute our actor reset funcs
|
||||
// for static variable cleanup
|
||||
// if (overlayEntry->vramStart != NULL) {
|
||||
if (true) {
|
||||
// #endregion
|
||||
overlayEntry->numLoaded--;
|
||||
Actor_FreeOverlay(overlayEntry);
|
||||
}
|
||||
|
||||
return newHead;
|
||||
|
||||
@@ -15,6 +15,7 @@ void BgCraceMovebg_Init(Actor* thisx, PlayState* play);
|
||||
void BgCraceMovebg_Destroy(Actor* thisx, PlayState* play);
|
||||
void BgCraceMovebg_Update(Actor* thisx, PlayState* play);
|
||||
void BgCraceMovebg_Draw(Actor* thisx, PlayState* play);
|
||||
void BgCraceMovebg_Reset(void);
|
||||
|
||||
s32 BgCraceMovebg_GetRaceStatus(PlayState* play);
|
||||
void BgCraceMovebg_OpeningDoor_SetupIdle(BgCraceMovebg* this, PlayState* play);
|
||||
@@ -51,6 +52,7 @@ ActorInit Bg_Crace_Movebg_InitVars = {
|
||||
/**/ BgCraceMovebg_Destroy,
|
||||
/**/ BgCraceMovebg_Update,
|
||||
/**/ BgCraceMovebg_Draw,
|
||||
/**/ BgCraceMovebg_Reset,
|
||||
};
|
||||
|
||||
static u8 sHasInitializedIsLoaded = 0;
|
||||
@@ -353,3 +355,8 @@ void BgCraceMovebg_ClosingDoor_DoNothing(BgCraceMovebg* this, PlayState* play) {
|
||||
void BgCraceMovebg_Draw(Actor* thisx, PlayState* play) {
|
||||
Gfx_DrawDListOpa(play, gDekuShrineSlidingDoorDL);
|
||||
}
|
||||
|
||||
void BgCraceMovebg_Reset(void) {
|
||||
sHasInitializedIsLoaded = false;
|
||||
sLoadedDoorCount = 0;
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ void BgF40Switch_Init(Actor* thisx, PlayState* play);
|
||||
void BgF40Switch_Destroy(Actor* thisx, PlayState* play);
|
||||
void BgF40Switch_Update(Actor* thisx, PlayState* play);
|
||||
void BgF40Switch_Draw(Actor* thisx, PlayState* play);
|
||||
void BgF40Switch_Reset(void);
|
||||
|
||||
void BgF40Switch_CheckAll(BgF40Switch* this, PlayState* play);
|
||||
void BgF40Switch_Unpress(BgF40Switch* this, PlayState* play);
|
||||
@@ -34,6 +35,7 @@ ActorInit Bg_F40_Switch_InitVars = {
|
||||
/**/ BgF40Switch_Destroy,
|
||||
/**/ BgF40Switch_Update,
|
||||
/**/ BgF40Switch_Draw,
|
||||
/**/ BgF40Switch_Reset,
|
||||
};
|
||||
|
||||
s32 sBgF40SwitchGlobalsInitialized = false;
|
||||
@@ -192,3 +194,7 @@ void BgF40Switch_Draw(Actor* thisx, PlayState* play) {
|
||||
Gfx_DrawDListOpa(play, gStoneTowerFloorSwitchDL);
|
||||
Gfx_DrawDListOpa(play, gStoneTowerFloorSwitchOutlineDL);
|
||||
}
|
||||
|
||||
void BgF40Switch_Reset(void) {
|
||||
sBgF40SwitchGlobalsInitialized = false;
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
void BgHakuginPost_Init(Actor* thisx, PlayState* play);
|
||||
void BgHakuginPost_Destroy(Actor* thisx, PlayState* play);
|
||||
void BgHakuginPost_Update(Actor* thisx, PlayState* play);
|
||||
void BgHakuginPost_Reset(void);
|
||||
|
||||
void func_80A9CA94(BgHakuginPost* this);
|
||||
void func_80A9CAA8(BgHakuginPost* this, PlayState* play);
|
||||
@@ -50,6 +51,7 @@ ActorInit Bg_Hakugin_Post_InitVars = {
|
||||
/**/ BgHakuginPost_Destroy,
|
||||
/**/ BgHakuginPost_Update,
|
||||
/**/ NULL,
|
||||
/**/ BgHakuginPost_Reset,
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
@@ -688,8 +690,13 @@ void func_80A9C854(BgHakuginPost* this, PlayState* play) {
|
||||
}
|
||||
}
|
||||
|
||||
// #region 2S2H [Port]
|
||||
// Moved static vars out of function scope so they can be cleared in actor reset
|
||||
static s32 D_80A9D8FC = 1;
|
||||
|
||||
void BgHakuginPost_Init(Actor* thisx, PlayState* play) {
|
||||
static s32 D_80A9D8FC = 1;
|
||||
// static s32 D_80A9D8FC = 1;
|
||||
// #endregion
|
||||
BgHakuginPost* this = THIS;
|
||||
|
||||
if (D_80A9D8FC != 0) {
|
||||
@@ -1048,3 +1055,7 @@ void func_80A9D61C(Actor* thisx, PlayState* play) {
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
||||
void BgHakuginPost_Reset(void) {
|
||||
D_80A9D8FC = 1;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ void BgIcefloe_Init(Actor* thisx, PlayState* play);
|
||||
void BgIcefloe_Destroy(Actor* thisx, PlayState* play);
|
||||
void BgIcefloe_Update(Actor* thisx, PlayState* play);
|
||||
void BgIcefloe_Draw(Actor* thisx, PlayState* play);
|
||||
void BgIcefloe_Reset(void);
|
||||
|
||||
void func_80AC4A80(BgIcefloe* this, PlayState* play);
|
||||
void BgIcefloe_Grow(BgIcefloe* this, PlayState* play);
|
||||
@@ -33,6 +34,7 @@ ActorInit Bg_Icefloe_InitVars = {
|
||||
/**/ BgIcefloe_Destroy,
|
||||
/**/ BgIcefloe_Update,
|
||||
/**/ BgIcefloe_Draw,
|
||||
/**/ BgIcefloe_Reset,
|
||||
};
|
||||
static BgIcefloe* sSpawnedInstances[] = { NULL, NULL, NULL };
|
||||
|
||||
@@ -175,3 +177,11 @@ void BgIcefloe_Draw(Actor* thisx, PlayState* play) {
|
||||
|
||||
Gfx_DrawDListOpa(play, gIcefloeIcePlatformDL);
|
||||
}
|
||||
|
||||
void BgIcefloe_Reset(void) {
|
||||
numberSpawned = 0;
|
||||
|
||||
for (int i = 0; i < ARRAY_COUNT(sSpawnedInstances); i++) {
|
||||
sSpawnedInstances[i] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ void BgIkanaDharma_Init(Actor* thisx, PlayState* play2);
|
||||
void BgIkanaDharma_Destroy(Actor* thisx, PlayState* play);
|
||||
void BgIkanaDharma_Update(Actor* thisx, PlayState* play);
|
||||
void BgIkanaDharma_Draw(Actor* thisx, PlayState* play);
|
||||
void BgIkanaDharma_Reset(void);
|
||||
|
||||
void BgIkanaDharma_SetupWaitForHit(BgIkanaDharma* this);
|
||||
void BgIkanaDharma_WaitForHit(BgIkanaDharma* this, PlayState* play);
|
||||
@@ -34,6 +35,7 @@ ActorInit Bg_Ikana_Dharma_InitVars = {
|
||||
/**/ BgIkanaDharma_Destroy,
|
||||
/**/ BgIkanaDharma_Update,
|
||||
/**/ BgIkanaDharma_Draw,
|
||||
/**/ BgIkanaDharma_Reset,
|
||||
};
|
||||
|
||||
static ColliderCylinderInit sCylinderInit = {
|
||||
@@ -262,3 +264,7 @@ void BgIkanaDharma_Draw(Actor* thisx, PlayState* play) {
|
||||
|
||||
Gfx_DrawDListOpa(play, gStoneTowerTemplePunchablePillarDL);
|
||||
}
|
||||
|
||||
void BgIkanaDharma_Reset(void) {
|
||||
sFirstHitBgIkanaDharma = NULL;
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
void BgSinkaiKabe_Init(Actor* thisx, PlayState* play);
|
||||
void BgSinkaiKabe_Destroy(Actor* thisx, PlayState* play);
|
||||
void BgSinkaiKabe_Update(Actor* thisx, PlayState* play);
|
||||
void BgSinkaiKabe_Reset(void);
|
||||
|
||||
void BgSinkaiKabe_WaitForPlayer(BgSinkaiKabe* this, PlayState* play);
|
||||
|
||||
@@ -35,6 +36,7 @@ ActorInit Bg_Sinkai_Kabe_InitVars = {
|
||||
/**/ BgSinkaiKabe_Destroy,
|
||||
/**/ BgSinkaiKabe_Update,
|
||||
/**/ NULL,
|
||||
/**/ BgSinkaiKabe_Reset,
|
||||
};
|
||||
|
||||
static s32 sCurrentPythonIndex = 0;
|
||||
@@ -150,3 +152,7 @@ void BgSinkaiKabe_Update(Actor* thisx, PlayState* play) {
|
||||
|
||||
this->actionFunc(this, play);
|
||||
}
|
||||
|
||||
void BgSinkaiKabe_Reset(void) {
|
||||
sCurrentPythonIndex = 0;
|
||||
}
|
||||
|
||||
@@ -49,6 +49,7 @@ void Boss01_Init(Actor* thisx, PlayState* play);
|
||||
void Boss01_Destroy(Actor* thisx, PlayState* play);
|
||||
void Boss01_Update(Actor* thisx, PlayState* play2);
|
||||
void Boss01_Draw(Actor* thisx, PlayState* play);
|
||||
void Boss01_Reset(void);
|
||||
|
||||
void Boss01_SetupIntroCutscene(Boss01* this, PlayState* play);
|
||||
void Boss01_IntroCutscene(Boss01* this, PlayState* play);
|
||||
@@ -646,6 +647,7 @@ ActorInit Boss_01_InitVars = {
|
||||
/**/ Boss01_Destroy,
|
||||
/**/ Boss01_Update,
|
||||
/**/ Boss01_Draw,
|
||||
/**/ Boss01_Reset,
|
||||
};
|
||||
|
||||
static Color_RGBA8 sDustPrimColor = { 60, 50, 20, 255 };
|
||||
@@ -3588,3 +3590,14 @@ void Boss01_DrawEffects(PlayState* play) {
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
||||
void Boss01_Reset(void) {
|
||||
sOdolwaBugCount = 0;
|
||||
sOdolwa = NULL;
|
||||
sMothSwarm = NULL;
|
||||
sOdolwaMusicStartTimer = 0;
|
||||
|
||||
for (int i = 0; i < ODOLWA_EFFECT_COUNT; i++) {
|
||||
sOdolwaEffects[i].type = ODOLWA_EFFECT_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ void Boss02_Init(Actor* thisx, PlayState* play);
|
||||
void Boss02_Destroy(Actor* thisx, PlayState* play);
|
||||
void Boss02_Twinmold_Update(Actor* thisx, PlayState* play);
|
||||
void Boss02_Twinmold_Draw(Actor* thisx, PlayState* play2);
|
||||
void Boss02_Reset(void);
|
||||
|
||||
void func_809DAA74(Boss02* this, PlayState* play);
|
||||
void func_809DAA98(Boss02* this, PlayState* play);
|
||||
@@ -153,6 +154,7 @@ ActorInit Boss_02_InitVars = {
|
||||
/**/ Boss02_Destroy,
|
||||
/**/ Boss02_Twinmold_Update,
|
||||
/**/ Boss02_Twinmold_Draw,
|
||||
/**/ Boss02_Reset,
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -2327,3 +2329,18 @@ void func_809DEAC4(Boss02* this, PlayState* play) {
|
||||
ShrinkWindow_Letterbox_SetSizeTarget(27);
|
||||
}
|
||||
}
|
||||
|
||||
void Boss02_Reset(void) {
|
||||
sCanSkipMaskOnCs = false;
|
||||
sCanSkipMaskOffCs = false;
|
||||
sIsInGiantMode = false;
|
||||
sRedTwinmold = NULL;
|
||||
sBlueTwinmold = NULL;
|
||||
sTwinmoldStatic = NULL;
|
||||
sTwinmoldMusicStartTimer = 0;
|
||||
sBlueWarp = NULL;
|
||||
|
||||
for (int i = 0; i < TWINMOLD_EFFECT_COUNT; i++) {
|
||||
sTwinmoldEffects[i].type = TWINMOLD_EFFECT_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2646,3 +2646,14 @@ void Boss03_SeaweedDraw(Actor* thisx, PlayState* play) {
|
||||
}
|
||||
|
||||
/* End of Seaweed section */
|
||||
|
||||
void Boss03_Reset(void) {
|
||||
D_809E9840 = 0;
|
||||
D_809E9841 = 0;
|
||||
D_809E9842 = 0;
|
||||
sGyorgBossInstance = NULL;
|
||||
|
||||
for (int i = 0; i < GYORG_EFFECT_COUNT; i++) {
|
||||
sGyorgEffects[i].type = GYORG_EFFECT_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ void Boss04_Init(Actor* thisx, PlayState* play2);
|
||||
void Boss04_Destroy(Actor* thisx, PlayState* play);
|
||||
void Boss04_Update(Actor* thisx, PlayState* play2);
|
||||
void Boss04_Draw(Actor* thisx, PlayState* play);
|
||||
void Boss04_Reset(void);
|
||||
|
||||
void func_809EC544(Boss04* this);
|
||||
void func_809EC568(Boss04* this, PlayState* play);
|
||||
@@ -73,6 +74,7 @@ ActorInit Boss_04_InitVars = {
|
||||
/**/ Boss04_Destroy,
|
||||
/**/ Boss04_Update,
|
||||
/**/ Boss04_Draw,
|
||||
/**/ Boss04_Reset,
|
||||
};
|
||||
|
||||
static ColliderJntSphElementInit sJntSphElementsInit1[1] = {
|
||||
@@ -849,3 +851,7 @@ void Boss04_Draw(Actor* thisx, PlayState* play) {
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
||||
void Boss04_Reset(void) {
|
||||
D_809EE4D0 = 0;
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ void Boss06_Init(Actor* thisx, PlayState* play);
|
||||
void Boss06_Destroy(Actor* thisx, PlayState* play);
|
||||
void Boss06_Update(Actor* thisx, PlayState* play);
|
||||
void Boss06_Draw(Actor* thisx, PlayState* play2);
|
||||
void Boss06_Reset(void);
|
||||
|
||||
void func_809F24A8(Boss06* this);
|
||||
void func_809F24C8(Boss06* this, PlayState* play);
|
||||
@@ -82,6 +83,7 @@ ActorInit Boss_06_InitVars = {
|
||||
/**/ Boss06_Destroy,
|
||||
/**/ Boss06_Update,
|
||||
/**/ Boss06_Draw,
|
||||
/**/ Boss06_Reset,
|
||||
};
|
||||
|
||||
static ColliderCylinderInit sCylinderInit = {
|
||||
@@ -655,3 +657,10 @@ void Boss06_Draw(Actor* thisx, PlayState* play2) {
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
||||
void Boss06_Reset(void) {
|
||||
D_809F4970 = NULL;
|
||||
D_809F4974 = 0;
|
||||
D_809F4978 = 0;
|
||||
D_809F497C = 0;
|
||||
}
|
||||
|
||||
@@ -252,6 +252,7 @@ void Boss07_Mask_ClearBeam(Boss07* this);
|
||||
|
||||
void Boss07_Init(Actor* thisx, PlayState* play2);
|
||||
void Boss07_Destroy(Actor* thisx, PlayState* play2);
|
||||
void Boss07_Reset(void);
|
||||
|
||||
void Boss07_Wrath_Update(Actor* thisx, PlayState* play2);
|
||||
void Boss07_Static_Update(Actor* thisx, PlayState* play2);
|
||||
@@ -384,6 +385,7 @@ ActorInit Boss_07_InitVars = {
|
||||
(ActorFunc)Boss07_Destroy,
|
||||
(ActorFunc)Boss07_Wrath_Update,
|
||||
(ActorFunc)Boss07_Wrath_Draw,
|
||||
/**/ Boss07_Reset,
|
||||
};
|
||||
|
||||
#include "z_boss_07_colchk.inc"
|
||||
@@ -6068,3 +6070,26 @@ void Boss07_Static_DrawEffects(PlayState* play) {
|
||||
}
|
||||
CLOSE_DISPS(gfxCtx);
|
||||
}
|
||||
|
||||
void Boss07_Reset(void) {
|
||||
sHeartbeatTimer = 0;
|
||||
sWhipSegCount = 0;
|
||||
sMajorasWrath = NULL;
|
||||
sMajoraStatic = NULL;
|
||||
sMajorasMask = NULL;
|
||||
|
||||
for (int i = 0; i < REMAINS_COUNT; i++) {
|
||||
sBossRemains[i] = NULL;
|
||||
}
|
||||
|
||||
sKillProjectiles = 0;
|
||||
sMusicStartTimer = 0;
|
||||
|
||||
for (int i = 0; i < EFFECT_COUNT; i++) {
|
||||
sEffects[i].type = MAJORAS_EFFECT_NONE;
|
||||
}
|
||||
|
||||
sSeed0 = 0;
|
||||
sSeed1 = 0;
|
||||
sSeed2 = 0;
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ void DemoKankyo_Init(Actor* thisx, PlayState* play);
|
||||
void DemoKankyo_Destroy(Actor* thisx, PlayState* play);
|
||||
void DemoKankyo_Update(Actor* thisx, PlayState* play);
|
||||
void DemoKankyo_Draw(Actor* thisx, PlayState* play);
|
||||
void DemoKankyo_Reset(void);
|
||||
|
||||
void DemoKakyo_MoonSparklesActionFunc(DemoKankyo* this, PlayState* play);
|
||||
|
||||
@@ -33,6 +34,7 @@ ActorInit Demo_Kankyo_InitVars = {
|
||||
/**/ DemoKankyo_Destroy,
|
||||
/**/ DemoKankyo_Update,
|
||||
/**/ DemoKankyo_Draw,
|
||||
/**/ DemoKankyo_Reset,
|
||||
};
|
||||
|
||||
static s32 sObjectBubbleId = OBJECT_BUBBLE | 0x10000;
|
||||
@@ -681,3 +683,8 @@ void DemoKankyo_Draw(Actor* thisx, PlayState* play) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void DemoKankyo_Reset(void) {
|
||||
sLostWoodsSparklesMutex = false;
|
||||
sLostWoodsSkyFishParticleNum = 0;
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ void DoorWarp1_Init(Actor* thisx, PlayState* play);
|
||||
void DoorWarp1_Destroy(Actor* thisx, PlayState* play);
|
||||
void DoorWarp1_Update(Actor* thisx, PlayState* play);
|
||||
void DoorWarp1_Draw(Actor* thisx, PlayState* play);
|
||||
void DoorWarp1_Reset(void);
|
||||
|
||||
void DoorWarp1_SetupAction(DoorWarp1* this, DoorWarp1ActionFunc actionFunc);
|
||||
void func_808B8924(DoorWarp1* this, PlayState* play);
|
||||
@@ -60,6 +61,7 @@ ActorInit Door_Warp1_InitVars = {
|
||||
/**/ DoorWarp1_Destroy,
|
||||
/**/ DoorWarp1_Update,
|
||||
/**/ DoorWarp1_Draw,
|
||||
/**/ DoorWarp1_Reset,
|
||||
};
|
||||
|
||||
static InitChainEntry sInitChain[] = {
|
||||
@@ -1154,3 +1156,8 @@ void func_808BB8D4(DoorWarp1* this, PlayState* play, s32 arg2) {
|
||||
EffectSsKirakira_SpawnDispersed(play, &pos, &sVelocity, &sAccel, &primColor, &envColor, scale, life);
|
||||
}
|
||||
}
|
||||
|
||||
void DoorWarp1_Reset(void) {
|
||||
D_808BC000 = 0;
|
||||
D_808BC004 = 0;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ void EnDg_Init(Actor* thisx, PlayState* play);
|
||||
void EnDg_Destroy(Actor* thisx, PlayState* play);
|
||||
void EnDg_Update(Actor* thisx, PlayState* play);
|
||||
void EnDg_Draw(Actor* thisx, PlayState* play);
|
||||
void EnDg_Reset(void);
|
||||
|
||||
void EnDg_IdleMove(EnDg* this, PlayState* play);
|
||||
void EnDg_IdleBark(EnDg* this, PlayState* play);
|
||||
@@ -47,6 +48,7 @@ ActorInit En_Dg_InitVars = {
|
||||
/**/ EnDg_Destroy,
|
||||
/**/ EnDg_Update,
|
||||
/**/ EnDg_Draw,
|
||||
/**/ EnDg_Reset,
|
||||
};
|
||||
|
||||
#define DOG_FLAG_NONE 0
|
||||
@@ -1437,3 +1439,8 @@ void EnDg_Draw(Actor* thisx, PlayState* play) {
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
||||
void EnDg_Reset(void) {
|
||||
sIsAnyDogHeld = false;
|
||||
sBremenMaskFollowerIndex = ENDG_INDEX_NO_BREMEN_MASK_FOLLOWER;
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
void EnDnk_Init(Actor* thisx, PlayState* play);
|
||||
void EnDnk_Destroy(Actor* thisx, PlayState* play);
|
||||
void EnDnk_Update(Actor* thisx, PlayState* play);
|
||||
void EnDnk_Reset(void);
|
||||
|
||||
void EnDnk_HandleCutscene(EnDnk* this, PlayState* play);
|
||||
void EnDnk_DoNothing(EnDnk* this, PlayState* play);
|
||||
@@ -31,6 +32,7 @@ ActorInit En_Dnk_InitVars = {
|
||||
/**/ EnDnk_Destroy,
|
||||
/**/ EnDnk_Update,
|
||||
/**/ NULL,
|
||||
/**/ EnDnk_Reset,
|
||||
};
|
||||
|
||||
static ColliderCylinderInit sCylinderInit = {
|
||||
@@ -500,3 +502,7 @@ void func_80A52134(EnDnk* this, PlayState* play) {
|
||||
func_80A52074(this, play);
|
||||
}
|
||||
}
|
||||
|
||||
void EnDnk_Reset(void) {
|
||||
D_80A521A0 = 0;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ void EnDragon_Init(Actor* thisx, PlayState* play);
|
||||
void EnDragon_Destroy(Actor* thisx, PlayState* play);
|
||||
void EnDragon_Update(Actor* thisx, PlayState* play);
|
||||
void EnDragon_Draw(Actor* thisx, PlayState* play);
|
||||
void EnDragon_Reset(void);
|
||||
|
||||
void EnDragon_SetupRetreatOrIdle(EnDragon* this);
|
||||
void EnDragon_RetreatOrIdle(EnDragon* this, PlayState* play);
|
||||
@@ -54,6 +55,7 @@ ActorInit En_Dragon_InitVars = {
|
||||
/**/ EnDragon_Destroy,
|
||||
/**/ EnDragon_Update,
|
||||
/**/ EnDragon_Draw,
|
||||
/**/ EnDragon_Reset,
|
||||
};
|
||||
|
||||
typedef enum {
|
||||
@@ -848,3 +850,7 @@ void EnDragon_Draw(Actor* thisx, PlayState* play) {
|
||||
SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
|
||||
EnDragon_OverrideLimbDraw, EnDragon_PostLimbDraw, &this->actor);
|
||||
}
|
||||
|
||||
void EnDragon_Reset(void) {
|
||||
sNumPythonsDead = 0;
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ void EnFish2_Init(Actor* thisx, PlayState* play);
|
||||
void EnFish2_Destroy(Actor* thisx, PlayState* play);
|
||||
void EnFish2_Update(Actor* thisx, PlayState* play2);
|
||||
void EnFish2_Draw(Actor* thisx, PlayState* play);
|
||||
void EnFish2_Reset(void);
|
||||
|
||||
void func_80B28B5C(EnFish2* this);
|
||||
void func_80B28C14(EnFish2* this, PlayState* play);
|
||||
@@ -58,6 +59,7 @@ ActorInit En_Fish2_InitVars = {
|
||||
/**/ EnFish2_Destroy,
|
||||
/**/ EnFish2_Update,
|
||||
/**/ EnFish2_Draw,
|
||||
/**/ EnFish2_Reset,
|
||||
};
|
||||
|
||||
static ColliderJntSphElementInit sJntSphElementsInit[2] = {
|
||||
@@ -1195,3 +1197,12 @@ void func_80B2B180(EnFish2* this, PlayState* play) {
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
||||
void EnFish2_Reset(void) {
|
||||
D_80B2B2E0 = 0;
|
||||
D_80B2B2E4 = 0;
|
||||
D_80B2B2E8 = false;
|
||||
D_80B2B2EC = 0;
|
||||
D_80B2B2F0 = 0;
|
||||
D_80B2B2F4 = NULL;
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user