1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-04-14 02:38:26 +00:00

Minor Misc Cleanup 2 ()

* misc cleanup

* more cleanup

* more cleanup

* PR Suggestions

* cleanup cond
This commit is contained in:
engineer124 2023-02-26 15:48:42 -05:00 committed by GitHub
parent d4a6b21d46
commit 35887e25ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
62 changed files with 174 additions and 177 deletions
include
src
code
overlays
actors
ovl_Arrow_Fire
ovl_Arrow_Ice
ovl_Arrow_Light
ovl_Bg_Gate_Shutter
ovl_Bg_Haka
ovl_Bg_Hidan_Kousi
ovl_Bg_Jya_Kanaami
ovl_Bg_Menkuri_Eye
ovl_Bg_Spot16_Bombstone
ovl_Bg_Spot18_Obj
ovl_Boss_Fd
ovl_Boss_Va
ovl_Demo_Effect
ovl_Door_Shutter
ovl_Efc_Erupc
ovl_Eff_Dust
ovl_En_Cow
ovl_En_Daiku
ovl_En_Daiku_Kakariko
ovl_En_Door
ovl_En_Ds
ovl_En_Ex_Ruppy
ovl_En_Fr
ovl_En_Fz
ovl_En_Guest
ovl_En_Heishi3
ovl_En_Heishi4
ovl_En_Horse
ovl_En_Horse_Ganon
ovl_En_Kz
ovl_En_Ma1
ovl_En_Ma2
ovl_En_Ma3
ovl_En_Mb
ovl_En_Ms
ovl_En_Ny
ovl_En_Skj
ovl_En_Syateki_Niw
ovl_En_Tite
ovl_En_Zl3
effects
ovl_Effect_Ss_Extra
ovl_Effect_Ss_Kakera
gamestates/ovl_file_choose
misc/ovl_kaleido_scope

View file

