mirror of
https://github.com/zeldaret/oot.git
synced 2025-05-10 11:03:46 +00:00
Big cleanup (#775)
* Adult and child2 macros OK * ICHAIN cleanup * almost all overlay data * format.sh * func_8002FBAC NON_EQUIVALENT * PR fixes (MZXrules) * fix * change //@ bug to //! @bug * merge master and missed a //@bug * fix ruto * some more cleanup (#2) * more `! @bug` formatting cleanup * parenthesis cleanup * hex naviEnemyId * run formatter * replace `IS_NOT_` macros with `!IS_` * run formatter * run formatter * PR fixes (fig) * Missed something Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
This commit is contained in:
parent
17c79a8f60
commit
556cdad7eb
177 changed files with 902 additions and 862 deletions
|
@ -26,11 +26,15 @@
|
|||
|
||||
#define ACTIVE_CAM globalCtx->cameraPtrs[globalCtx->activeCamera]
|
||||
|
||||
#define LINK_IS_ADULT (gSaveContext.linkAge == 0)
|
||||
#define LINK_IS_CHILD (gSaveContext.linkAge == 1)
|
||||
|
||||
#define YEARS_CHILD 5
|
||||
#define YEARS_ADULT 17
|
||||
#define LINK_IS_CHILD (gSaveContext.linkAge != 0)
|
||||
#define LINK_IS_ADULT (gSaveContext.linkAge == 0)
|
||||
#define LINK_AGE_IN_YEARS (LINK_IS_CHILD ? YEARS_CHILD : YEARS_ADULT)
|
||||
#define LINK_AGE_IN_YEARS (!LINK_IS_ADULT ? YEARS_CHILD : YEARS_ADULT)
|
||||
|
||||
#define IS_DAY (gSaveContext.nightFlag == 0)
|
||||
#define IS_NIGHT (gSaveContext.nightFlag == 1)
|
||||
|
||||
#define SLOT(item) gItemSlots[item]
|
||||
#define INV_CONTENT(item) gSaveContext.inventory.items[SLOT(item)]
|
||||
|
|
|
@ -999,7 +999,7 @@ void* func_800E0540(s32 poolIdx, s32 id, u32 size) {
|
|||
gAudioContext.unk_2D60[sp18].poolIndex = poolIdx;
|
||||
gAudioContext.unk_2D60[sp18].id = id;
|
||||
gAudioContext.unk_2D60[sp18].size = size;
|
||||
// @bug UB: missing return. "ret" is in v0 at this point, but doing an
|
||||
//! @bug UB: missing return. "ret" is in v0 at this point, but doing an
|
||||
// explicit return uses an additional register.
|
||||
// return ret;
|
||||
}
|
||||
|
|
|
@ -1231,7 +1231,7 @@ void Audio_SequenceChannelProcessScript(SequenceChannel* channel) {
|
|||
case 0xE4:
|
||||
if (scriptState->value != -1) {
|
||||
data = (*channel->dynTable)[scriptState->value];
|
||||
// @bug: Missing a stack depth check here
|
||||
//! @bug: Missing a stack depth check here
|
||||
scriptState->stack[scriptState->depth++] = scriptState->pc;
|
||||
offset = (u16)((data[0] << 8) + data[1]);
|
||||
scriptState->pc = player->seqData + offset;
|
||||
|
@ -1254,7 +1254,7 @@ void Audio_SequenceChannelProcessScript(SequenceChannel* channel) {
|
|||
channel->panChannelWeight = data[-2];
|
||||
channel->reverb = data[-1];
|
||||
channel->reverbIndex = data[0];
|
||||
//@bug: Not marking reverb state as changed
|
||||
//! @bug: Not marking reverb state as changed
|
||||
channel->changes.s.pan = true;
|
||||
break;
|
||||
case 0xE8:
|
||||
|
@ -1267,7 +1267,7 @@ void Audio_SequenceChannelProcessScript(SequenceChannel* channel) {
|
|||
channel->panChannelWeight = Audio_M64ReadU8(scriptState);
|
||||
channel->reverb = Audio_M64ReadU8(scriptState);
|
||||
channel->reverbIndex = Audio_M64ReadU8(scriptState);
|
||||
//@bug: Not marking reverb state as changed
|
||||
//! @bug: Not marking reverb state as changed
|
||||
channel->changes.s.pan = true;
|
||||
break;
|
||||
case 0xEC:
|
||||
|
|
|
@ -29,7 +29,7 @@ void func_800430A0(CollisionContext* colCtx, s32 bgId, Actor* actor) {
|
|||
pos.y <= -BGCHECK_XYZ_ABSMAX || BGCHECK_XYZ_ABSMAX <= pos.z || pos.z <= -BGCHECK_XYZ_ABSMAX) {
|
||||
|
||||
osSyncPrintf(VT_FGCOL(RED));
|
||||
// @bug file and line are not passed to osSyncPrintf
|
||||
//! @bug file and line are not passed to osSyncPrintf
|
||||
// Position is not valid
|
||||
osSyncPrintf(
|
||||
"BGCheckCollection_typicalActorPos():位置が妥当ではありません。\npos (%f,%f,%f) file:%s line:%d\n",
|
||||
|
|
|
@ -227,7 +227,7 @@ void func_800F7680(void) {
|
|||
if (gSoundBanks[phi_s5][phi_a1].unk_28 == sp50->sfxId) {
|
||||
sp55 = D_80130594[D_801333CC][phi_s5];
|
||||
} else {
|
||||
//!@bug possibly uninitialized sp43 ? confirm when matching
|
||||
//! @bug possibly uninitialized sp43 ? confirm when matching
|
||||
if (sp55 == 0) {
|
||||
phi_s1 = phi_a1;
|
||||
flag1 = gSoundBanks[phi_s5][phi_a1].unk_28 & 0xFFFF;
|
||||
|
|
|
@ -322,7 +322,7 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) {
|
|||
GfxPool* pool = &gGfxPools[gfxCtx->gfxPoolIdx & 1];
|
||||
|
||||
if (pool->headMagic != GFXPOOL_HEAD_MAGIC) {
|
||||
// @bug (?) : devs might've forgotten "problem = true;"
|
||||
//! @bug (?) : devs might've forgotten "problem = true;"
|
||||
osSyncPrintf("%c", 7);
|
||||
// Dynamic area head is destroyed
|
||||
osSyncPrintf(VT_COL(RED, WHITE) "ダイナミック領域先頭が破壊されています\n" VT_RST);
|
||||
|
|
|
@ -626,7 +626,7 @@ s32 Math3D_PointRelativeToCubeVertices(Vec3f* point, Vec3f* min, Vec3f* max) {
|
|||
ret |= 0x10;
|
||||
}
|
||||
|
||||
// @BUG: The next 2 conditions are the same check.
|
||||
//! @bug: The next 2 conditions are the same check.
|
||||
if ((-min->x - min->y + max->z) < (-point->x - point->y + point->z)) {
|
||||
ret |= 0x20;
|
||||
}
|
||||
|
@ -726,7 +726,7 @@ s32 Math3D_LineVsCube(Vec3f* min, Vec3f* max, Vec3f* a, Vec3f* b) {
|
|||
triVtx1.y = min->y;
|
||||
triVtx1.z = max->z;
|
||||
triVtx2.x = max->x;
|
||||
// @Bug trVtx1.y should be triVtx2.y, prevents a tri on the cube from being checked.
|
||||
//! @bug trVtx1.y should be triVtx2.y, prevents a tri on the cube from being checked.
|
||||
triVtx1.y = min->y;
|
||||
triVtx2.z = max->z;
|
||||
if (Math3D_TriLineIntersect(&triVtx0, &triVtx1, &triVtx2, 0.0f, 0.0f, 1.0f, -max->z, a, b, &intersectPoint, 0)) {
|
||||
|
|
|
@ -1819,7 +1819,7 @@ void func_8002FBAC(GlobalContext* globalCtx) {
|
|||
spF0 = gSaveContext.respawn[RESPAWN_MODE_TOP].data;
|
||||
|
||||
if (spF0 != 0) {
|
||||
f32 spD8 = (LINK_IS_ADULT) ? 80.0f : 60.0f;
|
||||
f32 spD8 = LINK_IS_ADULT ? 80.0f : 60.0f;
|
||||
f32 spD4 = 1.0f;
|
||||
s32 spD0 = 0xFF;
|
||||
s32 spCC = spF0 - 40;
|
||||
|
@ -4239,7 +4239,7 @@ u32 func_80035BFC(GlobalContext* globalCtx, s16 arg1) {
|
|||
}
|
||||
break;
|
||||
case 1:
|
||||
if (LINK_IS_CHILD) {
|
||||
if (!LINK_IS_ADULT) {
|
||||
if (Flags_GetEventChkInf(0x9)) {
|
||||
if (Flags_GetInfTable(0x10)) {
|
||||
retTextId = 0x1046;
|
||||
|
@ -4286,7 +4286,7 @@ u32 func_80035BFC(GlobalContext* globalCtx, s16 arg1) {
|
|||
}
|
||||
break;
|
||||
case 2:
|
||||
if (LINK_IS_CHILD) {
|
||||
if (!LINK_IS_ADULT) {
|
||||
if (Flags_GetEventChkInf(0x9)) {
|
||||
retTextId = 0x1042;
|
||||
} else {
|
||||
|
@ -4303,7 +4303,7 @@ u32 func_80035BFC(GlobalContext* globalCtx, s16 arg1) {
|
|||
}
|
||||
break;
|
||||
case 3:
|
||||
if (LINK_IS_CHILD) {
|
||||
if (!LINK_IS_ADULT) {
|
||||
if (Flags_GetEventChkInf(0x9)) {
|
||||
retTextId = 0x1043;
|
||||
} else {
|
||||
|
@ -4322,7 +4322,7 @@ u32 func_80035BFC(GlobalContext* globalCtx, s16 arg1) {
|
|||
}
|
||||
break;
|
||||
case 4:
|
||||
if (LINK_IS_CHILD) {
|
||||
if (!LINK_IS_ADULT) {
|
||||
if (Flags_GetEventChkInf(0x9)) {
|
||||
retTextId = 0x1042;
|
||||
} else {
|
||||
|
@ -4339,7 +4339,7 @@ u32 func_80035BFC(GlobalContext* globalCtx, s16 arg1) {
|
|||
}
|
||||
break;
|
||||
case 5:
|
||||
if (LINK_IS_CHILD) {
|
||||
if (!LINK_IS_ADULT) {
|
||||
if (Flags_GetEventChkInf(0x9)) {
|
||||
retTextId = 0x1044;
|
||||
} else if (Flags_GetInfTable(0x22)) {
|
||||
|
@ -4356,7 +4356,7 @@ u32 func_80035BFC(GlobalContext* globalCtx, s16 arg1) {
|
|||
}
|
||||
break;
|
||||
case 6:
|
||||
if (LINK_IS_CHILD) {
|
||||
if (!LINK_IS_ADULT) {
|
||||
if (Flags_GetEventChkInf(0x9)) {
|
||||
retTextId = 0x1042;
|
||||
} else if (Flags_GetInfTable(0x24)) {
|
||||
|
@ -4373,7 +4373,7 @@ u32 func_80035BFC(GlobalContext* globalCtx, s16 arg1) {
|
|||
}
|
||||
break;
|
||||
case 7:
|
||||
if (LINK_IS_CHILD) {
|
||||
if (!LINK_IS_ADULT) {
|
||||
if (Flags_GetEventChkInf(0x9)) {
|
||||
retTextId = 0x1043;
|
||||
} else if (Flags_GetInfTable(0x26)) {
|
||||
|
@ -4390,7 +4390,7 @@ u32 func_80035BFC(GlobalContext* globalCtx, s16 arg1) {
|
|||
}
|
||||
break;
|
||||
case 8:
|
||||
if (LINK_IS_CHILD) {
|
||||
if (!LINK_IS_ADULT) {
|
||||
if (Flags_GetEventChkInf(0x9)) {
|
||||
retTextId = 0x1043;
|
||||
} else if (Flags_GetInfTable(0x28)) {
|
||||
|
@ -4409,7 +4409,7 @@ u32 func_80035BFC(GlobalContext* globalCtx, s16 arg1) {
|
|||
}
|
||||
break;
|
||||
case 9:
|
||||
if (LINK_IS_CHILD) {
|
||||
if (!LINK_IS_ADULT) {
|
||||
if (Flags_GetEventChkInf(0x9)) {
|
||||
retTextId = 0x1049;
|
||||
} else {
|
||||
|
@ -4424,7 +4424,7 @@ u32 func_80035BFC(GlobalContext* globalCtx, s16 arg1) {
|
|||
}
|
||||
break;
|
||||
case 10:
|
||||
if (LINK_IS_CHILD) {
|
||||
if (!LINK_IS_ADULT) {
|
||||
if (Flags_GetEventChkInf(0x9)) {
|
||||
retTextId = 0x104A;
|
||||
} else {
|
||||
|
@ -4441,7 +4441,7 @@ u32 func_80035BFC(GlobalContext* globalCtx, s16 arg1) {
|
|||
}
|
||||
break;
|
||||
case 11:
|
||||
if (LINK_IS_CHILD) {
|
||||
if (!LINK_IS_ADULT) {
|
||||
if (Flags_GetEventChkInf(0x9)) {
|
||||
retTextId = 0x104B;
|
||||
} else {
|
||||
|
@ -4456,7 +4456,7 @@ u32 func_80035BFC(GlobalContext* globalCtx, s16 arg1) {
|
|||
}
|
||||
break;
|
||||
case 12:
|
||||
if (LINK_IS_CHILD) {
|
||||
if (!LINK_IS_ADULT) {
|
||||
if (Flags_GetEventChkInf(0x9)) {
|
||||
retTextId = 0x104C;
|
||||
} else {
|
||||
|
@ -4471,7 +4471,7 @@ u32 func_80035BFC(GlobalContext* globalCtx, s16 arg1) {
|
|||
}
|
||||
break;
|
||||
case 13:
|
||||
if (LINK_IS_CHILD) {
|
||||
if (!LINK_IS_ADULT) {
|
||||
if (Flags_GetEventChkInf(0x9)) {
|
||||
retTextId = 0x104D;
|
||||
} else {
|
||||
|
@ -4653,7 +4653,7 @@ u32 func_80035BFC(GlobalContext* globalCtx, s16 arg1) {
|
|||
retTextId = 0x5002;
|
||||
break;
|
||||
case 38:
|
||||
if (LINK_IS_CHILD) {
|
||||
if (!LINK_IS_ADULT) {
|
||||
if (Flags_GetEventChkInf(0x25)) {
|
||||
retTextId = 0x3027;
|
||||
} else if (Flags_GetEventChkInf(0x23)) {
|
||||
|
@ -4672,7 +4672,7 @@ u32 func_80035BFC(GlobalContext* globalCtx, s16 arg1) {
|
|||
}
|
||||
break;
|
||||
case 39:
|
||||
if (LINK_IS_CHILD) {
|
||||
if (!LINK_IS_ADULT) {
|
||||
if (Flags_GetEventChkInf(0x25)) {
|
||||
retTextId = 0x3027;
|
||||
} else if (Flags_GetEventChkInf(0x23)) {
|
||||
|
@ -4689,7 +4689,7 @@ u32 func_80035BFC(GlobalContext* globalCtx, s16 arg1) {
|
|||
}
|
||||
break;
|
||||
case 40:
|
||||
if (LINK_IS_CHILD) {
|
||||
if (!LINK_IS_ADULT) {
|
||||
if (Flags_GetEventChkInf(0x25)) {
|
||||
retTextId = 0x3027;
|
||||
} else if (Flags_GetEventChkInf(0x23)) {
|
||||
|
@ -4708,7 +4708,7 @@ u32 func_80035BFC(GlobalContext* globalCtx, s16 arg1) {
|
|||
}
|
||||
break;
|
||||
case 41:
|
||||
if (LINK_IS_CHILD) {
|
||||
if (!LINK_IS_ADULT) {
|
||||
if (Flags_GetEventChkInf(0x25)) {
|
||||
retTextId = 0x3027;
|
||||
} else if (Flags_GetInfTable(0xF0)) {
|
||||
|
@ -4725,7 +4725,7 @@ u32 func_80035BFC(GlobalContext* globalCtx, s16 arg1) {
|
|||
}
|
||||
break;
|
||||
case 42:
|
||||
if (LINK_IS_CHILD) {
|
||||
if (!LINK_IS_ADULT) {
|
||||
if (Flags_GetEventChkInf(0x25)) {
|
||||
retTextId = 0x3027;
|
||||
} else if (Flags_GetInfTable(0xF4)) {
|
||||
|
@ -4742,7 +4742,7 @@ u32 func_80035BFC(GlobalContext* globalCtx, s16 arg1) {
|
|||
}
|
||||
break;
|
||||
case 43:
|
||||
if (LINK_IS_CHILD) {
|
||||
if (!LINK_IS_ADULT) {
|
||||
if (Flags_GetEventChkInf(0x25)) {
|
||||
retTextId = 0x3027;
|
||||
} else if (Flags_GetInfTable(0xF8)) {
|
||||
|
@ -4834,7 +4834,7 @@ u32 func_80035BFC(GlobalContext* globalCtx, s16 arg1) {
|
|||
}
|
||||
break;
|
||||
case 55:
|
||||
if (LINK_IS_CHILD) {
|
||||
if (!LINK_IS_ADULT) {
|
||||
if (Flags_GetEventChkInf(0x37)) {
|
||||
retTextId = 0x402B;
|
||||
} else if (Flags_GetEventChkInf(0x31)) {
|
||||
|
@ -4896,7 +4896,7 @@ u32 func_80035BFC(GlobalContext* globalCtx, s16 arg1) {
|
|||
}
|
||||
break;
|
||||
case 72:
|
||||
if (LINK_IS_CHILD) {
|
||||
if (!LINK_IS_ADULT) {
|
||||
if (Flags_GetEventChkInf(0x14)) {
|
||||
retTextId = 0x2040;
|
||||
} else if (Flags_GetInfTable(0x94)) {
|
||||
|
@ -4906,7 +4906,7 @@ u32 func_80035BFC(GlobalContext* globalCtx, s16 arg1) {
|
|||
}
|
||||
} else {
|
||||
if (!Flags_GetEventChkInf(0x18)) {
|
||||
if (gSaveContext.nightFlag != 0) {
|
||||
if (!IS_DAY) {
|
||||
retTextId = 0x204E;
|
||||
} else if (Flags_GetInfTable(0x9A)) {
|
||||
retTextId = 0x2031;
|
||||
|
|
|
@ -274,7 +274,7 @@ void CollisionPoly_GetVerticesByBgId(CollisionPoly* poly, s32 bgId, CollisionCon
|
|||
osSyncPrintf(VT_RST);
|
||||
|
||||
if (dest != NULL) {
|
||||
// @bug: dest[2] x and y are not set to 0
|
||||
//! @bug: dest[2] x and y are not set to 0
|
||||
dest[0].x = dest[0].y = dest[0].z = dest[1].x = dest[1].y = dest[1].z = dest[2].z = 0.0f;
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -2143,7 +2143,7 @@ s32 Camera_Parallel3(Camera* camera) {
|
|||
if (val & 2) {
|
||||
camera->unk_14C |= 0x10;
|
||||
}
|
||||
// @bug doesn't return
|
||||
//! @bug doesn't return
|
||||
}
|
||||
|
||||
s32 Camera_Parallel4(Camera* camera) {
|
||||
|
@ -6106,7 +6106,7 @@ s32 Camera_Demo7(Camera* camera) {
|
|||
camera->unk_14C |= 0x1000;
|
||||
camera->animState++;
|
||||
}
|
||||
// @bug doesn't return
|
||||
//! @bug doesn't return
|
||||
}
|
||||
|
||||
s32 Camera_Demo8(Camera* camera) {
|
||||
|
@ -7153,7 +7153,7 @@ s32 Camera_CheckWater(Camera* camera) {
|
|||
}
|
||||
func_800F6828(0);
|
||||
}
|
||||
// @BUG: doesn't always return a value, but sometimes does.
|
||||
//! @bug: doesn't always return a value, but sometimes does.
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -7723,7 +7723,7 @@ s16 Camera_ChangeSettingFlags(Camera* camera, s16 setting, s16 flags) {
|
|||
return -2;
|
||||
}
|
||||
}
|
||||
if (((setting == CAM_SET_SPOT05A) || (setting == CAM_SET_SPOT05B)) && (LINK_IS_ADULT) &&
|
||||
if (((setting == CAM_SET_SPOT05A) || (setting == CAM_SET_SPOT05B)) && LINK_IS_ADULT &&
|
||||
(camera->globalCtx->sceneNum == SCENE_SPOT05)) {
|
||||
camera->unk_14A |= 0x10;
|
||||
return -5;
|
||||
|
@ -7799,7 +7799,7 @@ s32 Camera_ChangeDataIdx(Camera* camera, s32 camDataIdx) {
|
|||
camera->unk_14A |= 4;
|
||||
Camera_CopyModeValuesToPREG(camera, camera->mode);
|
||||
} else if (settingChangeSuccessful < -1) {
|
||||
// @bug: This is likely checking the wrong value. The actual return of Camera_ChangeSettingFlags or
|
||||
//! @bug: This is likely checking the wrong value. The actual return of Camera_ChangeSettingFlags or
|
||||
// camDataIdx would make more sense.
|
||||
osSyncPrintf(VT_COL(RED, WHITE) "camera: error: illegal camera ID (%d) !! (%d|%d|%d)\n" VT_RST, camDataIdx,
|
||||
camera->thisIdx, 0x32, newCameraSetting);
|
||||
|
|
|
@ -151,13 +151,13 @@ void func_8006390C(Input* input) {
|
|||
gGameInfo->dpadLast = dpad;
|
||||
}
|
||||
|
||||
increment = (CHECK_BTN_ANY(dpad, BTN_DRIGHT))
|
||||
increment = CHECK_BTN_ANY(dpad, BTN_DRIGHT)
|
||||
? (CHECK_BTN_ALL(input->cur.button, BTN_A | BTN_B)
|
||||
? 1000
|
||||
: CHECK_BTN_ALL(input->cur.button, BTN_A)
|
||||
? 100
|
||||
: CHECK_BTN_ALL(input->cur.button, BTN_B) ? 10 : 1)
|
||||
: (CHECK_BTN_ANY(dpad, BTN_DLEFT))
|
||||
: CHECK_BTN_ANY(dpad, BTN_DLEFT)
|
||||
? (CHECK_BTN_ALL(input->cur.button, BTN_A | BTN_B)
|
||||
? -1000
|
||||
: CHECK_BTN_ALL(input->cur.button, BTN_A)
|
||||
|
|
|
@ -367,7 +367,7 @@ void func_80064824(GlobalContext* globalCtx, CutsceneContext* csCtx, CsCmdBase*
|
|||
gSaveContext.unk_1422 = 1;
|
||||
break;
|
||||
case 34:
|
||||
if (gSaveContext.nightFlag == 0) {
|
||||
if (IS_DAY) {
|
||||
gSaveContext.dayTime -= D_8011FB40;
|
||||
} else {
|
||||
gSaveContext.dayTime -= D_8011FB40 * 2;
|
||||
|
@ -523,7 +523,7 @@ void Cutscene_Command_Terminator(GlobalContext* globalCtx, CutsceneContext* csCt
|
|||
globalCtx->fadeTransition = 11;
|
||||
} else {
|
||||
if (gSaveContext.sceneSetupIndex < 4) {
|
||||
if (LINK_IS_CHILD) {
|
||||
if (!LINK_IS_ADULT) {
|
||||
globalCtx->linkAgeOnLoad = 0;
|
||||
} else {
|
||||
globalCtx->linkAgeOnLoad = 1;
|
||||
|
|
|
@ -36,10 +36,10 @@ u32 ElfMessage_CheckCondition(ElfMessage* msg) {
|
|||
gSaveContext.inventory.equipment) != 0);
|
||||
case 0x20:
|
||||
return ((msg->byte0 & 1) == 1) ==
|
||||
((CHECK_QUEST_ITEM(msg->byte3 - ITEM_SONG_MINUET + QUEST_SONG_MINUET)) != 0);
|
||||
(CHECK_QUEST_ITEM(msg->byte3 - ITEM_SONG_MINUET + QUEST_SONG_MINUET) != 0);
|
||||
case 0x30:
|
||||
return ((msg->byte0 & 1) == 1) ==
|
||||
((CHECK_QUEST_ITEM(msg->byte3 - ITEM_MEDALLION_FOREST + QUEST_MEDALLION_FOREST)) != 0);
|
||||
(CHECK_QUEST_ITEM(msg->byte3 - ITEM_MEDALLION_FOREST + QUEST_MEDALLION_FOREST) != 0);
|
||||
case 0x40:
|
||||
return ((msg->byte0 & 1) == 1) == (((void)0, gSaveContext.magicAcquired) != 0);
|
||||
}
|
||||
|
@ -141,7 +141,7 @@ u16 ElfMessage_GetSariaText(GlobalContext* globalCtx) {
|
|||
Player* player = PLAYER;
|
||||
ElfMessage* msgs;
|
||||
|
||||
if (LINK_IS_CHILD) {
|
||||
if (!LINK_IS_ADULT) {
|
||||
if (Actor_FindNearby(globalCtx, &player->actor, ACTOR_EN_SA, 4, 800.0f) == NULL) {
|
||||
msgs = sChildSariaMsgs;
|
||||
} else {
|
||||
|
|
|
@ -1275,7 +1275,7 @@ void Item_DropCollectibleRandom(GlobalContext* globalCtx, Actor* fromActor, Vec3
|
|||
params = 0xA * 0x10;
|
||||
dropTableIndex = 0x0;
|
||||
dropId = ITEM00_MAGIC_SMALL;
|
||||
} else if (LINK_IS_CHILD && (AMMO(ITEM_SLINGSHOT) < 6)) {
|
||||
} else if (!LINK_IS_ADULT && (AMMO(ITEM_SLINGSHOT) < 6)) {
|
||||
params = 0xA * 0x10;
|
||||
dropTableIndex = 0x0;
|
||||
dropId = ITEM00_SEEDS;
|
||||
|
|
|
@ -112,7 +112,7 @@ void func_8006D0EC(GlobalContext* globalCtx, Player* player) {
|
|||
}
|
||||
}
|
||||
} else if (!Flags_GetEventChkInf(0x18)) {
|
||||
if ((DREG(1) == 0) && (globalCtx->sceneNum == SCENE_SOUKO) && (gSaveContext.nightFlag != 0)) {
|
||||
if ((DREG(1) == 0) && (globalCtx->sceneNum == SCENE_SOUKO) && !IS_DAY) {
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_HORSE, 0.0f, 0.0f, -60.0f, 0, 0x7360, 0, 1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -964,7 +964,7 @@ s32 OnePointCutscene_SetInfo(GlobalContext* globalCtx, s16 camIdx, s16 csId, Act
|
|||
break;
|
||||
case 9908:
|
||||
if (func_800C0CB8(globalCtx)) {
|
||||
D_801231B4[0].eyeTargetInit.z = D_801231B4[1].eyeTargetInit.z = LINK_IS_CHILD ? 100.0f : 120.0f;
|
||||
D_801231B4[0].eyeTargetInit.z = D_801231B4[1].eyeTargetInit.z = !LINK_IS_ADULT ? 100.0f : 120.0f;
|
||||
|
||||
if (player->stateFlags1 & 0x08000000) {
|
||||
D_801231B4[2].atTargetInit.z = 0.0f;
|
||||
|
|
|
@ -261,18 +261,18 @@ void Gameplay_Init(GameState* thisx) {
|
|||
gSaveContext.nayrusLoveTimer = 0;
|
||||
func_800876C8(globalCtx);
|
||||
gSaveContext.sceneSetupIndex = (gSaveContext.cutsceneIndex & 0xF) + 4;
|
||||
} else if (LINK_IS_CHILD && gSaveContext.nightFlag == 0) {
|
||||
} else if (!LINK_IS_ADULT && IS_DAY) {
|
||||
gSaveContext.sceneSetupIndex = 0;
|
||||
} else if (LINK_IS_CHILD && gSaveContext.nightFlag != 0) {
|
||||
} else if (!LINK_IS_ADULT && !IS_DAY) {
|
||||
gSaveContext.sceneSetupIndex = 1;
|
||||
} else if (LINK_IS_ADULT && gSaveContext.nightFlag == 0) {
|
||||
} else if (LINK_IS_ADULT && IS_DAY) {
|
||||
gSaveContext.sceneSetupIndex = 2;
|
||||
} else {
|
||||
gSaveContext.sceneSetupIndex = 3;
|
||||
}
|
||||
|
||||
tempSetupIndex = gSaveContext.sceneSetupIndex;
|
||||
if ((gEntranceTable[((void)0, gSaveContext.entranceIndex)].scene == SCENE_SPOT00) && LINK_IS_CHILD &&
|
||||
if ((gEntranceTable[((void)0, gSaveContext.entranceIndex)].scene == SCENE_SPOT00) && !LINK_IS_ADULT &&
|
||||
gSaveContext.sceneSetupIndex < 4) {
|
||||
if (CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD) && CHECK_QUEST_ITEM(QUEST_GORON_RUBY) &&
|
||||
CHECK_QUEST_ITEM(QUEST_ZORA_SAPPHIRE)) {
|
||||
|
|
|
@ -262,7 +262,7 @@ void Player_SetBootData(GlobalContext* globalCtx, Player* this) {
|
|||
|
||||
currentBoots = this->currentBoots;
|
||||
if (currentBoots == PLAYER_BOOTS_NORMAL) {
|
||||
if (LINK_IS_CHILD) {
|
||||
if (!LINK_IS_ADULT) {
|
||||
currentBoots = PLAYER_BOOTS_NORMAL_CHILD;
|
||||
}
|
||||
} else if (currentBoots == PLAYER_BOOTS_IRON) {
|
||||
|
@ -314,7 +314,7 @@ s32 func_8008E9C4(Player* this) {
|
|||
}
|
||||
|
||||
s32 Player_IsChildWithHylianShield(Player* this) {
|
||||
return LINK_IS_CHILD && (this->currentShield == PLAYER_SHIELD_HYLIAN);
|
||||
return gSaveContext.linkAge != 0 && (this->currentShield == PLAYER_SHIELD_HYLIAN);
|
||||
}
|
||||
|
||||
s32 Player_ActionToModelGroup(Player* this, s32 actionParam) {
|
||||
|
@ -825,7 +825,7 @@ s32 func_8008FCC8(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* p
|
|||
D_80160018 = this->rightHandType;
|
||||
D_80160000 = &this->swordInfo[2].base;
|
||||
|
||||
if (LINK_IS_CHILD) {
|
||||
if (!LINK_IS_ADULT) {
|
||||
if (!(this->skelAnime.moveFlags & 4) || (this->skelAnime.moveFlags & 1)) {
|
||||
pos->x *= 0.64f;
|
||||
pos->z *= 0.64f;
|
||||
|
@ -917,11 +917,11 @@ s32 func_80090014(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* p
|
|||
|
||||
if ((this->sheathType == 18) || (this->sheathType == 19)) {
|
||||
dLists += this->currentShield * 4;
|
||||
if ((LINK_IS_CHILD) && (this->currentShield < PLAYER_SHIELD_HYLIAN) &&
|
||||
if (!LINK_IS_ADULT && (this->currentShield < PLAYER_SHIELD_HYLIAN) &&
|
||||
(gSaveContext.equips.buttonItems[0] != ITEM_SWORD_KOKIRI)) {
|
||||
dLists += 16;
|
||||
}
|
||||
} else if ((LINK_IS_CHILD) && ((this->sheathType == 16) || (this->sheathType == 17)) &&
|
||||
} else if (!LINK_IS_ADULT && ((this->sheathType == 16) || (this->sheathType == 17)) &&
|
||||
(gSaveContext.equips.buttonItems[0] != ITEM_SWORD_KOKIRI)) {
|
||||
dLists = D_80125D68;
|
||||
}
|
||||
|
@ -1298,7 +1298,7 @@ void func_80090D20(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s*
|
|||
|
||||
Matrix_Scale(1.0f, this->unk_858, 1.0f, MTXMODE_APPLY);
|
||||
|
||||
if (LINK_IS_CHILD) {
|
||||
if (!LINK_IS_ADULT) {
|
||||
Matrix_RotateZ(this->unk_858 * -0.2f, MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
|
@ -1404,7 +1404,7 @@ s32 func_80091880(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* p
|
|||
s32 dListOffset = 0;
|
||||
Gfx** dLists;
|
||||
|
||||
if ((modelGroup == 2) && LINK_IS_CHILD && (ptr[1] == 2)) {
|
||||
if ((modelGroup == 2) && !LINK_IS_ADULT && (ptr[1] == 2)) {
|
||||
modelGroup = 1;
|
||||
}
|
||||
|
||||
|
@ -1551,7 +1551,7 @@ void func_8009214C(GlobalContext* globalCtx, u8* segment, SkelAnime* skelAnime,
|
|||
gSegments[4] = VIRTUAL_TO_PHYSICAL(segment + 0x3800);
|
||||
gSegments[6] = VIRTUAL_TO_PHYSICAL(segment + 0x8800);
|
||||
|
||||
if (LINK_IS_CHILD) {
|
||||
if (!LINK_IS_ADULT) {
|
||||
if (shield == PLAYER_SHIELD_DEKU) {
|
||||
srcTable = D_040020D0;
|
||||
} else {
|
||||
|
|
|
@ -926,14 +926,14 @@ Gfx sDefaultDisplayList[] = {
|
|||
void func_800994A0(GlobalContext* globalCtx) {
|
||||
s16 computedEntranceIndex;
|
||||
|
||||
if (gSaveContext.nightFlag != 0) {
|
||||
if (LINK_IS_CHILD) {
|
||||
if (!IS_DAY) {
|
||||
if (!LINK_IS_ADULT) {
|
||||
computedEntranceIndex = globalCtx->nextEntranceIndex + 1;
|
||||
} else {
|
||||
computedEntranceIndex = globalCtx->nextEntranceIndex + 3;
|
||||
}
|
||||
} else {
|
||||
if (LINK_IS_CHILD) {
|
||||
if (!LINK_IS_ADULT) {
|
||||
computedEntranceIndex = globalCtx->nextEntranceIndex;
|
||||
} else {
|
||||
computedEntranceIndex = globalCtx->nextEntranceIndex + 2;
|
||||
|
|
|
@ -24,7 +24,7 @@ const ActorInit Arms_Hook_InitVars = {
|
|||
(ActorFunc)ArmsHook_Draw,
|
||||
};
|
||||
|
||||
ColliderQuadInit sQuadInit = {
|
||||
static ColliderQuadInit sQuadInit = {
|
||||
{
|
||||
COLTYPE_NONE,
|
||||
AT_ON | AT_TYPE_PLAYER,
|
||||
|
@ -108,9 +108,9 @@ s32 ArmsHook_AttachToPlayer(ArmsHook* this, Player* player) {
|
|||
if (this->actor.child != NULL) {
|
||||
player->actor.parent = NULL;
|
||||
this->actor.child = NULL;
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
void ArmsHook_DetachHookFromActor(ArmsHook* this) {
|
||||
|
@ -284,8 +284,8 @@ void ArmsHook_Shoot(ArmsHook* this, GlobalContext* globalCtx) {
|
|||
Audio_PlaySoundGeneral(NA_SE_IT_HOOKSHOT_REFLECT, &this->actor.projectedPos, 4, &D_801333E0,
|
||||
&D_801333E0, &D_801333E8);
|
||||
}
|
||||
} else if ((CHECK_BTN_ANY(globalCtx->state.input[0].press.button,
|
||||
(BTN_A | BTN_B | BTN_R | BTN_CUP | BTN_CLEFT | BTN_CRIGHT | BTN_CDOWN)))) {
|
||||
} else if (CHECK_BTN_ANY(globalCtx->state.input[0].press.button,
|
||||
(BTN_A | BTN_B | BTN_R | BTN_CUP | BTN_CLEFT | BTN_CRIGHT | BTN_CDOWN))) {
|
||||
this->timer = 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -195,11 +195,9 @@ void ArrowIce_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
ArrowIce* this = THIS;
|
||||
s32 pad;
|
||||
Actor* tranform;
|
||||
u32 stateFrames;
|
||||
EnArrow* arrow;
|
||||
u32 stateFrames = globalCtx->state.frames;
|
||||
EnArrow* arrow = (EnArrow*)this->actor.parent;
|
||||
|
||||
stateFrames = globalCtx->state.frames;
|
||||
arrow = (EnArrow*)this->actor.parent;
|
||||
if (1) {}
|
||||
|
||||
if ((arrow != NULL) && (arrow->actor.update != NULL) && (this->timer < 255)) {
|
||||
|
|
|
@ -63,9 +63,8 @@ void ArrowLight_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void ArrowLight_Charge(ArrowLight* this, GlobalContext* globalCtx) {
|
||||
EnArrow* arrow;
|
||||
EnArrow* arrow = (EnArrow*)this->actor.parent;
|
||||
|
||||
arrow = (EnArrow*)this->actor.parent;
|
||||
if ((arrow == NULL) || (arrow->actor.update == NULL)) {
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
|
@ -148,11 +147,10 @@ void ArrowLight_Hit(ArrowLight* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void ArrowLight_Fly(ArrowLight* this, GlobalContext* globalCtx) {
|
||||
EnArrow* arrow;
|
||||
EnArrow* arrow = (EnArrow*)this->actor.parent;
|
||||
f32 distanceScaled;
|
||||
s32 pad;
|
||||
|
||||
arrow = (EnArrow*)this->actor.parent;
|
||||
if ((arrow == NULL) || (arrow->actor.update == NULL)) {
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
|
@ -194,12 +192,10 @@ void ArrowLight_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
void ArrowLight_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
ArrowLight* this = THIS;
|
||||
s32 pad;
|
||||
u32 stateFrames;
|
||||
EnArrow* arrow;
|
||||
u32 stateFrames = globalCtx->state.frames;
|
||||
EnArrow* arrow = (EnArrow*)this->actor.parent;
|
||||
Actor* tranform;
|
||||
|
||||
stateFrames = globalCtx->state.frames;
|
||||
arrow = (EnArrow*)this->actor.parent;
|
||||
if (1) {}
|
||||
|
||||
if ((arrow != NULL) && (arrow->actor.update != NULL) && (this->timer < 255)) {
|
||||
|
|
|
@ -66,7 +66,7 @@ static ColliderCylinderInit sCylinderInit = {
|
|||
};
|
||||
|
||||
static InitChainEntry sInitChain[] = {
|
||||
ICHAIN_VEC3F_DIV1000(scale, 0x64, ICHAIN_STOP),
|
||||
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_STOP),
|
||||
};
|
||||
|
||||
static Gfx* sDLists[] = {
|
||||
|
@ -113,7 +113,7 @@ void BgBdanObjects_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
|
||||
DynaPolyActor_Init(&this->dyna, DPM_PLAYER);
|
||||
this->unk_168 = (thisx->params >> 8) & 0x3F;
|
||||
this->switchFlag = (thisx->params >> 8) & 0x3F;
|
||||
thisx->params &= 0xFF;
|
||||
if (thisx->params == 2) {
|
||||
thisx->flags |= 0x30;
|
||||
|
@ -127,7 +127,7 @@ void BgBdanObjects_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
Collider_SetCylinder(globalCtx, &this->collider, &this->dyna.actor, &sCylinderInit);
|
||||
thisx->world.pos.y += -79.0f;
|
||||
if (Flags_GetClear(globalCtx, thisx->room)) {
|
||||
Flags_SetSwitch(globalCtx, this->unk_168);
|
||||
Flags_SetSwitch(globalCtx, this->switchFlag);
|
||||
this->actionFunc = func_8086C6EC;
|
||||
} else {
|
||||
if (BgBdanObjects_GetContactRu1(this, 4)) {
|
||||
|
@ -140,7 +140,7 @@ void BgBdanObjects_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->actionFunc = func_8086C618;
|
||||
thisx->world.pos.y = thisx->home.pos.y + -70.0f;
|
||||
} else {
|
||||
Flags_SetSwitch(globalCtx, this->unk_168);
|
||||
Flags_SetSwitch(globalCtx, this->switchFlag);
|
||||
this->timer = 0;
|
||||
this->actionFunc = func_8086C054;
|
||||
}
|
||||
|
@ -149,11 +149,11 @@ void BgBdanObjects_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
if (thisx->params == 1) {
|
||||
CollisionHeader_GetVirtual(&gJabuElevatorCol, &colHeader);
|
||||
this->timer = 512;
|
||||
this->unk_168 = 0;
|
||||
this->switchFlag = 0;
|
||||
this->actionFunc = func_8086C874;
|
||||
} else {
|
||||
CollisionHeader_GetVirtual(&gJabuLoweringPlatformCol, &colHeader);
|
||||
if (Flags_GetSwitch(globalCtx, this->unk_168)) {
|
||||
if (Flags_GetSwitch(globalCtx, this->switchFlag)) {
|
||||
this->actionFunc = BgBdanObjects_DoNothing;
|
||||
thisx->world.pos.y = thisx->home.pos.y - 400.0f;
|
||||
} else {
|
||||
|
@ -283,7 +283,7 @@ void func_8086C55C(BgBdanObjects* this, GlobalContext* globalCtx) {
|
|||
this->timer--;
|
||||
|
||||
if (this->timer == 0) {
|
||||
Flags_UnsetSwitch(globalCtx, this->unk_168);
|
||||
Flags_UnsetSwitch(globalCtx, this->switchFlag);
|
||||
} else if (this->timer == -40) {
|
||||
this->timer = 0;
|
||||
this->actionFunc = func_8086C3D8;
|
||||
|
@ -307,7 +307,7 @@ void func_8086C618(BgBdanObjects* this, GlobalContext* globalCtx) {
|
|||
Collider_UpdateCylinder(&this->dyna.actor, &this->collider);
|
||||
CollisionCheck_SetAT(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
|
||||
if (Flags_GetClear(globalCtx, this->dyna.actor.room)) {
|
||||
Flags_SetSwitch(globalCtx, this->unk_168);
|
||||
Flags_SetSwitch(globalCtx, this->switchFlag);
|
||||
this->dyna.actor.home.rot.y = (s16)(this->dyna.actor.shape.rot.y + 0x2000) & 0xC000;
|
||||
this->actionFunc = func_8086C6EC;
|
||||
} else {
|
||||
|
@ -352,21 +352,21 @@ void func_8086C874(BgBdanObjects* this, GlobalContext* globalCtx) {
|
|||
if (this->timer != 0) {
|
||||
this->timer--;
|
||||
}
|
||||
if (this->unk_168 == 0) {
|
||||
if (this->switchFlag == 0) {
|
||||
if (func_8004356C(&this->dyna)) {
|
||||
this->cameraSetting = globalCtx->cameraPtrs[MAIN_CAM]->setting;
|
||||
Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_NORMAL2);
|
||||
func_8005AD1C(globalCtx->cameraPtrs[MAIN_CAM], 4);
|
||||
this->unk_168 = 10;
|
||||
this->switchFlag = 10;
|
||||
}
|
||||
} else {
|
||||
Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_NORMAL2);
|
||||
if (!func_8004356C(&this->dyna)) {
|
||||
if (this->unk_168 != 0) {
|
||||
this->unk_168--;
|
||||
if (this->switchFlag != 0) {
|
||||
this->switchFlag--;
|
||||
}
|
||||
}
|
||||
if (this->unk_168 == 0) {
|
||||
if (this->switchFlag == 0) {
|
||||
do {
|
||||
} while (0);
|
||||
Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], this->cameraSetting);
|
||||
|
@ -381,7 +381,7 @@ void func_8086C874(BgBdanObjects* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_8086C9A8(BgBdanObjects* this, GlobalContext* globalCtx) {
|
||||
if (Flags_GetSwitch(globalCtx, this->unk_168)) {
|
||||
if (Flags_GetSwitch(globalCtx, this->switchFlag)) {
|
||||
this->timer = 100;
|
||||
this->actionFunc = func_8086C9F0;
|
||||
}
|
||||
|
@ -390,7 +390,7 @@ void func_8086C9A8(BgBdanObjects* this, GlobalContext* globalCtx) {
|
|||
void func_8086C9F0(BgBdanObjects* this, GlobalContext* globalCtx) {
|
||||
if (this->timer == 0) {
|
||||
if (Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y, 0.5f)) {
|
||||
Flags_UnsetSwitch(globalCtx, this->unk_168);
|
||||
Flags_UnsetSwitch(globalCtx, this->switchFlag);
|
||||
this->actionFunc = func_8086C9A8;
|
||||
}
|
||||
func_8002F948(&this->dyna.actor, NA_SE_EV_WATER_LEVEL_DOWN - SFX_FLAG);
|
||||
|
@ -415,7 +415,7 @@ void func_8086CABC(BgBdanObjects* this, GlobalContext* globalCtx) {
|
|||
|
||||
void func_8086CB10(BgBdanObjects* this, GlobalContext* globalCtx) {
|
||||
if (func_8004356C(&this->dyna)) {
|
||||
Flags_SetSwitch(globalCtx, this->unk_168);
|
||||
Flags_SetSwitch(globalCtx, this->switchFlag);
|
||||
this->timer = 50;
|
||||
this->actionFunc = func_8086CB8C;
|
||||
this->dyna.actor.home.pos.y -= 200.0f;
|
||||
|
|
|
@ -11,7 +11,7 @@ typedef void (*BgBdanObjectsActionFunc)(struct BgBdanObjects*, GlobalContext*);
|
|||
typedef struct BgBdanObjects {
|
||||
/* 0x0000 */ DynaPolyActor dyna;
|
||||
/* 0x0164 */ BgBdanObjectsActionFunc actionFunc;
|
||||
/* 0x0168 */ u8 unk_168;
|
||||
/* 0x0168 */ u8 switchFlag;
|
||||
/* 0x016A */ s16 timer;
|
||||
/* 0x016C */ ColliderCylinder collider;
|
||||
/* 0x01B8 */ s32 cameraSetting;
|
||||
|
|
|
@ -91,7 +91,8 @@ static InitChainEntry sInitChain[] = {
|
|||
|
||||
static Vec3f D_8086E0E0 = { 0.0f, 140.0f, 0.0f };
|
||||
|
||||
void func_8086D010(BgBdanSwitch* this, GlobalContext* globalCtx, CollisionHeader* collision, DynaPolyMoveFlag flag) {
|
||||
void BgBdanSwitch_InitDynaPoly(BgBdanSwitch* this, GlobalContext* globalCtx, CollisionHeader* collision,
|
||||
DynaPolyMoveFlag flag) {
|
||||
s16 pad1;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
s16 pad2;
|
||||
|
@ -105,7 +106,7 @@ void func_8086D010(BgBdanSwitch* this, GlobalContext* globalCtx, CollisionHeader
|
|||
}
|
||||
}
|
||||
|
||||
void func_8086D098(BgBdanSwitch* this, GlobalContext* globalCtx) {
|
||||
void BgBdanSwitch_InitCollision(BgBdanSwitch* this, GlobalContext* globalCtx) {
|
||||
Actor* actor = &this->dyna.actor;
|
||||
Collider_InitJntSph(globalCtx, &this->collider);
|
||||
Collider_SetJntSph(globalCtx, &this->collider, actor, &sJntSphInit, this->colliderItems);
|
||||
|
@ -157,13 +158,14 @@ void BgBdanSwitch_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
case BLUE:
|
||||
case YELLOW_HEAVY:
|
||||
case YELLOW:
|
||||
func_8086D010(this, globalCtx, &gJabuFloorSwitchCol, DPM_PLAYER);
|
||||
BgBdanSwitch_InitDynaPoly(this, globalCtx, &gJabuFloorSwitchCol, DPM_PLAYER);
|
||||
break;
|
||||
case YELLOW_TALL_1:
|
||||
case YELLOW_TALL_2:
|
||||
func_8086D098(this, globalCtx);
|
||||
BgBdanSwitch_InitCollision(this, globalCtx);
|
||||
this->dyna.actor.flags |= 1;
|
||||
this->dyna.actor.targetMode = 4;
|
||||
break;
|
||||
}
|
||||
|
||||
flag = Flags_GetSwitch(globalCtx, (this->dyna.actor.params >> 8) & 0x3F);
|
||||
|
@ -213,6 +215,7 @@ void BgBdanSwitch_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|||
case YELLOW_TALL_1:
|
||||
case YELLOW_TALL_2:
|
||||
Collider_DestroyJntSph(globalCtx, &this->collider);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -258,6 +261,7 @@ void func_8086D5E0(BgBdanSwitch* this, GlobalContext* globalCtx) {
|
|||
func_8086D67C(this);
|
||||
func_8086D4B4(this, globalCtx);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -299,6 +303,7 @@ void func_8086D754(BgBdanSwitch* this, GlobalContext* globalCtx) {
|
|||
if (!Flags_GetSwitch(globalCtx, (this->dyna.actor.params >> 8) & 0x3F)) {
|
||||
func_8086D7FC(this);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -421,6 +426,7 @@ void func_8086DB68(BgBdanSwitch* this, GlobalContext* globalCtx) {
|
|||
func_8086DC30(this);
|
||||
func_8086D4B4(this, globalCtx);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -457,6 +463,7 @@ void func_8086DCE8(BgBdanSwitch* this, GlobalContext* globalCtx) {
|
|||
func_8086DDA8(this);
|
||||
func_8086D548(this, globalCtx);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -525,5 +532,6 @@ void BgBdanSwitch_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
break;
|
||||
case BLUE:
|
||||
func_8086DF58(this, globalCtx, gJabuBlueFloorSwitchDL);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -198,18 +198,18 @@ void BgBowlWall_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->actionFunc(this, globalCtx);
|
||||
}
|
||||
|
||||
void BgBowlWall_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
GlobalContext* globalCtx2 = globalCtx;
|
||||
void BgBowlWall_Draw(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
GlobalContext* globalCtx = globalCtx2;
|
||||
BgBowlWall* this = THIS;
|
||||
u32 frames;
|
||||
|
||||
OPEN_DISPS(globalCtx2->state.gfxCtx, "../z_bg_bowl_wall.c", 441);
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_bowl_wall.c", 441);
|
||||
|
||||
func_80093D84(globalCtx2->state.gfxCtx);
|
||||
func_80093D84(globalCtx->state.gfxCtx);
|
||||
gSPSegment(POLY_OPA_DISP++, 0x8,
|
||||
Gfx_TexScroll(globalCtx2->state.gfxCtx, 0, -2 * (frames = globalCtx2->state.frames), 16, 16));
|
||||
Gfx_TexScroll(globalCtx->state.gfxCtx, 0, -2 * (frames = globalCtx->state.frames), 16, 16));
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx2->state.gfxCtx, "../z_bg_bowl_wall.c", 453),
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_bowl_wall.c", 453),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
if (this->dyna.actor.params == 0) {
|
||||
|
@ -218,5 +218,5 @@ void BgBowlWall_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
gSPDisplayList(POLY_OPA_DISP++, gBowlingRound2WallDL);
|
||||
}
|
||||
|
||||
CLOSE_DISPS(globalCtx2->state.gfxCtx, "../z_bg_bowl_wall.c", 464);
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_bowl_wall.c", 464);
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ void BgDodoago_Draw(Actor* thisx, GlobalContext* globalCtx);
|
|||
|
||||
void func_80871CF4(BgDodoago* this, GlobalContext* globalCtx);
|
||||
void func_80871FB8(BgDodoago* this, GlobalContext* globalCtx);
|
||||
void func_8087227C(BgDodoago* this, GlobalContext* globalCtx);
|
||||
void BgDodoago_DoNothing(BgDodoago* this, GlobalContext* globalCtx);
|
||||
void func_80872288(BgDodoago* this, GlobalContext* globalCtx);
|
||||
|
||||
const ActorInit Bg_Dodoago_InitVars = {
|
||||
|
@ -119,7 +119,7 @@ void BgDodoago_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
ActorShape_Init(&this->dyna.actor.shape, 0.0f, NULL, 0.0f);
|
||||
|
||||
if (Flags_GetSwitch(globalCtx, (this->dyna.actor.params & 0x3F))) {
|
||||
BgDodoago_SetupAction(this, func_8087227C);
|
||||
BgDodoago_SetupAction(this, BgDodoago_DoNothing);
|
||||
this->dyna.actor.shape.rot.x = 0x1333;
|
||||
globalCtx->roomCtx.unk_74[0] = globalCtx->roomCtx.unk_74[1] = 0xFF;
|
||||
return;
|
||||
|
@ -175,22 +175,19 @@ void func_80871CF4(BgDodoago* this, GlobalContext* globalCtx) {
|
|||
sHasParent = true;
|
||||
D_80872824 = 0x32;
|
||||
}
|
||||
} else {
|
||||
} else if (Flags_GetEventChkInf(0xB0)) {
|
||||
Collider_UpdateCylinder(&this->dyna.actor, &this->colliders[0]);
|
||||
Collider_UpdateCylinder(&this->dyna.actor, &this->colliders[1]);
|
||||
Collider_UpdateCylinder(&this->dyna.actor, &this->colliders[2]);
|
||||
this->colliders[0].dim.pos.z += 200;
|
||||
this->colliders[1].dim.pos.z += 215;
|
||||
this->colliders[1].dim.pos.x += 90;
|
||||
this->colliders[2].dim.pos.z += 215;
|
||||
this->colliders[2].dim.pos.x -= 90;
|
||||
|
||||
if (Flags_GetEventChkInf(0xB0)) {
|
||||
Collider_UpdateCylinder(&this->dyna.actor, &this->colliders[0]);
|
||||
Collider_UpdateCylinder(&this->dyna.actor, &this->colliders[1]);
|
||||
Collider_UpdateCylinder(&this->dyna.actor, &this->colliders[2]);
|
||||
this->colliders[0].dim.pos.z += 0xC8;
|
||||
this->colliders[1].dim.pos.z += 0xD7;
|
||||
this->colliders[1].dim.pos.x += 0x5A;
|
||||
this->colliders[2].dim.pos.z += 0xD7;
|
||||
this->colliders[2].dim.pos.x -= 0x5A;
|
||||
|
||||
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->colliders[0].base);
|
||||
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->colliders[1].base);
|
||||
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->colliders[2].base);
|
||||
}
|
||||
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->colliders[0].base);
|
||||
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->colliders[1].base);
|
||||
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->colliders[2].base);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -215,7 +212,7 @@ void func_80871FB8(BgDodoago* this, GlobalContext* globalCtx) {
|
|||
D_80872824--;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (D_80872824 == 0x6C) {
|
||||
for (i = 10; i >= 0; i--) {
|
||||
currentPos.x = D_808725CC[i].x + this->dyna.actor.world.pos.x;
|
||||
|
@ -240,7 +237,7 @@ void func_80871FB8(BgDodoago* this, GlobalContext* globalCtx) {
|
|||
func_800AA000(500.0f, 0x78, 0x14, 0xA);
|
||||
|
||||
if (Math_SmoothStepToS(&this->dyna.actor.shape.rot.x, 0x1333, 0x6E - this->unk_164, 0x3E8, 0x32) == 0) {
|
||||
BgDodoago_SetupAction(this, func_8087227C);
|
||||
BgDodoago_SetupAction(this, BgDodoago_DoNothing);
|
||||
Audio_PlaySoundGeneral(NA_SE_EV_STONE_BOUND, &this->dyna.actor.projectedPos, 4, &D_801333E0, &D_801333E0,
|
||||
&D_801333E8);
|
||||
} else {
|
||||
|
@ -249,7 +246,7 @@ void func_80871FB8(BgDodoago* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
|
||||
void func_8087227C(BgDodoago* this, GlobalContext* globalCtx) {
|
||||
void BgDodoago_DoNothing(BgDodoago* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
void func_80872288(BgDodoago* this, GlobalContext* globalCtx) {
|
||||
|
|
|
@ -316,11 +316,12 @@ void BgDyYoseizo_ChooseType(BgDyYoseizo* this, GlobalContext* globalCtx) {
|
|||
void BgDyYoseizo_SetupSpinGrow_NoReward(BgDyYoseizo* this, GlobalContext* globalCtx) {
|
||||
if (globalCtx->sceneNum == SCENE_DAIYOUSEI_IZUMI) {
|
||||
this->frameCount = Animation_GetLastFrame(&gGreatFairySittingTransitionAnim);
|
||||
Animation_Change(&this->skelAnime, &gGreatFairySittingTransitionAnim, 1.0f, 0.0f, this->frameCount, 2, -10.0f);
|
||||
Animation_Change(&this->skelAnime, &gGreatFairySittingTransitionAnim, 1.0f, 0.0f, this->frameCount,
|
||||
ANIMMODE_ONCE, -10.0f);
|
||||
} else {
|
||||
this->frameCount = Animation_GetLastFrame(&gGreatFairyLayingDownTransitionAnim);
|
||||
Animation_Change(&this->skelAnime, &gGreatFairyLayingDownTransitionAnim, 1.0f, 0.0f, this->frameCount, 2,
|
||||
-10.0f);
|
||||
Animation_Change(&this->skelAnime, &gGreatFairyLayingDownTransitionAnim, 1.0f, 0.0f, this->frameCount,
|
||||
ANIMMODE_ONCE, -10.0f);
|
||||
}
|
||||
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_VO_FR_LAUGH_0);
|
||||
|
@ -373,10 +374,12 @@ void BgDyYoseizo_SetupGreetPlayer_NoReward(BgDyYoseizo* this, GlobalContext* glo
|
|||
|
||||
if (globalCtx->sceneNum == SCENE_DAIYOUSEI_IZUMI) {
|
||||
this->frameCount = Animation_GetLastFrame(&gGreatFairySittingAnim);
|
||||
Animation_Change(&this->skelAnime, &gGreatFairySittingAnim, 1.0f, 0.0f, this->frameCount, 0, -10.0f);
|
||||
Animation_Change(&this->skelAnime, &gGreatFairySittingAnim, 1.0f, 0.0f, this->frameCount, ANIMMODE_LOOP,
|
||||
-10.0f);
|
||||
} else {
|
||||
this->frameCount = Animation_GetLastFrame(&gGreatFairyLayingSidewaysAnim);
|
||||
Animation_Change(&this->skelAnime, &gGreatFairyLayingSidewaysAnim, 1.0f, 0.0f, this->frameCount, 0, -10.0f);
|
||||
Animation_Change(&this->skelAnime, &gGreatFairyLayingSidewaysAnim, 1.0f, 0.0f, this->frameCount, ANIMMODE_LOOP,
|
||||
-10.0f);
|
||||
}
|
||||
|
||||
this->actor.textId = 0xDB;
|
||||
|
@ -409,10 +412,12 @@ void BgDyYoseizo_GreetPlayer_NoReward(BgDyYoseizo* this, GlobalContext* globalCt
|
|||
void BgDyYoseizo_SetupHealPlayer_NoReward(BgDyYoseizo* this, GlobalContext* globalCtx) {
|
||||
if (globalCtx->sceneNum == SCENE_DAIYOUSEI_IZUMI) {
|
||||
this->frameCount = Animation_GetLastFrame(&gGreatFairyGivingUpgradeAnim);
|
||||
Animation_Change(&this->skelAnime, &gGreatFairyGivingUpgradeAnim, 1.0f, 0.0f, this->frameCount, 2, -10.0f);
|
||||
Animation_Change(&this->skelAnime, &gGreatFairyGivingUpgradeAnim, 1.0f, 0.0f, this->frameCount, ANIMMODE_ONCE,
|
||||
-10.0f);
|
||||
} else {
|
||||
this->frameCount = Animation_GetLastFrame(&gGreatFairyAnim_005810);
|
||||
Animation_Change(&this->skelAnime, &gGreatFairyAnim_005810, 1.0f, 0.0f, this->frameCount, 2, -10.0f);
|
||||
Animation_Change(&this->skelAnime, &gGreatFairyAnim_005810, 1.0f, 0.0f, this->frameCount, ANIMMODE_ONCE,
|
||||
-10.0f);
|
||||
}
|
||||
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_VO_FR_SMILE_0);
|
||||
|
@ -437,10 +442,12 @@ void BgDyYoseizo_HealPlayer_NoReward(BgDyYoseizo* this, GlobalContext* globalCtx
|
|||
if ((this->frameCount <= curFrame) && !(this->animationChanged)) {
|
||||
if (globalCtx->sceneNum == SCENE_DAIYOUSEI_IZUMI) {
|
||||
this->frameCount = Animation_GetLastFrame(&gGreatFairyAfterUpgradeAnim);
|
||||
Animation_Change(&this->skelAnime, &gGreatFairyAfterUpgradeAnim, 1.0f, 0.0f, this->frameCount, 0, -10.0f);
|
||||
Animation_Change(&this->skelAnime, &gGreatFairyAfterUpgradeAnim, 1.0f, 0.0f, this->frameCount,
|
||||
ANIMMODE_LOOP, -10.0f);
|
||||
} else {
|
||||
this->frameCount = Animation_GetLastFrame(&gGreatFairyAfterSpellAnim);
|
||||
Animation_Change(&this->skelAnime, &gGreatFairyAfterSpellAnim, 1.0f, 0.0f, this->frameCount, 0, -10.0f);
|
||||
Animation_Change(&this->skelAnime, &gGreatFairyAfterSpellAnim, 1.0f, 0.0f, this->frameCount, ANIMMODE_LOOP,
|
||||
-10.0f);
|
||||
}
|
||||
this->healingTimer = 150;
|
||||
this->animationChanged = true;
|
||||
|
@ -514,12 +521,12 @@ void BgDyYoseizo_SayFarewell_NoReward(BgDyYoseizo* this, GlobalContext* globalCt
|
|||
void BgDyYoseizo_SetupSpinShrink(BgDyYoseizo* this, GlobalContext* globalCtx) {
|
||||
if (globalCtx->sceneNum == SCENE_DAIYOUSEI_IZUMI) {
|
||||
this->frameCount = Animation_GetLastFrame(&gGreatFairyJewelFountainSpinShrinkAnim);
|
||||
Animation_Change(&this->skelAnime, &gGreatFairyJewelFountainSpinShrinkAnim, 1.0f, 0.0f, this->frameCount, 2,
|
||||
-10.0f);
|
||||
Animation_Change(&this->skelAnime, &gGreatFairyJewelFountainSpinShrinkAnim, 1.0f, 0.0f, this->frameCount,
|
||||
ANIMMODE_ONCE, -10.0f);
|
||||
} else {
|
||||
this->frameCount = Animation_GetLastFrame(&gGreatFairySpellFountainSpinShrinkAnim);
|
||||
Animation_Change(&this->skelAnime, &gGreatFairySpellFountainSpinShrinkAnim, 1.0f, 0.0f, this->frameCount, 2,
|
||||
-10.0f);
|
||||
Animation_Change(&this->skelAnime, &gGreatFairySpellFountainSpinShrinkAnim, 1.0f, 0.0f, this->frameCount,
|
||||
ANIMMODE_ONCE, -10.0f);
|
||||
}
|
||||
|
||||
this->vanishTimer = 5;
|
||||
|
@ -578,12 +585,12 @@ void BgDyYoseizo_SetupSpinGrow_Reward(BgDyYoseizo* this, GlobalContext* globalCt
|
|||
|
||||
if (globalCtx->sceneNum == SCENE_DAIYOUSEI_IZUMI) {
|
||||
this->frameCount = Animation_GetLastFrame(&gGreatFairySittingTransitionAnim);
|
||||
Animation_Change(&this->skelAnime, &gGreatFairySittingTransitionAnim, 1.0f, 0.0f, this->frameCount, 2,
|
||||
-10.0f);
|
||||
Animation_Change(&this->skelAnime, &gGreatFairySittingTransitionAnim, 1.0f, 0.0f, this->frameCount,
|
||||
ANIMMODE_ONCE, -10.0f);
|
||||
} else {
|
||||
this->frameCount = Animation_GetLastFrame(&gGreatFairyLayingDownTransitionAnim);
|
||||
Animation_Change(&this->skelAnime, &gGreatFairyLayingDownTransitionAnim, 1.0f, 0.0f, this->frameCount,
|
||||
2, -10.0f);
|
||||
ANIMMODE_ONCE, -10.0f);
|
||||
}
|
||||
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EV_GREAT_FAIRY_APPEAR);
|
||||
|
@ -621,11 +628,12 @@ void BgDyYoseizo_SpinGrowSetupGive_Reward(BgDyYoseizo* this, GlobalContext* glob
|
|||
if ((this->frameCount <= curFrame) && !this->animationChanged) {
|
||||
if (globalCtx->sceneNum == SCENE_DAIYOUSEI_IZUMI) {
|
||||
this->frameCount = Animation_GetLastFrame(&gGreatFairySittingAnim);
|
||||
Animation_Change(&this->skelAnime, &gGreatFairySittingAnim, 1.0f, 0.0f, this->frameCount, 0, -10.0f);
|
||||
Animation_Change(&this->skelAnime, &gGreatFairySittingAnim, 1.0f, 0.0f, this->frameCount, ANIMMODE_LOOP,
|
||||
-10.0f);
|
||||
} else {
|
||||
this->frameCount = Animation_GetLastFrame(&gGreatFairyLayingSidewaysAnim);
|
||||
Animation_Change(&this->skelAnime, &gGreatFairyLayingSidewaysAnim, 1.0f, 0.0f, this->frameCount, 0,
|
||||
-10.0f);
|
||||
Animation_Change(&this->skelAnime, &gGreatFairyLayingSidewaysAnim, 1.0f, 0.0f, this->frameCount,
|
||||
ANIMMODE_LOOP, -10.0f);
|
||||
}
|
||||
this->animationChanged = true;
|
||||
}
|
||||
|
@ -635,11 +643,12 @@ void BgDyYoseizo_SpinGrowSetupGive_Reward(BgDyYoseizo* this, GlobalContext* glob
|
|||
this->finishedSpinGrow = this->animationChanged = false;
|
||||
if (globalCtx->sceneNum == SCENE_DAIYOUSEI_IZUMI) {
|
||||
this->frameCount = Animation_GetLastFrame(&gGreatFairyGivingUpgradeAnim);
|
||||
Animation_Change(&this->skelAnime, &gGreatFairyGivingUpgradeAnim, 1.0f, 0.0f, this->frameCount, 2,
|
||||
-10.0f);
|
||||
Animation_Change(&this->skelAnime, &gGreatFairyGivingUpgradeAnim, 1.0f, 0.0f, this->frameCount,
|
||||
ANIMMODE_ONCE, -10.0f);
|
||||
} else {
|
||||
this->frameCount = Animation_GetLastFrame(&gGreatFairyAnim_005810);
|
||||
Animation_Change(&this->skelAnime, &gGreatFairyAnim_005810, 1.0f, 0.0f, this->frameCount, 2, -10.0f);
|
||||
Animation_Change(&this->skelAnime, &gGreatFairyAnim_005810, 1.0f, 0.0f, this->frameCount, ANIMMODE_ONCE,
|
||||
-10.0f);
|
||||
}
|
||||
this->mouthState = 1;
|
||||
this->actionFunc = BgDyYoseizo_Give_Reward;
|
||||
|
@ -674,10 +683,12 @@ void BgDyYoseizo_Give_Reward(BgDyYoseizo* this, GlobalContext* globalCtx) {
|
|||
if ((this->frameCount <= curFrame) && !this->animationChanged) {
|
||||
if (globalCtx->sceneNum == SCENE_DAIYOUSEI_IZUMI) {
|
||||
this->frameCount = Animation_GetLastFrame(&gGreatFairyAfterUpgradeAnim);
|
||||
Animation_Change(&this->skelAnime, &gGreatFairyAfterUpgradeAnim, 1.0f, 0.0f, this->frameCount, 0, -10.0f);
|
||||
Animation_Change(&this->skelAnime, &gGreatFairyAfterUpgradeAnim, 1.0f, 0.0f, this->frameCount,
|
||||
ANIMMODE_LOOP, -10.0f);
|
||||
} else {
|
||||
this->frameCount = Animation_GetLastFrame(&gGreatFairyAfterSpellAnim);
|
||||
Animation_Change(&this->skelAnime, &gGreatFairyAfterSpellAnim, 1.0f, 0.0f, this->frameCount, 0, -10.0f);
|
||||
Animation_Change(&this->skelAnime, &gGreatFairyAfterSpellAnim, 1.0f, 0.0f, this->frameCount, ANIMMODE_LOOP,
|
||||
-10.0f);
|
||||
}
|
||||
this->animationChanged = true;
|
||||
}
|
||||
|
|
|
@ -47,8 +47,8 @@ void BgGndDarkmeiro_ToggleBlock(BgGndDarkmeiro* this, GlobalContext* globalCtx)
|
|||
}
|
||||
}
|
||||
|
||||
void BgGndDarkmeiro_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
GlobalContext* globalCtx2 = globalCtx;
|
||||
void BgGndDarkmeiro_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
GlobalContext* globalCtx = globalCtx2;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
BgGndDarkmeiro* this = THIS;
|
||||
|
||||
|
@ -61,7 +61,7 @@ void BgGndDarkmeiro_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
break;
|
||||
case DARKMEIRO_CLEAR_BLOCK:
|
||||
CollisionHeader_GetVirtual(&gClearBlockCol, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx2, &globalCtx2->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
if (((this->dyna.actor.params >> 8) & 0x3F) == 0x3F) {
|
||||
this->updateFunc = BgGndDarkmeiro_UpdateStaticBlock;
|
||||
this->dyna.actor.draw = BgGndDarkmeiro_DrawStaticBlock;
|
||||
|
@ -69,8 +69,8 @@ void BgGndDarkmeiro_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->actionFlags = this->timer1 = this->timer2 = 0;
|
||||
thisx->draw = BgGndDarkmeiro_DrawSwitchBlock;
|
||||
this->updateFunc = BgGndDarkmeiro_UpdateSwitchBlock;
|
||||
if (!Flags_GetSwitch(globalCtx2, (this->dyna.actor.params >> 8) & 0x3F)) {
|
||||
func_8003EBF8(globalCtx2, &globalCtx2->colCtx.dyna, this->dyna.bgId);
|
||||
if (!Flags_GetSwitch(globalCtx, (this->dyna.actor.params >> 8) & 0x3F)) {
|
||||
func_8003EBF8(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
} else {
|
||||
this->timer1 = 64;
|
||||
this->actionFlags |= 2;
|
||||
|
@ -81,30 +81,30 @@ void BgGndDarkmeiro_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->actionFlags = this->timer1 = this->timer2 = 0;
|
||||
this->updateFunc = BgGndDarkmeiro_UpdateBlockTimer;
|
||||
thisx->draw = NULL;
|
||||
if (Flags_GetSwitch(globalCtx2, ((this->dyna.actor.params >> 8) & 0x3F) + 1)) {
|
||||
if (Flags_GetSwitch(globalCtx, ((this->dyna.actor.params >> 8) & 0x3F) + 1)) {
|
||||
this->timer1 = 64;
|
||||
this->actionFlags |= 4;
|
||||
}
|
||||
if (Flags_GetSwitch(globalCtx2, ((this->dyna.actor.params >> 8) & 0x3F) + 2)) {
|
||||
if (Flags_GetSwitch(globalCtx, ((this->dyna.actor.params >> 8) & 0x3F) + 2)) {
|
||||
this->timer2 = 64;
|
||||
this->actionFlags |= 8;
|
||||
}
|
||||
if ((this->timer1 != 0) || (this->timer2 != 0)) {
|
||||
Flags_SetSwitch(globalCtx2, (this->dyna.actor.params >> 8) & 0x3F);
|
||||
Flags_SetSwitch(globalCtx, (this->dyna.actor.params >> 8) & 0x3F);
|
||||
} else {
|
||||
Flags_UnsetSwitch(globalCtx2, (this->dyna.actor.params >> 8) & 0x3F);
|
||||
Flags_UnsetSwitch(globalCtx, (this->dyna.actor.params >> 8) & 0x3F);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void BgGndDarkmeiro_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
GlobalContext* globalCtx2 = globalCtx;
|
||||
void BgGndDarkmeiro_Destroy(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
GlobalContext* globalCtx = globalCtx2;
|
||||
BgGndDarkmeiro* this = THIS;
|
||||
|
||||
if ((this->dyna.actor.params & 0xFF) == 1) {
|
||||
if (1) {}
|
||||
DynaPoly_DeleteBgActor(globalCtx2, &globalCtx2->colCtx.dyna, this->dyna.bgId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -170,9 +170,9 @@ void BgGndDarkmeiro_UpdateSwitchBlock(BgGndDarkmeiro* this, GlobalContext* globa
|
|||
BgGndDarkmeiro_ToggleBlock(this, globalCtx);
|
||||
}
|
||||
|
||||
void BgGndDarkmeiro_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
void BgGndDarkmeiro_Update(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
BgGndDarkmeiro* this = THIS;
|
||||
GlobalContext* globalCtx2 = globalCtx;
|
||||
GlobalContext* globalCtx = globalCtx2;
|
||||
|
||||
this->updateFunc(this, globalCtx2);
|
||||
}
|
||||
|
|
|
@ -70,7 +70,7 @@ void func_8087B7E8(BgHaka* this, GlobalContext* globalCtx) {
|
|||
Player* player = PLAYER;
|
||||
|
||||
if (this->dyna.unk_150 != 0.0f) {
|
||||
if (globalCtx->sceneNum == SCENE_SPOT02 && LINK_IS_CHILD && !gSaveContext.nightFlag) {
|
||||
if (globalCtx->sceneNum == SCENE_SPOT02 && !LINK_IS_ADULT && !gSaveContext.nightFlag) {
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
player->stateFlags2 &= ~0x10;
|
||||
if (!Gameplay_InCsMode(globalCtx)) {
|
||||
|
@ -79,7 +79,7 @@ void func_8087B7E8(BgHaka* this, GlobalContext* globalCtx) {
|
|||
this->actionFunc = func_8087BAE4;
|
||||
}
|
||||
} else if (0.0f < this->dyna.unk_150 ||
|
||||
(globalCtx->sceneNum == SCENE_SPOT06 && LINK_IS_CHILD && !Flags_GetSwitch(globalCtx, 0x23))) {
|
||||
(globalCtx->sceneNum == SCENE_SPOT06 && !LINK_IS_ADULT && !Flags_GetSwitch(globalCtx, 0x23))) {
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
player->stateFlags2 &= ~0x10;
|
||||
} else {
|
||||
|
@ -106,7 +106,7 @@ void func_8087B938(BgHaka* this, GlobalContext* globalCtx) {
|
|||
player->stateFlags2 &= ~0x10;
|
||||
if (this->dyna.actor.params == 1) {
|
||||
func_80078884(NA_SE_SY_CORRECT_CHIME);
|
||||
} else if (gSaveContext.nightFlag && globalCtx->sceneNum == SCENE_SPOT02) {
|
||||
} else if (!IS_DAY && globalCtx->sceneNum == SCENE_SPOT02) {
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_POH, this->dyna.actor.home.pos.x,
|
||||
this->dyna.actor.home.pos.y, this->dyna.actor.home.pos.z, 0, this->dyna.actor.shape.rot.y, 0,
|
||||
1);
|
||||
|
|
|
@ -95,14 +95,14 @@ void BgHidanHamstep_SetupAction(BgHidanHamstep* this, s32 action) {
|
|||
this->actionFunc = sActionFuncs[action];
|
||||
}
|
||||
|
||||
s32 BgHidanHamstep_SpawnChildren(BgHidanHamstep* this, GlobalContext* globalCtx) {
|
||||
s32 BgHidanHamstep_SpawnChildren(BgHidanHamstep* this, GlobalContext* globalCtx2) {
|
||||
BgHidanHamstep* step = this;
|
||||
s32 i;
|
||||
Vec3f pos;
|
||||
f32 sin;
|
||||
f32 cos;
|
||||
s16 params;
|
||||
GlobalContext* globalCtx2 = globalCtx;
|
||||
GlobalContext* globalCtx = globalCtx2;
|
||||
|
||||
pos = pos; // Required to match
|
||||
pos.y = this->dyna.actor.home.pos.y - 100.0f;
|
||||
|
@ -113,11 +113,11 @@ s32 BgHidanHamstep_SpawnChildren(BgHidanHamstep* this, GlobalContext* globalCtx)
|
|||
pos.x = (((i * 160.0f) + 60.0f) * sin) + this->dyna.actor.home.pos.x;
|
||||
pos.z = (((i * 160.0f) + 60.0f) * cos) + this->dyna.actor.home.pos.z;
|
||||
|
||||
params = ((i + 1) & 0xFF);
|
||||
params = (i + 1) & 0xFF;
|
||||
params |= (this->dyna.actor.params & 0xFF00);
|
||||
|
||||
step = (BgHidanHamstep*)Actor_SpawnAsChild(
|
||||
&globalCtx2->actorCtx, &step->dyna.actor, globalCtx2, ACTOR_BG_HIDAN_HAMSTEP, pos.x, pos.y, pos.z,
|
||||
&globalCtx->actorCtx, &step->dyna.actor, globalCtx, ACTOR_BG_HIDAN_HAMSTEP, pos.x, pos.y, pos.z,
|
||||
this->dyna.actor.world.rot.x, this->dyna.actor.world.rot.y, this->dyna.actor.world.rot.z, params);
|
||||
|
||||
if (step == NULL) {
|
||||
|
|
|
@ -198,8 +198,8 @@ void BgIceShelter_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|||
Collider_DestroyCylinder(globalCtx, &this->cylinder1);
|
||||
}
|
||||
|
||||
s16 D_80891794[] = { 0x0000, 0x4000, 0x2000, 0x6000, 0x1000, 0x5000, 0x3000, 0x7000 };
|
||||
s16 D_808917A4[] = { 0x0000, 0x003C, 0x0018, 0x0054, 0x0030, 0x000C, 0x0048, 0x0024 };
|
||||
static s16 D_80891794[] = { 0x0000, 0x4000, 0x2000, 0x6000, 0x1000, 0x5000, 0x3000, 0x7000 };
|
||||
static s16 D_808917A4[] = { 0x0000, 0x003C, 0x0018, 0x0054, 0x0030, 0x000C, 0x0048, 0x0024 };
|
||||
|
||||
void func_80890B8C(BgIceShelter* this, GlobalContext* globalCtx, f32 chance, f32 scale) {
|
||||
f32 cos;
|
||||
|
|
|
@ -46,7 +46,7 @@ void BgInGate_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
|
||||
if ((globalCtx->sceneNum != SCENE_SPOT20 || LINK_IS_CHILD) ||
|
||||
if ((globalCtx->sceneNum != SCENE_SPOT20 || !LINK_IS_ADULT) ||
|
||||
(((gSaveContext.eventChkInf[1] & 0x100)) && (gSaveContext.cutsceneIndex != 0xFFF0))) {
|
||||
Actor_Kill(&this->dyna.actor);
|
||||
return;
|
||||
|
|
|
@ -133,23 +133,23 @@ void BgJyaLift_SetFinalPosY(BgJyaLift* this) {
|
|||
this->dyna.actor.world.pos.y = 973.0f;
|
||||
}
|
||||
|
||||
void BgJyaLift_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
void BgJyaLift_Update(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
BgJyaLift* this = THIS;
|
||||
GlobalContext* globalCtx2 = globalCtx;
|
||||
GlobalContext* globalCtx = globalCtx2;
|
||||
|
||||
if (this->actionFunc != NULL) {
|
||||
this->actionFunc(this, globalCtx);
|
||||
}
|
||||
if ((this->dyna.unk_160 & 4) && ((this->unk_16B & 4) == 0)) {
|
||||
Camera_ChangeSetting(globalCtx2->cameraPtrs[MAIN_CAM], CAM_SET_TEPPEN);
|
||||
Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_TEPPEN);
|
||||
} else if (((this->dyna.unk_160) & 4) == 0 && ((this->unk_16B & 4)) &&
|
||||
(globalCtx2->cameraPtrs[MAIN_CAM]->setting == CAM_SET_TEPPEN)) {
|
||||
Camera_ChangeSetting(globalCtx2->cameraPtrs[MAIN_CAM], CAM_SET_DUNGEON0);
|
||||
(globalCtx->cameraPtrs[MAIN_CAM]->setting == CAM_SET_TEPPEN)) {
|
||||
Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_DUNGEON0);
|
||||
}
|
||||
this->unk_16B = this->dyna.unk_160;
|
||||
|
||||
// Spirit Temple room 5 is the main room with the statue room 25 is directly above room 5
|
||||
if ((globalCtx2->roomCtx.curRoom.num != 5) && (globalCtx2->roomCtx.curRoom.num != 25)) {
|
||||
if ((globalCtx->roomCtx.curRoom.num != 5) && (globalCtx->roomCtx.curRoom.num != 25)) {
|
||||
Actor_Kill(thisx);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ void BgSpot00Break_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
|
||||
if (LINK_IS_CHILD) {
|
||||
if (!LINK_IS_ADULT) {
|
||||
Actor_Kill(&this->dyna.actor);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -66,22 +66,22 @@ void BgSpot00Hanebasi_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
|
||||
if (this->dyna.actor.params == DT_DRAWBRIDGE) {
|
||||
if ((LINK_IS_ADULT) && (gSaveContext.sceneSetupIndex < 4)) {
|
||||
if (LINK_IS_ADULT && (gSaveContext.sceneSetupIndex < 4)) {
|
||||
Actor_Kill(&this->dyna.actor);
|
||||
return;
|
||||
}
|
||||
|
||||
if ((gSaveContext.sceneSetupIndex != 6) &&
|
||||
((gSaveContext.sceneSetupIndex == 4) || (gSaveContext.sceneSetupIndex == 5) ||
|
||||
((LINK_IS_CHILD) && (gSaveContext.nightFlag != 0)))) {
|
||||
(!LINK_IS_ADULT && !IS_DAY))) {
|
||||
this->dyna.actor.shape.rot.x = -0x4000;
|
||||
} else {
|
||||
this->dyna.actor.shape.rot.x = 0;
|
||||
}
|
||||
|
||||
if (gSaveContext.sceneSetupIndex != 6) {
|
||||
if ((CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD)) && (CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) &&
|
||||
(CHECK_QUEST_ITEM(QUEST_ZORA_SAPPHIRE)) && (!(gSaveContext.eventChkInf[8] & 1))) {
|
||||
if (CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD) && CHECK_QUEST_ITEM(QUEST_GORON_RUBY) &&
|
||||
CHECK_QUEST_ITEM(QUEST_ZORA_SAPPHIRE) && !(gSaveContext.eventChkInf[8] & 1)) {
|
||||
this->dyna.actor.shape.rot.x = -0x4000;
|
||||
}
|
||||
}
|
||||
|
@ -140,8 +140,8 @@ void BgSpot00Hanebasi_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|||
void BgSpot00Hanebasi_DrawbridgeWait(BgSpot00Hanebasi* this, GlobalContext* globalCtx) {
|
||||
BgSpot00Hanebasi* child = (BgSpot00Hanebasi*)this->dyna.actor.child;
|
||||
|
||||
if ((gSaveContext.sceneSetupIndex >= 4) || (!(CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD))) ||
|
||||
(!(CHECK_QUEST_ITEM(QUEST_GORON_RUBY))) || (!(CHECK_QUEST_ITEM(QUEST_ZORA_SAPPHIRE))) ||
|
||||
if ((gSaveContext.sceneSetupIndex >= 4) || !CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD) ||
|
||||
!CHECK_QUEST_ITEM(QUEST_GORON_RUBY) || !CHECK_QUEST_ITEM(QUEST_ZORA_SAPPHIRE) ||
|
||||
(gSaveContext.eventChkInf[8] & 1)) {
|
||||
if (this->dyna.actor.shape.rot.x != 0) {
|
||||
if (Flags_GetEnv(globalCtx, 0) || ((gSaveContext.sceneSetupIndex < 4) && (gSaveContext.nightFlag == 0))) {
|
||||
|
@ -153,8 +153,7 @@ void BgSpot00Hanebasi_DrawbridgeWait(BgSpot00Hanebasi* this, GlobalContext* glob
|
|||
|
||||
if (this) {} // required to match
|
||||
}
|
||||
|
||||
if ((this->dyna.actor.shape.rot.x == 0) && (gSaveContext.sceneSetupIndex < 4) && (LINK_IS_CHILD) &&
|
||||
if ((this->dyna.actor.shape.rot.x == 0) && (gSaveContext.sceneSetupIndex < 4) && !LINK_IS_ADULT &&
|
||||
(gSaveContext.nightFlag != 0)) {
|
||||
this->actionFunc = BgSpot00Hanebasi_DrawbridgeRiseAndFall;
|
||||
this->destAngle = -0x4000;
|
||||
|
@ -214,9 +213,8 @@ void BgSpot00Hanebasi_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
if (this->dyna.actor.params == DT_DRAWBRIDGE) {
|
||||
if (globalCtx->sceneNum == SCENE_SPOT00) {
|
||||
if ((CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD)) && (CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) &&
|
||||
(CHECK_QUEST_ITEM(QUEST_ZORA_SAPPHIRE)) && (!(gSaveContext.eventChkInf[8] & 1)) &&
|
||||
(gSaveContext.linkAge == 1)) {
|
||||
if (CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD) && CHECK_QUEST_ITEM(QUEST_GORON_RUBY) &&
|
||||
CHECK_QUEST_ITEM(QUEST_ZORA_SAPPHIRE) && !(gSaveContext.eventChkInf[8] & 1) && LINK_IS_CHILD) {
|
||||
Player* player = PLAYER;
|
||||
|
||||
if ((player->actor.world.pos.x > -450.0f) && (player->actor.world.pos.x < 450.0f) &&
|
||||
|
@ -321,7 +319,7 @@ void BgSpot00Hanebasi_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
thisx->child->child->world.pos.z = newPos.z;
|
||||
|
||||
if (gSaveContext.sceneSetupIndex != 12) {
|
||||
if ((gSaveContext.sceneSetupIndex >= 4) || ((LINK_IS_CHILD) && (thisx->shape.rot.x < -0x2000))) {
|
||||
if ((gSaveContext.sceneSetupIndex >= 4) || (!LINK_IS_ADULT && (thisx->shape.rot.x < -0x2000))) {
|
||||
BgSpot00Hanebasi_DrawTorches(thisx, globalCtx);
|
||||
} else {
|
||||
sTorchFlameScale = 0.0f;
|
||||
|
|
|
@ -48,7 +48,7 @@ void BgSpot01Idosoko_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
|
||||
CollisionHeader_GetVirtual(&gKakarikoBOTWStoneCol, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
if (LINK_IS_CHILD) {
|
||||
if (!LINK_IS_ADULT) {
|
||||
Actor_Kill(&this->dyna.actor);
|
||||
} else {
|
||||
BgSpot01Idosoko_SetupAction(this, func_808ABF54);
|
||||
|
|
|
@ -107,7 +107,7 @@ void func_808AC2BC(BgSpot01Objects2* this, GlobalContext* globalCtx) {
|
|||
case 3: // Shooting Gallery, spawns Carpenter Sabooro during the day
|
||||
CollisionHeader_GetVirtual(&D_06001C58, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, thisx, colHeader);
|
||||
if (gSaveContext.nightFlag == 0) {
|
||||
if (IS_DAY) {
|
||||
func_808AC22C(globalCtx->setupPathList, &position, ((s32)thisx->params >> 8) & 0xFF, 0);
|
||||
Actor_SpawnAsChild(&globalCtx->actorCtx, thisx, globalCtx, ACTOR_EN_DAIKU_KAKARIKO, position.x,
|
||||
position.y, position.z, thisx->world.rot.x, thisx->world.rot.y,
|
||||
|
|
|
@ -164,7 +164,7 @@ void func_808ACA08(BgSpot02Objects* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
if (globalCtx->csCtx.frames == 402) {
|
||||
if (LINK_IS_CHILD) {
|
||||
if (!LINK_IS_ADULT) {
|
||||
func_8002F7DC(&player->actor, NA_SE_VO_LI_DEMO_DAMAGE_KID);
|
||||
} else {
|
||||
func_8002F7DC(&player->actor, NA_SE_VO_LI_DEMO_DAMAGE);
|
||||
|
|
|
@ -177,7 +177,7 @@ void BgSpot06Objects_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, thisx, colHeader);
|
||||
this->actionFunc = BgSpot06Objects_DoNothing;
|
||||
|
||||
if (LINK_IS_CHILD) {
|
||||
if (!LINK_IS_ADULT) {
|
||||
Actor_Kill(thisx);
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -100,7 +100,7 @@ void BgSpot07Taki_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, ((frames * -1) & 0x7F), ((frames * 1) & 0x7F), 32, 32, 1,
|
||||
((frames * 1) & 0x7F), ((frames * 1) & 0x7F), 32, 32));
|
||||
|
||||
if (LINK_IS_CHILD) {
|
||||
if (!LINK_IS_ADULT) {
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 255, 255, 255, 128);
|
||||
if (this->dyna.actor.params == 0) {
|
||||
gSPSegment(POLY_XLU_DISP++, 0x09,
|
||||
|
|
|
@ -72,7 +72,7 @@ void BgSpot16Doughnut_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
break;
|
||||
}
|
||||
osSyncPrintf(VT_FGCOL(CYAN) "%f" VT_RST "\n", this->actor.scale.x);
|
||||
if (LINK_IS_CHILD || gSaveContext.eventChkInf[2] & 0x8000) {
|
||||
if (!LINK_IS_ADULT || gSaveContext.eventChkInf[2] & 0x8000) {
|
||||
this->fireFlag &= ~1;
|
||||
} else {
|
||||
this->fireFlag |= 1;
|
||||
|
|
|
@ -102,9 +102,9 @@ void func_808BAF40(BgTokiSwd* this, GlobalContext* globalCtx) {
|
|||
globalCtx->csCtx.segment = D_808BBD90;
|
||||
gSaveContext.cutsceneTrigger = 1;
|
||||
}
|
||||
if (LINK_IS_CHILD || ((gSaveContext.eventChkInf[5] & 0x20))) {
|
||||
if (!LINK_IS_ADULT || ((gSaveContext.eventChkInf[5] & 0x20))) {
|
||||
if (Actor_HasParent(&this->actor, globalCtx)) {
|
||||
if (LINK_IS_CHILD) {
|
||||
if (!LINK_IS_ADULT) {
|
||||
Item_Give(globalCtx, ITEM_SWORD_MASTER);
|
||||
globalCtx->csCtx.segment = D_808BB2F0;
|
||||
} else {
|
||||
|
@ -135,7 +135,7 @@ void func_808BB0AC(BgTokiSwd* this, GlobalContext* globalCtx) {
|
|||
|
||||
// if sword has a parent it has been pulled/placed from the pedestal
|
||||
if (Actor_HasParent(&this->actor, globalCtx)) {
|
||||
if (LINK_IS_CHILD) {
|
||||
if (!LINK_IS_ADULT) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_IT_SWORD_PUTAWAY_STN);
|
||||
this->actor.draw = NULL; // sword has been pulled, dont draw sword
|
||||
} else {
|
||||
|
@ -161,22 +161,22 @@ void BgTokiSwd_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
|
||||
}
|
||||
|
||||
void BgTokiSwd_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
GlobalContext* globalCtx2 = globalCtx;
|
||||
void BgTokiSwd_Draw(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
GlobalContext* globalCtx = globalCtx2;
|
||||
BgTokiSwd* this = THIS;
|
||||
s32 pad[3];
|
||||
|
||||
OPEN_DISPS(globalCtx2->state.gfxCtx, "../z_bg_toki_swd.c", 727);
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_toki_swd.c", 727);
|
||||
|
||||
func_80093D18(globalCtx2->state.gfxCtx);
|
||||
func_80093D18(globalCtx->state.gfxCtx);
|
||||
|
||||
func_8002EBCC(&this->actor, globalCtx2, 0);
|
||||
func_8002EBCC(&this->actor, globalCtx, 0);
|
||||
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08,
|
||||
Gfx_TexScroll(globalCtx2->state.gfxCtx, 0, -(globalCtx2->gameplayFrames % 0x80), 32, 32));
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx2->state.gfxCtx, "../z_bg_toki_swd.c", 742),
|
||||
Gfx_TexScroll(globalCtx->state.gfxCtx, 0, -(globalCtx->gameplayFrames % 0x80), 32, 32));
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_toki_swd.c", 742),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, D_06001BD0);
|
||||
|
||||
CLOSE_DISPS(globalCtx2->state.gfxCtx, "../z_bg_toki_swd.c", 776);
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_toki_swd.c", 776);
|
||||
}
|
||||
|
|
|
@ -69,7 +69,7 @@ void BgTreemouth_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
ActorShape_Init(&thisx->shape, 0.0f, NULL, 0.0f);
|
||||
Actor_SetFocus(thisx, 50.0f);
|
||||
|
||||
if ((gSaveContext.sceneSetupIndex < 4) && LINK_IS_CHILD) {
|
||||
if ((gSaveContext.sceneSetupIndex < 4) && !LINK_IS_ADULT) {
|
||||
BgTreemouth_SetupAction(this, func_808BC8B8);
|
||||
} else if (LINK_IS_ADULT || (gSaveContext.sceneSetupIndex == 7)) {
|
||||
this->unk_168 = 0.0f;
|
||||
|
@ -138,7 +138,7 @@ void func_808BC864(BgTreemouth* this, GlobalContext* globalCtx) {
|
|||
|
||||
void func_808BC8B8(BgTreemouth* this, GlobalContext* globalCtx) {
|
||||
if ((!(Flags_GetEventChkInf(5))) || LINK_IS_ADULT) {
|
||||
if (LINK_IS_CHILD) {
|
||||
if (!LINK_IS_ADULT) {
|
||||
if (Flags_GetEventChkInf(0xC)) {
|
||||
if (Actor_IsFacingAndNearPlayer(&this->dyna.actor, 1658.0f, 0x7530)) {
|
||||
this->dyna.actor.flags |= 1;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#include "z64cutscene_commands.h"
|
||||
|
||||
// clang-format off
|
||||
CutsceneData D_808BCE20[] = {
|
||||
static CutsceneData D_808BCE20[] = {
|
||||
CS_BEGIN_CUTSCENE(12, 3000),
|
||||
CS_UNK_DATA_LIST(0x00000015, 1),
|
||||
CS_UNK_DATA(0x00010000, 0x0BB80000, 0x00000000, 0x00000000, 0x0000000F, 0xFFFFFFDE, 0x00000000, 0x0000000F, 0xFFFFFFDE, 0x00000000, 0x00000000, 0x00000000),
|
||||
|
@ -62,7 +62,7 @@ CutsceneData D_808BCE20[] = {
|
|||
CS_END(),
|
||||
};
|
||||
|
||||
CutsceneData D_808BD2A0[] = {
|
||||
static CutsceneData D_808BD2A0[] = {
|
||||
CS_BEGIN_CUTSCENE(9, 3000),
|
||||
CS_UNK_DATA_LIST(0x00000015, 1),
|
||||
CS_UNK_DATA(0x00010000, 0x0BB80000, 0x00000000, 0x00000000, 0x0000000F, 0xFFFFFFDE, 0x00000000, 0x0000000F, 0xFFFFFFDE, 0x00000000, 0x00000000, 0x00000000),
|
||||
|
@ -102,7 +102,7 @@ CutsceneData D_808BD2A0[] = {
|
|||
CS_END(),
|
||||
};
|
||||
|
||||
CutsceneData D_808BD520[] = {
|
||||
static CutsceneData D_808BD520[] = {
|
||||
CS_BEGIN_CUTSCENE(8, 3000),
|
||||
CS_UNK_DATA_LIST(0x00000015, 1),
|
||||
CS_UNK_DATA(0x00010000, 0x0BB80000, 0x00000000, 0x00000000, 0x0000000F, 0xFFFFFFDE, 0x00000000, 0x0000000F, 0xFFFFFFDE, 0x00000000, 0x00000000, 0x00000000),
|
||||
|
@ -137,7 +137,7 @@ CutsceneData D_808BD520[] = {
|
|||
CS_END(),
|
||||
};
|
||||
|
||||
CutsceneData D_808BD790[] = {
|
||||
static CutsceneData D_808BD790[] = {
|
||||
CS_BEGIN_CUTSCENE(8, 3000),
|
||||
CS_UNK_DATA_LIST(0x00000015, 1),
|
||||
CS_UNK_DATA(0x00010000, 0x0BB80000, 0x00000000, 0x00000000, 0x0000000F, 0xFFFFFFDE, 0x00000000, 0x0000000F, 0xFFFFFFDE, 0x00000000, 0x00000000, 0x00000000),
|
||||
|
|
|
@ -49,7 +49,7 @@ const ActorInit Boss_Dodongo_InitVars = {
|
|||
|
||||
static InitChainEntry sInitChain[] = {
|
||||
ICHAIN_U8(targetMode, 5, ICHAIN_CONTINUE),
|
||||
ICHAIN_S8(naviEnemyId, 12, ICHAIN_CONTINUE),
|
||||
ICHAIN_S8(naviEnemyId, 0x0C, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32_DIV1000(gravity, -3000.0f, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32(targetArrowOffset, 8200.0f, ICHAIN_STOP),
|
||||
};
|
||||
|
@ -259,7 +259,7 @@ void BossDodongo_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|||
void BossDodongo_SetupIntroCutscene(BossDodongo* this, GlobalContext* globalCtx) {
|
||||
s16 frames = Animation_GetLastFrame(&D_0600F0D8);
|
||||
|
||||
Animation_Change(&this->skelAnime, &D_0600F0D8, 1.0f, 0.0f, frames, 0, -10.0f);
|
||||
Animation_Change(&this->skelAnime, &D_0600F0D8, 1.0f, 0.0f, frames, ANIMMODE_LOOP, -10.0f);
|
||||
this->actionFunc = BossDodongo_IntroCutscene;
|
||||
this->csState = 0;
|
||||
this->unk_1BC = 1;
|
||||
|
@ -528,7 +528,8 @@ void BossDodongo_SetupBlowFire(BossDodongo* this) {
|
|||
|
||||
void BossDodongo_SetupInhale(BossDodongo* this) {
|
||||
this->actor.speedXZ = 0.0f;
|
||||
Animation_Change(&this->skelAnime, &D_06008EEC, 1.0f, 0.0f, Animation_GetLastFrame(&D_06008EEC), 2, -5.0f);
|
||||
Animation_Change(&this->skelAnime, &D_06008EEC, 1.0f, 0.0f, Animation_GetLastFrame(&D_06008EEC), ANIMMODE_ONCE,
|
||||
-5.0f);
|
||||
this->actionFunc = BossDodongo_Inhale;
|
||||
this->unk_1DA = 100;
|
||||
this->unk_1AC = 0;
|
||||
|
|
|
@ -61,7 +61,7 @@ const ActorInit Boss_Fd_InitVars = {
|
|||
|
||||
static InitChainEntry sInitChain[] = {
|
||||
ICHAIN_U8(targetMode, 5, ICHAIN_CONTINUE),
|
||||
ICHAIN_S8(naviEnemyId, 33, ICHAIN_CONTINUE),
|
||||
ICHAIN_S8(naviEnemyId, 0x21, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32_DIV1000(gravity, 0, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32(targetArrowOffset, 0, ICHAIN_STOP),
|
||||
};
|
||||
|
|
|
@ -69,7 +69,7 @@ static Vec3f sHoleLocations[] = {
|
|||
|
||||
static InitChainEntry sInitChain[] = {
|
||||
ICHAIN_U8(targetMode, 5, ICHAIN_CONTINUE),
|
||||
ICHAIN_S8(naviEnemyId, 33, ICHAIN_CONTINUE),
|
||||
ICHAIN_S8(naviEnemyId, 0x21, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32_DIV1000(gravity, 0, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32(targetArrowOffset, 0, ICHAIN_STOP),
|
||||
};
|
||||
|
@ -951,8 +951,8 @@ void BossFd2_UpdateFace(BossFd2* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
|
||||
void BossFd2_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
GlobalContext* globalCtx2 = globalCtx;
|
||||
void BossFd2_Update(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
GlobalContext* globalCtx = globalCtx2;
|
||||
BossFd2* this = THIS;
|
||||
s16 i;
|
||||
|
||||
|
@ -962,7 +962,7 @@ void BossFd2_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->work[FD2_VAR_TIMER]++;
|
||||
this->work[FD2_UNK_TIMER]++;
|
||||
|
||||
this->actionFunc(this, globalCtx2);
|
||||
this->actionFunc(this, globalCtx);
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(this->timers); i++) {
|
||||
if (this->timers[i] != 0) {
|
||||
|
@ -978,16 +978,16 @@ void BossFd2_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
if (this->deathState == DEATH_START) {
|
||||
if (this->work[FD2_INVINC_TIMER] == 0) {
|
||||
BossFd2_CollisionCheck(this, globalCtx2);
|
||||
BossFd2_CollisionCheck(this, globalCtx);
|
||||
}
|
||||
CollisionCheck_SetAC(globalCtx2, &globalCtx2->colChkCtx, &this->collider.base);
|
||||
CollisionCheck_SetOC(globalCtx2, &globalCtx2->colChkCtx, &this->collider.base);
|
||||
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
|
||||
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
|
||||
if (!this->disableAT) {
|
||||
CollisionCheck_SetAT(globalCtx2, &globalCtx2->colChkCtx, &this->collider.base);
|
||||
CollisionCheck_SetAT(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
|
||||
}
|
||||
}
|
||||
|
||||
BossFd2_UpdateFace(this, globalCtx2);
|
||||
BossFd2_UpdateFace(this, globalCtx);
|
||||
this->fwork[FD2_TEX1_SCROLL_X] += 4.0f;
|
||||
this->fwork[FD2_TEX1_SCROLL_Y] = 120.0f;
|
||||
this->fwork[FD2_TEX2_SCROLL_X] += 3.0f;
|
||||
|
|
|
@ -201,7 +201,7 @@ static void* sMouthTex_ci8_16x16[] = { gPhantomGanonMouthTex, gPhantomGanonSmile
|
|||
|
||||
static InitChainEntry sInitChain[] = {
|
||||
ICHAIN_U8(targetMode, 5, ICHAIN_CONTINUE),
|
||||
ICHAIN_S8(naviEnemyId, 43, ICHAIN_CONTINUE),
|
||||
ICHAIN_S8(naviEnemyId, 0x2B, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32_DIV1000(gravity, 0, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32(targetArrowOffset, 0, ICHAIN_STOP),
|
||||
};
|
||||
|
|
|
@ -333,7 +333,7 @@ void BossGoma_ClearPixels(u8* clearPixelTable, s16 i) {
|
|||
|
||||
static InitChainEntry sInitChain[] = {
|
||||
ICHAIN_U8(targetMode, 2, ICHAIN_CONTINUE),
|
||||
ICHAIN_S8(naviEnemyId, 1, ICHAIN_CONTINUE),
|
||||
ICHAIN_S8(naviEnemyId, 0x01, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32_DIV1000(gravity, -2000, ICHAIN_STOP),
|
||||
};
|
||||
|
||||
|
@ -843,7 +843,7 @@ void BossGoma_Encounter(BossGoma* this, GlobalContext* globalCtx) {
|
|||
this->subCameraAt.z = this->actor.world.pos.z;
|
||||
|
||||
if (this->framesUntilNextAction < 0) {
|
||||
// @bug ? unreachable, timer is >= 0
|
||||
//! @bug ? unreachable, timer is >= 0
|
||||
SkelAnime_Update(&this->skelanime);
|
||||
Math_ApproachZeroF(&this->actor.speedXZ, 1.0f, 2.0f);
|
||||
} else {
|
||||
|
@ -1080,7 +1080,7 @@ void BossGoma_Defeated(BossGoma* this, GlobalContext* globalCtx) {
|
|||
|
||||
for (i = 0; i < 4; i++) {
|
||||
BossGoma_ClearPixels(sClearPixelTableFirstPass, this->decayingProgress);
|
||||
// @bug this allows this->decayingProgress = 0x100 = 256 which is out of bounds when accessing
|
||||
//! @bug this allows this->decayingProgress = 0x100 = 256 which is out of bounds when accessing
|
||||
// sClearPixelTableFirstPass, though timers may prevent this from ever happening?
|
||||
if (this->decayingProgress < 0x100) {
|
||||
this->decayingProgress++;
|
||||
|
@ -1154,7 +1154,7 @@ void BossGoma_Defeated(BossGoma* this, GlobalContext* globalCtx) {
|
|||
|
||||
for (i = 0; i < 4; i++) {
|
||||
BossGoma_ClearPixels(sClearPixelTableSecondPass, this->decayingProgress);
|
||||
// @bug same as sClearPixelTableFirstPass
|
||||
//! @bug same as sClearPixelTableFirstPass
|
||||
if (this->decayingProgress < 0x100) {
|
||||
this->decayingProgress++;
|
||||
}
|
||||
|
@ -1164,7 +1164,7 @@ void BossGoma_Defeated(BossGoma* this, GlobalContext* globalCtx) {
|
|||
case 3:
|
||||
for (i = 0; i < 4; i++) {
|
||||
BossGoma_ClearPixels(sClearPixelTableSecondPass, this->decayingProgress);
|
||||
// @bug same as sClearPixelTableFirstPass
|
||||
//! @bug same as sClearPixelTableFirstPass
|
||||
if (this->decayingProgress < 0x100) {
|
||||
this->decayingProgress++;
|
||||
}
|
||||
|
|
|
@ -259,7 +259,7 @@ static AnimationHeader* sHandPushoffPoses[] = { &gBongoLeftHandPushoffPoseAnim,
|
|||
static AnimationHeader* sHandHangPoses[] = { &gBongoLeftHandHangPoseAnim, &gBongoRightHandHangPoseAnim };
|
||||
|
||||
static InitChainEntry sInitChain[] = {
|
||||
ICHAIN_S8(naviEnemyId, 41, ICHAIN_CONTINUE),
|
||||
ICHAIN_S8(naviEnemyId, 0x29, ICHAIN_CONTINUE),
|
||||
ICHAIN_U8(targetMode, 5, ICHAIN_CONTINUE),
|
||||
ICHAIN_VEC3F_DIV1000(scale, 20, ICHAIN_STOP),
|
||||
};
|
||||
|
@ -1862,7 +1862,7 @@ void BossSst_HandCrush(BossSst* this, GlobalContext* globalCtx) {
|
|||
player->actor.world.pos = this->actor.world.pos;
|
||||
if (this->timer == 0) {
|
||||
this->timer = 20;
|
||||
if (LINK_IS_CHILD) {
|
||||
if (!LINK_IS_ADULT) {
|
||||
func_8002F7DC(&player->actor, NA_SE_VO_LI_DAMAGE_S_KID);
|
||||
} else {
|
||||
func_8002F7DC(&player->actor, NA_SE_VO_LI_DAMAGE_S);
|
||||
|
|
|
@ -687,9 +687,9 @@ void func_8096865C(Actor* thisx, GlobalContext* globalCtx) {
|
|||
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_demo_6k.c", 1242);
|
||||
}
|
||||
|
||||
void func_809688C4(Actor* thisx, GlobalContext* globalCtx) {
|
||||
void func_809688C4(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
Demo6K* this = THIS;
|
||||
GlobalContext* globalCtx2 = globalCtx;
|
||||
GlobalContext* globalCtx = globalCtx2;
|
||||
u32 frames = globalCtx->state.frames;
|
||||
s32 i;
|
||||
|
||||
|
@ -710,7 +710,7 @@ void func_809688C4(Actor* thisx, GlobalContext* globalCtx) {
|
|||
Matrix_Scale(this->unk_234[i] * D_8096931C[(frames + i) & 3],
|
||||
this->unk_234[i] * D_8096931C[(frames + i) & 3],
|
||||
this->unk_234[i] * D_8096931C[(frames + i) & 3], MTXMODE_APPLY);
|
||||
func_800D1FD4(&globalCtx2->mf_11DA0);
|
||||
func_800D1FD4(&globalCtx->mf_11DA0);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_demo_6k.c", 1297),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gEffFlash1DL);
|
||||
|
|
|
@ -504,8 +504,8 @@ void DemoDu_CsGoronsRuby_AdvanceTo04(DemoDu* this, GlobalContext* globalCtx) {
|
|||
|
||||
void DemoDu_CsGoronsRuby_AdvanceTo05(DemoDu* this, s32 animFinished) {
|
||||
if (animFinished) {
|
||||
Animation_Change(&this->skelAnime, &gDaruniaIdleAnim, 1.0f, 0.0f, Animation_GetLastFrame(&gDaruniaIdleAnim), 0,
|
||||
0.0f);
|
||||
Animation_Change(&this->skelAnime, &gDaruniaIdleAnim, 1.0f, 0.0f, Animation_GetLastFrame(&gDaruniaIdleAnim),
|
||||
ANIMMODE_LOOP, 0.0f);
|
||||
this->updateIndex = CS_GORONSRUBY_SUBSCENE(5);
|
||||
}
|
||||
}
|
||||
|
@ -524,8 +524,8 @@ void DemoDu_CsGoronsRuby_AdvanceTo06(DemoDu* this, GlobalContext* globalCtx) {
|
|||
|
||||
void DemoDu_CsGoronsRuby_AdvanceTo07(DemoDu* this, s32 animFinished) {
|
||||
if (animFinished) {
|
||||
Animation_Change(&this->skelAnime, &gDaruniaIdleAnim, 1.0f, 0.0f, Animation_GetLastFrame(&gDaruniaIdleAnim), 0,
|
||||
0.0f);
|
||||
Animation_Change(&this->skelAnime, &gDaruniaIdleAnim, 1.0f, 0.0f, Animation_GetLastFrame(&gDaruniaIdleAnim),
|
||||
ANIMMODE_LOOP, 0.0f);
|
||||
this->updateIndex = CS_GORONSRUBY_SUBSCENE(7);
|
||||
}
|
||||
}
|
||||
|
@ -552,8 +552,8 @@ void DemoDu_CsGoronsRuby_AdvanceTo09(DemoDu* this, s32 animFinished) {
|
|||
|
||||
void DemoDu_CsGoronsRuby_AdvanceTo10(DemoDu* this, s32 animFinished) {
|
||||
if (animFinished) {
|
||||
Animation_Change(&this->skelAnime, &gDaruniaIdleAnim, 1.0f, 0.0f, Animation_GetLastFrame(&gDaruniaIdleAnim), 0,
|
||||
0.0f);
|
||||
Animation_Change(&this->skelAnime, &gDaruniaIdleAnim, 1.0f, 0.0f, Animation_GetLastFrame(&gDaruniaIdleAnim),
|
||||
ANIMMODE_LOOP, 0.0f);
|
||||
this->updateIndex = CS_GORONSRUBY_SUBSCENE(10);
|
||||
}
|
||||
}
|
||||
|
@ -584,7 +584,7 @@ void DemoDu_CsGoronsRuby_AdvanceTo13(DemoDu* this, GlobalContext* globalCtx) {
|
|||
|
||||
if ((npcAction != NULL) && (npcAction->action != 6)) {
|
||||
Animation_Change(&this->skelAnime, &gDaruniaIdleAnim, 1.0f, 0.0f, Animation_GetLastFrame(&gDaruniaIdleAnim),
|
||||
0, 0.0f);
|
||||
ANIMMODE_LOOP, 0.0f);
|
||||
this->updateIndex = CS_GORONSRUBY_SUBSCENE(13);
|
||||
}
|
||||
}
|
||||
|
@ -703,7 +703,7 @@ void DemoDu_InitCs_AfterGanon(DemoDu* this, GlobalContext* globalCtx) {
|
|||
f32 lastFrame = Animation_GetLastFrame(&gDaruniaSageFormationAnim);
|
||||
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gDaruniaSkel, NULL, NULL, NULL, 0);
|
||||
Animation_Change(&this->skelAnime, &gDaruniaSageFormationAnim, 1.0f, 0.0f, lastFrame, 2, 0.0f);
|
||||
Animation_Change(&this->skelAnime, &gDaruniaSageFormationAnim, 1.0f, 0.0f, lastFrame, ANIMMODE_ONCE, 0.0f);
|
||||
this->updateIndex = CS_CHAMBERAFTERGANON_SUBSCENE(0);
|
||||
this->actor.shape.shadowAlpha = 0;
|
||||
}
|
||||
|
|
|
@ -111,7 +111,7 @@ static s16 sEffectTypeObjects[] = {
|
|||
|
||||
static u8 sTimewarpVertexSizeIndices[] = { 1, 1, 2, 0, 1, 1, 2, 0, 1, 2, 0, 2, 1, 0, 1, 0, 2, 0, 2, 2, 0 };
|
||||
|
||||
Color_RGB8 sJewelSparkleColors[5][2] = {
|
||||
static Color_RGB8 sJewelSparkleColors[5][2] = {
|
||||
{ { 255, 255, 255 }, { 100, 255, 0 } }, { { 255, 255, 255 }, { 200, 0, 150 } },
|
||||
{ { 255, 255, 255 }, { 0, 100, 255 } }, { { 0, 0, 0 }, { 0, 0, 0 } },
|
||||
{ { 223, 0, 0 }, { 0, 0, 0 } },
|
||||
|
@ -141,7 +141,7 @@ f32 DemoEffect_InterpolateCsFrames(GlobalContext* globalCtx, s32 csActionId) {
|
|||
*/
|
||||
void DemoEffect_InitJewel(GlobalContext* globalCtx, DemoEffect* this) {
|
||||
this->initDrawFunc = DemoEffect_DrawJewel;
|
||||
if (LINK_IS_CHILD) {
|
||||
if (!LINK_IS_ADULT) {
|
||||
this->initUpdateFunc = DemoEffect_UpdateJewelChild;
|
||||
} else {
|
||||
this->initUpdateFunc = DemoEffect_UpdateJewelAdult;
|
||||
|
@ -175,8 +175,8 @@ void DemoEffect_InitGetItem(DemoEffect* this) {
|
|||
/**
|
||||
* Main Actor Init function
|
||||
*/
|
||||
void DemoEffect_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
GlobalContext* globalCtx2 = globalCtx;
|
||||
void DemoEffect_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
GlobalContext* globalCtx = globalCtx2;
|
||||
DemoEffect* this = THIS;
|
||||
s32 effectType;
|
||||
s32 lightEffect;
|
||||
|
@ -413,7 +413,7 @@ void DemoEffect_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
lightRing = (DemoEffect*)Actor_SpawnAsChild(
|
||||
&globalCtx2->actorCtx, &crystalLight->actor, globalCtx2, ACTOR_DEMO_EFFECT, this->actor.world.pos.x,
|
||||
&globalCtx->actorCtx, &crystalLight->actor, globalCtx, ACTOR_DEMO_EFFECT, this->actor.world.pos.x,
|
||||
this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, DEMO_EFFECT_LIGHTRING_TRIFORCE);
|
||||
|
||||
if (lightRing != NULL) {
|
||||
|
@ -1664,9 +1664,9 @@ s32 DemoEffect_CheckCsAction(DemoEffect* this, GlobalContext* globalCtx, s32 csA
|
|||
/**
|
||||
* Draw function for the Jewel Actor.
|
||||
*/
|
||||
void DemoEffect_DrawJewel(Actor* thisx, GlobalContext* globalCtx) {
|
||||
void DemoEffect_DrawJewel(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
DemoEffect* this = THIS;
|
||||
GlobalContext* globalCtx2 = globalCtx;
|
||||
GlobalContext* globalCtx = globalCtx2;
|
||||
u32 frames = this->jewel.timer;
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_demo_effect.c", 2543);
|
||||
|
@ -1678,21 +1678,21 @@ void DemoEffect_DrawJewel(Actor* thisx, GlobalContext* globalCtx) {
|
|||
switch (this->jewel.type) {
|
||||
case DEMO_EFFECT_JEWEL_KOKIRI:
|
||||
gSPSegment(POLY_XLU_DISP++, 9,
|
||||
Gfx_TwoTexScroll(globalCtx2->state.gfxCtx, 0, (frames * 4) % 256,
|
||||
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, (frames * 4) % 256,
|
||||
(256 - ((frames * 2) % 256)) - 1, 64, 64, 1, (frames * 2) % 256,
|
||||
(256 - (frames % 256)) - 1, 16, 16));
|
||||
break;
|
||||
|
||||
case DEMO_EFFECT_JEWEL_GORON:
|
||||
gSPSegment(POLY_XLU_DISP++, 9,
|
||||
Gfx_TwoTexScroll(globalCtx2->state.gfxCtx, 0, (frames * 4) % 128,
|
||||
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, (frames * 4) % 128,
|
||||
(256 - ((frames * 2) % 256)) - 1, 32, 64, 1, (frames * 2) % 256,
|
||||
(256 - (frames % 256)) - 1, 16, 8));
|
||||
break;
|
||||
|
||||
case DEMO_EFFECT_JEWEL_ZORA:
|
||||
gSPSegment(POLY_XLU_DISP++, 9,
|
||||
Gfx_TwoTexScroll(globalCtx2->state.gfxCtx, 0, (frames * 4) % 256,
|
||||
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, (frames * 4) % 256,
|
||||
(256 - ((frames * 2) % 256)) - 1, 32, 32, 1, (frames * 2) % 256,
|
||||
(256 - (frames % 256)) - 1, 16, 16));
|
||||
break;
|
||||
|
@ -1938,24 +1938,24 @@ void DemoEffect_DrawLgtShower(Actor* thisx, GlobalContext* globalCtx) {
|
|||
/**
|
||||
* Draw function for the Light Ring Actor.
|
||||
*/
|
||||
void DemoEffect_DrawLightRing(Actor* thisx, GlobalContext* globalCtx) {
|
||||
void DemoEffect_DrawLightRing(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
DemoEffect* this = THIS;
|
||||
GlobalContext* globalCtx2 = globalCtx;
|
||||
GlobalContext* globalCtx = globalCtx2;
|
||||
u32 frames = this->lightRing.timer;
|
||||
|
||||
OPEN_DISPS(globalCtx2->state.gfxCtx, "../z_demo_effect.c", 2956);
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_demo_effect.c", 2956);
|
||||
|
||||
func_80093D84(globalCtx2->state.gfxCtx);
|
||||
func_80093D84(globalCtx->state.gfxCtx);
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 128, 128, 170, 255, 255, this->lightRing.alpha);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 0, 100, 255, 255);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx2->state.gfxCtx, "../z_demo_effect.c", 2963),
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_demo_effect.c", 2963),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPSegment(POLY_XLU_DISP++, 8,
|
||||
Gfx_TwoTexScroll(globalCtx2->state.gfxCtx, 0, (frames * 5) % 64, 512 - ((frames * 2) % 512) - 1, 16, 128,
|
||||
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, (frames * 5) % 64, 512 - ((frames * 2) % 512) - 1, 16, 128,
|
||||
1, 0, 0, 8, 1024));
|
||||
gSPDisplayList(POLY_XLU_DISP++, gGoldenGoddessLightRingDL);
|
||||
|
||||
CLOSE_DISPS(globalCtx2->state.gfxCtx, "../z_demo_effect.c", 2978);
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_demo_effect.c", 2978);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1063,11 +1063,11 @@ void func_8098085C(DemoGt* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
|
||||
void func_809809C0(DemoGt* this, GlobalContext* globalCtx) {
|
||||
GlobalContext* globalCtx2 = globalCtx;
|
||||
void func_809809C0(DemoGt* this, GlobalContext* globalCtx2) {
|
||||
GlobalContext* globalCtx = globalCtx2;
|
||||
DemoGt* this2 = this;
|
||||
s32 gameplayFrames = globalCtx2->gameplayFrames;
|
||||
u16 frames = globalCtx2->csCtx.frames;
|
||||
s32 gameplayFrames = globalCtx->gameplayFrames;
|
||||
u16 frames = globalCtx->csCtx.frames;
|
||||
Vec3f sp54;
|
||||
s16 pad[3];
|
||||
|
||||
|
@ -1081,7 +1081,7 @@ void func_809809C0(DemoGt* this, GlobalContext* globalCtx) {
|
|||
sp54.z = this2->dyna.actor.world.pos.z + 23.0f;
|
||||
|
||||
if (ABS(gameplayFrames % 12) == 0) {
|
||||
DemoGt_SpawnExplosionNoSound(globalCtx2, &sp54, &sp40, &sp34, 2.0f);
|
||||
DemoGt_SpawnExplosionNoSound(globalCtx, &sp54, &sp40, &sp34, 2.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1245,9 +1245,9 @@ void DemoGt_Update16(DemoGt* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
|
||||
void DemoGt_Draw4(DemoGt* this, GlobalContext* globalCtx) {
|
||||
void DemoGt_Draw4(DemoGt* this, GlobalContext* globalCtx2) {
|
||||
GraphicsContext* gfxCtx;
|
||||
GlobalContext* globalCtx2 = globalCtx;
|
||||
GlobalContext* globalCtx = globalCtx2;
|
||||
u16 frames = globalCtx->csCtx.frames;
|
||||
s32 pad;
|
||||
s16 sp76;
|
||||
|
@ -1268,7 +1268,7 @@ void DemoGt_Draw4(DemoGt* this, GlobalContext* globalCtx) {
|
|||
sp6C = kREG(61);
|
||||
sp68 = (s16)((s32)kREG(58)) + 0x4000;
|
||||
sp6A = kREG(58);
|
||||
gfxCtx = globalCtx2->state.gfxCtx;
|
||||
gfxCtx = globalCtx->state.gfxCtx;
|
||||
sp60 = Graph_Alloc(gfxCtx, sizeof(Mtx));
|
||||
sp44 = 1.0f - Math_CosS(sp76);
|
||||
|
||||
|
@ -1288,8 +1288,8 @@ void DemoGt_Draw4(DemoGt* this, GlobalContext* globalCtx) {
|
|||
Matrix_Translate(sp48.x, sp48.y, sp48.z, MTXMODE_APPLY);
|
||||
Matrix_ToMtx(sp60, "../z_demo_gt_part4_1.c", 232);
|
||||
|
||||
if (!FrameAdvance_IsEnabled(globalCtx2)) {
|
||||
func_80980F8C(this, globalCtx2);
|
||||
if (!FrameAdvance_IsEnabled(globalCtx)) {
|
||||
func_80980F8C(this, globalCtx);
|
||||
}
|
||||
|
||||
Matrix_Pop();
|
||||
|
|
|
@ -200,7 +200,7 @@ void DemoIk_Type1Init(DemoIk* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, phi_f0);
|
||||
SkelAnime_Init(globalCtx, &this->skelAnime, skeleton, NULL, this->jointTable, this->morphTable, 2);
|
||||
Animation_Change(&this->skelAnime, animation, 1.0f, 0.0f, Animation_GetLastFrame(animation), 2, 0.0f);
|
||||
Animation_Change(&this->skelAnime, animation, 1.0f, 0.0f, Animation_GetLastFrame(animation), ANIMMODE_ONCE, 0.0f);
|
||||
}
|
||||
|
||||
void func_8098393C(DemoIk* this) {
|
||||
|
@ -338,7 +338,7 @@ void DemoIk_Type2Init(DemoIk* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, skeleton, NULL, this->jointTable, this->morphTable, 2);
|
||||
Animation_Change(&this->skelAnime, animation, 1.0f, 0.0f, Animation_GetLastFrame(animation), 2, 0.0f);
|
||||
Animation_Change(&this->skelAnime, animation, 1.0f, 0.0f, Animation_GetLastFrame(animation), ANIMMODE_ONCE, 0.0f);
|
||||
this->actionMode = 3;
|
||||
this->drawMode = 0;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#include "z64cutscene_commands.h"
|
||||
|
||||
// clang-format off
|
||||
CutsceneData D_8098786C[] = {
|
||||
static CutsceneData D_8098786C[] = {
|
||||
CS_BEGIN_CUTSCENE(32, 3000),
|
||||
CS_UNK_DATA_LIST(0x00000020, 1),
|
||||
CS_UNK_DATA(0x00010000, 0x0BB80000, 0x00000000, 0x00000000, 0xFFFFFFFC, 0x00000002, 0x00000000, 0xFFFFFFFC, 0x00000002, 0x00000000, 0x00000000, 0x00000000),
|
||||
|
|
|
@ -328,14 +328,14 @@ void DemoKankyo_SetupType(DemoKankyo* this, GlobalContext* globalCtx) {
|
|||
if (this->warpTimer == 1) {
|
||||
if (globalCtx->sceneNum == SCENE_TOKINOMA) {
|
||||
D_8098CF84 = 25;
|
||||
if (LINK_IS_CHILD) {
|
||||
if (!LINK_IS_ADULT) {
|
||||
globalCtx->csCtx.segment = gChildWarpInToTCS;
|
||||
} else {
|
||||
globalCtx->csCtx.segment = gAdultWarpInToTCS;
|
||||
}
|
||||
} else {
|
||||
D_8098CF84 = 32;
|
||||
if (LINK_IS_CHILD) {
|
||||
if (!LINK_IS_ADULT) {
|
||||
globalCtx->csCtx.segment = gChildWarpInCS;
|
||||
} else {
|
||||
globalCtx->csCtx.segment = gAdultWarpInCS;
|
||||
|
@ -349,13 +349,13 @@ void DemoKankyo_SetupType(DemoKankyo* this, GlobalContext* globalCtx) {
|
|||
break;
|
||||
case DEMOKANKYO_WARP_IN:
|
||||
if (globalCtx->sceneNum == SCENE_TOKINOMA) {
|
||||
if (LINK_IS_CHILD) {
|
||||
if (!LINK_IS_ADULT) {
|
||||
globalCtx->csCtx.segment = gChildWarpOutToTCS;
|
||||
} else {
|
||||
globalCtx->csCtx.segment = gAdultWarpOutToTCS;
|
||||
}
|
||||
} else {
|
||||
if (LINK_IS_CHILD) {
|
||||
if (!LINK_IS_ADULT) {
|
||||
globalCtx->csCtx.segment = gChildWarpOutCS;
|
||||
} else {
|
||||
globalCtx->csCtx.segment = gAdultWarpOutCS;
|
||||
|
@ -446,7 +446,7 @@ void DemoKankyo_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
} else if (!Actor_IsFacingAndNearPlayer(&this->actor, 300.0f, 0x7530)) {
|
||||
break;
|
||||
} else {
|
||||
if (LINK_IS_CHILD) {
|
||||
if (!LINK_IS_ADULT) {
|
||||
if (globalCtx->csCtx.frames < 170 || globalCtx->csCtx.state == CS_STATE_IDLE) {
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include "ultra64.h"
|
||||
#include "global.h"
|
||||
|
||||
UNK_TYPE D_80991680[] = {
|
||||
static UNK_TYPE D_80991680[] = {
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
|
@ -61,7 +61,7 @@ UNK_TYPE D_80991680[] = {
|
|||
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
};
|
||||
|
||||
UNK_TYPE D_80991E80[] = {
|
||||
static UNK_TYPE D_80991E80[] = {
|
||||
0x2F3E56AB, 0xA4582102, 0x10417AB0, 0x805C312A, 0x32376DD4, 0xA2633907, 0x0B387DA2, 0x6D81470C, 0x3C5C60AC,
|
||||
0xA5571801, 0x154C97B9, 0x68533236, 0x304276D6, 0x9B533108, 0x154A96B7, 0x7C9B400B, 0x3E756FAE, 0xAF5D1301,
|
||||
0x1D59B4BF, 0x53432C38, 0x2F487DCC, 0x8A4A2406, 0x1F5DB0C8, 0x90B55110, 0x408B7FAA, 0xB76D1503, 0x286ACCBE,
|
||||
|
@ -121,7 +121,7 @@ UNK_TYPE D_80991E80[] = {
|
|||
0x242B4FB8, 0xB66A2E06, 0x0D3E66AA, 0x9B663322, 0x3B2D6CDD, 0xB47B450A, 0x062B6E9C, 0x6E705D17,
|
||||
};
|
||||
|
||||
Vtx D_80992680[] = {
|
||||
static Vtx D_80992680[] = {
|
||||
VTX(405, 1572, -1643, 401, -3470, 0x00, 0x78, 0x00, 0xFF),
|
||||
VTX(470, 1488, -1799, 512, -3755, 0x00, 0x78, 0x00, 0xFF),
|
||||
VTX(207, 1312, -1162, 251, -3368, 0x00, 0x78, 0x00, 0xFF),
|
||||
|
@ -156,7 +156,7 @@ Vtx D_80992680[] = {
|
|||
VTX(1915, 295, 1153, 410, 2901, 0x00, 0x78, 0x00, 0xFF),
|
||||
};
|
||||
|
||||
Vtx D_80992880[] = {
|
||||
static Vtx D_80992880[] = {
|
||||
VTX(1905, 295, 1026, 410, 2617, 0x00, 0x78, 0x00, 0xFF), VTX(1940, 295, 1047, 512, 2674, 0x00, 0x78, 0x00, 0xFF),
|
||||
VTX(1905, 220, 1026, 396, 2481, 0x00, 0x78, 0x00, 0xFF), VTX(1940, 220, 1047, 512, 2560, 0x00, 0x78, 0x00, 0xFF),
|
||||
VTX(1658, 220, 1169, 101, 2487, 0x00, 0x78, 0x00, 0xFF), VTX(1658, 220, 1215, 0, 2560, 0x00, 0x78, 0x00, 0xFF),
|
||||
|
@ -175,7 +175,7 @@ Vtx D_80992880[] = {
|
|||
VTX(1915, -200, 1153, 410, 4096, 0x00, 0x78, 0x00, 0xFF), VTX(1968, -200, 1172, 512, 4096, 0x00, 0x78, 0x00, 0xFF),
|
||||
};
|
||||
|
||||
Vtx D_80992A80[] = {
|
||||
static Vtx D_80992A80[] = {
|
||||
VTX(1915, 295, 1153, 410, 2901, 0x00, 0x78, 0x00, 0xFF),
|
||||
VTX(1968, -200, 1172, 512, 4096, 0x00, 0x78, 0x00, 0xFF),
|
||||
VTX(1968, 295, 1172, 512, 2958, 0x00, 0x78, 0x00, 0xFF),
|
||||
|
@ -204,13 +204,13 @@ Vtx D_80992A80[] = {
|
|||
VTX(-76, 820, -1633, 0, -4096, 0x00, 0x78, 0x00, 0xFF),
|
||||
};
|
||||
|
||||
Vtx D_80992C20[] = {
|
||||
static Vtx D_80992C20[] = {
|
||||
VTX(1658, 295, 1169, 205, 1308, 0x00, 0x78, 0x00, 0xFF),
|
||||
VTX(1763, 295, 1241, 205, 1451, 0x00, 0x78, 0x00, 0xFF),
|
||||
VTX(1915, 295, 1153, 819, 1451, 0x00, 0x78, 0x00, 0xFF),
|
||||
};
|
||||
|
||||
Vtx D_80992C50[] = {
|
||||
static Vtx D_80992C50[] = {
|
||||
VTX(-389, 800, -1884, 102, 4096, 0x2E, 0x00, 0x92, 0xFF),
|
||||
VTX(-989, 800, -2131, 512, 4096, 0x2E, 0x00, 0x92, 0xFF),
|
||||
VTX(-389, 1312, -1884, 102, 3589, 0x2B, 0x29, 0x98, 0xFF),
|
||||
|
@ -245,7 +245,7 @@ Vtx D_80992C50[] = {
|
|||
VTX(112, 20, 1211, 256, -12288, 0x00, 0x78, 0x00, 0xFF),
|
||||
};
|
||||
|
||||
Vtx D_80992E50[] = {
|
||||
static Vtx D_80992E50[] = {
|
||||
VTX(-1481, 1314, -1874, 512, 2676, 0x4D, 0x56, 0x1F, 0xFF),
|
||||
VTX(-2157, 1810, -1555, 512, 1661, 0x49, 0x56, 0x28, 0xFF),
|
||||
VTX(-1708, 1312, -1303, 181, 2088, 0x47, 0x53, 0x31, 0xFF),
|
||||
|
@ -278,7 +278,7 @@ Vtx D_80992E50[] = {
|
|||
VTX(-2717, 2160, -1291, 512, 850, 0x48, 0x55, 0x2A, 0xFF),
|
||||
};
|
||||
|
||||
Vtx D_80993030[] = {
|
||||
static Vtx D_80993030[] = {
|
||||
VTX(-5196, 1149, 2080, 512, -2955, 0x00, 0x78, 0x00, 0xFF),
|
||||
VTX(-5194, 351, 2079, 512, -3868, 0x00, 0x78, 0x00, 0xFF),
|
||||
VTX(-4653, 291, 1728, 0, -3868, 0x00, 0x78, 0x00, 0xFF),
|
||||
|
@ -312,7 +312,7 @@ Vtx D_80993030[] = {
|
|||
VTX(-4488, 1519, 3360, 512, -6384, 0x00, 0x78, 0x00, 0xFF),
|
||||
};
|
||||
|
||||
Vtx D_80993220[] = {
|
||||
static Vtx D_80993220[] = {
|
||||
VTX(-4488, 1519, 3360, 512, -6384, 0x00, 0x78, 0x00, 0xFF),
|
||||
VTX(-3980, 1539, 3206, 512, -6678, 0x00, 0x78, 0x00, 0xFF),
|
||||
VTX(-4281, 1193, 2801, 0, -6531, 0x00, 0x78, 0x00, 0xFF),
|
||||
|
@ -323,13 +323,13 @@ Vtx D_80993220[] = {
|
|||
VTX(-4183, 1090, 2614, 0, -7266, 0x00, 0x78, 0x00, 0xFF),
|
||||
};
|
||||
|
||||
Vtx D_809932A0[] = {
|
||||
static Vtx D_809932A0[] = {
|
||||
VTX(117, 20, 1458, 1024, -6144, 0x00, 0x78, 0x00, 0xFF),
|
||||
VTX(112, 20, 1211, 512, -6144, 0x00, 0x78, 0x00, 0xFF),
|
||||
VTX(-261, 20, 1460, 1024, -5941, 0x00, 0x78, 0x00, 0xFF),
|
||||
};
|
||||
|
||||
Gfx D_809932D0[] = {
|
||||
static Gfx D_809932D0[] = {
|
||||
gsDPPipeSync(),
|
||||
gsDPSetTextureLUT(G_TT_NONE),
|
||||
gsSPTexture(65535, 65535, 0, G_TX_RENDERTILE, G_ON),
|
||||
|
@ -347,7 +347,7 @@ Gfx D_809932D0[] = {
|
|||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
Gfx D_80993390[] = {
|
||||
static Gfx D_80993390[] = {
|
||||
gsSPVertex(D_80992680, 32, 0),
|
||||
gsSP2Triangles(0, 1, 2, 0, 3, 4, 5, 0),
|
||||
gsSP2Triangles(4, 6, 5, 0, 7, 8, 9, 0),
|
||||
|
@ -387,7 +387,7 @@ Gfx D_80993390[] = {
|
|||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
Gfx D_809934B8[] = {
|
||||
static Gfx D_809934B8[] = {
|
||||
gsSPVertex(D_80992C50, 32, 0),
|
||||
gsSP2Triangles(0, 1, 2, 0, 1, 3, 2, 0),
|
||||
gsSP2Triangles(4, 5, 3, 0, 5, 6, 3, 0),
|
||||
|
|
|
@ -96,8 +96,8 @@ static DoorKillerTextureEntry sDoorTextures[4] = {
|
|||
{ OBJECT_GAMEPLAY_KEEP, gWoodenDoorTex },
|
||||
};
|
||||
|
||||
void DoorKiller_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
GlobalContext* globalCtx2 = globalCtx;
|
||||
void DoorKiller_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
GlobalContext* globalCtx = globalCtx2;
|
||||
f32 randF;
|
||||
DoorKiller* this = THIS;
|
||||
s32 bankIndex;
|
||||
|
@ -106,7 +106,7 @@ void DoorKiller_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
// Look in the object bank for one of the four objects containing door textures
|
||||
bankIndex = -1;
|
||||
for (i = 0; bankIndex < 0; i++) {
|
||||
bankIndex = Object_GetIndex(&globalCtx2->objectCtx, sDoorTextures[i].objectId);
|
||||
bankIndex = Object_GetIndex(&globalCtx->objectCtx, sDoorTextures[i].objectId);
|
||||
this->textureEntryIndex = i;
|
||||
}
|
||||
osSyncPrintf("bank_ID = %d\n", bankIndex);
|
||||
|
@ -125,19 +125,18 @@ void DoorKiller_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
case DOOR_KILLER_DOOR:
|
||||
// `jointTable` is used for both the `jointTable` and `morphTable` args here. Because this actor doesn't
|
||||
// play any animations it does not cause problems, but it would need to be changed otherwise.
|
||||
SkelAnime_InitFlex(globalCtx2, &this->skelAnime, &D_06001BC8, NULL, this->jointTable, this->jointTable, 9);
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_06001BC8, NULL, this->jointTable, this->jointTable, 9);
|
||||
this->actionFunc = DoorKiller_SetProperties;
|
||||
DoorKiller_SetProperties(this, globalCtx2);
|
||||
DoorKiller_SetProperties(this, globalCtx);
|
||||
|
||||
// manually set the overall rotation of the door
|
||||
this->jointTable[1].x = this->jointTable[1].z = 0x4000;
|
||||
|
||||
// Set a cylinder collider to detect link attacks and larger sphere collider to detect explosions
|
||||
Collider_InitCylinder(globalCtx2, &this->colliderCylinder);
|
||||
Collider_SetCylinder(globalCtx2, &this->colliderCylinder, &this->actor, &sCylinderInit);
|
||||
Collider_InitJntSph(globalCtx2, &this->colliderJntSph);
|
||||
Collider_SetJntSph(globalCtx2, &this->colliderJntSph, &this->actor, &sJntSphInit,
|
||||
this->colliderJntSphItems);
|
||||
Collider_InitCylinder(globalCtx, &this->colliderCylinder);
|
||||
Collider_SetCylinder(globalCtx, &this->colliderCylinder, &this->actor, &sCylinderInit);
|
||||
Collider_InitJntSph(globalCtx, &this->colliderJntSph);
|
||||
Collider_SetJntSph(globalCtx, &this->colliderJntSph, &this->actor, &sJntSphInit, this->colliderJntSphItems);
|
||||
this->colliderJntSph.elements[0].dim.worldSphere.radius = 80;
|
||||
this->colliderJntSph.elements[0].dim.worldSphere.center.x = (s16)this->actor.world.pos.x;
|
||||
this->colliderJntSph.elements[0].dim.worldSphere.center.y = (s16)this->actor.world.pos.y + 50;
|
||||
|
@ -145,7 +144,7 @@ void DoorKiller_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
// If tied to a switch flag and that switch flag is already set, kill the actor.
|
||||
if ((((this->actor.params >> 8) & 0x3F) != 0x3F) &&
|
||||
Flags_GetSwitch(globalCtx2, ((this->actor.params >> 8) & 0x3F))) {
|
||||
Flags_GetSwitch(globalCtx, ((this->actor.params >> 8) & 0x3F))) {
|
||||
Actor_Kill(&this->actor);
|
||||
}
|
||||
break;
|
||||
|
@ -154,7 +153,7 @@ void DoorKiller_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
case DOOR_KILLER_RUBBLE_PIECE_3:
|
||||
case DOOR_KILLER_RUBBLE_PIECE_4:
|
||||
this->actionFunc = DoorKiller_SetProperties;
|
||||
DoorKiller_SetProperties(this, globalCtx2);
|
||||
DoorKiller_SetProperties(this, globalCtx);
|
||||
|
||||
this->actor.gravity = -0.6f;
|
||||
this->actor.minVelocityY = -6.0f;
|
||||
|
|
|
@ -211,9 +211,9 @@ s32 DoorShutter_SetupDoor(DoorShutter* this, GlobalContext* globalCtx) {
|
|||
return false;
|
||||
}
|
||||
|
||||
void DoorShutter_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
void DoorShutter_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
DoorShutter* this = THIS;
|
||||
GlobalContext* globalCtx2 = globalCtx;
|
||||
GlobalContext* globalCtx = globalCtx2;
|
||||
s32 phi_a3;
|
||||
s32 pad;
|
||||
s32 objectIndex;
|
||||
|
@ -228,7 +228,7 @@ void DoorShutter_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
ShutterSceneInfo* phi_v1;
|
||||
|
||||
for (phi_v1 = &sSceneInfo[0], i = 0; i < ARRAY_COUNT(sSceneInfo) - 1; i++, phi_v1++) {
|
||||
if (globalCtx2->sceneNum == phi_v1->sceneNum) {
|
||||
if (globalCtx->sceneNum == phi_v1->sceneNum) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -237,7 +237,7 @@ void DoorShutter_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
BossDoorInfo* phi_v1_2;
|
||||
|
||||
for (phi_v1_2 = &D_80998288[0], i = 0; i < ARRAY_COUNT(D_80998288) - 1; i++, phi_v1_2++) {
|
||||
if (globalCtx2->sceneNum == phi_v1_2->dungeonScene || globalCtx2->sceneNum == phi_v1_2->bossScene) {
|
||||
if (globalCtx->sceneNum == phi_v1_2->dungeonScene || globalCtx->sceneNum == phi_v1_2->bossScene) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -245,8 +245,7 @@ void DoorShutter_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
} else {
|
||||
this->dyna.actor.room = -1;
|
||||
}
|
||||
if (this->requiredObjBankIndex = objectIndex =
|
||||
Object_GetIndex(&globalCtx2->objectCtx, sObjectInfo[phi_a3].objectId),
|
||||
if (this->requiredObjBankIndex = objectIndex = Object_GetIndex(&globalCtx->objectCtx, sObjectInfo[phi_a3].objectId),
|
||||
(s8)objectIndex < 0) {
|
||||
Actor_Kill(&this->dyna.actor);
|
||||
return;
|
||||
|
@ -254,7 +253,7 @@ void DoorShutter_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
DoorShutter_SetupAction(this, DoorShutter_SetupType);
|
||||
this->unk_16B = phi_a3;
|
||||
if (this->doorType == SHUTTER_KEY_LOCKED || this->doorType == SHUTTER_BOSS) {
|
||||
if (!Flags_GetSwitch(globalCtx2, this->dyna.actor.params & 0x3F)) {
|
||||
if (!Flags_GetSwitch(globalCtx, this->dyna.actor.params & 0x3F)) {
|
||||
this->unk_16E = 10;
|
||||
}
|
||||
Actor_SetFocus(&this->dyna.actor, 60.0f);
|
||||
|
|
|
@ -308,9 +308,9 @@ void EffDust_DrawFunc_8099E4F4(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
CLOSE_DISPS(gfxCtx, "../z_eff_dust.c", 458);
|
||||
}
|
||||
|
||||
void EffDust_DrawFunc_8099E784(Actor* thisx, GlobalContext* globalCtx) {
|
||||
void EffDust_DrawFunc_8099E784(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
EffDust* this = THIS;
|
||||
GlobalContext* globalCtx2;
|
||||
GlobalContext* globalCtx = globalCtx2;
|
||||
GraphicsContext* gfxCtx = globalCtx->state.gfxCtx;
|
||||
f32* distanceTraveled;
|
||||
Vec3f* initialPositions;
|
||||
|
@ -320,8 +320,6 @@ void EffDust_DrawFunc_8099E784(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
OPEN_DISPS(gfxCtx, "../z_eff_dust.c", 472);
|
||||
|
||||
globalCtx2 = globalCtx;
|
||||
|
||||
func_80093D18(gfxCtx);
|
||||
|
||||
gDPPipeSync(POLY_XLU_DISP++);
|
||||
|
@ -355,7 +353,7 @@ void EffDust_DrawFunc_8099E784(Actor* thisx, GlobalContext* globalCtx) {
|
|||
Matrix_Scale(*distanceTraveled * this->scalingFactor, *distanceTraveled * this->scalingFactor,
|
||||
*distanceTraveled * this->scalingFactor, MTXMODE_APPLY);
|
||||
|
||||
func_800D1FD4(&globalCtx2->mf_11DA0);
|
||||
func_800D1FD4(&globalCtx->mf_11DA0);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_eff_dust.c", 506),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
|
|
@ -158,7 +158,7 @@ static DamageTable sDamageTable = {
|
|||
};
|
||||
|
||||
static InitChainEntry sInitChain[] = {
|
||||
ICHAIN_S8(naviEnemyId, 19, ICHAIN_CONTINUE),
|
||||
ICHAIN_S8(naviEnemyId, 0x13, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32_DIV1000(gravity, -4000, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32(targetArrowOffset, 5300, ICHAIN_STOP),
|
||||
};
|
||||
|
@ -936,7 +936,7 @@ void EnAm_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec
|
|||
}
|
||||
}
|
||||
|
||||
Vec3f sIcePosOffsets[] = {
|
||||
static Vec3f sIcePosOffsets[] = {
|
||||
{ 20.0f, 40.0f, 0.0f }, { 10.0f, 60.0f, 10.0f }, { -10.0f, 60.0f, 10.0f }, { -20.0f, 40.0f, 0.0f },
|
||||
{ 10.0f, 60.0f, -10.0f }, { -10.0f, 60.0f, -10.0f }, { 0.0f, 40.0f, -20.0f }, { 10.0f, 20.0f, 10.0f },
|
||||
{ 10.0f, 20.0f, -10.0f }, { 0.0f, 40.0f, 20.0f }, { -10.0f, 20.0f, 10.0f }, { -10.0f, 20.0f, -10.0f },
|
||||
|
|
|
@ -81,7 +81,7 @@ void EnAni_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
Collider_InitCylinder(globalCtx, &this->collider);
|
||||
Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit);
|
||||
this->actor.colChkInfo.mass = MASS_IMMOVABLE;
|
||||
if (LINK_IS_CHILD) {
|
||||
if (!LINK_IS_ADULT) {
|
||||
EnAni_SetupAction(this, func_809B064C);
|
||||
} else {
|
||||
EnAni_SetupAction(this, func_809B07F8);
|
||||
|
@ -120,15 +120,15 @@ void func_809B0524(EnAni* this, GlobalContext* globalCtx) {
|
|||
void func_809B0558(EnAni* this, GlobalContext* globalCtx) {
|
||||
if (Actor_HasParent(&this->actor, globalCtx)) {
|
||||
this->actor.parent = NULL;
|
||||
if (LINK_IS_CHILD) {
|
||||
if (!LINK_IS_ADULT) {
|
||||
EnAni_SetupAction(this, func_809B04F0);
|
||||
} else {
|
||||
EnAni_SetupAction(this, func_809B0524);
|
||||
}
|
||||
gSaveContext.itemGetInf[1] |= 0x20;
|
||||
return;
|
||||
} else {
|
||||
func_8002F434(&this->actor, globalCtx, GI_HEART_PIECE, 10000.0f, 200.0f);
|
||||
}
|
||||
func_8002F434(&this->actor, globalCtx, GI_HEART_PIECE, 10000.0f, 200.0f);
|
||||
}
|
||||
|
||||
void func_809B05F0(EnAni* this, GlobalContext* globalCtx) {
|
||||
|
@ -149,15 +149,14 @@ void func_809B064C(EnAni* this, GlobalContext* globalCtx) {
|
|||
if (!textId) {}
|
||||
|
||||
if (textId2 == 0) {
|
||||
textId = gSaveContext.nightFlag ? 0x5051 : 0x5050; // "...all I can do is look at the stars."
|
||||
// "...all I can do is look at Death Mountain."
|
||||
textId = !IS_DAY ? 0x5051 : 0x5050;
|
||||
}
|
||||
|
||||
yawDiff = this->actor.yawTowardsPlayer - this->actor.shape.rot.y;
|
||||
if (func_8002F194(&this->actor, globalCtx)) {
|
||||
if (this->actor.textId == 0x5056) { // "To get a good view..."
|
||||
if (this->actor.textId == 0x5056) {
|
||||
EnAni_SetupAction(this, func_809B04F0);
|
||||
} else if (this->actor.textId == 0x5055) { // "...I'll give you this as a memento."
|
||||
} else if (this->actor.textId == 0x5055) {
|
||||
EnAni_SetupAction(this, func_809B05F0);
|
||||
} else {
|
||||
EnAni_SetupAction(this, func_809B04F0);
|
||||
|
@ -165,9 +164,9 @@ void func_809B064C(EnAni* this, GlobalContext* globalCtx) {
|
|||
} else if (yawDiff >= -0x36AF && yawDiff < 0 && this->actor.xzDistToPlayer < 150.0f &&
|
||||
-80.0f < this->actor.yDistToPlayer) {
|
||||
if (gSaveContext.itemGetInf[1] & 0x20) {
|
||||
EnAni_SetText(this, globalCtx, 0x5056); // "To get a good view..."
|
||||
EnAni_SetText(this, globalCtx, 0x5056);
|
||||
} else {
|
||||
EnAni_SetText(this, globalCtx, 0x5055); // "...I'll give you this as a memento."
|
||||
EnAni_SetText(this, globalCtx, 0x5055);
|
||||
}
|
||||
} else if (yawDiff >= -0x3E7 && yawDiff < 0x36B0 && this->actor.xzDistToPlayer < 350.0f) {
|
||||
EnAni_SetText(this, globalCtx, textId);
|
||||
|
@ -181,9 +180,9 @@ void func_809B07F8(EnAni* this, GlobalContext* globalCtx) {
|
|||
|
||||
yawDiff = this->actor.yawTowardsPlayer - this->actor.shape.rot.y;
|
||||
if (func_8002F194(&this->actor, globalCtx)) {
|
||||
if (this->actor.textId == 0x5056) { // "To get a good view..."
|
||||
if (this->actor.textId == 0x5056) {
|
||||
EnAni_SetupAction(this, func_809B0524);
|
||||
} else if (this->actor.textId == 0x5055) { // "...I'll give you this as a memento."
|
||||
} else if (this->actor.textId == 0x5055) {
|
||||
EnAni_SetupAction(this, func_809B05F0);
|
||||
} else {
|
||||
EnAni_SetupAction(this, func_809B0524);
|
||||
|
@ -191,16 +190,15 @@ void func_809B07F8(EnAni* this, GlobalContext* globalCtx) {
|
|||
} else if (yawDiff > -0x36B0 && yawDiff < 0 && this->actor.xzDistToPlayer < 150.0f &&
|
||||
-80.0f < this->actor.yDistToPlayer) {
|
||||
if (gSaveContext.itemGetInf[1] & 0x20) {
|
||||
EnAni_SetText(this, globalCtx, 0x5056); // "To get a good view..."
|
||||
EnAni_SetText(this, globalCtx, 0x5056);
|
||||
} else {
|
||||
EnAni_SetText(this, globalCtx, 0x5055); // "...I'll give you this as a memento."
|
||||
EnAni_SetText(this, globalCtx, 0x5055);
|
||||
}
|
||||
} else if (yawDiff > -0x3E8 && yawDiff < 0x36B0 && this->actor.xzDistToPlayer < 350.0f) {
|
||||
if (!(gSaveContext.eventChkInf[2] & 0x8000)) {
|
||||
textId = 0x5052; // "...Something is happening on Death Mountain!"
|
||||
textId = 0x5052;
|
||||
} else {
|
||||
textId = (gSaveContext.itemGetInf[1] & 0x20) ? 0x5054 : 0x5053; // "I don't feel like getting down..."
|
||||
// "...Death Mountain is back to normal!"
|
||||
textId = (gSaveContext.itemGetInf[1] & 0x20) ? 0x5054 : 0x5053;
|
||||
}
|
||||
EnAni_SetText(this, globalCtx, textId);
|
||||
}
|
||||
|
|
|
@ -197,7 +197,7 @@ void EnAnubice_FindFlameCircles(EnAnubice* this, GlobalContext* globalCtx) {
|
|||
void EnAnubice_SetupIdle(EnAnubice* this, GlobalContext* globalCtx) {
|
||||
f32 lastFrame = Animation_GetLastFrame(&gAnubiceIdleAnim);
|
||||
|
||||
Animation_Change(&this->skelAnime, &gAnubiceIdleAnim, 1.0f, 0.0f, (s16)lastFrame, 0, -10.0f);
|
||||
Animation_Change(&this->skelAnime, &gAnubiceIdleAnim, 1.0f, 0.0f, (s16)lastFrame, ANIMMODE_LOOP, -10.0f);
|
||||
|
||||
this->actionFunc = EnAnubice_Idle;
|
||||
this->actor.velocity.x = this->actor.velocity.z = this->actor.gravity = 0.0f;
|
||||
|
@ -262,7 +262,7 @@ void EnAnubis_SetupShootFireball(EnAnubice* this, GlobalContext* globalCtx) {
|
|||
f32 lastFrame = Animation_GetLastFrame(&gAnubiceAttackingAnim);
|
||||
|
||||
this->animLastFrame = lastFrame;
|
||||
Animation_Change(&this->skelAnime, &gAnubiceAttackingAnim, 1.0f, 0.0f, lastFrame, 2, -10.0f);
|
||||
Animation_Change(&this->skelAnime, &gAnubiceAttackingAnim, 1.0f, 0.0f, lastFrame, ANIMMODE_ONCE, -10.0f);
|
||||
this->actionFunc = EnAnubis_ShootFireball;
|
||||
this->actor.velocity.x = this->actor.velocity.z = 0.0f;
|
||||
}
|
||||
|
@ -292,7 +292,7 @@ void EnAnubice_SetupDie(EnAnubice* this, GlobalContext* globalCtx) {
|
|||
f32 lastFrame = Animation_GetLastFrame(&gAnubiceFallDownAnim);
|
||||
|
||||
this->animLastFrame = lastFrame;
|
||||
Animation_Change(&this->skelAnime, &gAnubiceFallDownAnim, 1.0f, 0.0f, lastFrame, 2, -20.0f);
|
||||
Animation_Change(&this->skelAnime, &gAnubiceFallDownAnim, 1.0f, 0.0f, lastFrame, ANIMMODE_ONCE, -20.0f);
|
||||
|
||||
this->unk_256 = false;
|
||||
this->unk_258 = 0;
|
||||
|
|
|
@ -86,7 +86,7 @@ void EnBa_SetupAction(EnBa* this, EnBaActionFunc actionFunc) {
|
|||
static Vec3f D_809B80E4 = { 0.01f, 0.01f, 0.01f };
|
||||
|
||||
static InitChainEntry sInitChain[] = {
|
||||
ICHAIN_S8(naviEnemyId, 21, ICHAIN_CONTINUE),
|
||||
ICHAIN_S8(naviEnemyId, 0x15, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32(uncullZoneScale, 1500, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32(uncullZoneDownward, 2500, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32(targetArrowOffset, 0, ICHAIN_STOP),
|
||||
|
|
|
@ -109,7 +109,7 @@ static DamageTable sDamageTable = {
|
|||
};
|
||||
|
||||
static InitChainEntry sInitChain[] = {
|
||||
ICHAIN_S8(naviEnemyId, 23, ICHAIN_CONTINUE),
|
||||
ICHAIN_S8(naviEnemyId, 0x17, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32(targetArrowOffset, 2000, ICHAIN_STOP),
|
||||
};
|
||||
|
||||
|
|
|
@ -48,29 +48,29 @@ const ActorInit En_Bom_Bowl_Man_InitVars = {
|
|||
(ActorFunc)EnBomBowlMan_Draw,
|
||||
};
|
||||
|
||||
void EnBomBowlMan_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
void EnBomBowlMan_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
static f32 cuccoColliderDims[][3] = { { 16.0f, 46.0f, 0.0f }, { 36.0f, 56.0f, 0.0f } };
|
||||
static Vec3f cuccoSpawnPos[] = { { 60, -60, -430 }, { 0, -120, -620 } };
|
||||
static f32 cuccoScales[] = { 0.01f, 0.03f };
|
||||
EnBomBowlMan* this = THIS;
|
||||
EnSyatekiNiw* cucco;
|
||||
s32 i;
|
||||
GlobalContext* globalCtx2 = globalCtx;
|
||||
GlobalContext* globalCtx = globalCtx2;
|
||||
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
|
||||
SkelAnime_InitFlex(globalCtx2, &this->skelAnime, &gChuGirlSkel, &gChuGirlNoddingOffAnim, this->jointTable,
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gChuGirlSkel, &gChuGirlNoddingOffAnim, this->jointTable,
|
||||
this->morphTable, 11);
|
||||
// ☆ Man, my shoulders hurt~ ☆
|
||||
osSyncPrintf(VT_FGCOL(GREEN) "☆ もー 肩こっちゃうよねぇ〜 \t\t ☆ \n" VT_RST);
|
||||
// ☆ Isn't there some sort of job that will pay better and be more relaxing? ☆ %d
|
||||
osSyncPrintf(VT_FGCOL(GREEN) "☆ もっとラクしてもうかるバイトないかしら? ☆ %d\n" VT_RST,
|
||||
globalCtx2->bombchuBowlingStatus);
|
||||
globalCtx->bombchuBowlingStatus);
|
||||
this->posCopy = this->actor.world.pos;
|
||||
this->actor.shape.yOffset = -60.0f;
|
||||
Actor_SetScale(&this->actor, 0.013f);
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
cucco = (EnSyatekiNiw*)Actor_Spawn(&globalCtx2->actorCtx, globalCtx2, ACTOR_EN_SYATEKI_NIW, cuccoSpawnPos[i].x,
|
||||
cucco = (EnSyatekiNiw*)Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_SYATEKI_NIW, cuccoSpawnPos[i].x,
|
||||
cuccoSpawnPos[i].y, cuccoSpawnPos[i].z, 0, 0, 0, 1);
|
||||
|
||||
if (cucco != NULL) {
|
||||
|
|
|
@ -90,8 +90,8 @@ void EnBox_ClipToGround(EnBox* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
|
||||
void EnBox_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
GlobalContext* globalCtx2 = globalCtx;
|
||||
void EnBox_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
GlobalContext* globalCtx = globalCtx2;
|
||||
EnBox* this = THIS;
|
||||
AnimationHeader* anim;
|
||||
CollisionHeader* colHeader;
|
||||
|
@ -106,8 +106,8 @@ void EnBox_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
DynaPolyActor_Init(&this->dyna, DPM_UNK);
|
||||
CollisionHeader_GetVirtual(&gTreasureChestCol, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx2, &globalCtx2->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
func_8003ECA8(globalCtx2, &globalCtx2->colCtx.dyna, this->dyna.bgId);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
func_8003ECA8(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
|
||||
this->movementFlags = 0;
|
||||
this->type = thisx->params >> 12 & 0xF;
|
||||
|
@ -117,17 +117,17 @@ void EnBox_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->switchFlag = this->dyna.actor.world.rot.z;
|
||||
this->dyna.actor.minVelocityY = -50.0f;
|
||||
|
||||
if (globalCtx2) {} // helps the compiler store globalCtx2 into s1
|
||||
if (globalCtx) {} // helps the compiler store globalCtx2 into s1
|
||||
|
||||
if (Flags_GetTreasure(globalCtx2, this->dyna.actor.params & 0x1F)) {
|
||||
if (Flags_GetTreasure(globalCtx, this->dyna.actor.params & 0x1F)) {
|
||||
this->alpha = 255;
|
||||
this->iceSmokeTimer = 100;
|
||||
EnBox_SetupAction(this, EnBox_Open);
|
||||
this->movementFlags |= ENBOX_MOVE_STICK_TO_GROUND;
|
||||
animFrameStart = endFrame;
|
||||
} else if ((this->type == ENBOX_TYPE_SWITCH_FLAG_FALL_BIG || this->type == ENBOX_TYPE_SWITCH_FLAG_FALL_SMALL) &&
|
||||
!Flags_GetSwitch(globalCtx2, this->switchFlag)) {
|
||||
func_8003EBF8(globalCtx2, &globalCtx2->colCtx.dyna, this->dyna.bgId);
|
||||
!Flags_GetSwitch(globalCtx, this->switchFlag)) {
|
||||
func_8003EBF8(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
if (Rand_ZeroOne() < 0.5f) {
|
||||
this->movementFlags |= ENBOX_MOVE_FALL_ANGLE_SIDE;
|
||||
}
|
||||
|
@ -137,9 +137,9 @@ void EnBox_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->movementFlags |= ENBOX_MOVE_IMMOBILE;
|
||||
this->dyna.actor.flags |= 0x10;
|
||||
} else if ((this->type == ENBOX_TYPE_ROOM_CLEAR_BIG || this->type == ENBOX_TYPE_ROOM_CLEAR_SMALL) &&
|
||||
!Flags_GetClear(globalCtx2, this->dyna.actor.room)) {
|
||||
!Flags_GetClear(globalCtx, this->dyna.actor.room)) {
|
||||
EnBox_SetupAction(this, EnBox_AppearOnRoomClear);
|
||||
func_8003EBF8(globalCtx2, &globalCtx2->colCtx.dyna, this->dyna.bgId);
|
||||
func_8003EBF8(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
this->movementFlags |= ENBOX_MOVE_IMMOBILE;
|
||||
this->dyna.actor.world.pos.y = this->dyna.actor.home.pos.y - 50.0f;
|
||||
this->alpha = 0;
|
||||
|
@ -147,14 +147,14 @@ void EnBox_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
} else if (this->type == ENBOX_TYPE_9 || this->type == ENBOX_TYPE_10) {
|
||||
EnBox_SetupAction(this, func_809C9700);
|
||||
this->dyna.actor.flags |= 0x2000000;
|
||||
func_8003EBF8(globalCtx2, &globalCtx2->colCtx.dyna, this->dyna.bgId);
|
||||
func_8003EBF8(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
this->movementFlags |= ENBOX_MOVE_IMMOBILE;
|
||||
this->dyna.actor.world.pos.y = this->dyna.actor.home.pos.y - 50.0f;
|
||||
this->alpha = 0;
|
||||
this->dyna.actor.flags |= 0x10;
|
||||
} else if (this->type == ENBOX_TYPE_SWITCH_FLAG_BIG && !Flags_GetSwitch(globalCtx2, this->switchFlag)) {
|
||||
} else if (this->type == ENBOX_TYPE_SWITCH_FLAG_BIG && !Flags_GetSwitch(globalCtx, this->switchFlag)) {
|
||||
EnBox_SetupAction(this, EnBox_AppearOnSwitchFlag);
|
||||
func_8003EBF8(globalCtx2, &globalCtx2->colCtx.dyna, this->dyna.bgId);
|
||||
func_8003EBF8(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
this->movementFlags |= ENBOX_MOVE_IMMOBILE;
|
||||
this->dyna.actor.world.pos.y = this->dyna.actor.home.pos.y - 50.0f;
|
||||
this->alpha = 0;
|
||||
|
@ -171,7 +171,7 @@ void EnBox_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->dyna.actor.world.rot.y += 0x8000;
|
||||
this->dyna.actor.home.rot.z = this->dyna.actor.world.rot.z = this->dyna.actor.shape.rot.z = 0;
|
||||
|
||||
SkelAnime_Init(globalCtx2, &this->skelanime, &gTreasureChestSkel, anim, this->jointTable, this->morphTable, 5);
|
||||
SkelAnime_Init(globalCtx, &this->skelanime, &gTreasureChestSkel, anim, this->jointTable, this->morphTable, 5);
|
||||
Animation_Change(&this->skelanime, anim, 1.5f, animFrameStart, endFrame, ANIMMODE_ONCE, 0.0f);
|
||||
|
||||
switch (this->type) {
|
||||
|
|
|
@ -119,7 +119,7 @@ void EnCow_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
func_809DEE9C(this);
|
||||
this->actionFunc = func_809DF96C;
|
||||
if (globalCtx->sceneNum == SCENE_LINK_HOME) {
|
||||
if (LINK_IS_CHILD) {
|
||||
if (!LINK_IS_ADULT) {
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -100,7 +100,7 @@ static u32 sDeathCount = 0;
|
|||
|
||||
static InitChainEntry sInitChain[] = {
|
||||
ICHAIN_F32(uncullZoneScale, 3000, ICHAIN_CONTINUE),
|
||||
ICHAIN_S8(naviEnemyId, 88, ICHAIN_CONTINUE),
|
||||
ICHAIN_S8(naviEnemyId, 0x58, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32_DIV1000(gravity, -200, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32(targetArrowOffset, 2000, ICHAIN_STOP),
|
||||
};
|
||||
|
|
|
@ -119,7 +119,7 @@ void EnCs_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
EnCs* this = THIS;
|
||||
s32 pad;
|
||||
|
||||
if (gSaveContext.nightFlag != 0) {
|
||||
if (!IS_DAY) {
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -61,7 +61,40 @@ static ColliderCylinderInit sCylinderInit = {
|
|||
|
||||
static CollisionCheckInfoInit2 sColChkInit = { 0, 0, 0, 0, MASS_IMMOVABLE };
|
||||
|
||||
static DamageTable sDamageTable = { 0 };
|
||||
static DamageTable sDamageTable = {
|
||||
/* Deku nut */ DMG_ENTRY(0, 0x0),
|
||||
/* Deku stick */ DMG_ENTRY(0, 0x0),
|
||||
/* Slingshot */ DMG_ENTRY(0, 0x0),
|
||||
/* Explosive */ DMG_ENTRY(0, 0x0),
|
||||
/* Boomerang */ DMG_ENTRY(0, 0x0),
|
||||
/* Normal arrow */ DMG_ENTRY(0, 0x0),
|
||||
/* Hammer swing */ DMG_ENTRY(0, 0x0),
|
||||
/* Hookshot */ DMG_ENTRY(0, 0x0),
|
||||
/* Kokiri sword */ DMG_ENTRY(0, 0x0),
|
||||
/* Master sword */ DMG_ENTRY(0, 0x0),
|
||||
/* Giant's Knife */ DMG_ENTRY(0, 0x0),
|
||||
/* Fire arrow */ DMG_ENTRY(0, 0x0),
|
||||
/* Ice arrow */ DMG_ENTRY(0, 0x0),
|
||||
/* Light arrow */ DMG_ENTRY(0, 0x0),
|
||||
/* Unk arrow 1 */ DMG_ENTRY(0, 0x0),
|
||||
/* Unk arrow 2 */ DMG_ENTRY(0, 0x0),
|
||||
/* Unk arrow 3 */ DMG_ENTRY(0, 0x0),
|
||||
/* Fire magic */ DMG_ENTRY(0, 0x0),
|
||||
/* Ice magic */ DMG_ENTRY(0, 0x0),
|
||||
/* Light magic */ DMG_ENTRY(0, 0x0),
|
||||
/* Shield */ DMG_ENTRY(0, 0x0),
|
||||
/* Mirror Ray */ DMG_ENTRY(0, 0x0),
|
||||
/* Kokiri spin */ DMG_ENTRY(0, 0x0),
|
||||
/* Giant spin */ DMG_ENTRY(0, 0x0),
|
||||
/* Master spin */ DMG_ENTRY(0, 0x0),
|
||||
/* Kokiri jump */ DMG_ENTRY(0, 0x0),
|
||||
/* Giant jump */ DMG_ENTRY(0, 0x0),
|
||||
/* Master jump */ DMG_ENTRY(0, 0x0),
|
||||
/* Unknown 1 */ DMG_ENTRY(0, 0x0),
|
||||
/* Unblockable */ DMG_ENTRY(0, 0x0),
|
||||
/* Hammer jump */ DMG_ENTRY(0, 0x0),
|
||||
/* Unknown 2 */ DMG_ENTRY(0, 0x0),
|
||||
};
|
||||
|
||||
static struct_D_80AA1678 sAnimations[] = {
|
||||
{ 0x06001AB0, 1.0f, 2, -7.0f }, { 0x06007DE0, 1.0f, 0, -7.0f }, { 0x0600885C, 1.0f, 0, -7.0f },
|
||||
|
@ -92,13 +125,13 @@ void EnDaikuKakariko_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
if (LINK_AGE_IN_YEARS == YEARS_CHILD) {
|
||||
switch (globalCtx->sceneNum) {
|
||||
case SCENE_SPOT01:
|
||||
if (gSaveContext.nightFlag == 0) {
|
||||
if (IS_DAY) {
|
||||
this->flags |= 1;
|
||||
this->flags |= initFlags[this->actor.params & 3];
|
||||
}
|
||||
break;
|
||||
case SCENE_KAKARIKO:
|
||||
if (gSaveContext.nightFlag == 1) {
|
||||
if (IS_NIGHT) {
|
||||
this->flags |= 2;
|
||||
}
|
||||
break;
|
||||
|
@ -112,7 +145,7 @@ void EnDaikuKakariko_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
Actor_Kill(&this->actor);
|
||||
}
|
||||
|
||||
if (gSaveContext.nightFlag == 1) {
|
||||
if (IS_NIGHT) {
|
||||
this->flags |= 8;
|
||||
}
|
||||
|
||||
|
|
|
@ -244,7 +244,7 @@ void EnDekubaba_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
// This and its counterpart below mean that a Deku Stick jumpslash will not trigger the Deku Stick drop route.
|
||||
// (Of course they reckoned without each age being able to use the other's items, so Stick and Master Sword
|
||||
// jumpslash can give the Stick drop as adult, and neither will as child.)
|
||||
if (LINK_IS_CHILD) {
|
||||
if (!LINK_IS_ADULT) {
|
||||
sBigDekuBabaDamageTable.table[0x1B] = DMG_ENTRY(4, DEKUBABA_DMGEFF_NONE); // DMG_JUMP_MASTER
|
||||
}
|
||||
|
||||
|
@ -259,7 +259,7 @@ void EnDekubaba_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->collider.elements[i].dim.worldSphere.radius = this->collider.elements[i].dim.modelSphere.radius;
|
||||
}
|
||||
|
||||
if (LINK_IS_CHILD) {
|
||||
if (!LINK_IS_ADULT) {
|
||||
sDekuBabaDamageTable.table[0x1B] = DMG_ENTRY(4, DEKUBABA_DMGEFF_NONE); // DMG_JUMP_MASTER
|
||||
}
|
||||
|
||||
|
|
|
@ -179,7 +179,7 @@ void EnDekunuts_SetupBurrow(EnDekunuts* this) {
|
|||
|
||||
void EnDekunuts_SetupBeginRun(EnDekunuts* this) {
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &gDekuNutsUnburrowAnim, -3.0f);
|
||||
this->collider.dim.height = 0x25;
|
||||
this->collider.dim.height = 37;
|
||||
this->actor.colChkInfo.mass = 0x32;
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_NUTS_DAMAGE);
|
||||
this->collider.base.acFlags &= ~AC_ON;
|
||||
|
|
|
@ -138,7 +138,7 @@ static DamageTable D_809EC620 = {
|
|||
};
|
||||
|
||||
static InitChainEntry sInitChain[] = {
|
||||
ICHAIN_S8(naviEnemyId, 47, ICHAIN_CONTINUE),
|
||||
ICHAIN_S8(naviEnemyId, 0x2F, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32(targetArrowOffset, 2000, ICHAIN_CONTINUE),
|
||||
ICHAIN_VEC3F_DIV1000(scale, 10, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32_DIV1000(gravity, -3500, ICHAIN_STOP),
|
||||
|
|
|
@ -205,7 +205,7 @@ void EnDha_Wait(EnDha* this, GlobalContext* globalCtx) {
|
|||
playerPos.x += Math_SinS(player->actor.shape.rot.y) * -5.0f;
|
||||
playerPos.z += Math_CosS(player->actor.shape.rot.y) * -5.0f;
|
||||
|
||||
if (LINK_IS_CHILD) {
|
||||
if (!LINK_IS_ADULT) {
|
||||
playerPos.y += 38.0f;
|
||||
} else {
|
||||
playerPos.y += 56.0f;
|
||||
|
|
|
@ -177,7 +177,7 @@ s32 EnDivingGame_HasMinigameFinished(EnDivingGame* this, GlobalContext* globalCt
|
|||
void func_809EDCB0(EnDivingGame* this, GlobalContext* globalCtx) {
|
||||
f32 frameCount = Animation_GetLastFrame(&gZoraIdleAnim);
|
||||
|
||||
Animation_Change(&this->skelAnime, &gZoraIdleAnim, 1.0f, 0.0f, (s16)frameCount, 0, -10.0f);
|
||||
Animation_Change(&this->skelAnime, &gZoraIdleAnim, 1.0f, 0.0f, (s16)frameCount, ANIMMODE_LOOP, -10.0f);
|
||||
this->notPlayingMinigame = true;
|
||||
this->actionFunc = EnDivingGame_Talk;
|
||||
}
|
||||
|
@ -282,7 +282,7 @@ void func_809EE048(EnDivingGame* this, GlobalContext* globalCtx) {
|
|||
void func_809EE0FC(EnDivingGame* this, GlobalContext* globalCtx) {
|
||||
f32 frameCount = Animation_GetLastFrame(&gZoraThrowRupeesAnim);
|
||||
|
||||
Animation_Change(&this->skelAnime, &gZoraThrowRupeesAnim, 1.0f, 0.0f, (s16)frameCount, 2, -10.0f);
|
||||
Animation_Change(&this->skelAnime, &gZoraThrowRupeesAnim, 1.0f, 0.0f, (s16)frameCount, ANIMMODE_ONCE, -10.0f);
|
||||
this->notPlayingMinigame = false;
|
||||
this->actionFunc = func_809EE194;
|
||||
}
|
||||
|
|
|
@ -76,48 +76,48 @@ static ColliderCylinderInitType1 sCylinderInit = {
|
|||
{ 18, 32, 0, { 0, 0, 0 } },
|
||||
};
|
||||
|
||||
u16 D_809F040C[] = {
|
||||
static u16 D_809F040C[] = {
|
||||
0x10A0, 0x10A1, 0x10A2, 0x10CA, 0x10CB, 0x10CC, 0x10CD, 0x10CE, 0x10CF, 0x10DC, 0x10DD,
|
||||
};
|
||||
|
||||
// Debug text: sells { Deku Nuts, Deku Sticks, Piece of Heart, Deku Seeds,
|
||||
// Deku Shield, Bombs, Arrows, Red Potion,
|
||||
// Green Potion, Deku Stick Upgrade, Deku Nut Upgrade }
|
||||
char* D_809F0424[] = {
|
||||
static char* D_809F0424[] = {
|
||||
"デクの実売り ", "デクの棒売り ", "ハートの欠片売り ", "デクの種売り ",
|
||||
"デクの盾売り ", "バクダン売り ", "矢売り ", "赤のくすり売り ",
|
||||
"緑のくすり売り ", "デクの棒持てる数を増やす", "デクの実持てる数を増やす",
|
||||
};
|
||||
|
||||
DnsItemEntry D_809F0450 = { 20, 5, GI_NUTS_5_2, func_809EF5A4, func_809EFA28 };
|
||||
static DnsItemEntry D_809F0450 = { 20, 5, GI_NUTS_5_2, func_809EF5A4, func_809EFA28 };
|
||||
|
||||
DnsItemEntry D_809F0460 = { 15, 1, GI_STICKS_1, func_809EF658, func_809EF9F8 };
|
||||
static DnsItemEntry D_809F0460 = { 15, 1, GI_STICKS_1, func_809EF658, func_809EF9F8 };
|
||||
|
||||
DnsItemEntry D_809F0470 = { 10, 1, GI_HEART_PIECE, func_809EF70C, func_809EFA58 };
|
||||
static DnsItemEntry D_809F0470 = { 10, 1, GI_HEART_PIECE, func_809EF70C, func_809EFA58 };
|
||||
|
||||
DnsItemEntry D_809F0480 = { 40, 30, GI_SEEDS_30, func_809EF73C, func_809EF9F8 };
|
||||
static DnsItemEntry D_809F0480 = { 40, 30, GI_SEEDS_30, func_809EF73C, func_809EF9F8 };
|
||||
|
||||
DnsItemEntry D_809F0490 = { 50, 1, GI_SHIELD_DEKU, func_809EF800, func_809EF9F8 };
|
||||
static DnsItemEntry D_809F0490 = { 50, 1, GI_SHIELD_DEKU, func_809EF800, func_809EF9F8 };
|
||||
|
||||
DnsItemEntry D_809F04A0 = { 40, 5, GI_BOMBS_5, func_809EF854, func_809EFA9C };
|
||||
static DnsItemEntry D_809F04A0 = { 40, 5, GI_BOMBS_5, func_809EF854, func_809EFA9C };
|
||||
|
||||
DnsItemEntry D_809F04B0 = { 70, 20, GI_ARROWS_LARGE, func_809EF8F4, func_809EFACC };
|
||||
static DnsItemEntry D_809F04B0 = { 70, 20, GI_ARROWS_LARGE, func_809EF8F4, func_809EFACC };
|
||||
|
||||
DnsItemEntry D_809F04C0 = { 40, 1, GI_POTION_RED, func_809EF9A4, func_809EF9F8 };
|
||||
static DnsItemEntry D_809F04C0 = { 40, 1, GI_POTION_RED, func_809EF9A4, func_809EF9F8 };
|
||||
|
||||
DnsItemEntry D_809F04D0 = { 40, 1, GI_POTION_GREEN, func_809EF9A4, func_809EF9F8 };
|
||||
static DnsItemEntry D_809F04D0 = { 40, 1, GI_POTION_GREEN, func_809EF9A4, func_809EF9F8 };
|
||||
|
||||
DnsItemEntry D_809F04E0 = { 40, 1, GI_STICK_UPGRADE_20, func_809EF70C, func_809EFAFC };
|
||||
static DnsItemEntry D_809F04E0 = { 40, 1, GI_STICK_UPGRADE_20, func_809EF70C, func_809EFAFC };
|
||||
|
||||
DnsItemEntry D_809F04F0 = { 40, 1, GI_NUT_UPGRADE_30, func_809EF70C, func_809EFB40 };
|
||||
static DnsItemEntry D_809F04F0 = { 40, 1, GI_NUT_UPGRADE_30, func_809EF70C, func_809EFB40 };
|
||||
|
||||
DnsItemEntry* D_809F0500[] = {
|
||||
static DnsItemEntry* sItemEntries[] = {
|
||||
&D_809F0450, &D_809F0460, &D_809F0470, &D_809F0480, &D_809F0490, &D_809F04A0,
|
||||
&D_809F04B0, &D_809F04C0, &D_809F04D0, &D_809F04E0, &D_809F04F0,
|
||||
};
|
||||
|
||||
static InitChainEntry sInitChain[] = {
|
||||
ICHAIN_S8(naviEnemyId, 78, ICHAIN_CONTINUE),
|
||||
ICHAIN_S8(naviEnemyId, 0x4E, ICHAIN_CONTINUE),
|
||||
ICHAIN_U8(targetMode, 2, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32(targetArrowOffset, 30, ICHAIN_STOP),
|
||||
};
|
||||
|
@ -128,10 +128,10 @@ typedef struct {
|
|||
/* 0x08 */ f32 transitionRate;
|
||||
} DnsAnimInfo; // size = 0xC
|
||||
|
||||
DnsAnimInfo D_809F0538[] = {
|
||||
{ &gBusinessScrubNervousIdleAnim, 0x00, 0.0f },
|
||||
{ &gBusinessScrubAnim_4404, 0x02, 0.0f },
|
||||
{ &gBusinessScrubNervousTransitionAnim, 0x02, 0.0f },
|
||||
static DnsAnimInfo sAnimInfo[] = {
|
||||
{ &gBusinessScrubNervousIdleAnim, ANIMMODE_LOOP, 0.0f },
|
||||
{ &gBusinessScrubAnim_4404, ANIMMODE_ONCE, 0.0f },
|
||||
{ &gBusinessScrubNervousTransitionAnim, ANIMMODE_ONCE, 0.0f },
|
||||
};
|
||||
|
||||
void EnDns_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
@ -165,7 +165,7 @@ void EnDns_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->actor.speedXZ = 0.0f;
|
||||
this->actor.velocity.y = 0.0f;
|
||||
this->actor.gravity = -1.0f;
|
||||
this->dnsItemEntry = D_809F0500[this->actor.params];
|
||||
this->dnsItemEntry = sItemEntries[this->actor.params];
|
||||
this->actionFunc = EnDns_SetupWait;
|
||||
}
|
||||
|
||||
|
@ -178,10 +178,10 @@ void EnDns_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|||
void EnDns_Change(EnDns* this, u8 arg1) {
|
||||
s16 frameCount;
|
||||
|
||||
frameCount = Animation_GetLastFrame(D_809F0538[arg1].anim);
|
||||
frameCount = Animation_GetLastFrame(sAnimInfo[arg1].anim);
|
||||
this->unk_2BA = arg1; // Not used anywhere else?
|
||||
Animation_Change(&this->skelAnime, D_809F0538[arg1].anim, 1.0f, 0.0f, (f32)frameCount, D_809F0538[arg1].mode,
|
||||
D_809F0538[arg1].transitionRate);
|
||||
Animation_Change(&this->skelAnime, sAnimInfo[arg1].anim, 1.0f, 0.0f, (f32)frameCount, sAnimInfo[arg1].mode,
|
||||
sAnimInfo[arg1].transitionRate);
|
||||
}
|
||||
|
||||
/* Item give checking functions */
|
||||
|
|
|
@ -248,7 +248,7 @@ void EnDntNomal_TargetWait(EnDntNomal* this, GlobalContext* globalCtx) {
|
|||
func_80078884(NA_SE_SY_TRE_BOX_APPEAR);
|
||||
// Big hit
|
||||
osSyncPrintf(VT_FGCOL(CYAN) "☆☆☆☆☆ 大当り ☆☆☆☆☆ %d\n" VT_RST, this->hitCounter);
|
||||
if (LINK_IS_CHILD && !(gSaveContext.itemGetInf[1] & 0x2000)) {
|
||||
if (!LINK_IS_ADULT && !(gSaveContext.itemGetInf[1] & 0x2000)) {
|
||||
this->hitCounter++;
|
||||
if (this->hitCounter >= 3) {
|
||||
OnePointCutscene_Init(globalCtx, 4140, -99, &this->actor, MAIN_CAM);
|
||||
|
|
|
@ -301,7 +301,7 @@ void EnDodongo_SpawnBombSmoke(EnDodongo* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
static InitChainEntry sInitChain[] = {
|
||||
ICHAIN_S8(naviEnemyId, 13, ICHAIN_CONTINUE),
|
||||
ICHAIN_S8(naviEnemyId, 0x0D, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32_DIV1000(gravity, -1000, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32(targetArrowOffset, 2800, ICHAIN_STOP),
|
||||
};
|
||||
|
|
|
@ -63,7 +63,7 @@ static InitChainEntry sInitChain[] = {
|
|||
ICHAIN_F32(uncullZoneForward, 4000, ICHAIN_STOP),
|
||||
};
|
||||
|
||||
AnimationHeader* D_809FCECC[] = { &gDoor3Anim, &gDoor1Anim, &gDoor4Anim, &gDoor2Anim };
|
||||
static AnimationHeader* D_809FCECC[] = { &gDoor3Anim, &gDoor1Anim, &gDoor4Anim, &gDoor2Anim };
|
||||
|
||||
static u8 sDoorAnimOpenFrames[] = { 25, 25, 25, 25 };
|
||||
|
||||
|
|
|
@ -138,7 +138,7 @@ s16 func_809FDCDC(GlobalContext* globalCtx, Actor* actor) {
|
|||
}
|
||||
|
||||
s32 func_809FDDB4(EnDu* this, GlobalContext* globalCtx) {
|
||||
if (globalCtx->sceneNum == SCENE_SPOT18 && gSaveContext.linkAge == 1) {
|
||||
if (globalCtx->sceneNum == SCENE_SPOT18 && LINK_IS_CHILD) {
|
||||
return 1;
|
||||
} else if (globalCtx->sceneNum == SCENE_HIDAN && !(gSaveContext.infTable[0x11] & 0x400) && LINK_IS_ADULT) {
|
||||
return 1;
|
||||
|
@ -277,7 +277,7 @@ void EnDu_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
EnDu_SetupAction(this, func_809FE890);
|
||||
} else if (globalCtx->sceneNum == 4) {
|
||||
EnDu_SetupAction(this, func_809FE638);
|
||||
} else if (LINK_IS_CHILD) {
|
||||
} else if (!LINK_IS_ADULT) {
|
||||
EnDu_SetupAction(this, func_809FE3C0);
|
||||
} else {
|
||||
EnDu_SetupAction(this, func_809FE3B4);
|
||||
|
|
|
@ -107,7 +107,7 @@ static DamageTable sDamageTable = {
|
|||
};
|
||||
|
||||
static InitChainEntry sInitChain[] = {
|
||||
ICHAIN_S8(naviEnemyId, 25, ICHAIN_CONTINUE),
|
||||
ICHAIN_S8(naviEnemyId, 0x19, ICHAIN_CONTINUE),
|
||||
ICHAIN_VEC3F_DIV1000(scale, 5, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32(targetArrowOffset, 2500, ICHAIN_STOP),
|
||||
};
|
||||
|
|
|
@ -233,7 +233,7 @@ void EnEncount1_SpawnStalchildOrWolfos(EnEncount1* this, GlobalContext* globalCt
|
|||
this->outOfRangeTimer++;
|
||||
return;
|
||||
}
|
||||
} else if (!gSaveContext.nightFlag || (Player_GetMask(globalCtx) == PLAYER_MASK_BUNNY)) {
|
||||
} else if (IS_DAY || (Player_GetMask(globalCtx) == PLAYER_MASK_BUNNY)) {
|
||||
this->killCount = 0;
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -199,7 +199,7 @@ void EnEncount2_SpawnRocks(EnEncount2* this, GlobalContext* globalCtx) {
|
|||
if (spawnerState == ENCOUNT2_ACTIVE_DEATH_MOUNTAIN) {
|
||||
this->timerBetweenRockSpawns = 4;
|
||||
spawnedRockType = FIRE_ROCK_SPAWNED_FALLING1;
|
||||
if ((Rand_ZeroFloat(1.99f) < 1.0f) && (LINK_IS_CHILD)) {
|
||||
if ((Rand_ZeroFloat(1.99f) < 1.0f) && !LINK_IS_ADULT) {
|
||||
// rock spawn pos X, Z near player
|
||||
tempVec2X = Rand_CenteredFloat(10.0f) + player->actor.world.pos.x;
|
||||
tempVec2Z = Rand_CenteredFloat(10.0f) + player->actor.world.pos.z;
|
||||
|
|
|
@ -454,7 +454,6 @@ void EnFirefly_Die(EnFirefly* this, GlobalContext* globalCtx) {
|
|||
|
||||
void EnFirefly_DiveAttack(EnFirefly* this, GlobalContext* globalCtx) {
|
||||
Player* player = PLAYER;
|
||||
|
||||
Vec3f preyPos;
|
||||
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
|
@ -586,6 +585,7 @@ void EnFirefly_Perch(EnFirefly* this, GlobalContext* globalCtx) {
|
|||
void EnFirefly_DisturbDiveAttack(EnFirefly* this, GlobalContext* globalCtx) {
|
||||
Player* player = PLAYER;
|
||||
Vec3f preyPos;
|
||||
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
|
||||
if (this->timer != 0) {
|
||||
|
@ -742,8 +742,8 @@ void EnFirefly_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList
|
|||
static Vec3f limbSrc = { 0.0f, 0.0f, 0.0f };
|
||||
Vec3f effPos;
|
||||
Vec3f* limbDest;
|
||||
void* effPrimColor;
|
||||
void* effEnvColor;
|
||||
Color_RGBA8* effPrimColor;
|
||||
Color_RGBA8* effEnvColor;
|
||||
MtxF mtx;
|
||||
s16 effScaleStep;
|
||||
s16 effLife;
|
||||
|
|
|
@ -117,13 +117,13 @@ static DamageTable sDamageTable = {
|
|||
|
||||
static InitChainEntry sInitChain[] = {
|
||||
ICHAIN_S8(naviEnemyId, 0x31, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32(targetArrowOffset, 0x157C, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32(targetArrowOffset, 5500, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32_DIV1000(gravity, -1000, ICHAIN_STOP),
|
||||
};
|
||||
|
||||
void EnFloormas_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
void EnFloormas_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
EnFloormas* this = THIS;
|
||||
GlobalContext* globalCtx2 = globalCtx;
|
||||
GlobalContext* globalCtx = globalCtx2;
|
||||
s32 invisble;
|
||||
s32 pad;
|
||||
|
||||
|
@ -151,7 +151,7 @@ void EnFloormas_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
} else {
|
||||
// spawn first small floormaster
|
||||
this->actor.parent =
|
||||
Actor_Spawn(&globalCtx2->actorCtx, globalCtx2, ACTOR_EN_FLOORMAS, this->actor.world.pos.x,
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_FLOORMAS, this->actor.world.pos.x,
|
||||
this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, invisble + SPAWN_SMALL);
|
||||
if (this->actor.parent == NULL) {
|
||||
Actor_Kill(&this->actor);
|
||||
|
@ -159,7 +159,7 @@ void EnFloormas_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
// spawn 2nd small floormaster
|
||||
this->actor.child =
|
||||
Actor_Spawn(&globalCtx2->actorCtx, globalCtx2, ACTOR_EN_FLOORMAS, this->actor.world.pos.x,
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_FLOORMAS, this->actor.world.pos.x,
|
||||
this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, invisble + SPAWN_SMALL);
|
||||
if (this->actor.child == NULL) {
|
||||
Actor_Kill(this->actor.parent);
|
||||
|
@ -351,7 +351,7 @@ void EnFloormas_SetupGrabLink(EnFloormas* this, Player* player) {
|
|||
this->actor.speedXZ = 0.0f;
|
||||
this->actor.velocity.y = 0.0f;
|
||||
EnFloormas_MakeInvulnerable(this);
|
||||
if (LINK_IS_CHILD) {
|
||||
if (!LINK_IS_ADULT) {
|
||||
yDelta = CLAMP(-this->actor.yDistToPlayer, 20.0f, 30.0f);
|
||||
xzDelta = -10.0f;
|
||||
} else {
|
||||
|
@ -779,7 +779,7 @@ void EnFloormas_GrabLink(EnFloormas* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
|
||||
if (LINK_IS_CHILD) {
|
||||
if (!LINK_IS_ADULT) {
|
||||
yDelta = CLAMP(-this->actor.yDistToPlayer, 20.0f, 30.0f);
|
||||
xzDelta = -10.0f;
|
||||
} else {
|
||||
|
@ -812,7 +812,7 @@ void EnFloormas_GrabLink(EnFloormas* this, GlobalContext* globalCtx) {
|
|||
} else {
|
||||
// Damage link every 20 frames
|
||||
if ((this->actionTarget % 20) == 0) {
|
||||
if (LINK_IS_CHILD) {
|
||||
if (!LINK_IS_ADULT) {
|
||||
func_8002F7DC(&player->actor, NA_SE_VO_LI_DAMAGE_S_KID);
|
||||
} else {
|
||||
func_8002F7DC(&player->actor, NA_SE_VO_LI_DAMAGE_S);
|
||||
|
|
|
@ -100,7 +100,7 @@ typedef struct {
|
|||
f32 yDist;
|
||||
} LogSpotToFromWater;
|
||||
|
||||
EnFrPointers sEnFrPointers = {
|
||||
static EnFrPointers sEnFrPointers = {
|
||||
0x00,
|
||||
{
|
||||
NULL,
|
||||
|
@ -112,12 +112,12 @@ EnFrPointers sEnFrPointers = {
|
|||
};
|
||||
|
||||
// Flags for gSaveContext.eventChkInf[13]
|
||||
u16 sSongIndex[] = {
|
||||
static u16 sSongIndex[] = {
|
||||
0x0002, 0x0004, 0x0010, 0x0008, 0x0020, 0x0040, 0x0001, 0x0000,
|
||||
};
|
||||
|
||||
// Frog to Index for Song Flag (sSongIndex) Mapping
|
||||
u8 sFrogToSongIndex[] = {
|
||||
static u8 sFrogToSongIndex[] = {
|
||||
FROG_SARIA, FROG_SUNS, FROG_SOT, FROG_ZL, FROG_EPONA,
|
||||
};
|
||||
|
||||
|
@ -397,7 +397,8 @@ void EnFr_DecrementBlinkTimerUpdate(EnFr* this) {
|
|||
|
||||
void EnFr_SetupJumpingOutOfWater(EnFr* this, GlobalContext* globalCtx) {
|
||||
if (sEnFrPointers.flags == sTimerJumpingOutOfWater[this->actor.params - 1]) {
|
||||
Animation_Change(&this->skelAnime, &D_060007BC, 1.0f, 0.0f, Animation_GetLastFrame(&D_060007BC), 2, 0.0f);
|
||||
Animation_Change(&this->skelAnime, &D_060007BC, 1.0f, 0.0f, Animation_GetLastFrame(&D_060007BC), ANIMMODE_ONCE,
|
||||
0.0f);
|
||||
EnFr_DrawActive(this);
|
||||
this->actionFunc = EnFr_JumpingOutOfWater;
|
||||
}
|
||||
|
@ -445,17 +446,20 @@ void EnFr_OrientOnLogSpot(EnFr* this, GlobalContext* globalCtx) {
|
|||
if ((rotYRemaining == 0) && (this->skelAnime.curFrame == this->skelAnime.endFrame)) {
|
||||
sEnFrPointers.flags++;
|
||||
this->actionFunc = EnFr_ChooseJumpFromLogSpot;
|
||||
Animation_Change(&this->skelAnime, &D_06001534, 1.0f, 0.0f, Animation_GetLastFrame(&D_06001534), 0, 0.0f);
|
||||
Animation_Change(&this->skelAnime, &D_06001534, 1.0f, 0.0f, Animation_GetLastFrame(&D_06001534), ANIMMODE_LOOP,
|
||||
0.0f);
|
||||
}
|
||||
}
|
||||
|
||||
void EnFr_ChooseJumpFromLogSpot(EnFr* this, GlobalContext* globalCtx) {
|
||||
if (sEnFrPointers.flags == 12) {
|
||||
this->actor.world.rot.y = ((f32)0x8000 / M_PI) * sLogSpotToFromWater[this->actor.params].yaw;
|
||||
Animation_Change(&this->skelAnime, &D_060007BC, 1.0f, 0.0f, Animation_GetLastFrame(&D_060007BC), 2, 0.0f);
|
||||
Animation_Change(&this->skelAnime, &D_060007BC, 1.0f, 0.0f, Animation_GetLastFrame(&D_060007BC), ANIMMODE_ONCE,
|
||||
0.0f);
|
||||
this->actionFunc = EnFr_JumpingBackIntoWater;
|
||||
} else if (this->isJumpingUp) {
|
||||
Animation_Change(&this->skelAnime, &D_060007BC, 1.0f, 0.0f, Animation_GetLastFrame(&D_060007BC), 2, 0.0f);
|
||||
Animation_Change(&this->skelAnime, &D_060007BC, 1.0f, 0.0f, Animation_GetLastFrame(&D_060007BC), ANIMMODE_ONCE,
|
||||
0.0f);
|
||||
this->actionFunc = EnFr_JumpingUp;
|
||||
}
|
||||
}
|
||||
|
@ -477,7 +481,8 @@ void EnFr_JumpingUp(EnFr* this, GlobalContext* globalCtx) {
|
|||
if (EnFr_IsBelowLogSpot(this, &yDistToLogSpot)) {
|
||||
this->isJumpingUp = false;
|
||||
this->actor.gravity = 0.0f;
|
||||
Animation_Change(&this->skelAnime, &D_060011C0, 1.0f, 0.0f, Animation_GetLastFrame(&D_060011C0), 0, 0.0f);
|
||||
Animation_Change(&this->skelAnime, &D_060011C0, 1.0f, 0.0f, Animation_GetLastFrame(&D_060011C0), ANIMMODE_LOOP,
|
||||
0.0f);
|
||||
this->actionFunc = EnFr_ChooseJumpFromLogSpot;
|
||||
} else if ((this->actor.velocity.y <= 0.0f) && (yDistToLogSpot < 40.0f)) {
|
||||
this->skelAnime.playSpeed = 1.0f;
|
||||
|
@ -498,7 +503,8 @@ void EnFr_JumpingBackIntoWater(EnFr* this, GlobalContext* globalCtx) {
|
|||
|
||||
// Final Spot Reached
|
||||
if ((this->actor.velocity.y < 0.0f) && (this->actor.world.pos.y < yUnderwater)) {
|
||||
Animation_Change(&this->skelAnime, &D_06001534, 1.0f, 0.0f, Animation_GetLastFrame(&D_06001534), 0, 0.0f);
|
||||
Animation_Change(&this->skelAnime, &D_06001534, 1.0f, 0.0f, Animation_GetLastFrame(&D_06001534), ANIMMODE_LOOP,
|
||||
0.0f);
|
||||
this->actionFunc = EnFr_SetupJumpingOutOfWater;
|
||||
EnFr_DrawIdle(this);
|
||||
this->isDeactivating = true;
|
||||
|
|
|
@ -85,7 +85,7 @@ void EnFu_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit);
|
||||
this->actor.colChkInfo.mass = MASS_IMMOVABLE;
|
||||
Actor_SetScale(&this->actor, 0.01f);
|
||||
if (LINK_IS_CHILD) {
|
||||
if (!LINK_IS_ADULT) {
|
||||
this->actionFunc = EnFu_WaitChild;
|
||||
this->facialExpression = FU_FACE_CALM;
|
||||
} else {
|
||||
|
|
|
@ -116,7 +116,7 @@ static ColliderCylinderInitType1 sCylinderInit3 = {
|
|||
{ 20, 30, -15, { 0, 0, 0 } },
|
||||
};
|
||||
|
||||
DamageTable sDamageTable = {
|
||||
static DamageTable sDamageTable = {
|
||||
/* Deku nut */ DMG_ENTRY(0, 0x0),
|
||||
/* Deku stick */ DMG_ENTRY(0, 0xF),
|
||||
/* Slingshot */ DMG_ENTRY(0, 0xF),
|
||||
|
@ -152,7 +152,7 @@ DamageTable sDamageTable = {
|
|||
};
|
||||
|
||||
static InitChainEntry sInitChain[] = {
|
||||
ICHAIN_S8(naviEnemyId, 59, ICHAIN_CONTINUE),
|
||||
ICHAIN_S8(naviEnemyId, 0x3B, ICHAIN_CONTINUE),
|
||||
ICHAIN_U8(targetMode, 2, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32(targetArrowOffset, 30, ICHAIN_STOP),
|
||||
};
|
||||
|
|
|
@ -377,7 +377,7 @@ void func_80A2FC0C(EnGb* this, GlobalContext* globalCtx) {
|
|||
void func_80A2FC70(EnGb* this, GlobalContext* globalCtx) {
|
||||
if (this->skelAnime.curFrame == Animation_GetLastFrame(&gPoeSellerSwingStickAnim)) {
|
||||
Animation_Change(&this->skelAnime, &gPoeSellerIdleAnim, 1.0f, 0.0f, Animation_GetLastFrame(&gPoeSellerIdleAnim),
|
||||
0, 0.0f);
|
||||
ANIMMODE_LOOP, 0.0f);
|
||||
this->actionFunc = func_80A2F83C;
|
||||
} else if (this->skelAnime.curFrame == 18.0f) {
|
||||
this->cagedSouls[1].unk_1 = 3;
|
||||
|
@ -395,21 +395,21 @@ void func_80A2FC70(EnGb* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
|
||||
void EnGb_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
void EnGb_Update(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
EnGb* this = THIS;
|
||||
GlobalContext* globalCtx2 = globalCtx;
|
||||
GlobalContext* globalCtx = globalCtx2;
|
||||
s32 i;
|
||||
f32 rand;
|
||||
|
||||
this->frameTimer++;
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
this->actionFunc(this, globalCtx2);
|
||||
this->actionFunc(this, globalCtx);
|
||||
this->dyna.actor.textId = this->textId;
|
||||
func_80A2F608(this);
|
||||
CollisionCheck_SetOC(globalCtx2, &globalCtx2->colChkCtx, &this->collider.base);
|
||||
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(this->bottlesColliders); i++) {
|
||||
CollisionCheck_SetOC(globalCtx2, &globalCtx2->colChkCtx, &this->bottlesColliders[i].base);
|
||||
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->bottlesColliders[i].base);
|
||||
}
|
||||
|
||||
rand = Rand_ZeroOne();
|
||||
|
@ -417,7 +417,7 @@ void EnGb_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->lightColor.g = (s8)(rand * 100.0f) + 155;
|
||||
this->lightColor.b = (s8)(rand * 160.0f) + 95;
|
||||
this->lightColor.a = 200;
|
||||
EnGb_UpdateCagedSouls(this, globalCtx2);
|
||||
EnGb_UpdateCagedSouls(this, globalCtx);
|
||||
}
|
||||
|
||||
void EnGb_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
|
|
@ -181,7 +181,7 @@ void EnGe2_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|||
s32 Ge2_DetectPlayerInAction(GlobalContext* globalCtx, EnGe2* this) {
|
||||
f32 visionScale;
|
||||
|
||||
visionScale = ((gSaveContext.nightFlag != 0) ? 0.75f : 1.5f);
|
||||
visionScale = (!IS_DAY ? 0.75f : 1.5f);
|
||||
|
||||
if ((250.0f * visionScale) < this->actor.xzDistToPlayer) {
|
||||
return 0;
|
||||
|
@ -203,7 +203,7 @@ s32 Ge2_DetectPlayerInUpdate(GlobalContext* globalCtx, EnGe2* this, Vec3f* pos,
|
|||
CollisionPoly* outPoly;
|
||||
f32 visionScale;
|
||||
|
||||
visionScale = ((gSaveContext.nightFlag != 0) ? 0.75f : 1.5f);
|
||||
visionScale = (!IS_DAY ? 0.75f : 1.5f);
|
||||
|
||||
if ((250.0f * visionScale) < this->actor.xzDistToPlayer) {
|
||||
return 0;
|
||||
|
|
|
@ -364,11 +364,11 @@ s32 EnGo_IsActorSpawned(EnGo* this, GlobalContext* globalCtx) {
|
|||
return true;
|
||||
} else if (globalCtx->sceneNum == SCENE_SPOT18 && LINK_IS_ADULT && (this->actor.params & 0xF0) == 0x00) {
|
||||
return true;
|
||||
} else if (globalCtx->sceneNum == SCENE_SPOT16 && gSaveContext.linkAge == 1 &&
|
||||
} else if (globalCtx->sceneNum == SCENE_SPOT16 && LINK_IS_CHILD &&
|
||||
((this->actor.params & 0xF0) == 0x20 || (this->actor.params & 0xF0) == 0x30 ||
|
||||
(this->actor.params & 0xF0) == 0x40)) {
|
||||
return true;
|
||||
} else if (globalCtx->sceneNum == SCENE_SPOT18 && gSaveContext.linkAge == 1 &&
|
||||
} else if (globalCtx->sceneNum == SCENE_SPOT18 && LINK_IS_CHILD &&
|
||||
((this->actor.params & 0xF0) == 0x50 || (this->actor.params & 0xF0) == 0x60 ||
|
||||
(this->actor.params & 0xF0) == 0x70)) {
|
||||
return true;
|
||||
|
|
|
@ -643,7 +643,7 @@ s16 EnGo2_GetStateGoronFireGeneric(GlobalContext* globalCtx, EnGo2* this) {
|
|||
}
|
||||
|
||||
u16 EnGo2_GetTextIdGoronCityStairwell(GlobalContext* globalCtx, EnGo2* this) {
|
||||
return LINK_IS_CHILD ? gSaveContext.infTable[14] & 0x8 ? 0x3022 : 0x300E : 0x3043;
|
||||
return !LINK_IS_ADULT ? gSaveContext.infTable[14] & 0x8 ? 0x3022 : 0x300E : 0x3043;
|
||||
}
|
||||
|
||||
s16 EnGo2_GetStateGoronCityStairwell(GlobalContext* globalCtx, EnGo2* this) {
|
||||
|
@ -671,7 +671,7 @@ s16 EnGo2_GetStateGoronMarketBazaar(GlobalContext* globalCtx, EnGo2* this) {
|
|||
}
|
||||
|
||||
u16 EnGo2_GetTextIdGoronCityLostWoods(GlobalContext* globalCtx, EnGo2* this) {
|
||||
if (LINK_IS_CHILD) {
|
||||
if (!LINK_IS_ADULT) {
|
||||
if (Flags_GetSwitch(globalCtx, 0x1C)) {
|
||||
return 0x302F;
|
||||
} else {
|
||||
|
@ -695,7 +695,7 @@ s16 EnGo2_GetStateGoronCityLostWoods(GlobalContext* globalCtx, EnGo2* this) {
|
|||
|
||||
// Goron at base of DMT summit
|
||||
u16 EnGo2_GetTextIdGoronDmtFairyHint(GlobalContext* globalCtx, EnGo2* this) {
|
||||
if (LINK_IS_CHILD) {
|
||||
if (!LINK_IS_ADULT) {
|
||||
return CHECK_QUEST_ITEM(QUEST_GORON_RUBY) ? 0x3065 : 0x3064;
|
||||
} else {
|
||||
return 0x3043;
|
||||
|
@ -1139,7 +1139,7 @@ s32 EnGo2_IsCameraModified(EnGo2* this, GlobalContext* globalCtx) {
|
|||
(this->actor.params & 0x1F) == GORON_CITY_STAIRWELL || (this->actor.params & 0x1F) == GORON_DMT_BIGGORON ||
|
||||
(this->actor.params & 0x1F) == GORON_MARKET_BAZAAR) {
|
||||
return true;
|
||||
} else if (!CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE) && (CHECK_OWNED_EQUIP(EQUIP_TUNIC, 1))) {
|
||||
} else if (!CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE) && CHECK_OWNED_EQUIP(EQUIP_TUNIC, 1)) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
|
@ -1533,7 +1533,7 @@ void EnGo2_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
if ((gSaveContext.infTable[16] & 0x200)) {
|
||||
Path_CopyLastPoint(this->path, &this->actor.world.pos);
|
||||
this->actor.home.pos = this->actor.world.pos;
|
||||
if (!CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE) && (CHECK_OWNED_EQUIP(EQUIP_TUNIC, 1))) {
|
||||
if (!CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE) && CHECK_OWNED_EQUIP(EQUIP_TUNIC, 1)) {
|
||||
EnGo2_GetItemAnimation(this, globalCtx);
|
||||
} else {
|
||||
this->actionFunc = EnGo2_CurledUp;
|
||||
|
|
|
@ -101,7 +101,7 @@ static Vec3f sDeadEffectVel = { 0.0f, 0.0f, 0.0f };
|
|||
|
||||
static InitChainEntry sInitChain[] = {
|
||||
ICHAIN_U8(targetMode, 3, ICHAIN_CONTINUE),
|
||||
ICHAIN_S8(naviEnemyId, 3, ICHAIN_CONTINUE),
|
||||
ICHAIN_S8(naviEnemyId, 0x03, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32_DIV1000(gravity, 0, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32(targetArrowOffset, 20, ICHAIN_STOP),
|
||||
};
|
||||
|
@ -784,7 +784,7 @@ void EnGoma_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
switch (this->gomaType) {
|
||||
case ENGOMA_NORMAL:
|
||||
this->actor.naviEnemyId = 3;
|
||||
this->actor.naviEnemyId = 0x03;
|
||||
Matrix_Translate(this->actor.world.pos.x,
|
||||
this->actor.world.pos.y + ((this->actor.shape.yOffset * this->actor.scale.y) +
|
||||
globalCtx->mainCamera.skyboxOffset.y),
|
||||
|
@ -800,7 +800,7 @@ void EnGoma_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
break;
|
||||
|
||||
case ENGOMA_EGG:
|
||||
this->actor.naviEnemyId = 2;
|
||||
this->actor.naviEnemyId = 0x02;
|
||||
y = (s16)(sinf((this->eggTimer * 5.0f * 3.1415f) / 180.0f) * 31.9f);
|
||||
y = (s16)(y + 31);
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, func_80094E78(globalCtx->state.gfxCtx, 0, y));
|
||||
|
|
|
@ -119,13 +119,13 @@ void EnHeishi1_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
if (this->type != 5) {
|
||||
if (((gSaveContext.dayTime < 0xB888) || (gSaveContext.nightFlag == 0)) && !(gSaveContext.eventChkInf[8] & 1)) {
|
||||
if (((gSaveContext.dayTime < 0xB888) || IS_DAY) && !(gSaveContext.eventChkInf[8] & 1)) {
|
||||
this->actionFunc = EnHeishi1_SetupWalk;
|
||||
} else {
|
||||
Actor_Kill(&this->actor);
|
||||
}
|
||||
} else {
|
||||
if ((gSaveContext.dayTime >= 0xB889) || (gSaveContext.nightFlag != 0) || (gSaveContext.eventChkInf[8] & 1)) {
|
||||
if ((gSaveContext.dayTime >= 0xB889) || !IS_DAY || (gSaveContext.eventChkInf[8] & 1)) {
|
||||
this->actionFunc = EnHeishi1_SetupWaitNight;
|
||||
} else {
|
||||
Actor_Kill(&this->actor);
|
||||
|
@ -451,7 +451,7 @@ void EnHeishi1_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
if (this->linkDetected) {
|
||||
// ! @bug This appears to be a check to make sure that link is standing on the ground
|
||||
//! @bug This appears to be a check to make sure that link is standing on the ground
|
||||
// before getting caught. However this is an issue for two reasons:
|
||||
// 1: When doing a backflip or falling from the upper path, links y velocity will reach
|
||||
// less than -4.0 before even touching the ground.
|
||||
|
|
|
@ -126,8 +126,8 @@ void EnHeishi2_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
Collider_InitCylinder(globalCtx, collider);
|
||||
Collider_SetCylinder(globalCtx, collider, &this->actor, &sCylinderInit);
|
||||
this->collider.dim.yShift = 0;
|
||||
this->collider.dim.radius = 0xF;
|
||||
this->collider.dim.height = 0x46;
|
||||
this->collider.dim.radius = 15;
|
||||
this->collider.dim.height = 70;
|
||||
this->actor.targetMode = 6;
|
||||
|
||||
switch (this->type) {
|
||||
|
@ -195,31 +195,31 @@ void func_80A53278(EnHeishi2* this, GlobalContext* globalCtx) {
|
|||
// "Get all spiritual stones!"
|
||||
osSyncPrintf(VT_FGCOL(GREEN) " ☆☆☆☆☆ 全部の精霊石GET! ☆☆☆☆☆ \n" VT_RST);
|
||||
this->unk_300 = 6;
|
||||
this->actor.textId = 0x7006; // "There's a lot going on in the castle right now. I can't allow even..."
|
||||
this->actor.textId = 0x7006;
|
||||
this->actionFunc = func_80A5475C;
|
||||
} else if (gSaveContext.nightFlag != 0) {
|
||||
} else if (!IS_DAY) {
|
||||
// "Sleep early for children!"
|
||||
osSyncPrintf(VT_FGCOL(YELLOW) " ☆☆☆☆☆ 子供ははやくネロ! ☆☆☆☆☆ \n" VT_RST);
|
||||
this->unk_300 = 6;
|
||||
this->actor.textId = 0x7002; // "Welcome to Hyrule Castle Town. It's a peaceful, prosperous town."
|
||||
this->actor.textId = 0x7002;
|
||||
this->actionFunc = func_80A5475C;
|
||||
|
||||
} else if (this->unk_30C != 0) {
|
||||
// "Anything passes"
|
||||
osSyncPrintf(VT_FGCOL(BLUE) " ☆☆☆☆☆ なんでも通るよ ☆☆☆☆☆ \n" VT_RST);
|
||||
this->unk_300 = 6;
|
||||
this->actor.textId = 0x7099; // "KEEP IT A SECRET FROM EVERYONE"
|
||||
this->actor.textId = 0x7099;
|
||||
this->actionFunc = func_80A5475C;
|
||||
} else if (gSaveContext.eventChkInf[1] & 4) {
|
||||
if (this->unk_30E == 0) {
|
||||
// "Start under the first sleeve!"
|
||||
osSyncPrintf(VT_FGCOL(PURPLE) " ☆☆☆☆☆ 1回目袖の下開始! ☆☆☆☆☆ \n" VT_RST);
|
||||
this->actor.textId = 0x7071; // "Do you really want to go through this gate that much?..."
|
||||
this->actor.textId = 0x7071;
|
||||
this->unk_30E = 1;
|
||||
} else {
|
||||
// "Start under the second sleeve!"
|
||||
osSyncPrintf(VT_FGCOL(PURPLE) " ☆☆☆☆☆ 2回目袖の下開始! ☆☆☆☆☆ \n" VT_RST);
|
||||
this->actor.textId = 0x7072; // "Give me 10 Rupees...Yes...No"
|
||||
this->actor.textId = 0x7072;
|
||||
}
|
||||
this->unk_300 = 4;
|
||||
this->actionFunc = func_80A5475C;
|
||||
|
@ -228,7 +228,7 @@ void func_80A53278(EnHeishi2* this, GlobalContext* globalCtx) {
|
|||
// "That's okay"
|
||||
osSyncPrintf(VT_FGCOL(CYAN) " ☆☆☆☆☆ それはとおらんよぉ ☆☆☆☆☆ \n" VT_RST);
|
||||
this->unk_300 = 6;
|
||||
this->actor.textId = 0x7029; // "So you say you want to see Princess Zelda, eh?..."
|
||||
this->actor.textId = 0x7029;
|
||||
this->actionFunc = func_80A5475C;
|
||||
}
|
||||
}
|
||||
|
@ -241,16 +241,16 @@ void func_80A5344C(EnHeishi2* this, GlobalContext* globalCtx) {
|
|||
case 0:
|
||||
if (gSaveContext.rupees >= 10) {
|
||||
Rupees_ChangeBy(-10);
|
||||
this->actor.textId = 0x7098; // "OK, I'll let you pass, quickly!"
|
||||
this->actor.textId = 0x7098;
|
||||
this->actionFunc = func_80A53538;
|
||||
break;
|
||||
} else {
|
||||
this->actor.textId = 0x7097; // "Well, maybe that's too much for a kid to pay."
|
||||
this->actor.textId = 0x7097;
|
||||
this->actionFunc = func_80A54954;
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
this->actor.textId = 0x7096; // "Tsk tsk."
|
||||
this->actor.textId = 0x7096;
|
||||
this->actionFunc = func_80A54954;
|
||||
break;
|
||||
|
||||
|
@ -360,21 +360,20 @@ void func_80A5399C(EnHeishi2* this, GlobalContext* globalCtx) {
|
|||
if (!(gSaveContext.infTable[7] & 0x80)) {
|
||||
if (Player_GetMask(globalCtx) == PLAYER_MASK_KEATON) {
|
||||
if (this->unk_309 == 0) {
|
||||
this->actor.textId = 0x200A; // "Wha-ha-ha-hah! Do you think you're in disguise, Mr. Hero?"
|
||||
this->actor.textId = 0x200A;
|
||||
} else {
|
||||
this->actor.textId = 0x200B; // "Will you sell it to me? Yes/No way"
|
||||
this->actor.textId = 0x200B;
|
||||
}
|
||||
this->unk_300 = 4;
|
||||
this->unk_30B = 1;
|
||||
var = 1;
|
||||
} else {
|
||||
this->actor.textId = 0x2016;
|
||||
// "I wish I could go to the mask shop in town to buy a present for my kid..sigh.."
|
||||
this->unk_300 = 6;
|
||||
var = 1;
|
||||
}
|
||||
} else {
|
||||
this->actor.textId = 0x2020; // "My boy will be very happy with this!"
|
||||
this->actor.textId = 0x2020;
|
||||
this->unk_300 = 5;
|
||||
this->unk_30E = 0;
|
||||
}
|
||||
|
@ -404,18 +403,18 @@ void func_80A53AD4(EnHeishi2* this, GlobalContext* globalCtx) {
|
|||
if (Text_GetFaceReaction(globalCtx, 5) != 0) {
|
||||
this->actor.textId = Text_GetFaceReaction(globalCtx, 5);
|
||||
} else {
|
||||
this->actor.textId = 0x200E; // "The road is closed beyond this point! Can't you read..."
|
||||
this->actor.textId = 0x200E;
|
||||
}
|
||||
this->unk_300 = 6;
|
||||
if (func_8002F194(&this->actor, globalCtx) != 0) {
|
||||
exchangeItemId = func_8002F368(globalCtx);
|
||||
if (exchangeItemId == EXCH_ITEM_LETTER_ZELDA) {
|
||||
func_80078884(NA_SE_SY_CORRECT_CHIME);
|
||||
player->actor.textId = 0x2010; // "Oh, this is...this is surely Princess Zelda's handwriting!"
|
||||
player->actor.textId = 0x2010;
|
||||
this->unk_300 = 5;
|
||||
this->actionFunc = func_80A53C0C;
|
||||
} else if (exchangeItemId != EXCH_ITEM_NONE) {
|
||||
player->actor.textId = 0x200F; // "I don't want that!"
|
||||
player->actor.textId = 0x200F;
|
||||
}
|
||||
} else {
|
||||
yawDiffTemp = this->actor.yawTowardsPlayer - this->actor.shape.rot.y;
|
||||
|
@ -510,7 +509,7 @@ void func_80A53F30(EnHeishi2* this, GlobalContext* globalCtx) {
|
|||
Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_ACTIVE);
|
||||
if ((this->unk_30A != 2)) {
|
||||
if (this->unk_30A == 0) {
|
||||
this->actor.textId = 0x2015; // "By the way Mr. Hero..If you're going to climb Death Mountain..."
|
||||
this->actor.textId = 0x2015;
|
||||
func_8010B720(globalCtx, this->actor.textId);
|
||||
this->actionFunc = func_80A54038;
|
||||
} else {
|
||||
|
@ -520,7 +519,7 @@ void func_80A53F30(EnHeishi2* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
} else {
|
||||
this->unk_30E = 0;
|
||||
this->actor.textId = 0x2021; // "You sold the 10-Rupee mask for 15 Rupees. You earned a little profit."
|
||||
this->actor.textId = 0x2021;
|
||||
Rupees_ChangeBy(15);
|
||||
func_8010B720(globalCtx, this->actor.textId);
|
||||
this->actionFunc = func_80A5427C;
|
||||
|
@ -545,7 +544,7 @@ void func_80A540C0(EnHeishi2* this, GlobalContext* globalCtx) {
|
|||
if ((func_8010BDBC(&globalCtx->msgCtx) == 4) && (func_80106BC8(globalCtx) != 0)) {
|
||||
switch (globalCtx->msgCtx.choiceIndex) {
|
||||
case 0:
|
||||
this->actor.textId = 0x2020; // "My boy will be very happy with this!.."
|
||||
this->actor.textId = 0x2020;
|
||||
func_8010B720(globalCtx, this->actor.textId);
|
||||
Player_UnsetMask(globalCtx);
|
||||
gSaveContext.infTable[7] |= 0x80;
|
||||
|
@ -562,7 +561,7 @@ void func_80A540C0(EnHeishi2* this, GlobalContext* globalCtx) {
|
|||
break;
|
||||
case 1:
|
||||
this->unk_30E = 1;
|
||||
this->actor.textId = 0x200C; // "I won't give up! I have plenty of patience.."
|
||||
this->actor.textId = 0x200C;
|
||||
func_8010B720(globalCtx, this->actor.textId);
|
||||
this->unk_300 = 5;
|
||||
if (this->unk_30A == 0) {
|
||||
|
@ -577,8 +576,7 @@ void func_80A540C0(EnHeishi2* this, GlobalContext* globalCtx) {
|
|||
void func_80A541FC(EnHeishi2* this, GlobalContext* globalCtx) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 5) && (func_80106BC8(globalCtx) != 0)) {
|
||||
this->actor.textId = 0x2021; // "You sold the 10-Rupee mask for 15 Rupees. You earned a little profit. Let's
|
||||
// go to the Mask Shop..."
|
||||
this->actor.textId = 0x2021;
|
||||
Rupees_ChangeBy(15);
|
||||
func_8010B720(globalCtx, this->actor.textId);
|
||||
this->actionFunc = func_80A5427C;
|
||||
|
|
|
@ -118,13 +118,13 @@ void EnHeishi3_StandSentinelInGrounds(EnHeishi3* this, GlobalContext* globalCtx)
|
|||
yawDiff = this->actor.yawTowardsPlayer - this->actor.shape.rot.y;
|
||||
yawDiffNew = ABS(yawDiff);
|
||||
if (yawDiffNew < 0x4300) {
|
||||
if (gSaveContext.nightFlag == 0) {
|
||||
if (IS_DAY) {
|
||||
sightRange = 250.0f;
|
||||
} else {
|
||||
sightRange = 200.0f;
|
||||
}
|
||||
} else {
|
||||
if (gSaveContext.nightFlag == 0) {
|
||||
if (IS_DAY) {
|
||||
sightRange = 150.0f;
|
||||
} else {
|
||||
sightRange = 100.0f;
|
||||
|
|
|
@ -148,7 +148,7 @@ void func_80A563BC(EnHeishi4* this, GlobalContext* globalCtx) {
|
|||
} else {
|
||||
this->actor.textId = 0x507A;
|
||||
}
|
||||
} else if (gSaveContext.nightFlag == 0) {
|
||||
} else if (IS_DAY) {
|
||||
if (this->unk_284 == 0) {
|
||||
this->actor.textId = 0x5063;
|
||||
} else {
|
||||
|
@ -194,13 +194,13 @@ void func_80A56614(EnHeishi4* this, GlobalContext* globalCtx) {
|
|||
return;
|
||||
}
|
||||
if (globalCtx->sceneNum == SCENE_MIHARIGOYA) {
|
||||
if (gSaveContext.nightFlag == 0) {
|
||||
if (IS_DAY) {
|
||||
this->actor.textId = 0x7004;
|
||||
} else {
|
||||
this->actor.textId = 0x709A;
|
||||
}
|
||||
} else if (globalCtx->sceneNum != SCENE_MARKET_NIGHT) {
|
||||
if (gSaveContext.nightFlag == 0) {
|
||||
if (IS_DAY) {
|
||||
this->actor.textId = 0x7002;
|
||||
} else {
|
||||
this->actor.textId = 0x7003;
|
||||
|
@ -351,7 +351,7 @@ void EnHeishi4_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
Actor_SetFocus(thisx, this->height);
|
||||
if (this->type != HEISHI4_AT_MARKET_DYING) {
|
||||
this->unk_28C.unk_18 = player->actor.world.pos;
|
||||
if (LINK_IS_CHILD) {
|
||||
if (!LINK_IS_ADULT) {
|
||||
this->unk_28C.unk_18.y = (player->actor.world.pos.y - 10.0f);
|
||||
}
|
||||
func_80034A14(thisx, &this->unk_28C, 2, 4);
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue