1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-12-27 07:07:09 +00:00

Fix a number of warnings when compiling with GCC (#1239)

* Silence a number of GCC warnings

* Remove

* Suggested changes

* Format

* Fix comment in en_go2
This commit is contained in:
Tharo 2022-06-03 17:51:23 +01:00 committed by GitHub
parent 5015af4c57
commit 451b24f79b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
71 changed files with 298 additions and 86 deletions

View file

@ -2,14 +2,11 @@
#define FUNCTIONS_H
#include "z64.h"
#include "macros.h"
f32 fabsf(f32 f);
#ifndef __sgi
#define fabsf __builtin_fabsf
f32 __floatundisf(u32 c);
f64 __floatundidf(u32 c);
f32 __powisf2(f32 a, s32 b);
unsigned long __udivdi3(unsigned long a, unsigned long b);
#define fabsf(f) __builtin_fabsf((f32)(f))
#else
#pragma intrinsic(fabsf)
#endif
@ -1251,12 +1248,12 @@ void LinkAnimation_BlendToMorph(PlayState* play, SkelAnime* skelAnime, LinkAnima
Vec3s* blendTable);
void LinkAnimation_EndLoop(SkelAnime* skelAnime);
s32 LinkAnimation_OnFrame(SkelAnime* skelAnime, f32 frame);
s32 SkelAnime_Init(PlayState* play, SkelAnime* skelAnime, SkeletonHeader* skeletonHeaderSeg,
AnimationHeader* animation, Vec3s* jointTable, Vec3s* morphTable, s32 limbCount);
s32 SkelAnime_InitFlex(PlayState* play, SkelAnime* skelAnime, FlexSkeletonHeader* skeletonHeaderSeg,
AnimationHeader* animation, Vec3s* jointTable, Vec3s* morphTable, s32 limbCount);
s32 SkelAnime_InitSkin(PlayState* play, SkelAnime* skelAnime, SkeletonHeader* skeletonHeaderSeg,
AnimationHeader* animation);
BAD_RETURN(s32) SkelAnime_Init(PlayState* play, SkelAnime* skelAnime, SkeletonHeader* skeletonHeaderSeg,
AnimationHeader* animation, Vec3s* jointTable, Vec3s* morphTable, s32 limbCount);
BAD_RETURN(s32) SkelAnime_InitFlex(PlayState* play, SkelAnime* skelAnime, FlexSkeletonHeader* skeletonHeaderSeg,
AnimationHeader* animation, Vec3s* jointTable, Vec3s* morphTable, s32 limbCount);
BAD_RETURN(s32) SkelAnime_InitSkin(PlayState* play, SkelAnime* skelAnime, SkeletonHeader* skeletonHeaderSeg,
AnimationHeader* animation);
s32 SkelAnime_Update(SkelAnime* skelAnime);
void Animation_ChangeImpl(SkelAnime* skelAnime, AnimationHeader* animation, f32 playSpeed, f32 startFrame, f32 endFrame,
u8 mode, f32 morphFrames, s8 taper);

View file

@ -1,6 +1,19 @@
#ifndef MACROS_H
#define MACROS_H
#ifndef __GNUC__
#define __attribute__(x)
#endif
#ifndef AVOID_UB
#define BAD_RETURN(type) type
#else
#define BAD_RETURN(type) void
#endif
#define UNUSED __attribute__((unused))
#define FALLTHROUGH __attribute__((fallthrough))
#define ARRAY_COUNT(arr) (s32)(sizeof(arr) / sizeof(arr[0]))
#define ARRAY_COUNTU(arr) (u32)(sizeof(arr) / sizeof(arr[0]))

View file

@ -431,7 +431,7 @@ s32 DmaMgr_SendRequest2(DmaRequest* req, u32 ram, u32 vrom, u32 size, u32 unk5,
const char* file, s32 line) {
req->filename = file;
req->line = line;
DmaMgr_SendRequestImpl(req, ram, vrom, size, unk5, queue, msg);
return DmaMgr_SendRequestImpl(req, ram, vrom, size, unk5, queue, msg);
}
s32 DmaMgr_SendRequest1(void* ram0, u32 vrom, u32 size, const char* file, s32 line) {

View file

@ -233,11 +233,11 @@ f32 Audio_AdsrUpdate(AdsrState* adsr) {
adsr->action.s.state = ADSR_STATE_HANG;
break;
}
// fallthrough
FALLTHROUGH;
case ADSR_STATE_START_LOOP:
adsr->envIndex = 0;
adsr->action.s.state = ADSR_STATE_LOOP;
// fallthrough
FALLTHROUGH;
retry:
case ADSR_STATE_LOOP:
adsr->delay = adsr->envelope[adsr->envIndex].delay;
@ -273,14 +273,14 @@ f32 Audio_AdsrUpdate(AdsrState* adsr) {
if (adsr->action.s.state != ADSR_STATE_FADE) {
break;
}
// fallthrough
FALLTHROUGH;
case ADSR_STATE_FADE:
adsr->current += adsr->velocity;
adsr->delay--;
if (adsr->delay <= 0) {
adsr->action.s.state = ADSR_STATE_LOOP;
}
// fallthrough
FALLTHROUGH;
case ADSR_STATE_HANG:
break;

View file

@ -1281,6 +1281,7 @@ void AudioLoad_ProcessSlowLoads(s32 resetStatus) {
slowLoad->status = LOAD_STATUS_DONE;
continue;
}
FALLTHROUGH;
case LOAD_STATUS_START:
slowLoad->status = LOAD_STATUS_LOADING;
if (slowLoad->bytesRemaining == 0) {

View file

@ -692,7 +692,7 @@ s32 AudioSeq_SeqLayerProcessScriptStep2(SequenceLayer* layer) {
case 0xCB:
sp3A = AudioSeq_ScriptReadS16(state);
layer->adsr.envelope = (AdsrEnvelope*)(seqPlayer->seqData + sp3A);
// fallthrough
FALLTHROUGH;
case 0xCF:
layer->adsr.decayIndex = AudioSeq_ScriptReadU8(state);
break;
@ -1172,7 +1172,7 @@ void AudioSeq_SequenceChannelProcessScript(SequenceChannel* channel) {
}
cmdArgs[0] = cmdArgs[1];
// fallthrough
FALLTHROUGH;
case 0xC1:
cmd = (u8)cmdArgs[0];
AudioSeq_SetInstrument(channel, cmd);
@ -1719,7 +1719,7 @@ void AudioSeq_SequencePlayerProcessSequence(SequencePlayer* seqPlayer) {
break;
case 0xDF:
seqPlayer->transposition = 0;
// Note: intentional fallthrough, also executes below command
FALLTHROUGH;
case 0xDE:
seqPlayer->transposition += (s8)AudioSeq_ScriptReadU8(seqScript);
break;
@ -1759,7 +1759,7 @@ void AudioSeq_SequencePlayerProcessSequence(SequencePlayer* seqPlayer) {
case 1:
seqPlayer->state = 0;
seqPlayer->fadeVolume = 0.0f;
// NOTE: Intentional fallthrough
FALLTHROUGH;
case 0:
seqPlayer->fadeTimer = seqPlayer->fadeTimerUnkEu;
if (seqPlayer->fadeTimerUnkEu != 0) {

View file

@ -3984,7 +3984,7 @@ void Audio_SetSoundProperties(u8 bankId, u8 entryIdx, u8 channelIdx) {
if (D_80130604 == 2) {
sp38 = func_800F3990(*entry->posY, entry->sfxParams);
}
// fallthrough
FALLTHROUGH;
case BANK_OCARINA:
entry->dist = sqrtf(entry->dist);
vol = Audio_ComputeSoundVolume(bankId, entryIdx) * *entry->vol;

View file

@ -574,8 +574,8 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
VecSph spFC;
VecSph spF4;
PosRot* temp_s6;
Vec3f* eye;
Vec3f* at;
UNUSED Vec3f* eye;
UNUSED Vec3f* at;
Vec3f* phi_s0;
Vec3f spD8;
s32 pad;
@ -1263,6 +1263,7 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
DbCamera_Vec3FToS(&spD8, &dbCamera->sub.position[i].pos);
}
}
FALLTHROUGH;
case 4:
dbCamera->sub.unk_0C = true;
break;

View file

@ -255,6 +255,7 @@ void GfxPrint_PrintChar(GfxPrint* this, u8 c) {
break;
case '\n':
this->posY += 32;
FALLTHROUGH;
case '\r':
this->posX = this->baseX;
break;

View file

@ -105,14 +105,17 @@ void Overlay_Relocate(void* allocatedVRamAddress, OverlayRelocationSection* over
switch (RELOC_TYPE_MASK(reloc)) {
case R_MIPS_32 << RELOC_TYPE_SHIFT:
dbg = 0x16;
FALLTHROUGH;
case R_MIPS_26 << RELOC_TYPE_SHIFT:
dbg += 0xA;
FALLTHROUGH;
case R_MIPS_LO16 << RELOC_TYPE_SHIFT:
if (gOverlayLogSeverity >= 3) {
osSyncPrintf("%02d %08x %08x %08x ", dbg, relocDataP, relocatedValue, relocatedAddress);
osSyncPrintf(" %08x %08x %08x %08x\n", (uintptr_t)relocDataP + (uintptr_t)vRamStart - allocu32,
relocData, unrelocatedAddress, relocOffset);
}
// Adding a break prevents matching
}
}
}

View file

@ -3811,12 +3811,15 @@ void func_80034A14(Actor* actor, struct_80034A14_arg1* arg1, s16 arg2, s16 arg3)
sp38.unk_00 = 0;
sp38.unk_04 = 0;
sp38.unk_02 = 0;
FALLTHROUGH;
case 3:
sp38.unk_06 = 0;
sp38.unk_0A = 0;
sp38.unk_08 = 0;
FALLTHROUGH;
case 2:
sp38.unk_0C = 0;
break;
}
func_800344BC(actor, arg1, sp38.unk_00, sp38.unk_04, sp38.unk_02, sp38.unk_06, sp38.unk_0A, sp38.unk_08,

View file

@ -1380,7 +1380,7 @@ void func_80046E20(Camera* camera, VecSph* eyeAdjustment, f32 minDist, f32 arg3,
camera->eye = newEyeColChk.pos;
atEyeColChk = newEyeColChk;
FALLTHROUGH;
case 3:
case 6:
if (anim->unk_18 != 0) {
@ -1475,6 +1475,7 @@ s32 Camera_Normal1(Camera* camera) {
case 20:
camera->yawUpdateRateInv = OREG(27);
camera->pitchUpdateRateInv = OREG(27);
FALLTHROUGH;
case 0:
case 10:
case 25:
@ -2035,6 +2036,7 @@ s32 Camera_Parallel1(Camera* camera) {
rwData->unk_00.x = 0.0f;
rwData->yTarget = playerPosRot->pos.y - camera->playerPosDelta.y;
camera->animState++;
break;
}
if (rwData->animTimer != 0) {
@ -2153,7 +2155,7 @@ s32 Camera_Parallel1(Camera* camera) {
camera->fov = Camera_LERPCeilF(roData->fovTarget, camera->fov, camera->fovUpdateRate, 1.0f);
camera->roll = Camera_LERPCeilS(0, camera->roll, 0.5, 0xA);
camera->atLERPStepScale = Camera_ClampLERPScale(camera, sp6A ? roData->unk_1C : roData->unk_14);
//! @bug No return
//! @bug doesn't return
}
s32 Camera_Parallel2(Camera* camera) {
@ -2528,7 +2530,7 @@ s32 Camera_Jump3(Camera* camera) {
f32 spC4;
f32 spC0;
f32 spBC;
Vec3f spB0; // unused
UNUSED Vec3f spB0;
VecSph eyeDiffSph;
PosRot* playerPosRot = &camera->playerPosRot;
Jump3ReadOnlyData* roData = &camera->paramData.jump3.roData;
@ -2611,8 +2613,7 @@ s32 Camera_Jump3(Camera* camera) {
break;
}
spB0 = *eye; // unused
(void)spB0; // suppresses set but unused warning
spB0 = *eye;
spC4 = CAM_DATA_SCALED(OREG(25)) * camera->speedRatio;
spC0 = camera->speedRatio * CAM_DATA_SCALED(OREG(26));
@ -3027,6 +3028,7 @@ s32 Camera_Battle4(Camera* camera) {
case 20:
rwData->animTimer = 50;
camera->animState++;
break;
}
camera->yawUpdateRateInv = Camera_LERPCeilF(roData->lerpUpdateRate, camera->yawUpdateRateInv,
@ -3798,7 +3800,7 @@ s32 Camera_KeepOn0(Camera* camera) {
KeepOn0ReadWriteData* rwData = &camera->paramData.keep0.rwData;
s32 pad;
Vec3s* sceneCamData;
Vec3s sceneCamRot;
UNUSED Vec3s sceneCamRot;
s16 fov;
camera->unk_14C &= ~0x10;
@ -3818,8 +3820,7 @@ s32 Camera_KeepOn0(Camera* camera) {
Camera_Vec3sToVec3f(eyeNext, &BGCAM_POS(sceneCamData));
*eye = *eyeNext;
sceneCamRot = BGCAM_ROT(sceneCamData); // unused
(void)sceneCamRot; // suppresses set but unused warning
sceneCamRot = BGCAM_ROT(sceneCamData);
fov = BGCAM_FOV(sceneCamData);
if (fov == -1) {
@ -4734,6 +4735,7 @@ s32 Camera_Unique3(Camera* camera) {
rwData->initialFov = camera->fov;
rwData->initialDist = OLib_Vec3fDist(at, &camera->eye);
camera->animState++;
FALLTHROUGH;
case 1:
if (doorParams->timer1-- > 0) {
break;
@ -4747,7 +4749,7 @@ s32 Camera_Unique3(Camera* camera) {
sp60.pitch = -sp4C.x;
Camera_Vec3fVecSphGeoAdd(at, &camera->eye, &sp60);
camera->animState++;
FALLTHROUGH;
case 2:
if (roData->interfaceFlags & 4) {
camera->at = cameraPlayerPosRot->pos;
@ -4757,7 +4759,7 @@ s32 Camera_Unique3(Camera* camera) {
break;
}
camera->animState++;
FALLTHROUGH;
case 3:
camera->unk_14C |= (0x400 | 0x10);
if ((camera->unk_14C & 8) != 0) {
@ -4765,6 +4767,7 @@ s32 Camera_Unique3(Camera* camera) {
} else {
break;
}
FALLTHROUGH;
case 4:
if (roData->interfaceFlags & 2) {
camera->unk_14C |= 4;
@ -4785,6 +4788,7 @@ s32 Camera_Unique3(Camera* camera) {
} else {
break;
}
FALLTHROUGH;
case 5:
camera->fov = Camera_LERPCeilF(rwData->initialFov, camera->fov, 0.4f, 0.1f);
OLib_Vec3fDiffToVecSphGeo(&sp60, at, &camera->eye);
@ -4795,6 +4799,7 @@ s32 Camera_Unique3(Camera* camera) {
break;
}
camera->animState++;
FALLTHROUGH;
default:
camera->unk_14C |= 4;
camera->unk_14C &= ~8;
@ -4996,7 +5001,7 @@ s32 Camera_Unique7(Camera* camera) {
VecSph playerPosEyeOffset;
s16 fov;
Vec3s* sceneCamData;
Vec3s sceneCamRot;
UNUSED Vec3s sceneCamRot;
Vec3f* at = &camera->at;
PosRot* playerPosRot = &camera->playerPosRot;
Vec3f* eye = &camera->eye;
@ -5016,8 +5021,7 @@ s32 Camera_Unique7(Camera* camera) {
Camera_Vec3sToVec3f(eyeNext, &BGCAM_POS(sceneCamData));
*eye = *eyeNext;
sceneCamRot = BGCAM_ROT(sceneCamData); // unused
(void)sceneCamRot; // suppresses set but unused warning
sceneCamRot = BGCAM_ROT(sceneCamData);
OLib_Vec3fDiffToVecSphGeo(&playerPosEyeOffset, eye, &playerPosRot->pos);
@ -5392,6 +5396,7 @@ s32 Camera_Unique9(Camera* camera) {
Camera_LERPFloorF(eyeTarget.y, camera->eyeNext.y, rwData->curKeyFrame->lerpStepScale, 1.0f);
camera->eyeNext.z =
Camera_LERPFloorF(eyeTarget.z, camera->eyeNext.z, rwData->curKeyFrame->lerpStepScale, 1.0f);
FALLTHROUGH;
case 9:
case 10:
// linear interpolation of at/fov/roll
@ -5427,6 +5432,7 @@ s32 Camera_Unique9(Camera* camera) {
Camera_LERPCeilF(rwData->eyeTarget.y, camera->eyeNext.y, rwData->curKeyFrame->lerpStepScale, 1.0f);
camera->eyeNext.z =
Camera_LERPCeilF(rwData->eyeTarget.z, camera->eyeNext.z, rwData->curKeyFrame->lerpStepScale, 1.0f);
FALLTHROUGH;
case 11:
case 12:
setAtFOVRoll:
@ -5477,6 +5483,7 @@ s32 Camera_Unique9(Camera* camera) {
Camera_ChangeModeFlags(camera->play->cameraPtrs[camIdx], CAM_MODE_NORMAL, 1);
}
FALLTHROUGH;
case 18: {
// copy the current camera to the parent (or default)'s camera.
s32 camIdx = camera->parentCamId <= CAM_ID_NONE ? CAM_ID_MAIN : camera->parentCamId;
@ -5485,10 +5492,12 @@ s32 Camera_Unique9(Camera* camera) {
*eye = *eyeNext;
Camera_Copy(cam, camera);
}
FALLTHROUGH;
default:
if (camera->camId != CAM_ID_MAIN) {
camera->timer = 0;
}
break;
}
*eye = *eyeNext;
@ -5608,6 +5617,7 @@ s32 Camera_Demo1(Camera* camera) {
Camera_DebugPrintSplineArray("CENTER", 5, csAtPoints);
Camera_DebugPrintSplineArray(" EYE", 5, csEyePoints);
}
FALLTHROUGH;
case 1:
// follow CutsceneCameraPoints. function returns 1 if at the end.
if (func_800BB2B4(&csEyeUpdate, &newRoll, cameraFOV, csEyePoints, &rwData->keyframe, &rwData->curFrame) ||
@ -5787,6 +5797,7 @@ s32 Camera_Demo3(Camera* camera) {
if (camera->unk_14C & 8) {
camera->animState = 4;
}
FALLTHROUGH;
case 10:
case 20:
skipUpdateEye = true;
@ -5810,7 +5821,7 @@ s32 Camera_Demo3(Camera* camera) {
camera->unk_14C & 8)) {
goto skipeyeUpdate;
}
FALLTHROUGH;
default:
camera->unk_14C |= 0x14;
camera->unk_14C &= ~8;
@ -6141,6 +6152,7 @@ s32 Camera_Demo6(Camera* camera) {
Camera_Vec3fVecSphGeoAdd(eyeNext, &camera->at, &eyeOffset);
camera->eye = *eyeNext;
camera->animState++;
FALLTHROUGH;
case 1:
if (stateTimers[camera->animState] < rwData->animTimer) {
func_8002DF54(camera->play, &camera->player->actor, 8);
@ -6152,6 +6164,7 @@ s32 Camera_Demo6(Camera* camera) {
} else {
break;
}
FALLTHROUGH;
case 2:
Camera_LERPCeilVec3f(&rwData->atTarget, &camera->at, 0.1f, 0.1f, 8.0f);
if (stateTimers[camera->animState] < rwData->animTimer) {
@ -6159,6 +6172,7 @@ s32 Camera_Demo6(Camera* camera) {
} else {
break;
}
FALLTHROUGH;
case 3:
camera->fov = Camera_LERPCeilF(50.0f, camera->fov, 0.2f, 0.01f);
if (stateTimers[camera->animState] < rwData->animTimer) {
@ -6243,6 +6257,7 @@ s32 Camera_Demo9(Camera* camera) {
onePointCamData->actionParameters &= 0xFFF;
}
rwData->animTimer = onePointCamData->initTimer;
FALLTHROUGH;
case 1:
// Run the camera state
if (rwData->animTimer > 0) {
@ -6296,6 +6311,7 @@ s32 Camera_Demo9(Camera* camera) {
rwData->animTimer--;
break;
}
FALLTHROUGH;
case 3:
// the cs is finished, decide the next action
camera->timer = 0;
@ -6738,6 +6754,7 @@ s32 Camera_Special9(Camera* camera) {
rwData->targetYaw = ABS(playerPosRot->rot.y - adjustedPlayerPosRot.rot.y) >= 0x4000
? BINANG_ROT180(adjustedPlayerPosRot.rot.y)
: adjustedPlayerPosRot.rot.y;
FALLTHROUGH;
case 1:
doorParams->timer1--;
if (doorParams->timer1 <= 0) {
@ -6767,6 +6784,7 @@ s32 Camera_Special9(Camera* camera) {
} else {
break;
}
FALLTHROUGH;
case 2:
spAC = playerPosRot->pos;
spAC.y += playerYOffset + roData->yOffset;
@ -6779,6 +6797,7 @@ s32 Camera_Special9(Camera* camera) {
} else {
break;
}
FALLTHROUGH;
case 3:
spAC = playerPosRot->pos;
spAC.y += (playerYOffset + roData->yOffset);
@ -6794,8 +6813,10 @@ s32 Camera_Special9(Camera* camera) {
} else {
break;
}
FALLTHROUGH;
case 4:
camera->animState++;
FALLTHROUGH;
default:
camera->unk_14C |= (0x400 | 0x10);
sCameraInterfaceFlags = 0;

View file

@ -777,6 +777,7 @@ void EnItem00_Draw(Actor* thisx, PlayState* play) {
}
break;
}
FALLTHROUGH;
case ITEM00_BOMBS_A:
case ITEM00_BOMBS_B:
case ITEM00_BOMBS_SPECIAL:

View file

@ -2341,6 +2341,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
case MSGMODE_OCARINA_FAIL:
case MSGMODE_SONG_PLAYBACK_FAIL:
Message_DrawText(play, &gfx);
FALLTHROUGH;
case MSGMODE_OCARINA_FAIL_NO_TEXT:
msgCtx->stateTimer--;
if (msgCtx->stateTimer == 0) {
@ -2539,6 +2540,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
sOcarinaButtonIndexBufPos++;
}
}
FALLTHROUGH;
case MSGMODE_SONG_DEMONSTRATION_DONE:
Message_DrawText(play, &gfx);
break;
@ -2838,6 +2840,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
Message_ResetOcarinaNoteState();
msgCtx->msgMode = MSGMODE_FROGS_WAITING;
}
FALLTHROUGH;
case MSGMODE_FROGS_WAITING:
break;
case MSGMODE_TEXT_DONE:

View file

@ -2471,7 +2471,7 @@ void Magic_Update(PlayState* play) {
gSaveContext.magicState = MAGIC_STATE_METER_FLASH_1;
sMagicBorderR = sMagicBorderG = sMagicBorderB = 255;
}
// fallthrough (flash border while magic is being consumed)
FALLTHROUGH; // Flash border while magic is being consumed
case MAGIC_STATE_METER_FLASH_1:
case MAGIC_STATE_METER_FLASH_2:
case MAGIC_STATE_METER_FLASH_3:
@ -3535,6 +3535,7 @@ void Interface_Draw(PlayState* play) {
gSaveContext.timer1State = 8;
}
}
FALLTHROUGH;
case 4:
case 8:
if ((gSaveContext.timer1State == 4) || (gSaveContext.timer1State == 8)) {
@ -3604,6 +3605,7 @@ void Interface_Draw(PlayState* play) {
gSaveContext.timer1State = 14;
}
FALLTHROUGH;
case 14:
if (gSaveContext.timer1State == 14) {
if (gSaveContext.healthCapacity > 0xA0) {
@ -3707,6 +3709,7 @@ void Interface_Draw(PlayState* play) {
gSaveContext.timer2State = 10;
}
}
FALLTHROUGH;
case 4:
case 10:
if ((gSaveContext.timer2State == 4) || (gSaveContext.timer2State == 10)) {

View file

@ -513,7 +513,7 @@ void Play_Update(PlayState* this) {
// non-instance modes break out of this switch
break;
}
// fallthrough
FALLTHROUGH;
case TRANS_MODE_INSTANCE_INIT:
this->transitionCtx.init(&this->transitionCtx.instanceData);

View file

@ -1371,8 +1371,9 @@ s32 LinkAnimation_OnFrame(SkelAnime* skelAnime, f32 frame) {
/**
* Initializes a normal skeleton to a looping animation, dynamically allocating the frame tables if not provided.
*/
s32 SkelAnime_Init(PlayState* play, SkelAnime* skelAnime, SkeletonHeader* skeletonHeaderSeg, AnimationHeader* animation,
Vec3s* jointTable, Vec3s* morphTable, s32 limbCount) {
BAD_RETURN(s32)
SkelAnime_Init(PlayState* play, SkelAnime* skelAnime, SkeletonHeader* skeletonHeaderSeg, AnimationHeader* animation,
Vec3s* jointTable, Vec3s* morphTable, s32 limbCount) {
SkeletonHeader* skeletonHeader = SEGMENTED_TO_VIRTUAL(skeletonHeaderSeg);
skelAnime->limbCount = skeletonHeader->limbCount + 1;
@ -1401,8 +1402,9 @@ s32 SkelAnime_Init(PlayState* play, SkelAnime* skelAnime, SkeletonHeader* skelet
/**
* Initializes a flex skeleton to a looping animation, dynamically allocating the frame tables if not given.
*/
s32 SkelAnime_InitFlex(PlayState* play, SkelAnime* skelAnime, FlexSkeletonHeader* skeletonHeaderSeg,
AnimationHeader* animation, Vec3s* jointTable, Vec3s* morphTable, s32 limbCount) {
BAD_RETURN(s32)
SkelAnime_InitFlex(PlayState* play, SkelAnime* skelAnime, FlexSkeletonHeader* skeletonHeaderSeg,
AnimationHeader* animation, Vec3s* jointTable, Vec3s* morphTable, s32 limbCount) {
FlexSkeletonHeader* skeletonHeader = SEGMENTED_TO_VIRTUAL(skeletonHeaderSeg);
skelAnime->limbCount = skeletonHeader->sh.limbCount + 1;
@ -1435,8 +1437,9 @@ s32 SkelAnime_InitFlex(PlayState* play, SkelAnime* skelAnime, FlexSkeletonHeader
/**
* Initializes a skeleton with SkinLimbs to a looping animation, dynamically allocating the frame tables.
*/
s32 SkelAnime_InitSkin(PlayState* play, SkelAnime* skelAnime, SkeletonHeader* skeletonHeaderSeg,
AnimationHeader* animation) {
BAD_RETURN(s32)
SkelAnime_InitSkin(PlayState* play, SkelAnime* skelAnime, SkeletonHeader* skeletonHeaderSeg,
AnimationHeader* animation) {
SkeletonHeader* skeletonHeader = SEGMENTED_TO_VIRTUAL(skeletonHeaderSeg);
skelAnime->limbCount = skeletonHeader->limbCount + 1;

View file

@ -1,7 +1,7 @@
#include "global.h"
s32 osSetTimer(OSTimer* timer, OSTime countdown, OSTime interval, OSMesgQueue* mq, OSMesg msg) {
OSTime time;
UNUSED OSTime time;
OSTimer* next;
u32 count;
u32 value;
@ -39,7 +39,5 @@ s32 osSetTimer(OSTimer* timer, OSTime countdown, OSTime interval, OSMesgQueue* m
__osRestoreInt(prevInt);
if (time) {} // suppresses set but unused warning
return 0;
}

View file

@ -102,8 +102,8 @@ s32 BgHidanHamstep_SpawnChildren(BgHidanHamstep* this, PlayState* play2) {
s16 params;
PlayState* play = play2;
pos = pos; // Required to match
pos.y = this->dyna.actor.home.pos.y - 100.0f;
pos = pos; // Required to match
sin = Math_SinS(this->dyna.actor.shape.rot.y + 0x8000);
cos = Math_CosS(this->dyna.actor.shape.rot.y + 0x8000);

View file

@ -279,6 +279,7 @@ void BossDodongo_IntroCutscene(BossDodongo* this, PlayState* play) {
this->unk_198 = 160;
player->actor.world.pos.y = -1023.76f;
this->subCamEye.y = player->actor.world.pos.y - 480.0f + 50.0f;
FALLTHROUGH;
case 2:
if (this->unk_198 >= 131) {
player->actor.world.pos.x = -890.0f;
@ -1616,6 +1617,7 @@ void BossDodongo_DeathCutscene(BossDodongo* this, PlayState* play) {
this->skelAnime.playSpeed = 0.0f;
Flags_SetClear(play, play->roomCtx.curRoom.num);
}
FALLTHROUGH;
case 100:
if ((this->unk_1DA < 0x2C6) && (Rand_ZeroOne() < 0.5f)) {
Vec3f sp68;

View file

@ -372,6 +372,7 @@ void BossFd_Fly(BossFd* this, PlayState* play) {
this->timers[0] = 100;
this->introState = BFD_CS_LOOK_LINK;
}
FALLTHROUGH;
case BFD_CS_LOOK_LINK:
player2->actor.world.pos.x = 380.0f;
player2->actor.world.pos.y = 100.0f;
@ -504,6 +505,7 @@ void BossFd_Fly(BossFd* this, PlayState* play) {
case INTRO_FLY_EMERGE:
this->timers[5] = 100;
this->introFlyState = INTRO_FLY_HOLE;
FALLTHROUGH;
case INTRO_FLY_HOLE:
if (this->timers[5] == 0) {
this->introFlyState = INTRO_FLY_CAMERA;

View file

@ -674,6 +674,7 @@ void BossFd2_Death(BossFd2* this, PlayState* play) {
this->subCamAtMaxVelFrac.x = 0.1f;
this->subCamAtMaxVelFrac.y = 0.1f;
this->subCamAtMaxVelFrac.z = 0.1f;
FALLTHROUGH;
case DEATH_RETREAT:
this->work[FD2_HOLE_COUNTER]++;
if (this->work[FD2_HOLE_COUNTER] < 15) {

View file

@ -586,7 +586,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) {
Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_EN_GANON_ORGAN, 0.0f, 0.0f, 0.0f, 0, 0, 0, 1);
sCape->minY = 57.0f;
// fallthrough
FALLTHROUGH;
case 1:
this->envLightMode = 3;
if (this->csTimer == 70) {
@ -619,7 +619,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) {
this->csCamAt.x = 0.0f;
this->unk_704 = 1.2566371f;
// fallthrough
FALLTHROUGH;
case 3:
this->envLightMode = 0;
play->envCtx.lightBlend = 0.0f;
@ -636,7 +636,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) {
this->csState = 4;
BossGanon_SetIntroCsCamera(this, 2);
this->csTimer = 0;
// fallthrough
FALLTHROUGH;
case 4:
if ((this->csTimer == 0) || (this->csTimer == 10) || (this->csTimer == 20)) {
this->csCamEye.y += 68.0f;
@ -692,7 +692,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) {
this->fwork[GDF_TRIFORCE_ENV_G] = 100.0f;
func_80078884(NA_SE_EV_TRIFORCE_MARK);
play->envCtx.lightBlend = 0.0f;
// fallthrough
FALLTHROUGH;
case 7:
this->envLightMode = 6;
// fade in links triforce
@ -739,7 +739,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) {
this->fwork[GDF_TRIFORCE_ENV_G] = 100.0f;
func_80078884(NA_SE_EV_TRIFORCE_MARK);
play->envCtx.lightBlend = 0.0f;
// fallthrough
FALLTHROUGH;
case 9:
this->envLightMode = 7;
BossGanon_SetIntroCsCamera(this, 6);
@ -924,7 +924,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) {
this->fwork[GDF_TRIFORCE_PRIM_B] = 255.0f;
this->fwork[GDF_TRIFORCE_ENV_G] = 100.0f;
play->envCtx.lightBlend = 0.0f;
// fallthrough
FALLTHROUGH;
case 19: // show triforce
this->envLightMode = 8;
@ -1049,7 +1049,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) {
this->csCamAt.z = this->unk_1FC.z;
this->fwork[GDF_VORTEX_ALPHA] = 255.0f;
this->fwork[GDF_VORTEX_SCALE] = 0.2f;
// fallthrough
FALLTHROUGH;
case 22: // start floating, show title card, start fight
if (this->csTimer > 30) {
this->envLightMode = 0;
@ -1247,7 +1247,7 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) {
this->csState = 1;
this->csTimer = 0;
this->useOpenHand = true;
// fallthrough
FALLTHROUGH;
case 1:
player->actor.shape.rot.y = -0x8000;
@ -1542,7 +1542,7 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) {
this->whiteFillAlpha = 255.0f;
play->envCtx.lightBlend = 1.0f;
// fallthrough
FALLTHROUGH;
case 101:
player->actor.world.pos.y = 4102.0f;
Math_ApproachZeroF(&this->whiteFillAlpha, 1.0f, 5.0f);
@ -1628,7 +1628,7 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) {
} else {
break;
}
// fallthrough
FALLTHROUGH;
case 104:
this->csCamEye.x = -432.0f;
this->csCamEye.y = 4147.0f;
@ -4020,7 +4020,7 @@ void BossGanon_LightBall_Update(Actor* thisx, PlayState* play2) {
this->unk_1C2 = 0;
break;
}
// fallthrough
FALLTHROUGH;
case 4:
if (sqrtf(SQ(xDistFromGanondorf) + SQ(yDistFromGanondorf) + SQ(zDistFromGanondorf)) < 30.0f) {
spBA = 3;
@ -4384,7 +4384,7 @@ void func_808E2544(Actor* thisx, PlayState* play) {
new_var = this->unk_1F0.x - this->actor.world.pos.x;
this->actor.shape.rot.y = RAD_TO_BINANG(Math_FAtan2F(new_var, this->unk_1F0.z - this->actor.world.pos.z)) +
(this->actor.params << 0xD) - 0x20C000;
// fallthrough
FALLTHROUGH;
case 11:
if (this->timers[0] != 0) {
this->unk_1F0 = player->actor.world.pos;

View file

@ -227,6 +227,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) {
} else {
break;
}
FALLTHROUGH;
case 1:
if (this->unk_398 < 70) {
play->envCtx.lightBlend = 0.0f;
@ -249,6 +250,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) {
} else {
break;
}
FALLTHROUGH;
case 2:
this->unk_339 = 4;
player->actor.world.pos.x = 970.0f;
@ -339,6 +341,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) {
} else {
break;
}
FALLTHROUGH;
case 10:
player->actor.world.pos.x = 490.0f;
player->actor.world.pos.y = 1086.0f;
@ -420,6 +423,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) {
} else {
break;
}
FALLTHROUGH;
case 12:
case 13:
SkelAnime_Update(&this->skelAnime);
@ -446,6 +450,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) {
} else {
break;
}
FALLTHROUGH;
case 14:
SkelAnime_Update(&this->skelAnime);
Math_ApproachF(&this->actor.world.pos.y, 1289.0f, 0.05f, 1.0f);
@ -511,6 +516,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) {
} else {
break;
}
FALLTHROUGH;
case 16:
if (this->unk_398 < 25) {
this->unk_339 = 55;
@ -650,6 +656,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) {
} else {
break;
}
FALLTHROUGH;
case 22:
if (this->unk_398 < 60) {
this->unk_339 = 7;
@ -776,6 +783,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) {
} else {
break;
}
FALLTHROUGH;
case 26:
this->subCamEye.x = sZelda->actor.world.pos.x + 100.0f + 30.0f;
this->subCamEye.y = sZelda->actor.world.pos.y + 10.0f;
@ -1297,6 +1305,7 @@ void func_80900890(BossGanon2* this, PlayState* play) {
this->unk_1A2[0] = 300;
this->unk_1A2[1] = 100;
play->envCtx.lightBlend = 0.0f;
FALLTHROUGH;
case 1:
if (this->unk_1A2[1] == 50) {
func_80078884(NA_SE_EN_MGANON_WALK);
@ -1351,6 +1360,7 @@ void func_80900890(BossGanon2* this, PlayState* play) {
this->unk_334 = 1;
func_8002DF54(play, &this->actor, 0x60);
this->unk_398 = 0;
FALLTHROUGH;
case 11:
player->actor.world.pos.x = sZelda->actor.world.pos.x + 50.0f + 10.0f;
player->actor.world.pos.z = sZelda->actor.world.pos.z - 25.0f;
@ -1485,6 +1495,7 @@ void func_8090120C(BossGanon2* this, PlayState* play) {
this->actor.speedXZ = 0.0f;
this->unk_31A = this->unk_31C;
play->envCtx.lightBlend = 0.0f;
FALLTHROUGH;
case 1:
if (this->unk_398 < 90) {
this->unk_339 = 20;
@ -1637,6 +1648,7 @@ void func_8090120C(BossGanon2* this, PlayState* play) {
} else {
break;
}
FALLTHROUGH;
case 7:
this->unk_339 = 23;
Math_ApproachZeroF(&play->envCtx.lightBlend, 1.0f, 0.2f);
@ -1790,6 +1802,7 @@ void func_8090120C(BossGanon2* this, PlayState* play) {
if (this->unk_398 < 160) {
break;
}
FALLTHROUGH;
case 20:
play->nextEntranceIndex = ENTR_KENJYANOMA_0;
gSaveContext.nextCutsceneIndex = 0xFFF2;

View file

@ -834,6 +834,7 @@ void BossGanondrof_Charge(BossGanondrof* this, PlayState* play) {
Animation_MorphToLoop(&this->skelAnime, &gPhantomGanonChargeAnim, 0.0f);
this->work[GND_ACTION_STATE] = CHARGE_ATTACK;
}
FALLTHROUGH;
case CHARGE_ATTACK:
if (this->timers[0] != 0) {
Vec3f vecToLink;
@ -985,6 +986,7 @@ void BossGanondrof_Death(BossGanondrof* this, PlayState* play) {
this->subCamAtMaxVelFrac.x = 0.2f;
this->subCamAtMaxVelFrac.y = 0.2f;
this->subCamAtMaxVelFrac.z = 0.2f;
FALLTHROUGH;
case DEATH_THROES:
switch (this->work[GND_ACTION_STATE]) {
case DEATH_SPASM:
@ -1001,6 +1003,7 @@ void BossGanondrof_Death(BossGanondrof* this, PlayState* play) {
Animation_MorphToLoop(&this->skelAnime, &gPhantomGanonLimpAnim, -20.0f);
this->work[GND_ACTION_STATE] = DEATH_HUNCHED;
}
FALLTHROUGH;
case DEATH_HUNCHED:
bodyDecayLevel = 1;
break;
@ -1432,6 +1435,7 @@ s32 BossGanondrof_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList,
if (this->deathState != NOT_DEAD) {
*dList = NULL;
}
FALLTHROUGH;
default:
rot->y += this->rideRotY[limbIndex];
rot->z += this->rideRotZ[limbIndex];

View file

@ -716,7 +716,7 @@ void BossGoma_Encounter(BossGoma* this, PlayState* play) {
this->timer = 80;
this->frameCount = 0;
this->actor.flags &= ~ACTOR_FLAG_0;
// fall-through
FALLTHROUGH;
case 2: // zoom on player from room center
// room entrance, towards center
player->actor.shape.rot.y = -0x705C;

View file

@ -1524,6 +1524,7 @@ void BossMo_DeathCs(BossMo* this, PlayState* play) {
this->subCamYaw = Math_FAtan2F(dx, dz);
this->subCamDist = sqrtf(SQ(dx) + SQ(dz));
this->subCamYawRate = 0.0f;
FALLTHROUGH;
case MO_DEATH_MO_CORE_BURST:
this->baseAlpha = 0.0f;
if (this->timers[0] & 4) {
@ -1638,6 +1639,7 @@ void BossMo_DeathCs(BossMo* this, PlayState* play) {
sMorphaTent1->timers[0] = 120;
this->timers[0] = 150;
}
FALLTHROUGH;
case MO_DEATH_CEILING:
Math_ApproachF(&this->subCamYaw, 0.0f, 0.05f, 0.0029999996f);
Math_ApproachF(&this->subCamDist, 490.0f, 0.1f, 1.0f);

View file

@ -1520,7 +1520,7 @@ void BossTw_TwinrovaMergeCS(BossTw* this, PlayState* play) {
this->workf[UNK_F11] = 600.0f;
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0xC800FF);
this->work[CS_TIMER_2] = 0;
// fallthrough
FALLTHROUGH;
case 1:
if (this->work[CS_TIMER_2] == 20) {
Message_StartTextbox(play, 0x6059, NULL);
@ -1663,7 +1663,7 @@ void BossTw_TwinrovaMergeCS(BossTw* this, PlayState* play) {
sEnvType = -1;
play->envCtx.lightSetting = 4;
Math_ApproachF(&play->envCtx.lightBlend, 1, 1, 0.1f);
// fallthrough
FALLTHROUGH;
case 2:
SkelAnime_Update(&this->skelAnime);
Math_ApproachF(&this->actor.scale.x, 0.0069999993f, 1, 0.0006999999f);
@ -3934,7 +3934,7 @@ void BossTw_BlastFire(BossTw* this, PlayState* play) {
this->blastTailPos[i] = this->actor.world.pos;
}
this->workf[TAIL_ALPHA] = 255.0f;
// fallthrough
FALLTHROUGH;
case 1:
case 10:
this->blastActive = true;
@ -4122,7 +4122,7 @@ void BossTw_BlastIce(BossTw* this, PlayState* play) {
}
this->workf[TAIL_ALPHA] = 255.0f;
// fallthrough
FALLTHROUGH;
case 1:
case 10:
this->blastActive = true;

View file

@ -1555,6 +1555,7 @@ void BossVa_BodyDeath(BossVa* this, PlayState* play) {
play->envCtx.screenFillColor[3] = 0;
play->envCtx.fillScreen = true;
sCsState++;
FALLTHROUGH;
case DEATH_BODY_TUMORS:
this->unk_1AC += 0x100;
sSubCamEyeNext.x = (Math_SinS(this->unk_1AC) * (160.0f + this->unk_1A8)) + sSubCamAtNext.x;
@ -1648,6 +1649,7 @@ void BossVa_BodyDeath(BossVa* this, PlayState* play) {
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_RU1, sWarpPos[sp7C].x, sWarpPos[sp7C].y, sWarpPos[sp7C].z,
0, 0, 0, 0);
}
FALLTHROUGH;
case DEATH_FINISH:
Rand_CenteredFloat(0.5f);
play->envCtx.fillScreen = false;
@ -1818,7 +1820,7 @@ void BossVa_SupportCut(BossVa* this, PlayState* play) {
Math_SmoothStepToF(&sSubCamEye.z, sSubCamAtNext.z, 1.0f, 10.0f, 0.0f);
sSubCamEye.y += 20.0f;
sCsState++;
FALLTHROUGH;
case DEATH_CORE_TUMORS:
case DEATH_CORE_DEAD:
case DEATH_CORE_BURST:
@ -2169,6 +2171,7 @@ void BossVa_ZapperDeath(BossVa* this, PlayState* play) {
switch (sCsState) {
case DEATH_ZAPPER_2:
sp3C = -55.0f;
FALLTHROUGH;
case DEATH_ZAPPER_1:
case DEATH_ZAPPER_3:
if (!this->burst) {
@ -2476,6 +2479,7 @@ void BossVa_BariIntro(BossVa* this, PlayState* play) {
}
}
}
FALLTHROUGH;
case INTRO_UNUSED_CALL_BARI:
this->timer--;
if (this->timer == 0) {
@ -3725,6 +3729,7 @@ void BossVa_SpawnSpark(PlayState* play, BossVaEffect* effect, BossVa* this, Vec3
switch (mode) {
case SPARK_UNUSED:
effect->type = VA_SMALL_SPARK;
FALLTHROUGH;
case SPARK_TETHER:
tempVec = *offset;
tempVec.x += this->actor.world.pos.x;
@ -3735,6 +3740,7 @@ void BossVa_SpawnSpark(PlayState* play, BossVaEffect* effect, BossVa* this, Vec3
case SPARK_BODY:
effect->type = VA_SMALL_SPARK;
FALLTHROUGH;
case SPARK_BARI:
effect->offset.x = offset->x;
effect->offset.z = offset->z;

View file

@ -458,6 +458,7 @@ void DemoEffect_Init(Actor* thisx, PlayState* play2) {
case DEMO_EFFECT_TIMEWARP_TIMEBLOCK_LARGE:
case DEMO_EFFECT_TIMEWARP_TIMEBLOCK_SMALL:
this->actor.flags |= ACTOR_FLAG_25;
FALLTHROUGH;
case DEMO_EFFECT_TIMEWARP_MASTERSWORD:
this->initDrawFunc = DemoEffect_DrawTimeWarp;
this->initUpdateFunc = DemoEffect_InitTimeWarp;

View file

@ -789,6 +789,7 @@ void DemoKankyo_DrawWarpSparkles(Actor* thisx, PlayState* play) {
this->unk_150[i].unk_0.z = (s16)((Rand_ZeroOne() - 0.5f) * 16.0f * temp_f22);
this->unk_150[i].unk_23 = 0;
this->unk_150[i].unk_22++;
FALLTHROUGH;
case 1:
if (this->actor.params == DEMOKANKYO_WARP_OUT) {
if (func_800BB2B4(&camPos, &sWarpRoll, &sWarpFoV, sWarpOutCameraPoints, &this->unk_150[i].unk_20,
@ -834,6 +835,7 @@ void DemoKankyo_DrawWarpSparkles(Actor* thisx, PlayState* play) {
case 0:
this->unk_150[i].unk_18 = Rand_ZeroOne();
this->unk_150[i].unk_23++;
FALLTHROUGH;
case 1:
Math_SmoothStepToF(&this->unk_150[i].unk_18, 1.0f, 0.5f, 0.4f, 0.2f);
if (this->unk_150[i].unk_18 >= 1.0f) {
@ -927,6 +929,7 @@ void DemoKankyo_DrawSparkles(Actor* thisx, PlayState* play) {
this->unk_150[i].unk_0.z = (s16)((Rand_ZeroOne() - 0.5f) * 16.0f * temp_f20);
this->unk_150[i].unk_23 = 0;
this->unk_150[i].unk_22++;
FALLTHROUGH;
case 1:
if (func_800BB2B4(&camPos, &sSparklesRoll, &sSparklesFoV, sSparklesCameraPoints,
&this->unk_150[i].unk_20, &this->unk_150[i].unk_1C) != 0) {
@ -950,6 +953,7 @@ void DemoKankyo_DrawSparkles(Actor* thisx, PlayState* play) {
case 0:
this->unk_150[i].unk_18 = Rand_ZeroOne();
this->unk_150[i].unk_23++;
FALLTHROUGH;
case 1:
Math_SmoothStepToF(&this->unk_150[i].unk_18, 1.0f, 0.5f, 0.4f, 0.2f);
if (1.0f <= this->unk_150[i].unk_18) {

View file

@ -379,7 +379,7 @@ void EnBb_Init(Actor* thisx, PlayState* play) {
this->path = this->actionState >> 4;
this->collider.elements[0].dim.modelSphere.radius = 0x16;
Actor_SetScale(thisx, 0.03f);
// fallthrough
FALLTHROUGH;
case ENBB_GREEN:
thisx->naviEnemyId = NAVI_ENEMY_GREEN_BUBBLE;
this->bobSize = (this->actionState & 0xF) * 20.0f;
@ -1087,6 +1087,7 @@ void EnBb_SetupStunned(EnBb* this) {
break;
case 9:
this->fireIceTimer = 0x30;
FALLTHROUGH;
case 15:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_GOMA_JR_FREEZE);
Actor_SetColorFilter(&this->actor, 0, 0xB4, 0, 0x50);
@ -1154,6 +1155,7 @@ void EnBb_CollisionCheck(EnBb* this, PlayState* play) {
switch (this->dmgEffect) {
case 7:
this->actor.freezeTimer = this->collider.elements[0].info.acHitInfo->toucher.damage;
FALLTHROUGH;
case 5:
this->fireIceTimer = 0x30;
//! @bug
@ -1212,6 +1214,7 @@ void EnBb_CollisionCheck(EnBb* this, PlayState* play) {
((this->actor.params != ENBB_WHITE) && (this->flameScaleX < 20.0f))) {
EnBb_SetupDamage(this);
}
FALLTHROUGH;
case 13:
break;
}

View file

@ -241,6 +241,7 @@ void func_809CEA24(EnBw* this, PlayState* play) {
switch (sp64) {
case 0:
this->unk_236 += this->unk_238;
FALLTHROUGH;
case 1:
if (this->unk_221 == 3) {
if (play->gameplayFrames & 2) {
@ -261,11 +262,13 @@ void func_809CEA24(EnBw* this, PlayState* play) {
break;
case 2:
this->unk_236 += this->unk_238;
FALLTHROUGH;
case 3:
this->unk_238 = 0x4000;
break;
case 4:
this->unk_236 += this->unk_238;
FALLTHROUGH;
case 5:
this->unk_238 = -0x4000;
break;

View file

@ -488,6 +488,7 @@ void EnClearTag_Update(Actor* thisx, PlayState* play2) {
this->actor.world.pos.y, this->actor.world.pos.z, this->actor.world.rot.x,
this->actor.world.rot.y, this->actor.world.rot.z, CLEAR_TAG_STATE_LASER);
}
FALLTHROUGH;
}
case CLEAR_TAG_STATE_CRASHING:
state_crashing:
@ -591,6 +592,7 @@ void EnClearTag_Update(Actor* thisx, PlayState* play2) {
this->subCamId = Play_CreateSubCamera(play);
Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT);
Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE);
FALLTHROUGH;
case CLEAR_TAG_CUTSCENE_MODE_PLAY:
// Update the Arwing cutscene camera to spin around in a circle.
cutsceneTimer = this->frameCounter * 128;

View file

@ -212,6 +212,7 @@ void EnDh_Wait(EnDh* this, PlayState* play) {
this->actionState++;
this->drawDirtWave++;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_DEADHAND_HIDE);
FALLTHROUGH;
case 1:
this->dirtWavePhase += 0x3A7;
Math_SmoothStepToF(&this->dirtWaveSpread, 300.0f, 1.0f, 5.0f, 0.0f);
@ -311,6 +312,7 @@ void EnDh_Attack(EnDh* this, PlayState* play) {
Animation_PlayOnce(&this->skelAnime, &object_dh_Anim_001A3C);
this->actionState++;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_DEADHAND_BITE);
FALLTHROUGH;
case 0:
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 1, 0x5DC, 0);
break;
@ -376,6 +378,7 @@ void EnDh_Burrow(EnDh* this, PlayState* play) {
AT_ON | AT_TYPE_ENEMY; // also TOUCH_ON | TOUCH_SFX_WOOD
this->collider1.info.toucher.dmgFlags = 0xFFCFFFFF;
this->collider1.info.toucher.damage = 4;
FALLTHROUGH;
case 1:
this->dirtWavePhase += 0x47E;
Math_SmoothStepToF(&this->dirtWaveSpread, 300.0f, 1.0f, 8.0f, 0.0f);

View file

@ -162,6 +162,7 @@ void EnDntDemo_Judge(EnDntDemo* this, PlayState* play) {
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_SARIA_THEME);
break;
}
FALLTHROUGH;
case PLAYER_MASK_TRUTH:
if (!GET_ITEMGETINF(ITEMGETINF_1F) && (Player_GetMask(play) != PLAYER_MASK_SKULL)) {
Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
@ -176,6 +177,7 @@ void EnDntDemo_Judge(EnDntDemo* this, PlayState* play) {
}
break;
}
FALLTHROUGH;
case PLAYER_MASK_KEATON:
case PLAYER_MASK_SPOOKY:
case PLAYER_MASK_BUNNY:

View file

@ -90,8 +90,8 @@ void EnDyExtra_Update(Actor* thisx, PlayState* play) {
void EnDyExtra_Draw(Actor* thisx, PlayState* play) {
static Color_RGBA8 primColors[] = { { 255, 255, 170, 255 }, { 255, 255, 170, 255 } };
static Color_RGBA8 envColors[] = { { 255, 100, 255, 255 }, { 100, 255, 255, 255 } };
static u8 D_809FFC50[] = { 0x02, 0x01, 0x01, 0x02, 0x00, 0x00, 0x02, 0x01, 0x00, 0x02, 0x01, 0x00, 0x02,
0x01, 0x00, 0x02, 0x01, 0x00, 0x02, 0x01, 0x00, 0x02, 0x01, 0x00, 0x01, 0x02 };
static u8 D_809FFC50[] = { 0x02, 0x01, 0x01, 0x02, 0x00, 0x00, 0x02, 0x01, 0x00, 0x02, 0x01, 0x00, 0x02, 0x01,
0x00, 0x02, 0x01, 0x00, 0x02, 0x01, 0x00, 0x02, 0x01, 0x00, 0x01, 0x02, 0x00 };
EnDyExtra* this = (EnDyExtra*)thisx;
s32 pad;
GraphicsContext* gfxCtx = play->state.gfxCtx;

View file

@ -373,8 +373,10 @@ void EnElf_Init(Actor* thisx, PlayState* play) {
case FAIRY_HEAL_BIG:
this->fairyFlags |= FAIRY_FLAG_BIG;
thisx->shape.shadowDraw = ActorShadow_DrawWhiteCircle;
FALLTHROUGH;
case FAIRY_HEAL_TIMED:
this->fairyFlags |= FAIRY_FLAG_TIMED;
FALLTHROUGH;
case FAIRY_HEAL:
colorConfig = -1;
EnElf_SetupAction(this, func_80A0329C);

View file

@ -98,6 +98,7 @@ void EnEncount2_Wait(EnEncount2* this, PlayState* play) {
Quake_SetCountdown(quakeIndex, 300);
this->isQuaking = true;
}
FALLTHROUGH;
case ENCOUNT2_ACTIVE_GANONS_TOWER:
this->envEffectsTimer++;
if (this->envEffectsTimer > 60) {

View file

@ -134,6 +134,7 @@ void EnExItem_WaitForObject(EnExItem* this, PlayState* play) {
switch (this->type) {
case EXITEM_BOMB_BAG_COUNTER:
onCounter = true;
FALLTHROUGH;
case EXITEM_BOMB_BAG_BOWLING:
this->unk_17C = func_8002EBCC;
this->giDrawId = GID_BOMB_BAG_30;
@ -149,6 +150,7 @@ void EnExItem_WaitForObject(EnExItem* this, PlayState* play) {
break;
case EXITEM_HEART_PIECE_COUNTER:
onCounter = true;
FALLTHROUGH;
case EXITEM_HEART_PIECE_BOWLING:
this->unk_17C = func_8002ED80;
this->timer = 65;
@ -164,6 +166,7 @@ void EnExItem_WaitForObject(EnExItem* this, PlayState* play) {
break;
case EXITEM_BOMBCHUS_COUNTER:
onCounter = true;
FALLTHROUGH;
case EXITEM_BOMBCHUS_BOWLING:
this->unk_17C = func_8002EBCC;
this->giDrawId = GID_BOMBCHU;

View file

@ -253,6 +253,7 @@ void EnFhgFire_LightningTrail(EnFhgFire* this, PlayState* play) {
case TRAIL_INIT:
this->work[FHGFIRE_FIRE_MODE] = TRAIL_APPEAR;
this->work[FHGFIRE_TIMER] = (s16)(Rand_ZeroOne() * 7.0f) + 7;
FALLTHROUGH;
case TRAIL_APPEAR:
Math_ApproachF(&this->fwork[FHGFIRE_SCALE], 1.7f, 1.0f, 0.34f);

View file

@ -106,6 +106,7 @@ void EnFireRock_Init(Actor* thisx, PlayState* play) {
// sets unused vars?
this->unk_17C.x = (f32)(Rand_CenteredFloat(50.0f) + player->actor.world.pos.x);
this->unk_17C.z = (f32)(Rand_CenteredFloat(50.0f) + player->actor.world.pos.z);
FALLTHROUGH;
case FIRE_ROCK_SPAWNED_FALLING2: // spawned by encount2 and by the ceilling spawner
this->scale = (Rand_ZeroFloat(2.0f) / 100.0f) + 0.02f;
Actor_SetScale(&this->actor, this->scale);
@ -180,6 +181,7 @@ void EnFireRock_Fall(EnFireRock* this, PlayState* play) {
Math_ApproachF(&this->actor.world.pos.z, player->actor.world.pos.z, 1.0f, 10.0f);
}
}
FALLTHROUGH;
case FIRE_ROCK_SPAWNED_FALLING2:
flamePos.x = Rand_CenteredFloat(20.0f) + this->actor.world.pos.x;
flamePos.y = Rand_CenteredFloat(20.0f) + this->actor.world.pos.y;
@ -197,6 +199,7 @@ void EnFireRock_Fall(EnFireRock* this, PlayState* play) {
case FIRE_ROCK_SPAWNED_FALLING1:
case FIRE_ROCK_SPAWNED_FALLING2:
func_80033E88(&this->actor, play, 5, 2);
FALLTHROUGH;
case FIRE_ROCK_BROKEN_PIECE1:
Actor_SpawnFloorDustRing(play, &this->actor, &this->actor.world.pos, this->actor.shape.shadowScale, 1,
8.0f, 500, 10, false);
@ -236,6 +239,7 @@ void EnFireRock_SpawnMoreBrokenPieces(EnFireRock* this, PlayState* play) {
break;
case FIRE_ROCK_BROKEN_PIECE1:
nextRockType = FIRE_ROCK_BROKEN_PIECE2;
break;
}
if (nextRockType != FIRE_ROCK_SPAWNED_FALLING1) {

View file

@ -237,7 +237,7 @@ s32 EnGe3_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p
// Turn head
case GELDB_LIMB_HEAD:
rot->x += this->headRot.y;
FALLTHROUGH;
// This is a hack to fix the color-changing clothes this Gerudo has on N64 versions
default:
OPEN_DISPS(play->state.gfxCtx, "../z_en_ge3.c", 547);

View file

@ -203,13 +203,16 @@ void func_80A3DC44(EnGm* this, PlayState* play) {
switch (func_80A3D7C8()) {
case 0:
SET_INFTABLE(INFTABLE_B0);
FALLTHROUGH;
case 3:
this->actionFunc = func_80A3DD7C;
return;
case 1:
SET_INFTABLE(INFTABLE_B1);
FALLTHROUGH;
case 2:
this->actionFunc = EnGm_ProcessChoiceIndex;
FALLTHROUGH;
default:
return;
}

View file

@ -305,6 +305,7 @@ s16 EnGo_SetFlagsGetStates(PlayState* play, Actor* thisx) {
switch (thisx->textId) {
case 0x3035:
SET_INFTABLE(INFTABLE_10B);
FALLTHROUGH;
case 0x3032:
case 0x3033:
thisx->textId = 0x3034;

View file

@ -351,6 +351,7 @@ s16 EnGo2_GetStateGoronCityRollingBig(PlayState* play, EnGo2* this) {
return 2;
}
}
FALLTHROUGH;
default:
return 1;
}
@ -383,6 +384,7 @@ s16 EnGo2_GetStateGoronDmtBombFlower(PlayState* play, EnGo2* this) {
}
return 1;
}
FALLTHROUGH;
default:
return 1;
}
@ -515,6 +517,7 @@ s16 EnGo2_GetStateGoronCityLink(PlayState* play, EnGo2* this) {
return 2;
case 0x3037:
SET_INFTABLE(INFTABLE_10E);
FALLTHROUGH;
default:
return 0;
}
@ -544,6 +547,7 @@ s16 EnGo2_GetStateGoronCityLink(PlayState* play, EnGo2* this) {
switch (this->actor.textId) {
case 0x3035:
SET_INFTABLE(INFTABLE_10B);
FALLTHROUGH;
case 0x3032:
case 0x3033:
this->actor.textId = 0x3034;
@ -553,6 +557,7 @@ s16 EnGo2_GetStateGoronCityLink(PlayState* play, EnGo2* this) {
return 2;
}
}
break;
}
return 1;
}
@ -598,15 +603,18 @@ s16 EnGo2_GetStateGoronDmtBiggoron(PlayState* play, EnGo2* this) {
if (func_8002F368(play) != EXCH_ITEM_CLAIM_CHECK) {
break;
}
FALLTHROUGH;
case 0x3059:
if (dialogState == TEXT_STATE_NONE) {
func_800F4524(&gSfxDefaultPos, NA_SE_EN_GOLON_WAKE_UP, 60);
}
FALLTHROUGH;
case 0x3054:
if (dialogState == TEXT_STATE_NONE) {
Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
break;
}
return 1;
case TEXT_STATE_CHOICE:
@ -631,6 +639,7 @@ s16 EnGo2_GetStateGoronDmtBiggoron(PlayState* play, EnGo2* this) {
}
return 2;
}
break;
}
return 1;
}
@ -655,6 +664,7 @@ s16 EnGo2_GetStateGoronFireGeneric(PlayState* play, EnGo2* this) {
}
return 1;
}
FALLTHROUGH;
default:
return 1;
}
@ -732,7 +742,7 @@ u16 EnGo2_GetTextId(PlayState* play, Actor* thisx) {
EnGo2* this = (EnGo2*)thisx;
u16 faceReaction = Text_GetFaceReaction(play, 0x20);
if (faceReaction) {
if (faceReaction != 0) {
return faceReaction;
} else {
switch (this->actor.params & 0x1F) {
@ -766,6 +776,9 @@ u16 EnGo2_GetTextId(PlayState* play, Actor* thisx) {
return EnGo2_GetTextIdGoronMarketBazaar(play, this);
}
}
#ifdef AVOID_UB
return faceReaction; // faceReaction is always in the v0 return value register at this point
#endif
}
s16 EnGo2_GetState(PlayState* play, Actor* thisx) {
@ -800,6 +813,11 @@ s16 EnGo2_GetState(PlayState* play, Actor* thisx) {
case GORON_MARKET_BAZAAR:
return EnGo2_GetStateGoronMarketBazaar(play, this);
}
#ifdef AVOID_UB
// The v0 register isn't set in this function, the last value in v0 is the return value of Actor_ProcessTalkRequest
// called in the function below, which must be false for this function to be called
return false;
#endif
}
s32 func_80A44790(EnGo2* this, PlayState* play) {
@ -1121,6 +1139,7 @@ void func_80A454CC(EnGo2* this) {
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENGO2_ANIM_4);
break;
}
FALLTHROUGH;
default:
this->skelAnime.playSpeed = 0.0f;
break;
@ -1217,8 +1236,10 @@ void EnGo2_SelectGoronWakingUp(EnGo2* this) {
EnGo2_WakingUp(this);
break;
}
FALLTHROUGH;
default:
EnGo2_DefaultWakingUp(this);
break;
}
}
@ -1592,10 +1613,12 @@ void EnGo2_Init(Actor* thisx, PlayState* play) {
Path_CopyLastPoint(this->path, &this->actor.world.pos);
this->actor.home.pos = this->actor.world.pos;
}
FALLTHROUGH;
case GORON_DMT_DC_ENTRANCE:
case GORON_DMT_FAIRY_HINT:
default:
this->actionFunc = EnGo2_CurledUp;
break;
}
}

View file

@ -931,7 +931,7 @@ void EnHy_InitImpl(EnHy* this, PlayState* play) {
this->actionFunc = func_80A710F8;
break;
}
// fall-through
FALLTHROUGH;
case ENHY_TYPE_COB:
case ENHY_TYPE_AHG_2:
case ENHY_TYPE_AHG_4:

View file

@ -583,6 +583,7 @@ void EnKanban_Update(Actor* thisx, PlayState* play2) {
if (DECR(this->airTimer) == 0) {
this->actionState = ENKANBAN_GROUND;
}
FALLTHROUGH;
}
case ENKANBAN_GROUND:
case ENKANBAN_WATER:

View file

@ -563,7 +563,7 @@ s16 func_80A97738(PlayState* play, Actor* thisx) {
break;
case 0x10B7:
SET_INFTABLE(INFTABLE_BC);
FALLTHROUGH;
case 0x10B8:
this->actor.textId = (play->msgCtx.choiceIndex == 0) ? 0x10BA : 0x10B9;
return (play->msgCtx.choiceIndex == 0) ? 2 : 1;

View file

@ -144,11 +144,13 @@ s16 func_80AA2BD4(PlayState* play, Actor* thisx) {
break;
case 0x208F:
SET_EVENTCHKINF(EVENTCHKINF_1E);
FALLTHROUGH;
case 0x2004:
case 0x2012:
if (HIGH_SCORE(HS_HORSE_RACE) > gSaveContext.timer1Value) {
HIGH_SCORE(HS_HORSE_RACE) = gSaveContext.timer1Value;
}
FALLTHROUGH;
case 0x208E:
CLEAR_EVENTINF(EVENTINF_HORSES_0A);
thisx->flags &= ~ACTOR_FLAG_16;
@ -157,6 +159,7 @@ s16 func_80AA2BD4(PlayState* play, Actor* thisx) {
break;
case 0x2002:
SET_INFTABLE(INFTABLE_B9);
FALLTHROUGH;
case 0x2003:
if (!GET_EVENTINF(EVENTINF_HORSES_0A)) {
ret = 0;
@ -164,6 +167,7 @@ s16 func_80AA2BD4(PlayState* play, Actor* thisx) {
break;
default:
ret = 0;
break;
}
break;
case TEXT_STATE_NONE:

View file

@ -104,11 +104,13 @@ void func_80AAA274(EnMd* this) {
case 0:
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_2);
this->unk_20A++;
FALLTHROUGH;
case 1:
if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_3);
this->unk_20A++;
}
break;
}
}
@ -117,11 +119,13 @@ void func_80AAA308(EnMd* this) {
case 0:
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_4);
this->unk_20A++;
FALLTHROUGH;
case 1:
if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_5);
this->unk_20A++;
}
break;
}
}
@ -131,6 +135,7 @@ void func_80AAA39C(EnMd* this) {
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_2);
func_80AAA250(this);
this->unk_20A++;
FALLTHROUGH;
case 1:
if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_7);
@ -138,11 +143,13 @@ void func_80AAA39C(EnMd* this) {
} else {
break;
}
FALLTHROUGH;
case 2:
if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_8);
this->unk_20A++;
}
break;
}
}
@ -151,11 +158,13 @@ void func_80AAA474(EnMd* this) {
case 0:
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_7);
this->unk_20A++;
FALLTHROUGH;
case 1:
if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_10);
this->unk_20A++;
}
break;
}
}
@ -165,11 +174,13 @@ void func_80AAA508(EnMd* this) {
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_2);
func_80AAA250(this);
this->unk_20A++;
FALLTHROUGH;
case 1:
if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_10);
this->unk_20A++;
}
break;
}
}
@ -178,11 +189,13 @@ void func_80AAA5A4(EnMd* this) {
case 0:
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_9);
this->unk_20A++;
FALLTHROUGH;
case 1:
if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_6);
this->unk_20A++;
}
break;
}
}
@ -192,11 +205,13 @@ void func_80AAA638(EnMd* this) {
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_9);
func_80AAA250(this);
this->unk_20A++;
FALLTHROUGH;
case 1:
if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_10);
this->unk_20A++;
}
break;
}
}
@ -205,11 +220,13 @@ void func_80AAA6D4(EnMd* this) {
case 0:
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_11);
this->unk_20A++;
FALLTHROUGH;
case 1:
if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_6);
this->unk_20A++;
}
break;
}
}
@ -218,11 +235,13 @@ void func_80AAA768(EnMd* this) {
case 0:
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_12);
this->unk_20A++;
FALLTHROUGH;
case 1:
if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_3);
this->unk_20A++;
}
break;
}
}
@ -231,11 +250,13 @@ void func_80AAA7FC(EnMd* this) {
case 0:
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_13);
this->unk_20A++;
FALLTHROUGH;
case 1:
if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_6);
this->unk_20A++;
}
break;
}
}
@ -245,11 +266,13 @@ void func_80AAA890(EnMd* this) {
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_7);
func_80AAA250(this);
this->unk_20A++;
FALLTHROUGH;
case 1:
if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_10);
this->unk_20A++;
}
break;
}
}
@ -475,6 +498,7 @@ s16 func_80AAAF04(PlayState* play, Actor* thisx) {
if (Message_ShouldAdvance(play)) {
return 2;
}
FALLTHROUGH;
default:
return 1;
}

View file

@ -209,6 +209,7 @@ void EnNiw_Init(Actor* thisx, PlayState* play) {
break;
case 0xD:
this->actor.gravity = 0.0f;
FALLTHROUGH;
case 0xE:
this->actor.colChkInfo.mass = 0;
this->actor.flags &= ~ACTOR_FLAG_0;
@ -223,6 +224,7 @@ void EnNiw_Init(Actor* thisx, PlayState* play) {
switch (this->actor.params) {
case 0xA:
this->actor.colChkInfo.mass = MASS_IMMOVABLE;
FALLTHROUGH;
case 0xD:
case 0xE:
Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit2);

View file

@ -109,6 +109,7 @@ void EnNiwLady_ChoseAnimation(EnNiwLady* this, PlayState* play, s32 arg2) {
switch (arg2) {
case 10:
this->unk_275 = 1;
FALLTHROUGH;
case 9:
frames = Animation_GetLastFrame(&gObjOsAnim_07D0);
Animation_Change(&this->skelAnime, &gObjOsAnim_07D0, 1.0f, 0.0f, frames, ANIMMODE_LOOP, -10.0f);

View file

@ -312,6 +312,7 @@ s32 EnNy_CollisionCheck(EnNy* this, PlayState* play) {
switch (this->actor.colChkInfo.damageEffect) {
case 0xE:
sp3F = 1;
FALLTHROUGH;
case 0xF:
Actor_ApplyDamage(&this->actor);
Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0x2000, 0x50);

View file

@ -88,6 +88,7 @@ void EnOkarinaTag_Init(Actor* thisx, PlayState* play) {
Actor_Kill(&this->actor);
break;
}
FALLTHROUGH;
case 1:
case 4:
case 6:

View file

@ -49,6 +49,7 @@ void func_80ACDDE8(EnPart* this, PlayState* play) {
break;
case 13:
this->timer = 400;
FALLTHROUGH;
case 12:
this->actor.speedXZ = Rand_CenteredFloat(6.0f);
this->actor.home.pos = this->actor.world.pos;
@ -59,11 +60,13 @@ void func_80ACDDE8(EnPart* this, PlayState* play) {
break;
case 14:
EffectSsEnFire_SpawnVec3f(play, &this->actor, &this->actor.world.pos, 40, 0x8001, 0, -1);
FALLTHROUGH;
case 1:
case 4:
case 9:
case 10:
this->timer += (s16)(Rand_ZeroOne() * 17.0f) + 5;
FALLTHROUGH;
case 2:
this->actor.velocity.y = Rand_ZeroOne() * 5.0f + 4.0f;
this->actor.gravity = -0.6f - Rand_ZeroOne() * 0.5f;
@ -71,6 +74,7 @@ void func_80ACDDE8(EnPart* this, PlayState* play) {
break;
case 11:
EffectSsEnFire_SpawnVec3f(play, &this->actor, &this->actor.world.pos, 40, 0x8001, 0, -1);
FALLTHROUGH;
case 3:
this->actor.speedXZ = (Rand_ZeroOne() - 0.5f) * 3.0f;
this->timer = (s16)(Rand_ZeroOne() * 17.0f) + 10;

View file

@ -376,7 +376,7 @@ void EnPoField_CorrectYPos(EnPoField* this, PlayState* play) {
this->actor.world.pos.y = Math_SinS(this->unk_194 * 0x800) * 13.0f + this->actor.home.pos.y;
}
f32 EnPoField_SetFleeSpeed(EnPoField* this, PlayState* play) {
void EnPoField_SetFleeSpeed(EnPoField* this, PlayState* play) {
Player* player = GET_PLAYER(play);
f32 speed =
((player->stateFlags1 & PLAYER_STATE1_23) && player->rideActor != NULL) ? player->rideActor->speedXZ : 12.0f;

View file

@ -527,11 +527,11 @@ void EnRd_Grab(EnRd* this, PlayState* play) {
play->damagePlayer(play, -8);
func_800AA000(this->actor.xzDistToPlayer, 0xFF, 1, 0xC);
this->grabDamageTimer = 20;
// fallthrough
FALLTHROUGH;
case REDEAD_GRAB_START:
Math_SmoothStepToS(&this->headYRotation, 0, 1, 0x5DC, 0);
Math_SmoothStepToS(&this->upperBodyYRotation, 0, 1, 0x5DC, 0);
// fallthrough
FALLTHROUGH;
case REDEAD_GRAB_ATTACK:
if (!(player->stateFlags2 & PLAYER_STATE2_7)) {
Animation_Change(&this->skelAnime, &gGibdoRedeadGrabEndAnim, 0.5f, 0.0f,

View file

@ -532,6 +532,7 @@ void func_80AE5EDC(EnReeba* this, PlayState* play) {
this->actionfunc = func_80AE58EC;
break;
}
FALLTHROUGH;
case 13: // hookshot/longshot
if ((this->actor.colChkInfo.health > 2) && (this->unk_27E != 4)) {
this->unk_27E = 4;
@ -540,6 +541,7 @@ void func_80AE5EDC(EnReeba* this, PlayState* play) {
this->actionfunc = func_80AE58EC;
break;
}
FALLTHROUGH;
case 14:
this->unk_27C = 6;
Actor_ApplyDamage(&this->actor);

View file

@ -435,12 +435,16 @@ void EnRr_CollisionCheck(EnRr* this, PlayState* play) {
switch (this->actor.colChkInfo.damageEffect) {
case RR_DMG_LIGHT_ARROW:
dropType++; // purple rupee
FALLTHROUGH;
case RR_DMG_SHDW_ARROW:
dropType++; // flexible
FALLTHROUGH;
case RR_DMG_WIND_ARROW:
dropType++; // arrow
FALLTHROUGH;
case RR_DMG_SPRT_ARROW:
dropType++; // magic jar
FALLTHROUGH;
case RR_DMG_NORMAL:
// "ouch"
osSyncPrintf(VT_FGCOL(RED) "いてっ( %d : LIFE %d : DAMAGE %d : %x )" VT_RST "\n",

View file

@ -240,6 +240,7 @@ void func_80AF58B8(EnSa* this) {
case 0:
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo2, ENSA_ANIM2_3);
this->unk_20A++;
FALLTHROUGH;
case 1:
if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo2, ENSA_ANIM2_2);
@ -254,6 +255,7 @@ void func_80AF594C(EnSa* this) {
case 0:
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo2, ENSA_ANIM2_8);
this->unk_20A++;
FALLTHROUGH;
case 1:
if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo2, ENSA_ANIM2_9);
@ -268,6 +270,7 @@ void func_80AF59E0(EnSa* this) {
case 0:
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo2, ENSA_ANIM2_1);
this->unk_20A++;
FALLTHROUGH;
case 1:
if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo2, ENSA_ANIM2_7);
@ -283,6 +286,7 @@ void func_80AF5A74(EnSa* this) {
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo2, ENSA_ANIM2_1);
func_80AF5894(this);
this->unk_20A++;
FALLTHROUGH;
case 1:
if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo2, ENSA_ANIM2_9);
@ -297,6 +301,7 @@ void func_80AF5B10(EnSa* this) {
case 0:
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo2, ENSA_ANIM2_6);
this->unk_20A++;
FALLTHROUGH;
case 1:
if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo2, ENSA_ANIM2_4);
@ -312,6 +317,7 @@ void func_80AF5BA4(EnSa* this) {
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo2, ENSA_ANIM2_6);
func_80AF5894(this);
this->unk_20A++;
FALLTHROUGH;
case 1:
if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo2, ENSA_ANIM2_9);
@ -326,6 +332,7 @@ void func_80AF5C40(EnSa* this) {
case 0:
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo2, ENSA_ANIM2_5);
this->unk_20A++;
FALLTHROUGH;
case 1:
if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo2, ENSA_ANIM2_0);

View file

@ -385,6 +385,7 @@ s32 EnSb_UpdateDamage(EnSb* this, PlayState* play) {
switch (this->actor.colChkInfo.damageEffect) {
case 14: // wind arrow
hitByWindArrow = true;
FALLTHROUGH;
case 15: // explosions, arrow, hammer, ice arrow, light arrow, spirit arrow, shadow arrow
if (EnSb_IsVulnerable(this)) {
hitY = this->collider.info.bumper.hitPos.y - this->actor.world.pos.y;

View file

@ -277,8 +277,10 @@ void EnSw_Init(Actor* thisx, PlayState* play) {
this->actor.velocity.y = 8.0f;
this->actor.speedXZ = 4.0f;
this->actor.gravity = -1.0f;
FALLTHROUGH;
case 2:
this->actor.scale.x = 0.0f;
FALLTHROUGH;
case 1:
this->collider.elements[0].info.toucher.damage *= 2;
this->actor.naviEnemyId = NAVI_ENEMY_GOLD_SKULLTULA;

View file

@ -339,7 +339,7 @@ void EnTest_ChooseRandomAction(EnTest* this, PlayState* play) {
EnTest_SetupJumpslash(this);
break;
}
// fallthrough
FALLTHROUGH;
case 8:
EnTest_SetupWalkAndBlock(this);
break;
@ -1755,7 +1755,7 @@ void EnTest_Update(Actor* thisx, PlayState* play) {
case 3:
this->unk_7DE++;
this->upperSkelanime.morphWeight = 4.0f;
// fallthrough
FALLTHROUGH;
case 4:
oldWeight = this->upperSkelanime.morphWeight;
this->upperSkelanime.morphWeight -= 1.0f;

View file

@ -191,9 +191,11 @@ void EnWood02_Init(Actor* thisx, PlayState* play2) {
case WOOD_BUSH_GREEN_LARGE_SPAWNER:
case WOOD_BUSH_BLACK_LARGE_SPAWNER:
spawnType = 1;
FALLTHROUGH;
case WOOD_BUSH_GREEN_LARGE_SPAWNED:
case WOOD_BUSH_BLACK_LARGE_SPAWNED:
spawnType++;
FALLTHROUGH;
case WOOD_TREE_CONICAL_LARGE:
case WOOD_BUSH_GREEN_LARGE:
case WOOD_BUSH_BLACK_LARGE:
@ -208,12 +210,14 @@ void EnWood02_Init(Actor* thisx, PlayState* play2) {
case WOOD_BUSH_GREEN_SMALL_SPAWNER:
case WOOD_BUSH_BLACK_SMALL_SPAWNER:
spawnType = 1;
FALLTHROUGH;
case WOOD_TREE_CONICAL_SPAWNED:
case WOOD_TREE_OVAL_YELLOW_SPAWNED:
case WOOD_TREE_OVAL_GREEN_SPAWNED:
case WOOD_BUSH_GREEN_SMALL_SPAWNED:
case WOOD_BUSH_BLACK_SMALL_SPAWNED:
spawnType++;
FALLTHROUGH;
case WOOD_TREE_CONICAL_MEDIUM:
case WOOD_TREE_OVAL_GREEN:
case WOOD_TREE_KAKARIKO_ADULT:
@ -236,6 +240,7 @@ void EnWood02_Init(Actor* thisx, PlayState* play2) {
this->actor.velocity.x = Rand_CenteredFloat(6.0f);
this->actor.velocity.z = Rand_CenteredFloat(6.0f);
this->actor.velocity.y = (Rand_ZeroOne() * 1.25f) + -3.1f;
break;
}
if (this->actor.params <= WOOD_TREE_CONICAL_SPAWNED) {

View file

@ -942,8 +942,10 @@ void func_80B55444(EnZl3* this, PlayState* play) {
break;
case 8:
this->unk_328 = 1;
FALLTHROUGH;
default:
osSyncPrintf("En_Zl3_inFinal_Check_DemoMode:そんな動作は無い!!!!!!!!\n");
break;
}
this->unk_2F0 = temp_v0;
}

View file

@ -515,6 +515,7 @@ s32 EnZl4_CsAskStone(EnZl4* this, PlayState* play) {
if (EnZl4_SetNextAnim(this, ZL4_ANIM_25)) {
this->talkState++;
}
FALLTHROUGH;
case 1:
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
EnZl4_SetActiveCamDir(play, 3);
@ -555,6 +556,7 @@ s32 EnZl4_CsAskStone(EnZl4* this, PlayState* play) {
if (EnZl4_SetNextAnim(this, ZL4_ANIM_10)) {
this->talkState++;
}
FALLTHROUGH;
case 5:
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
play->msgCtx.msgMode = MSGMODE_PAUSED;
@ -574,6 +576,7 @@ s32 EnZl4_CsAskStone(EnZl4* this, PlayState* play) {
if (EnZl4_SetNextAnim(this, ZL4_ANIM_25)) {
this->talkState = 13;
}
FALLTHROUGH;
case 13:
if (!((Message_GetState(&play->msgCtx) == TEXT_STATE_CHOICE) && Message_ShouldAdvance(play))) {
break;
@ -600,6 +603,7 @@ s32 EnZl4_CsAskStone(EnZl4* this, PlayState* play) {
if (EnZl4_SetNextAnim(this, ZL4_ANIM_29)) {
this->talkState++;
}
FALLTHROUGH;
case 8:
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
EnZl4_SetActiveCamMove(play, 2);
@ -654,6 +658,7 @@ s32 EnZl4_CsAskName(EnZl4* this, PlayState* play) {
if (EnZl4_SetNextAnim(this, ZL4_ANIM_2)) {
this->talkState++;
}
FALLTHROUGH;
case 3:
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ZL4_ANIM_16);
@ -697,6 +702,7 @@ s32 EnZl4_CsAskName(EnZl4* this, PlayState* play) {
if (EnZl4_SetNextAnim(this, ZL4_ANIM_25)) {
this->talkState++;
}
FALLTHROUGH;
case 9:
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
Message_StartTextbox(play, 0x7033, NULL);
@ -738,6 +744,7 @@ s32 EnZl4_CsAskName(EnZl4* this, PlayState* play) {
if (EnZl4_SetNextAnim(this, ZL4_ANIM_12)) {
this->talkState++;
}
FALLTHROUGH;
case 13:
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ZL4_ANIM_6);
@ -766,6 +773,7 @@ s32 EnZl4_CsAskName(EnZl4* this, PlayState* play) {
play->msgCtx.msgMode = MSGMODE_PAUSED;
this->talkState++;
}
FALLTHROUGH;
case 17:
this->talkTimer2++;
if (this->talkTimer2 == 130) {
@ -833,6 +841,7 @@ s32 EnZl4_CsTellLegend(EnZl4* this, PlayState* play) {
if (EnZl4_SetNextAnim(this, ZL4_ANIM_4)) {
this->talkState++;
}
FALLTHROUGH;
case 6:
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ZL4_ANIM_33);
@ -864,6 +873,7 @@ s32 EnZl4_CsTellLegend(EnZl4* this, PlayState* play) {
if (EnZl4_SetNextAnim(this, ZL4_ANIM_27)) {
this->talkState++;
}
FALLTHROUGH;
case 11:
if (!((Message_GetState(&play->msgCtx) == TEXT_STATE_CHOICE) && Message_ShouldAdvance(play))) {
break;
@ -946,6 +956,7 @@ s32 EnZl4_CsWarnAboutGanon(EnZl4* this, PlayState* play) {
this->talkTimer2 = 0;
this->talkState++;
Message_StartTextbox(play, 0x2079, NULL);
FALLTHROUGH;
case 1:
this->talkTimer2++;
if (this->talkTimer2 >= 20) {
@ -1035,6 +1046,7 @@ s32 EnZl4_CsWarnAboutGanon(EnZl4* this, PlayState* play) {
if (EnZl4_SetNextAnim(this, ZL4_ANIM_32)) {
this->talkState++;
}
FALLTHROUGH;
case 12:
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
play->msgCtx.msgMode = MSGMODE_PAUSED;
@ -1055,6 +1067,7 @@ s32 EnZl4_CsMakePlan(EnZl4* this, PlayState* play) {
EnZl4_SetActiveCamMove(play, 10);
this->talkTimer2 = 0;
this->talkState++;
FALLTHROUGH;
case 1:
this->talkTimer2++;
if (this->talkTimer2 >= 10) {
@ -1077,6 +1090,7 @@ s32 EnZl4_CsMakePlan(EnZl4* this, PlayState* play) {
if (EnZl4_SetNextAnim(this, ZL4_ANIM_20)) {
this->talkState++;
}
FALLTHROUGH;
case 4:
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
Message_StartTextbox(play, 0x207D, NULL);
@ -1092,6 +1106,7 @@ s32 EnZl4_CsMakePlan(EnZl4* this, PlayState* play) {
if (EnZl4_SetNextAnim(this, ZL4_ANIM_8)) {
this->talkState++;
}
FALLTHROUGH;
case 6:
if (!((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play))) {
break;

View file

@ -161,6 +161,7 @@ void EnfHG_Intro(EnfHG* this, PlayState* play) {
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0x100FF);
SET_EVENTCHKINF(EVENTCHKINF_72);
Flags_SetSwitch(play, 0x23);
FALLTHROUGH;
case INTRO_FENCE:
player->actor.world.pos.x = GND_BOSSROOM_CENTER_X + 0.0f;
player->actor.world.pos.y = GND_BOSSROOM_CENTER_Y + 7.0f;
@ -241,6 +242,7 @@ void EnfHG_Intro(EnfHG* this, PlayState* play) {
this->subCamAtVel.y = fabsf(this->subCamAt.y - (GND_BOSSROOM_CENTER_Y + 197.0f));
this->subCamAtVel.z = fabsf(this->subCamAt.z - (GND_BOSSROOM_CENTER_Z - 65.0f));
this->timers[0] = 250;
FALLTHROUGH;
case INTRO_LAUGH:
Math_ApproachF(&this->subCamEye.x, GND_BOSSROOM_CENTER_X + 20.0f, 0.05f,
this->subCamVelFactor * this->subCamEyeVel.x);

View file

@ -5242,7 +5242,7 @@ void Fishing_UpdateOwner(Actor* thisx, PlayState* play2) {
D_80B7A6CC = 2;
Interface_ChangeAlpha(12);
sSubCamVelFactor = 0.0f;
// fallthrough
FALLTHROUGH;
}
case 2:
@ -5374,7 +5374,7 @@ void Fishing_UpdateOwner(Actor* thisx, PlayState* play2) {
Message_StartTextbox(play, 0x409E, NULL);
D_80B7A6CC = 11;
func_800A9F6C(0.0f, 150, 10, 10);
// fallthrough
FALLTHROUGH;
}
case 11:
@ -5417,7 +5417,7 @@ void Fishing_UpdateOwner(Actor* thisx, PlayState* play2) {
D_80B7A6CC = 21;
D_80B7FEC8 = 45.0f;
D_80B7A6D0 = 10;
// fallthrough
FALLTHROUGH;
}
case 21:

View file

@ -1299,13 +1299,13 @@ static LinkAnimationHeader* D_808543D4[] = {
};
// return type can't be void due to regalloc in func_8084FCAC
s32 func_80832210(Player* this) {
BAD_RETURN(s32) func_80832210(Player* this) {
this->actor.speedXZ = 0.0f;
this->linearVelocity = 0.0f;
}
// return type can't be void due to regalloc in func_8083F72C
s32 func_80832224(Player* this) {
BAD_RETURN(s32) func_80832224(Player* this) {
func_80832210(this);
this->unk_6AD = 0;
}

View file

@ -25,7 +25,7 @@ u32 EffectSsSolderSrchBall_Init(PlayState* play, u32 index, EffectSs* this, void
this->update = EffectSsSolderSrchBall_Update;
this->life = 100;
this->rUnused = initParams->unused;
this->actor = initParams->linkDetected; // actor field was incorrectly used as a pointer to something else
this->actor = (Actor*)initParams->linkDetected; // actor field was incorrectly used as a pointer to something else
return 1;
}
@ -37,7 +37,7 @@ void EffectSsSolderSrchBall_Update(PlayState* play, u32 index, EffectSs* this) {
s16* linkDetected;
Player* player = GET_PLAYER(play);
linkDetected = this->actor;
linkDetected = (s16*)this->actor;
playerPosDiffX = player->actor.world.pos.x - this->pos.x;
playerPosDiffY = player->actor.world.pos.y - this->pos.y;