mirror of
https://github.com/zeldaret/mm.git
synced 2026-08-20 05:36:55 -04:00
merge master
This commit is contained in:
+28
-28
@@ -365,7 +365,7 @@ s16 gItemPrices[] = {
|
||||
};
|
||||
|
||||
// Used to map scene indexes to their region in Termina
|
||||
u16 gScenesPerRegion[11][27] = {
|
||||
u16 gSceneIdsPerRegion[11][27] = {
|
||||
// Great Bay
|
||||
{
|
||||
SCENE_30GYOSON,
|
||||
@@ -522,7 +522,7 @@ void Inventory_ChangeUpgrade(s16 upgrade, u32 value) {
|
||||
gSaveContext.save.inventory.upgrades = upgrades;
|
||||
}
|
||||
|
||||
s32 Inventory_IsMapVisible(s16 sceneNum) {
|
||||
s32 Inventory_IsMapVisible(s16 sceneId) {
|
||||
s16 index = 0;
|
||||
|
||||
/**
|
||||
@@ -530,30 +530,30 @@ s32 Inventory_IsMapVisible(s16 sceneNum) {
|
||||
* increment to the next index of scenesVisible so that every scene gets a unique flag in scenesVisible,
|
||||
* 224 bits were allocated to this although there are only 112 scenes
|
||||
*/
|
||||
if (sceneNum >= 0x20) {
|
||||
if (sceneNum < 0x40) {
|
||||
if (sceneId >= 0x20) {
|
||||
if (sceneId < 0x40) {
|
||||
index = 1;
|
||||
} else if (sceneNum < 0x60) {
|
||||
} else if (sceneId < 0x60) {
|
||||
index = 2;
|
||||
} else if (sceneNum < 0x80) {
|
||||
} else if (sceneId < 0x80) {
|
||||
index = 3;
|
||||
} else if (sceneNum < 0xA0) {
|
||||
} else if (sceneId < 0xA0) {
|
||||
index = 4;
|
||||
} else if (sceneNum < 0xC0) {
|
||||
} else if (sceneId < 0xC0) {
|
||||
index = 5;
|
||||
} else if (sceneNum < 0xE0) {
|
||||
} else if (sceneId < 0xE0) {
|
||||
index = 6;
|
||||
}
|
||||
}
|
||||
|
||||
if (gSaveContext.save.scenesVisible[index] & gBitFlags[sceneNum - (index << 5)]) {
|
||||
if (gSaveContext.save.scenesVisible[index] & gBitFlags[sceneId - (index << 5)]) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static u16 sScenesPerTingleMap[6][12] = {
|
||||
static u16 sSceneIdsPerTingleMap[6][12] = {
|
||||
{
|
||||
// Clock Town Tingle Map
|
||||
SCENE_00KEIKOKU,
|
||||
@@ -630,11 +630,11 @@ static u16 sScenesPerTingleMap[6][12] = {
|
||||
void Inventory_SetMapVisibility(s16 tingleIndex) {
|
||||
s16 i = 0;
|
||||
s16 index = 0;
|
||||
u16(*tingleMapSceneIndices)[] = &sScenesPerTingleMap[tingleIndex];
|
||||
u16(*tingleMapSceneIds)[] = &sSceneIdsPerTingleMap[tingleIndex];
|
||||
|
||||
if ((tingleIndex >= 0) && (tingleIndex < 6)) {
|
||||
while (true) {
|
||||
if ((*tingleMapSceneIndices)[i] == 0xFFFF) {
|
||||
if ((*tingleMapSceneIds)[i] == 0xFFFF) {
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -643,38 +643,38 @@ void Inventory_SetMapVisibility(s16 tingleIndex) {
|
||||
* increment to the next index of scenesVisible so that every scene gets a unique flag in scenesVisible,
|
||||
* 224 bits were allocated to this although there are only 112 scenes
|
||||
*/
|
||||
if (((s16)(*tingleMapSceneIndices)[i]) < 0x20) {
|
||||
if (((s16)(*tingleMapSceneIds)[i]) < 0x20) {
|
||||
index = 0;
|
||||
} else if (((s16)(*tingleMapSceneIndices)[i]) < 0x40) {
|
||||
} else if (((s16)(*tingleMapSceneIds)[i]) < 0x40) {
|
||||
index = 1;
|
||||
} else if (((s16)(*tingleMapSceneIndices)[i]) < 0x60) {
|
||||
} else if (((s16)(*tingleMapSceneIds)[i]) < 0x60) {
|
||||
index = 2;
|
||||
} else if (((s16)(*tingleMapSceneIndices)[i]) < 0x80) {
|
||||
} else if (((s16)(*tingleMapSceneIds)[i]) < 0x80) {
|
||||
index = 3;
|
||||
} else if (((s16)(*tingleMapSceneIndices)[i]) < 0xA0) {
|
||||
} else if (((s16)(*tingleMapSceneIds)[i]) < 0xA0) {
|
||||
index = 4;
|
||||
} else if (((s16)(*tingleMapSceneIndices)[i]) < 0xC0) {
|
||||
} else if (((s16)(*tingleMapSceneIds)[i]) < 0xC0) {
|
||||
index = 5;
|
||||
} else if (((s16)(*tingleMapSceneIndices)[i]) < 0xE0) {
|
||||
} else if (((s16)(*tingleMapSceneIds)[i]) < 0xE0) {
|
||||
index = 6;
|
||||
}
|
||||
|
||||
gSaveContext.save.scenesVisible[index] =
|
||||
gSaveContext.save.scenesVisible[index] | gBitFlags[(s16)(*tingleMapSceneIndices)[i] - (index << 5)];
|
||||
gSaveContext.save.scenesVisible[index] | gBitFlags[(s16)(*tingleMapSceneIds)[i] - (index << 5)];
|
||||
i++;
|
||||
}
|
||||
|
||||
if ((*tingleMapSceneIndices) == sScenesPerTingleMap[0]) {
|
||||
if ((*tingleMapSceneIds) == sSceneIdsPerTingleMap[0]) {
|
||||
gSaveContext.save.mapsVisible |= 3;
|
||||
} else if ((*tingleMapSceneIndices) == sScenesPerTingleMap[1]) {
|
||||
} else if ((*tingleMapSceneIds) == sSceneIdsPerTingleMap[1]) {
|
||||
gSaveContext.save.mapsVisible |= 0x1C;
|
||||
} else if ((*tingleMapSceneIndices) == sScenesPerTingleMap[2]) {
|
||||
} else if ((*tingleMapSceneIds) == sSceneIdsPerTingleMap[2]) {
|
||||
gSaveContext.save.mapsVisible |= 0xE0;
|
||||
} else if ((*tingleMapSceneIndices) == sScenesPerTingleMap[3]) {
|
||||
} else if ((*tingleMapSceneIds) == sSceneIdsPerTingleMap[3]) {
|
||||
gSaveContext.save.mapsVisible |= 0x100;
|
||||
} else if ((*tingleMapSceneIndices) == sScenesPerTingleMap[4]) {
|
||||
} else if ((*tingleMapSceneIds) == sSceneIdsPerTingleMap[4]) {
|
||||
gSaveContext.save.mapsVisible |= 0x1E00;
|
||||
} else if ((*tingleMapSceneIndices) == sScenesPerTingleMap[5]) {
|
||||
} else if ((*tingleMapSceneIds) == sSceneIdsPerTingleMap[5]) {
|
||||
gSaveContext.save.mapsVisible |= 0x6000;
|
||||
}
|
||||
}
|
||||
@@ -688,7 +688,7 @@ void Inventory_SetMapVisibility(s16 tingleIndex) {
|
||||
void Inventory_SaveDekuPlaygroundHighScore(s16 timerId) {
|
||||
s16 i;
|
||||
|
||||
gSaveContext.save.dekuPlaygroundHighScores[CURRENT_DAY - 1] = gSaveContext.unk_3DE0[timerId];
|
||||
gSaveContext.save.dekuPlaygroundHighScores[CURRENT_DAY - 1] = gSaveContext.timerCurTimes[timerId];
|
||||
|
||||
for (i = 0; i < 8; i++) {
|
||||
gSaveContext.save.inventory.dekuPlaygroundPlayerName[CURRENT_DAY - 1][i] =
|
||||
|
||||
+17
-17
@@ -1336,7 +1336,7 @@ s32 func_800B715C(PlayState* play) {
|
||||
}
|
||||
|
||||
void Actor_SetCameraHorseSetting(PlayState* play, Player* player) {
|
||||
if ((play->roomCtx.currRoom.unk3 != 4) && (player->actor.id == ACTOR_PLAYER)) {
|
||||
if ((play->roomCtx.curRoom.unk3 != 4) && (player->actor.id == ACTOR_PLAYER)) {
|
||||
EnHorse* rideActor = (EnHorse*)player->rideActor;
|
||||
|
||||
if ((rideActor != NULL) && !(rideActor->unk_1EC & 0x10)) {
|
||||
@@ -2235,7 +2235,7 @@ void Actor_InitContext(PlayState* play, ActorContext* actorCtx, ActorEntry* acto
|
||||
s32 i;
|
||||
|
||||
gSaveContext.save.weekEventReg[92] |= 0x80;
|
||||
cycleFlags = &gSaveContext.cycleSceneFlags[Play_GetOriginalSceneNumber(play->sceneNum)];
|
||||
cycleFlags = &gSaveContext.cycleSceneFlags[Play_GetOriginalSceneId(play->sceneId)];
|
||||
|
||||
bzero(actorCtx, sizeof(ActorContext));
|
||||
ActorOverlayTable_Init();
|
||||
@@ -2252,8 +2252,8 @@ void Actor_InitContext(PlayState* play, ActorContext* actorCtx, ActorEntry* acto
|
||||
actorCtx->sceneFlags.chest = cycleFlags->chest;
|
||||
actorCtx->sceneFlags.switches[0] = cycleFlags->switch0;
|
||||
actorCtx->sceneFlags.switches[1] = cycleFlags->switch1;
|
||||
if (play->sceneNum == SCENE_INISIE_R) {
|
||||
cycleFlags = &gSaveContext.cycleSceneFlags[play->sceneNum];
|
||||
if (play->sceneId == SCENE_INISIE_R) {
|
||||
cycleFlags = &gSaveContext.cycleSceneFlags[play->sceneId];
|
||||
}
|
||||
actorCtx->sceneFlags.collectible[0] = cycleFlags->collectible;
|
||||
actorCtx->sceneFlags.clearedRoom = cycleFlags->clearedRoom;
|
||||
@@ -2499,7 +2499,7 @@ void Actor_Draw(PlayState* play, Actor* actor) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
light = LightContext_NewLights(&play->lightCtx, play->state.gfxCtx);
|
||||
if ((actor->flags & ACTOR_FLAG_10000000) && (play->roomCtx.currRoom.enablePosLights || (MREG(93) != 0))) {
|
||||
if ((actor->flags & ACTOR_FLAG_10000000) && (play->roomCtx.curRoom.enablePosLights || (MREG(93) != 0))) {
|
||||
light->enablePosLights = true;
|
||||
}
|
||||
|
||||
@@ -2669,7 +2669,7 @@ void Actor_DrawLensActors(PlayState* play, s32 numActors, Actor** actors) {
|
||||
gDPSetPrimColor(spAC++, 0, 0, 0, 0, 0, 255);
|
||||
// temp_s1_5 = spAC;
|
||||
|
||||
if (play->roomCtx.currRoom.unk5 == 0) {
|
||||
if (play->roomCtx.curRoom.unk5 == 0) {
|
||||
// temp_s1_5->words.w0 = 0xFC61E6C3;
|
||||
// temp_s1_5->words.w1 = 0x11CF9FCF;
|
||||
// phi_s1 = temp_s1_5 + 8;
|
||||
@@ -2719,7 +2719,7 @@ void Actor_DrawLensActors(PlayState* play, s32 numActors, Actor** actors) {
|
||||
|
||||
// temp_a0_2 = &spAC;
|
||||
// if (sp34->unk_6E5 == 0) {
|
||||
if (play->roomCtx.currRoom.unk5 == 0) {
|
||||
if (play->roomCtx.curRoom.unk5 == 0) {
|
||||
// temp_s1_10->unk_0 = 0xFC119623;
|
||||
// temp_s1_10->unk_4 = 0xFF2FFFFF;
|
||||
// phi_s1_4 = temp_s1_10 + 8;
|
||||
@@ -2882,8 +2882,8 @@ void Actor_DrawAll(PlayState* play, ActorContext* actorCtx) {
|
||||
actor->isDrawn = false;
|
||||
if ((actor->init == NULL) && (actor->draw != NULL) && (actor->flags & actorFlags)) {
|
||||
if ((actor->flags & ACTOR_FLAG_80) &&
|
||||
((play->roomCtx.currRoom.unk5 == 0) || (play->actorCtx.lensMaskSize == LENS_MASK_ACTIVE_SIZE) ||
|
||||
(actor->room != play->roomCtx.currRoom.num))) {
|
||||
((play->roomCtx.curRoom.unk5 == 0) || (play->actorCtx.lensMaskSize == LENS_MASK_ACTIVE_SIZE) ||
|
||||
(actor->room != play->roomCtx.curRoom.num))) {
|
||||
if (Actor_RecordUndrawnActor(play, actor)) {}
|
||||
} else {
|
||||
Actor_Draw(play, actor);
|
||||
@@ -2960,7 +2960,7 @@ void func_800BA798(PlayState* play, ActorContext* actorCtx) {
|
||||
actor = actorCtx->actorLists[i].first;
|
||||
|
||||
while (actor != NULL) {
|
||||
if ((actor->room >= 0) && (actor->room != play->roomCtx.currRoom.num) &&
|
||||
if ((actor->room >= 0) && (actor->room != play->roomCtx.curRoom.num) &&
|
||||
(actor->room != play->roomCtx.prevRoom.num)) {
|
||||
if (!actor->isDrawn) {
|
||||
actor = Actor_Delete(actorCtx, actor, play);
|
||||
@@ -3091,9 +3091,9 @@ Actor* Actor_RemoveFromCategory(PlayState* play, ActorContext* actorCtx, Actor*
|
||||
actorToRemove->next = NULL;
|
||||
actorToRemove->prev = NULL;
|
||||
|
||||
if ((actorToRemove->room == play->roomCtx.currRoom.num) && (actorToRemove->category == ACTORCAT_ENEMY) &&
|
||||
if ((actorToRemove->room == play->roomCtx.curRoom.num) && (actorToRemove->category == ACTORCAT_ENEMY) &&
|
||||
(actorCtx->actorLists[ACTORCAT_ENEMY].length == 0)) {
|
||||
Flags_SetClearTemp(play, play->roomCtx.currRoom.num);
|
||||
Flags_SetClearTemp(play, play->roomCtx.curRoom.num);
|
||||
}
|
||||
|
||||
return newHead;
|
||||
@@ -3180,8 +3180,8 @@ Actor* Actor_SpawnAsChildAndCutscene(ActorContext* actorCtx, PlayState* play, s1
|
||||
}
|
||||
|
||||
objBankIndex = Object_GetIndex(&play->objectCtx, actorInit->objectId);
|
||||
if ((objBankIndex < 0) || ((actorInit->type == ACTORCAT_ENEMY) &&
|
||||
Flags_GetClear(play, play->roomCtx.currRoom.num) && (actorInit->id != ACTOR_BOSS_05))) {
|
||||
if ((objBankIndex < 0) || ((actorInit->type == ACTORCAT_ENEMY) && Flags_GetClear(play, play->roomCtx.curRoom.num) &&
|
||||
(actorInit->id != ACTOR_BOSS_05))) {
|
||||
Actor_FreeOverlay(&gActorOverlayTable[index]);
|
||||
return NULL;
|
||||
}
|
||||
@@ -3219,7 +3219,7 @@ Actor* Actor_SpawnAsChildAndCutscene(ActorContext* actorCtx, PlayState* play, s1
|
||||
actor->parent = parent;
|
||||
parent->child = actor;
|
||||
} else {
|
||||
actor->room = play->roomCtx.currRoom.num;
|
||||
actor->room = play->roomCtx.curRoom.num;
|
||||
}
|
||||
|
||||
actor->home.pos.x = x;
|
||||
@@ -3267,10 +3267,10 @@ void Actor_SpawnTransitionActors(PlayState* play, ActorContext* actorCtx) {
|
||||
for (i = 0; i < numTransitionActors; transitionActorList++, i++) {
|
||||
if (transitionActorList->id >= 0) {
|
||||
if ((transitionActorList->sides[0].room >= 0 &&
|
||||
(play->roomCtx.currRoom.num == transitionActorList->sides[0].room ||
|
||||
(play->roomCtx.curRoom.num == transitionActorList->sides[0].room ||
|
||||
play->roomCtx.prevRoom.num == transitionActorList->sides[0].room)) ||
|
||||
(transitionActorList->sides[1].room >= 0 &&
|
||||
(play->roomCtx.currRoom.num == transitionActorList->sides[1].room ||
|
||||
(play->roomCtx.curRoom.num == transitionActorList->sides[1].room ||
|
||||
play->roomCtx.prevRoom.num == transitionActorList->sides[1].room))) {
|
||||
s16 rotY = ((transitionActorList->rotY >> 7) & 0x1FF) * (0x10000 / 360.0f);
|
||||
|
||||
|
||||
+11
-10
@@ -1,3 +1,4 @@
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "global.h"
|
||||
#include "vt.h"
|
||||
#include "overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_scope.h"
|
||||
@@ -46,7 +47,7 @@ u8 D_801B46C0[] = {
|
||||
/* 0x0E */ 1
|
||||
};
|
||||
|
||||
s16 sSmallMemScenes[] = {
|
||||
s16 sSmallMemSceneIds[] = {
|
||||
SCENE_F01,
|
||||
};
|
||||
|
||||
@@ -1462,10 +1463,10 @@ u32 BgCheck_InitStaticLookup(CollisionContext* colCtx, PlayState* play, StaticLo
|
||||
* Returns whether the current scene should reserve less memory for it's collision lookup
|
||||
*/
|
||||
s32 BgCheck_IsSmallMemScene(PlayState* play) {
|
||||
s16* i;
|
||||
s16* sceneId;
|
||||
|
||||
for (i = sSmallMemScenes; i < sSmallMemScenes + ARRAY_COUNT(sSmallMemScenes); i++) {
|
||||
if (play->sceneNum == *i) {
|
||||
for (sceneId = sSmallMemSceneIds; sceneId < sSmallMemSceneIds + ARRAY_COUNT(sSmallMemSceneIds); sceneId++) {
|
||||
if (play->sceneId == *sceneId) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -1504,7 +1505,7 @@ s32 BgCheck_GetSpecialSceneMaxObjects(PlayState* play, s32* maxNodes, s32* maxPo
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(sCustomDynapolyMem); i++) {
|
||||
if (play->sceneNum == sCustomDynapolyMem[i].sceneId) {
|
||||
if (play->sceneId == sCustomDynapolyMem[i].sceneId) {
|
||||
*maxNodes = sCustomDynapolyMem[i].maxNodes;
|
||||
*maxPolygons = sCustomDynapolyMem[i].maxPolygons;
|
||||
*maxVertices = sCustomDynapolyMem[i].maxVertices;
|
||||
@@ -1541,7 +1542,7 @@ void BgCheck_Allocate(CollisionContext* colCtx, PlayState* play, CollisionHeader
|
||||
s32 useCustomSubdivisions;
|
||||
s32 i;
|
||||
|
||||
if (BgCheck_TryGetCustomMemsize(play->sceneNum, &customMemSize)) {
|
||||
if (BgCheck_TryGetCustomMemsize(play->sceneId, &customMemSize)) {
|
||||
colCtx->memSize = customMemSize;
|
||||
} else {
|
||||
colCtx->memSize = 0x23000;
|
||||
@@ -1554,7 +1555,7 @@ void BgCheck_Allocate(CollisionContext* colCtx, PlayState* play, CollisionHeader
|
||||
useCustomSubdivisions = false;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(sSceneSubdivisionList); i++) {
|
||||
if (play->sceneNum == sSceneSubdivisionList[i].sceneId) {
|
||||
if (play->sceneId == sSceneSubdivisionList[i].sceneId) {
|
||||
colCtx->subdivAmount.x = sSceneSubdivisionList[i].subdivAmount.x;
|
||||
colCtx->subdivAmount.y = sSceneSubdivisionList[i].subdivAmount.y;
|
||||
colCtx->subdivAmount.z = sSceneSubdivisionList[i].subdivAmount.z;
|
||||
@@ -4404,7 +4405,7 @@ s32 WaterBox_GetSurfaceImpl(PlayState* play, CollisionContext* colCtx, f32 x, f3
|
||||
for (curWaterBox = colHeader->waterBoxes; curWaterBox < colHeader->waterBoxes + colHeader->numWaterBoxes;
|
||||
curWaterBox++) {
|
||||
room = 0x3F & (curWaterBox->properties >> 13);
|
||||
if (room == (u32)play->roomCtx.currRoom.num || room == 0x3F) {
|
||||
if (room == (u32)play->roomCtx.curRoom.num || room == 0x3F) {
|
||||
if (curWaterBox->properties & 0x80000) {
|
||||
continue;
|
||||
}
|
||||
@@ -4489,7 +4490,7 @@ s32 WaterBox_GetSurface2(PlayState* play, CollisionContext* colCtx, Vec3f* pos,
|
||||
waterBox = &colHeader->waterBoxes[i];
|
||||
|
||||
room = WATERBOX_ROOM(waterBox->properties);
|
||||
if (!(room == play->roomCtx.currRoom.num || room == 0x3F)) {
|
||||
if (!(room == play->roomCtx.curRoom.num || room == 0x3F)) {
|
||||
continue;
|
||||
}
|
||||
if ((waterBox->properties & 0x80000)) {
|
||||
@@ -4631,7 +4632,7 @@ s32 func_800CA6F0(PlayState* play, CollisionContext* colCtx, f32 x, f32 z, f32*
|
||||
for (curWaterBox = colHeader->waterBoxes; curWaterBox < colHeader->waterBoxes + colHeader->numWaterBoxes;
|
||||
curWaterBox++) {
|
||||
room = WATERBOX_ROOM(curWaterBox->properties);
|
||||
if (room == (u32)play->roomCtx.currRoom.num || room == 0x3F) {
|
||||
if (room == (u32)play->roomCtx.curRoom.num || room == 0x3F) {
|
||||
if ((curWaterBox->properties & 0x80000) != 0) {
|
||||
if (curWaterBox->minPos.x < x && x < curWaterBox->minPos.x + curWaterBox->xLength) {
|
||||
if (curWaterBox->minPos.z < z && z < curWaterBox->minPos.z + curWaterBox->zLength) {
|
||||
|
||||
@@ -16,7 +16,7 @@ void SaveContext_Init(void) {
|
||||
gSaveContext.skyboxTime = 0;
|
||||
gSaveContext.dogIsLost = true;
|
||||
gSaveContext.nextTransitionType = TRANS_NEXT_TYPE_DEFAULT;
|
||||
gSaveContext.unk_3F26 = 50;
|
||||
gSaveContext.prevHudVisibility = HUD_VISIBILITY_ALL;
|
||||
|
||||
gSaveContext.options.language = 1;
|
||||
gSaveContext.options.audioSetting = 0;
|
||||
|
||||
+6
-6
@@ -105,7 +105,7 @@ s32 func_800EA220(PlayState* play, CutsceneContext* csCtx, f32 target) {
|
||||
}
|
||||
|
||||
void func_800EA258(PlayState* play, CutsceneContext* csCtx) {
|
||||
Interface_ChangeAlpha(1);
|
||||
Interface_SetHudVisibility(HUD_VISIBILITY_NONE);
|
||||
ShrinkWindow_SetLetterboxTarget(32);
|
||||
if (func_800EA220(play, csCtx, 1.0f)) {
|
||||
Audio_SetCutsceneFlag(true);
|
||||
@@ -115,7 +115,7 @@ void func_800EA258(PlayState* play, CutsceneContext* csCtx) {
|
||||
|
||||
void func_800EA2B8(PlayState* play, CutsceneContext* csCtx) {
|
||||
func_800ED980(play, csCtx);
|
||||
Interface_ChangeAlpha(1);
|
||||
Interface_SetHudVisibility(HUD_VISIBILITY_NONE);
|
||||
ShrinkWindow_SetLetterboxTarget(32);
|
||||
if (func_800EA220(play, csCtx, 1.0f)) {
|
||||
Audio_SetCutsceneFlag(true);
|
||||
@@ -215,7 +215,7 @@ void Cutscene_Command_Misc(PlayState* play, CutsceneContext* csCtx, CsCmdBase* c
|
||||
gVisMonoColor.a = 255 * progress;
|
||||
break;
|
||||
case 0xC:
|
||||
play->roomCtx.currRoom.segment = NULL;
|
||||
play->roomCtx.curRoom.segment = NULL;
|
||||
break;
|
||||
case 0xD:
|
||||
if (play->state.frames & 8) {
|
||||
@@ -561,7 +561,7 @@ void Cutscene_TerminatorImpl(PlayState* play, CutsceneContext* csCtx, CsCmdBase*
|
||||
gSaveContext.cutsceneTransitionControl = 1;
|
||||
|
||||
if ((gSaveContext.gameMode != 0) && (csCtx->frames != cmd->startFrame)) {
|
||||
gSaveContext.unk_3F1E = 1;
|
||||
gSaveContext.hudVisibilityForceButtonAlphasByStatus = true;
|
||||
}
|
||||
|
||||
gSaveContext.save.cutscene = 0;
|
||||
@@ -1078,7 +1078,7 @@ void Cutscene_Command_Textbox(PlayState* play, CutsceneContext* csCtx, CsCmdText
|
||||
}
|
||||
|
||||
if (originalCsFrames == csCtx->frames) {
|
||||
Interface_ChangeAlpha(1);
|
||||
Interface_SetHudVisibility(HUD_VISIBILITY_NONE);
|
||||
D_801BB124 = 0;
|
||||
D_801BB128 = 0;
|
||||
func_80161C0C();
|
||||
@@ -1451,7 +1451,7 @@ void func_800EDA84(PlayState* play, CutsceneContext* csCtx) {
|
||||
csCtx->unk_18 = 0xFFFF;
|
||||
|
||||
if (gSaveContext.cutsceneTrigger == 0) {
|
||||
Interface_ChangeAlpha(1);
|
||||
Interface_SetHudVisibility(HUD_VISIBILITY_NONE);
|
||||
ShrinkWindow_SetLetterboxTarget(32);
|
||||
ShrinkWindow_SetLetterboxMagnitude(0x20);
|
||||
csCtx->state++;
|
||||
|
||||
@@ -20,7 +20,7 @@ u16 ElfMessage_GetFirstCycleHint(PlayState* play) {
|
||||
if (gSaveContext.save.weekEventReg[9] & 1) {
|
||||
return 0x21E;
|
||||
}
|
||||
if (play->sceneNum == SCENE_YOUSEI_IZUMI) {
|
||||
if (play->sceneId == SCENE_YOUSEI_IZUMI) {
|
||||
return 0;
|
||||
}
|
||||
return 0x21D;
|
||||
@@ -29,7 +29,7 @@ u16 ElfMessage_GetFirstCycleHint(PlayState* play) {
|
||||
return 0x21F;
|
||||
}
|
||||
if (INV_CONTENT(ITEM_DEED_LAND) == ITEM_DEED_LAND) {
|
||||
if (play->sceneNum != SCENE_OKUJOU) {
|
||||
if (play->sceneId != SCENE_OKUJOU) {
|
||||
return 0x244;
|
||||
}
|
||||
return 0;
|
||||
|
||||
@@ -18,14 +18,14 @@ static s16 sGameOverTimer = 0;
|
||||
|
||||
void GameOver_Update(PlayState* play) {
|
||||
GameOverContext* gameOverCtx = &play->gameOverCtx;
|
||||
s16 i;
|
||||
s16 timerId;
|
||||
|
||||
switch (gameOverCtx->state) {
|
||||
case GAMEOVER_DEATH_START:
|
||||
func_801477B4(play);
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(gSaveContext.unk_3DD0); i++) {
|
||||
gSaveContext.unk_3DD0[i] = 0;
|
||||
for (timerId = 0; timerId < TIMER_ID_MAX; timerId++) {
|
||||
gSaveContext.timerStates[timerId] = TIMER_STATE_OFF;
|
||||
}
|
||||
|
||||
gSaveContext.eventInf[1] &= ~1;
|
||||
@@ -57,10 +57,10 @@ void GameOver_Update(PlayState* play) {
|
||||
gSaveContext.buttonStatus[EQUIP_SLOT_C_DOWN] = BTN_ENABLED;
|
||||
gSaveContext.buttonStatus[EQUIP_SLOT_C_RIGHT] = BTN_ENABLED;
|
||||
gSaveContext.buttonStatus[EQUIP_SLOT_A] = BTN_ENABLED;
|
||||
gSaveContext.unk_3F1E = 0;
|
||||
gSaveContext.unk_3F20 = 0;
|
||||
gSaveContext.unk_3F22 = 0;
|
||||
gSaveContext.unk_3F24 = 0;
|
||||
gSaveContext.hudVisibilityForceButtonAlphasByStatus = false;
|
||||
gSaveContext.nextHudVisibility = HUD_VISIBILITY_IDLE;
|
||||
gSaveContext.hudVisibility = HUD_VISIBILITY_IDLE;
|
||||
gSaveContext.hudVisibilityTimer = 0;
|
||||
Kankyo_InitGameOverLights(play);
|
||||
sGameOverTimer = 20;
|
||||
Rumble_Request(0.0f, 126, 124, 63);
|
||||
|
||||
+15
-15
@@ -33,12 +33,12 @@ void func_800F4A10(PlayState* play) {
|
||||
for (i = 9; i >= 0; i--) {
|
||||
if ((gSaveContext.save.playerData.owlActivationFlags >> i) & 1) {
|
||||
pauseCtx->worldMapPoints[i] = 1;
|
||||
pauseCtx->unk_238[4] = i;
|
||||
pauseCtx->cursorPoint[PAUSE_WORLD_MAP] = i;
|
||||
}
|
||||
}
|
||||
|
||||
if ((gSaveContext.save.playerData.owlActivationFlags >> 4) & 1) {
|
||||
pauseCtx->unk_238[4] = 4;
|
||||
pauseCtx->cursorPoint[PAUSE_WORLD_MAP] = 4;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,8 +81,8 @@ void KaleidoSetup_Update(PlayState* play) {
|
||||
if (!(play->actorCtx.flags & ACTORCTX_FLAG_1) &&
|
||||
!(play->actorCtx.flags & ACTORCTX_FLAG_2)) {
|
||||
if ((play->actorCtx.unk268 == 0) && CHECK_BTN_ALL(input->press.button, BTN_START)) {
|
||||
gSaveContext.unk_3F26 = gSaveContext.unk_3F22;
|
||||
pauseCtx->unk_2B9 = 0;
|
||||
gSaveContext.prevHudVisibility = gSaveContext.hudVisibility;
|
||||
pauseCtx->itemDescriptionOn = false;
|
||||
pauseCtx->state = 1;
|
||||
func_800F4A10(play);
|
||||
pauseCtx->mode = pauseCtx->pageIndex * 2 + 1;
|
||||
@@ -122,23 +122,23 @@ void KaleidoSetup_Init(PlayState* play) {
|
||||
pauseCtx->unk_20C = 936.0f;
|
||||
pauseCtx->unk_220 = -314.0f;
|
||||
|
||||
pauseCtx->unk_238[PAUSE_MAP] = XREG(94) + 3;
|
||||
pauseCtx->cursorPoint[PAUSE_MAP] = XREG(94) + 3;
|
||||
|
||||
pauseCtx->unk_258 = 11;
|
||||
pauseCtx->unk_25A = 0;
|
||||
pauseCtx->cursorSpecialPos = PAUSE_CURSOR_PAGE_RIGHT;
|
||||
pauseCtx->pageSwitchTimer = 0;
|
||||
|
||||
pauseCtx->cursorItem[PAUSE_ITEM] = 999;
|
||||
pauseCtx->cursorItem[PAUSE_ITEM] = PAUSE_ITEM_NONE;
|
||||
pauseCtx->cursorItem[PAUSE_MAP] = XREG(94) + 3;
|
||||
pauseCtx->cursorItem[PAUSE_QUEST] = 999;
|
||||
pauseCtx->cursorItem[PAUSE_MASK] = 999;
|
||||
pauseCtx->cursorItem[PAUSE_QUEST] = PAUSE_ITEM_NONE;
|
||||
pauseCtx->cursorItem[PAUSE_MASK] = PAUSE_ITEM_NONE;
|
||||
|
||||
pauseCtx->unk_268[PAUSE_ITEM] = 0;
|
||||
pauseCtx->unk_268[PAUSE_MAP] = XREG(94) + 3;
|
||||
pauseCtx->cursorSlot[PAUSE_ITEM] = 0;
|
||||
pauseCtx->cursorSlot[PAUSE_MAP] = XREG(94) + 3;
|
||||
|
||||
pauseCtx->unk_284 = 2;
|
||||
pauseCtx->cursorColorSet = 2;
|
||||
pauseCtx->unk_2A0 = -1;
|
||||
pauseCtx->unk_2BA = 320;
|
||||
pauseCtx->unk_2BC = 40;
|
||||
pauseCtx->equipAnimScale = 320;
|
||||
pauseCtx->equipAnimShrinkRate = 40;
|
||||
pauseCtx->promptAlpha = 100;
|
||||
|
||||
View_Init(&pauseCtx->view, play->state.gfxCtx);
|
||||
|
||||
+17
-17
@@ -5,7 +5,7 @@ s16 sMinimapInitPosX = 0;
|
||||
s16 sMinimapInitPosZ = 0;
|
||||
s16 sMinimapInitDir = 0;
|
||||
|
||||
s32 sDungeonAndBossScenes[] = {
|
||||
s32 sDungeonAndBossSceneIds[] = {
|
||||
SCENE_MITURIN, SCENE_HAKUGIN, SCENE_SEA, SCENE_INISIE_N, SCENE_INISIE_R,
|
||||
SCENE_MITURIN_BS, SCENE_HAKUGIN_BS, SCENE_SEA_BS, SCENE_INISIE_BS,
|
||||
};
|
||||
@@ -17,8 +17,8 @@ s32 sDungeonAndBossScenes[] = {
|
||||
s32 Map_GetDungeonOrBossAreaIndex(PlayState* play) {
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(sDungeonAndBossScenes); i++) {
|
||||
if (Play_GetOriginalSceneNumber(play->sceneNum) == sDungeonAndBossScenes[i]) {
|
||||
for (i = 0; i < ARRAY_COUNT(sDungeonAndBossSceneIds); i++) {
|
||||
if (Play_GetOriginalSceneId(play->sceneId) == sDungeonAndBossSceneIds[i]) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
@@ -45,7 +45,7 @@ s32 func_8010A0A4(PlayState* play) {
|
||||
return true;
|
||||
}
|
||||
|
||||
s32 sDungeonScenes[] = {
|
||||
s32 sDungeonSceneIds[] = {
|
||||
SCENE_MITURIN, SCENE_HAKUGIN, SCENE_SEA, SCENE_INISIE_N, SCENE_INISIE_R,
|
||||
};
|
||||
|
||||
@@ -56,8 +56,8 @@ s32 sDungeonScenes[] = {
|
||||
s32 Map_GetDungeonAreaIndex(PlayState* play) {
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(sDungeonScenes); i++) {
|
||||
if (Play_GetOriginalSceneNumber(play->sceneNum) == sDungeonScenes[i]) {
|
||||
for (i = 0; i < ARRAY_COUNT(sDungeonSceneIds); i++) {
|
||||
if (Play_GetOriginalSceneId(play->sceneId) == sDungeonSceneIds[i]) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
@@ -76,7 +76,7 @@ s32 Map_IsInDungeonArea(PlayState* play) {
|
||||
return true;
|
||||
}
|
||||
|
||||
s32 sBossScenes[] = {
|
||||
s32 sBossSceneIds[] = {
|
||||
SCENE_MITURIN_BS, // DUNGEON_INDEX_WOODFALL_TEMPLE
|
||||
SCENE_HAKUGIN_BS, // DUNGEON_INDEX_SNOWHEAD_TEMPLE
|
||||
SCENE_SEA_BS, // DUNGEON_INDEX_GREAT_BAY_TEMPLE
|
||||
@@ -90,8 +90,8 @@ s32 sBossScenes[] = {
|
||||
s32 Map_GetBossAreaIndex(PlayState* play) {
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(sBossScenes); i++) {
|
||||
if (Play_GetOriginalSceneNumber(play->sceneNum) == sBossScenes[i]) {
|
||||
for (i = 0; i < ARRAY_COUNT(sBossSceneIds); i++) {
|
||||
if (Play_GetOriginalSceneId(play->sceneId) == sBossSceneIds[i]) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
@@ -120,7 +120,7 @@ s32 func_8010A238(PlayState* play) {
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(D_801BF5A4); i++) {
|
||||
if (Play_GetOriginalSceneNumber(play->sceneNum) == D_801BF5A4[i]) {
|
||||
if (Play_GetOriginalSceneId(play->sceneId) == D_801BF5A4[i]) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
@@ -156,7 +156,7 @@ void Map_InitRoomData(PlayState* play, s16 room) {
|
||||
|
||||
if (room >= 0) {
|
||||
if (Map_IsInDungeonOrBossArea(play)) {
|
||||
gSaveContext.save.permanentSceneFlags[Play_GetOriginalSceneNumber(play->sceneNum)].rooms |= gBitFlags[room];
|
||||
gSaveContext.save.permanentSceneFlags[Play_GetOriginalSceneId(play->sceneId)].rooms |= gBitFlags[room];
|
||||
interfaceCtx->mapRoomNum = room;
|
||||
interfaceCtx->dungeonOrBossAreaMapIndex = mapIndex;
|
||||
}
|
||||
@@ -169,15 +169,15 @@ void Map_InitRoomData(PlayState* play, s16 room) {
|
||||
}
|
||||
}
|
||||
|
||||
void Map_Destroy(void) {
|
||||
func_80105A40();
|
||||
void Map_Destroy(PlayState* play) {
|
||||
func_80105A40(play);
|
||||
}
|
||||
|
||||
void Map_Init(PlayState* play) {
|
||||
InterfaceContext* interfaceCtx = &play->interfaceCtx;
|
||||
s32 dungeonIndex;
|
||||
|
||||
func_80105C40(play->roomCtx.currRoom.num);
|
||||
func_80105C40(play->roomCtx.curRoom.num);
|
||||
interfaceCtx->unk_278 = -1;
|
||||
interfaceCtx->dungeonOrBossAreaMapIndex = -1;
|
||||
interfaceCtx->mapSegment = THA_AllocEndAlign16(&play->state.heap, 0x1000);
|
||||
@@ -189,7 +189,7 @@ void Map_Init(PlayState* play) {
|
||||
if (Map_IsInDungeonOrBossArea(play)) {
|
||||
dungeonIndex = Map_GetDungeonOrBossAreaIndex(play);
|
||||
gSaveContext.mapIndex = dungeonIndex;
|
||||
switch (play->sceneNum) {
|
||||
switch (play->sceneId) {
|
||||
case SCENE_MITURIN_BS:
|
||||
dungeonIndex = DUNGEON_INDEX_WOODFALL_TEMPLE;
|
||||
break;
|
||||
@@ -208,7 +208,7 @@ void Map_Init(PlayState* play) {
|
||||
}
|
||||
|
||||
gSaveContext.dungeonIndex = dungeonIndex;
|
||||
Map_InitRoomData(play, play->roomCtx.currRoom.num);
|
||||
Map_InitRoomData(play, play->roomCtx.curRoom.num);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -243,7 +243,7 @@ void Map_Update(PlayState* play) {
|
||||
if (Map_IsInDungeonArea(play)) {
|
||||
floor = func_80109124(player->actor.world.pos.y);
|
||||
if (floor != -1) {
|
||||
gSaveContext.save.permanentSceneFlags[Play_GetOriginalSceneNumber(play->sceneNum)].unk_14 |=
|
||||
gSaveContext.save.permanentSceneFlags[Play_GetOriginalSceneId(play->sceneId)].unk_14 |=
|
||||
gBitFlags[FLOOR_INDEX_MAX - floor];
|
||||
XREG(94) = FLOOR_INDEX_MAX - floor;
|
||||
if (interfaceCtx->mapRoomNum != sLastRoomNum) {
|
||||
|
||||
@@ -267,10 +267,10 @@ void func_8014D62C(PlayState* play, s32* arg1, f32* arg2, s16* arg3) {
|
||||
s16 phi_v0;
|
||||
s16 phi_s0;
|
||||
|
||||
if ((func_8010A0A4(play) != 0) || (play->sceneNum == 0x4F)) {
|
||||
if ((func_8010A0A4(play) != 0) || (play->sceneId == SCENE_SECOM)) {
|
||||
phi_v0 = 0xA;
|
||||
} else {
|
||||
phi_v0 = pauseCtx->unk_238[PAUSE_WORLD_MAP];
|
||||
phi_v0 = pauseCtx->cursorPoint[PAUSE_WORLD_MAP];
|
||||
}
|
||||
|
||||
temp_s6 = D_801D0250[phi_v0];
|
||||
@@ -360,7 +360,7 @@ void func_80151A68(PlayState* play, u16 textId) {
|
||||
XREG(77) = 0x3C;
|
||||
XREG(76) = 0x1C;
|
||||
msgCtx->unk11F1A[0] = msgCtx->unk11F1A[1] = msgCtx->unk11F1A[2] = 0;
|
||||
Interface_ChangeAlpha(1);
|
||||
Interface_SetHudVisibility(HUD_VISIBILITY_NONE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -254,10 +254,10 @@ void Message_LoadAreaTextNES(PlayState* play, s32* offset, f32* arg2, s16* decod
|
||||
s16 currentArea;
|
||||
s16 stringLimit;
|
||||
|
||||
if ((func_8010A0A4(play) != 0) || (play->sceneNum == SCENE_SECOM)) {
|
||||
if ((func_8010A0A4(play) != 0) || (play->sceneId == SCENE_SECOM)) {
|
||||
currentArea = 10;
|
||||
} else {
|
||||
currentArea = play->pauseCtx.unk_238[PAUSE_WORLD_MAP];
|
||||
currentArea = play->pauseCtx.cursorPoint[PAUSE_WORLD_MAP];
|
||||
}
|
||||
stringLimit = D_801D07C4[currentArea];
|
||||
|
||||
|
||||
+1454
-43
File diff suppressed because it is too large
Load Diff
+28
-28
@@ -450,7 +450,7 @@ void Play_Destroy(GameState* thisx) {
|
||||
}
|
||||
gSaveContext.save.weekEventReg[0x5C] &= (u8)~0x80;
|
||||
|
||||
func_80121F94(this);
|
||||
Interface_Destroy(this);
|
||||
KaleidoScopeCall_Destroy(this);
|
||||
KaleidoManager_Destroy();
|
||||
ZeldaArena_Cleanup();
|
||||
@@ -593,7 +593,7 @@ void Play_UpdateTransition(PlayState* this) {
|
||||
if (this->transitionTrigger != TRANS_TRIGGER_END) {
|
||||
s16 sceneLayer = 0;
|
||||
|
||||
Interface_ChangeAlpha(1);
|
||||
Interface_SetHudVisibility(HUD_VISIBILITY_NONE);
|
||||
|
||||
if (gSaveContext.nextCutsceneIndex >= 0xFFF0) {
|
||||
sceneLayer = (gSaveContext.nextCutsceneIndex & 0xF) + 1;
|
||||
@@ -608,7 +608,7 @@ void Play_UpdateTransition(PlayState* this) {
|
||||
!(gSaveContext.save.weekEventReg[0x37] & 0x80)) ||
|
||||
((this->nextEntrance == ENTRANCE(ROAD_TO_IKANA, 1)) &&
|
||||
!(gSaveContext.save.weekEventReg[0x34] & 0x20))) &&
|
||||
(!func_800FE590(this) || (Entrance_GetSceneNum(this->nextEntrance + sceneLayer) < 0) ||
|
||||
(!func_800FE590(this) || (Entrance_GetSceneId(this->nextEntrance + sceneLayer) < 0) ||
|
||||
(func_801A8A50(0) != NA_BGM_FINAL_HOURS))) {
|
||||
func_801A4058(20);
|
||||
gSaveContext.seqIndex = 0xFF;
|
||||
@@ -621,7 +621,7 @@ void Play_UpdateTransition(PlayState* this) {
|
||||
gSaveContext.nightSeqIndex = 0xFF;
|
||||
}
|
||||
|
||||
if (func_800FE590(this) && (Entrance_GetSceneNum(this->nextEntrance + sceneLayer) >= 0) &&
|
||||
if (func_800FE590(this) && (Entrance_GetSceneId(this->nextEntrance + sceneLayer) >= 0) &&
|
||||
(func_801A8A50(0) == NA_BGM_FINAL_HOURS)) {
|
||||
func_801A41C8(20);
|
||||
}
|
||||
@@ -1012,7 +1012,7 @@ void Play_Update(PlayState* this) {
|
||||
Rumble_SetUpdateEnabled(false);
|
||||
}
|
||||
|
||||
Room_nop8012D510(this, &this->roomCtx.currRoom, &pad58[1], 0);
|
||||
Room_nop8012D510(this, &this->roomCtx.curRoom, &pad58[1], 0);
|
||||
Room_nop8012D510(this, &this->roomCtx.prevRoom, &pad58[1], 1);
|
||||
SkyboxDraw_Update(&this->skyboxCtx);
|
||||
|
||||
@@ -1149,7 +1149,7 @@ void Play_Draw(PlayState* this) {
|
||||
}
|
||||
|
||||
if ((SREG(94) < 2) && (gTrnsnUnkState < 2)) {
|
||||
if (this->skyboxCtx.skyboxShouldDraw || (this->roomCtx.currRoom.mesh->type0.type == 1)) {
|
||||
if (this->skyboxCtx.skyboxShouldDraw || (this->roomCtx.curRoom.mesh->type0.type == 1)) {
|
||||
func_8012CF0C(gfxCtx, 0, 1, 0, 0, 0);
|
||||
} else {
|
||||
func_8012CF0C(gfxCtx, 1, 1, this->lightCtx.unk7, this->lightCtx.unk8, this->lightCtx.unk9);
|
||||
@@ -1299,7 +1299,7 @@ void Play_Draw(PlayState* this) {
|
||||
func_800FE390(this);
|
||||
sp268 = LightContext_NewLights(&this->lightCtx, gfxCtx);
|
||||
|
||||
if (this->roomCtx.currRoom.enablePosLights || (MREG(93) != 0)) {
|
||||
if (this->roomCtx.curRoom.enablePosLights || (MREG(93) != 0)) {
|
||||
sp268->enablePosLights = true;
|
||||
}
|
||||
|
||||
@@ -1314,7 +1314,7 @@ void Play_Draw(PlayState* this) {
|
||||
// `if (stuff that evaluates to 0 but not trivially)`
|
||||
s64 roomDrawFlags = 3;
|
||||
|
||||
Room_Draw(this, &this->roomCtx.currRoom, roomDrawFlags);
|
||||
Room_Draw(this, &this->roomCtx.curRoom, roomDrawFlags);
|
||||
Room_Draw(this, &this->roomCtx.prevRoom, roomDrawFlags);
|
||||
}
|
||||
|
||||
@@ -1575,13 +1575,13 @@ void func_801692C4(PlayState* this, s32 spawn) {
|
||||
func_8016927C(this, this->skyboxId);
|
||||
}
|
||||
|
||||
void Play_SceneInit(PlayState* this, s32 scene, s32 spawn) {
|
||||
void Play_SceneInit(PlayState* this, s32 sceneId, s32 spawn) {
|
||||
s32 pad;
|
||||
SceneTableEntry* sp1C = &gSceneTable[scene];
|
||||
SceneTableEntry* sp1C = &gSceneTable[sceneId];
|
||||
|
||||
sp1C->unk_D = 0;
|
||||
this->loadedScene = sp1C;
|
||||
this->sceneNum = scene;
|
||||
this->sceneId = sceneId;
|
||||
this->sceneConfig = sp1C->drawConfig;
|
||||
this->sceneSegment = Play_LoadScene(this, &sp1C->segment);
|
||||
sp1C->unk_D = 0;
|
||||
@@ -1818,38 +1818,38 @@ Vec3s* Play_GetActorCsCamFuncData(PlayState* this, s32 csCamDataIndex) {
|
||||
* Converts the number of a scene to its "original" equivalent, the default version of the area which the player first
|
||||
* enters.
|
||||
*/
|
||||
s16 Play_GetOriginalSceneNumber(s16 sceneNum) {
|
||||
s16 Play_GetOriginalSceneId(s16 sceneId) {
|
||||
// Inverted Stone Tower Temple -> Stone Tower Temple
|
||||
if (sceneNum == SCENE_INISIE_R) {
|
||||
if (sceneId == SCENE_INISIE_R) {
|
||||
return SCENE_INISIE_N;
|
||||
}
|
||||
|
||||
// Purified Southern Swamp -> Poisoned Sothern Swamp
|
||||
if (sceneNum == SCENE_20SICHITAI2) {
|
||||
if (sceneId == SCENE_20SICHITAI2) {
|
||||
return SCENE_20SICHITAI;
|
||||
}
|
||||
|
||||
// Spring Mountain Village -> Winter Mountain Village
|
||||
if (sceneNum == SCENE_10YUKIYAMANOMURA2) {
|
||||
if (sceneId == SCENE_10YUKIYAMANOMURA2) {
|
||||
return SCENE_10YUKIYAMANOMURA;
|
||||
}
|
||||
|
||||
// Spring Goron Village -> Winter Goron Village
|
||||
if (sceneNum == SCENE_11GORONNOSATO2) {
|
||||
if (sceneId == SCENE_11GORONNOSATO2) {
|
||||
return SCENE_11GORONNOSATO;
|
||||
}
|
||||
|
||||
// Spring Path to Goron Village -> Winter Path to Goron Village
|
||||
if (sceneNum == SCENE_17SETUGEN2) {
|
||||
if (sceneId == SCENE_17SETUGEN2) {
|
||||
return SCENE_17SETUGEN;
|
||||
}
|
||||
|
||||
// Inverted Stone Tower -> Stone Tower
|
||||
if (sceneNum == SCENE_F41) {
|
||||
if (sceneId == SCENE_F41) {
|
||||
return SCENE_F40;
|
||||
}
|
||||
|
||||
return sceneNum;
|
||||
return sceneId;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1860,13 +1860,13 @@ void Play_SaveCycleSceneFlags(GameState* thisx) {
|
||||
PlayState* this = (PlayState*)thisx;
|
||||
CycleSceneFlags* cycleSceneFlags;
|
||||
|
||||
cycleSceneFlags = &gSaveContext.cycleSceneFlags[Play_GetOriginalSceneNumber(this->sceneNum)];
|
||||
cycleSceneFlags = &gSaveContext.cycleSceneFlags[Play_GetOriginalSceneId(this->sceneId)];
|
||||
cycleSceneFlags->chest = this->actorCtx.sceneFlags.chest;
|
||||
cycleSceneFlags->switch0 = this->actorCtx.sceneFlags.switches[0];
|
||||
cycleSceneFlags->switch1 = this->actorCtx.sceneFlags.switches[1];
|
||||
|
||||
if (this->sceneNum == SCENE_INISIE_R) { // Inverted Stone Tower Temple
|
||||
cycleSceneFlags = &gSaveContext.cycleSceneFlags[this->sceneNum];
|
||||
if (this->sceneId == SCENE_INISIE_R) { // Inverted Stone Tower Temple
|
||||
cycleSceneFlags = &gSaveContext.cycleSceneFlags[this->sceneId];
|
||||
}
|
||||
|
||||
cycleSceneFlags->collectible = this->actorCtx.sceneFlags.collectible[0];
|
||||
@@ -1891,16 +1891,16 @@ void Play_SetupRespawnPoint(GameState* thisx, s32 respawnMode, s32 playerParams)
|
||||
PlayState* this = (PlayState*)thisx;
|
||||
Player* player = GET_PLAYER(this);
|
||||
|
||||
if (this->sceneNum != SCENE_KAKUSIANA) { // Grottos
|
||||
if (this->sceneId != SCENE_KAKUSIANA) { // Grottos
|
||||
Play_SetRespawnData(&this->state, respawnMode, (u16)((void)0, gSaveContext.save.entrance),
|
||||
this->roomCtx.currRoom.num, playerParams, &player->actor.world.pos,
|
||||
this->roomCtx.curRoom.num, playerParams, &player->actor.world.pos,
|
||||
player->actor.shape.rot.y);
|
||||
}
|
||||
}
|
||||
|
||||
// Override respawn data in Sakon's Hideout
|
||||
void func_80169ECC(PlayState* this) {
|
||||
if (this->sceneNum == SCENE_SECOM) {
|
||||
if (this->sceneId == SCENE_SECOM) {
|
||||
this->nextEntrance = ENTRANCE(IKANA_CANYON, 6);
|
||||
gSaveContext.respawnFlag = -7;
|
||||
}
|
||||
@@ -1943,7 +1943,7 @@ void func_80169FDC(GameState* thisx) {
|
||||
s32 func_80169FFC(GameState* thisx) {
|
||||
PlayState* this = (PlayState*)thisx;
|
||||
|
||||
return this->roomCtx.currRoom.mesh->type0.type != 1;
|
||||
return this->roomCtx.curRoom.mesh->type0.type != 1;
|
||||
}
|
||||
|
||||
s32 FrameAdvance_IsEnabled(GameState* thisx) {
|
||||
@@ -2214,7 +2214,7 @@ void Play_Init(GameState* thisx) {
|
||||
|
||||
Play_SceneInit(
|
||||
this,
|
||||
Entrance_GetSceneNumAbsolute(((void)0, gSaveContext.save.entrance) + ((void)0, gSaveContext.sceneSetupIndex)),
|
||||
Entrance_GetSceneIdAbsolute(((void)0, gSaveContext.save.entrance) + ((void)0, gSaveContext.sceneSetupIndex)),
|
||||
Entrance_GetSpawnNum(((void)0, gSaveContext.save.entrance) + ((void)0, gSaveContext.sceneSetupIndex)));
|
||||
KaleidoScopeCall_Init(this);
|
||||
func_80121FC4(this);
|
||||
@@ -2301,7 +2301,7 @@ void Play_Init(GameState* thisx) {
|
||||
|
||||
while (Room_HandleLoadCallbacks(this, &this->roomCtx) == 0) {}
|
||||
|
||||
if ((CURRENT_DAY != 0) && ((this->roomCtx.currRoom.unk3 == 1) || (this->roomCtx.currRoom.unk3 == 5))) {
|
||||
if ((CURRENT_DAY != 0) && ((this->roomCtx.curRoom.unk3 == 1) || (this->roomCtx.curRoom.unk3 == 5))) {
|
||||
Actor_Spawn(&this->actorCtx, this, 0x15A, 0.0f, 0.0f, 0.0f, 0, 0, 0, 0);
|
||||
}
|
||||
|
||||
|
||||
+26
-22
@@ -30,7 +30,7 @@ void func_80127B64(struct_801F58B0 arg0[], UNK_TYPE arg1, Vec3f* arg2);
|
||||
s32 func_801226E0(PlayState* play, s32 arg1) {
|
||||
if (arg1 == 0) {
|
||||
Play_SetupRespawnPoint(&play->state, RESPAWN_MODE_DOWN, 0xBFF);
|
||||
if (play->sceneNum == SCENE_KAKUSIANA) {
|
||||
if (play->sceneId == SCENE_KAKUSIANA) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@@ -274,7 +274,7 @@ u8 Player_MaskIdToItemId(s32 maskIdMinusOne) {
|
||||
return sMaskItemIds[maskIdMinusOne];
|
||||
}
|
||||
|
||||
u8 Player_GetCurMaskItemId(PlayState* play) {
|
||||
s32 Player_GetCurMaskItemId(PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (player->currentMask != PLAYER_MASK_NONE) {
|
||||
@@ -389,7 +389,7 @@ void func_80123140(PlayState* play, Player* player) {
|
||||
IREG(69) = bootRegs[16];
|
||||
MREG(95) = bootRegs[17];
|
||||
|
||||
if (play->roomCtx.currRoom.unk3 == 2) {
|
||||
if (play->roomCtx.curRoom.unk3 == 2) {
|
||||
R_RUN_SPEED_LIMIT = 500;
|
||||
}
|
||||
|
||||
@@ -508,20 +508,23 @@ s32 func_8012364C(PlayState* play, Player* player, s32 arg2) {
|
||||
if (arg2 == 1) {
|
||||
return (gSaveContext.buttonStatus[1] != BTN_DISABLED)
|
||||
? gSaveContext.save.equips.buttonItems[0][EQUIP_SLOT_C_LEFT]
|
||||
: (gSaveContext.unk_3F22 == 0x10) ? gSaveContext.save.equips.buttonItems[0][EQUIP_SLOT_C_LEFT]
|
||||
: ITEM_NONE;
|
||||
: (gSaveContext.hudVisibility == HUD_VISIBILITY_A_B_C)
|
||||
? gSaveContext.save.equips.buttonItems[0][EQUIP_SLOT_C_LEFT]
|
||||
: ITEM_NONE;
|
||||
}
|
||||
|
||||
if (arg2 == 2) {
|
||||
return (gSaveContext.buttonStatus[2] != BTN_DISABLED)
|
||||
? gSaveContext.save.equips.buttonItems[0][EQUIP_SLOT_C_DOWN]
|
||||
: (gSaveContext.unk_3F22 == 0x10) ? gSaveContext.save.equips.buttonItems[0][EQUIP_SLOT_C_DOWN]
|
||||
: ITEM_NONE;
|
||||
: (gSaveContext.hudVisibility == HUD_VISIBILITY_A_B_C)
|
||||
? gSaveContext.save.equips.buttonItems[0][EQUIP_SLOT_C_DOWN]
|
||||
: ITEM_NONE;
|
||||
}
|
||||
|
||||
return (gSaveContext.buttonStatus[3] != BTN_DISABLED) ? gSaveContext.save.equips.buttonItems[0][EQUIP_SLOT_C_RIGHT]
|
||||
: (gSaveContext.unk_3F22 == 0x10) ? gSaveContext.save.equips.buttonItems[0][EQUIP_SLOT_C_RIGHT]
|
||||
: ITEM_NONE;
|
||||
: (gSaveContext.hudVisibility == HUD_VISIBILITY_A_B_C)
|
||||
? gSaveContext.save.equips.buttonItems[0][EQUIP_SLOT_C_RIGHT]
|
||||
: ITEM_NONE;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_player_lib/func_80123810.s")
|
||||
@@ -857,39 +860,40 @@ s32 func_80124278(Actor* actor, s32 actionParam) {
|
||||
}
|
||||
|
||||
s32 func_801242B4(Player* player) {
|
||||
return (player->stateFlags1 & PLAYER_STATE1_8000000) && player->currentBoots < PLAYER_BOOTS_ZORA_UNDERWATER;
|
||||
return (player->stateFlags1 & PLAYER_STATE1_8000000) && (player->currentBoots < PLAYER_BOOTS_ZORA_UNDERWATER);
|
||||
}
|
||||
|
||||
s32 func_801242DC(PlayState* play) {
|
||||
s32 Player_GetEnvTimerType(PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
TextTriggerEntry* triggerEntry;
|
||||
s32 envIndex;
|
||||
s32 envTimerType;
|
||||
|
||||
if (play->roomCtx.currRoom.unk2 == 3) { // Room is hot
|
||||
envIndex = 0;
|
||||
} else if ((player->transformation != PLAYER_FORM_ZORA) && (player->unk_AD8 > 80)) {
|
||||
envIndex = 3;
|
||||
if (play->roomCtx.curRoom.unk2 == 3) { // Room is hot
|
||||
envTimerType = PLAYER_ENV_TIMER_HOTROOM - 1;
|
||||
} else if ((player->transformation != PLAYER_FORM_ZORA) && (player->underwaterTimer > 80)) {
|
||||
envTimerType = PLAYER_ENV_TIMER_UNDERWATER_FREE - 1;
|
||||
} else if (player->stateFlags1 & PLAYER_STATE1_8000000) {
|
||||
if ((player->transformation == PLAYER_FORM_ZORA) && (player->currentBoots >= PLAYER_BOOTS_ZORA_UNDERWATER) &&
|
||||
(player->actor.bgCheckFlags & 1)) {
|
||||
envIndex = 1;
|
||||
envTimerType = PLAYER_ENV_TIMER_UNDERWATER_FLOOR - 1;
|
||||
} else {
|
||||
envIndex = 2;
|
||||
envTimerType = PLAYER_ENV_TIMER_SWIMMING - 1;
|
||||
}
|
||||
} else {
|
||||
return 0;
|
||||
return PLAYER_ENV_TIMER_NONE;
|
||||
}
|
||||
|
||||
// Trigger general textboxes under certain conditions, like "It's so hot in here!". Unused in MM
|
||||
triggerEntry = &sEnvironmentTextTriggers[envIndex];
|
||||
triggerEntry = &sEnvironmentTextTriggers[envTimerType];
|
||||
if (!Player_InCsMode(play)) {
|
||||
if ((triggerEntry->flag) && !(gSaveContext.textTriggerFlags & triggerEntry->flag) && (envIndex == 0)) {
|
||||
if ((triggerEntry->flag) && !(gSaveContext.textTriggerFlags & triggerEntry->flag) &&
|
||||
(envTimerType == (PLAYER_ENV_TIMER_HOTROOM - 1))) {
|
||||
Message_StartTextbox(play, triggerEntry->textId, NULL);
|
||||
gSaveContext.textTriggerFlags |= triggerEntry->flag;
|
||||
}
|
||||
}
|
||||
|
||||
return envIndex + 1;
|
||||
return envTimerType + 1;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_player_lib/func_80124420.s")
|
||||
|
||||
+11
-12
@@ -64,8 +64,8 @@ void Room_DrawType1Mesh(PlayState* play, Room* room, u32 flags) {
|
||||
|
||||
void Room_Init(PlayState* play, RoomContext* roomCtx) {
|
||||
s32 i;
|
||||
roomCtx->currRoom.num = -1;
|
||||
roomCtx->currRoom.segment = NULL;
|
||||
roomCtx->curRoom.num = -1;
|
||||
roomCtx->curRoom.segment = NULL;
|
||||
roomCtx->unk78 = 1;
|
||||
roomCtx->unk79 = 0;
|
||||
for (i = 0; i < 3; i++) {
|
||||
@@ -79,9 +79,9 @@ s32 Room_StartRoomTransition(PlayState* play, RoomContext* roomCtx, s32 index) {
|
||||
if (roomCtx->unk31 == 0) {
|
||||
s32 size;
|
||||
|
||||
roomCtx->prevRoom = roomCtx->currRoom;
|
||||
roomCtx->currRoom.num = index;
|
||||
roomCtx->currRoom.segment = NULL;
|
||||
roomCtx->prevRoom = roomCtx->curRoom;
|
||||
roomCtx->curRoom.num = index;
|
||||
roomCtx->curRoom.segment = NULL;
|
||||
roomCtx->unk31 = 1;
|
||||
|
||||
size = play->roomList[index].vromEnd - play->roomList[index].vromStart;
|
||||
@@ -103,16 +103,15 @@ s32 Room_HandleLoadCallbacks(PlayState* play, RoomContext* roomCtx) {
|
||||
if (roomCtx->unk31 == 1) {
|
||||
if (!osRecvMesg(&roomCtx->loadQueue, NULL, OS_MESG_NOBLOCK)) {
|
||||
roomCtx->unk31 = 0;
|
||||
roomCtx->currRoom.segment = roomCtx->activeRoomVram;
|
||||
roomCtx->curRoom.segment = roomCtx->activeRoomVram;
|
||||
// TODO: Segment number enum
|
||||
gSegments[0x03] = PHYSICAL_TO_VIRTUAL(roomCtx->activeRoomVram);
|
||||
|
||||
Scene_ProcessHeader(play, (SceneCmd*)roomCtx->currRoom.segment);
|
||||
Scene_ProcessHeader(play, (SceneCmd*)roomCtx->curRoom.segment);
|
||||
func_80123140(play, GET_PLAYER(play));
|
||||
Actor_SpawnTransitionActors(play, &play->actorCtx);
|
||||
|
||||
if (((play->sceneNum != SCENE_IKANA) || (roomCtx->currRoom.num != 1)) &&
|
||||
(play->sceneNum != SCENE_IKNINSIDE)) {
|
||||
if (((play->sceneId != SCENE_IKANA) || (roomCtx->curRoom.num != 1)) && (play->sceneId != SCENE_IKNINSIDE)) {
|
||||
play->envCtx.lightSettingOverride = 0xFF;
|
||||
play->envCtx.unk_E0 = 0;
|
||||
}
|
||||
@@ -142,9 +141,9 @@ void func_8012EBF8(PlayState* play, RoomContext* roomCtx) {
|
||||
roomCtx->prevRoom.segment = NULL;
|
||||
func_800BA798(play, &play->actorCtx);
|
||||
Actor_SpawnTransitionActors(play, &play->actorCtx);
|
||||
if (roomCtx->currRoom.num > -1) {
|
||||
Map_InitRoomData(play, roomCtx->currRoom.num);
|
||||
if (roomCtx->curRoom.num > -1) {
|
||||
Map_InitRoomData(play, roomCtx->curRoom.num);
|
||||
Minimap_SavePlayerRoomInitInfo(play);
|
||||
}
|
||||
func_801A3CD8(play->roomCtx.currRoom.echo);
|
||||
func_801A3CD8(play->roomCtx.curRoom.echo);
|
||||
}
|
||||
|
||||
+14
-14
@@ -28,12 +28,12 @@ void Object_InitBank(GameState* gameState, ObjectContext* objectCtx) {
|
||||
u32 spaceSize;
|
||||
s32 i;
|
||||
|
||||
if (play->sceneNum == SCENE_CLOCKTOWER || play->sceneNum == SCENE_TOWN || play->sceneNum == SCENE_BACKTOWN ||
|
||||
play->sceneNum == SCENE_ICHIBA) {
|
||||
if (play->sceneId == SCENE_CLOCKTOWER || play->sceneId == SCENE_TOWN || play->sceneId == SCENE_BACKTOWN ||
|
||||
play->sceneId == SCENE_ICHIBA) {
|
||||
spaceSize = OBJECT_SPACE_SIZE_CLOCK_TOWN;
|
||||
} else if (play->sceneNum == SCENE_MILK_BAR) {
|
||||
} else if (play->sceneId == SCENE_MILK_BAR) {
|
||||
spaceSize = OBJECT_SPACE_SIZE_MILK_BAR;
|
||||
} else if (play->sceneNum == SCENE_00KEIKOKU) {
|
||||
} else if (play->sceneId == SCENE_00KEIKOKU) {
|
||||
spaceSize = OBJECT_SPACE_SIZE_TERMINA_FIELD;
|
||||
} else {
|
||||
spaceSize = OBJECT_SPACE_SIZE_DEFAULT;
|
||||
@@ -234,17 +234,17 @@ void Scene_HeaderCmdSpecialFiles(PlayState* play, SceneCmd* cmd) {
|
||||
|
||||
// SceneTableEntry Header Command 0x08: Room Behavior
|
||||
void Scene_HeaderCmdRoomBehavior(PlayState* play, SceneCmd* cmd) {
|
||||
play->roomCtx.currRoom.unk3 = cmd->roomBehavior.gpFlag1;
|
||||
play->roomCtx.currRoom.unk2 = cmd->roomBehavior.gpFlag2 & 0xFF;
|
||||
play->roomCtx.currRoom.unk5 = (cmd->roomBehavior.gpFlag2 >> 8) & 1;
|
||||
play->roomCtx.curRoom.unk3 = cmd->roomBehavior.gpFlag1;
|
||||
play->roomCtx.curRoom.unk2 = cmd->roomBehavior.gpFlag2 & 0xFF;
|
||||
play->roomCtx.curRoom.unk5 = (cmd->roomBehavior.gpFlag2 >> 8) & 1;
|
||||
play->msgCtx.unk12044 = (cmd->roomBehavior.gpFlag2 >> 0xA) & 1;
|
||||
play->roomCtx.currRoom.enablePosLights = (cmd->roomBehavior.gpFlag2 >> 0xB) & 1;
|
||||
play->roomCtx.curRoom.enablePosLights = (cmd->roomBehavior.gpFlag2 >> 0xB) & 1;
|
||||
play->envCtx.unk_E2 = (cmd->roomBehavior.gpFlag2 >> 0xC) & 1;
|
||||
}
|
||||
|
||||
// SceneTableEntry Header Command 0x0A: Mesh Header
|
||||
void Scene_HeaderCmdMesh(PlayState* play, SceneCmd* cmd) {
|
||||
play->roomCtx.currRoom.mesh = Lib_SegmentedToVirtual(cmd->mesh.segment);
|
||||
play->roomCtx.curRoom.mesh = Lib_SegmentedToVirtual(cmd->mesh.segment);
|
||||
}
|
||||
|
||||
// SceneTableEntry Header Command 0x0B: Object List
|
||||
@@ -446,7 +446,7 @@ void Scene_HeaderCmdSoundSettings(PlayState* play, SceneCmd* cmd) {
|
||||
|
||||
// SceneTableEntry Header Command 0x16: Echo Setting
|
||||
void Scene_HeaderCmdEchoSetting(PlayState* play, SceneCmd* cmd) {
|
||||
play->roomCtx.currRoom.echo = cmd->echoSettings.echo;
|
||||
play->roomCtx.curRoom.echo = cmd->echoSettings.echo;
|
||||
}
|
||||
|
||||
// SceneTableEntry Header Command 0x18: Alternate Header List=
|
||||
@@ -497,23 +497,23 @@ void Scene_HeaderCmdSetAreaVisitedFlag(PlayState* play, SceneCmd* cmd) {
|
||||
s16 i = 0;
|
||||
|
||||
while (true) {
|
||||
if (gScenesPerRegion[i][j] == 0xFFFF) {
|
||||
if (gSceneIdsPerRegion[i][j] == 0xFFFF) {
|
||||
i++;
|
||||
j = 0;
|
||||
|
||||
if (i == ARRAY_COUNT(gScenesPerRegion)) {
|
||||
if (i == ARRAY_COUNT(gSceneIdsPerRegion)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (play->sceneNum == gScenesPerRegion[i][j]) {
|
||||
if (play->sceneId == gSceneIdsPerRegion[i][j]) {
|
||||
break;
|
||||
}
|
||||
|
||||
j++;
|
||||
}
|
||||
|
||||
if (i < ARRAY_COUNT(gScenesPerRegion)) {
|
||||
if (i < ARRAY_COUNT(gSceneIdsPerRegion)) {
|
||||
gSaveContext.save.mapsVisited = (gBitFlags[i] | gSaveContext.save.mapsVisited) | gSaveContext.save.mapsVisited;
|
||||
}
|
||||
}
|
||||
|
||||
+644
-631
File diff suppressed because it is too large
Load Diff
@@ -130,9 +130,9 @@ s32 Schedule_ReturnValueS(PlayState* play, u8** script, ScheduleOutput* output)
|
||||
|
||||
s32 Schedule_CheckNotInSceneS(PlayState* play, u8** script, ScheduleOutput* output) {
|
||||
ScheduleCmdCheckNotInSceneS* cmd = (ScheduleCmdCheckNotInSceneS*)*script;
|
||||
s16 scene = (cmd->sceneH << 8) | cmd->sceneL;
|
||||
s16 sceneId = (cmd->sceneIdH << 8) | cmd->sceneIdL;
|
||||
|
||||
if (scene != play->sceneNum) {
|
||||
if (sceneId != play->sceneId) {
|
||||
*script += cmd->offset;
|
||||
}
|
||||
|
||||
@@ -141,9 +141,9 @@ s32 Schedule_CheckNotInSceneS(PlayState* play, u8** script, ScheduleOutput* outp
|
||||
|
||||
s32 Schedule_CheckNotInSceneL(PlayState* play, u8** script, ScheduleOutput* output) {
|
||||
ScheduleCmdCheckNotInSceneL* cmd = (ScheduleCmdCheckNotInSceneL*)*script;
|
||||
s16 scene = (cmd->sceneH << 8) | cmd->sceneL;
|
||||
s16 sceneId = (cmd->sceneIdH << 8) | cmd->sceneIdL;
|
||||
|
||||
if (scene != play->sceneNum) {
|
||||
if (sceneId != play->sceneId) {
|
||||
*script = *script + (s16)((cmd->offsetH << 8) | cmd->offsetL);
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -21,7 +21,7 @@ s32 Snap_RecordPictographedActors(PlayState* play) {
|
||||
gSaveContext.save.pictoFlags0 = 0;
|
||||
gSaveContext.save.pictoFlags1 = 0;
|
||||
|
||||
if (play->sceneNum == SCENE_20SICHITAI) {
|
||||
if (play->sceneId == SCENE_20SICHITAI) {
|
||||
Snap_SetFlag(PICTOGRAPH_IN_SWAMP);
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ s32 Snap_RecordPictographedActors(PlayState* play) {
|
||||
seen = 0;
|
||||
|
||||
// Actors which must be pictographed in a specific scene
|
||||
switch (play->sceneNum) {
|
||||
switch (play->sceneId) {
|
||||
case SCENE_20SICHITAI:
|
||||
if ((actor->id == ACTOR_EN_MNK) || (actor->id == ACTOR_EN_BIGOKUTA)) {
|
||||
seen = PICTO_SEEN_IN_SCENE;
|
||||
|
||||
+32
-32
@@ -219,13 +219,13 @@ void Sram_ActivateOwl(u8 owlId) {
|
||||
void Sram_ClearHighscores(void) {
|
||||
gSaveContext.save.unk_EE8 = (gSaveContext.save.unk_EE8 & 0xFFFF) | 0x130000;
|
||||
gSaveContext.save.unk_EE8 = (gSaveContext.save.unk_EE8 & 0xFFFF0000) | 0xA;
|
||||
gSaveContext.save.horseBackBalloonHighScore = 6000; // 60 seconds
|
||||
gSaveContext.save.horseBackBalloonHighScore = SECONDS_TO_TIMER(60);
|
||||
SET_TOWN_SHOOTING_GALLERY_HIGH_SCORE(39);
|
||||
SET_SWAMP_SHOOTING_GALLERY_HIGH_SCORE(10);
|
||||
|
||||
gSaveContext.save.dekuPlaygroundHighScores[0] = 7500; // 75 seconds
|
||||
gSaveContext.save.dekuPlaygroundHighScores[1] = 7500; // 75 seconds
|
||||
gSaveContext.save.dekuPlaygroundHighScores[2] = 7600; // 76 seconds
|
||||
gSaveContext.save.dekuPlaygroundHighScores[0] = SECONDS_TO_TIMER(75);
|
||||
gSaveContext.save.dekuPlaygroundHighScores[1] = SECONDS_TO_TIMER(75);
|
||||
gSaveContext.save.dekuPlaygroundHighScores[2] = SECONDS_TO_TIMER(76);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -248,7 +248,7 @@ void Sram_ClearFlagsAtDawnOfTheFirstDay(void) {
|
||||
* Used by Song of Time (when clicking "Yes") and (indirectly) by the "Dawn of the New Day" cutscene
|
||||
*/
|
||||
void Sram_SaveEndOfCycle(PlayState* play) {
|
||||
s16 sceneNum;
|
||||
s16 sceneId;
|
||||
s32 j;
|
||||
s32 i;
|
||||
u8 slot;
|
||||
@@ -264,13 +264,13 @@ void Sram_SaveEndOfCycle(PlayState* play) {
|
||||
gSaveContext.save.playerData.deaths = 999;
|
||||
}
|
||||
|
||||
sceneNum = Play_GetOriginalSceneNumber(play->sceneNum);
|
||||
sceneId = Play_GetOriginalSceneId(play->sceneId);
|
||||
Play_SaveCycleSceneFlags(&play->state);
|
||||
|
||||
play->actorCtx.sceneFlags.chest &= D_801C5FC0[sceneNum][2];
|
||||
play->actorCtx.sceneFlags.switches[0] &= D_801C5FC0[sceneNum][0];
|
||||
play->actorCtx.sceneFlags.switches[1] &= D_801C5FC0[sceneNum][1];
|
||||
play->actorCtx.sceneFlags.collectible[0] &= D_801C5FC0[sceneNum][3];
|
||||
play->actorCtx.sceneFlags.chest &= D_801C5FC0[sceneId][2];
|
||||
play->actorCtx.sceneFlags.switches[0] &= D_801C5FC0[sceneId][0];
|
||||
play->actorCtx.sceneFlags.switches[1] &= D_801C5FC0[sceneId][1];
|
||||
play->actorCtx.sceneFlags.collectible[0] &= D_801C5FC0[sceneId][3];
|
||||
play->actorCtx.sceneFlags.clearedRoom = 0;
|
||||
|
||||
for (i = 0; i < SCENE_MAX; i++) {
|
||||
@@ -608,7 +608,7 @@ SavePlayerData sSaveDefaultPlayerData = {
|
||||
0xFF, // unk_20
|
||||
0x0000, // owlActivationFlags
|
||||
0xFF, // unk_24
|
||||
SCENE_SPOT00, // savedSceneNum
|
||||
SCENE_SPOT00, // savedSceneId
|
||||
};
|
||||
|
||||
ItemEquips sSaveDefaultItemEquips = {
|
||||
@@ -646,7 +646,7 @@ Inventory sSaveDefaultInventory = {
|
||||
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
// dungeonKeys
|
||||
{ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF },
|
||||
// defenceHearts
|
||||
// defenseHearts
|
||||
0,
|
||||
// strayFairies
|
||||
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
@@ -679,7 +679,7 @@ void Sram_InitNewSave(void) {
|
||||
Lib_MemCpy(&gSaveContext.save.inventory, &sSaveDefaultInventory, sizeof(Inventory));
|
||||
Lib_MemCpy(&gSaveContext.save.checksum, &sSaveDefaultChecksum, sizeof(gSaveContext.save.checksum));
|
||||
|
||||
gSaveContext.save.horseData.scene = SCENE_F01;
|
||||
gSaveContext.save.horseData.sceneId = SCENE_F01;
|
||||
gSaveContext.save.horseData.pos.x = -1420;
|
||||
gSaveContext.save.horseData.pos.y = 257;
|
||||
gSaveContext.save.horseData.pos.z = -1285;
|
||||
@@ -708,7 +708,7 @@ SavePlayerData sSaveDebugPlayerData = {
|
||||
0xFF, // unk_20
|
||||
0, // owlActivationFlags
|
||||
0xFF, // unk_24
|
||||
SCENE_SPOT00, // savedSceneNum
|
||||
SCENE_SPOT00, // savedSceneId
|
||||
};
|
||||
|
||||
ItemEquips sSaveDebugItemEquips = {
|
||||
@@ -792,7 +792,7 @@ Inventory sSaveDebugInventory = {
|
||||
{ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7 },
|
||||
// dungeonKeys
|
||||
{ 8, 8, 8, 8, 8, 8, 8, 8, 8 },
|
||||
// defenceHearts
|
||||
// defenseHearts
|
||||
0,
|
||||
// strayFairies
|
||||
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
@@ -839,7 +839,7 @@ void Sram_InitDebugSave(void) {
|
||||
|
||||
gSaveContext.save.hasTatl = true;
|
||||
|
||||
gSaveContext.save.horseData.scene = SCENE_F01;
|
||||
gSaveContext.save.horseData.sceneId = SCENE_F01;
|
||||
gSaveContext.save.horseData.pos.x = -1420;
|
||||
gSaveContext.save.horseData.pos.y = 257;
|
||||
gSaveContext.save.horseData.pos.z = -1285;
|
||||
@@ -894,13 +894,13 @@ void func_80144A94(SramContext* sramCtx) {
|
||||
gSaveContext.cycleSceneFlags[i].collectible = gSaveContext.save.permanentSceneFlags[i].collectible;
|
||||
}
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(gSaveContext.unk_3DD0); i++) {
|
||||
gSaveContext.unk_3DD0[i] = 0;
|
||||
gSaveContext.unk_3DE0[i] = 0;
|
||||
gSaveContext.unk_3E18[i] = 0;
|
||||
gSaveContext.unk_3E50[i] = 0;
|
||||
gSaveContext.unk_3E88[i] = 0;
|
||||
gSaveContext.unk_3EC0[i] = 0;
|
||||
for (i = 0; i < TIMER_ID_MAX; i++) {
|
||||
gSaveContext.timerStates[i] = TIMER_STATE_OFF;
|
||||
gSaveContext.timerCurTimes[i] = SECONDS_TO_TIMER(0);
|
||||
gSaveContext.timerTimeLimits[i] = SECONDS_TO_TIMER(0);
|
||||
gSaveContext.timerStartOsTimes[i] = 0;
|
||||
gSaveContext.timerStopTimes[i] = SECONDS_TO_TIMER(0);
|
||||
gSaveContext.timerPausedOsTimes[i] = 0;
|
||||
}
|
||||
|
||||
D_801BDAA0 = 1;
|
||||
@@ -969,13 +969,13 @@ void Sram_OpenSave(FileSelectState* fileSelect, SramContext* sramCtx) {
|
||||
gSaveContext.cycleSceneFlags[i].collectible = gSaveContext.save.permanentSceneFlags[i].collectible;
|
||||
}
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(gSaveContext.unk_3DD0); i++) {
|
||||
gSaveContext.unk_3DD0[i] = 0;
|
||||
gSaveContext.unk_3DE0[i] = 0;
|
||||
gSaveContext.unk_3E18[i] = 0;
|
||||
gSaveContext.unk_3E50[i] = 0;
|
||||
gSaveContext.unk_3E88[i] = 0;
|
||||
gSaveContext.unk_3EC0[i] = 0;
|
||||
for (i = 0; i < TIMER_ID_MAX; i++) {
|
||||
gSaveContext.timerStates[i] = TIMER_STATE_OFF;
|
||||
gSaveContext.timerCurTimes[i] = SECONDS_TO_TIMER(0);
|
||||
gSaveContext.timerTimeLimits[i] = SECONDS_TO_TIMER(0);
|
||||
gSaveContext.timerStartOsTimes[i] = 0;
|
||||
gSaveContext.timerStopTimes[i] = SECONDS_TO_TIMER(0);
|
||||
gSaveContext.timerPausedOsTimes[i] = 0;
|
||||
}
|
||||
|
||||
if (gSaveContext.save.isFirstCycle) {
|
||||
@@ -1598,7 +1598,7 @@ void func_80147068(SramContext* sramCtx) {
|
||||
sramCtx->status = 4;
|
||||
}
|
||||
}
|
||||
} else if (((osGetTime() - sramCtx->unk_18) * 0x40) / 3000 / 10000 >= 200) {
|
||||
} else if (OSTIME_TO_TIMER(osGetTime() - sramCtx->unk_18) >= SECONDS_TO_TIMER(2)) {
|
||||
sramCtx->status = 0;
|
||||
}
|
||||
}
|
||||
@@ -1635,7 +1635,7 @@ void func_80147198(SramContext* sramCtx) {
|
||||
sramCtx->status = 4;
|
||||
}
|
||||
}
|
||||
} else if (((osGetTime() - sramCtx->unk_18) * 0x40) / 3000 / 10000 >= 200) {
|
||||
} else if (OSTIME_TO_TIMER(osGetTime() - sramCtx->unk_18) >= SECONDS_TO_TIMER(2)) {
|
||||
sramCtx->status = 0;
|
||||
bzero(sramCtx->saveBuf, SAVE_BUFFER_SIZE);
|
||||
gSaveContext.save.isOwlSave = false;
|
||||
|
||||
+1
-1
@@ -75,7 +75,7 @@ void func_801431E8(GameState* gameState, SkyboxContext* skyboxCtx, s16 skyType)
|
||||
skyboxCtx->envB = 40;
|
||||
|
||||
// Inverted Stone Tower Temple and Inverted Stone Tower
|
||||
if ((play->sceneNum == SCENE_F41) || (play->sceneNum == SCENE_INISIE_R)) {
|
||||
if ((play->sceneId == SCENE_F41) || (play->sceneId == SCENE_INISIE_R)) {
|
||||
skyboxCtx->rotZ = 3.15000009537f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -340,14 +340,14 @@ void func_80A2A1E0(BgDblueMovebg* this, PlayState* play) {
|
||||
Math_StepToS(&this->unk_1CC, this->unk_1CE, 12);
|
||||
this->dyna.actor.shape.rot.y += this->unk_1CC;
|
||||
|
||||
if (play->roomCtx.currRoom.num == 0) {
|
||||
if (play->roomCtx.curRoom.num == 0) {
|
||||
this->opaDList = gGreatBayTempleObjectGearShaftWithPlatformsDL;
|
||||
} else if (play->roomCtx.currRoom.num == 8) {
|
||||
} else if (play->roomCtx.curRoom.num == 8) {
|
||||
this->opaDList = NULL;
|
||||
}
|
||||
|
||||
if (play->roomCtx.currRoom.num != this->unk_170) {
|
||||
if (play->roomCtx.currRoom.num != this->unk_171) {
|
||||
if (play->roomCtx.curRoom.num != this->unk_170) {
|
||||
if (play->roomCtx.curRoom.num != this->unk_171) {
|
||||
if ((play->roomCtx.prevRoom.num != this->unk_170) && (play->roomCtx.prevRoom.num != this->unk_171)) {
|
||||
D_80A2BBF4.unk_01 = 0;
|
||||
Actor_MarkForDeath(&this->dyna.actor);
|
||||
@@ -628,8 +628,8 @@ void func_80A2AED0(BgDblueMovebg* this, PlayState* play) {
|
||||
s32 pad;
|
||||
s32 temp_v0_3;
|
||||
|
||||
if (play->roomCtx.currRoom.num != this->unk_170) {
|
||||
if (play->roomCtx.currRoom.num != this->unk_171) {
|
||||
if (play->roomCtx.curRoom.num != this->unk_170) {
|
||||
if (play->roomCtx.curRoom.num != this->unk_171) {
|
||||
if ((play->roomCtx.prevRoom.num != this->unk_170) && (play->roomCtx.prevRoom.num != this->unk_171)) {
|
||||
D_80A2BBF4.unk_00 = 0;
|
||||
Actor_MarkForDeath(&this->dyna.actor);
|
||||
@@ -669,7 +669,7 @@ void func_80A2AED0(BgDblueMovebg* this, PlayState* play) {
|
||||
this->dyna.actor.shape.rot.x += this->unk_1CC;
|
||||
|
||||
if (this->unk_160 == 8) {
|
||||
if (play->roomCtx.currRoom.num == 8) {
|
||||
if (play->roomCtx.curRoom.num == 8) {
|
||||
func_80A2ABD0(this, play);
|
||||
this->unk_172 |= 0x20;
|
||||
} else {
|
||||
@@ -677,9 +677,9 @@ void func_80A2AED0(BgDblueMovebg* this, PlayState* play) {
|
||||
}
|
||||
}
|
||||
|
||||
if (play->roomCtx.currRoom.num == 0) {
|
||||
if (play->roomCtx.curRoom.num == 0) {
|
||||
this->opaDList = gGreatBayTempleObjectWaterwheelDL;
|
||||
} else if (play->roomCtx.currRoom.num == 8) {
|
||||
} else if (play->roomCtx.curRoom.num == 8) {
|
||||
this->opaDList = gGreatBayTempleObjectWaterwheelWithFakeGearDL;
|
||||
}
|
||||
|
||||
|
||||
@@ -155,7 +155,7 @@ void Boss04_Init(Actor* thisx, PlayState* play2) {
|
||||
s16 phi_s0_2;
|
||||
s32 pad;
|
||||
|
||||
if (Flags_GetClear(play, play->roomCtx.currRoom.num)) {
|
||||
if (Flags_GetClear(play, play->roomCtx.curRoom.num)) {
|
||||
Actor_MarkForDeath(&this->actor);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -162,7 +162,7 @@ void DmAh_Init(Actor* thisx, PlayState* play) {
|
||||
this->actor.flags &= ~ACTOR_FLAG_1;
|
||||
Actor_SetScale(&this->actor, 0.01f);
|
||||
this->unk_27C |= 1;
|
||||
if ((play->sceneNum == SCENE_YADOYA) && (play->curSpawn == 4)) {
|
||||
if ((play->sceneId == SCENE_YADOYA) && (play->curSpawn == 4)) {
|
||||
this->unk_280 = func_80C1D78C(play);
|
||||
func_80C1D410(this, 1);
|
||||
this->actionFunc = func_80C1D92C;
|
||||
|
||||
@@ -183,7 +183,7 @@ void func_80C1C958(DmAn* this, PlayState* play) {
|
||||
this->unk_2AE |= 1;
|
||||
this->actor.draw = func_80C1D0B0;
|
||||
|
||||
if ((play->sceneNum == SCENE_YADOYA) && (play->curSpawn == 4)) {
|
||||
if ((play->sceneId == SCENE_YADOYA) && (play->curSpawn == 4)) {
|
||||
this->unk_2B4 = func_80C1C8E8(play);
|
||||
func_80C1C4D8(this, play, 1);
|
||||
this->actionFunc = func_80C1CC80;
|
||||
|
||||
@@ -449,7 +449,7 @@ void func_80AA5E2C(DmChar00* this, PlayState* play) {
|
||||
|
||||
void func_80AA5EBC(DmChar00* this, PlayState* play) {
|
||||
if (play->csCtx.state != 0) {
|
||||
switch (play->sceneNum) {
|
||||
switch (play->sceneId) {
|
||||
case SCENE_LOST_WOODS:
|
||||
if (gSaveContext.sceneSetupIndex == 1) {
|
||||
func_80AA561C(this, play);
|
||||
@@ -527,7 +527,7 @@ void DmChar00_Init(Actor* thisx, PlayState* play) {
|
||||
s32 pad;
|
||||
DmChar00* this = THIS;
|
||||
|
||||
if ((play->sceneNum == SCENE_LOST_WOODS) && !Cutscene_IsPlaying(play)) {
|
||||
if ((play->sceneId == SCENE_LOST_WOODS) && !Cutscene_IsPlaying(play)) {
|
||||
Actor_MarkForDeath(thisx);
|
||||
}
|
||||
|
||||
@@ -914,8 +914,8 @@ void DmChar00_Draw(Actor* thisx, PlayState* play2) {
|
||||
s32 pad;
|
||||
Gfx* gfx = GRAPH_ALLOC(play->state.gfxCtx, sizeof(Gfx) * 4);
|
||||
|
||||
if ((play->csCtx.state == 0) && ((play->sceneNum != SCENE_OPENINGDAN) || (gSaveContext.sceneSetupIndex != 0) ||
|
||||
(play->roomCtx.currRoom.num != 0) || (play->csCtx.currentCsIndex != 1) ||
|
||||
if ((play->csCtx.state == 0) && ((play->sceneId != SCENE_OPENINGDAN) || (gSaveContext.sceneSetupIndex != 0) ||
|
||||
(play->roomCtx.curRoom.num != 0) || (play->csCtx.currentCsIndex != 1) ||
|
||||
(DMCHAR00_GET(&this->actor) != DMCHAR00_0))) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ void DmChar02_PlaySfxForDroppingOcarinaCutscene(DmChar02* this, PlayState* play)
|
||||
}
|
||||
|
||||
void DmChar02_PlaySfxForCutscenes(DmChar02* this, PlayState* play) {
|
||||
if ((play->csCtx.state != 0) && (play->sceneNum == SCENE_OKUJOU) && (play->csCtx.currentCsIndex == 1)) {
|
||||
if ((play->csCtx.state != 0) && (play->sceneId == SCENE_OKUJOU) && (play->csCtx.currentCsIndex == 1)) {
|
||||
DmChar02_PlaySfxForDroppingOcarinaCutscene(this, play);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -544,7 +544,7 @@ void func_80AAD4A8(DmChar05* this, PlayState* play) {
|
||||
}
|
||||
}
|
||||
} else if (DMCHAR05_GET(&this->actor) == DMCHAR05_3) {
|
||||
if (play->sceneNum == SCENE_OKUJOU) {
|
||||
if (play->sceneId == SCENE_OKUJOU) {
|
||||
if (gSaveContext.sceneSetupIndex == 2) {
|
||||
if (play->csCtx.currentCsIndex == 0) {
|
||||
func_80AAD3F8(this, play);
|
||||
@@ -552,7 +552,7 @@ void func_80AAD4A8(DmChar05* this, PlayState* play) {
|
||||
func_80AAD450(this, play);
|
||||
}
|
||||
}
|
||||
} else if (play->sceneNum == SCENE_SPOT00) {
|
||||
} else if (play->sceneId == SCENE_SPOT00) {
|
||||
if (gSaveContext.sceneSetupIndex == 9) {
|
||||
if ((play->csCtx.currentCsIndex == 0) && (play->csCtx.frames == 255)) {
|
||||
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_EVIL_POWER);
|
||||
|
||||
@@ -183,7 +183,7 @@ void func_80C248A8(DmGm* this, PlayState* play) {
|
||||
this->unk_2AE |= 1;
|
||||
this->actor.draw = func_80C25000;
|
||||
|
||||
if ((play->sceneNum == SCENE_YADOYA) && (play->curSpawn == 4)) {
|
||||
if ((play->sceneId == SCENE_YADOYA) && (play->curSpawn == 4)) {
|
||||
this->unk_2B4 = func_80C24838(play);
|
||||
func_80C24428(this, play, 1);
|
||||
this->actionFunc = func_80C24BD0;
|
||||
|
||||
@@ -95,7 +95,7 @@ void DmOpstage_Update(Actor* thisx, PlayState* play) {
|
||||
DmOpstage* this = THIS;
|
||||
|
||||
this->actionFunc(this, play);
|
||||
if ((play->sceneNum == SCENE_SPOT00) && (gSaveContext.sceneSetupIndex == 0) && (play->csCtx.frames == 480)) {
|
||||
if ((play->sceneId == SCENE_SPOT00) && (gSaveContext.sceneSetupIndex == 0) && (play->csCtx.frames == 480)) {
|
||||
// This actor is responsible for playing the fairy sound during the exposition in the intro,
|
||||
// during the transition to Lost Woods, before Ocarina gets stolen.
|
||||
func_8019F128(NA_SE_EV_NAVY_FLY_REBIRTH);
|
||||
|
||||
@@ -917,7 +917,7 @@ void DmStk_PlaySfxForMoonWarpCutsceneVersion2(DmStk* this, PlayState* play) {
|
||||
*/
|
||||
void DmStk_PlaySfxForCutscenes(DmStk* this, PlayState* play) {
|
||||
if (play->csCtx.state != 0) {
|
||||
switch (play->sceneNum) {
|
||||
switch (play->sceneId) {
|
||||
case SCENE_LOST_WOODS:
|
||||
if (gSaveContext.sceneSetupIndex == 1) {
|
||||
DmStk_PlaySfxForIntroCutsceneFirstPart(this, play);
|
||||
@@ -1028,13 +1028,13 @@ void DmStk_Init(Actor* thisx, PlayState* play) {
|
||||
this->fogG = play->lightCtx.unk8;
|
||||
this->fogB = play->lightCtx.unk9;
|
||||
|
||||
if ((play->sceneNum == SCENE_LOST_WOODS) && (gSaveContext.sceneSetupIndex == 1)) {
|
||||
if ((play->sceneId == SCENE_LOST_WOODS) && (gSaveContext.sceneSetupIndex == 1)) {
|
||||
this->alpha = 0;
|
||||
this->fogN = 0;
|
||||
this->fogF = 1000;
|
||||
this->fogScale = 1.0f;
|
||||
this->actionFunc = DmStk_DoNothing;
|
||||
} else if (play->sceneNum == SCENE_OKUJOU) {
|
||||
} else if (play->sceneId == SCENE_OKUJOU) {
|
||||
this->alpha = 255;
|
||||
this->fogN = 996;
|
||||
this->fogF = 1000;
|
||||
@@ -1045,11 +1045,11 @@ void DmStk_Init(Actor* thisx, PlayState* play) {
|
||||
|
||||
if (gSaveContext.save.entrance == ENTRANCE(CLOCK_TOWER_ROOFTOP, 0)) {
|
||||
if (gSaveContext.sceneSetupIndex == 0) {
|
||||
if (gSaveContext.unk_3DD0[3] == 0) {
|
||||
if (gSaveContext.timerStates[TIMER_ID_MOON_CRASH] == TIMER_STATE_OFF) {
|
||||
// Starts a 5 minute (300 second) timer until the moon falls.
|
||||
func_8010E9F0(3, 300);
|
||||
XREG(80) = 200;
|
||||
XREG(81) = 115;
|
||||
Interface_StartTimer(TIMER_ID_MOON_CRASH, 300);
|
||||
R_MOON_CRASH_TIMER_Y = 200;
|
||||
R_MOON_CRASH_TIMER_X = 115;
|
||||
}
|
||||
|
||||
if (gSaveContext.save.inventory.items[SLOT_OCARINA] == ITEM_NONE) {
|
||||
@@ -1062,12 +1062,12 @@ void DmStk_Init(Actor* thisx, PlayState* play) {
|
||||
|
||||
} else if (gSaveContext.sceneSetupIndex == 3) {
|
||||
this->animIndex = SK_ANIM_FLOATING_ARMS_CROSSED;
|
||||
if (gSaveContext.unk_3DD0[3] == 0) {
|
||||
if (gSaveContext.timerStates[TIMER_ID_MOON_CRASH] == TIMER_STATE_OFF) {
|
||||
// This code is called when the Giants fail to stop the moon.
|
||||
// Starts a 1 minute (60 second) timer until the moon falls.
|
||||
func_8010E9F0(3, 60);
|
||||
XREG(80) = 200;
|
||||
XREG(81) = 115;
|
||||
Interface_StartTimer(TIMER_ID_MOON_CRASH, 60);
|
||||
R_MOON_CRASH_TIMER_Y = 200;
|
||||
R_MOON_CRASH_TIMER_X = 115;
|
||||
}
|
||||
|
||||
this->actor.world.pos.y = 120.0f;
|
||||
@@ -1088,7 +1088,7 @@ void DmStk_Init(Actor* thisx, PlayState* play) {
|
||||
Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
|
||||
CollisionCheck_SetInfo2(&this->actor.colChkInfo, &sDamageTable, &sColChkInfoInit);
|
||||
|
||||
} else if ((play->sceneNum == SCENE_00KEIKOKU) && (gSaveContext.sceneSetupIndex == 0)) {
|
||||
} else if ((play->sceneId == SCENE_00KEIKOKU) && (gSaveContext.sceneSetupIndex == 0)) {
|
||||
if (!(play->actorCtx.flags & ACTORCTX_FLAG_1)) {
|
||||
Actor_MarkForDeath(&this->actor);
|
||||
}
|
||||
@@ -1101,7 +1101,7 @@ void DmStk_Init(Actor* thisx, PlayState* play) {
|
||||
this->animIndex = SK_ANIM_BENT_OVER_HEAD_TWITCH;
|
||||
this->actionFunc = DmStk_WaitForTelescope;
|
||||
} else {
|
||||
if ((play->sceneNum == SCENE_LOST_WOODS) && !Cutscene_IsPlaying(play)) {
|
||||
if ((play->sceneId == SCENE_LOST_WOODS) && !Cutscene_IsPlaying(play)) {
|
||||
Actor_MarkForDeath(&this->actor);
|
||||
}
|
||||
|
||||
@@ -1127,8 +1127,7 @@ void DmStk_Init(Actor* thisx, PlayState* play) {
|
||||
|
||||
Actor_SetScale(&this->actor, 0.01f);
|
||||
|
||||
if ((play->sceneNum == SCENE_00KEIKOKU) && (gSaveContext.sceneSetupIndex == 3) &&
|
||||
(play->csCtx.currentCsIndex > 0)) {
|
||||
if ((play->sceneId == SCENE_00KEIKOKU) && (gSaveContext.sceneSetupIndex == 3) && (play->csCtx.currentCsIndex > 0)) {
|
||||
play->envCtx.unk_17 = 15;
|
||||
play->envCtx.unk_18 = 15;
|
||||
}
|
||||
@@ -1316,7 +1315,7 @@ void DmStk_UpdateCutscenes(DmStk* this, PlayState* play) {
|
||||
if (play->csCtx.frames == play->csCtx.actorActions[actorActionIndex]->startFrame) {
|
||||
if (this->csAction != play->csCtx.actorActions[actorActionIndex]->action) {
|
||||
this->csAction = play->csCtx.actorActions[actorActionIndex]->action;
|
||||
if (play->sceneNum == SCENE_CLOCKTOWER) {
|
||||
if (play->sceneId == SCENE_CLOCKTOWER) {
|
||||
this->handType = SK_HAND_TYPE_HOLDING_FLUTE;
|
||||
} else {
|
||||
this->handType = SK_HAND_TYPE_DEFAULT;
|
||||
@@ -1685,7 +1684,7 @@ void DmStk_UpdateCutscenes(DmStk* this, PlayState* play) {
|
||||
this->handType = SK_HAND_TYPE_HOLDING_MAJORAS_MASK;
|
||||
} else if (((this->animIndex >= SK_ANIM_HUDDLE_WITH_FAIRIES) && (this->animIndex <= SK_ANIM_DRAW)) ||
|
||||
((this->animIndex >= SK_ANIM_PLAY_FLUTE) && (this->animIndex <= SK_ANIM_CARTWHEEL)) ||
|
||||
((play->sceneNum == SCENE_00KEIKOKU) && (gSaveContext.sceneSetupIndex == 7))) {
|
||||
((play->sceneId == SCENE_00KEIKOKU) && (gSaveContext.sceneSetupIndex == 7))) {
|
||||
this->maskType = SK_MASK_TYPE_NO_MASK;
|
||||
if ((this->animIndex == SK_ANIM_HOLD_UP_MASK_START) || (this->animIndex == SK_ANIM_HOLD_UP_MASK_LOOP)) {
|
||||
this->handType = SK_HAND_TYPE_HOLDING_MAJORAS_MASK_AND_FLUTE;
|
||||
@@ -1777,7 +1776,7 @@ void DmStk_Update(Actor* thisx, PlayState* play) {
|
||||
|
||||
this->actionFunc(this, play);
|
||||
|
||||
if (play->sceneNum == SCENE_OKUJOU) {
|
||||
if (play->sceneId == SCENE_OKUJOU) {
|
||||
DmStk_UpdateCollision(this, play);
|
||||
}
|
||||
|
||||
@@ -1824,8 +1823,7 @@ void DmStk_Update(Actor* thisx, PlayState* play) {
|
||||
}
|
||||
}
|
||||
|
||||
if ((play->sceneNum == SCENE_00KEIKOKU) && (gSaveContext.sceneSetupIndex == 3) &&
|
||||
(play->csCtx.currentCsIndex > 0)) {
|
||||
if ((play->sceneId == SCENE_00KEIKOKU) && (gSaveContext.sceneSetupIndex == 3) && (play->csCtx.currentCsIndex > 0)) {
|
||||
play->envCtx.unk_17 = 15;
|
||||
play->envCtx.unk_18 = 15;
|
||||
}
|
||||
@@ -1888,7 +1886,7 @@ void DmStk_PostLimbDraw2(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot
|
||||
break;
|
||||
|
||||
case SK_MASK_TYPE_NORMAL:
|
||||
if ((play->sceneNum == SCENE_LOST_WOODS) && (gSaveContext.sceneSetupIndex == 1) &&
|
||||
if ((play->sceneId == SCENE_LOST_WOODS) && (gSaveContext.sceneSetupIndex == 1) &&
|
||||
(play->csCtx.frames < 1400)) {
|
||||
if (this->fogN == this->fogF) {
|
||||
this->fogF = this->fogN;
|
||||
@@ -1950,7 +1948,7 @@ void DmStk_PostLimbDraw2(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot
|
||||
case SK_HAND_TYPE_HOLDING_OCARINA:
|
||||
gSPDisplayList(POLY_OPA_DISP++, gSkullKidOcarinaHoldingRightHand);
|
||||
|
||||
if ((play->sceneNum == SCENE_LOST_WOODS) && (gSaveContext.sceneSetupIndex == 1)) {
|
||||
if ((play->sceneId == SCENE_LOST_WOODS) && (gSaveContext.sceneSetupIndex == 1)) {
|
||||
gSPDisplayList(POLY_OPA_DISP++, gSkullKidOcarinaOfTimeDL);
|
||||
}
|
||||
break;
|
||||
@@ -1988,7 +1986,7 @@ void DmStk_PostLimbDraw2(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot
|
||||
break;
|
||||
|
||||
case SK_HAND_TYPE_HOLDING_OCARINA:
|
||||
if ((play->sceneNum != SCENE_LOST_WOODS) || (gSaveContext.sceneSetupIndex != 1)) {
|
||||
if ((play->sceneId != SCENE_LOST_WOODS) || (gSaveContext.sceneSetupIndex != 1)) {
|
||||
gSPDisplayList(POLY_OPA_DISP++, gSkullKidOcarinaOfTimeDL);
|
||||
}
|
||||
gSPDisplayList(POLY_OPA_DISP++, gSkullKidTwoFingersExtendedLeftHand);
|
||||
|
||||
@@ -100,7 +100,7 @@ static InitChainEntry sInitChain[] = {
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ s16 sceneNum;
|
||||
/* 0x00 */ s16 sceneId;
|
||||
/* 0x02 */ u8 index;
|
||||
} ShutterSceneInfo; // size = 0x4
|
||||
|
||||
@@ -114,8 +114,8 @@ ShutterSceneInfo D_808A2258[] = {
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ s16 dungeonScene;
|
||||
/* 0x02 */ s16 bossScene;
|
||||
/* 0x00 */ s16 dungeonSceneId;
|
||||
/* 0x02 */ s16 bossSceneId;
|
||||
/* 0x04 */ u8 index;
|
||||
} BossDoorInfo; // size = 0x6
|
||||
|
||||
@@ -209,7 +209,7 @@ void DoorShutter_Init(Actor* thisx, PlayState* play2) {
|
||||
ShutterSceneInfo* shutterSceneInfo = &D_808A2258[0];
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(D_808A2258) - 1; i++, shutterSceneInfo++) {
|
||||
if (play->sceneNum == shutterSceneInfo->sceneNum) {
|
||||
if (play->sceneId == shutterSceneInfo->sceneId) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -222,7 +222,7 @@ void DoorShutter_Init(Actor* thisx, PlayState* play2) {
|
||||
BossDoorInfo* bossDoorInfo = &D_808A22A0[0];
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(D_808A22A0) - 1; i++, bossDoorInfo++) {
|
||||
if ((play->sceneNum == bossDoorInfo->dungeonScene) || (play->sceneNum == bossDoorInfo->bossScene)) {
|
||||
if ((play->sceneId == bossDoorInfo->dungeonSceneId) || (play->sceneId == bossDoorInfo->bossSceneId)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -553,9 +553,9 @@ void func_808A1884(DoorShutter* this, PlayState* play) {
|
||||
play->doorCtx.transitionActorList[DOORSHUTTER_GET_FC00(&this->actor)].sides[(sp44.z < 0.0f) ? 0 : 1].room;
|
||||
|
||||
if (room != this->actor.room) {
|
||||
Room temp = play->roomCtx.currRoom;
|
||||
Room temp = play->roomCtx.curRoom;
|
||||
|
||||
play->roomCtx.currRoom = play->roomCtx.prevRoom;
|
||||
play->roomCtx.curRoom = play->roomCtx.prevRoom;
|
||||
play->roomCtx.prevRoom = temp;
|
||||
play->roomCtx.activeMemPage ^= 1;
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ typedef struct {
|
||||
|
||||
// Maps scenes to SpiralObjectType
|
||||
typedef struct {
|
||||
/* 0x00 */ s16 sceneNum;
|
||||
/* 0x00 */ s16 sceneId;
|
||||
/* 0x02 */ u8 objectType;
|
||||
} SpiralSceneInfo;
|
||||
|
||||
@@ -116,7 +116,7 @@ s32 DoorSpiral_SetSpiralType(DoorSpiral* this, PlayState* play) {
|
||||
this->spiralType = doorObjectInfo->spiralType;
|
||||
|
||||
if ((this->spiralType == SPIRAL_DAMPES_HOUSE) ||
|
||||
((this->spiralType == SPIRAL_WOODFALL_TEMPLE) && play->roomCtx.currRoom.enablePosLights)) {
|
||||
((this->spiralType == SPIRAL_WOODFALL_TEMPLE) && play->roomCtx.curRoom.enablePosLights)) {
|
||||
if (this->spiralType == SPIRAL_WOODFALL_TEMPLE) {
|
||||
this->spiralType = SPIRAL_WOODFALL_TEMPLE_ALT;
|
||||
}
|
||||
@@ -147,7 +147,7 @@ s32 DoorSpiral_GetObjectType(PlayState* play) {
|
||||
s32 type;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(spiralSceneInfo); sceneInfo++, i++) {
|
||||
if (play->sceneNum == sceneInfo->sceneNum) {
|
||||
if (play->sceneId == sceneInfo->sceneId) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,13 +75,13 @@ void DoorWarp1_SetupAction(DoorWarp1* this, DoorWarp1ActionFunc actionFunc) {
|
||||
s32 func_808B849C(DoorWarp1* this, PlayState* play) {
|
||||
s32 ret = 0;
|
||||
|
||||
if ((play->sceneNum == SCENE_MITURIN_BS) && !CHECK_QUEST_ITEM(QUEST_REMAINS_ODOWLA)) {
|
||||
if ((play->sceneId == SCENE_MITURIN_BS) && !CHECK_QUEST_ITEM(QUEST_REMAINS_ODOWLA)) {
|
||||
ret = 1;
|
||||
} else if ((play->sceneNum == SCENE_HAKUGIN_BS) && !CHECK_QUEST_ITEM(QUEST_REMAINS_GOHT)) {
|
||||
} else if ((play->sceneId == SCENE_HAKUGIN_BS) && !CHECK_QUEST_ITEM(QUEST_REMAINS_GOHT)) {
|
||||
ret = 2;
|
||||
} else if ((play->sceneNum == SCENE_SEA_BS) && !CHECK_QUEST_ITEM(QUEST_REMAINS_GYORG)) {
|
||||
} else if ((play->sceneId == SCENE_SEA_BS) && !CHECK_QUEST_ITEM(QUEST_REMAINS_GYORG)) {
|
||||
ret = 3;
|
||||
} else if ((play->sceneNum == SCENE_INISIE_BS) && !CHECK_QUEST_ITEM(QUEST_REMAINS_TWINMOLD)) {
|
||||
} else if ((play->sceneId == SCENE_INISIE_BS) && !CHECK_QUEST_ITEM(QUEST_REMAINS_TWINMOLD)) {
|
||||
ret = 4;
|
||||
}
|
||||
return ret;
|
||||
@@ -161,8 +161,8 @@ void DoorWarp1_Init(Actor* thisx, PlayState* play) {
|
||||
break;
|
||||
}
|
||||
|
||||
if ((play->sceneNum == SCENE_MITURIN_BS) || (play->sceneNum == SCENE_HAKUGIN_BS) ||
|
||||
(play->sceneNum == SCENE_INISIE_BS) || (play->sceneNum == SCENE_SEA_BS)) {
|
||||
if ((play->sceneId == SCENE_MITURIN_BS) || (play->sceneId == SCENE_HAKUGIN_BS) ||
|
||||
(play->sceneId == SCENE_INISIE_BS) || (play->sceneId == SCENE_SEA_BS)) {
|
||||
func_800FE484();
|
||||
play->interfaceCtx.restrictions.unk_312 = 1;
|
||||
play->interfaceCtx.restrictions.songOfSoaring = 1;
|
||||
@@ -268,7 +268,7 @@ void func_808B8E78(DoorWarp1* this, PlayState* play) {
|
||||
this->unk_1A8 = 0.0f;
|
||||
this->unk_1AC = 0.0f;
|
||||
this->unk_1A4 = 700.0f;
|
||||
if (play->sceneNum == SCENE_INISIE_N) {
|
||||
if (play->sceneId == SCENE_INISIE_N) {
|
||||
DoorWarp1_SetupAction(this, func_808B96A0);
|
||||
} else if (gSaveContext.save.weekEventReg[86] & 0x80) {
|
||||
this->unk_1D4 = 0;
|
||||
@@ -307,12 +307,12 @@ void func_808B90CC(DoorWarp1* this, PlayState* play) {
|
||||
s16 sp2E = 0;
|
||||
f32 phi_f0 = 0.0f;
|
||||
|
||||
if (play->sceneNum == SCENE_MITURIN) {
|
||||
if (play->sceneId == SCENE_MITURIN) {
|
||||
sp2E = -10;
|
||||
phi_f0 = -5.0f;
|
||||
} else if (play->sceneNum == SCENE_HAKUGIN) {
|
||||
} else if (play->sceneId == SCENE_HAKUGIN) {
|
||||
sp2E = -20;
|
||||
} else if (play->sceneNum == SCENE_SEA) {
|
||||
} else if (play->sceneId == SCENE_SEA) {
|
||||
sp2E = -20;
|
||||
}
|
||||
|
||||
@@ -551,7 +551,7 @@ void func_808B9CE8(DoorWarp1* this, PlayState* play) {
|
||||
return;
|
||||
}
|
||||
|
||||
switch (play->sceneNum) {
|
||||
switch (play->sceneId) {
|
||||
case SCENE_MITURIN_BS:
|
||||
gSaveContext.save.unk_ECC[0] =
|
||||
(((void)0, gSaveContext.save.unk_ECC[0]) & 0xFFFFFF00) | (((u8)gSaveContext.save.unk_ECC[1]) & 0xFF);
|
||||
@@ -598,7 +598,7 @@ void func_808B9F10(DoorWarp1* this, PlayState* play) {
|
||||
if ((this->unk_203 == 0) && func_808B866C(this, play) && !Play_InCsMode(play) && (this->unk_203 == 0)) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
Interface_ChangeAlpha(1);
|
||||
Interface_SetHudVisibility(HUD_VISIBILITY_NONE);
|
||||
func_800B7298(play, &this->dyna.actor, 9);
|
||||
player->unk_3A0.x = this->dyna.actor.world.pos.x;
|
||||
player->unk_3A0.z = this->dyna.actor.world.pos.z;
|
||||
@@ -635,16 +635,16 @@ void func_808BA10C(DoorWarp1* this, PlayState* play) {
|
||||
u8 phi_a0;
|
||||
s32 phi_v0_3;
|
||||
|
||||
if ((play->sceneNum == SCENE_MITURIN_BS) || (play->sceneNum == SCENE_HAKUGIN_BS) ||
|
||||
(play->sceneNum == SCENE_INISIE_BS) || (play->sceneNum == SCENE_SEA_BS)) {
|
||||
D_801F4DE2 = play->sceneNum;
|
||||
if (play->sceneNum == SCENE_MITURIN_BS) {
|
||||
if ((play->sceneId == SCENE_MITURIN_BS) || (play->sceneId == SCENE_HAKUGIN_BS) ||
|
||||
(play->sceneId == SCENE_INISIE_BS) || (play->sceneId == SCENE_SEA_BS)) {
|
||||
D_801F4DE2 = play->sceneId;
|
||||
if (play->sceneId == SCENE_MITURIN_BS) {
|
||||
phi_v0_2 = 0;
|
||||
} else if (play->sceneNum == SCENE_HAKUGIN_BS) {
|
||||
} else if (play->sceneId == SCENE_HAKUGIN_BS) {
|
||||
phi_v0_2 = 1;
|
||||
} else if (play->sceneNum == SCENE_INISIE_BS) {
|
||||
} else if (play->sceneId == SCENE_INISIE_BS) {
|
||||
phi_v0_2 = 2;
|
||||
} else if (play->sceneNum == SCENE_SEA_BS) {
|
||||
} else if (play->sceneId == SCENE_SEA_BS) {
|
||||
phi_v0_2 = 3;
|
||||
} else {
|
||||
phi_v0_2 = 0;
|
||||
@@ -871,7 +871,7 @@ void func_808BA550(DoorWarp1* this, PlayState* play) {
|
||||
|
||||
play->envCtx.lightSettings.fogNear = -500.0f * temp_f0;
|
||||
if (play->envCtx.lightSettings.fogNear < -300) {
|
||||
play->roomCtx.currRoom.segment = NULL;
|
||||
play->roomCtx.curRoom.segment = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -882,7 +882,7 @@ void func_808BAAF4(DoorWarp1* this, PlayState* play) {
|
||||
f32 phi_f2;
|
||||
|
||||
phi_f2 = 200.0f;
|
||||
if (play->sceneNum == SCENE_SEA) {
|
||||
if (play->sceneId == SCENE_SEA) {
|
||||
phi_f2 = 85.0f;
|
||||
}
|
||||
|
||||
@@ -1039,12 +1039,12 @@ void func_808BB4F4(DoorWarp1* this, PlayState* play2) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (play->sceneNum != SCENE_MITURIN) {
|
||||
if (play->sceneNum == SCENE_HAKUGIN) {
|
||||
if (play->sceneId != SCENE_MITURIN) {
|
||||
if (play->sceneId == SCENE_HAKUGIN) {
|
||||
sp60 = 1;
|
||||
} else if (play->sceneNum == SCENE_SEA) {
|
||||
} else if (play->sceneId == SCENE_SEA) {
|
||||
sp60 = 2;
|
||||
} else if (play->sceneNum == SCENE_INISIE_R) {
|
||||
} else if (play->sceneId == SCENE_INISIE_R) {
|
||||
sp60 = 3;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -402,7 +402,7 @@ void EnAz_Destroy(Actor* thisx, PlayState* play2) {
|
||||
EnAz* this = THIS;
|
||||
|
||||
if (gSaveContext.save.entrance != ENTRANCE(WATERFALL_RAPIDS, 1)) {
|
||||
gSaveContext.unk_3DD0[4] = 5;
|
||||
gSaveContext.timerStates[TIMER_ID_MINIGAME_2] = TIMER_STATE_STOP;
|
||||
}
|
||||
Collider_DestroyCylinder(play2, &this->collider);
|
||||
}
|
||||
@@ -1486,11 +1486,11 @@ void func_80A97D5C(EnAz* this, PlayState* play) {
|
||||
gSaveContext.minigameScore = (this->unk_374 & 2) ? 25 : 20;
|
||||
play->interfaceCtx.unk_280 = 1;
|
||||
if ((this->unk_2FA == 1) || (this->unk_2FA == 3)) {
|
||||
func_8010E9F0(4, 120);
|
||||
Interface_StartTimer(TIMER_ID_MINIGAME_2, 120);
|
||||
} else if (gSaveContext.save.weekEventReg[25] & 1) {
|
||||
func_8010E9F0(4, 100);
|
||||
Interface_StartTimer(TIMER_ID_MINIGAME_2, 100);
|
||||
} else {
|
||||
func_8010E9F0(4, 110);
|
||||
Interface_StartTimer(TIMER_ID_MINIGAME_2, 110);
|
||||
}
|
||||
this->actionFunc = func_80A97E48;
|
||||
}
|
||||
@@ -1547,7 +1547,7 @@ void func_80A97F9C(EnAz* this, PlayState* play) {
|
||||
} else {
|
||||
gSaveContext.save.weekEventReg[24] |= 1;
|
||||
}
|
||||
gSaveContext.unk_3DD0[4] = 5;
|
||||
gSaveContext.timerStates[TIMER_ID_MINIGAME_2] = TIMER_STATE_STOP;
|
||||
this->unk_374 &= ~0x10;
|
||||
play->nextEntrance = Entrance_CreateFromSpawn(2);
|
||||
gSaveContext.nextCutsceneIndex = 0;
|
||||
@@ -1557,8 +1557,8 @@ void func_80A97F9C(EnAz* this, PlayState* play) {
|
||||
this->actor.speedXZ = 0.0f;
|
||||
func_80A979DC(this, play);
|
||||
} else {
|
||||
if (gSaveContext.unk_3DE0[4] == 0) {
|
||||
gSaveContext.unk_3DD0[4] = 5;
|
||||
if (gSaveContext.timerCurTimes[TIMER_ID_MINIGAME_2] == SECONDS_TO_TIMER(0)) {
|
||||
gSaveContext.timerStates[TIMER_ID_MINIGAME_2] = TIMER_STATE_STOP;
|
||||
this->unk_374 |= 0x4000;
|
||||
func_80A97A28(this, play);
|
||||
}
|
||||
|
||||
@@ -503,12 +503,12 @@ void EnBaba_FinishInit(EnBaba* this, PlayState* play) {
|
||||
this->stateFlags |= BOMB_SHOP_LADY_STATE_DRAW_SHADOW;
|
||||
this->actor.flags |= ACTOR_FLAG_1;
|
||||
|
||||
if (play->sceneNum == SCENE_BOMYA) {
|
||||
if (play->sceneId == SCENE_BOMYA) {
|
||||
this->stateFlags |= BOMB_SHOP_LADY_STATE_VISIBLE;
|
||||
this->animIndex = BOMB_SHOP_LADY_ANIM_IDLE;
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, this->animIndex);
|
||||
this->actionFunc = EnBaba_Idle;
|
||||
} else if (play->sceneNum == SCENE_BACKTOWN) {
|
||||
} else if (play->sceneId == SCENE_BACKTOWN) {
|
||||
if ((BOMB_SHOP_LADY_GET_TYPE(&this->actor) == BOMB_SHOP_LADY_TYPE_FOLLOW_SCHEDULE) &&
|
||||
(gSaveContext.save.entrance != ENTRANCE(NORTH_CLOCK_TOWN, 7)) &&
|
||||
(BOMB_SHOP_LADY_GET_PATH_INDEX(&this->actor) != 0x3F)) {
|
||||
|
||||
@@ -178,7 +178,7 @@ void EnBat_Destroy(Actor* thisx, PlayState* play) {
|
||||
}
|
||||
|
||||
s32 EnBat_IsGraveyardOnSecondDay(PlayState* play) {
|
||||
if ((CURRENT_DAY == 2) && (play->sceneNum == SCENE_BOTI)) {
|
||||
if ((CURRENT_DAY == 2) && (play->sceneId == SCENE_BOTI)) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
|
||||
@@ -485,7 +485,7 @@ s32 EnBigokuta_IsNearSwampBoat(EnBigokuta* this, PlayState* play) {
|
||||
void EnBigokuta_CheckOneHitKill(EnBigokuta* this, PlayState* play) {
|
||||
if ((this->bodyCollider.base.acFlags & AC_ON) &&
|
||||
((this->bodyCollider.base.acFlags & AC_HIT) ||
|
||||
((play->sceneNum == SCENE_20SICHITAI || play->sceneNum == SCENE_20SICHITAI2) &&
|
||||
((play->sceneId == SCENE_20SICHITAI || play->sceneId == SCENE_20SICHITAI2) &&
|
||||
EnBigokuta_IsNearSwampBoat(this, play)))) {
|
||||
Enemy_StartFinishingBlow(play, &this->picto.actor);
|
||||
|
||||
|
||||
@@ -339,7 +339,7 @@ void EnBigslime_Init(Actor* thisx, PlayState* play2) {
|
||||
this->gekkoCollider.base.ocFlags1 &= ~OC1_NO_PUSH;
|
||||
this->actor.params = CLAMP(this->actor.params, 1, 4);
|
||||
|
||||
if (Flags_GetClear(play, play->roomCtx.currRoom.num)) {
|
||||
if (Flags_GetClear(play, play->roomCtx.curRoom.num)) {
|
||||
Actor_MarkForDeath(&this->actor);
|
||||
if (!(gSaveContext.save.weekEventReg[isFrogReturnedFlags[this->actor.params - 1] >> 8] &
|
||||
(u8)isFrogReturnedFlags[this->actor.params - 1])) {
|
||||
@@ -2497,7 +2497,7 @@ void EnBigslime_Despawn(EnBigslime* this, PlayState* play) {
|
||||
}
|
||||
|
||||
if (!this->isDespawned) {
|
||||
Flags_SetClearTemp(play, play->roomCtx.currRoom.num);
|
||||
Flags_SetClearTemp(play, play->roomCtx.curRoom.num);
|
||||
this->isDespawned = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -301,7 +301,7 @@ void func_80871058(EnBom* this, PlayState* play) {
|
||||
void func_808714D4(EnBom* this, PlayState* play) {
|
||||
if (Actor_HasNoParent(&this->actor, play)) {
|
||||
this->actionFunc = func_80871058;
|
||||
this->actor.room = play->roomCtx.currRoom.num;
|
||||
this->actor.room = play->roomCtx.curRoom.num;
|
||||
this->actor.flags &= ~ACTOR_FLAG_100000;
|
||||
this->actor.bgCheckFlags &= ~1;
|
||||
Math_Vec3s_ToVec3f(&this->actor.prevPos, &this->actor.home.rot);
|
||||
|
||||
@@ -176,7 +176,7 @@ s32 func_80B3E5DC(EnDai* this, s32 arg1) {
|
||||
s32 func_80B3E69C(EnDai* this, PlayState* play) {
|
||||
s32 ret = false;
|
||||
|
||||
if ((play->csCtx.state != 0) && (play->sceneNum == SCENE_12HAKUGINMAE) && (play->csCtx.currentCsIndex == 0) &&
|
||||
if ((play->csCtx.state != 0) && (play->sceneId == SCENE_12HAKUGINMAE) && (play->csCtx.currentCsIndex == 0) &&
|
||||
!(gSaveContext.save.weekEventReg[30] & 1)) {
|
||||
if (!(this->unk_1CE & 0x10)) {
|
||||
Flags_SetSwitch(play, 20);
|
||||
|
||||
@@ -335,11 +335,11 @@ void EnDg_MoveAlongPath(EnDg* this, PlayState* play) {
|
||||
}
|
||||
|
||||
if ((this->index == ENDG_INDEX_SWAMP_SPIDER_HOUSE) ||
|
||||
((this->index == ENDG_INDEX_ROMANI_RANCH) && (play->sceneNum == SCENE_OMOYA))) {
|
||||
((this->index == ENDG_INDEX_ROMANI_RANCH) && (play->sceneId == SCENE_OMOYA))) {
|
||||
Math_ApproachF(&this->actor.speedXZ, 1.0f, 0.2f, 1.0f);
|
||||
} else if (this->index == ENDG_INDEX_ROMANI_RANCH) {
|
||||
Math_ApproachF(&this->actor.speedXZ, 3.5f, 0.2f, 1.0f);
|
||||
} else if (play->sceneNum == SCENE_CLOCKTOWER) {
|
||||
} else if (play->sceneId == SCENE_CLOCKTOWER) {
|
||||
Math_ApproachF(&this->actor.speedXZ, 3.5f, 0.2f, 1.0f);
|
||||
} else if (sRacetrackDogInfo[this->index].textId & 0x11) {
|
||||
Math_ApproachF(&this->actor.speedXZ, 1.0f, 0.2f, 1.0f);
|
||||
@@ -397,11 +397,11 @@ void EnDg_PlaySfxGrowl(EnDg* this, f32 frame) {
|
||||
void EnDg_SetupIdleMove(EnDg* this, PlayState* play) {
|
||||
if (!(this->actor.bgCheckFlags & 0x20)) {
|
||||
if ((this->index == ENDG_INDEX_SWAMP_SPIDER_HOUSE) ||
|
||||
((this->index == ENDG_INDEX_ROMANI_RANCH) && (play->sceneNum == SCENE_OMOYA))) {
|
||||
((this->index == ENDG_INDEX_ROMANI_RANCH) && (play->sceneId == SCENE_OMOYA))) {
|
||||
EnDg_ChangeAnim(&this->skelAnime, sAnimationInfo, DOG_ANIM_WALK);
|
||||
} else if (this->index == ENDG_INDEX_ROMANI_RANCH) {
|
||||
EnDg_ChangeAnim(&this->skelAnime, sAnimationInfo, DOG_ANIM_RUN);
|
||||
} else if (play->sceneNum == SCENE_CLOCKTOWER) {
|
||||
} else if (play->sceneId == SCENE_CLOCKTOWER) {
|
||||
EnDg_ChangeAnim(&this->skelAnime, sAnimationInfo, DOG_ANIM_RUN);
|
||||
} else if (sRacetrackDogInfo[this->index].textId & 0x11) {
|
||||
EnDg_ChangeAnim(&this->skelAnime, sAnimationInfo, DOG_ANIM_WALK);
|
||||
@@ -1319,7 +1319,7 @@ void EnDg_Init(Actor* thisx, PlayState* play) {
|
||||
this->index = ENDG_GET_INDEX(&this->actor);
|
||||
this->behavior = DOG_BEHAVIOR_INITIAL;
|
||||
this->grabState = DOG_GRAB_STATE_NONE;
|
||||
if (play->sceneNum == SCENE_F01_B) {
|
||||
if (play->sceneId == SCENE_F01_B) {
|
||||
this->sitAfterThrowTimer = 100;
|
||||
EnDg_UpdateTextId(this);
|
||||
}
|
||||
@@ -1340,7 +1340,7 @@ void EnDg_Update(Actor* thisx, PlayState* play) {
|
||||
Vec3f floorRot = { 0.0f, 0.0f, 0.0f };
|
||||
|
||||
this->selectedDogIndex = sSelectedRacetrackDogInfo.index;
|
||||
if (!(player->stateFlags1 & 0x20) || (play->sceneNum != SCENE_CLOCKTOWER)) {
|
||||
if (!(player->stateFlags1 & 0x20) || (play->sceneId != SCENE_CLOCKTOWER)) {
|
||||
if (EnDg_ShouldReactToNonHumanPlayer(this, play)) {
|
||||
EnDg_ChooseActionForForm(this, play);
|
||||
} else if (this->behavior != DOG_BEHAVIOR_DEFAULT) {
|
||||
|
||||
@@ -551,7 +551,7 @@ void func_8089B580(EnDinofos* this, PlayState* play) {
|
||||
}
|
||||
|
||||
if (this->skelAnime.curFrame > 35.0f) {
|
||||
if ((play->sceneNum == SCENE_MITURIN) && Animation_OnFrame(&this->skelAnime, 38.0f)) {
|
||||
if ((play->sceneId == SCENE_MITURIN) && Animation_OnFrame(&this->skelAnime, 38.0f)) {
|
||||
play->envCtx.lightSettingOverride = 11;
|
||||
}
|
||||
|
||||
@@ -562,7 +562,7 @@ void func_8089B580(EnDinofos* this, PlayState* play) {
|
||||
}
|
||||
}
|
||||
|
||||
if ((play->sceneNum == SCENE_MITURIN) && Animation_OnFrame(&this->skelAnime, 55.0f)) {
|
||||
if ((play->sceneId == SCENE_MITURIN) && Animation_OnFrame(&this->skelAnime, 55.0f)) {
|
||||
play->envCtx.lightSettingOverride = 0xFF;
|
||||
}
|
||||
|
||||
@@ -1053,7 +1053,7 @@ void func_8089CB10(EnDinofos* this, PlayState* play) {
|
||||
worldSphere->center.z = this->limbPos[10].z;
|
||||
}
|
||||
|
||||
if (play->sceneNum == SCENE_MITURIN) {
|
||||
if (play->sceneId == SCENE_MITURIN) {
|
||||
play->envCtx.lightSettingOverride = 11;
|
||||
}
|
||||
|
||||
@@ -1114,7 +1114,7 @@ void func_8089CBEC(EnDinofos* this, PlayState* play) {
|
||||
void func_8089CF00(EnDinofos* this, PlayState* play) {
|
||||
Animation_PlayOnce(&this->skelAnime, &object_dinofos_Anim_0017B8);
|
||||
this->colliderJntSph.base.atFlags &= ~AT_ON;
|
||||
if (play->sceneNum == SCENE_MITURIN) {
|
||||
if (play->sceneId == SCENE_MITURIN) {
|
||||
play->envCtx.lightSettingOverride = 255;
|
||||
}
|
||||
this->actionFunc = func_8089CF70;
|
||||
@@ -1285,7 +1285,7 @@ s32 func_8089D60C(EnDinofos* this, PlayState* play) {
|
||||
|
||||
func_8089ACEC(this, play);
|
||||
func_8089AD70(this);
|
||||
if (play->sceneNum == SCENE_MITURIN) {
|
||||
if (play->sceneId == SCENE_MITURIN) {
|
||||
play->envCtx.lightSettingOverride = 255;
|
||||
}
|
||||
|
||||
|
||||
@@ -447,7 +447,7 @@ void func_80A52074(EnDnk* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_80A52134(EnDnk* this, PlayState* play) {
|
||||
if ((play->csCtx.state != 0) && (ENDNK_GET_3C(&this->actor) == 4) && (play->sceneNum == SCENE_SPOT00) &&
|
||||
if ((play->csCtx.state != 0) && (ENDNK_GET_3C(&this->actor) == 4) && (play->sceneId == SCENE_SPOT00) &&
|
||||
(gSaveContext.sceneSetupIndex == 2)) {
|
||||
func_80A52074(this, play);
|
||||
}
|
||||
|
||||
@@ -2,12 +2,16 @@
|
||||
* File: z_en_dno.c
|
||||
* Overlay: ovl_En_Dno
|
||||
* Description: Deku Butler
|
||||
*
|
||||
* This actor's name is probably short for "Dekunuts Ou (king)". This is likely a misnamed actor,
|
||||
* since it uses assets from object_dnj (probably short for "Dekunuts Jii (grandfather, elderly
|
||||
* person"). Note that the Deku Princess and King both call the Butler "Jii" in the Japanese text.
|
||||
*/
|
||||
|
||||
#include "z_en_dno.h"
|
||||
#include "overlays/actors/ovl_Bg_Crace_Movebg/z_bg_crace_movebg.h"
|
||||
#include "objects/gameplay_keep/gameplay_keep.h"
|
||||
#include "objects/object_dno/object_dno.h"
|
||||
#include "objects/object_dnj/object_dnj.h"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_1 | ACTOR_FLAG_8 | ACTOR_FLAG_10 | ACTOR_FLAG_20)
|
||||
|
||||
@@ -41,23 +45,23 @@ s32 EnDno_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p
|
||||
void EnDno_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx);
|
||||
|
||||
static AnimationSpeedInfo sAnimations[] = {
|
||||
{ &object_dno_Anim_000470, 1.0f, ANIMMODE_ONCE, 0.0f }, { &object_dno_Anim_0008F0, 1.0f, ANIMMODE_ONCE, 0.0f },
|
||||
{ &object_dno_Anim_000F6C, 1.0f, ANIMMODE_LOOP, 0.0f }, { &object_dno_Anim_001A50, 1.0f, ANIMMODE_ONCE, 0.0f },
|
||||
{ &object_dno_Anim_002530, 1.0f, ANIMMODE_ONCE, 0.0f }, { &object_dno_Anim_003320, 1.0f, ANIMMODE_ONCE, 0.0f },
|
||||
{ &object_dno_Anim_0036D0, 1.0f, ANIMMODE_LOOP, 0.0f }, { &object_dno_Anim_0041CC, 1.0f, ANIMMODE_ONCE, 0.0f },
|
||||
{ &object_dno_Anim_004DD8, 1.0f, ANIMMODE_ONCE, 0.0f }, { &object_dno_Anim_005F98, 1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &object_dno_Anim_006488, 1.0f, ANIMMODE_ONCE, 0.0f }, { &object_dno_Anim_0073E4, 1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &object_dno_Anim_0077A8, 1.0f, ANIMMODE_LOOP, 0.0f }, { &object_dno_Anim_007CA4, 1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &object_dno_Anim_008324, 1.0f, ANIMMODE_LOOP, 0.0f }, { &object_dno_Anim_008AE4, 1.0f, ANIMMODE_ONCE, 0.0f },
|
||||
{ &object_dno_Anim_009100, 1.0f, ANIMMODE_ONCE, 0.0f }, { &object_dno_Anim_0051E4, 1.0f, ANIMMODE_ONCE, 0.0f },
|
||||
{ &object_dno_Anim_005E20, 1.0f, ANIMMODE_LOOP, 0.0f }, { &object_dno_Anim_006F84, 1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &object_dnj_Anim_000470, 1.0f, ANIMMODE_ONCE, 0.0f }, { &object_dnj_Anim_0008F0, 1.0f, ANIMMODE_ONCE, 0.0f },
|
||||
{ &object_dnj_Anim_000F6C, 1.0f, ANIMMODE_LOOP, 0.0f }, { &object_dnj_Anim_001A50, 1.0f, ANIMMODE_ONCE, 0.0f },
|
||||
{ &object_dnj_Anim_002530, 1.0f, ANIMMODE_ONCE, 0.0f }, { &object_dnj_Anim_003320, 1.0f, ANIMMODE_ONCE, 0.0f },
|
||||
{ &object_dnj_Anim_0036D0, 1.0f, ANIMMODE_LOOP, 0.0f }, { &object_dnj_Anim_0041CC, 1.0f, ANIMMODE_ONCE, 0.0f },
|
||||
{ &object_dnj_Anim_004DD8, 1.0f, ANIMMODE_ONCE, 0.0f }, { &object_dnj_Anim_005F98, 1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &object_dnj_Anim_006488, 1.0f, ANIMMODE_ONCE, 0.0f }, { &object_dnj_Anim_0073E4, 1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &object_dnj_Anim_0077A8, 1.0f, ANIMMODE_LOOP, 0.0f }, { &object_dnj_Anim_007CA4, 1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &object_dnj_Anim_008324, 1.0f, ANIMMODE_LOOP, 0.0f }, { &object_dnj_Anim_008AE4, 1.0f, ANIMMODE_ONCE, 0.0f },
|
||||
{ &object_dnj_Anim_009100, 1.0f, ANIMMODE_ONCE, 0.0f }, { &object_dnj_Anim_0051E4, 1.0f, ANIMMODE_ONCE, 0.0f },
|
||||
{ &object_dnj_Anim_005E20, 1.0f, ANIMMODE_LOOP, 0.0f }, { &object_dnj_Anim_006F84, 1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
};
|
||||
|
||||
const ActorInit En_Dno_InitVars = {
|
||||
ACTOR_EN_DNO,
|
||||
ACTORCAT_NPC,
|
||||
FLAGS,
|
||||
OBJECT_DNO,
|
||||
OBJECT_DNJ,
|
||||
sizeof(EnDno),
|
||||
(ActorFunc)EnDno_Init,
|
||||
(ActorFunc)EnDno_Destroy,
|
||||
@@ -194,7 +198,7 @@ void EnDno_Init(Actor* thisx, PlayState* play) {
|
||||
if (actor == NULL) {
|
||||
Actor_ProcessInitChain(thisx, sInitChain);
|
||||
ActorShape_Init(&thisx->shape, 0.0f, ActorShadow_DrawCircle, 21.0f);
|
||||
SkelAnime_InitFlex(play, &this->skelAnime, &object_dno_Skel_00E1F8, &object_dno_Anim_007CA4,
|
||||
SkelAnime_InitFlex(play, &this->skelAnime, &object_dnj_Skel_00E1F8, &object_dnj_Anim_007CA4,
|
||||
this->jointTable, this->morphTable, 28);
|
||||
Collider_InitCylinder(play, &this->collider);
|
||||
Collider_SetCylinder(play, &this->collider, thisx, &sCylinderInit);
|
||||
@@ -216,7 +220,7 @@ void EnDno_Init(Actor* thisx, PlayState* play) {
|
||||
} else {
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimations, 14, &this->unk_32C);
|
||||
thisx->room = -1;
|
||||
gSaveContext.unk_3DD0[1] = 5;
|
||||
gSaveContext.timerStates[TIMER_ID_MINIGAME_1] = TIMER_STATE_STOP;
|
||||
this->lightNode = LightContext_InsertLight(play, &play->lightCtx, &this->lightInfo);
|
||||
this->unk_3B0 |= 1;
|
||||
this->actionFunc = func_80A72438;
|
||||
@@ -817,7 +821,7 @@ void func_80A73244(EnDno* this, PlayState* play) {
|
||||
this->unk_328 = 2;
|
||||
this->actor.speedXZ = 0.0f;
|
||||
Flags_UnsetSwitch(play, ENDNO_GET_3F80(&this->actor));
|
||||
gSaveContext.unk_3DD0[1] = 5;
|
||||
gSaveContext.timerStates[TIMER_ID_MINIGAME_1] = TIMER_STATE_STOP;
|
||||
this->unk_44E = 0;
|
||||
this->actionFunc = func_80A732C8;
|
||||
}
|
||||
|
||||
@@ -2,10 +2,13 @@
|
||||
* File: z_en_dnp.c
|
||||
* Overlay: ovl_En_Dnp
|
||||
* Description: Deku Princess
|
||||
*
|
||||
* This actor's name is probably short for "Dekunuts Princess". It uses assets from object_dnq,
|
||||
* which is probably short for "Dekunuts Queen".
|
||||
*/
|
||||
|
||||
#include "z_en_dnp.h"
|
||||
#include "objects/object_dnp/object_dnp.h"
|
||||
#include "objects/object_dnq/object_dnq.h"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_1 | ACTOR_FLAG_8 | ACTOR_FLAG_10)
|
||||
|
||||
@@ -26,7 +29,7 @@ const ActorInit En_Dnp_InitVars = {
|
||||
ACTOR_EN_DNP,
|
||||
ACTORCAT_NPC,
|
||||
FLAGS,
|
||||
OBJECT_DNP,
|
||||
OBJECT_DNQ,
|
||||
sizeof(EnDnp),
|
||||
(ActorFunc)EnDnp_Init,
|
||||
(ActorFunc)EnDnp_Destroy,
|
||||
@@ -57,32 +60,32 @@ static ColliderCylinderInit sCylinderInit = {
|
||||
static CollisionCheckInfoInit2 sColChkInfoInit = { 0, 0, 0, 0, MASS_IMMOVABLE };
|
||||
|
||||
static AnimationInfoS sAnimationInfo[] = {
|
||||
{ &object_dnp_Anim_0007D8, 1.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
{ &object_dnp_Anim_0021DC, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &object_dnp_Anim_0021DC, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &object_dnp_Anim_0026B8, 1.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
{ &object_dnp_Anim_004D08, 1.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
{ &object_dnp_Anim_0071F4, 1.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
{ &object_dnp_Anim_007960, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &object_dnp_Anim_008588, 1.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &object_dnp_Anim_00A900, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &object_dnp_Anim_00AEB8, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &object_dnp_Anim_00B754, 1.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
{ &object_dnp_Anim_00674C, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &object_dnp_Anim_00BAD8, 1.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
{ &object_dnp_Anim_006B74, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &object_dnp_Anim_012428, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &object_dnp_Anim_00B324, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &object_dnp_Anim_00B324, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &object_dnp_Anim_0115B8, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &object_dnp_Anim_0115B8, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &object_dnp_Anim_00923C, 1.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
{ &object_dnp_Anim_009AA0, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &object_dnp_Anim_00125C, 1.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
{ &object_dnp_Anim_0017F8, 1.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &object_dnp_Anim_001C1C, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &object_dnp_Anim_0057AC, 1.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &object_dnp_Anim_00625C, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &object_dnq_Anim_0007D8, 1.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
{ &object_dnq_Anim_0021DC, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &object_dnq_Anim_0021DC, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &object_dnq_Anim_0026B8, 1.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
{ &object_dnq_Anim_004D08, 1.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
{ &object_dnq_Anim_0071F4, 1.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
{ &object_dnq_Anim_007960, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &object_dnq_Anim_008588, 1.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &object_dnq_Anim_00A900, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &object_dnq_Anim_00AEB8, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &object_dnq_Anim_00B754, 1.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
{ &object_dnq_Anim_00674C, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &object_dnq_Anim_00BAD8, 1.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
{ &object_dnq_Anim_006B74, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &object_dnq_Anim_012428, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &object_dnq_Anim_00B324, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &object_dnq_Anim_00B324, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &object_dnq_Anim_0115B8, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &object_dnq_Anim_0115B8, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &object_dnq_Anim_00923C, 1.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
{ &object_dnq_Anim_009AA0, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &object_dnq_Anim_00125C, 1.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
{ &object_dnq_Anim_0017F8, 1.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &object_dnq_Anim_001C1C, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &object_dnq_Anim_0057AC, 1.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &object_dnq_Anim_00625C, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
};
|
||||
|
||||
static s32 D_80B3DE58[] = {
|
||||
@@ -247,7 +250,7 @@ void func_80B3D11C(EnDnp* this, PlayState* play) {
|
||||
s32 temp_v0;
|
||||
s32 val;
|
||||
|
||||
if (!(gSaveContext.save.weekEventReg[29] & 0x40) && (play->sceneNum == SCENE_MITURIN) &&
|
||||
if (!(gSaveContext.save.weekEventReg[29] & 0x40) && (play->sceneId == SCENE_MITURIN) &&
|
||||
(play->csCtx.currentCsIndex == 0)) {
|
||||
this->unk_322 |= 0x20;
|
||||
gSaveContext.save.weekEventReg[29] |= 0x40;
|
||||
@@ -347,7 +350,7 @@ void EnDnp_Init(Actor* thisx, PlayState* play) {
|
||||
EnDnp* this = THIS;
|
||||
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 16.0f);
|
||||
SkelAnime_InitFlex(play, &this->skelAnime, &object_dnp_Skel_010D60, NULL, this->jointTable, this->morphTable, 26);
|
||||
SkelAnime_InitFlex(play, &this->skelAnime, &object_dnq_Skel_010D60, NULL, this->jointTable, this->morphTable, 26);
|
||||
this->unk_340 = -1;
|
||||
func_80B3CC38(this, 15);
|
||||
Collider_InitAndSetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
|
||||
@@ -370,7 +373,7 @@ void EnDnp_Init(Actor* thisx, PlayState* play) {
|
||||
Actor_SetScale(&this->actor, 0.0085f);
|
||||
SubS_UpdateFlags(&this->unk_322, 3, 7);
|
||||
this->unk_322 |= 0x400;
|
||||
if ((play->sceneNum == SCENE_MITURIN) && (gSaveContext.save.weekEventReg[29] & 0x40)) {
|
||||
if ((play->sceneId == SCENE_MITURIN) && (gSaveContext.save.weekEventReg[29] & 0x40)) {
|
||||
this->unk_322 |= 0x20;
|
||||
func_80B3CC38(this, 1);
|
||||
}
|
||||
@@ -479,10 +482,10 @@ void EnDnp_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx) {
|
||||
|
||||
void EnDnp_Draw(Actor* thisx, PlayState* play) {
|
||||
static TexturePtr D_80B3DEAC[] = {
|
||||
object_dnp_Tex_0103D0,
|
||||
object_dnp_Tex_0105D0,
|
||||
object_dnp_Tex_0107D0,
|
||||
object_dnp_Tex_0109D0,
|
||||
object_dnq_Tex_0103D0,
|
||||
object_dnq_Tex_0105D0,
|
||||
object_dnq_Tex_0107D0,
|
||||
object_dnq_Tex_0109D0,
|
||||
};
|
||||
EnDnp* this = THIS;
|
||||
|
||||
|
||||
@@ -2,10 +2,13 @@
|
||||
* File: z_en_dnq.c
|
||||
* Overlay: ovl_En_Dnq
|
||||
* Description: Deku King
|
||||
*
|
||||
* This actor's name is probably short for "Dekunuts Queen". This is likely a misnamed actor,
|
||||
* since it uses assets from object_dno (probably short for "Dekunuts Ou (king)").
|
||||
*/
|
||||
|
||||
#include "z_en_dnq.h"
|
||||
#include "objects/object_dnq/object_dnq.h"
|
||||
#include "objects/object_dno/object_dno.h"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_1 | ACTOR_FLAG_8)
|
||||
|
||||
@@ -27,7 +30,7 @@ const ActorInit En_Dnq_InitVars = {
|
||||
ACTOR_EN_DNQ,
|
||||
ACTORCAT_NPC,
|
||||
FLAGS,
|
||||
OBJECT_DNQ,
|
||||
OBJECT_DNO,
|
||||
sizeof(EnDnq),
|
||||
(ActorFunc)EnDnq_Init,
|
||||
(ActorFunc)EnDnq_Destroy,
|
||||
@@ -58,26 +61,26 @@ static ColliderCylinderInit sCylinderInit = {
|
||||
static CollisionCheckInfoInit2 sColChkInfoInit = { 1, 0, 0, 0, MASS_IMMOVABLE };
|
||||
|
||||
static AnimationInfoS sAnimationInfo[] = {
|
||||
{ &object_dnq_Anim_008328, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &object_dnq_Anim_008328, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &object_dnq_Anim_007528, 1.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
{ &object_dnq_Anim_0006F0, 1.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &object_dnq_Anim_000BF8, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &object_dnq_Anim_002690, 0.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &object_dnq_Anim_002690, 1.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
{ &object_dnq_Anim_003408, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &object_dnq_Anim_006984, 1.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
{ &object_dnq_Anim_005E18, 1.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
{ &object_dnq_Anim_005A14, 1.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
{ &object_dnq_Anim_005284, 1.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
{ &object_dnq_Anim_001AEC, 1.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &object_dnq_Anim_001100, 1.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &object_dnq_Anim_004EA0, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &object_dnq_Anim_00F504, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &object_dnq_Anim_0047B8, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &object_dnq_Anim_003DBC, 1.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
{ &object_dnq_Anim_005A14, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &object_dnq_Anim_003DBC, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &object_dno_Anim_008328, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &object_dno_Anim_008328, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &object_dno_Anim_007528, 1.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
{ &object_dno_Anim_0006F0, 1.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &object_dno_Anim_000BF8, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &object_dno_Anim_002690, 0.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &object_dno_Anim_002690, 1.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
{ &object_dno_Anim_003408, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &object_dno_Anim_006984, 1.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
{ &object_dno_Anim_005E18, 1.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
{ &object_dno_Anim_005A14, 1.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
{ &object_dno_Anim_005284, 1.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
{ &object_dno_Anim_001AEC, 1.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &object_dno_Anim_001100, 1.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &object_dno_Anim_004EA0, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &object_dno_Anim_00F504, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &object_dno_Anim_0047B8, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &object_dno_Anim_003DBC, 1.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
{ &object_dno_Anim_005A14, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &object_dno_Anim_003DBC, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
};
|
||||
|
||||
s32 EnDnq_ValidatePictograph(PlayState* play, Actor* thisx) {
|
||||
@@ -417,7 +420,7 @@ void EnDnq_Init(Actor* thisx, PlayState* play) {
|
||||
EnDnq* this = THIS;
|
||||
|
||||
ActorShape_Init(&this->picto.actor.shape, 0.0f, NULL, 14.0f);
|
||||
SkelAnime_InitFlex(play, &this->skelAnime, &object_dnq_Skel_00EB48, NULL, this->jointTable, this->morphTable, 33);
|
||||
SkelAnime_InitFlex(play, &this->skelAnime, &object_dno_Skel_00EB48, NULL, this->jointTable, this->morphTable, 33);
|
||||
this->unk_398 = -1;
|
||||
func_80A5257C(this, 0);
|
||||
Collider_InitAndSetCylinder(play, &this->collider, &this->picto.actor, &sCylinderInit);
|
||||
|
||||
@@ -290,7 +290,7 @@ const ActorInit En_Door_InitVars = {
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ s16 sceneNum;
|
||||
/* 0x00 */ s16 sceneId;
|
||||
/* 0x02 */ u8 dListIndex;
|
||||
/* 0x04 */ s16 objectId;
|
||||
} EnDoorInfo;
|
||||
@@ -405,7 +405,7 @@ void EnDoor_Init(Actor* thisx, PlayState* play2) {
|
||||
objectInfo = &sObjInfo[17 + this->switchFlag];
|
||||
} else {
|
||||
for (i = 0; i < ARRAY_COUNT(sObjInfo) - 34; i++, objectInfo++) {
|
||||
if (play->sceneNum == objectInfo->sceneNum) {
|
||||
if (play->sceneId == objectInfo->sceneId) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -903,13 +903,13 @@ void func_8088E850(EnElf* this, PlayState* play) {
|
||||
func_8088D660(this, &nextPos, 0.2f);
|
||||
}
|
||||
|
||||
if ((play->sceneNum == SCENE_CLOCKTOWER) && (gSaveContext.sceneSetupIndex == 0) &&
|
||||
if ((play->sceneId == SCENE_CLOCKTOWER) && (gSaveContext.sceneSetupIndex == 0) &&
|
||||
(play->csCtx.currentCsIndex == 0) &&
|
||||
((play->csCtx.frames == 149) || (play->csCtx.frames == 381) || (play->csCtx.frames == 591))) {
|
||||
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_WHITE_FAIRY_DASH);
|
||||
}
|
||||
|
||||
if ((play->sceneNum == SCENE_SECOM) && (gSaveContext.sceneSetupIndex == 0) &&
|
||||
if ((play->sceneId == SCENE_SECOM) && (gSaveContext.sceneSetupIndex == 0) &&
|
||||
(play->csCtx.currentCsIndex == 4) && (play->csCtx.frames == 95)) {
|
||||
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_WHITE_FAIRY_DASH);
|
||||
}
|
||||
|
||||
@@ -205,13 +205,13 @@ s32 func_80A39C1C(PlayState* play, s32 arg1) {
|
||||
}
|
||||
|
||||
if (arg1 == 0) {
|
||||
if (gSaveContext.save.permanentSceneFlags[play->sceneNum].unk_14 & 1) {
|
||||
if (gSaveContext.save.permanentSceneFlags[play->sceneId].unk_14 & 1) {
|
||||
return 25;
|
||||
}
|
||||
return 24;
|
||||
}
|
||||
|
||||
temp_v1 = (gSaveContext.save.permanentSceneFlags[play->sceneNum].unk_14 >> (((arg1 - 1) * 5) + 1)) & 0x1F;
|
||||
temp_v1 = (gSaveContext.save.permanentSceneFlags[play->sceneId].unk_14 >> (((arg1 - 1) * 5) + 1)) & 0x1F;
|
||||
if (temp_v1 < 10) {
|
||||
temp_v1 = 10;
|
||||
} else if (temp_v1 > 25) {
|
||||
@@ -227,13 +227,13 @@ void func_80A39CD4(PlayState* play, s32 arg1, s32 arg2) {
|
||||
|
||||
if (arg1 == 0) {
|
||||
if (arg2 == 25) {
|
||||
gSaveContext.save.permanentSceneFlags[play->sceneNum].unk_14 |= 1;
|
||||
gSaveContext.save.permanentSceneFlags[play->sceneId].unk_14 |= 1;
|
||||
} else {
|
||||
gSaveContext.save.permanentSceneFlags[play->sceneNum].unk_14 &= ~1;
|
||||
gSaveContext.save.permanentSceneFlags[play->sceneId].unk_14 &= ~1;
|
||||
}
|
||||
} else {
|
||||
gSaveContext.save.permanentSceneFlags[play->sceneNum].unk_14 &= ~(0x1F << ((arg1 * 5) - 4));
|
||||
gSaveContext.save.permanentSceneFlags[play->sceneNum].unk_14 |= arg2 << ((arg1 * 5) - 4);
|
||||
gSaveContext.save.permanentSceneFlags[play->sceneId].unk_14 &= ~(0x1F << ((arg1 * 5) - 4));
|
||||
gSaveContext.save.permanentSceneFlags[play->sceneId].unk_14 |= arg2 << ((arg1 * 5) - 4);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -315,7 +315,8 @@ void EnFall_Setup(EnFall* this, PlayState* play) {
|
||||
void EnFall_CrashingMoon_HandleGiantsCutscene(EnFall* this, PlayState* play) {
|
||||
static s32 sGiantsCutsceneState = 0;
|
||||
|
||||
if (play->sceneNum == SCENE_00KEIKOKU && gSaveContext.sceneSetupIndex == 1 && play->csCtx.currentCsIndex == 0) {
|
||||
if ((play->sceneId == SCENE_00KEIKOKU) && (gSaveContext.sceneSetupIndex == 1) &&
|
||||
(play->csCtx.currentCsIndex == 0)) {
|
||||
switch (sGiantsCutsceneState) {
|
||||
case 0:
|
||||
if (play->csCtx.state != 0) {
|
||||
@@ -408,7 +409,7 @@ void EnFall_StoppedClosedMouthMoon_PerformCutsceneActions(EnFall* this, PlayStat
|
||||
}
|
||||
}
|
||||
|
||||
if (play->sceneNum == SCENE_OKUJOU && gSaveContext.sceneSetupIndex == 2) {
|
||||
if (play->sceneId == SCENE_OKUJOU && gSaveContext.sceneSetupIndex == 2) {
|
||||
switch (play->csCtx.currentCsIndex) {
|
||||
case 0:
|
||||
switch (play->csCtx.frames) {
|
||||
@@ -452,7 +453,7 @@ void EnFall_StoppedClosedMouthMoon_PerformCutsceneActions(EnFall* this, PlayStat
|
||||
}
|
||||
|
||||
void EnFall_ClockTowerOrTitleScreenMoon_PerformCutsceneActions(EnFall* this, PlayState* play) {
|
||||
if (play->csCtx.state != 0 && play->sceneNum == SCENE_OKUJOU) {
|
||||
if (play->csCtx.state != 0 && play->sceneId == SCENE_OKUJOU) {
|
||||
func_800B9010(&this->actor, NA_SE_EV_MOON_FALL - SFX_FLAG);
|
||||
}
|
||||
}
|
||||
@@ -574,7 +575,7 @@ void EnFall_Fireball_SetPerVertexAlpha(f32 fireballAlpha) {
|
||||
void EnFall_Fireball_Update(Actor* thisx, PlayState* play) {
|
||||
EnFall* this = THIS;
|
||||
|
||||
if (play->sceneNum == SCENE_00KEIKOKU && gSaveContext.sceneSetupIndex == 0 && play->csCtx.currentCsIndex == 2) {
|
||||
if (play->sceneId == SCENE_00KEIKOKU && gSaveContext.sceneSetupIndex == 0 && play->csCtx.currentCsIndex == 2) {
|
||||
play->skyboxCtx.rotY -= 0.05f;
|
||||
}
|
||||
|
||||
|
||||
@@ -167,7 +167,7 @@ Actor* func_8091D944(EnFish* this, PlayState* play) {
|
||||
}
|
||||
|
||||
s32 func_8091DA14(EnFish* this, PlayState* play) {
|
||||
return play->sceneNum == SCENE_LABO && func_8091D944(this, play);
|
||||
return (play->sceneId == SCENE_LABO) && func_8091D944(this, play);
|
||||
}
|
||||
|
||||
void EnFish_Init(Actor* thisx, PlayState* play) {
|
||||
@@ -853,7 +853,8 @@ void func_8091F5A4(Actor* thisx, PlayState* play) {
|
||||
func_8091D7C4(this);
|
||||
Actor_MoveWithGravity(&this->actor);
|
||||
if (this->unk_248 != 0) {
|
||||
u32 temp = (play->sceneNum ^ SCENE_LABO) != 0;
|
||||
u32 temp = (play->sceneId != SCENE_LABO);
|
||||
|
||||
phi_f0 = BREG(1) + 10.0f;
|
||||
|
||||
if (temp) {
|
||||
|
||||
@@ -5166,7 +5166,7 @@ void EnFishing_UpdateOwner(Actor* thisx, PlayState* play2) {
|
||||
sSubCamAt.y = mainCam->at.y;
|
||||
sSubCamAt.z = mainCam->at.z;
|
||||
D_8090CD4C = 2;
|
||||
Interface_ChangeAlpha(12);
|
||||
Interface_SetHudVisibility(HUD_VISIBILITY_A_B_MINIMAP);
|
||||
sSubCamVelFactor = 0.0f;
|
||||
// fallthrough
|
||||
case 2:
|
||||
|
||||
@@ -393,7 +393,7 @@ void EnFsn_EndInteraction(EnFsn* this, PlayState* play) {
|
||||
Actor_ProcessTalkRequest(&this->actor, &play->state);
|
||||
play->msgCtx.msgMode = 0x43;
|
||||
play->msgCtx.stateTimer = 4;
|
||||
Interface_ChangeAlpha(50);
|
||||
Interface_SetHudVisibility(HUD_VISIBILITY_ALL);
|
||||
this->drawCursor = 0;
|
||||
this->stickLeftPrompt.isEnabled = false;
|
||||
this->stickRightPrompt.isEnabled = false;
|
||||
@@ -922,11 +922,7 @@ void EnFsn_DeterminePrice(EnFsn* this, PlayState* play) {
|
||||
if (Message_GetState(&play->msgCtx) == TEXT_STATE_16) {
|
||||
itemActionParam = func_80123810(play);
|
||||
if (itemActionParam > PLAYER_AP_NONE) {
|
||||
if (player->heldItemButton == 0) {
|
||||
buttonItem = CUR_FORM_EQUIP(player->heldItemButton);
|
||||
} else {
|
||||
buttonItem = gSaveContext.save.equips.buttonItems[0][player->heldItemButton];
|
||||
}
|
||||
buttonItem = GET_CUR_FORM_BTN_ITEM(player->heldItemButton);
|
||||
this->price = (buttonItem < ITEM_MOON_TEAR) ? gItemPrices[buttonItem] : 0;
|
||||
if (this->price > 0) {
|
||||
player->actor.textId = 0x29EF;
|
||||
@@ -1161,7 +1157,7 @@ void EnFsn_HandleCanPlayerBuyItem(EnFsn* this, PlayState* play) {
|
||||
Actor_PickUp(&this->actor, play, this->items[this->cursorIndex]->getItemId, 300.0f, 300.0f);
|
||||
play->msgCtx.msgMode = 0x43;
|
||||
play->msgCtx.stateTimer = 4;
|
||||
Interface_ChangeAlpha(50);
|
||||
Interface_SetHudVisibility(HUD_VISIBILITY_ALL);
|
||||
this->drawCursor = 0;
|
||||
this->shopItemSelectedTween = 0.0f;
|
||||
item = this->items[this->cursorIndex];
|
||||
|
||||
@@ -74,13 +74,13 @@ static Vec3f D_80964B18 = { 0.0f, 55.0f, 12.0f };
|
||||
static Vec3f D_80964B24 = { 0.0f, 60.0f, 0.0f };
|
||||
|
||||
static AnimationInfo sAnimationInfo[] = {
|
||||
{ &object_mu_Anim_0053E0, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -4.0f },
|
||||
{ &object_mu_Anim_001F74, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -4.0f },
|
||||
{ &object_mu_Anim_002F64, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -4.0f },
|
||||
{ &object_mu_Anim_004904, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &object_mu_Anim_005304, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -8.0f },
|
||||
{ &object_mu_Anim_005304, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &object_mu_Anim_00BAC4, 1.0f, 0.0f, 0.0f, ANIMMODE_ONCE, 0.0f },
|
||||
{ &gHoneyAndDarlingIdleAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -4.0f },
|
||||
{ &gHoneyAndDarlingCupCheeksLoopAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -4.0f },
|
||||
{ &gHoneyAndDarlingHugLoopAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -4.0f },
|
||||
{ &gHoneyAndDarlingGameDanceLoopAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &gHoneyAndDarlingHoldHandsLoopAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -8.0f },
|
||||
{ &gHoneyAndDarlingHoldHandsLoopAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &gHoneyAndDarlingSurpiseAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_ONCE, 0.0f },
|
||||
};
|
||||
|
||||
static ColliderCylinderInit sCylinderInit = {
|
||||
@@ -194,8 +194,8 @@ void EnFu_Init(Actor* thisx, PlayState* play) {
|
||||
|
||||
if (fuKaiten != NULL) {
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 36.0f);
|
||||
SkelAnime_InitFlex(play, &this->skelAnime, &object_mu_Skel_00B2B0, &object_mu_Anim_001F74, this->jointTable,
|
||||
this->morphTable, 21);
|
||||
SkelAnime_InitFlex(play, &this->skelAnime, &gHoneyAndDarlingSkel, &gHoneyAndDarlingCupCheeksLoopAnim,
|
||||
this->jointTable, this->morphTable, HONEY_AND_DARLING_LIMB_MAX);
|
||||
Collider_InitCylinder(play, &this->collider);
|
||||
Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
|
||||
this->actor.colChkInfo.mass = MASS_IMMOVABLE;
|
||||
@@ -401,7 +401,8 @@ void func_80962340(EnFu* this, PlayState* play) {
|
||||
Message_StartTextbox(play, 0x287E, &this->actor);
|
||||
this->unk_552 = 0x287E;
|
||||
}
|
||||
} else if ((gSaveContext.unk_3DE0[4] == 0) && (this->unk_552 != 0x2888)) {
|
||||
} else if ((gSaveContext.timerCurTimes[TIMER_ID_MINIGAME_2] == SECONDS_TO_TIMER(0)) &&
|
||||
(this->unk_552 != 0x2888)) {
|
||||
Message_StartTextbox(play, 0x2886, &this->actor);
|
||||
this->unk_552 = 0x2886;
|
||||
} else {
|
||||
@@ -644,7 +645,7 @@ void func_80962A10(EnFu* this, PlayState* play) {
|
||||
|
||||
play_sound(NA_SE_SY_FOUND);
|
||||
player->stateFlags1 &= ~0x20;
|
||||
func_8010E9F0(4, 60);
|
||||
Interface_StartTimer(TIMER_ID_MINIGAME_2, 60);
|
||||
if (this->unk_546 == 1) {
|
||||
func_809616E0(this, play);
|
||||
} else {
|
||||
@@ -681,7 +682,7 @@ void func_80962BCC(EnFu* this, PlayState* play) {
|
||||
play_sound(NA_SE_SY_FOUND);
|
||||
player->stateFlags1 &= ~0x20;
|
||||
player->stateFlags3 |= 0x400000;
|
||||
func_8010E9F0(4, 60);
|
||||
Interface_StartTimer(TIMER_ID_MINIGAME_2, 60);
|
||||
|
||||
if (this->unk_546 == 1) {
|
||||
func_809616E0(this, play);
|
||||
@@ -712,7 +713,7 @@ void func_80962D60(EnFu* this, PlayState* play) {
|
||||
play_sound(NA_SE_SY_FOUND);
|
||||
player->stateFlags1 &= ~0x20;
|
||||
player->stateFlags3 |= 0x400000;
|
||||
func_8010E9F0(4, 60);
|
||||
Interface_StartTimer(TIMER_ID_MINIGAME_2, 60);
|
||||
|
||||
if (this->unk_546 == 1) {
|
||||
func_809616E0(this, play);
|
||||
@@ -760,11 +761,11 @@ void func_80962F4C(EnFu* this, PlayState* play) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (gSaveContext.unk_3DE0[4] < 2000) {
|
||||
if (gSaveContext.timerCurTimes[TIMER_ID_MINIGAME_2] < SECONDS_TO_TIMER(20)) {
|
||||
s16 val = D_80964B00[this->unk_542] + 200;
|
||||
|
||||
Math_SmoothStepToS(&fuKaiten->rotationSpeed, val, 10, 5, 5);
|
||||
} else if (gSaveContext.unk_3DE0[4] < 4000) {
|
||||
} else if (gSaveContext.timerCurTimes[TIMER_ID_MINIGAME_2] < SECONDS_TO_TIMER(40)) {
|
||||
s16 val = D_80964B00[this->unk_542] + 100;
|
||||
|
||||
Math_SmoothStepToS(&fuKaiten->rotationSpeed, val, 10, 5, 5);
|
||||
@@ -776,12 +777,12 @@ void func_80962F4C(EnFu* this, PlayState* play) {
|
||||
|
||||
if ((!DynaPolyActor_IsInRidingRotatingState((DynaPolyActor*)this->actor.child) &&
|
||||
(player->actor.bgCheckFlags & 1)) ||
|
||||
(gSaveContext.unk_3DE0[4] < 1) || (this->unk_548 == this->unk_54C)) {
|
||||
(gSaveContext.timerCurTimes[TIMER_ID_MINIGAME_2] <= SECONDS_TO_TIMER(0)) || (this->unk_548 == this->unk_54C)) {
|
||||
player->stateFlags3 &= ~0x400000;
|
||||
func_80961E88(play);
|
||||
player->stateFlags1 |= 0x20;
|
||||
if (this->unk_548 < this->unk_54C) {
|
||||
if (gSaveContext.unk_3DE0[4] == 0) {
|
||||
if (gSaveContext.timerCurTimes[TIMER_ID_MINIGAME_2] == SECONDS_TO_TIMER(0)) {
|
||||
Message_StartTextbox(play, 0x2885, &this->actor);
|
||||
this->unk_552 = 0x2885;
|
||||
} else {
|
||||
@@ -789,15 +790,15 @@ void func_80962F4C(EnFu* this, PlayState* play) {
|
||||
this->unk_552 = 0x2888;
|
||||
}
|
||||
func_801A2C20();
|
||||
gSaveContext.unk_3DE0[4] = 0;
|
||||
gSaveContext.unk_3DD0[4] = 5;
|
||||
gSaveContext.timerCurTimes[TIMER_ID_MINIGAME_2] = SECONDS_TO_TIMER(0);
|
||||
gSaveContext.timerStates[TIMER_ID_MINIGAME_2] = TIMER_STATE_STOP;
|
||||
this->unk_548 = 0;
|
||||
func_809632D0(this);
|
||||
} else {
|
||||
this->unk_548 = 0;
|
||||
func_801A2C20();
|
||||
gSaveContext.unk_3DE0[4] = 0;
|
||||
gSaveContext.unk_3DD0[4] = 5;
|
||||
gSaveContext.timerCurTimes[TIMER_ID_MINIGAME_2] = SECONDS_TO_TIMER(0);
|
||||
gSaveContext.timerStates[TIMER_ID_MINIGAME_2] = TIMER_STATE_STOP;
|
||||
func_801A3098(NA_BGM_GET_ITEM | 0x900);
|
||||
func_8011B4E0(play, 1);
|
||||
this->unk_54A = 3;
|
||||
@@ -820,7 +821,7 @@ void func_8096326C(EnFu* this, PlayState* play) {
|
||||
|
||||
void func_809632D0(EnFu* this) {
|
||||
if (gSaveContext.save.playerForm == PLAYER_FORM_DEKU) {
|
||||
Interface_ChangeAlpha(50);
|
||||
Interface_SetHudVisibility(HUD_VISIBILITY_ALL);
|
||||
}
|
||||
|
||||
gSaveContext.save.weekEventReg[8] &= (u8)~1;
|
||||
@@ -1453,7 +1454,7 @@ void func_80964950(PlayState* play, EnFuUnkStruct* ptr, s32 len) {
|
||||
for (i = 0; i < len; i++, ptr++) {
|
||||
if (ptr->unk_36 == 1) {
|
||||
if (!flag) {
|
||||
gSPDisplayList(POLY_OPA_DISP++, object_mu_DL_00B0A0);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gHoneyAndDarlingHeartMaterialDL);
|
||||
flag = true;
|
||||
}
|
||||
Matrix_Translate(ptr->unk_08.x, ptr->unk_08.y, ptr->unk_08.z, MTXMODE_NEW);
|
||||
@@ -1462,7 +1463,7 @@ void func_80964950(PlayState* play, EnFuUnkStruct* ptr, s32 len) {
|
||||
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(gDropRecoveryHeartTex));
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, object_mu_DL_00B0E0);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gHoneyAndDarlingHeartModelDL);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -459,7 +459,7 @@ void func_80B10240(EnGb2* this, PlayState* play) {
|
||||
D_80B119B0[this->unk_280].unk_04.y, D_80B119B0[this->unk_280].unk_04.z, 0, 0, 0,
|
||||
this->unk_27E);
|
||||
if (this->unk_280 == 0) {
|
||||
func_8010E9F0(1, 180);
|
||||
Interface_StartTimer(TIMER_ID_MINIGAME_1, 180);
|
||||
}
|
||||
this->actionFunc = func_80B10344;
|
||||
} else {
|
||||
@@ -487,7 +487,7 @@ void func_80B10344(EnGb2* this, PlayState* play) {
|
||||
if (this->unk_26C & 0x200) {
|
||||
if (this->unk_280 == 3) {
|
||||
this->unk_26C &= ~0x200;
|
||||
gSaveContext.unk_3DD0[1] = 5;
|
||||
gSaveContext.timerStates[TIMER_ID_MINIGAME_1] = TIMER_STATE_STOP;
|
||||
func_800FE498();
|
||||
gSaveContext.eventInf[4] |= 0x40;
|
||||
func_80B0FE7C(play);
|
||||
@@ -506,7 +506,7 @@ void func_80B10344(EnGb2* this, PlayState* play) {
|
||||
}
|
||||
|
||||
if (gSaveContext.save.playerData.health < 49) {
|
||||
gSaveContext.unk_3DD0[1] = 5;
|
||||
gSaveContext.timerStates[TIMER_ID_MINIGAME_1] = TIMER_STATE_STOP;
|
||||
gSaveContext.eventInf[4] |= 0x40;
|
||||
gSaveContext.eventInf[4] |= 0x20;
|
||||
|
||||
@@ -519,8 +519,8 @@ void func_80B10344(EnGb2* this, PlayState* play) {
|
||||
}
|
||||
|
||||
func_80B0FE7C(play);
|
||||
} else if (gSaveContext.unk_3DE0[1] == 0) {
|
||||
gSaveContext.unk_3DD0[1] = 5;
|
||||
} else if (gSaveContext.timerCurTimes[TIMER_ID_MINIGAME_1] == SECONDS_TO_TIMER(0)) {
|
||||
gSaveContext.timerStates[TIMER_ID_MINIGAME_1] = TIMER_STATE_STOP;
|
||||
gSaveContext.eventInf[4] |= 0x40;
|
||||
gSaveContext.eventInf[4] |= 0x10;
|
||||
|
||||
@@ -806,11 +806,11 @@ void func_80B110F8(EnGb2* this, PlayState* play) {
|
||||
void func_80B111AC(EnGb2* this, PlayState* play) {
|
||||
s32 index;
|
||||
|
||||
if (play->roomCtx.currRoom.num == 1) {
|
||||
if (play->roomCtx.curRoom.num == 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
switch (play->roomCtx.currRoom.num) {
|
||||
switch (play->roomCtx.curRoom.num) {
|
||||
case 2:
|
||||
index = 1;
|
||||
break;
|
||||
@@ -837,7 +837,7 @@ void func_80B111AC(EnGb2* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_80B11268(EnGb2* this, PlayState* play) {
|
||||
if (play->roomCtx.currRoom.num == 1) {
|
||||
if (play->roomCtx.curRoom.num == 1) {
|
||||
this->unk_290 = 0;
|
||||
this->unk_282[0] = this->actor.cutscene;
|
||||
if (Flags_GetClear(play, 2) && Flags_GetClear(play, 3) && Flags_GetClear(play, 4) && Flags_GetClear(play, 5)) {
|
||||
|
||||
@@ -213,15 +213,15 @@ void func_80B3B294(EnGg2* this, PlayState* play) {
|
||||
Vec3s sp30;
|
||||
|
||||
if (this->unk_2F1 == 0) {
|
||||
if (play->sceneNum == SCENE_11GORONNOSATO) {
|
||||
if (play->sceneId == SCENE_11GORONNOSATO) {
|
||||
gSaveContext.save.weekEventReg[20] |= 4;
|
||||
gSaveContext.save.weekEventReg[20] &= (u8)~8;
|
||||
gSaveContext.save.weekEventReg[20] &= (u8)~0x10;
|
||||
} else if (play->sceneNum == SCENE_17SETUGEN) {
|
||||
} else if (play->sceneId == SCENE_17SETUGEN) {
|
||||
gSaveContext.save.weekEventReg[20] &= (u8)~4;
|
||||
gSaveContext.save.weekEventReg[20] |= 8;
|
||||
gSaveContext.save.weekEventReg[20] &= (u8)~0x10;
|
||||
} else if (play->sceneNum == SCENE_10YUKIYAMANOMURA) {
|
||||
} else if (play->sceneId == SCENE_10YUKIYAMANOMURA) {
|
||||
gSaveContext.save.weekEventReg[20] &= (u8)~4;
|
||||
gSaveContext.save.weekEventReg[20] &= (u8)~8;
|
||||
gSaveContext.save.weekEventReg[20] |= 0x10;
|
||||
@@ -239,15 +239,15 @@ void func_80B3B294(EnGg2* this, PlayState* play) {
|
||||
this->unk_1DC++;
|
||||
} else {
|
||||
this->unk_2F1 = 1;
|
||||
if (play->sceneNum == SCENE_11GORONNOSATO) {
|
||||
if (play->sceneId == SCENE_11GORONNOSATO) {
|
||||
gSaveContext.save.weekEventReg[20] |= 4;
|
||||
gSaveContext.save.weekEventReg[20] &= (u8)~8;
|
||||
gSaveContext.save.weekEventReg[20] &= (u8)~0x10;
|
||||
} else if (play->sceneNum == SCENE_17SETUGEN) {
|
||||
} else if (play->sceneId == SCENE_17SETUGEN) {
|
||||
gSaveContext.save.weekEventReg[20] &= (u8)~4;
|
||||
gSaveContext.save.weekEventReg[20] |= 8;
|
||||
gSaveContext.save.weekEventReg[20] &= (u8)~0x10;
|
||||
} else if (play->sceneNum == SCENE_10YUKIYAMANOMURA) {
|
||||
} else if (play->sceneId == SCENE_10YUKIYAMANOMURA) {
|
||||
gSaveContext.save.weekEventReg[20] &= (u8)~4;
|
||||
gSaveContext.save.weekEventReg[20] &= (u8)~8;
|
||||
gSaveContext.save.weekEventReg[20] |= 0x10;
|
||||
@@ -380,14 +380,14 @@ void EnGg2_Init(Actor* thisx, PlayState* play2) {
|
||||
this->unk_2EC = 20;
|
||||
this->unk_2EA = 0;
|
||||
|
||||
if (play->sceneNum == SCENE_11GORONNOSATO) {
|
||||
if (play->sceneId == SCENE_11GORONNOSATO) {
|
||||
gSaveContext.save.weekEventReg[20] &= (u8)~4;
|
||||
gSaveContext.save.weekEventReg[20] &= (u8)~8;
|
||||
gSaveContext.save.weekEventReg[20] &= (u8)~0x10;
|
||||
this->unk_2EE = 0;
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, D_80B3BF00, 0);
|
||||
this->actionFunc = func_80B3AFB0;
|
||||
} else if (play->sceneNum == SCENE_17SETUGEN) {
|
||||
} else if (play->sceneId == SCENE_17SETUGEN) {
|
||||
if ((gSaveContext.save.weekEventReg[20] & 4) && !(gSaveContext.save.weekEventReg[20] & 8) &&
|
||||
!(gSaveContext.save.weekEventReg[20] & 0x10)) {
|
||||
gSaveContext.save.weekEventReg[20] &= (u8)~4;
|
||||
@@ -397,7 +397,7 @@ void EnGg2_Init(Actor* thisx, PlayState* play2) {
|
||||
} else {
|
||||
Actor_MarkForDeath(&this->actor);
|
||||
}
|
||||
} else if (play->sceneNum == SCENE_10YUKIYAMANOMURA) {
|
||||
} else if (play->sceneId == SCENE_10YUKIYAMANOMURA) {
|
||||
if (!(gSaveContext.save.weekEventReg[20] & 4) && (gSaveContext.save.weekEventReg[20] & 8) &&
|
||||
!(gSaveContext.save.weekEventReg[20] & 0x10)) {
|
||||
gSaveContext.save.weekEventReg[20] &= (u8)~8;
|
||||
|
||||
@@ -118,7 +118,7 @@ Color_RGBA8 D_80B533A4 = { 50, 150, 150, 0 };
|
||||
u16 func_80B50410(EnGk* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (play->sceneNum == SCENE_17SETUGEN2) {
|
||||
if (play->sceneId == SCENE_17SETUGEN2) {
|
||||
if (player->transformation == PLAYER_FORM_GORON) {
|
||||
if (!(gSaveContext.save.weekEventReg[40] & 0x80)) {
|
||||
switch (this->unk_31C) {
|
||||
@@ -164,7 +164,7 @@ u16 func_80B50410(EnGk* this, PlayState* play) {
|
||||
this->unk_1E4 |= 1;
|
||||
return 0xE81;
|
||||
}
|
||||
} else if (play->sceneNum == SCENE_GORONRACE) {
|
||||
} else if (play->sceneId == SCENE_GORONRACE) {
|
||||
if (player->transformation == PLAYER_FORM_GORON) {
|
||||
if (!(gSaveContext.save.weekEventReg[41] & 4)) {
|
||||
if (this->unk_31C == 0xE88) {
|
||||
@@ -645,7 +645,7 @@ void func_80B51760(EnGk* this, PlayState* play) {
|
||||
this->unk_1E4 |= 2;
|
||||
}
|
||||
} else if (((this->actor.xzDistToPlayer < 100.0f) || this->actor.isTargeted) &&
|
||||
(gSaveContext.save.entrance != 0xD010)) {
|
||||
(gSaveContext.save.entrance != ENTRANCE(GORON_RACETRACK, 1))) {
|
||||
func_800B863C(&this->actor, play);
|
||||
}
|
||||
|
||||
@@ -1018,7 +1018,7 @@ void EnGk_Init(Actor* thisx, PlayState* play) {
|
||||
if (ENGK_GET_F(&this->actor) == ENGK_F_1) {
|
||||
this->unk_2E4 = 5;
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 5);
|
||||
if (play->sceneNum == SCENE_17SETUGEN2) {
|
||||
if (play->sceneId == SCENE_17SETUGEN2) {
|
||||
if (Flags_GetSwitch(play, ENGK_GET_3F00(&this->actor))) {
|
||||
Actor_MarkForDeath(&this->actor);
|
||||
} else {
|
||||
@@ -1026,7 +1026,7 @@ void EnGk_Init(Actor* thisx, PlayState* play) {
|
||||
this->path = SubS_GetPathByIndex(play, ENGK_GET_F0(&this->actor), 0xF);
|
||||
this->actionFunc = func_80B51760;
|
||||
}
|
||||
} else if (play->sceneNum == SCENE_GORONRACE) {
|
||||
} else if (play->sceneId == SCENE_GORONRACE) {
|
||||
if (gSaveContext.save.weekEventReg[33] & 0x80) {
|
||||
if (gSaveContext.save.entrance == ENTRANCE(GORON_RACETRACK, 1)) {
|
||||
this->actionFunc = func_80B51760;
|
||||
|
||||
@@ -328,8 +328,8 @@ s32 func_8094E054(EnGm* this, PlayState* play, s32 arg2) {
|
||||
s32 func_8094E0F8(EnGm* this, PlayState* play) {
|
||||
s32 ret = false;
|
||||
|
||||
if ((this->unk_260 != play->roomCtx.currRoom.num) && (play->roomCtx.unk31 == 0)) {
|
||||
this->unk_260 = play->roomCtx.currRoom.num;
|
||||
if ((this->unk_260 != play->roomCtx.curRoom.num) && (play->roomCtx.unk31 == 0)) {
|
||||
this->unk_260 = play->roomCtx.curRoom.num;
|
||||
this->unk_262 = SubS_GetObjectIndex(OBJECT_IN2, play);
|
||||
this->actor.draw = NULL;
|
||||
this->unk_3FC = 1;
|
||||
@@ -762,7 +762,7 @@ s32 func_8094EFC4(EnGm* this, PlayState* play) {
|
||||
|
||||
if (play->csCtx.state != 0) {
|
||||
if (this->unk_3F8 == 0) {
|
||||
if ((play->sceneNum == SCENE_MILK_BAR) && (gSaveContext.sceneSetupIndex == 2)) {
|
||||
if ((play->sceneId == SCENE_MILK_BAR) && (gSaveContext.sceneSetupIndex == 2)) {
|
||||
func_8094E054(this, play, 0);
|
||||
this->unk_258 = 255;
|
||||
}
|
||||
@@ -771,7 +771,7 @@ s32 func_8094EFC4(EnGm* this, PlayState* play) {
|
||||
}
|
||||
ret = true;
|
||||
} else if (this->unk_3F8 != 0) {
|
||||
if (play->sceneNum == SCENE_MILK_BAR) {
|
||||
if (play->sceneId == SCENE_MILK_BAR) {
|
||||
this->unk_400 = 0;
|
||||
}
|
||||
this->unk_3F8 = 0;
|
||||
|
||||
@@ -537,7 +537,7 @@ s32 func_80A1222C(EnGo* this, PlayState* play) {
|
||||
if (((player->transformation == PLAYER_FORM_GORON) && (play->msgCtx.ocarinaMode == 3) &&
|
||||
(play->msgCtx.lastPlayedSong == OCARINA_SONG_GORON_LULLABY) && (this->unk_3EC == 0) &&
|
||||
(this->actor.xzDistToPlayer < 400.0f)) ||
|
||||
(!(gSaveContext.save.weekEventReg[22] & 4) && (play->sceneNum == SCENE_16GORON_HOUSE) &&
|
||||
(!(gSaveContext.save.weekEventReg[22] & 4) && (play->sceneId == SCENE_16GORON_HOUSE) &&
|
||||
(gSaveContext.sceneSetupIndex == 0) && (this->unk_3EC == 0) && (play->csCtx.currentCsIndex == 1))) {
|
||||
ret = true;
|
||||
}
|
||||
@@ -710,7 +710,7 @@ s32 func_80A12868(EnGo* this, PlayState* play) {
|
||||
|
||||
s32 func_80A12954(EnGo* this, PlayState* play) {
|
||||
if ((ENGO_GET_F(&this->actor) == ENGO_F_4) && (play->csCtx.state != 0) && (this->actor.draw != NULL) &&
|
||||
(play->sceneNum == SCENE_10YUKIYAMANOMURA2) && (gSaveContext.sceneSetupIndex == 1) &&
|
||||
(play->sceneId == SCENE_10YUKIYAMANOMURA2) && (gSaveContext.sceneSetupIndex == 1) &&
|
||||
(play->csCtx.currentCsIndex == 0)) {
|
||||
if (this->unk_3F0 == 0) {
|
||||
this->actor.flags &= ~ACTOR_FLAG_1;
|
||||
@@ -1411,7 +1411,7 @@ void func_80A144F4(EnGo* this, PlayState* play) {
|
||||
|
||||
void func_80A145AC(EnGo* this, PlayState* play) {
|
||||
if ((ENGO_GET_70(&this->actor) == ENGO_70_1) &&
|
||||
(((play->sceneNum == SCENE_10YUKIYAMANOMURA2) && (gSaveContext.sceneSetupIndex == 1) &&
|
||||
(((play->sceneId == SCENE_10YUKIYAMANOMURA2) && (gSaveContext.sceneSetupIndex == 1) &&
|
||||
(play->csCtx.currentCsIndex == 0)) ||
|
||||
!(gSaveContext.save.weekEventReg[21] & 8))) {
|
||||
this->actor.child = func_80A13400(this, play);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2,16 +2,77 @@
|
||||
#define Z_EN_GRASSHOPPER_H
|
||||
|
||||
#include "global.h"
|
||||
#include "objects/object_grasshopper/object_grasshopper.h"
|
||||
|
||||
#define EN_GRASSHOPPER_GET_TYPE(thisx) ((thisx)->params)
|
||||
|
||||
struct EnGrasshopper;
|
||||
|
||||
typedef void (*EnGrasshopperActionFunc)(struct EnGrasshopper*, PlayState*);
|
||||
|
||||
typedef enum EnGrasshopperType {
|
||||
/* -1 */ EN_GRASSHOPPER_TYPE_UNUSED_NORMAL = -1, // Acts exactly like EN_GRASSHOPPER_TYPE_NORMAL
|
||||
/* 0 */ EN_GRASSHOPPER_TYPE_NORMAL,
|
||||
/* 1 */ EN_GRASSHOPPER_TYPE_GROWS_WHEN_SPAWNED, // Spawned by EnEncount1
|
||||
/* 2 */ EN_GRASSHOPPER_TYPE_WOODFALL_TEMPLE_FINAL_ROOM,
|
||||
/* 3 */ EN_GRASSHOPPER_TYPE_WOODFALL,
|
||||
} EnGrasshopperType;
|
||||
|
||||
typedef struct EnGrasshopperEffect {
|
||||
/* 0x00 */ u8 isEnabled;
|
||||
/* 0x04 */ Vec3f pos;
|
||||
/* 0x10 */ Vec3f velocity;
|
||||
/* 0x1C */ f32 yaw;
|
||||
/* 0x20 */ Vec3f scale;
|
||||
/* 0x2C */ s16 timer;
|
||||
/* 0x2E */ s16 lightningIndex;
|
||||
} EnGrasshopperEffect; // size = 0x30
|
||||
|
||||
#define EN_GRASSHOPPER_EFFECT_COUNT 100
|
||||
|
||||
typedef struct EnGrasshopper {
|
||||
/* 0x0000 */ Actor actor;
|
||||
/* 0x0144 */ char unk_144[0x164];
|
||||
/* 0x0144 */ SkelAnime skelAnime;
|
||||
/* 0x0188 */ Vec3s jointTable[DRAGONFLY_LIMB_MAX];
|
||||
/* 0x0218 */ Vec3s morphTable[DRAGONFLY_LIMB_MAX];
|
||||
/* 0x02A8 */ EnGrasshopperActionFunc actionFunc;
|
||||
/* 0x02AC */ char unk_2AC[0x15C4];
|
||||
/* 0x02AC */ u8 decision;
|
||||
/* 0x02AD */ u8 shouldTurn;
|
||||
/* 0x02AE */ UNK_TYPE1 unk_2AE[2];
|
||||
/* 0x02B0 */ s16 timer;
|
||||
/* 0x02B2 */ s16 waitTimer;
|
||||
/* 0x02B4 */ s16 postBankTimer;
|
||||
/* 0x02B6 */ s16 drawDmgEffTimer;
|
||||
/* 0x02B8 */ s16 drawDmgEffType;
|
||||
/* 0x02BC */ f32 drawDmgEffScale;
|
||||
/* 0x02C0 */ f32 drawDmgEffFrozenSteamScale;
|
||||
/* 0x02C4 */ Vec3f bodyPartsPos[12];
|
||||
/* 0x0354 */ s16 bodyPartsPosIndex;
|
||||
/* 0x0356 */ s16 splashCount;
|
||||
/* 0x0358 */ s16 action;
|
||||
/* 0x035A */ s16 index; // Has a minor effect on speed for some reason.
|
||||
/* 0x035C */ s16 bankState;
|
||||
/* 0x035E */ s16 type;
|
||||
/* 0x0360 */ f32 dragonflyScale;
|
||||
/* 0x0364 */ f32 rotationalVelocity;
|
||||
/* 0x0368 */ f32 endFrame;
|
||||
/* 0x036C */ f32 approachSpeed;
|
||||
/* 0x0370 */ f32 baseFlyHeight;
|
||||
/* 0x0374 */ f32 targetPosY;
|
||||
/* 0x0376 */ Vec3s targetRot;
|
||||
/* 0x0380 */ Vec3f flyingHomePos;
|
||||
/* 0x038C */ s16 bobPhase;
|
||||
/* 0x038E */ UNK_TYPE1 unk_38E[0x26];
|
||||
/* 0x03B4 */ Vec3f targetApproachPos;
|
||||
/* 0x03C0 */ Vec3f tailTipPos;
|
||||
/* 0x03CC */ Vec3f effectBasePos;
|
||||
/* 0x03D8 */ Vec3f shadowBodyPartsPos[DRAGONFLY_LIMB_MAX];
|
||||
/* 0x04F8 */ f32 waterSurface;
|
||||
/* 0x04FC */ Vec3f damagedVelocity;
|
||||
/* 0x0508 */ Vec3s targetBankRot;
|
||||
/* 0x0510 */ ColliderJntSph collider;
|
||||
/* 0x0530 */ ColliderJntSphElement colliderElements[2];
|
||||
/* 0x0570 */ EnGrasshopperEffect effects[EN_GRASSHOPPER_EFFECT_COUNT];
|
||||
} EnGrasshopper; // size = 0x1870
|
||||
|
||||
extern const ActorInit En_Grasshopper_InitVars;
|
||||
|
||||
@@ -330,7 +330,7 @@ void func_80B23934(EnHanabi* this, PlayState* play) {
|
||||
}
|
||||
}
|
||||
|
||||
if ((play->sceneNum == SCENE_00KEIKOKU) && (gSaveContext.sceneSetupIndex == 7) &&
|
||||
if ((play->sceneId == SCENE_00KEIKOKU) && (gSaveContext.sceneSetupIndex == 7) &&
|
||||
(play->csCtx.currentCsIndex == 0) && (play->csCtx.frames == 610)) {
|
||||
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_KYOJIN_GROAN);
|
||||
}
|
||||
|
||||
@@ -138,9 +138,9 @@ void EnHoll_Destroy(Actor* thisx, PlayState* play) {
|
||||
}
|
||||
|
||||
void EnHoll_ChangeRooms(PlayState* play) {
|
||||
Room tempRoom = play->roomCtx.currRoom;
|
||||
Room tempRoom = play->roomCtx.curRoom;
|
||||
|
||||
play->roomCtx.currRoom = play->roomCtx.prevRoom;
|
||||
play->roomCtx.curRoom = play->roomCtx.prevRoom;
|
||||
play->roomCtx.prevRoom = tempRoom;
|
||||
play->roomCtx.activeMemPage ^= 1;
|
||||
}
|
||||
@@ -170,7 +170,7 @@ void EnHoll_VisibleIdle(EnHoll* this, PlayState* play) {
|
||||
|
||||
EnHoll_SetPlayerSide(play, this, &transformedPlayerPos);
|
||||
playerDistFromCentralPlane = fabsf(transformedPlayerPos.z);
|
||||
if (play->sceneNum == SCENE_IKANA) {
|
||||
if (play->sceneId == SCENE_IKANA) {
|
||||
enHollBottom = EN_HOLL_BOTTOM_IKANA;
|
||||
enHollHalfwidth = EN_HOLL_HALFWIDTH_IKANA;
|
||||
}
|
||||
@@ -204,12 +204,12 @@ void EnHoll_VisibleIdle(EnHoll* this, PlayState* play) {
|
||||
s32 unclampedAlpha = EN_HOLL_SCALE_ALPHA(playerDistFromCentralPlane);
|
||||
|
||||
this->alpha = CLAMP(unclampedAlpha, 0, 255);
|
||||
if (play->roomCtx.currRoom.num != this->actor.room) {
|
||||
if (play->roomCtx.curRoom.num != this->actor.room) {
|
||||
EnHoll_ChangeRooms(play);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if ((this->type == EN_HOLL_TYPE_DEFAULT) && (play->sceneNum == SCENE_26SARUNOMORI) &&
|
||||
} else if ((this->type == EN_HOLL_TYPE_DEFAULT) && (play->sceneId == SCENE_26SARUNOMORI) &&
|
||||
(sInstancePlayingSound == NULL)) {
|
||||
sInstancePlayingSound = this;
|
||||
}
|
||||
@@ -225,7 +225,7 @@ void EnHoll_TransparentIdle(EnHoll* this, PlayState* play) {
|
||||
|
||||
Actor_OffsetOfPointInActorCoords(&this->actor, &transformedPlayerPos,
|
||||
useViewEye ? &play->view.eye : &player->actor.world.pos);
|
||||
enHollTop = (play->sceneNum == SCENE_PIRATE) ? EN_HOLL_TOP_PIRATE : EN_HOLL_TOP_DEFAULT;
|
||||
enHollTop = (play->sceneId == SCENE_PIRATE) ? EN_HOLL_TOP_PIRATE : EN_HOLL_TOP_DEFAULT;
|
||||
|
||||
if ((transformedPlayerPos.y > EN_HOLL_BOTTOM_DEFAULT) && (transformedPlayerPos.y < enHollTop) &&
|
||||
(fabsf(transformedPlayerPos.x) < EN_HOLL_HALFWIDTH_TRANSPARENT)) {
|
||||
@@ -239,7 +239,7 @@ void EnHoll_TransparentIdle(EnHoll* this, PlayState* play) {
|
||||
|
||||
this->actor.room = room;
|
||||
|
||||
if ((this->actor.room != play->roomCtx.currRoom.num) &&
|
||||
if ((this->actor.room != play->roomCtx.curRoom.num) &&
|
||||
Room_StartRoomTransition(play, &play->roomCtx, this->actor.room)) {
|
||||
this->actionFunc = EnHoll_RoomTransitionIdle;
|
||||
}
|
||||
@@ -264,7 +264,7 @@ void EnHoll_VerticalBgCoverIdle(EnHoll* this, PlayState* play) {
|
||||
|
||||
this->actor.room = play->doorCtx.transitionActorList[enHollId].sides[playerSide].room;
|
||||
|
||||
if ((this->actor.room != play->roomCtx.currRoom.num) &&
|
||||
if ((this->actor.room != play->roomCtx.curRoom.num) &&
|
||||
Room_StartRoomTransition(play, &play->roomCtx, this->actor.room)) {
|
||||
this->actionFunc = EnHoll_RoomTransitionIdle;
|
||||
this->bgCoverAlphaActive = true;
|
||||
@@ -287,7 +287,7 @@ void EnHoll_VerticalIdle(EnHoll* this, PlayState* play) {
|
||||
s32 playerSide = (this->actor.playerHeightRel > 0.0f) ? EN_HOLL_ABOVE : EN_HOLL_BELOW;
|
||||
|
||||
this->actor.room = play->doorCtx.transitionActorList[enHollId].sides[playerSide].room;
|
||||
if ((this->actor.room != play->roomCtx.currRoom.num) &&
|
||||
if ((this->actor.room != play->roomCtx.curRoom.num) &&
|
||||
Room_StartRoomTransition(play, &play->roomCtx, this->actor.room)) {
|
||||
this->actionFunc = EnHoll_RoomTransitionIdle;
|
||||
}
|
||||
|
||||
@@ -792,7 +792,7 @@ void EnHorse_Init(Actor* thisx, PlayState* play2) {
|
||||
this->stateFlags = 0;
|
||||
}
|
||||
|
||||
if (((play->sceneNum == SCENE_KOEPONARACE) && (GET_RACE_FLAGS == 1)) ||
|
||||
if (((play->sceneId == SCENE_KOEPONARACE) && (GET_RACE_FLAGS == 1)) ||
|
||||
((gSaveContext.save.entrance == ENTRANCE(ROMANI_RANCH, 0)) && Cutscene_GetSceneSetupIndex(play))) {
|
||||
this->stateFlags |= ENHORSE_FLAG_25;
|
||||
}
|
||||
@@ -878,7 +878,7 @@ void EnHorse_Init(Actor* thisx, PlayState* play2) {
|
||||
func_80112AFC(play);
|
||||
} else if (thisx->params == ENHORSE_14) {
|
||||
func_808846F0(this, play);
|
||||
if ((play->sceneNum == SCENE_LOST_WOODS) && !Cutscene_IsPlaying(play)) {
|
||||
if ((play->sceneId == SCENE_LOST_WOODS) && !Cutscene_IsPlaying(play)) {
|
||||
Actor_MarkForDeath(&this->actor);
|
||||
}
|
||||
} else if (thisx->params == ENHORSE_16) {
|
||||
@@ -3498,7 +3498,7 @@ void EnHorse_ObstructMovement(EnHorse* this, PlayState* play, s32 obstacleType,
|
||||
this->unk_1EC |= 0x80;
|
||||
this->actor.world.pos = this->actor.prevPos;
|
||||
this->actor.speedXZ = 0.0f;
|
||||
} else if ((play->sceneNum != SCENE_KOEPONARACE) || (this->unk_1EC & 2)) {
|
||||
} else if ((play->sceneId != SCENE_KOEPONARACE) || (this->unk_1EC & 2)) {
|
||||
this->unk_1EC &= ~2;
|
||||
this->actor.world.pos = this->lastPos;
|
||||
this->stateFlags |= ENHORSE_OBSTACLE;
|
||||
@@ -3822,7 +3822,7 @@ void EnHorse_UpdateBgCheckInfo(EnHorse* this, PlayState* play) {
|
||||
}
|
||||
|
||||
if (((movingFast == false) && (intersectDist < 80.0f)) || ((movingFast == true) && (intersectDist < 150.0f))) {
|
||||
if ((play->sceneNum != SCENE_KOEPONARACE) && (Math_CosS(sp7E) < 0.9f) && (this->playerControlled == true)) {
|
||||
if ((play->sceneId != SCENE_KOEPONARACE) && (Math_CosS(sp7E) < 0.9f) && (this->playerControlled == true)) {
|
||||
if (movingFast == false) {
|
||||
this->stateFlags |= ENHORSE_FORCE_REVERSING;
|
||||
} else if (movingFast == true) {
|
||||
@@ -3876,7 +3876,7 @@ void EnHorse_UpdateBgCheckInfo(EnHorse* this, PlayState* play) {
|
||||
COLPOLY_GET_NORMAL(obstacleFloor->normal.z), obstacleFloor->dist,
|
||||
&this->actor.world.pos) > 40.0f)) {
|
||||
if ((movingFast == true) && (this->playerControlled == true) && (this->action != ENHORSE_ACTION_STOPPING) &&
|
||||
(play->sceneNum != SCENE_KOEPONARACE)) {
|
||||
(play->sceneId != SCENE_KOEPONARACE)) {
|
||||
this->stateFlags |= ENHORSE_FORCE_REVERSING;
|
||||
EnHorse_StartBraking(this, play);
|
||||
}
|
||||
@@ -3888,7 +3888,7 @@ void EnHorse_UpdateBgCheckInfo(EnHorse* this, PlayState* play) {
|
||||
if ((temp_f0 < 0.81915206f) || SurfaceType_IsHorseBlocked(&play->colCtx, obstacleFloor, bgId) ||
|
||||
(func_800C99D4(&play->colCtx, obstacleFloor, bgId) == 7)) {
|
||||
if ((Math_CosS(sp7E) < 0.9f) && (movingFast == true) && (this->playerControlled == true) &&
|
||||
(this->action != ENHORSE_ACTION_STOPPING) && (play->sceneNum != SCENE_KOEPONARACE)) {
|
||||
(this->action != ENHORSE_ACTION_STOPPING) && (play->sceneId != SCENE_KOEPONARACE)) {
|
||||
this->stateFlags |= ENHORSE_FORCE_REVERSING;
|
||||
EnHorse_StartBraking(this, play);
|
||||
}
|
||||
@@ -3951,13 +3951,13 @@ void EnHorse_UpdateBgCheckInfo(EnHorse* this, PlayState* play) {
|
||||
if ((temp_f0 < 0.81915206f) || SurfaceType_IsHorseBlocked(&play->colCtx, obstacleFloor, bgId) ||
|
||||
(func_800C99D4(&play->colCtx, obstacleFloor, bgId) == 7)) {
|
||||
if ((movingFast == true) && (this->playerControlled == true) && (this->action != ENHORSE_ACTION_STOPPING) &&
|
||||
(play->sceneNum != SCENE_KOEPONARACE)) {
|
||||
(play->sceneId != SCENE_KOEPONARACE)) {
|
||||
this->stateFlags |= ENHORSE_FORCE_REVERSING;
|
||||
EnHorse_StartBraking(this, play);
|
||||
}
|
||||
} else if (behindObstacleHeight < -70.0f) {
|
||||
if ((movingFast == true) && (this->playerControlled == true) && (this->action != ENHORSE_ACTION_STOPPING) &&
|
||||
(play->sceneNum != SCENE_KOEPONARACE)) {
|
||||
(play->sceneId != SCENE_KOEPONARACE)) {
|
||||
this->stateFlags |= ENHORSE_FORCE_REVERSING;
|
||||
EnHorse_StartBraking(this, play);
|
||||
}
|
||||
|
||||
@@ -121,7 +121,7 @@ s32 func_808F8CCC(EnHorseGameCheck* this, PlayState* play2) {
|
||||
return false;
|
||||
}
|
||||
|
||||
func_8010E9F0(4, 0);
|
||||
Interface_StartTimer(TIMER_ID_MINIGAME_2, 0);
|
||||
play->interfaceCtx.unk_280 = 1;
|
||||
|
||||
this->horse1 = (EnHorse*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, -1149.0f, -106.0f, 470.0f, 0, 0x7FFF, 0,
|
||||
@@ -145,7 +145,7 @@ s32 func_808F8CCC(EnHorseGameCheck* this, PlayState* play2) {
|
||||
}
|
||||
|
||||
s32 func_808F8E94(EnHorseGameCheck* this, PlayState* play) {
|
||||
gSaveContext.unk_3DD0[4] = 0;
|
||||
gSaveContext.timerStates[TIMER_ID_MINIGAME_2] = TIMER_STATE_OFF;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -247,11 +247,11 @@ s32 func_808F8FAC(EnHorseGameCheck* this, PlayState* play) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (gSaveContext.unk_3DE0[4] >= 0x4650) {
|
||||
if (gSaveContext.timerCurTimes[TIMER_ID_MINIGAME_2] >= SECONDS_TO_TIMER(180)) {
|
||||
Audio_QueueSeqCmd(0x8041);
|
||||
play_sound(NA_SE_SY_START_SHOT);
|
||||
this->unk_164 |= 0x40000;
|
||||
gSaveContext.unk_3DD0[4] = 6;
|
||||
gSaveContext.timerStates[TIMER_ID_MINIGAME_2] = TIMER_STATE_6;
|
||||
SET_RACE_FLAGS(RACE_FLAG_4);
|
||||
this->unk_174 = 60;
|
||||
}
|
||||
@@ -284,7 +284,7 @@ s32 func_808F8FAC(EnHorseGameCheck* this, PlayState* play) {
|
||||
Audio_QueueSeqCmd(0x8041);
|
||||
play_sound(NA_SE_SY_START_SHOT);
|
||||
this->unk_164 |= 0x40000;
|
||||
gSaveContext.unk_3DD0[4] = 6;
|
||||
gSaveContext.timerStates[TIMER_ID_MINIGAME_2] = TIMER_STATE_6;
|
||||
SET_RACE_FLAGS(RACE_FLAG_3);
|
||||
this->unk_174 = 60;
|
||||
}
|
||||
@@ -317,7 +317,7 @@ s32 func_808F8FAC(EnHorseGameCheck* this, PlayState* play) {
|
||||
Audio_QueueSeqCmd(0x8041);
|
||||
play_sound(NA_SE_SY_START_SHOT);
|
||||
this->unk_164 |= 0x02000000;
|
||||
gSaveContext.unk_3DD0[4] = 6;
|
||||
gSaveContext.timerStates[TIMER_ID_MINIGAME_2] = TIMER_STATE_6;
|
||||
SET_RACE_FLAGS(RACE_FLAG_3);
|
||||
this->unk_174 = 60;
|
||||
}
|
||||
@@ -346,7 +346,7 @@ s32 func_808F8FAC(EnHorseGameCheck* this, PlayState* play) {
|
||||
Audio_QueueSeqCmd(0x8041);
|
||||
play_sound(NA_SE_SY_START_SHOT);
|
||||
this->unk_164 |= 0x800;
|
||||
gSaveContext.unk_3DD0[4] = 6;
|
||||
gSaveContext.timerStates[TIMER_ID_MINIGAME_2] = TIMER_STATE_6;
|
||||
SET_RACE_FLAGS(RACE_FLAG_2);
|
||||
this->unk_174 = 60;
|
||||
}
|
||||
|
||||
@@ -532,7 +532,7 @@ void func_8095E95C(EnIshi* this, PlayState* play) {
|
||||
s32 sp2C;
|
||||
|
||||
if (Actor_HasNoParent(&this->actor, play)) {
|
||||
this->actor.room = play->roomCtx.currRoom.num;
|
||||
this->actor.room = play->roomCtx.curRoom.num;
|
||||
if (ENISHI_GET_1(&this->actor) == 1) {
|
||||
Flags_SetSwitch(play, ENISHI_GET_FE00(&this->actor));
|
||||
}
|
||||
|
||||
@@ -948,7 +948,7 @@ void EnJg_Init(Actor* thisx, PlayState* play) {
|
||||
Actor_SetScale(&this->actor, 0.01f);
|
||||
|
||||
if (!EN_JG_IS_IN_GORON_SHRINE(thisx)) {
|
||||
if ((play->sceneNum == SCENE_SPOT00) && (gSaveContext.sceneSetupIndex == 7) &&
|
||||
if ((play->sceneId == SCENE_SPOT00) && (gSaveContext.sceneSetupIndex == 7) &&
|
||||
(play->csCtx.currentCsIndex == 0)) {
|
||||
// This is the elder that appears in the cutscene for learning the full Goron Lullaby.
|
||||
this->animIndex = EN_JG_ANIM_IDLE;
|
||||
|
||||
@@ -155,7 +155,7 @@ void func_80C13BB8(EnJgameTsn* this, PlayState* play) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, &play->state)) {
|
||||
if (this->actor.flags & ACTOR_FLAG_10000) {
|
||||
this->actor.flags &= ~ACTOR_FLAG_10000;
|
||||
if (gSaveContext.unk_3DE0[4] > 0) {
|
||||
if (gSaveContext.timerCurTimes[TIMER_ID_MINIGAME_2] > SECONDS_TO_TIMER(0)) {
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 1);
|
||||
Message_StartTextbox(play, 0x10A2, &this->actor);
|
||||
this->unk_300 = 0x10A2;
|
||||
@@ -287,7 +287,7 @@ void func_80C1410C(EnJgameTsn* this, PlayState* play) {
|
||||
play->interfaceCtx.unk_280 = 1;
|
||||
func_80112AFC(play);
|
||||
gSaveContext.save.weekEventReg[90] |= 0x20;
|
||||
func_8010E9F0(4, 0x78);
|
||||
Interface_StartTimer(TIMER_ID_MINIGAME_2, 120);
|
||||
this->actionFunc = func_80C1418C;
|
||||
}
|
||||
|
||||
@@ -352,7 +352,7 @@ void func_80C14230(EnJgameTsn* this, PlayState* play) {
|
||||
func_80C14030(this);
|
||||
}
|
||||
|
||||
if (gSaveContext.unk_3DE0[4] == 0) {
|
||||
if (gSaveContext.timerCurTimes[TIMER_ID_MINIGAME_2] == SECONDS_TO_TIMER(0)) {
|
||||
Message_StartTextbox(play, 0x10A1, &this->actor);
|
||||
this->unk_300 = 0x10A1;
|
||||
player->stateFlags1 |= 0x20;
|
||||
@@ -479,7 +479,7 @@ void func_80C147B4(EnJgameTsn* this, PlayState* play) {
|
||||
case 0x10A1:
|
||||
func_801477B4(play);
|
||||
gSaveContext.minigameState = 3;
|
||||
gSaveContext.unk_3DD0[4] = 5;
|
||||
gSaveContext.timerStates[TIMER_ID_MINIGAME_2] = TIMER_STATE_STOP;
|
||||
gSaveContext.save.weekEventReg[90] &= (u8)~0x20;
|
||||
func_80C144E4(this);
|
||||
break;
|
||||
|
||||
@@ -238,10 +238,10 @@ void EnKakasi_CheckAnimationSfx(EnKakasi* this) {
|
||||
void EnKakasi_CheckPlayerPosition(EnKakasi* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (play->sceneNum == SCENE_8ITEMSHOP) {
|
||||
if (play->sceneId == SCENE_8ITEMSHOP) {
|
||||
player->actor.world.pos.x = -50.0f;
|
||||
player->actor.world.pos.z = 155.0f;
|
||||
} else if (play->sceneNum == SCENE_TENMON_DAI) {
|
||||
} else if (play->sceneId == SCENE_TENMON_DAI) {
|
||||
player->actor.world.pos.x = 60.0f;
|
||||
player->actor.world.pos.z = -190.0f;
|
||||
}
|
||||
@@ -998,7 +998,7 @@ void EnKakasi_DiggingAway(EnKakasi* this, PlayState* play) {
|
||||
tempWorldPos.x += randPlusMinusPoint5Scaled(2.0f);
|
||||
tempWorldPos.z += randPlusMinusPoint5Scaled(2.0f);
|
||||
|
||||
if (play->sceneNum == SCENE_8ITEMSHOP) {
|
||||
if (play->sceneId == SCENE_8ITEMSHOP) {
|
||||
EffectSsGSplash_Spawn(play, &tempWorldPos, 0, 0, 0, randPlusMinusPoint5Scaled(100.0f) + 200.0f);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(play, &tempWorldPos, 0x32, NA_SE_EV_BOMB_DROP_WATER);
|
||||
|
||||
|
||||
@@ -71,12 +71,12 @@ void EnKbt_Destroy(Actor* thisx, PlayState* play) {
|
||||
}
|
||||
|
||||
s32 func_80B33E64(PlayState* play) {
|
||||
return gSaveContext.save.permanentSceneFlags[play->sceneNum].unk_14 & 1;
|
||||
return gSaveContext.save.permanentSceneFlags[play->sceneId].unk_14 & 1;
|
||||
}
|
||||
|
||||
s32 func_80B33E8C(PlayState* play) {
|
||||
if ((CURRENT_DAY == 3) ||
|
||||
((CURRENT_DAY == 2) && (gSaveContext.save.permanentSceneFlags[play->sceneNum].unk_14 & 2))) {
|
||||
((CURRENT_DAY == 2) && (gSaveContext.save.permanentSceneFlags[play->sceneId].unk_14 & 2))) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -151,33 +151,33 @@ ObjIcePoly* EnKgy_FindIceBlock(PlayState* play) {
|
||||
}
|
||||
|
||||
void func_80B40C74(PlayState* play) {
|
||||
gSaveContext.save.permanentSceneFlags[play->sceneNum].unk_14 |= 1;
|
||||
gSaveContext.save.permanentSceneFlags[play->sceneId].unk_14 |= 1;
|
||||
if (CURRENT_DAY == 1) {
|
||||
gSaveContext.save.permanentSceneFlags[play->sceneNum].unk_14 |= 2;
|
||||
gSaveContext.save.permanentSceneFlags[play->sceneId].unk_14 |= 2;
|
||||
} else {
|
||||
gSaveContext.save.permanentSceneFlags[play->sceneNum].unk_14 &= ~2;
|
||||
gSaveContext.save.permanentSceneFlags[play->sceneId].unk_14 &= ~2;
|
||||
}
|
||||
}
|
||||
|
||||
void func_80B40D00(PlayState* play) {
|
||||
gSaveContext.save.permanentSceneFlags[play->sceneNum].unk_14 |= 4;
|
||||
gSaveContext.save.permanentSceneFlags[play->sceneId].unk_14 |= 4;
|
||||
}
|
||||
|
||||
void func_80B40D30(PlayState* play) {
|
||||
gSaveContext.save.permanentSceneFlags[play->sceneNum].unk_14 &= ~7;
|
||||
gSaveContext.save.permanentSceneFlags[play->sceneId].unk_14 &= ~7;
|
||||
}
|
||||
|
||||
s32 func_80B40D64(PlayState* play) {
|
||||
return gSaveContext.save.permanentSceneFlags[play->sceneNum].unk_14 & 1;
|
||||
return gSaveContext.save.permanentSceneFlags[play->sceneId].unk_14 & 1;
|
||||
}
|
||||
|
||||
s32 func_80B40D8C(PlayState* play) {
|
||||
return gSaveContext.save.permanentSceneFlags[play->sceneNum].unk_14 & 4;
|
||||
return gSaveContext.save.permanentSceneFlags[play->sceneId].unk_14 & 4;
|
||||
}
|
||||
|
||||
s32 func_80B40DB4(PlayState* play) {
|
||||
if ((CURRENT_DAY == 3) ||
|
||||
((CURRENT_DAY == 2) && (gSaveContext.save.permanentSceneFlags[play->sceneNum].unk_14 & 2))) {
|
||||
((CURRENT_DAY == 2) && (gSaveContext.save.permanentSceneFlags[play->sceneId].unk_14 & 2))) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
* Description: Grass / Bush
|
||||
*/
|
||||
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "z_en_kusa.h"
|
||||
#include "objects/object_kusa/object_kusa.h"
|
||||
#include "objects/gameplay_keep/gameplay_keep.h"
|
||||
@@ -510,7 +509,7 @@ void EnKusa_LiftedUp(EnKusa* this, PlayState* play) {
|
||||
s32 bgId;
|
||||
|
||||
if (Actor_HasNoParent(&this->actor, play)) {
|
||||
this->actor.room = play->roomCtx.currRoom.num;
|
||||
this->actor.room = play->roomCtx.curRoom.num;
|
||||
EnKusa_SetupFall(this);
|
||||
this->actor.velocity.x = this->actor.speedXZ * Math_SinS(this->actor.world.rot.y);
|
||||
this->actor.velocity.z = this->actor.speedXZ * Math_CosS(this->actor.world.rot.y);
|
||||
@@ -683,7 +682,7 @@ void EnKusa_Update(Actor* thisx, PlayState* play2) {
|
||||
} else {
|
||||
this->actor.shape.yOffset = 0.0f;
|
||||
}
|
||||
if ((kusaGameplayFrames != play->gameplayFrames) && (play->roomCtx.currRoom.unk3 == 0)) {
|
||||
if ((kusaGameplayFrames != play->gameplayFrames) && (play->roomCtx.curRoom.unk3 == 0)) {
|
||||
EnKusa_Sway();
|
||||
kusaGameplayFrames = play->gameplayFrames;
|
||||
}
|
||||
@@ -695,7 +694,7 @@ void EnKusa_DrawBush(Actor* thisx, PlayState* play2) {
|
||||
|
||||
if ((this->actor.projectedPos.z <= 1200.0f) || ((this->isInWater & 1) && (this->actor.projectedPos.z < 1300.0f))) {
|
||||
|
||||
if ((play->roomCtx.currRoom.unk3 == 0) && (this->actionFunc == EnKusa_WaitForInteract) &&
|
||||
if ((play->roomCtx.curRoom.unk3 == 0) && (this->actionFunc == EnKusa_WaitForInteract) &&
|
||||
(this->actor.projectedPos.z > -150.0f) && (this->actor.projectedPos.z < 400.0f)) {
|
||||
EnKusa_ApplySway(&D_80936AD8[this->kusaMtxIdx]);
|
||||
}
|
||||
@@ -724,7 +723,7 @@ void EnKusa_DrawGrass(Actor* thisx, PlayState* play) {
|
||||
if (this->isCut) {
|
||||
Gfx_DrawDListOpa(play, gKusaStump);
|
||||
} else {
|
||||
if ((play->roomCtx.currRoom.unk3 == 0) && (this->actionFunc == EnKusa_WaitForInteract)) {
|
||||
if ((play->roomCtx.curRoom.unk3 == 0) && (this->actionFunc == EnKusa_WaitForInteract)) {
|
||||
if ((this->actor.projectedPos.z > -150.0f) && (this->actor.projectedPos.z < 400.0f)) {
|
||||
EnKusa_ApplySway(&D_80936AD8[this->kusaMtxIdx]);
|
||||
}
|
||||
|
||||
@@ -1033,7 +1033,7 @@ void func_80A5D9C8(EnKusa2* this, PlayState* play) {
|
||||
D_80A5EAFC.z = Math_SinS(D_80A5EB04.z) * 1000.0f;
|
||||
|
||||
if (Actor_HasNoParent(&this->actor, play)) {
|
||||
this->actor.room = play->roomCtx.currRoom.num;
|
||||
this->actor.room = play->roomCtx.curRoom.num;
|
||||
this->actor.colChkInfo.mass = 80;
|
||||
this->actor.home.rot.y = this->actor.world.rot.y;
|
||||
this->actor.velocity.y = 12.5f;
|
||||
@@ -1289,7 +1289,7 @@ void func_80A5E604(Actor* thisx, PlayState* play) {
|
||||
} else {
|
||||
this->actor.draw = func_80A5E6F0;
|
||||
|
||||
if (play->roomCtx.currRoom.unk3 == 0) {
|
||||
if (play->roomCtx.curRoom.unk3 == 0) {
|
||||
func_80A5B508();
|
||||
}
|
||||
func_80A5CAF4(&D_80A5F1C0);
|
||||
@@ -1352,7 +1352,7 @@ void EnKusa2_Draw(Actor* thisx, PlayState* play) {
|
||||
EnKusa2* this = THIS;
|
||||
|
||||
if (this->actor.projectedPos.z <= 1200.0f) {
|
||||
if ((play->roomCtx.currRoom.unk3 == 0) && (this->actor.projectedPos.z > -150.0f) &&
|
||||
if ((play->roomCtx.curRoom.unk3 == 0) && (this->actor.projectedPos.z > -150.0f) &&
|
||||
(this->actor.projectedPos.z < 400.0f)) {
|
||||
func_80A5B954(&D_80A60908[this->unk_1CE], 0.0015f);
|
||||
}
|
||||
|
||||
@@ -674,7 +674,7 @@ void EnMa4_HorsebackGameCheckPlayerInteractions(EnMa4* this, PlayState* play) {
|
||||
// "You're feeling confident"
|
||||
Message_StartTextbox(play, 0x336E, &this->actor);
|
||||
this->actionFunc = EnMa4_HorsebackGameTalking;
|
||||
} else if ((gSaveContext.unk_3DE0[4] < 115 * 100)) { // timer < 115 seconds
|
||||
} else if (gSaveContext.timerCurTimes[TIMER_ID_MINIGAME_2] < SECONDS_TO_TIMER(115)) {
|
||||
func_800B8614(&this->actor, play, 100.0f);
|
||||
}
|
||||
}
|
||||
@@ -689,7 +689,7 @@ void EnMa4_InitHorsebackGame(EnMa4* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
play->interfaceCtx.unk_280 = 1;
|
||||
func_8010E9F0(4, 0);
|
||||
Interface_StartTimer(TIMER_ID_MINIGAME_2, 0);
|
||||
gSaveContext.save.weekEventReg[8] |= 1;
|
||||
func_80112AFC(play);
|
||||
player->stateFlags1 |= 0x20;
|
||||
@@ -717,9 +717,9 @@ void EnMa4_HorsebackGameWait(EnMa4* this, PlayState* play) {
|
||||
play->interfaceCtx.unk_25C = 1;
|
||||
}
|
||||
|
||||
if ((gSaveContext.unk_3DE0[4] >= 2 * 60 * 100) // timer >= 2 minutes
|
||||
|| (this->poppedBalloonCounter == 10)) {
|
||||
gSaveContext.unk_3DD0[4] = 6;
|
||||
if ((gSaveContext.timerCurTimes[TIMER_ID_MINIGAME_2] >= SECONDS_TO_TIMER(120)) ||
|
||||
(this->poppedBalloonCounter == 10)) {
|
||||
gSaveContext.timerStates[TIMER_ID_MINIGAME_2] = TIMER_STATE_6;
|
||||
EnMa4_SetupHorsebackGameEnd(this, play);
|
||||
D_80AC0258 = 0;
|
||||
}
|
||||
@@ -898,13 +898,13 @@ void EnMa4_StartDialogue(EnMa4* this, PlayState* play) {
|
||||
gSaveContext.save.weekEventReg[21] |= 0x40;
|
||||
}
|
||||
} else if (this->state == MA4_STATE_AFTERHORSEBACKGAME) {
|
||||
if (gSaveContext.unk_3DE0[4] >= 2 * 60 * 100) {
|
||||
if (gSaveContext.timerCurTimes[TIMER_ID_MINIGAME_2] >= SECONDS_TO_TIMER(120)) {
|
||||
// "Too bad Grasshopper"
|
||||
EnMa4_SetFaceExpression(this, 0, 0);
|
||||
Message_StartTextbox(play, 0x336D, &this->actor);
|
||||
this->textId = 0x336D;
|
||||
} else {
|
||||
time = gSaveContext.unk_3DE0[4];
|
||||
time = gSaveContext.timerCurTimes[TIMER_ID_MINIGAME_2];
|
||||
if ((s32)time < (s32)gSaveContext.save.horseBackBalloonHighScore) {
|
||||
// [Score] New record!
|
||||
gSaveContext.save.horseBackBalloonHighScore = time;
|
||||
@@ -943,12 +943,12 @@ void EnMa4_StartDialogue(EnMa4* this, PlayState* play) {
|
||||
Message_StartTextbox(play, 0x3354, &this->actor);
|
||||
this->textId = 0x3354;
|
||||
} else if (this->state == MA4_STATE_AFTERHORSEBACKGAME) {
|
||||
if (gSaveContext.unk_3DE0[4] >= 2 * 60 * 100) {
|
||||
if (gSaveContext.timerCurTimes[TIMER_ID_MINIGAME_2] >= SECONDS_TO_TIMER(120)) {
|
||||
// "Try again?"
|
||||
Message_StartTextbox(play, 0x3356, &this->actor);
|
||||
this->textId = 0x3356;
|
||||
} else {
|
||||
time = gSaveContext.unk_3DE0[4];
|
||||
time = gSaveContext.timerCurTimes[TIMER_ID_MINIGAME_2];
|
||||
if ((s32)time < (s32)gSaveContext.save.horseBackBalloonHighScore) {
|
||||
gSaveContext.save.horseBackBalloonHighScore = time;
|
||||
EnMa4_SetFaceExpression(this, 0, 3);
|
||||
@@ -970,12 +970,12 @@ void EnMa4_StartDialogue(EnMa4* this, PlayState* play) {
|
||||
Message_StartTextbox(play, 0x3358, &this->actor);
|
||||
this->textId = 0x3358;
|
||||
} else if (this->state == MA4_STATE_AFTERHORSEBACKGAME) {
|
||||
if (gSaveContext.unk_3DE0[4] >= 2 * 60 * 100) {
|
||||
if (gSaveContext.timerCurTimes[TIMER_ID_MINIGAME_2] >= SECONDS_TO_TIMER(120)) {
|
||||
// "Try again?"
|
||||
Message_StartTextbox(play, 0x3356, &this->actor);
|
||||
this->textId = 0x3356;
|
||||
} else {
|
||||
time = gSaveContext.unk_3DE0[4];
|
||||
time = gSaveContext.timerCurTimes[TIMER_ID_MINIGAME_2];
|
||||
if ((s32)time < (s32)gSaveContext.save.horseBackBalloonHighScore) {
|
||||
// New record
|
||||
gSaveContext.save.horseBackBalloonHighScore = time;
|
||||
|
||||
@@ -135,7 +135,7 @@ void EnMag_Init(Actor* thisx, PlayState* play) {
|
||||
this->unk11F02 = 30;
|
||||
this->unk11F00 = this->state = MAG_STATE_INITIAL;
|
||||
|
||||
if (gSaveContext.unk_3F1E != 0) {
|
||||
if (gSaveContext.hudVisibilityForceButtonAlphasByStatus) {
|
||||
this->mainTitleAlpha = 210;
|
||||
this->unk11F32 = 255;
|
||||
this->copyrightAlpha = 255;
|
||||
@@ -158,7 +158,7 @@ void EnMag_Init(Actor* thisx, PlayState* play) {
|
||||
this->displayEffectEnvColor[1] = 255;
|
||||
this->displayEffectEnvColor[2] = 155;
|
||||
|
||||
gSaveContext.unk_3F1E = 0;
|
||||
gSaveContext.hudVisibilityForceButtonAlphasByStatus = false;
|
||||
this->state = MAG_STATE_FADE_IN_MASK;
|
||||
sInputDelayTimer = 20;
|
||||
gSaveContext.transFadeDuration = 1;
|
||||
|
||||
@@ -120,7 +120,7 @@ void EnMk_Destroy(Actor* thisx, PlayState* play) {
|
||||
}
|
||||
|
||||
s32 func_80959524(PlayState* play) {
|
||||
return gSaveContext.save.permanentSceneFlags[play->sceneNum].unk_14 & 7;
|
||||
return gSaveContext.save.permanentSceneFlags[play->sceneId].unk_14 & 7;
|
||||
}
|
||||
|
||||
void func_8095954C(EnMk* this, PlayState* play) {
|
||||
|
||||
@@ -185,7 +185,7 @@ void func_80965DB4(EnMm* this, PlayState* play) {
|
||||
void func_8096611C(EnMm* this, PlayState* play) {
|
||||
if (Actor_HasNoParent(&this->actor, play)) {
|
||||
EnMm_SetupAction(this, func_80965DB4);
|
||||
this->actor.room = play->roomCtx.currRoom.num;
|
||||
this->actor.room = play->roomCtx.curRoom.num;
|
||||
this->actor.bgCheckFlags &= ~1;
|
||||
Math_Vec3s_ToVec3f(&this->actor.prevPos, &this->actor.home.rot);
|
||||
gSaveContext.unk_1014 = 0;
|
||||
|
||||
@@ -249,13 +249,14 @@ void func_80A6F5E4(EnMm3* this, PlayState* play) {
|
||||
break;
|
||||
|
||||
case 0x2791:
|
||||
if (gSaveContext.unk_3DE0[0] == 1000) {
|
||||
if (gSaveContext.timerCurTimes[TIMER_ID_POSTMAN] == SECONDS_TO_TIMER(10)) {
|
||||
Message_StartTextbox(play, 0x2792, &this->actor);
|
||||
this->unk_2B4 = 0x2792;
|
||||
} else if ((gSaveContext.unk_3DE0[0] >= 1500)) {
|
||||
} else if ((gSaveContext.timerCurTimes[TIMER_ID_POSTMAN] >= SECONDS_TO_TIMER(15))) {
|
||||
Message_StartTextbox(play, 0x2797, &this->actor);
|
||||
this->unk_2B4 = 0x2797;
|
||||
} else if ((gSaveContext.unk_3DE0[0] <= 1050) && (gSaveContext.unk_3DE0[0] >= 950)) {
|
||||
} else if ((gSaveContext.timerCurTimes[TIMER_ID_POSTMAN] <= SECONDS_TO_TIMER_PRECISE(10, 50)) &&
|
||||
(gSaveContext.timerCurTimes[TIMER_ID_POSTMAN] >= SECONDS_TO_TIMER_PRECISE(9, 50))) {
|
||||
Message_StartTextbox(play, 0x2795, &this->actor);
|
||||
this->unk_2B4 = 0x2795;
|
||||
} else {
|
||||
@@ -301,7 +302,7 @@ void func_80A6F5E4(EnMm3* this, PlayState* play) {
|
||||
} else if ((this->unk_2AC > 0) && (this->unk_2B4 == 0x2791)) {
|
||||
this->unk_2AC--;
|
||||
if (this->unk_2AC == 0) {
|
||||
if (gSaveContext.unk_3DE0[0] == 1000) {
|
||||
if (gSaveContext.timerCurTimes[TIMER_ID_POSTMAN] == SECONDS_TO_TIMER(10)) {
|
||||
func_801A3098(0x922);
|
||||
} else {
|
||||
play_sound(NA_SE_SY_ERROR);
|
||||
@@ -342,9 +343,9 @@ void func_80A6F9DC(EnMm3* this, PlayState* play) {
|
||||
|
||||
player->stateFlags1 |= 0x20;
|
||||
if (Player_GetMask(play) == PLAYER_MASK_BUNNY) {
|
||||
func_8010EA9C(0, 2);
|
||||
Interface_StartPostmanTimer(0, POSTMAN_MINIGAME_BUNNY_HOOD_ON);
|
||||
} else {
|
||||
func_8010EA9C(0, 0);
|
||||
Interface_StartPostmanTimer(0, POSTMAN_MINIGAME_BUNNY_HOOD_OFF);
|
||||
}
|
||||
func_801477B4(play);
|
||||
play_sound(NA_SE_SY_START_SHOT);
|
||||
@@ -381,18 +382,20 @@ void func_80A6FBA0(EnMm3* this) {
|
||||
void func_80A6FBFC(EnMm3* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (gSaveContext.unk_3DD0[0] == 0x10) {
|
||||
if (gSaveContext.timerStates[TIMER_ID_POSTMAN] == TIMER_STATE_POSTMAN_END) {
|
||||
player->stateFlags1 &= ~0x20;
|
||||
this->actor.flags |= ACTOR_FLAG_10000;
|
||||
if (gSaveContext.unk_3DE0[0] > 1500) {
|
||||
gSaveContext.unk_3DE0[0] = 1500;
|
||||
} else if ((((void)0, gSaveContext.unk_3DE0[0]) >= (OSTime)(995 - XREG(16))) &&
|
||||
(((void)0, gSaveContext.unk_3DE0[0]) <= (OSTime)(1005 + XREG(17)))) {
|
||||
gSaveContext.unk_3DE0[0] = 1000;
|
||||
if (gSaveContext.timerCurTimes[TIMER_ID_POSTMAN] > SECONDS_TO_TIMER(15)) {
|
||||
gSaveContext.timerCurTimes[TIMER_ID_POSTMAN] = SECONDS_TO_TIMER(15);
|
||||
} else if ((((void)0, gSaveContext.timerCurTimes[TIMER_ID_POSTMAN]) >=
|
||||
(OSTime)(SECONDS_TO_TIMER_PRECISE(10, -5) - XREG(16))) &&
|
||||
(((void)0, gSaveContext.timerCurTimes[TIMER_ID_POSTMAN]) <=
|
||||
(OSTime)(SECONDS_TO_TIMER_PRECISE(10, 5) + XREG(17)))) {
|
||||
gSaveContext.timerCurTimes[TIMER_ID_POSTMAN] = SECONDS_TO_TIMER(10);
|
||||
}
|
||||
} else if (gSaveContext.unk_3DE0[0] > 1500) {
|
||||
gSaveContext.unk_3DD0[0] = 15;
|
||||
gSaveContext.unk_3DC8 = osGetTime();
|
||||
} else if (gSaveContext.timerCurTimes[TIMER_ID_POSTMAN] > SECONDS_TO_TIMER(15)) {
|
||||
gSaveContext.timerStates[TIMER_ID_POSTMAN] = TIMER_STATE_POSTMAN_STOP;
|
||||
gSaveContext.postmanTimerStopOsTime = osGetTime();
|
||||
}
|
||||
|
||||
if (Actor_ProcessTalkRequest(&this->actor, &play->state)) {
|
||||
@@ -401,7 +404,7 @@ void func_80A6FBFC(EnMm3* this, PlayState* play) {
|
||||
Message_StartTextbox(play, 0x2791, &this->actor);
|
||||
this->unk_2B4 = 0x2791;
|
||||
this->unk_2AC = 7;
|
||||
gSaveContext.unk_3DD0[0] = 0;
|
||||
gSaveContext.timerStates[TIMER_ID_POSTMAN] = TIMER_STATE_OFF;
|
||||
this->actor.flags &= ~ACTOR_FLAG_10000;
|
||||
play_sound(NA_SE_SY_START_SHOT);
|
||||
func_80A6F9C8(this);
|
||||
|
||||
@@ -7,6 +7,11 @@ struct EnMm3;
|
||||
|
||||
typedef void (*EnMm3ActionFunc)(struct EnMm3*, PlayState*);
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ POSTMAN_MINIGAME_BUNNY_HOOD_OFF,
|
||||
/* 2 */ POSTMAN_MINIGAME_BUNNY_HOOD_ON = 2
|
||||
} PostmanMinigameBunnyHoodState;
|
||||
|
||||
typedef struct EnMm3 {
|
||||
/* 0x000 */ Actor actor;
|
||||
/* 0x144 */ SkelAnime skelAnime;
|
||||
|
||||
@@ -253,7 +253,7 @@ s32 EnMttag_ExitRace(PlayState* play, s32 transitionType, s32 nextTransitionType
|
||||
* Displays the text which says that the player has made a false start.
|
||||
*/
|
||||
void EnMttag_ShowFalseStartMessage(EnMttag* this, PlayState* play) {
|
||||
gSaveContext.unk_3DD0[4] = 0;
|
||||
gSaveContext.timerStates[TIMER_ID_MINIGAME_2] = TIMER_STATE_OFF;
|
||||
Message_StartTextbox(play, 0xE95, NULL); // An entrant made a false start
|
||||
func_800B7298(play, &this->actor, 7);
|
||||
Audio_QueueSeqCmd(0x101400FF);
|
||||
@@ -314,7 +314,7 @@ void EnMttag_RaceStart(EnMttag* this, PlayState* play) {
|
||||
gSaveContext.eventInf[1] |= 8;
|
||||
} else {
|
||||
if (DECR(this->timer) == 60) {
|
||||
func_8010E9F0(4, 0);
|
||||
Interface_StartTimer(TIMER_ID_MINIGAME_2, 0);
|
||||
play->interfaceCtx.unk_280 = 1;
|
||||
Audio_QueueSeqCmd(NA_BGM_GORON_RACE | 0x8000);
|
||||
play->envCtx.unk_E4 = 0xFE;
|
||||
@@ -359,14 +359,14 @@ void EnMttag_Race(EnMttag* this, PlayState* play) {
|
||||
s32 playerCheatStatus;
|
||||
|
||||
if (EnMttag_IsInFinishLine(playerPos)) {
|
||||
gSaveContext.unk_3DD0[4] = 6;
|
||||
gSaveContext.timerStates[TIMER_ID_MINIGAME_2] = TIMER_STATE_6;
|
||||
play_sound(NA_SE_SY_START_SHOT);
|
||||
Audio_QueueSeqCmd(NA_BGM_GORON_GOAL | 0x8000);
|
||||
this->timer = 55;
|
||||
gSaveContext.eventInf[1] |= 2;
|
||||
this->actionFunc = EnMttag_RaceFinish;
|
||||
} else if (EnMttag_IsAnyRaceGoronOverFinishLine(this)) {
|
||||
gSaveContext.unk_3DD0[4] = 6;
|
||||
gSaveContext.timerStates[TIMER_ID_MINIGAME_2] = TIMER_STATE_6;
|
||||
play_sound(NA_SE_SY_START_SHOT);
|
||||
Audio_QueueSeqCmd(NA_BGM_GORON_GOAL | 0x8000);
|
||||
this->timer = 55;
|
||||
@@ -456,7 +456,7 @@ void EnMttag_HandleCantWinChoice(EnMttag* this, PlayState* play) {
|
||||
if (play->msgCtx.choiceIndex != 0) {
|
||||
// Exit the race
|
||||
func_8019F230();
|
||||
gSaveContext.unk_3DD0[4] = 0;
|
||||
gSaveContext.timerStates[TIMER_ID_MINIGAME_2] = TIMER_STATE_OFF;
|
||||
EnMttag_ExitRace(play, TRANS_TYPE_FADE_BLACK, TRANS_TYPE_FADE_BLACK);
|
||||
gSaveContext.eventInf[1] &= (u8)~8;
|
||||
gSaveContext.eventInf[1] |= 4;
|
||||
@@ -502,12 +502,14 @@ void EnMttag_Init(Actor* thisx, PlayState* play) {
|
||||
|
||||
void EnMttag_Destroy(Actor* thisx, PlayState* play) {
|
||||
EnMttag* this = THIS;
|
||||
if (gSaveContext.unk_3DD0[4] != 6) {
|
||||
gSaveContext.unk_3DD0[4] = 5;
|
||||
|
||||
if (gSaveContext.timerStates[TIMER_ID_MINIGAME_2] != TIMER_STATE_6) {
|
||||
gSaveContext.timerStates[TIMER_ID_MINIGAME_2] = TIMER_STATE_STOP;
|
||||
}
|
||||
}
|
||||
|
||||
void EnMttag_Update(Actor* thisx, PlayState* play) {
|
||||
EnMttag* this = THIS;
|
||||
|
||||
this->actionFunc(this, play);
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
*/
|
||||
|
||||
#include "z_en_nimotsu.h"
|
||||
#include "assets/objects/object_boj/object_boj.h"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_10)
|
||||
|
||||
@@ -15,7 +16,8 @@ void EnNimotsu_Destroy(Actor* thisx, PlayState* play);
|
||||
void EnNimotsu_Update(Actor* thisx, PlayState* play);
|
||||
void EnNimotsu_Draw(Actor* thisx, PlayState* play);
|
||||
|
||||
#if 0
|
||||
void EnNimotsu_UpdateCollision(EnNimotsu* this, PlayState* play);
|
||||
|
||||
const ActorInit En_Nimotsu_InitVars = {
|
||||
ACTOR_EN_NIMOTSU,
|
||||
ACTORCAT_PROP,
|
||||
@@ -28,25 +30,93 @@ const ActorInit En_Nimotsu_InitVars = {
|
||||
(ActorFunc)EnNimotsu_Draw,
|
||||
};
|
||||
|
||||
// static ColliderCylinderInit sCylinderInit = {
|
||||
static ColliderCylinderInit D_80BE1FB0 = {
|
||||
{ COLTYPE_NONE, AT_NONE, AC_NONE, OC1_ON | OC1_TYPE_ALL, OC2_TYPE_2, COLSHAPE_CYLINDER, },
|
||||
{ ELEMTYPE_UNK4, { 0x00000000, 0x00, 0x00 }, { 0x00000000, 0x00, 0x00 }, TOUCH_NONE | TOUCH_SFX_NORMAL, BUMP_NONE, OCELEM_ON, },
|
||||
static ColliderCylinderInit sCylinderInit = {
|
||||
{
|
||||
COLTYPE_NONE,
|
||||
AT_NONE,
|
||||
AC_NONE,
|
||||
OC1_ON | OC1_TYPE_ALL,
|
||||
OC2_TYPE_2,
|
||||
COLSHAPE_CYLINDER,
|
||||
},
|
||||
{
|
||||
ELEMTYPE_UNK4,
|
||||
{ 0x00000000, 0x00, 0x00 },
|
||||
{ 0x00000000, 0x00, 0x00 },
|
||||
TOUCH_NONE | TOUCH_SFX_NORMAL,
|
||||
BUMP_NONE,
|
||||
OCELEM_ON,
|
||||
},
|
||||
{ 10, 30, 0, { 0, 0, 0 } },
|
||||
};
|
||||
|
||||
#endif
|
||||
void EnNimotsu_UpdateCollision(EnNimotsu* this, PlayState* play) {
|
||||
Collider_UpdateCylinder(&this->actor, &this->collider);
|
||||
CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base);
|
||||
Actor_UpdateBgCheckInfo(play, &this->actor, 32.0f, 30.0f, 0.0f, 4);
|
||||
}
|
||||
|
||||
extern ColliderCylinderInit D_80BE1FB0;
|
||||
void EnNimotsu_Init(Actor* thisx, PlayState* play) {
|
||||
EnNimotsu* this = THIS;
|
||||
|
||||
extern UNK_TYPE D_06013380;
|
||||
Collider_InitCylinder(play, &this->collider);
|
||||
Collider_InitAndSetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Nimotsu/func_80BE1C80.s")
|
||||
this->timer = 10;
|
||||
this->actor.gravity = -0.5f;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Nimotsu/EnNimotsu_Init.s")
|
||||
Actor_SetScale(&this->actor, 0.01f);
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Nimotsu/EnNimotsu_Destroy.s")
|
||||
void EnNimotsu_Destroy(Actor* thisx, PlayState* play) {
|
||||
EnNimotsu* this = THIS;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Nimotsu/EnNimotsu_Update.s")
|
||||
Collider_DestroyCylinder(play, &this->collider);
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Nimotsu/EnNimotsu_Draw.s")
|
||||
void EnNimotsu_Update(Actor* thisx, PlayState* play) {
|
||||
s32 pad;
|
||||
EnNimotsu* this = THIS;
|
||||
Vec3f dustPosition;
|
||||
|
||||
Actor_MoveWithGravity(&this->actor);
|
||||
|
||||
if (!(this->dustDone & 1) && (this->actor.bgCheckFlags & 1)) {
|
||||
if (DECR(this->timer) == 0) {
|
||||
this->dustDone |= 1;
|
||||
}
|
||||
|
||||
if ((play->state.frames % 3) == 0) {
|
||||
dustPosition.x = this->actor.world.pos.x + randPlusMinusPoint5Scaled(15.0f);
|
||||
dustPosition.y = this->actor.world.pos.y;
|
||||
dustPosition.z = this->actor.world.pos.z + randPlusMinusPoint5Scaled(15.0f);
|
||||
Actor_SpawnFloorDustRing(play, &this->actor, &dustPosition, 20.0f, 0, 2.0f, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
EnNimotsu_UpdateCollision(this, play);
|
||||
}
|
||||
|
||||
void EnNimotsu_Draw(Actor* thisx, PlayState* play) {
|
||||
s32 pad;
|
||||
EnNimotsu* this = THIS;
|
||||
Vec3f position;
|
||||
Vec3f scale;
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
func_8012C28C(play->state.gfxCtx);
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, &gBombShopBagDL);
|
||||
func_8012C2DC(play->state.gfxCtx);
|
||||
|
||||
position.x = this->actor.world.pos.x + 7.0f;
|
||||
position.y = this->actor.world.pos.y;
|
||||
position.z = this->actor.world.pos.z + 2.0f;
|
||||
|
||||
scale.x = 0.2f;
|
||||
scale.y = 0.2f;
|
||||
scale.z = 0.2f;
|
||||
|
||||
func_800BC620(&position, &scale, 255, play);
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
||||
@@ -7,7 +7,10 @@ struct EnNimotsu;
|
||||
|
||||
typedef struct EnNimotsu {
|
||||
/* 0x000 */ Actor actor;
|
||||
/* 0x144 */ char unk_144[0x98];
|
||||
/* 0x144 */ UNK_TYPE1 unk_144[0x48];
|
||||
/* 0x18C */ ColliderCylinder collider;
|
||||
/* 0x1D8 */ u16 dustDone;
|
||||
/* 0x1DA */ s16 timer;
|
||||
} EnNimotsu; // size = 0x1DC
|
||||
|
||||
extern const ActorInit En_Nimotsu_InitVars;
|
||||
|
||||
@@ -731,7 +731,7 @@ void func_80AD16A8(EnOsn* this, PlayState* play) {
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, this->unk_1EC);
|
||||
}
|
||||
|
||||
if ((this->unk_1EC == 5) && (play->sceneNum == SCENE_SPOT00) && (gSaveContext.sceneSetupIndex == 0xB) &&
|
||||
if ((this->unk_1EC == 5) && (play->sceneId == SCENE_SPOT00) && (gSaveContext.sceneSetupIndex == 0xB) &&
|
||||
(play->csCtx.frames == 400)) {
|
||||
Actor_PlaySfxAtPos(&this->actor, NA_SE_VO_OMVO00);
|
||||
}
|
||||
@@ -795,7 +795,7 @@ void EnOsn_Init(Actor* thisx, PlayState* play) {
|
||||
this->unk_1EA |= 1;
|
||||
}
|
||||
this->unk_1F0 = 1;
|
||||
if (play->sceneNum == SCENE_INSIDETOWER) {
|
||||
if (play->sceneId == SCENE_INSIDETOWER) {
|
||||
if ((gSaveContext.save.entrance == ENTRANCE(CLOCK_TOWER_INTERIOR, 2)) ||
|
||||
(gSaveContext.save.entrance == ENTRANCE(CLOCK_TOWER_INTERIOR, 6))) {
|
||||
this->actionFunc = func_80AD16A8;
|
||||
|
||||
@@ -302,7 +302,7 @@ void EnOssan_EndInteraction(PlayState* play, EnOssan* this) {
|
||||
Actor_ProcessTalkRequest(&this->actor, &play->state);
|
||||
play->msgCtx.msgMode = 0x43;
|
||||
play->msgCtx.stateTimer = 4;
|
||||
Interface_ChangeAlpha(50);
|
||||
Interface_SetHudVisibility(HUD_VISIBILITY_ALL);
|
||||
this->drawCursor = 0;
|
||||
this->stickLeftPrompt.isEnabled = false;
|
||||
this->stickRightPrompt.isEnabled = false;
|
||||
@@ -985,7 +985,7 @@ void EnOssan_SetupBuyItemWithFanfare(PlayState* play, EnOssan* this) {
|
||||
play->msgCtx.msgMode = 0x43;
|
||||
play->msgCtx.stateTimer = 4;
|
||||
player->stateFlags2 &= ~0x20000000;
|
||||
Interface_ChangeAlpha(50);
|
||||
Interface_SetHudVisibility(HUD_VISIBILITY_ALL);
|
||||
this->drawCursor = 0;
|
||||
EnOssan_SetupAction(this, EnOssan_BuyItemWithFanfare);
|
||||
}
|
||||
|
||||
@@ -190,7 +190,7 @@ void EnPametfrog_Init(Actor* thisx, PlayState* play) {
|
||||
GEKKO_LIMB_MAX);
|
||||
Collider_InitAndSetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colElement);
|
||||
this->params = CLAMP(this->actor.params, 1, 4);
|
||||
if (Flags_GetClear(play, play->roomCtx.currRoom.num)) {
|
||||
if (Flags_GetClear(play, play->roomCtx.curRoom.num)) {
|
||||
Actor_MarkForDeath(&this->actor);
|
||||
if (!(gSaveContext.save.weekEventReg[isFrogReturnedFlags[this->actor.params - 1] >> 8] &
|
||||
(u8)isFrogReturnedFlags[this->actor.params - 1])) {
|
||||
@@ -963,7 +963,7 @@ void EnPametfrog_SetupSpawnFrog(EnPametfrog* this, PlayState* play) {
|
||||
this->collider.base.ocFlags1 &= ~OC1_ON;
|
||||
func_800B0DE0(play, &vec1, &gZeroVec3f, &gZeroVec3f, &primColor, &envColor, 800, 50);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 40, NA_SE_EN_NPC_APPEAR);
|
||||
Flags_SetClearTemp(play, play->roomCtx.currRoom.num);
|
||||
Flags_SetClearTemp(play, play->roomCtx.curRoom.num);
|
||||
|
||||
for (i = 0; i < 25; i++) {
|
||||
vel.x = randPlusMinusPoint5Scaled(5.0f);
|
||||
|
||||
@@ -1017,7 +1017,7 @@ s32 func_80AF86F0(EnPm* this, PlayState* play) {
|
||||
s32 func_80AF87C4(EnPm* this, PlayState* play) {
|
||||
s32 ret = false;
|
||||
|
||||
if ((play->csCtx.state != 0) && (play->sceneNum == SCENE_00KEIKOKU) && (gSaveContext.sceneSetupIndex == 9) &&
|
||||
if ((play->csCtx.state != 0) && (play->sceneId == SCENE_00KEIKOKU) && (gSaveContext.sceneSetupIndex == 9) &&
|
||||
(play->curSpawn == 1)) {
|
||||
if (!this->unk_380) {
|
||||
func_80AF7E98(this, 0);
|
||||
|
||||
@@ -1539,10 +1539,10 @@ void EnPp_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot,
|
||||
(limbIndex == HIPLOOP_LIMB_CENTER_WING_BASE) || (limbIndex == HIPLOOP_LIMB_CENTER_WING_MIDDLE) ||
|
||||
(limbIndex == HIPLOOP_LIMB_BACK_LEFT_LOWER_LEG) || (limbIndex == HIPLOOP_LIMB_RIGHT_EYE) ||
|
||||
(limbIndex == HIPLOOP_LIMB_LEFT_EYE)) {
|
||||
Matrix_MultZero(&this->bodyPartsPos[this->bodyPartsPosCount]);
|
||||
this->bodyPartsPosCount++;
|
||||
if (this->bodyPartsPosCount >= ARRAY_COUNT(this->bodyPartsPos)) {
|
||||
this->bodyPartsPosCount = 0;
|
||||
Matrix_MultZero(&this->bodyPartsPos[this->bodyPartsPosIndex]);
|
||||
this->bodyPartsPosIndex++;
|
||||
if (this->bodyPartsPosIndex >= ARRAY_COUNT(this->bodyPartsPos)) {
|
||||
this->bodyPartsPosIndex = 0;
|
||||
}
|
||||
|
||||
if ((this->action == EN_PP_ACTION_SPAWN_BODY_PARTS) && (this->deadBodyPartsSpawnedCount < 6) &&
|
||||
|
||||
@@ -67,7 +67,7 @@ typedef struct EnPp {
|
||||
/* 0x400 */ f32 attackRange;
|
||||
/* 0x404 */ s32 hasBeenDamaged;
|
||||
/* 0x408 */ Vec3f bodyPartsPos[11];
|
||||
/* 0x48C */ s16 bodyPartsPosCount;
|
||||
/* 0x48C */ s16 bodyPartsPosIndex;
|
||||
/* 0x490 */ f32 maskAccelY;
|
||||
/* 0x494 */ ColliderJntSph maskCollider;
|
||||
/* 0x4B4 */ ColliderJntSphElement maskColliderElements[1];
|
||||
|
||||
@@ -296,7 +296,7 @@ void EnRailSkb_Init(Actor* thisx, PlayState* play) {
|
||||
this->unk_3F8 = 0;
|
||||
}
|
||||
|
||||
if ((play->sceneNum == SCENE_BOTI) && (gSaveContext.sceneSetupIndex == 1) && (play->csCtx.currentCsIndex == 0)) {
|
||||
if ((play->sceneId == SCENE_BOTI) && (gSaveContext.sceneSetupIndex == 1) && (play->csCtx.currentCsIndex == 0)) {
|
||||
this->actor.flags |= ACTOR_FLAG_100000;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,9 +15,8 @@ void EnRu_Destroy(Actor* thisx, PlayState* play);
|
||||
void EnRu_Update(Actor* thisx, PlayState* play);
|
||||
void EnRu_Draw(Actor* thisx, PlayState* play);
|
||||
|
||||
void func_80A38DF4(EnRu* this, PlayState* play);
|
||||
void EnRu_DoNothing(EnRu* this, PlayState* play);
|
||||
|
||||
#if 0
|
||||
const ActorInit En_Ru_InitVars = {
|
||||
ACTOR_EN_RU,
|
||||
ACTORCAT_NPC,
|
||||
@@ -30,18 +29,29 @@ const ActorInit En_Ru_InitVars = {
|
||||
(ActorFunc)EnRu_Draw,
|
||||
};
|
||||
|
||||
// static ColliderCylinderInit sCylinderInit = {
|
||||
static ColliderCylinderInit D_80A39450 = {
|
||||
{ COLTYPE_HIT0, AT_NONE, AC_ON | AC_TYPE_PLAYER, OC1_ON | OC1_TYPE_ALL, OC2_TYPE_1, COLSHAPE_CYLINDER, },
|
||||
{ ELEMTYPE_UNK1, { 0x00000000, 0x00, 0x00 }, { 0xF7CFFFFF, 0x00, 0x00 }, TOUCH_NONE | TOUCH_SFX_NORMAL, BUMP_ON, OCELEM_ON, },
|
||||
static ColliderCylinderInit sCylinderInit = {
|
||||
{
|
||||
COLTYPE_HIT0,
|
||||
AT_NONE,
|
||||
AC_ON | AC_TYPE_PLAYER,
|
||||
OC1_ON | OC1_TYPE_ALL,
|
||||
OC2_TYPE_1,
|
||||
COLSHAPE_CYLINDER,
|
||||
},
|
||||
{
|
||||
ELEMTYPE_UNK1,
|
||||
{ 0x00000000, 0x00, 0x00 },
|
||||
{ 0xF7CFFFFF, 0x00, 0x00 },
|
||||
TOUCH_NONE | TOUCH_SFX_NORMAL,
|
||||
BUMP_ON,
|
||||
OCELEM_ON,
|
||||
},
|
||||
{ 18, 64, 0, { 0, 0, 0 } },
|
||||
};
|
||||
|
||||
// sColChkInfoInit
|
||||
static CollisionCheckInfoInit2 D_80A3947C = { 0, 0, 0, 0, MASS_IMMOVABLE };
|
||||
static CollisionCheckInfoInit2 sColChkInfoInit = { 0, 0, 0, 0, MASS_IMMOVABLE };
|
||||
|
||||
// static DamageTable sDamageTable = {
|
||||
static DamageTable D_80A39488 = {
|
||||
static DamageTable sDamageTable = {
|
||||
/* Deku Nut */ DMG_ENTRY(0, 0x0),
|
||||
/* Deku Stick */ DMG_ENTRY(0, 0x0),
|
||||
/* Horse trample */ DMG_ENTRY(0, 0x0),
|
||||
@@ -76,34 +86,268 @@ static DamageTable D_80A39488 = {
|
||||
/* Powder Keg */ DMG_ENTRY(0, 0x0),
|
||||
};
|
||||
|
||||
#endif
|
||||
static AnimationInfoS sAnimationInfo[] = {
|
||||
{ &gAdultRutoIdleAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &gAdultRutoIdleAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &gAdultRutoRaisingArmsUpAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &gAdultRutoCrossingArmsAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &gAdultRutoLookingDownLeftAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &gAdultRutoIdleHandsOnHipsAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &gAdultRutoHeadTurnDownLeftAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &gAdultRutoSwimmingUpAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
};
|
||||
|
||||
extern ColliderCylinderInit D_80A39450;
|
||||
extern CollisionCheckInfoInit2 D_80A3947C;
|
||||
extern DamageTable D_80A39488;
|
||||
// in PostLimbdraw, converts limbIndex to bodyPartsPos index
|
||||
static s8 sBodyPartPosIndices[] = {
|
||||
-1, -1, 12, 13, 14, -1, 9, 10, 11, -1, 0, 6, -1, -1, 7, 8, 2, -1, -1, 3, 4, 2, 1,
|
||||
};
|
||||
|
||||
extern UNK_TYPE D_0600C700;
|
||||
static s8 sRuBodyParts[RU_BODYPARTSPOS_COUNT] = {
|
||||
0, 0, 0, 0, 3, 4, 0, 6, 7, 0, 9, 10, 0, 12, 13,
|
||||
};
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Ru/func_80A389A0.s")
|
||||
static u8 sRuShadowSizes[] = {
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
};
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Ru/func_80A38A68.s")
|
||||
static TrackOptionsSet sTrackOptions = {
|
||||
{ 0xFA0, 4, 1, 3 }, { 0x1770, 4, 1, 6 }, { 0xFA0, 4, 1, 3 }, { 0x1770, 4, 1, 6 }
|
||||
};
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Ru/func_80A38B7C.s")
|
||||
s32 EnRu_ChangeAnim(SkelAnime* skelAnime, s16 animIndex) {
|
||||
s16 lastFrame;
|
||||
s32 ret = false;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Ru/func_80A38BF0.s")
|
||||
if ((animIndex >= 0) && (animIndex < ARRAY_COUNT(sAnimationInfo))) {
|
||||
lastFrame = sAnimationInfo[animIndex].frameCount;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Ru/func_80A38C70.s")
|
||||
ret = true;
|
||||
if (lastFrame < 0) {
|
||||
lastFrame = Animation_GetLastFrame(sAnimationInfo[animIndex].animation);
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Ru/func_80A38DF4.s")
|
||||
Animation_Change(skelAnime, sAnimationInfo[animIndex].animation, sAnimationInfo[animIndex].playSpeed,
|
||||
sAnimationInfo[animIndex].startFrame, lastFrame, sAnimationInfo[animIndex].mode,
|
||||
sAnimationInfo[animIndex].morphFrames);
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Ru/EnRu_Init.s")
|
||||
return ret;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Ru/EnRu_Destroy.s")
|
||||
// En_Zo has a copy of this function
|
||||
s32 EnRu_PlayWalkingSound(EnRu* this, PlayState* play) {
|
||||
u8 leftWasGrounded;
|
||||
u8 rightWasGrounded;
|
||||
s32 waterSfxId;
|
||||
s16 sfxId;
|
||||
u8 isFootGrounded;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Ru/EnRu_Update.s")
|
||||
leftWasGrounded = this->isLeftFootGrounded;
|
||||
rightWasGrounded = this->isRightFootGrounded;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Ru/func_80A38FB4.s")
|
||||
if (this->actor.bgCheckFlags & 0x20) {
|
||||
if (this->actor.depthInWater < 20.0f) {
|
||||
waterSfxId = NA_SE_PL_WALK_WATER0 - SFX_FLAG;
|
||||
} else {
|
||||
waterSfxId = NA_SE_PL_WALK_WATER1 - SFX_FLAG;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Ru/func_80A390F8.s")
|
||||
sfxId = waterSfxId + SFX_FLAG;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Ru/EnRu_Draw.s")
|
||||
} else {
|
||||
sfxId = SurfaceType_GetSfx(&play->colCtx, this->actor.floorPoly, this->actor.floorBgId) + SFX_FLAG;
|
||||
}
|
||||
|
||||
this->isLeftFootGrounded = isFootGrounded = SubS_IsFloorAbove(play, &this->leftFootPos, -6.0f);
|
||||
|
||||
if (this->isLeftFootGrounded && !leftWasGrounded && isFootGrounded) {
|
||||
Actor_PlaySfxAtPos(&this->actor, sfxId);
|
||||
}
|
||||
|
||||
this->isRightFootGrounded = isFootGrounded = SubS_IsFloorAbove(play, &this->rightFootPos, -6.0f);
|
||||
if (this->isRightFootGrounded && !rightWasGrounded && isFootGrounded) {
|
||||
Actor_PlaySfxAtPos(&this->actor, sfxId);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// This function is only ever called with eyeStateMax == 3
|
||||
void EnRu_UpdateEyes(EnRu* this, s32 eyeStateMax) {
|
||||
if (DECR(this->blinkTimer) == 0) {
|
||||
this->eyeState++;
|
||||
if (this->eyeState >= eyeStateMax) {
|
||||
this->eyeState = 0;
|
||||
this->blinkTimer = Rand_S16Offset(30, 30);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void EnRu_UpdateCollider(EnRu* this, PlayState* play) {
|
||||
this->collider.dim.pos.x = this->actor.world.pos.x;
|
||||
this->collider.dim.pos.y = this->actor.world.pos.y;
|
||||
this->collider.dim.pos.z = this->actor.world.pos.z;
|
||||
CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base);
|
||||
CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base);
|
||||
}
|
||||
|
||||
void EnRu_UpdateModel(EnRu* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
|
||||
// Head and Torso tracking to Player if in front of Ru.
|
||||
if (SubS_AngleDiffLessEqual(this->actor.shape.rot.y, 0x2710, this->actor.yawTowardsPlayer)) {
|
||||
Vec3f playerPos;
|
||||
|
||||
playerPos.x = player->actor.world.pos.x;
|
||||
playerPos.y = player->bodyPartsPos[7].y + 3.0f;
|
||||
playerPos.z = player->actor.world.pos.z;
|
||||
SubS_TrackPoint(&playerPos, &this->actor.focus.pos, &this->actor.shape.rot, &this->trackTarget, &this->headRot,
|
||||
&this->torsoRot, &sTrackOptions);
|
||||
|
||||
} else { // smooth her back to facing forward
|
||||
Math_SmoothStepToS(&this->trackTarget.x, 0, 4, 0x3E8, 1);
|
||||
Math_SmoothStepToS(&this->trackTarget.y, 0, 4, 0x3E8, 1);
|
||||
Math_SmoothStepToS(&this->headRot.x, 0, 4, 0x3E8, 1);
|
||||
Math_SmoothStepToS(&this->headRot.y, 0, 4, 0x3E8, 1);
|
||||
Math_SmoothStepToS(&this->torsoRot.x, 0, 4, 0x3E8, 1);
|
||||
Math_SmoothStepToS(&this->torsoRot.y, 0, 4, 0x3E8, 1);
|
||||
}
|
||||
|
||||
EnRu_UpdateEyes(this, 3);
|
||||
EnRu_PlayWalkingSound(this, play);
|
||||
SubS_FillLimbRotTables(play, this->limbRotTableY, this->limbRotTableZ, RU2_LIMB_MAX);
|
||||
}
|
||||
|
||||
void EnRu_DoNothing(EnRu* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void EnRu_Init(Actor* thisx, PlayState* play) {
|
||||
s32 pad;
|
||||
EnRu* this = THIS;
|
||||
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, NULL, 0.0f);
|
||||
SkelAnime_InitFlex(play, &this->skelAnime, &gAdultRutoSkel, NULL, this->jointTable, this->morphTable, RU2_LIMB_MAX);
|
||||
EnRu_ChangeAnim(&this->skelAnime, 0);
|
||||
Collider_InitCylinder(play, &this->collider);
|
||||
Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
|
||||
CollisionCheck_SetInfo2(&this->actor.colChkInfo, &sDamageTable, &sColChkInfoInit);
|
||||
|
||||
this->path = SubS_GetPathByIndex(play, RU_GET_PATH(thisx), 0x3F);
|
||||
Actor_SetScale(&this->actor, 0.01f);
|
||||
this->actionFunc = EnRu_DoNothing;
|
||||
this->actor.gravity = -4.0f;
|
||||
}
|
||||
|
||||
void EnRu_Destroy(Actor* thisx, PlayState* play) {
|
||||
EnRu* this = THIS;
|
||||
|
||||
Collider_DestroyCylinder(play, &this->collider);
|
||||
}
|
||||
|
||||
void EnRu_Update(Actor* thisx, PlayState* play) {
|
||||
EnRu* this = THIS;
|
||||
|
||||
this->actionFunc(this, play);
|
||||
Actor_UpdateBgCheckInfo(play, &this->actor, 0.0f, 0.0f, 0.0f, 4);
|
||||
EnRu_UpdateModel(this, play);
|
||||
EnRu_UpdateCollider(this, play);
|
||||
}
|
||||
|
||||
s32 EnRu_OverrideLimbdraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx,
|
||||
Gfx** gfx) {
|
||||
EnRu* this = THIS;
|
||||
|
||||
if (limbIndex == RU2_LIMB_HEAD) {
|
||||
Matrix_Translate(1500.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_RotateXS(this->headRot.y, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(this->headRot.x, MTXMODE_APPLY);
|
||||
Matrix_Translate(-1500.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
if (limbIndex == RU2_LIMB_TORSO) {
|
||||
Matrix_RotateYS(this->torsoRot.y, MTXMODE_APPLY);
|
||||
Matrix_RotateXS(this->torsoRot.x, MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
if ((limbIndex == RU2_LIMB_TORSO) || (limbIndex == RU2_LIMB_LEFT_UPPER_ARM) ||
|
||||
(limbIndex == RU2_LIMB_RIGHT_UPPER_ARM)) {
|
||||
rot->y += (s16)(Math_SinS(this->limbRotTableY[limbIndex]) * 200.0f);
|
||||
rot->z += (s16)(Math_CosS(this->limbRotTableZ[limbIndex]) * 200.0f);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void EnRu_PostLimbdraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx, Gfx** gfx) {
|
||||
EnRu* this = THIS;
|
||||
Vec3f headFocus = { 800.0f, 0, 0 };
|
||||
Vec3f bodyPartPos = { 0, 0, 0 };
|
||||
|
||||
if (sBodyPartPosIndices[limbIndex] >= 0) {
|
||||
Matrix_MultVec3f(&bodyPartPos, &this->bodyPartsPos[sBodyPartPosIndices[limbIndex]]);
|
||||
}
|
||||
if (limbIndex == RU2_LIMB_HEAD) {
|
||||
Matrix_MultVec3f(&headFocus, &thisx->focus.pos);
|
||||
}
|
||||
|
||||
if (limbIndex == RU2_LIMB_LEFT_FOOT) {
|
||||
Matrix_MultVec3f(&bodyPartPos, &this->leftFootPos);
|
||||
}
|
||||
if (limbIndex == RU2_LIMB_RIGHT_FOOT) {
|
||||
Matrix_MultVec3f(&bodyPartPos, &this->rightFootPos);
|
||||
}
|
||||
}
|
||||
|
||||
// This is a copy of displaylist found in En_Zo
|
||||
static Gfx sTransparencyDlist[] = {
|
||||
gsDPSetRenderMode(AA_EN | Z_CMP | Z_UPD | IM_RD | CLR_ON_CVG | CVG_DST_WRAP | ZMODE_XLU | FORCE_BL |
|
||||
G_RM_FOG_SHADE_A,
|
||||
AA_EN | Z_CMP | Z_UPD | IM_RD | CLR_ON_CVG | CVG_DST_WRAP | ZMODE_XLU | FORCE_BL |
|
||||
GBL_c2(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA)),
|
||||
gsDPSetAlphaCompare(G_AC_THRESHOLD),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
void EnRu_Draw(Actor* thisx, PlayState* play) {
|
||||
EnRu* this = THIS;
|
||||
u8* shadowTex = GRAPH_ALLOC(play->state.gfxCtx, SUBS_SHADOW_TEX_SIZE);
|
||||
u8* shadowTexIter;
|
||||
s32 i;
|
||||
TexturePtr eyeTextures[] = { gAdultRutoEyeOpenTex, gAdultRutoEyeHalfTex, gAdultRutoEyeClosedTex };
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
func_8012C28C(play->state.gfxCtx);
|
||||
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 255);
|
||||
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(eyeTextures[this->eyeState]));
|
||||
|
||||
// only runs the last command of the display list, which is gsSPEndDisplayList
|
||||
gSPSegment(POLY_OPA_DISP++, 0x0C, &sTransparencyDlist[2]);
|
||||
|
||||
POLY_OPA_DISP =
|
||||
SkelAnime_DrawFlex(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
|
||||
EnRu_OverrideLimbdraw, EnRu_PostLimbdraw, &this->actor, POLY_OPA_DISP);
|
||||
|
||||
Matrix_RotateXS(0, MTXMODE_NEW);
|
||||
|
||||
for (i = 0, shadowTexIter = shadowTex; i < SUBS_SHADOW_TEX_SIZE; i++) {
|
||||
*shadowTexIter++ = 0;
|
||||
}
|
||||
|
||||
for (i = 0; i < 5; i++) {
|
||||
SubS_GenShadowTex(&this->bodyPartsPos[0], &this->actor.world.pos, shadowTex, (i / 5.0f),
|
||||
(ARRAY_COUNT(sRuBodyParts)), sRuShadowSizes, sRuBodyParts);
|
||||
}
|
||||
|
||||
SubS_DrawShadowTex(&this->actor, &play->state, shadowTex);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
||||
@@ -2,15 +2,40 @@
|
||||
#define Z_EN_RU_H
|
||||
|
||||
#include "global.h"
|
||||
#include "objects/object_ru2/object_ru2.h"
|
||||
|
||||
#define RU_GET_PATH(thisx) ((thisx->params & 0x7E00) >> 9)
|
||||
|
||||
struct EnRu;
|
||||
|
||||
typedef void (*EnRuActionFunc)(struct EnRu*, PlayState*);
|
||||
|
||||
#define RU_BODYPARTSPOS_COUNT 15
|
||||
|
||||
typedef struct EnRu {
|
||||
/* 0x000 */ Actor actor;
|
||||
/* 0x144 */ EnRuActionFunc actionFunc;
|
||||
/* 0x148 */ char unk_148[0x30C];
|
||||
/* 0x148 */ SkelAnime skelAnime;
|
||||
/* 0x18C */ ColliderCylinder collider;
|
||||
/* 0x1D8 */ UNK_TYPE1 pad1D8[0x4];
|
||||
/* 0x1DC */ Path* path; // path is prepared in EnRu_Init, but unused after
|
||||
/* 0x1E0 */ UNK_TYPE1 pad1E0[0x4];
|
||||
/* 0x1E4 */ Vec3f leftFootPos;
|
||||
/* 0x1F0 */ Vec3f rightFootPos;
|
||||
/* 0x1FC */ u8 isLeftFootGrounded;
|
||||
/* 0x1FD */ u8 isRightFootGrounded;
|
||||
/* 0x1FE */ Vec3s jointTable[RU2_LIMB_MAX];
|
||||
/* 0x288 */ Vec3s morphTable[RU2_LIMB_MAX];
|
||||
/* 0x312 */ Vec3s trackTarget;
|
||||
/* 0x318 */ Vec3s headRot;
|
||||
/* 0x31E */ Vec3s torsoRot;
|
||||
/* 0x324 */ UNK_TYPE1 pad324[0x12];
|
||||
/* 0x336 */ s16 limbRotTableY[RU2_LIMB_MAX];
|
||||
/* 0x364 */ s16 limbRotTableZ[RU2_LIMB_MAX];
|
||||
/* 0x394 */ Vec3f bodyPartsPos[RU_BODYPARTSPOS_COUNT];
|
||||
/* 0x348 */ UNK_TYPE1 padUNK[6];
|
||||
/* 0x44E */ s16 eyeState;
|
||||
/* 0x450 */ s16 blinkTimer;
|
||||
} EnRu; // size = 0x454
|
||||
|
||||
extern const ActorInit En_Ru_InitVars;
|
||||
|
||||
@@ -230,7 +230,7 @@ void EnSkb_Init(Actor* thisx, PlayState* play) {
|
||||
this->unk_3D6 = ENSKB_GET_F0(&this->actor);
|
||||
this->actor.floorHeight = this->actor.world.pos.y;
|
||||
|
||||
if ((play->sceneNum == SCENE_BOTI) && (gSaveContext.sceneSetupIndex == 1) && (play->csCtx.currentCsIndex == 0)) {
|
||||
if ((play->sceneId == SCENE_BOTI) && (gSaveContext.sceneSetupIndex == 1) && (play->csCtx.currentCsIndex == 0)) {
|
||||
this->actor.flags |= ACTOR_FLAG_100000;
|
||||
}
|
||||
|
||||
|
||||
@@ -442,7 +442,7 @@ void EnSob1_EndInteraction(PlayState* play, EnSob1* this) {
|
||||
Actor_ProcessTalkRequest(&this->actor, &play->state);
|
||||
play->msgCtx.msgMode = 0x43;
|
||||
play->msgCtx.stateTimer = 4;
|
||||
Interface_ChangeAlpha(50);
|
||||
Interface_SetHudVisibility(HUD_VISIBILITY_ALL);
|
||||
this->drawCursor = 0;
|
||||
this->stickLeftPrompt.isEnabled = false;
|
||||
this->stickRightPrompt.isEnabled = false;
|
||||
@@ -933,7 +933,7 @@ void EnSob1_SetupBuyItemWithFanfare(PlayState* play, EnSob1* this) {
|
||||
play->msgCtx.msgMode = 0x43;
|
||||
play->msgCtx.stateTimer = 4;
|
||||
player->stateFlags2 &= ~0x20000000;
|
||||
Interface_ChangeAlpha(50);
|
||||
Interface_SetHudVisibility(HUD_VISIBILITY_ALL);
|
||||
this->drawCursor = 0;
|
||||
EnSob1_SetupAction(this, EnSob1_BuyItemWithFanfare);
|
||||
}
|
||||
|
||||
@@ -654,7 +654,7 @@ void EnSsh_Init(Actor* thisx, PlayState* play) {
|
||||
this->actor.gravity = 0.0f;
|
||||
this->initialYaw = this->actor.world.rot.y;
|
||||
EnSsh_SetupAction(this, EnSsh_Start);
|
||||
if (Inventory_GetSkullTokenCount(play->sceneNum) >= 30) {
|
||||
if (Inventory_GetSkullTokenCount(play->sceneId) >= 30) {
|
||||
Actor_MarkForDeath(&this->actor);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ void EnSth_Init(Actor* thisx, PlayState* play) {
|
||||
break;
|
||||
|
||||
case ENSTH_F_2:
|
||||
if (Inventory_GetSkullTokenCount(play->sceneNum) >= 30) {
|
||||
if (Inventory_GetSkullTokenCount(play->sceneId) >= 30) {
|
||||
this->actionFunc = func_80B67DA0;
|
||||
} else {
|
||||
Actor_MarkForDeath(&this->actor);
|
||||
@@ -148,7 +148,7 @@ void EnSth_Init(Actor* thisx, PlayState* play) {
|
||||
break;
|
||||
|
||||
case ENSTH_F_5:
|
||||
if (!(gSaveContext.save.weekEventReg[13] & 0x20) || (Inventory_GetSkullTokenCount(play->sceneNum) < 30)) {
|
||||
if (!(gSaveContext.save.weekEventReg[13] & 0x20) || (Inventory_GetSkullTokenCount(play->sceneId) < 30)) {
|
||||
Actor_MarkForDeath(&this->actor);
|
||||
return;
|
||||
}
|
||||
@@ -446,7 +446,7 @@ void func_80B67984(EnSth* this, PlayState* play) {
|
||||
sp1E = 0x918;
|
||||
}
|
||||
func_80B670A4(this, 2);
|
||||
} else if (Inventory_GetSkullTokenCount(play->sceneNum) >= 30) {
|
||||
} else if (Inventory_GetSkullTokenCount(play->sceneId) >= 30) {
|
||||
if (INV_CONTENT(ITEM_MASK_TRUTH) == ITEM_MASK_TRUTH) {
|
||||
this->unk_29C |= 4;
|
||||
sp1E = 0x919;
|
||||
@@ -559,7 +559,7 @@ void func_80B67DA0(EnSth* this, PlayState* play) {
|
||||
void func_80B67E20(Actor* thisx, PlayState* play) {
|
||||
EnSth* this = THIS;
|
||||
|
||||
if (Inventory_GetSkullTokenCount(play->sceneNum) >= 30) {
|
||||
if (Inventory_GetSkullTokenCount(play->sceneId) >= 30) {
|
||||
this->actor.update = func_80B680A8;
|
||||
this->actor.draw = func_80B6849C;
|
||||
this->actor.flags |= ACTOR_FLAG_1;
|
||||
@@ -580,7 +580,7 @@ void EnSth_Update(Actor* thisx, PlayState* play) {
|
||||
Animation_PlayLoop(&this->skelAnime, &ovl_En_Sth_Anim_0045B4);
|
||||
this->unk_29A = 1;
|
||||
if ((gSaveContext.save.weekEventReg[34] & 0x10) || (gSaveContext.save.weekEventReg[34] & 0x20) ||
|
||||
(gSaveContext.save.weekEventReg[34] & 0x40) || (Inventory_GetSkullTokenCount(play->sceneNum) >= 30)) {
|
||||
(gSaveContext.save.weekEventReg[34] & 0x40) || (Inventory_GetSkullTokenCount(play->sceneId) >= 30)) {
|
||||
func_80B670A4(this, 3);
|
||||
}
|
||||
} else {
|
||||
@@ -610,7 +610,7 @@ void EnSth_Update(Actor* thisx, PlayState* play) {
|
||||
break;
|
||||
}
|
||||
|
||||
if ((ENSTH_GET_F(&this->actor) == ENSTH_F_4) && (Inventory_GetSkullTokenCount(play->sceneNum) < 30)) {
|
||||
if ((ENSTH_GET_F(&this->actor) == ENSTH_F_4) && (Inventory_GetSkullTokenCount(play->sceneId) < 30)) {
|
||||
this->actor.update = func_80B67E20;
|
||||
this->actor.draw = NULL;
|
||||
this->actor.flags &= ~ACTOR_FLAG_1;
|
||||
|
||||
@@ -942,7 +942,7 @@ void func_80BAC6E8(EnSuttari* this, PlayState* play) {
|
||||
this->morphTable, 16);
|
||||
this->actor.draw = EnSuttari_Draw;
|
||||
this->actor.flags |= ACTOR_FLAG_1;
|
||||
if (play->sceneNum == SCENE_IKANA) {
|
||||
if (play->sceneId == SCENE_IKANA) {
|
||||
this->flags1 |= 1;
|
||||
if (gSaveContext.save.day == 1 || gSaveContext.save.day == 2) {
|
||||
this->animIndex = 2;
|
||||
@@ -958,7 +958,7 @@ void func_80BAC6E8(EnSuttari* this, PlayState* play) {
|
||||
this->actionFunc = func_80BACEE0;
|
||||
return;
|
||||
}
|
||||
} else if (play->sceneNum == SCENE_BACKTOWN) {
|
||||
} else if (play->sceneId == SCENE_BACKTOWN) {
|
||||
if (gSaveContext.save.time >= CLOCK_TIME(0, 20) && gSaveContext.save.time < CLOCK_TIME(6, 00)) {
|
||||
Actor_MarkForDeath(&this->actor);
|
||||
}
|
||||
@@ -974,7 +974,7 @@ void func_80BAC6E8(EnSuttari* this, PlayState* play) {
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, this->animIndex);
|
||||
this->actionFunc = func_80BAD004;
|
||||
return;
|
||||
} else if (play->sceneNum == SCENE_ICHIBA) {
|
||||
} else if (play->sceneId == SCENE_ICHIBA) {
|
||||
if (gSaveContext.save.weekEventReg[33] & 8) {
|
||||
Actor_MarkForDeath(&this->actor);
|
||||
return;
|
||||
@@ -984,7 +984,7 @@ void func_80BAC6E8(EnSuttari* this, PlayState* play) {
|
||||
this->flags1 |= 2;
|
||||
this->actionFunc = func_80BAD5F8;
|
||||
return;
|
||||
} else if (play->sceneNum == SCENE_AYASHIISHOP) {
|
||||
} else if (play->sceneId == SCENE_AYASHIISHOP) {
|
||||
if (gSaveContext.save.weekEventReg[33] & 8) {
|
||||
Actor_MarkForDeath(&this->actor);
|
||||
return;
|
||||
@@ -1461,7 +1461,7 @@ void EnSuttari_Init(Actor* thisx, PlayState* play) {
|
||||
void EnSuttari_Destroy(Actor* thisx, PlayState* play) {
|
||||
EnSuttari* this = THIS;
|
||||
|
||||
if ((play->sceneNum == SCENE_BACKTOWN) && !(this->flags2 & 4)) {
|
||||
if ((play->sceneId == SCENE_BACKTOWN) && !(this->flags2 & 4)) {
|
||||
Audio_QueueSeqCmd(0x101400FF);
|
||||
}
|
||||
Collider_DestroyCylinder(play, &this->collider);
|
||||
@@ -1542,7 +1542,7 @@ void EnSuttari_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s*
|
||||
} else {
|
||||
func_8012C28C(play->state.gfxCtx);
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
gSPDisplayList(POLY_OPA_DISP++, object_boj_DL_013380);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gBombShopBagDL);
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
|
||||
#include "z_en_syateki_crow.h"
|
||||
#include "overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.h"
|
||||
#include "objects/object_crow/object_crow.h"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20 | ACTOR_FLAG_8000000)
|
||||
|
||||
@@ -17,14 +16,14 @@ void EnSyatekiCrow_Destroy(Actor* thisx, PlayState* play);
|
||||
void EnSyatekiCrow_Update(Actor* thisx, PlayState* play);
|
||||
void EnSyatekiCrow_Draw(Actor* thisx, PlayState* play);
|
||||
|
||||
void func_809CA5D4(EnSyatekiCrow* this);
|
||||
void func_809CA67C(EnSyatekiCrow* this, PlayState* play);
|
||||
void func_809CA71C(EnSyatekiCrow* this);
|
||||
void func_809CA840(EnSyatekiCrow* this, PlayState* play);
|
||||
void func_809CA8E4(EnSyatekiCrow* this, PlayState* play);
|
||||
void func_809CABC0(EnSyatekiCrow* this, PlayState* play);
|
||||
void EnSyatekiCrow_SetupWaitForSpawn(EnSyatekiCrow* this);
|
||||
void EnSyatekiCrow_WaitForSpawn(EnSyatekiCrow* this, PlayState* play);
|
||||
void EnSyatekiCrow_SetupWaitToMove(EnSyatekiCrow* this);
|
||||
void EnSyatekiCrow_WaitToMove(EnSyatekiCrow* this, PlayState* play);
|
||||
void EnSyatekiCrow_Fly(EnSyatekiCrow* this, PlayState* play);
|
||||
void EnSyatekiCrow_Dead(EnSyatekiCrow* this, PlayState* play);
|
||||
|
||||
static Vec3f D_809CB050 = { 0.0f, 0.0f, 0.0f };
|
||||
static Vec3f sZeroVec = { 0.0f, 0.0f, 0.0f };
|
||||
|
||||
const ActorInit En_Syateki_Crow_InitVars = {
|
||||
ACTOR_EN_SYATEKI_CROW,
|
||||
@@ -72,12 +71,6 @@ static InitChainEntry sInitChain[] = {
|
||||
ICHAIN_F32(targetArrowOffset, 2000, ICHAIN_STOP),
|
||||
};
|
||||
|
||||
static Vec3f D_809CB0C0 = { 0.0f, 20.0f, 0.0f };
|
||||
|
||||
static Vec3f D_809CB0CC = { 0.0f, 0.0f, 0.0f };
|
||||
|
||||
static Vec3f D_809CB0D8 = { 2500.0f, 0.0f, 0.0f };
|
||||
|
||||
void EnSyatekiCrow_Init(Actor* thisx, PlayState* play2) {
|
||||
PlayState* play = play2;
|
||||
EnSyatekiCrow* this = THIS;
|
||||
@@ -97,9 +90,9 @@ void EnSyatekiCrow_Init(Actor* thisx, PlayState* play2) {
|
||||
Actor_ProcessInitChain(&this->actor, sInitChain);
|
||||
SkelAnime_InitFlex(play, &this->skelAnime, &gGuaySkel, &gGuayFlyAnim, this->jointTable, this->morphTable,
|
||||
OBJECT_CROW_LIMB_MAX);
|
||||
Collider_InitJntSph(play, &this->unk_23C);
|
||||
Collider_SetJntSph(play, &this->unk_23C, &this->actor, &sJntSphInit, &this->unk_25C);
|
||||
this->unk_23C.elements->dim.worldSphere.radius = sJntSphInit.elements[0].dim.modelSphere.radius;
|
||||
Collider_InitJntSph(play, &this->collider);
|
||||
Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderElements);
|
||||
this->collider.elements[0].dim.worldSphere.radius = sJntSphInit.elements[0].dim.modelSphere.radius;
|
||||
ActorShape_Init(&this->actor.shape, 2000.0f, ActorShadow_DrawCircle, 20.0f);
|
||||
|
||||
if ((path == NULL) || (EN_SYATEKI_CROW_GET_NUMBER(&this->actor) >= 0x80)) {
|
||||
@@ -107,108 +100,110 @@ void EnSyatekiCrow_Init(Actor* thisx, PlayState* play2) {
|
||||
return;
|
||||
}
|
||||
|
||||
this->unk_1C8 = Lib_SegmentedToVirtual(path->points);
|
||||
this->unk_1CC = 1;
|
||||
this->unk_1CE = path->count;
|
||||
this->unk_1C4 = 0x14;
|
||||
this->unk_1BC = 0;
|
||||
func_809CA5D4(this);
|
||||
this->pathPoints = Lib_SegmentedToVirtual(path->points);
|
||||
this->currentPointIndex = 1;
|
||||
this->maxPointIndex = path->count;
|
||||
this->deathTimer = 20;
|
||||
this->waitTimer = 0;
|
||||
EnSyatekiCrow_SetupWaitForSpawn(this);
|
||||
}
|
||||
|
||||
void EnSyatekiCrow_Destroy(Actor* thisx, PlayState* play) {
|
||||
EnSyatekiCrow* this = THIS;
|
||||
|
||||
Collider_DestroyJntSph(play, &this->unk_23C);
|
||||
Collider_DestroyJntSph(play, &this->collider);
|
||||
}
|
||||
|
||||
void func_809CA5D4(EnSyatekiCrow* this) {
|
||||
void EnSyatekiCrow_SetupWaitForSpawn(EnSyatekiCrow* this) {
|
||||
Actor_SetScale(&this->actor, 0.03f);
|
||||
this->actor.speedXZ = 0.0f;
|
||||
this->actor.gravity = 0.0f;
|
||||
this->actor.world = this->actor.home;
|
||||
this->actor.prevPos = this->actor.home.pos;
|
||||
this->actor.shape.rot = this->actor.world.rot;
|
||||
this->unk_1CC = 1;
|
||||
this->currentPointIndex = 1;
|
||||
this->actor.draw = NULL;
|
||||
this->actionFunc = func_809CA67C;
|
||||
this->actionFunc = EnSyatekiCrow_WaitForSpawn;
|
||||
}
|
||||
|
||||
void func_809CA67C(EnSyatekiCrow* this, PlayState* play) {
|
||||
/**
|
||||
* Waits until the shooting gallery man sets the appropriate Guay flag to spawn.
|
||||
*/
|
||||
void EnSyatekiCrow_WaitForSpawn(EnSyatekiCrow* this, PlayState* play) {
|
||||
EnSyatekiMan* syatekiMan = (EnSyatekiMan*)this->actor.parent;
|
||||
|
||||
if ((syatekiMan->shootingGameState == SG_GAME_STATE_RUNNING) && (this->unk_1C2 == 1) &&
|
||||
if ((syatekiMan->shootingGameState == SG_GAME_STATE_RUNNING) && (this->isActive == true) &&
|
||||
(syatekiMan->guayFlags & (1 << EN_SYATEKI_CROW_GET_NUMBER(&this->actor)))) {
|
||||
func_809CA71C(this);
|
||||
EnSyatekiCrow_SetupWaitToMove(this);
|
||||
} else if (syatekiMan->shootingGameState != SG_GAME_STATE_RUNNING) {
|
||||
this->unk_1C2 = 1;
|
||||
this->isActive = true;
|
||||
}
|
||||
|
||||
if ((syatekiMan->guayFlags == 0) && (syatekiMan->guayFlags == 0)) {
|
||||
this->unk_1C2 = 1;
|
||||
this->isActive = true;
|
||||
}
|
||||
}
|
||||
|
||||
void func_809CA71C(EnSyatekiCrow* this) {
|
||||
Vec3f sp24;
|
||||
s16 temp;
|
||||
void EnSyatekiCrow_SetupWaitToMove(EnSyatekiCrow* this) {
|
||||
Vec3f targetPos;
|
||||
|
||||
this->actor.world.pos.x = this->unk_1C8[0].x;
|
||||
this->actor.world.pos.y = this->unk_1C8[0].y;
|
||||
this->actor.world.pos.z = this->unk_1C8[0].z;
|
||||
sp24.x = this->unk_1C8[this->unk_1CC].x;
|
||||
sp24.y = this->unk_1C8[this->unk_1CC].y;
|
||||
sp24.z = this->unk_1C8[this->unk_1CC].z;
|
||||
temp = Math_Vec3f_Yaw(&this->actor.world.pos, &sp24);
|
||||
this->actor.world.rot.y = temp;
|
||||
this->actor.shape.rot.y = temp;
|
||||
temp = Math_Vec3f_Pitch(&this->actor.world.pos, &sp24);
|
||||
this->actor.shape.rot.x = temp;
|
||||
this->actor.world.rot.x = temp;
|
||||
this->actor.world.pos.x = this->pathPoints[0].x;
|
||||
this->actor.world.pos.y = this->pathPoints[0].y;
|
||||
this->actor.world.pos.z = this->pathPoints[0].z;
|
||||
targetPos.x = this->pathPoints[this->currentPointIndex].x;
|
||||
targetPos.y = this->pathPoints[this->currentPointIndex].y;
|
||||
targetPos.z = this->pathPoints[this->currentPointIndex].z;
|
||||
this->actor.world.rot.y = this->actor.shape.rot.y = Math_Vec3f_Yaw(&this->actor.world.pos, &targetPos);
|
||||
this->actor.world.rot.x = this->actor.shape.rot.x = Math_Vec3f_Pitch(&this->actor.world.pos, &targetPos);
|
||||
this->actor.draw = EnSyatekiCrow_Draw;
|
||||
this->actionFunc = func_809CA840;
|
||||
this->actionFunc = EnSyatekiCrow_WaitToMove;
|
||||
}
|
||||
|
||||
void func_809CA840(EnSyatekiCrow* this, PlayState* play) {
|
||||
if (((EN_SYATEKI_CROW_GET_PARAM_F(&this->actor) * 20) + 20) < this->unk_1BC) {
|
||||
/**
|
||||
* Waits until the wait timer reaches a certain point, then starts flying forward.
|
||||
* How long the Guay should wait is controlled by its params.
|
||||
*/
|
||||
void EnSyatekiCrow_WaitToMove(EnSyatekiCrow* this, PlayState* play) {
|
||||
if (((EN_SYATEKI_CROW_GET_WAIT_MOD(&this->actor) * 20) + 20) < this->waitTimer) {
|
||||
Actor_PlaySfxAtPos(this->actor.parent, NA_SE_EN_KAICHO_CRY);
|
||||
this->unk_1BC = 0;
|
||||
this->actor.speedXZ = EN_SYATEKI_CROW_GET_PARAM_F0(&this->actor) + 6.0f;
|
||||
this->waitTimer = 0;
|
||||
this->actor.speedXZ = EN_SYATEKI_CROW_GET_SPEED_MOD(&this->actor) + 6.0f;
|
||||
this->actor.gravity = -0.5f;
|
||||
this->actionFunc = func_809CA8E4;
|
||||
this->actionFunc = EnSyatekiCrow_Fly;
|
||||
} else {
|
||||
this->unk_1BC++;
|
||||
this->waitTimer++;
|
||||
}
|
||||
}
|
||||
|
||||
void func_809CA8E4(EnSyatekiCrow* this, PlayState* play) {
|
||||
Vec3f sp34;
|
||||
f32 sp30;
|
||||
void EnSyatekiCrow_Fly(EnSyatekiCrow* this, PlayState* play) {
|
||||
Vec3f targetPoint;
|
||||
f32 distToTarget;
|
||||
EnSyatekiMan* syatekiMan = (EnSyatekiMan*)this->actor.parent;
|
||||
|
||||
if (syatekiMan->shootingGameState != SG_GAME_STATE_RUNNING) {
|
||||
func_809CA5D4(this);
|
||||
EnSyatekiCrow_SetupWaitForSpawn(this);
|
||||
return;
|
||||
}
|
||||
|
||||
sp34.x = this->unk_1C8[this->unk_1CC].x;
|
||||
sp34.y = this->unk_1C8[this->unk_1CC].y;
|
||||
sp34.z = this->unk_1C8[this->unk_1CC].z;
|
||||
targetPoint.x = this->pathPoints[this->currentPointIndex].x;
|
||||
targetPoint.y = this->pathPoints[this->currentPointIndex].y;
|
||||
targetPoint.z = this->pathPoints[this->currentPointIndex].z;
|
||||
|
||||
sp30 = Math_Vec3f_DistXZ(&this->actor.world.pos, &sp34);
|
||||
this->unk_1C0 = Math_Vec3f_Yaw(&this->actor.world.pos, &sp34);
|
||||
this->unk_1BE = Math_Vec3f_Pitch(&this->actor.world.pos, &sp34);
|
||||
distToTarget = Math_Vec3f_DistXZ(&this->actor.world.pos, &targetPoint);
|
||||
this->yawTarget = Math_Vec3f_Yaw(&this->actor.world.pos, &targetPoint);
|
||||
this->pitchTarget = Math_Vec3f_Pitch(&this->actor.world.pos, &targetPoint);
|
||||
|
||||
if (sp30 > 100.0f) {
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, this->unk_1C0, 5, 0x3000, 0x100);
|
||||
if (distToTarget > 100.0f) {
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, this->yawTarget, 5, 0x3000, 0x100);
|
||||
this->actor.shape.rot.y = this->actor.world.rot.y;
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.x, this->unk_1BE, 5, 0x3000, 0x100);
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.x, this->pitchTarget, 5, 0x3000, 0x100);
|
||||
this->actor.world.rot.x = -this->actor.shape.rot.x;
|
||||
} else if (this->unk_1CC < (this->unk_1CE - 1)) {
|
||||
this->unk_1CC++;
|
||||
} else if (this->currentPointIndex < (this->maxPointIndex - 1)) {
|
||||
this->currentPointIndex++;
|
||||
} else {
|
||||
this->unk_1C2 = 0;
|
||||
this->isActive = false;
|
||||
syatekiMan->guayFlags &= ~(1 << EN_SYATEKI_CROW_GET_NUMBER(&this->actor));
|
||||
func_809CA5D4(this);
|
||||
EnSyatekiCrow_SetupWaitForSpawn(this);
|
||||
}
|
||||
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
@@ -218,21 +213,21 @@ void func_809CA8E4(EnSyatekiCrow* this, PlayState* play) {
|
||||
}
|
||||
}
|
||||
|
||||
void func_809CAAF8(EnSyatekiCrow* this) {
|
||||
void EnSyatekiCrow_SetupDead(EnSyatekiCrow* this) {
|
||||
EnSyatekiMan* syatekiMan = (EnSyatekiMan*)this->actor.parent;
|
||||
|
||||
syatekiMan->score += 60;
|
||||
this->unk_1C2 = 0;
|
||||
this->isActive = false;
|
||||
this->actor.speedXZ *= Math_CosS(this->actor.world.rot.x);
|
||||
this->actor.velocity.y = 0.0f;
|
||||
Animation_Change(&this->skelAnime, &gGuayFlyAnim, 0.4f, 0.0f, 0.0f, ANIMMODE_LOOP_INTERP, -3.0f);
|
||||
this->actor.bgCheckFlags &= ~1;
|
||||
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_KAICHO_DEAD);
|
||||
Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 40);
|
||||
this->actionFunc = func_809CABC0;
|
||||
this->actionFunc = EnSyatekiCrow_Dead;
|
||||
}
|
||||
|
||||
void func_809CABC0(EnSyatekiCrow* this, PlayState* play) {
|
||||
void EnSyatekiCrow_Dead(EnSyatekiCrow* this, PlayState* play) {
|
||||
EnSyatekiMan* syatekiMan = (EnSyatekiMan*)this->actor.parent;
|
||||
|
||||
Math_StepToF(&this->actor.speedXZ, 0.0f, 0.5f);
|
||||
@@ -243,30 +238,34 @@ void func_809CABC0(EnSyatekiCrow* this, PlayState* play) {
|
||||
this->actor.shape.rot.z += 0x1780;
|
||||
}
|
||||
|
||||
if (this->unk_1C4 > 20) {
|
||||
func_800B3030(play, &this->actor.world.pos, &D_809CB050, &D_809CB050, this->actor.scale.x * 10000.0f, 0, 0);
|
||||
if (this->deathTimer > 20) {
|
||||
func_800B3030(play, &this->actor.world.pos, &sZeroVec, &sZeroVec, this->actor.scale.x * 10000.0f, 0, 0);
|
||||
syatekiMan->guayHitCounter++;
|
||||
syatekiMan->guayFlags &= ~(1 << EN_SYATEKI_CROW_GET_NUMBER(&this->actor));
|
||||
func_809CA5D4(this);
|
||||
EnSyatekiCrow_SetupWaitForSpawn(this);
|
||||
}
|
||||
|
||||
this->unk_1C4++;
|
||||
this->deathTimer++;
|
||||
}
|
||||
|
||||
void func_809CACD0(EnSyatekiCrow* this, PlayState* play) {
|
||||
if (this->actionFunc == func_809CA8E4) {
|
||||
if (this->unk_23C.base.acFlags & AC_HIT) {
|
||||
static Vec3f sVelocity = { 0.0f, 20.0f, 0.0f };
|
||||
|
||||
static Vec3f sAccel = { 0.0f, 0.0f, 0.0f };
|
||||
|
||||
void EnSyatekiCrow_UpdateDamage(EnSyatekiCrow* this, PlayState* play) {
|
||||
if (this->actionFunc == EnSyatekiCrow_Fly) {
|
||||
if (this->collider.base.acFlags & AC_HIT) {
|
||||
play_sound(NA_SE_SY_TRE_BOX_APPEAR);
|
||||
this->unk_1C4 = 0;
|
||||
this->unk_23C.base.acFlags &= ~AC_HIT;
|
||||
EffectSsExtra_Spawn(play, &this->actor.world.pos, &D_809CB0C0, &D_809CB0CC, 5, 1);
|
||||
func_809CAAF8(this);
|
||||
this->deathTimer = 0;
|
||||
this->collider.base.acFlags &= ~AC_HIT;
|
||||
EffectSsExtra_Spawn(play, &this->actor.world.pos, &sVelocity, &sAccel, 5, 1);
|
||||
EnSyatekiCrow_SetupDead(this);
|
||||
} else {
|
||||
this->unk_23C.elements->dim.worldSphere.center.x = this->actor.world.pos.x;
|
||||
this->unk_23C.elements->dim.worldSphere.center.y =
|
||||
this->collider.elements[0].dim.worldSphere.center.x = this->actor.world.pos.x;
|
||||
this->collider.elements[0].dim.worldSphere.center.y =
|
||||
sJntSphInit.elements[0].dim.modelSphere.center.y + this->actor.world.pos.y;
|
||||
this->unk_23C.elements->dim.worldSphere.center.z = this->actor.world.pos.z;
|
||||
CollisionCheck_SetAC(play, &play->colChkCtx, &this->unk_23C.base);
|
||||
this->collider.elements[0].dim.worldSphere.center.z = this->actor.world.pos.z;
|
||||
CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -276,39 +275,41 @@ void EnSyatekiCrow_Update(Actor* thisx, PlayState* play) {
|
||||
|
||||
this->actionFunc(this, play);
|
||||
|
||||
if (this->actionFunc != func_809CABC0) {
|
||||
if (this->actionFunc != EnSyatekiCrow_Dead) {
|
||||
Actor_MoveWithoutGravity(&this->actor);
|
||||
} else {
|
||||
Actor_MoveWithGravity(&this->actor);
|
||||
}
|
||||
|
||||
func_809CACD0(this, play);
|
||||
EnSyatekiCrow_UpdateDamage(this, play);
|
||||
}
|
||||
|
||||
s32 EnSyatekiCrow_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) {
|
||||
EnSyatekiCrow* this = THIS;
|
||||
|
||||
if (limbIndex == OBJECT_CROW_LIMB_UPPER_TAIL) {
|
||||
rot->y += (s16)(3072.0f * sin_rad(this->skelAnime.curFrame * (M_PI / 4)));
|
||||
rot->y += (s16)(0xC00 * sin_rad(this->skelAnime.curFrame * (M_PI / 4)));
|
||||
} else if (limbIndex == OBJECT_CROW_LIMB_TAIL) {
|
||||
rot->y += (s16)(5120.0f * sin_rad((this->skelAnime.curFrame + 2.5f) * (M_PI / 4)));
|
||||
rot->y += (s16)(0x1400 * sin_rad((this->skelAnime.curFrame + 2.5f) * (M_PI / 4)));
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static Vec3f sBodyOffset = { 2500.0f, 0.0f, 0.0f };
|
||||
|
||||
void EnSyatekiCrow_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) {
|
||||
EnSyatekiCrow* this = THIS;
|
||||
Vec3f* sp1C;
|
||||
Vec3f* bodyPartPos;
|
||||
|
||||
if (limbIndex == OBJECT_CROW_LIMB_BODY) {
|
||||
Matrix_MultVec3f(&D_809CB0D8, &this->unk_144[0]);
|
||||
this->unk_144[0].y -= 20.0f;
|
||||
Matrix_MultVec3f(&sBodyOffset, &this->bodyPartsPos[0]);
|
||||
this->bodyPartsPos[0].y -= 20.0f;
|
||||
} else if ((limbIndex == OBJECT_CROW_LIMB_RIGHT_WING_TIP) || (limbIndex == OBJECT_CROW_LIMB_LEFT_WING_TIP) ||
|
||||
(limbIndex == OBJECT_CROW_LIMB_TAIL)) {
|
||||
sp1C = &this->unk_144[(limbIndex >> 1) - 1];
|
||||
Matrix_MultVec3f(&D_809CB050, sp1C);
|
||||
sp1C->y -= 20.0f;
|
||||
bodyPartPos = &this->bodyPartsPos[(limbIndex >> 1) - 1];
|
||||
Matrix_MultVec3f(&sZeroVec, bodyPartPos);
|
||||
bodyPartPos->y -= 20.0f;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,11 +2,12 @@
|
||||
#define Z_EN_SYATEKI_CROW_H
|
||||
|
||||
#include "global.h"
|
||||
#include "objects/object_crow/object_crow.h"
|
||||
|
||||
#define EN_SYATEKI_CROW_GET_PARAM_F(thisx) ((thisx)->params & 0xF)
|
||||
#define EN_SYATEKI_CROW_GET_PARAM_F0(thisx) (((thisx)->params & 0xF0) >> 4)
|
||||
#define EN_SYATEKI_CROW_GET_WAIT_MOD(thisx) ((thisx)->params & 0xF)
|
||||
#define EN_SYATEKI_CROW_GET_SPEED_MOD(thisx) (((thisx)->params & 0xF0) >> 4)
|
||||
#define EN_SYATEKI_CROW_GET_NUMBER(thisx) (((thisx)->params & 0xFF00) >> 8)
|
||||
#define EN_SYATEKI_CROW_PARAMS(number, unkF0, unkF) (((number << 8) & 0xFF00) | ((unkF0 << 4) & 0xF0) | (unkF & 0xF))
|
||||
#define EN_SYATEKI_CROW_PARAMS(number, speedMod, waitMod) (((number << 8) & 0xFF00) | ((speedMod << 4) & 0xF0) | (waitMod & 0xF))
|
||||
|
||||
struct EnSyatekiCrow;
|
||||
|
||||
@@ -14,21 +15,21 @@ typedef void (*EnSyatekiCrowActionFunc)(struct EnSyatekiCrow*, PlayState*);
|
||||
|
||||
typedef struct EnSyatekiCrow {
|
||||
/* 0x000 */ Actor actor;
|
||||
/* 0x144 */ Vec3f unk_144[4];
|
||||
/* 0x144 */ Vec3f bodyPartsPos[4];
|
||||
/* 0x174 */ SkelAnime skelAnime;
|
||||
/* 0x1B8 */ EnSyatekiCrowActionFunc actionFunc;
|
||||
/* 0x1BC */ s16 unk_1BC;
|
||||
/* 0x1BE */ s16 unk_1BE;
|
||||
/* 0x1C0 */ s16 unk_1C0;
|
||||
/* 0x1C2 */ s16 unk_1C2;
|
||||
/* 0x1C4 */ s16 unk_1C4;
|
||||
/* 0x1C8 */ Vec3s* unk_1C8;
|
||||
/* 0x1CC */ s16 unk_1CC;
|
||||
/* 0x1CE */ s16 unk_1CE;
|
||||
/* 0x1D0 */ Vec3s jointTable[9];
|
||||
/* 0x206 */ Vec3s morphTable[9];
|
||||
/* 0x23C */ ColliderJntSph unk_23C;
|
||||
/* 0x25C */ ColliderJntSphElement unk_25C;
|
||||
/* 0x1BC */ s16 waitTimer;
|
||||
/* 0x1BE */ s16 pitchTarget;
|
||||
/* 0x1C0 */ s16 yawTarget;
|
||||
/* 0x1C2 */ s16 isActive;
|
||||
/* 0x1C4 */ s16 deathTimer;
|
||||
/* 0x1C8 */ Vec3s* pathPoints;
|
||||
/* 0x1CC */ s16 currentPointIndex;
|
||||
/* 0x1CE */ s16 maxPointIndex;
|
||||
/* 0x1D0 */ Vec3s jointTable[OBJECT_CROW_LIMB_MAX];
|
||||
/* 0x206 */ Vec3s morphTable[OBJECT_CROW_LIMB_MAX];
|
||||
/* 0x23C */ ColliderJntSph collider;
|
||||
/* 0x25C */ ColliderJntSphElement colliderElements[1];
|
||||
} EnSyatekiCrow; // size = 0x29C
|
||||
|
||||
extern const ActorInit En_Syateki_Crow_InitVars;
|
||||
|
||||
@@ -271,7 +271,8 @@ void func_80A2C2E0(EnSyatekiDekunuts* this, PlayState* play) {
|
||||
void func_80A2C33C(EnSyatekiDekunuts* this, PlayState* play) {
|
||||
EnSyatekiMan* syatekiMan = (EnSyatekiMan*)this->actor.parent;
|
||||
|
||||
if ((gSaveContext.unk_3DE0[1] <= 0) || (syatekiMan->shootingGameState != SG_GAME_STATE_RUNNING)) {
|
||||
if ((gSaveContext.timerCurTimes[TIMER_ID_MINIGAME_1] <= SECONDS_TO_TIMER(0)) ||
|
||||
(syatekiMan->shootingGameState != SG_GAME_STATE_RUNNING)) {
|
||||
func_80A2C3AC(this);
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user