@ -857,9 +857,9 @@ typedef struct {
/* 0x1E38 */ OSMesg externalLoadMsgBuf[16];
/* 0x1E78 */ OSMesgQueue preloadSampleQueue;
/* 0x1E90 */ OSMesg preloadSampleMsgBuf[16];
/* 0x1ED0 */ OSMesgQueue currAudioFrameDmaQueue;
/* 0x1EE8 */ OSMesg currAudioFrameDmaMsgBuf[64];
/* 0x1FE8 */ OSIoMesg currAudioFrameDmaIoMsgBuf[64];
/* 0x1ED0 */ OSMesgQueue curAudioFrameDmaQueue;
/* 0x1EE8 */ OSMesg curAudioFrameDmaMsgBuf[64];
/* 0x1FE8 */ OSIoMesg curAudioFrameDmaIoMsgBuf[64];
/* 0x25E8 */ OSMesgQueue syncDmaQueue;
/* 0x2600 */ OSMesg syncDmaMesg;
/* 0x2604 */ OSIoMesg syncDmaIoMesg;

View file

@ -170,7 +170,7 @@ typedef enum {
/* 0x20 */ CAM_SET_START1, // Scene/room door transitions that snap the camera to a fixed location (example: ganon's towers doors climbing up)
/* 0x21 */ CAM_SET_FREE0, // Full manual control is given over the camera
/* 0x22 */ CAM_SET_FREE2, // Various OnePoint Cutscenes, 10 total (example: falling chest)
/* 0x23 */ CAM_SET_PIVOT_CORNER, // Inside the carpenter jail cells from theives hideout "CIRCLE4"
/* 0x23 */ CAM_SET_PIVOT_CORNER, // Inside the carpenter jail cells from thieves hideout "CIRCLE4"
/* 0x24 */ CAM_SET_PIVOT_WATER_SURFACE, // Player diving from the surface of the water to underwater "CIRCLE5"
/* 0x25 */ CAM_SET_CS_0, // Various cutscenes "DEMO0"
/* 0x26 */ CAM_SET_CS_TWISTED_HALLWAY, // Never set to, but checked in twisting hallway (Forest Temple) "DEMO1"

View file

@ -51,7 +51,7 @@ typedef enum {
typedef enum {
/* 0 */ LIGHTNING_OFF, // no lightning
/* 1 */ LIGHTNING_ON, // request ligtning strikes at random intervals
/* 1 */ LIGHTNING_ON, // request lightning strikes at random intervals
/* 2 */ LIGHTNING_LAST // request one lightning strike before turning off
} LightningState;

View file

@ -1172,7 +1172,7 @@ SampleCacheEntry* AudioHeap_AllocTemporarySampleCacheEntry(u32 size) {
index = -1;
for (i = 0; i < gAudioCtx.preloadSampleStackTop; i++) {
preload = &gAudioCtx.preloadSampleStack[i];
if (preload->isFree == false) {
if (!preload->isFree) {
startRamAddr = preload->ramAddr;
endRamAddr = preload->ramAddr + preload->sample->size - 1;
@ -1408,7 +1408,7 @@ void AudioHeap_ApplySampleBankCacheInternal(s32 apply, s32 sampleBankId) {
}
fakematch = &change.oldAddr;
if ((apply != false) && (apply == true)) {
if (apply && (apply == true)) {
u32 temp = change.newAddr;
change.newAddr = *fakematch; // = change.oldAddr

View file

@ -192,8 +192,8 @@ void* AudioLoad_DmaSampleData(u32 devAddr, u32 size, s32 arg2, u8* dmaIndexRef,
dma->ttl = 3;
dma->devAddr = dmaDevAddr;
dma->sizeUnused = transfer;
AudioLoad_Dma(&gAudioCtx.currAudioFrameDmaIoMsgBuf[gAudioCtx.curAudioFrameDmaCount++], OS_MESG_PRI_NORMAL, OS_READ,
dmaDevAddr, dma->ramAddr, transfer, &gAudioCtx.currAudioFrameDmaQueue, medium, "SUPERDMA");
AudioLoad_Dma(&gAudioCtx.curAudioFrameDmaIoMsgBuf[gAudioCtx.curAudioFrameDmaCount++], OS_MESG_PRI_NORMAL, OS_READ,
dmaDevAddr, dma->ramAddr, transfer, &gAudioCtx.curAudioFrameDmaQueue, medium, "SUPERDMA");
*dmaIndexRef = dmaIndex;
return (devAddr - dmaDevAddr) + dma->ramAddr;
}
@ -1166,8 +1166,8 @@ void AudioLoad_Init(void* heap, u32 heapSize) {
gAudioCtx.rspTask[0].task.t.data_size = 0;
gAudioCtx.rspTask[1].task.t.data_size = 0;
osCreateMesgQueue(&gAudioCtx.syncDmaQueue, &gAudioCtx.syncDmaMesg, 1);
osCreateMesgQueue(&gAudioCtx.currAudioFrameDmaQueue, gAudioCtx.currAudioFrameDmaMsgBuf,
ARRAY_COUNT(gAudioCtx.currAudioFrameDmaMsgBuf));
osCreateMesgQueue(&gAudioCtx.curAudioFrameDmaQueue, gAudioCtx.curAudioFrameDmaMsgBuf,
ARRAY_COUNT(gAudioCtx.curAudioFrameDmaMsgBuf));
osCreateMesgQueue(&gAudioCtx.externalLoadQueue, gAudioCtx.externalLoadMsgBuf,
ARRAY_COUNT(gAudioCtx.externalLoadMsgBuf));
osCreateMesgQueue(&gAudioCtx.preloadSampleQueue, gAudioCtx.preloadSampleMsgBuf,
@ -1824,7 +1824,7 @@ s32 AudioLoad_ProcessSamplePreloads(s32 resetStatus) {
preloadIndex >>= 24;
preload = &gAudioCtx.preloadSampleStack[preloadIndex];
if (preload->isFree == false) {
if (!preload->isFree) {
sample = preload->sample;
key = (u32)sample->sampleAddr + sample->size + sample->medium;
if (key == preload->endAndMediumKey) {

View file

@ -1326,7 +1326,7 @@ Acmd* AudioSynth_ApplyHaasEffect(Acmd* cmd, NoteSubEu* noteSubEu, NoteSynthesisS
aDMEMMove(cmd++, DMEM_TEMP, DMEM_HAAS_TEMP + haasEffectDelaySize, size);
}
if (haasEffectDelaySize) { // != 0
if ((u32)haasEffectDelaySize != 0) {
// Save excessive samples for next iteration
aSaveBuffer(cmd++, DMEM_HAAS_TEMP + size, synthState->synthesisBuffers->haasEffectDelayState,
ALIGN16(haasEffectDelaySize));

View file

@ -27,7 +27,7 @@ void func_800AD950(struct_80166500* this) {
void func_800AD958(struct_80166500* this, Gfx** gfxp) {
Gfx* gfx = *gfxp;
u16* tex = D_0E000000;
s32 fmt = this->useRgba == false ? G_IM_FMT_IA : G_IM_FMT_RGBA;
s32 fmt = !this->useRgba ? G_IM_FMT_IA : G_IM_FMT_RGBA;
s32 y;
s32 height = 6;

View file

@ -46,7 +46,7 @@ AudioTask* func_800E5000(void) {
s32 pad;
s32 j;
s32 sp5C;
s16* currAiBuffer;
s16* curAiBuffer;
OSTask_t* task;
s32 index;
u32 sp4C;
@ -88,21 +88,21 @@ AudioTask* func_800E5000(void) {
sp5C = gAudioCtx.curAudioFrameDmaCount;
for (i = 0; i < gAudioCtx.curAudioFrameDmaCount; i++) {
if (osRecvMesg(&gAudioCtx.currAudioFrameDmaQueue, NULL, OS_MESG_NOBLOCK) == 0) {
if (osRecvMesg(&gAudioCtx.curAudioFrameDmaQueue, NULL, OS_MESG_NOBLOCK) == 0) {
sp5C--;
}
}
if (sp5C != 0) {
for (i = 0; i < sp5C; i++) {
osRecvMesg(&gAudioCtx.currAudioFrameDmaQueue, NULL, OS_MESG_BLOCK);
osRecvMesg(&gAudioCtx.curAudioFrameDmaQueue, NULL, OS_MESG_BLOCK);
}
}
sp48 = MQ_GET_COUNT(&gAudioCtx.currAudioFrameDmaQueue);
sp48 = MQ_GET_COUNT(&gAudioCtx.curAudioFrameDmaQueue);
if (sp48 != 0) {
for (i = 0; i < sp48; i++) {
osRecvMesg(&gAudioCtx.currAudioFrameDmaQueue, NULL, OS_MESG_NOBLOCK);
osRecvMesg(&gAudioCtx.curAudioFrameDmaQueue, NULL, OS_MESG_NOBLOCK);
}
}
@ -133,7 +133,7 @@ AudioTask* func_800E5000(void) {
gAudioCtx.curAbiCmdBuf = gAudioCtx.abiCmdBufs[gAudioCtx.rspTaskIndex];
index = gAudioCtx.curAiBufIndex;
currAiBuffer = gAudioCtx.aiBuffers[index];
curAiBuffer = gAudioCtx.aiBuffers[index];
gAudioCtx.aiBufLengths[index] =
(s16)((((gAudioCtx.audioBufferParameters.samplesPerFrameTarget - samplesRemainingInAi) +
@ -162,7 +162,7 @@ AudioTask* func_800E5000(void) {
}
gAudioCtx.curAbiCmdBuf =
AudioSynth_Update(gAudioCtx.curAbiCmdBuf, &abiCmdCnt, currAiBuffer, gAudioCtx.aiBufLengths[index]);
AudioSynth_Update(gAudioCtx.curAbiCmdBuf, &abiCmdCnt, curAiBuffer, gAudioCtx.aiBufLengths[index]);
// Update audioRandom to the next random number
gAudioCtx.audioRandom = (gAudioCtx.audioRandom + gAudioCtx.totalTaskCount) * osGetCount();

View file

@ -140,7 +140,7 @@ void Audio_RemoveMatchingSfxRequests(u8 aspect, SfxBankEntry* cmp) {
break;
}
if (remove) {
req->sfxId = 0;
req->sfxId = NA_SE_NONE;
}
}
}
@ -158,9 +158,11 @@ void Audio_ProcessSfxRequest(void) {
req = &sSfxRequests[gSfxRequestReadIndex];
evictIndex = 0x80;
if (req->sfxId == 0) {
if (req->sfxId == NA_SE_NONE) {
return;
}
bankId = SFX_BANK(req->sfxId);
if ((1 << bankId) & D_801333F0) {
AudioDebug_ScrPrt("SE", req->sfxId);

View file

@ -1610,7 +1610,7 @@ void BgCheck_Allocate(CollisionContext* colCtx, PlayState* play, CollisionHeader
customNodeListMax = sceneSubdivisionList[i].nodeListMax;
}
}
if (useCustomSubdivisions == false) {
if (!useCustomSubdivisions) {
colCtx->subdivAmount.x = 16;
colCtx->subdivAmount.y = 4;
colCtx->subdivAmount.z = 16;
@ -2296,7 +2296,7 @@ s32 BgCheck_CheckLineImpl(CollisionContext* colCtx, u16 xpFlags1, u16 xpFlags2,
sectorMin.z += colCtx->subdivLength.z;
sectorMax.z += colCtx->subdivLength.z;
}
} else if (BgCheck_PosInStaticBoundingBox(colCtx, posA) == false) {
} else if (!BgCheck_PosInStaticBoundingBox(colCtx, posA)) {
return false;
} else {
result =
@ -2722,7 +2722,7 @@ s32 DynaPoly_SetBgActor(PlayState* play, DynaCollisionContext* dyna, Actor* acto
}
}
if (foundSlot == false) {
if (!foundSlot) {
osSyncPrintf(VT_FGCOL(RED));
osSyncPrintf("DynaPolyInfo_setActor():ダイナミックポリゴン 空きインデックスはありません\n");
osSyncPrintf(VT_RST);
@ -2788,7 +2788,7 @@ void DynaPoly_DeleteBgActor(PlayState* play, DynaCollisionContext* dyna, s32 bgI
osSyncPrintf(VT_FGCOL(GREEN));
osSyncPrintf("DynaPolyInfo_delReserve():index %d\n", bgId);
osSyncPrintf(VT_RST);
if (DynaPoly_IsBgIdBgActor(bgId) == false) {
if (!DynaPoly_IsBgIdBgActor(bgId)) {
if (bgId == -1) {
osSyncPrintf(VT_FGCOL(GREEN));
@ -3178,8 +3178,8 @@ f32 BgCheck_RaycastDownDyna(DynaRaycastDown* dynaRaycastDown) {
if (dynaRaycastDown->actor == dynaRaycastDown->colCtx->dyna.bgActors[i].actor ||
dynaRaycastDown->pos->y < dynaRaycastDown->colCtx->dyna.bgActors[i].minY ||
Math3D_XZInSphere(&dynaRaycastDown->colCtx->dyna.bgActors[i].boundingSphere, dynaRaycastDown->pos->x,
dynaRaycastDown->pos->z) == false) {
!Math3D_XZInSphere(&dynaRaycastDown->colCtx->dyna.bgActors[i].boundingSphere, dynaRaycastDown->pos->x,
dynaRaycastDown->pos->z)) {
continue;
}

View file

@ -3537,7 +3537,7 @@ s32 CollisionCheck_CylSideVsLineSeg(f32 radius, f32 height, f32 offset, Vec3f* a
return 0;
}
if (intersect2 == false) {
if (!intersect2) {
if (frac1 < 0.0f || 1.0f < frac1) {
return 0;
}
@ -3564,7 +3564,7 @@ s32 CollisionCheck_CylSideVsLineSeg(f32 radius, f32 height, f32 offset, Vec3f* a
((frac2 * itemStep.y + actorToItem.y < 0.0f) || (height < frac2 * itemStep.y + actorToItem.y))) {
intersect2 = false;
}
if (intersect1 == false && intersect2 == false) {
if (!intersect1 && !intersect2) {
return 0;
} else if ((intersect1 == true) && (intersect2 == true)) {
out1->x = frac1 * itemStep.x + actorToItem.x + actorPos->x;

View file

@ -109,7 +109,7 @@ void Effect_Add(PlayState* play, s32* pIndex, s32 type, u8 arg3, u8 arg4, void*
switch (type) {
case EFFECT_SPARK:
for (i = 0; i < SPARK_COUNT; i++) {
if (sEffectContext.sparks[i].status.active == false) {
if (!sEffectContext.sparks[i].status.active) {
slotFound = true;
*pIndex = i;
effect = &sEffectContext.sparks[i].effect;
@ -121,7 +121,7 @@ void Effect_Add(PlayState* play, s32* pIndex, s32 type, u8 arg3, u8 arg4, void*
case EFFECT_BLURE1:
case EFFECT_BLURE2:
for (i = 0; i < BLURE_COUNT; i++) {
if (sEffectContext.blures[i].status.active == false) {
if (!sEffectContext.blures[i].status.active) {
slotFound = true;
*pIndex = i + SPARK_COUNT;
effect = &sEffectContext.blures[i].effect;
@ -132,7 +132,7 @@ void Effect_Add(PlayState* play, s32* pIndex, s32 type, u8 arg3, u8 arg4, void*
break;
case EFFECT_SHIELD_PARTICLE:
for (i = 0; i < SHIELD_PARTICLE_COUNT; i++) {
if (sEffectContext.shieldParticles[i].status.active == false) {
if (!sEffectContext.shieldParticles[i].status.active) {
slotFound = true;
*pIndex = i + SPARK_COUNT + BLURE_COUNT;
effect = &sEffectContext.shieldParticles[i].effect;

View file

@ -183,7 +183,7 @@ void Message_CloseTextbox(PlayState* play) {
msgCtx->stateTimer = 2;
msgCtx->msgMode = MSGMODE_TEXT_CLOSING;
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_DEFAULT;
Audio_PlaySfxGeneral(0, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
Audio_PlaySfxGeneral(NA_SE_NONE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
}
}
@ -743,10 +743,9 @@ u16 Message_DrawItemIcon(PlayState* play, u16 itemId, Gfx** p, u16 i) {
MessageContext* msgCtx = &play->msgCtx;
// clang-format off
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) { Audio_PlaySfxGeneral(0, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) { \
Audio_PlaySfxGeneral(NA_SE_NONE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
}
// clang-format on
@ -860,7 +859,7 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
play->msgCtx.textPosX = R_TEXT_INIT_XPOS;
if (sTextIsCredits == false) {
if (!sTextIsCredits) {
msgCtx->textPosY = R_TEXT_INIT_YPOS;
} else {
msgCtx->textPosY = YREG(1);
@ -898,7 +897,7 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
case MESSAGE_BOX_BREAK:
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) {
if (!sTextboxSkipped) {
Audio_PlaySfxGeneral(0, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
Audio_PlaySfxGeneral(NA_SE_NONE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
msgCtx->msgMode = MSGMODE_TEXT_AWAIT_NEXT;
Font_LoadMessageBoxIcon(font, TEXTBOX_ICON_TRIANGLE);
@ -916,7 +915,7 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
case MESSAGE_TEXTID:
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_HAS_NEXT;
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) {
Audio_PlaySfxGeneral(0, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
Audio_PlaySfxGeneral(NA_SE_NONE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
msgCtx->msgMode = MSGMODE_TEXT_DONE;
Font_LoadMessageBoxIcon(font, TEXTBOX_ICON_TRIANGLE);
@ -948,6 +947,7 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
if (character) {}
}
FALLTHROUGH;
case MESSAGE_QUICKTEXT_DISABLE:
break;
case MESSAGE_AWAIT_BUTTON_PRESS:
@ -996,10 +996,9 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
break;
case MESSAGE_BACKGROUND:
// clang-format off
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) { Audio_PlaySfxGeneral(0, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) { \
Audio_PlaySfxGeneral(NA_SE_NONE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
// clang-format on
gDPPipeSync(gfx++);
@ -1113,7 +1112,7 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
return;
case MESSAGE_PERSISTENT:
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) {
Audio_PlaySfxGeneral(0, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
Audio_PlaySfxGeneral(NA_SE_NONE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
msgCtx->msgMode = MSGMODE_TEXT_DONE;
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_PERSISTENT;
@ -1133,7 +1132,7 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
default:
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING && i + 1 == msgCtx->textDrawPos &&
msgCtx->textDelayTimer == msgCtx->textDelay) {
Audio_PlaySfxGeneral(0, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
Audio_PlaySfxGeneral(NA_SE_NONE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
Message_DrawTextChar(play, &font->charTexBuf[charTexIdx], &gfx);
@ -1755,7 +1754,7 @@ void Message_StartOcarinaImpl(PlayState* play, u16 ocarinaActionId) {
s32 textId;
s16 j;
s16 i;
s16 noStop;
s16 noStopDoAction;
s32 k;
osSyncPrintf(VT_FGCOL(GREEN));
@ -1781,7 +1780,7 @@ void Message_StartOcarinaImpl(PlayState* play, u16 ocarinaActionId) {
// "Ocarina Number"
osSyncPrintf(VT_FGCOL(RED) "☆☆☆☆☆ オカリナ番号=%d(%d) ☆☆☆☆☆\n" VT_RST, ocarinaActionId, 2);
noStop = false;
noStopDoAction = false;
if (ocarinaActionId >= 0x893) {
Message_OpenText(play, ocarinaActionId); // You played the [song name]
textId = ocarinaActionId + 0x86E;
@ -1805,7 +1804,7 @@ void Message_StartOcarinaImpl(PlayState* play, u16 ocarinaActionId) {
}
} else {
msgCtx->ocarinaAction = ocarinaActionId;
noStop = true;
noStopDoAction = true;
if (ocarinaActionId >= OCARINA_ACTION_PLAYBACK_MINUET) {
osSyncPrintf("222222222\n");
Message_OpenText(play, 0x86D); // Play using [A] and [C].
@ -1835,11 +1834,11 @@ void Message_StartOcarinaImpl(PlayState* play, u16 ocarinaActionId) {
msgCtx->msgMode = MSGMODE_TEXT_CONTINUING;
}
msgCtx->textboxColorAlphaCurrent = msgCtx->textboxColorAlphaTarget;
if (noStop == false) {
if (!noStopDoAction) {
Interface_LoadActionLabelB(play, DO_ACTION_STOP);
noStop = gSaveContext.hudVisibilityMode;
noStopDoAction = gSaveContext.hudVisibilityMode;
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_B_ALT);
gSaveContext.hudVisibilityMode = noStop;
gSaveContext.hudVisibilityMode = noStopDoAction;
}
// "Music Performance Start"
osSyncPrintf("演奏開始\n");
@ -2091,7 +2090,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
msgCtx->stateTimer = 20;
msgCtx->msgMode = MSGMODE_SONG_DEMONSTRATION_SELECT_INSTRUMENT;
} else {
AudioOcarina_Start((1 << (msgCtx->ocarinaAction + 0x11)) + 0x8000);
AudioOcarina_Start((1 << (msgCtx->ocarinaAction - OCARINA_ACTION_PLAYBACK_MINUET)) + 0x8000);
// "Performance Check"
osSyncPrintf("演奏チェック=%d\n", msgCtx->ocarinaAction - OCARINA_ACTION_PLAYBACK_MINUET);
msgCtx->msgMode = MSGMODE_SONG_PLAYBACK;
@ -2470,9 +2469,9 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
case MSGMODE_SONG_PLAYED_ACT:
msgCtx->stateTimer--;
if (msgCtx->stateTimer == 0) {
if (msgCtx->lastPlayedSong < OCARINA_SONG_SARIAS &&
(msgCtx->ocarinaAction < OCARINA_ACTION_PLAYBACK_MINUET ||
msgCtx->ocarinaAction >= OCARINA_ACTION_PLAYBACK_SARIA)) {
if ((msgCtx->lastPlayedSong <= OCARINA_SONG_PRELUDE) &&
!(msgCtx->ocarinaAction >= OCARINA_ACTION_PLAYBACK_MINUET &&
msgCtx->ocarinaAction <= OCARINA_ACTION_PLAYBACK_PRELUDE)) {
if (msgCtx->disableWarpSongs || interfaceCtx->restrictions.warpSongs == 3) {
Message_StartTextbox(play, 0x88C, NULL); // "You can't warp here!"
play->msgCtx.ocarinaMode = OCARINA_MODE_04;
@ -2500,7 +2499,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
osSyncPrintf(VT_FGCOL(YELLOW));
osSyncPrintf("Ocarina_PC_Wind=%d(%d) ☆☆☆ ", OCARINA_ACTION_CHECK_MINUET,
msgCtx->ocarinaAction - OCARINA_ACTION_CHECK_MINUET);
if (msgCtx->lastPlayedSong + OCARINA_ACTION_CHECK_MINUET == msgCtx->ocarinaAction) {
if (msgCtx->lastPlayedSong == (msgCtx->ocarinaAction - OCARINA_ACTION_CHECK_MINUET)) {
play->msgCtx.ocarinaMode = OCARINA_MODE_03;
} else {
play->msgCtx.ocarinaMode = msgCtx->lastPlayedSong - 1;
@ -2509,7 +2508,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
osSyncPrintf(VT_FGCOL(GREEN));
osSyncPrintf("Ocarina_C_Wind=%d(%d) ☆☆☆ ", OCARINA_ACTION_PLAYBACK_MINUET,
msgCtx->ocarinaAction - OCARINA_ACTION_PLAYBACK_MINUET);
if (msgCtx->lastPlayedSong + OCARINA_ACTION_PLAYBACK_MINUET == msgCtx->ocarinaAction) {
if (msgCtx->lastPlayedSong == (msgCtx->ocarinaAction - OCARINA_ACTION_PLAYBACK_MINUET)) {
play->msgCtx.ocarinaMode = OCARINA_MODE_03;
} else {
play->msgCtx.ocarinaMode = OCARINA_MODE_04;
@ -2535,7 +2534,8 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
if (sOcarinaButtonIndexBufPos != 0 && msgCtx->ocarinaStaff->pos == 1) {
sOcarinaButtonIndexBufPos = 0;
}
if (msgCtx->ocarinaStaff->pos && sOcarinaButtonIndexBufPos == msgCtx->ocarinaStaff->pos - 1) {
if (((u32)msgCtx->ocarinaStaff->pos != 0) &&
(sOcarinaButtonIndexBufPos == msgCtx->ocarinaStaff->pos - 1)) {
msgCtx->lastOcarinaButtonIndex = sOcarinaButtonIndexBuf[msgCtx->ocarinaStaff->pos - 1] =
msgCtx->ocarinaStaff->buttonIndex;
sOcarinaButtonIndexBuf[msgCtx->ocarinaStaff->pos] = OCARINA_BTN_INVALID;
@ -2548,7 +2548,8 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
break;
case MSGMODE_SONG_PLAYBACK:
msgCtx->ocarinaStaff = AudioOcarina_GetPlayingStaff();
if (msgCtx->ocarinaStaff->pos && sOcarinaButtonIndexBufPos == msgCtx->ocarinaStaff->pos - 1) {
if (((u32)msgCtx->ocarinaStaff->pos != 0) &&
(sOcarinaButtonIndexBufPos == msgCtx->ocarinaStaff->pos - 1)) {
sOcarinaButtonIndexBuf[msgCtx->ocarinaStaff->pos - 1] = msgCtx->ocarinaStaff->buttonIndex;
sOcarinaButtonIndexBuf[msgCtx->ocarinaStaff->pos] = OCARINA_BTN_INVALID;
sOcarinaButtonIndexBufPos++;
@ -2595,7 +2596,8 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
case MSGMODE_SCARECROW_LONG_RECORDING_ONGOING:
msgCtx->ocarinaStaff = AudioOcarina_GetRecordingStaff();
osSyncPrintf("\nonpu_pt=%d, locate=%d", sOcarinaButtonIndexBufPos, msgCtx->ocarinaStaff->pos);
if (msgCtx->ocarinaStaff->pos && sOcarinaButtonIndexBufPos == msgCtx->ocarinaStaff->pos - 1) {
if (((u32)msgCtx->ocarinaStaff->pos != 0) &&
(sOcarinaButtonIndexBufPos == msgCtx->ocarinaStaff->pos - 1)) {
if (sOcarinaButtonIndexBufLen >= 8) {
for (buttonIndexPos = sOcarinaButtonIndexBufLen - 8, i = 0; i < 8; i++, buttonIndexPos++) {
sOcarinaButtonIndexBuf[buttonIndexPos] = sOcarinaButtonIndexBuf[buttonIndexPos + 1];
@ -2646,7 +2648,8 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
case MSGMODE_SCARECROW_LONG_PLAYBACK:
case MSGMODE_SCARECROW_SPAWN_PLAYBACK:
msgCtx->ocarinaStaff = AudioOcarina_GetPlaybackStaff();
if (msgCtx->ocarinaStaff->pos && sOcarinaButtonIndexBufPos == msgCtx->ocarinaStaff->pos - 1) {
if (((u32)msgCtx->ocarinaStaff->pos != 0) &&
(sOcarinaButtonIndexBufPos == msgCtx->ocarinaStaff->pos - 1)) {
if (sOcarinaButtonIndexBufLen >= 8) {
for (buttonIndexPos = sOcarinaButtonIndexBufLen - 8, i = 0; i < 8; i++, buttonIndexPos++) {
sOcarinaButtonIndexBuf[buttonIndexPos] = sOcarinaButtonIndexBuf[buttonIndexPos + 1];
@ -2681,7 +2684,8 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
break;
case MSGMODE_SCARECROW_SPAWN_RECORDING_ONGOING:
msgCtx->ocarinaStaff = AudioOcarina_GetRecordingStaff();
if (msgCtx->ocarinaStaff->pos && sOcarinaButtonIndexBufPos == msgCtx->ocarinaStaff->pos - 1) {
if (((u32)msgCtx->ocarinaStaff->pos != 0) &&
(sOcarinaButtonIndexBufPos == msgCtx->ocarinaStaff->pos - 1)) {
msgCtx->lastOcarinaButtonIndex = sOcarinaButtonIndexBuf[sOcarinaButtonIndexBufPos] =
msgCtx->ocarinaStaff->buttonIndex;
sOcarinaButtonIndexBufPos++;
@ -2738,7 +2742,8 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
Audio_PlaySfxGeneral(NA_SE_SY_METRONOME_LV - SFX_FLAG, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
msgCtx->ocarinaStaff = AudioOcarina_GetPlaybackStaff();
if (msgCtx->ocarinaStaff->pos && sOcarinaButtonIndexBufPos == msgCtx->ocarinaStaff->pos - 1) {
if (((u32)msgCtx->ocarinaStaff->pos != 0) &&
(sOcarinaButtonIndexBufPos == msgCtx->ocarinaStaff->pos - 1)) {
sOcarinaButtonIndexBuf[msgCtx->ocarinaStaff->pos - 1] = msgCtx->ocarinaStaff->buttonIndex;
sOcarinaButtonIndexBuf[msgCtx->ocarinaStaff->pos] = OCARINA_BTN_INVALID;
sOcarinaButtonIndexBufPos++;
@ -2761,7 +2766,8 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
case MSGMODE_MEMORY_GAME_LEFT_SKULLKID_WAIT:
case MSGMODE_MEMORY_GAME_RIGHT_SKULLKID_WAIT:
msgCtx->ocarinaStaff = AudioOcarina_GetPlaybackStaff();
if (msgCtx->ocarinaStaff->pos && sOcarinaButtonIndexBufPos == msgCtx->ocarinaStaff->pos - 1) {
if (((u32)msgCtx->ocarinaStaff->pos != 0) &&
(sOcarinaButtonIndexBufPos == msgCtx->ocarinaStaff->pos - 1)) {
sOcarinaButtonIndexBuf[msgCtx->ocarinaStaff->pos - 1] = msgCtx->ocarinaStaff->buttonIndex;
sOcarinaButtonIndexBuf[msgCtx->ocarinaStaff->pos] = OCARINA_BTN_INVALID;
sOcarinaButtonIndexBufPos++;
@ -2771,7 +2777,8 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
Audio_PlaySfxGeneral(NA_SE_SY_METRONOME_LV - SFX_FLAG, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
msgCtx->ocarinaStaff = AudioOcarina_GetPlayingStaff();
if (msgCtx->ocarinaStaff->pos && sOcarinaButtonIndexBufPos == msgCtx->ocarinaStaff->pos - 1) {
if (((u32)msgCtx->ocarinaStaff->pos != 0) &&
(sOcarinaButtonIndexBufPos == msgCtx->ocarinaStaff->pos - 1)) {
sOcarinaButtonIndexBuf[msgCtx->ocarinaStaff->pos - 1] = msgCtx->ocarinaStaff->buttonIndex;
sOcarinaButtonIndexBuf[msgCtx->ocarinaStaff->pos] = OCARINA_BTN_INVALID;
sOcarinaButtonIndexBufPos++;
@ -2796,7 +2803,8 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
break;
case MSGMODE_MEMORY_GAME_ROUND_SUCCESS:
msgCtx->ocarinaStaff = AudioOcarina_GetPlayingStaff();
if (msgCtx->ocarinaStaff->pos && sOcarinaButtonIndexBufPos == msgCtx->ocarinaStaff->pos - 1) {
if (((u32)msgCtx->ocarinaStaff->pos != 0) &&
(sOcarinaButtonIndexBufPos == msgCtx->ocarinaStaff->pos - 1)) {
sOcarinaButtonIndexBuf[msgCtx->ocarinaStaff->pos - 1] = msgCtx->ocarinaStaff->buttonIndex;
sOcarinaButtonIndexBuf[msgCtx->ocarinaStaff->pos] = OCARINA_BTN_INVALID;
sOcarinaButtonIndexBufPos++;
@ -2835,7 +2843,8 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
break;
case MSGMODE_FROGS_PLAYING:
msgCtx->ocarinaStaff = AudioOcarina_GetPlayingStaff();
if (msgCtx->ocarinaStaff->pos && sOcarinaButtonIndexBufPos == msgCtx->ocarinaStaff->pos - 1) {
if (((u32)msgCtx->ocarinaStaff->pos != 0) &&
(sOcarinaButtonIndexBufPos == msgCtx->ocarinaStaff->pos - 1)) {
msgCtx->lastOcarinaButtonIndex = msgCtx->ocarinaStaff->buttonIndex;
msgCtx->ocarinaStaff->pos = sOcarinaButtonIndexBufPos = 0;
Message_ResetOcarinaNoteState();
@ -3318,7 +3327,7 @@ void Message_Update(PlayState* play) {
// Later, if the ocarina has not been played and another textbox is closed, this handling
// for Saria's song will be carried out.
player->naviTextId = -0xE0;
player->naviActor->flags |= 0x10000;
player->naviActor->flags |= ACTOR_FLAG_16;
}
if (msgCtx->ocarinaAction == OCARINA_ACTION_FREE_PLAY_DONE &&
(play->msgCtx.ocarinaMode == OCARINA_MODE_01 || play->msgCtx.ocarinaMode == OCARINA_MODE_0B)) {

View file

@ -514,7 +514,7 @@ void Play_Update(PlayState* this) {
}
}
if (this->transitionMode) { // != TRANS_MODE_OFF
if ((u32)this->transitionMode != TRANS_MODE_OFF) {
switch (this->transitionMode) {
case TRANS_MODE_SETUP:
if (this->transitionTrigger != TRANS_TRIGGER_END) {

View file

@ -1322,7 +1322,7 @@ void func_80090A28(Player* this, Vec3f* vecs) {
D_8012608C.x = D_80126080.x;
if (this->unk_845 >= 3) {
this->unk_845 += 1;
this->unk_845++;
D_8012608C.x *= 1.0f + ((9 - this->unk_845) * 0.1f);
}

View file

@ -109,7 +109,7 @@ void ArrowFire_Hit(ArrowFire* this, PlayState* play) {
timer = this->timer;
if (timer != 0) {
this->timer -= 1;
this->timer--;
if (this->timer >= 8) {
offset = ((this->timer - 8) * (1.0f / 24.0f));

View file

@ -110,7 +110,7 @@ void ArrowIce_Hit(ArrowIce* this, PlayState* play) {
timer = this->timer;
if (timer != 0) {
this->timer -= 1;
this->timer--;
if (this->timer >= 8) {
offset = ((this->timer - 8) * (1.0f / 24.0f));

View file

@ -109,7 +109,7 @@ void ArrowLight_Hit(ArrowLight* this, PlayState* play) {
timer = this->timer;
if (timer != 0) {
this->timer -= 1;
this->timer--;
if (this->timer >= 8) {
offset = ((this->timer - 8) * (1.0f / 24.0f));

View file

@ -116,7 +116,7 @@ void BgGateShutter_Update(Actor* thisx, PlayState* play) {
BgGateShutter* this = (BgGateShutter*)thisx;
if (this->unk_178 != 0) {
this->unk_178 -= 1;
this->unk_178--;
}
this->actionFunc(this, play);
}

View file

@ -127,7 +127,7 @@ void func_8087BAE4(BgHaka* this, PlayState* play) {
s32 pad;
if (this->dyna.actor.params != 0) {
this->dyna.actor.params -= 1;
this->dyna.actor.params--;
}
if (this->dyna.unk_150 != 0.0f) {
this->dyna.unk_150 = 0.0f;

View file

@ -112,7 +112,7 @@ void func_80889B5C(BgHidanKousi* this, PlayState* play) {
}
void func_80889BC0(BgHidanKousi* this, PlayState* play) {
this->unk_168 -= 1;
this->unk_168--;
if (this->dyna.actor.category == func_8005B198() || (this->unk_168 <= 0)) {
BgHidanKousi_SetupAction(this, func_80889C18);
}

View file

@ -83,8 +83,8 @@ void func_80899894(BgJyaKanaami* this, PlayState* play) {
if (this->dyna.actor.world.pos.x > -1000.0f && this->unk_16A == 0) {
OnePointCutscene_Init(play, 3450, -99, &this->dyna.actor, CAM_ID_MAIN);
}
this->unk_16A += 1;
if (this->unk_16A >= 0xA) {
this->unk_16A++;
if (this->unk_16A >= 10) {
func_8089993C(this);
}
}

View file

@ -89,11 +89,11 @@ void BgMenkuriEye_Update(Actor* thisx, PlayState* play) {
if (!Flags_GetSwitch(play, this->actor.params)) {
if (this->framesUntilDisable != -1) {
if (this->framesUntilDisable != 0) {
this->framesUntilDisable -= 1;
this->framesUntilDisable--;
}
if (this->framesUntilDisable == 0) {
this->framesUntilDisable = -1;
D_8089C1A0 -= 1;
D_8089C1A0--;
}
}
}
@ -102,7 +102,7 @@ void BgMenkuriEye_Update(Actor* thisx, PlayState* play) {
this->collider.base.acFlags &= ~AC_HIT;
if (this->framesUntilDisable == -1) {
Actor_PlaySfx(&this->actor, NA_SE_EN_AMOS_DAMAGE);
D_8089C1A0 += 1;
D_8089C1A0++;
D_8089C1A0 = CLAMP_MAX(D_8089C1A0, 4);
}
this->framesUntilDisable = 416;

View file

@ -312,7 +312,7 @@ void func_808B5240(BgSpot16Bombstone* this, PlayState* play) {
func_800287AC(play, &position, &sVelocity, &sAcceleration, D_808B5EB0[index][4], D_808B5EB0[index][5],
D_808B5EB0[index][6]);
this->unk_158 += 1;
this->unk_158++;
}
}
@ -345,7 +345,7 @@ void BgSpot16Bombstone_SpawnFragments(BgSpot16Bombstone* this, PlayState* play)
EffectSsKakera_Spawn(play, &pos, &velocity, &this->actor.world.pos, -420, 0x31, 0xF, 0xF, 0, scale, 2, 0x40,
160, KAKERA_COLOR_NONE, OBJECT_BOMBIWA, object_bombiwa_DL_0009E0);
index += 1;
index++;
} while (index != ARRAY_COUNT(D_808B6074));
}
}

View file

@ -277,7 +277,7 @@ void BgSpot18Obj_Update(Actor* thisx, PlayState* play) {
BgSpot18Obj* this = (BgSpot18Obj*)thisx;
if (this->unk_168 > 0) {
this->unk_168 -= 1;
this->unk_168--;
}
this->actionFunc(this, play);
}

View file

@ -1476,7 +1476,7 @@ void BossFd_UpdateEffects(BossFd* this, PlayState* play) {
if ((this->timers[3] == 0) && (sqrtf(SQ(diff.x) + SQ(diff.y) + SQ(diff.z)) < 20.0f)) {
this->timers[3] = 50;
func_8002F6D4(play, NULL, 5.0f, effect->kbAngle, 0.0f, 0x30);
if (player->isBurning == false) {
if (!player->isBurning) {
for (i2 = 0; i2 < PLAYER_BODYPART_MAX; i2++) {
player->flameTimers[i2] = Rand_S16Offset(0, 200);
}

View file

@ -2820,23 +2820,9 @@ void BossVa_Update(Actor* thisx, PlayState* play2) {
BossVa_UpdateEffects(play);
for (i = 2; i >= 0; i--) {
if ((play->envCtx.adjAmbientColor[i] - 1) > 0) {
play->envCtx.adjAmbientColor[i] -= 1;
} else {
play->envCtx.adjAmbientColor[i] = 0;
}
if ((play->envCtx.adjLight1Color[i] - 10) > 0) {
play->envCtx.adjLight1Color[i] -= 10;
} else {
play->envCtx.adjLight1Color[i] = 0;
}
if ((play->envCtx.adjFogColor[i] - 10) > 0) {
play->envCtx.adjFogColor[i] -= 10;
} else {
play->envCtx.adjFogColor[i] = 0;
}
play->envCtx.adjAmbientColor[i] = MAX(play->envCtx.adjAmbientColor[i] - 1, 0);
play->envCtx.adjLight1Color[i] = MAX(play->envCtx.adjLight1Color[i] - 10, 0);
play->envCtx.adjFogColor[i] = MAX(play->envCtx.adjFogColor[i] - 10, 0);
}
if (this->onCeiling > 0) {

View file

@ -1036,7 +1036,7 @@ void DemoEffect_UpdateLightEffect(DemoEffect* this, PlayState* play) {
}
}
this->light.rotation += 6;
this->light.scaleFlag += 1;
this->light.scaleFlag++;
break;
case 3:

View file

@ -591,7 +591,7 @@ void DoorShutter_Idle(DoorShutter* this, PlayState* play) {
if (this->unlockTimer != 0) {
Flags_SetSwitch(play, DOORSHUTTER_GET_SWITCH_FLAG(&this->dyna.actor));
if (this->doorType != SHUTTER_BOSS) {
gSaveContext.inventory.dungeonKeys[gSaveContext.mapIndex]--;
gSaveContext.inventory.dungeonKeys[gSaveContext.mapIndex] -= 1;
Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_CHAIN_KEY_UNLOCK);
} else {
Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_CHAIN_KEY_UNLOCK_B);

View file

@ -212,7 +212,7 @@ void EfcErupc_UpdateEffects(EfcErupc* this, PlayState* play) {
cur->vel.x += cur->accel.x;
cur->vel.y += cur->accel.y;
cur->vel.z += cur->accel.z;
cur->animTimer += 1;
cur->animTimer++;
index = cur->animTimer % 4;
color = &effectColors[index];
cur->color.r = color->r;

View file

@ -136,7 +136,7 @@ void EffDust_UpdateFunc_8099DB28(EffDust* this, PlayState* play) {
this->initialPositions[i].y = -800.0f * Math_SinS(theta);
this->initialPositions[i].z = -800.0f * Math_SinS(fi) * Math_CosS(theta);
this->distanceTraveled[i] = 0.0f;
this->index += 1;
this->index++;
}
}
}
@ -165,7 +165,7 @@ void EffDust_UpdateFunc_8099DD74(EffDust* this, PlayState* play) {
this->initialPositions[i].y = 400.0f * Math_SinS(theta);
this->initialPositions[i].z = 400.0f * Math_SinS(fi) * Math_CosS(theta);
this->distanceTraveled[i] = 0.0f;
this->index += 1;
this->index++;
}
}
}
@ -180,7 +180,7 @@ void EffDust_UpdateFunc_8099DFC0(EffDust* this, PlayState* play) {
if (parent == NULL || parent->update == NULL || !(player->stateFlags1 & PLAYER_STATE1_12)) {
if (this->life != 0) {
this->life -= 1;
this->life--;
} else {
Actor_Kill(&this->actor);
}
@ -248,7 +248,7 @@ void EffDust_UpdateFunc_8099DFC0(EffDust* this, PlayState* play) {
}
this->distanceTraveled[i] = 0.0f;
this->index += 1;
this->index++;
}
}
}

View file

@ -160,7 +160,7 @@ void EnCow_Destroy(Actor* thisx, PlayState* play) {
void func_809DF494(EnCow* this, PlayState* play) {
if (this->unk_278 > 0) {
this->unk_278 -= 1;
this->unk_278--;
} else {
this->unk_278 = Rand_ZeroFloat(500.0f) + 40.0f;
Animation_Change(&this->skelAnime, &gCowBodyChewAnim, 1.0f, this->skelAnime.curFrame,
@ -174,8 +174,8 @@ void func_809DF494(EnCow* this, PlayState* play) {
}
}
this->unk_27A += 1;
if (this->unk_27A >= 0x31) {
this->unk_27A++;
if (this->unk_27A > 48) {
this->unk_27A = 0;
}

View file

@ -164,7 +164,7 @@ void EnDaiku_Init(Actor* thisx, PlayState* play) {
if (isFree == true && play->sceneId == SCENE_THIEVES_HIDEOUT) {
noKill = false;
} else if (isFree == false && play->sceneId == SCENE_CARPENTERS_TENT) {
} else if (!isFree && play->sceneId == SCENE_CARPENTERS_TENT) {
noKill = false;
}

View file

@ -369,7 +369,7 @@ void EnDaikuKakariko_Run(EnDaikuKakariko* this, PlayState* play) {
run = false;
if (runDist <= 10.0f) {
if (this->pathContinue == false) {
if (!this->pathContinue) {
this->waypoint++;
if (this->waypoint >= path->count) {
@ -416,7 +416,7 @@ void EnDaikuKakariko_Run(EnDaikuKakariko* this, PlayState* play) {
this->actor.world.rot.y = this->actor.shape.rot.y;
if (this->run == false) {
if (!this->run) {
if (angleStepDiff == 0) {
this->run = true;
} else {

View file

@ -226,7 +226,7 @@ void EnDoor_Idle(EnDoor* this, PlayState* play) {
Animation_PlayOnceSetSpeed(&this->skelAnime, sDoorAnims[this->openAnim],
(player->stateFlags1 & PLAYER_STATE1_27) ? 0.75f : 1.5f);
if (this->lockTimer != 0) {
gSaveContext.inventory.dungeonKeys[gSaveContext.mapIndex]--;
gSaveContext.inventory.dungeonKeys[gSaveContext.mapIndex] -= 1;
Flags_SetSwitch(play, ENDOOR_GET_LOCKED_SWITCH_FLAG(&this->actor));
Actor_PlaySfx(&this->actor, NA_SE_EV_CHAIN_KEY_UNLOCK);
}

View file

@ -104,7 +104,7 @@ void EnDs_TalkAfterBrewOddPotion(EnDs* this, PlayState* play) {
void EnDs_BrewOddPotion3(EnDs* this, PlayState* play) {
if (this->brewTimer > 0) {
this->brewTimer -= 1;
this->brewTimer--;
} else {
this->actionFunc = EnDs_TalkAfterBrewOddPotion;
Message_ContinueTextbox(play, 0x504D);
@ -116,7 +116,7 @@ void EnDs_BrewOddPotion3(EnDs* this, PlayState* play) {
void EnDs_BrewOddPotion2(EnDs* this, PlayState* play) {
if (this->brewTimer > 0) {
this->brewTimer -= 1;
this->brewTimer--;
} else {
this->actionFunc = EnDs_BrewOddPotion3;
this->brewTimer = 60;
@ -126,7 +126,7 @@ void EnDs_BrewOddPotion2(EnDs* this, PlayState* play) {
void EnDs_BrewOddPotion1(EnDs* this, PlayState* play) {
if (this->brewTimer > 0) {
this->brewTimer -= 1;
this->brewTimer--;
} else {
this->actionFunc = EnDs_BrewOddPotion2;
this->brewTimer = 20;

View file

@ -295,7 +295,7 @@ void EnExRuppy_WaitInGame(EnExRuppy* this, PlayState* play) {
}
void EnExRuppy_Kill(EnExRuppy* this, PlayState* play) {
this->invisible += 1;
this->invisible++;
this->invisible &= 1; // Net effect is this->invisible = !this->invisible;
if (this->timer == 0) {
Actor_Kill(&this->actor);

View file

@ -352,7 +352,7 @@ void EnFr_DivingIntoWater(EnFr* this, PlayState* play) {
vec.z = this->actor.world.pos.z;
EffectSsGSplash_Spawn(play, &vec, NULL, NULL, 1, 1);
if (this->isBelowWaterSurfaceCurrent == false) {
if (!this->isBelowWaterSurfaceCurrent) {
Actor_PlaySfx(&this->actor, NA_SE_EV_DIVE_INTO_WATER_L);
} else {
Actor_PlaySfx(&this->actor, NA_SE_EV_BOMB_DROP_WATER);
@ -594,7 +594,7 @@ s32 EnFr_SetupJumpingUp(EnFr* this, s32 frogIndex) {
EnFr* frog = sEnFrPointers.frogs[frogIndex];
u8 semitone;
if (frog != NULL && frog->isJumpingUp == false) {
if ((frog != NULL) && !frog->isJumpingUp) {
semitone = frog->growingScaleIndex == 3 ? sLargeFrogNotes[frogIndex] : sSmallFrogNotes[frogIndex];
if (this->songIndex == FROG_CHOIR_SONG) {
frog->isJumpingToFrogSong = true;
@ -756,7 +756,7 @@ void EnFr_ChildSong(EnFr* this, PlayState* play) {
void EnFr_ChildSongFirstTime(EnFr* this, PlayState* play) {
EnFr* frog = sEnFrPointers.frogs[sSongToFrog[this->songIndex]];
if (frog->isActive == false) {
if (!frog->isActive) {
this->actor.textId = 0x40A9;
EnFr_SetupReward(this, play, true);
}

View file

@ -685,7 +685,7 @@ void EnFz_Update(Actor* thisx, PlayState* play) {
Actor_SetFocus(&this->actor, 50.0f);
EnFz_ApplyDamage(this, play);
this->actionFunc(this, play);
if (this->isDespawning == false) {
if (!this->isDespawning) {
Collider_UpdateCylinder(&this->actor, &this->collider1);
Collider_UpdateCylinder(&this->actor, &this->collider2);
if (this->isFreezing) {

View file

@ -113,7 +113,7 @@ void func_80A5046C(EnGuest* this) {
if (this->unk_2CA != 0) {
this->unk_2CA--;
} else {
this->unk_30E += 1;
this->unk_30E++;
if (this->unk_30E >= 3) {
this->unk_30E = 0;
this->unk_30D = 0;

View file

@ -215,9 +215,9 @@ void EnHeishi3_Update(Actor* thisx, PlayState* play) {
s32 pad;
Actor_SetFocus(&this->actor, 60.0f);
this->unk_274 += 1;
this->unk_274++;
if (this->caughtTimer != 0) {
this->caughtTimer -= 1;
this->caughtTimer--;
}
this->actionFunc(this, play);
this->actor.shape.rot = this->actor.world.rot;

View file

@ -355,7 +355,7 @@ void EnHeishi4_Update(Actor* thisx, PlayState* play) {
this->headRot = this->interactInfo.headRot;
this->torsoRot = this->interactInfo.torsoRot;
}
this->unk_27E += 1;
this->unk_27E++;
this->actionFunc(this, play);
Actor_MoveXZGravity(thisx);
Actor_UpdateBgCheckInfo(play, thisx, 10.0f, 10.0f, 30.0f,

View file

@ -1366,7 +1366,7 @@ void EnHorse_MountedGallop(EnHorse* this, PlayState* play) {
if (this->noInputTimer <= 0.0f) {
EnHorse_UpdateSpeed(this, play, 0.3f, -0.5f, 10.0f, 0.06f, 8.0f, 0x190);
} else if (this->noInputTimer > 0.0f) {
this->noInputTimer -= 1;
this->noInputTimer--;
this->actor.speed = 8.0f;
}
if (this->actor.speed < 6.0f) {
@ -3033,7 +3033,7 @@ void EnHorse_MountDismount(EnHorse* this, PlayState* play) {
Actor_SetRideActor(play, &this->actor, mountSide);
}
if (this->playerControlled == false && Actor_IsMounted(play, &this->actor) == true) {
if (!this->playerControlled && Actor_IsMounted(play, &this->actor) == true) {
this->noInputTimer = 55;
this->noInputTimerMax = 55;
this->playerControlled = 1;
@ -3205,8 +3205,8 @@ void EnHorse_UpdateBgCheckInfo(EnHorse* this, PlayState* play) {
}
// too close to jump
if ((movingFast == false && intersectDist < 80.0f) || (movingFast == true && intersectDist < 150.0f)) {
if (movingFast == false) {
if ((!movingFast && intersectDist < 80.0f) || (movingFast == true && intersectDist < 150.0f)) {
if (!movingFast) {
this->stateFlags |= ENHORSE_FORCE_REVERSING;
} else if (movingFast == true) {
this->stateFlags |= ENHORSE_FORCE_REVERSING;
@ -3218,7 +3218,7 @@ void EnHorse_UpdateBgCheckInfo(EnHorse* this, PlayState* play) {
dynaPoly = DynaPoly_GetActor(&play->colCtx, bgId);
if ((this->stateFlags & ENHORSE_FLAG_26) &&
((dynaPoly && dynaPoly->actor.id != ACTOR_BG_UMAJUMP) || dynaPoly == NULL)) {
if (movingFast == false) {
if (!movingFast) {
this->stateFlags |= ENHORSE_FORCE_REVERSING;
} else if (movingFast == true) {
this->stateFlags |= ENHORSE_FORCE_REVERSING;
@ -3275,7 +3275,7 @@ void EnHorse_UpdateBgCheckInfo(EnHorse* this, PlayState* play) {
obstaclePos = startPos;
obstaclePos.y = this->actor.world.pos.y + 120.0f;
if (movingFast == false) {
if (!movingFast) {
obstaclePos.x += (276.0f * Math_SinS(this->actor.world.rot.y));
obstaclePos.z += (276.0f * Math_CosS(this->actor.world.rot.y));
} else {
@ -3308,7 +3308,7 @@ void EnHorse_UpdateBgCheckInfo(EnHorse* this, PlayState* play) {
this->stateFlags |= ENHORSE_FORCE_REVERSING;
EnHorse_StartBraking(this, play);
}
} else if (movingFast == false && obstacleHeight > 19.0f && obstacleHeight <= 40.0f) {
} else if (!movingFast && obstacleHeight > 19.0f && obstacleHeight <= 40.0f) {
EnHorse_Stub1(this);
this->postDrawFunc = EnHorse_LowJumpInit;
} else if ((movingFast == true && this->actor.speed < 13.8f && obstacleHeight > 19.0f && obstacleHeight <= 72.0f) ||

View file

@ -120,7 +120,7 @@ void func_80A686A8(EnHorseGanon* this, PlayState* play) {
func_80A68660(D_80A69248, this->unk_1EC, &vec);
if (Math3D_Vec3f_DistXYZ(&vec, &this->actor.world.pos) <= 400.0f) {
this->unk_1EC += 1;
this->unk_1EC++;
if (this->unk_1EC >= 14) {
this->unk_1EC = 0;
func_80A68660(D_80A69248, 0, &vec);

View file

@ -180,7 +180,7 @@ s16 EnKz_UpdateTalkState(PlayState* play, Actor* thisx) {
void EnKz_UpdateEyes(EnKz* this) {
if (DECR(this->blinkTimer) == 0) {
this->eyeIdx += 1;
this->eyeIdx++;
if (this->eyeIdx >= 3) {
this->blinkTimer = Rand_S16Offset(30, 30);
this->eyeIdx = 0;

View file

@ -211,7 +211,7 @@ s32 func_80AA08C4(EnMa1* this, PlayState* play) {
void EnMa1_UpdateEyes(EnMa1* this) {
if (DECR(this->blinkTimer) == 0) {
this->eyeIndex += 1;
this->eyeIndex++;
if (this->eyeIndex >= 3) {
this->blinkTimer = Rand_S16Offset(30, 30);
this->eyeIndex = 0;

View file

@ -175,7 +175,7 @@ s32 func_80AA1C68(EnMa2* this) {
void EnMa2_UpdateEyes(EnMa2* this) {
if ((!func_80AA1C68(this)) && (DECR(this->blinkTimer) == 0)) {
this->eyeIndex += 1;
this->eyeIndex++;
if (this->eyeIndex >= 3) {
this->blinkTimer = Rand_S16Offset(30, 30);
this->eyeIndex = 0;

View file

@ -229,7 +229,7 @@ s32 func_80AA2F28(EnMa3* this) {
void EnMa3_UpdateEyes(EnMa3* this) {
if ((!func_80AA2F28(this)) && (DECR(this->blinkTimer) == 0)) {
this->eyeIndex += 1;
this->eyeIndex++;
if (this->eyeIndex >= 3) {
this->blinkTimer = Rand_S16Offset(30, 30);
this->eyeIndex = 0;

View file

@ -308,7 +308,7 @@ void EnMb_Init(Actor* thisx, PlayState* play) {
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawFeet, 90.0f);
this->actor.flags &= ~ACTOR_FLAG_0;
this->actor.naviEnemyId += 1; // NAVI_ENEMY_MOBLIN_CLUB
this->actor.naviEnemyId += NAVI_ENEMY_MOBLIN_CLUB - NAVI_ENEMY_MOBLIN;
EnMb_SetupClubWaitPlayerNear(this);
break;
default: /* Spear Patrol */

View file

@ -161,7 +161,7 @@ void EnMs_Update(Actor* thisx, PlayState* play) {
EnMs* this = (EnMs*)thisx;
s32 pad;
this->activeTimer += 1;
this->activeTimer++;
Actor_SetFocus(&this->actor, 20.0f);
this->actor.targetArrowOffset = 500.0f;
Actor_SetScale(&this->actor, 0.015f);

View file

@ -230,7 +230,7 @@ void EnNy_Move(EnNy* this, PlayState* play) {
func_80ABCD40(this);
stoneTimer = this->stoneTimer;
this->stoneTimer--;
if ((stoneTimer <= 0) || (this->hitPlayer != false)) {
if ((stoneTimer <= 0) || this->hitPlayer) {
EnNy_SetupTurnToStone(this);
} else {
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 0xA, this->unk_1F4, 0);

View file

@ -1248,7 +1248,7 @@ void EnSkj_Appear(EnSkj* this) {
void EnSkj_OcarinaGameIdle(EnSkj* this, PlayState* play) {
EnSkj_Appear(this);
if ((EnSkj_IsLeavingGame(this) == false) && (this->minigameState != 0)) {
if (!EnSkj_IsLeavingGame(this) && (this->minigameState != 0)) {
EnSkj_SetupPlayOcarinaGame(this);
}
}

View file

@ -111,7 +111,7 @@ void func_80B11A94(EnSyatekiNiw* this, PlayState* play, s16 arg2) {
this->unk_264 = -10000.0f;
}
this->unk_28E += 1;
this->unk_28E++;
this->unk_254 = 3;
if (!(this->unk_28E & 1)) {
this->unk_264 = 0.0f;

View file

@ -196,7 +196,7 @@ void EnTite_Init(Actor* thisx, PlayState* play) {
if (this->actor.params == TEKTITE_BLUE) {
this->unk_2DC |= UPDBGCHECKINFO_FLAG_6; // Don't use the actor engine's ripple spawning code
thisx->colChkInfo.health = 4;
thisx->naviEnemyId += 1; // NAVI_ENEMY_BLUE_TEKTITE
thisx->naviEnemyId += NAVI_ENEMY_BLUE_TEKTITE - NAVI_ENEMY_RED_TEKTITE;
}
EnTite_SetupIdle(this);
}

View file

@ -1904,7 +1904,7 @@ void func_80B57AE0(EnZl3* this, PlayState* play) {
f32 zDiff;
this->unk_344 = 0;
this->unk_314 += 1;
this->unk_314++;
this->unk_360 = 0.0f;
this->unk_364 = 0.0f;
this->unk_368 = 0.0f;
@ -1947,7 +1947,7 @@ void func_80B57CB4(EnZl3* this, PlayState* play) {
Vec3f* thisPos = &this->actor.world.pos;
f32 temp_f0;
this->unk_344 += 1;
this->unk_344++;
temp_f0 = Environment_LerpWeightAccelDecel(this->unk_346, 0, this->unk_344, 3, 3);
thisPos->x = unk_348->x + (temp_f0 * (unk_354->x - unk_348->x));
thisPos->y = (unk_348->y + (temp_f0 * (unk_354->y - unk_348->y))) + this->unk_360;
@ -2002,7 +2002,7 @@ void func_80B57F1C(EnZl3* this, PlayState* play) {
if (func_80B57D80(this, play) == 0) {
func_80B54E14(this, &gZelda2Anime2Anim_009BE4, 0, -8.0f, 0);
this->action = 34;
this->unk_314 -= 1;
this->unk_314--;
func_80B57AE0(this, play);
}
}
@ -2248,7 +2248,7 @@ void func_80B58C08(EnZl3* this, PlayState* play) {
s32 sp28;
f32 temp_f0;
this->unk_344 += 1;
this->unk_344++;
unk_344 = this->unk_344;
unk_346 = this->unk_346;

View file

@ -81,7 +81,7 @@ void EffectSsExtra_Draw(PlayState* play, u32 index, EffectSs* this) {
void EffectSsExtra_Update(PlayState* play, u32 index, EffectSs* this) {
if (this->rTimer != 0) {
this->rTimer -= 1;
this->rTimer--;
} else {
this->velocity.y = 0.0f;
}

View file

@ -379,7 +379,7 @@ void func_809AA230(EffectSs* this, PlayState* play) {
this->velocity.z *= func_809A9818(0.9f, 0.2f);
if (this->rReg8 > 0) {
this->rReg8 -= 1;
this->rReg8--;
}
}
}

View file

@ -1640,7 +1640,7 @@ void FileSelect_Main(GameState* thisx) {
if (this->stickAdjY < -30) {
if (this->stickYDir == -1) {
this->inputTimerY -= 1;
this->inputTimerY--;
if (this->inputTimerY < 0) {
this->inputTimerY = 2;
} else {
@ -1652,7 +1652,7 @@ void FileSelect_Main(GameState* thisx) {
}
} else if (this->stickAdjY > 30) {
if (this->stickYDir == 1) {
this->inputTimerY -= 1;
this->inputTimerY--;
if (this->inputTimerY < 0) {
this->inputTimerY = 2;
} else {

View file

@ -79,7 +79,7 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
OPEN_DISPS(gfxCtx, "../z_kaleido_collect.c", 248);
if ((!pauseCtx->unk_1E4 || (pauseCtx->unk_1E4 == 5) || (pauseCtx->unk_1E4 == 8)) &&
if ((((u32)pauseCtx->unk_1E4 == 0) || (pauseCtx->unk_1E4 == 5) || (pauseCtx->unk_1E4 == 8)) &&
(pauseCtx->pageIndex == PAUSE_QUEST)) {
pauseCtx->cursorColorSet = 0;

View file

@ -172,7 +172,7 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
while (cursorMoveResult == 0) {
if (pauseCtx->stickAdjX < -30) {
if (pauseCtx->cursorX[PAUSE_EQUIP] != 0) {
pauseCtx->cursorX[PAUSE_EQUIP] -= 1;
pauseCtx->cursorX[PAUSE_EQUIP]--;
pauseCtx->cursorPoint[PAUSE_EQUIP] -= 1;
if (pauseCtx->cursorX[PAUSE_EQUIP] == 0) {
@ -192,7 +192,7 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
}
} else {
pauseCtx->cursorX[PAUSE_EQUIP] = cursorX;
pauseCtx->cursorY[PAUSE_EQUIP] += 1;
pauseCtx->cursorY[PAUSE_EQUIP]++;
if (pauseCtx->cursorY[PAUSE_EQUIP] >= 4) {
pauseCtx->cursorY[PAUSE_EQUIP] = 0;
@ -214,7 +214,7 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
}
} else if (pauseCtx->stickAdjX > 30) {
if (pauseCtx->cursorX[PAUSE_EQUIP] < 3) {
pauseCtx->cursorX[PAUSE_EQUIP] += 1;
pauseCtx->cursorX[PAUSE_EQUIP]++;
pauseCtx->cursorPoint[PAUSE_EQUIP] += 1;
if (pauseCtx->cursorX[PAUSE_EQUIP] == 0) {
@ -228,7 +228,7 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
}
} else {
pauseCtx->cursorX[PAUSE_EQUIP] = cursorX;
pauseCtx->cursorY[PAUSE_EQUIP] += 1;
pauseCtx->cursorY[PAUSE_EQUIP]++;
if (pauseCtx->cursorY[PAUSE_EQUIP] >= 4) {
pauseCtx->cursorY[PAUSE_EQUIP] = 0;
@ -262,7 +262,7 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
while (cursorMoveResult == 0) {
if (pauseCtx->stickAdjY > 30) {
if (pauseCtx->cursorY[PAUSE_EQUIP] != 0) {
pauseCtx->cursorY[PAUSE_EQUIP] -= 1;
pauseCtx->cursorY[PAUSE_EQUIP]--;
pauseCtx->cursorPoint[PAUSE_EQUIP] -= 4;
if (pauseCtx->cursorX[PAUSE_EQUIP] == 0) {
@ -284,7 +284,7 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
}
} else if (pauseCtx->stickAdjY < -30) {
if (pauseCtx->cursorY[PAUSE_EQUIP] < 3) {
pauseCtx->cursorY[PAUSE_EQUIP] += 1;
pauseCtx->cursorY[PAUSE_EQUIP]++;
pauseCtx->cursorPoint[PAUSE_EQUIP] += 4;
if (pauseCtx->cursorX[PAUSE_EQUIP] == 0) {

View file

@ -131,7 +131,7 @@ void KaleidoScope_DrawItemSelect(PlayState* play) {
while (moveCursorResult == 0) {
if (pauseCtx->stickAdjX < -30) {
if (pauseCtx->cursorX[PAUSE_ITEM] != 0) {
pauseCtx->cursorX[PAUSE_ITEM] -= 1;
pauseCtx->cursorX[PAUSE_ITEM]--;
pauseCtx->cursorPoint[PAUSE_ITEM] -= 1;
if (gSaveContext.inventory.items[pauseCtx->cursorPoint[PAUSE_ITEM]] != ITEM_NONE) {
@ -139,7 +139,7 @@ void KaleidoScope_DrawItemSelect(PlayState* play) {
}
} else {
pauseCtx->cursorX[PAUSE_ITEM] = cursorX;
pauseCtx->cursorY[PAUSE_ITEM] += 1;
pauseCtx->cursorY[PAUSE_ITEM]++;
if (pauseCtx->cursorY[PAUSE_ITEM] >= 4) {
pauseCtx->cursorY[PAUSE_ITEM] = 0;
@ -163,7 +163,7 @@ void KaleidoScope_DrawItemSelect(PlayState* play) {
}
} else if (pauseCtx->stickAdjX > 30) {
if (pauseCtx->cursorX[PAUSE_ITEM] < 5) {
pauseCtx->cursorX[PAUSE_ITEM] += 1;
pauseCtx->cursorX[PAUSE_ITEM]++;
pauseCtx->cursorPoint[PAUSE_ITEM] += 1;
if (gSaveContext.inventory.items[pauseCtx->cursorPoint[PAUSE_ITEM]] != ITEM_NONE) {
@ -171,7 +171,7 @@ void KaleidoScope_DrawItemSelect(PlayState* play) {
}
} else {
pauseCtx->cursorX[PAUSE_ITEM] = cursorX;
pauseCtx->cursorY[PAUSE_ITEM] += 1;
pauseCtx->cursorY[PAUSE_ITEM]++;
if (pauseCtx->cursorY[PAUSE_ITEM] >= 4) {
pauseCtx->cursorY[PAUSE_ITEM] = 0;
@ -287,7 +287,7 @@ void KaleidoScope_DrawItemSelect(PlayState* play) {
while (moveCursorResult == 0) {
if (pauseCtx->stickAdjY > 30) {
if (pauseCtx->cursorY[PAUSE_ITEM] != 0) {
pauseCtx->cursorY[PAUSE_ITEM] -= 1;
pauseCtx->cursorY[PAUSE_ITEM]--;
pauseCtx->cursorPoint[PAUSE_ITEM] -= 6;
if (gSaveContext.inventory.items[pauseCtx->cursorPoint[PAUSE_ITEM]] != ITEM_NONE) {
@ -301,7 +301,7 @@ void KaleidoScope_DrawItemSelect(PlayState* play) {
}
} else if (pauseCtx->stickAdjY < -30) {
if (pauseCtx->cursorY[PAUSE_ITEM] < 3) {
pauseCtx->cursorY[PAUSE_ITEM] += 1;
pauseCtx->cursorY[PAUSE_ITEM]++;
pauseCtx->cursorPoint[PAUSE_ITEM] += 6;
if (gSaveContext.inventory.items[pauseCtx->cursorPoint[PAUSE_ITEM]] != ITEM_NONE) {

View file

@ -790,7 +790,7 @@ void KaleidoScope_DrawPages(PlayState* play, GraphicsContext* gfxCtx) {
gDPSetCombineMode(POLY_OPA_DISP++, G_CC_MODULATEIA, G_CC_MODULATEIA);
if (!pauseCtx->pageIndex) { // pageIndex == PAUSE_ITEM
if ((u32)pauseCtx->pageIndex == PAUSE_ITEM) {
pauseCtx->unk_1F4 = pauseCtx->unk_204 + 314.0f;
Matrix_Translate(0.0f, (f32)WREG(2) / 100.0f, -pauseCtx->unk_1F0 / 10.0f, MTXMODE_NEW);
@ -1120,11 +1120,11 @@ void KaleidoScope_DrawInfoPanel(PlayState* play) {
gDPSetEnvColor(POLY_OPA_DISP++, 20, 30, 40, 0);
if ((pauseCtx->state == 6) && (pauseCtx->namedItem != PAUSE_ITEM_NONE) && (pauseCtx->nameDisplayTimer < WREG(89)) &&
(!pauseCtx->unk_1E4 || (pauseCtx->unk_1E4 == 2) || ((pauseCtx->unk_1E4 >= 4) && (pauseCtx->unk_1E4 <= 7)) ||
(pauseCtx->unk_1E4 == 8)) &&
(((u32)pauseCtx->unk_1E4 == 0) || (pauseCtx->unk_1E4 == 2) ||
((pauseCtx->unk_1E4 >= 4) && (pauseCtx->unk_1E4 <= 7)) || (pauseCtx->unk_1E4 == 8)) &&
(pauseCtx->cursorSpecialPos == 0)) {
if (!pauseCtx->unk_1E4 || (pauseCtx->unk_1E4 == 2) || ((pauseCtx->unk_1E4 >= 4) && (pauseCtx->unk_1E4 <= 7)) ||
(pauseCtx->unk_1E4 == 8)) {
if (((u32)pauseCtx->unk_1E4 == 0) || (pauseCtx->unk_1E4 == 2) ||
((pauseCtx->unk_1E4 >= 4) && (pauseCtx->unk_1E4 <= 7)) || (pauseCtx->unk_1E4 == 8)) {
pauseCtx->infoPanelVtx[16].v.ob[0] = pauseCtx->infoPanelVtx[18].v.ob[0] = -63;
pauseCtx->infoPanelVtx[17].v.ob[0] = pauseCtx->infoPanelVtx[19].v.ob[0] =
@ -1243,7 +1243,7 @@ void KaleidoScope_DrawInfoPanel(PlayState* play) {
}
}
} else {
if (!pauseCtx->pageIndex) { // pageIndex == PAUSE_ITEM
if ((u32)pauseCtx->pageIndex == PAUSE_ITEM) {
pauseCtx->infoPanelVtx[16].v.ob[0] = pauseCtx->infoPanelVtx[18].v.ob[0] =
WREG(49 + gSaveContext.language);
@ -2504,7 +2504,7 @@ void KaleidoScope_Update(PlayState* play) {
(((pauseCtx->state >= 4) && (pauseCtx->state <= 7)) ||
((pauseCtx->state >= 0xA) && (pauseCtx->state <= 0x12)))) {
if ((!pauseCtx->unk_1E4 || (pauseCtx->unk_1E4 == 8)) && (pauseCtx->state == 6)) {
if ((((u32)pauseCtx->unk_1E4 == 0) || (pauseCtx->unk_1E4 == 8)) && (pauseCtx->state == 6)) {
pauseCtx->stickAdjX = input->rel.stick_x;
pauseCtx->stickAdjY = input->rel.stick_y;
KaleidoScope_UpdateCursorSize(play);