mirror of https://github.com/zeldaret/mm.git
Misc Cleanup (#1257)
* a lot of brackets, and some other things * oops * another bracket * check flag all * just a few more... * PR suggestions * PR comment * pr * one more bracket
This commit is contained in:
parent
a995e4cf61
commit
47bc7c12e2
|
|
@ -459,30 +459,6 @@ extern u8 D_801BDBC8;
|
|||
// extern UNK_TYPE1 D_801BE92C;
|
||||
// extern UNK_TYPE1 D_801BE944;
|
||||
// extern actor_init_var_func sInitChainHandlers[11];
|
||||
// extern UNK_TYPE2 sHeartsPrimColors;
|
||||
// extern UNK_TYPE2 D_801BE992;
|
||||
// extern UNK_TYPE2 D_801BE994;
|
||||
// extern UNK_TYPE2 sHeartsEnvColors;
|
||||
// extern UNK_TYPE2 D_801BE9A6;
|
||||
// extern UNK_TYPE2 D_801BE9A8;
|
||||
// extern UNK_TYPE2 sHeartsPrimFactors;
|
||||
// extern UNK_TYPE2 sHeartsEnvFactors;
|
||||
// extern UNK_TYPE2 sHeartsDDPrimColors;
|
||||
// extern UNK_TYPE2 D_801BE9E2;
|
||||
// extern UNK_TYPE2 D_801BE9E4;
|
||||
// extern UNK_TYPE2 sHeartsDDEnvColors;
|
||||
// extern UNK_TYPE2 D_801BE9F6;
|
||||
// extern UNK_TYPE2 D_801BE9F8;
|
||||
// extern UNK_TYPE2 sHeartsDDPrimFactors;
|
||||
// extern UNK_TYPE2 D_801BEA0A;
|
||||
// extern UNK_TYPE2 D_801BEA0C;
|
||||
// extern UNK_TYPE2 sHeartsDDEnvFactors;
|
||||
// extern UNK_TYPE2 D_801BEA1E;
|
||||
// extern UNK_TYPE2 D_801BEA20;
|
||||
// extern UNK_TYPE1 HeartTextures;
|
||||
// extern UNK_TYPE1 HeartDDTextures;
|
||||
//extern LightsPosBindFunc posBindFuncs[3];
|
||||
//extern LightsBindFunc dirBindFuncs[3];
|
||||
// extern UNK_TYPE4 D_801BEAD4;
|
||||
// extern UNK_TYPE4 D_801BEAD8;
|
||||
// extern UNK_TYPE1 D_801BEAE0;
|
||||
|
|
|
|||
|
|
@ -2543,8 +2543,8 @@ void AudioOcarina_CheckSongsWithoutMusicStaff(void) {
|
|||
if ((u32)sOcarinaAvailableSongFlags & (1 << songIndex)) {
|
||||
// Loops through all possible starting indices?
|
||||
// Loops through the notes of the song?
|
||||
for (j = 0, k = 0; j < gOcarinaSongButtons[songIndex].numButtons && k == 0 &&
|
||||
sOcarinaWithoutMusicStaffPos >= gOcarinaSongButtons[songIndex].numButtons;) {
|
||||
for (j = 0, k = 0; (j < gOcarinaSongButtons[songIndex].numButtons) && (k == 0) &&
|
||||
(sOcarinaWithoutMusicStaffPos >= gOcarinaSongButtons[songIndex].numButtons);) {
|
||||
|
||||
pitch = sCurOcarinaSongWithoutMusicStaff[(sOcarinaWithoutMusicStaffPos -
|
||||
gOcarinaSongButtons[songIndex].numButtons) +
|
||||
|
|
@ -2953,7 +2953,7 @@ void AudioOcarina_SetRecordingSong(u8 isRecordingComplete) {
|
|||
|
||||
i = sRecordSongPos;
|
||||
pitch = OCARINA_PITCH_NONE;
|
||||
while (i != 0 && pitch == OCARINA_PITCH_NONE) {
|
||||
while ((i != 0) && (pitch == OCARINA_PITCH_NONE)) {
|
||||
i--;
|
||||
pitch = recordedSong[i].pitch;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ void AudioEffects_SequenceChannelProcessSound(SequenceChannel* channel, s32 reca
|
|||
for (i = 0; i < ARRAY_COUNT(channel->layers); i++) {
|
||||
SequenceLayer* layer = channel->layers[i];
|
||||
|
||||
if (layer != NULL && layer->enabled && layer->note != NULL) {
|
||||
if ((layer != NULL) && layer->enabled && (layer->note != NULL)) {
|
||||
if (layer->notePropertiesNeedInit) {
|
||||
layer->noteFreqScale = layer->freqScale * chanFreqScale;
|
||||
layer->noteVelocity = layer->velocitySquare2 * channel->appliedVolume;
|
||||
|
|
|
|||
|
|
@ -1303,8 +1303,8 @@ void AudioHeap_DiscardSampleCacheEntry(SampleCacheEntry* entry) {
|
|||
sampleBankId1 = gAudioCtx.soundFontList[fontId].sampleBankId1;
|
||||
sampleBankId2 = gAudioCtx.soundFontList[fontId].sampleBankId2;
|
||||
if (((sampleBankId1 != 0xFF) && (entry->sampleBankId == sampleBankId1)) ||
|
||||
((sampleBankId2 != 0xFF) && (entry->sampleBankId == sampleBankId2)) || entry->sampleBankId == 0 ||
|
||||
entry->sampleBankId == 0xFE) {
|
||||
((sampleBankId2 != 0xFF) && (entry->sampleBankId == sampleBankId2)) || (entry->sampleBankId == 0) ||
|
||||
(entry->sampleBankId == 0xFE)) {
|
||||
if (AudioHeap_SearchCaches(FONT_TABLE, CACHE_EITHER, fontId) != NULL) {
|
||||
if (1) {}
|
||||
if (AudioLoad_IsFontLoadComplete(fontId) != 0) {
|
||||
|
|
@ -1369,7 +1369,7 @@ void AudioHeap_DiscardSampleCaches(void) {
|
|||
if ((sampleBankId1 == 0xFF) && (sampleBankId2 == 0xFF)) {
|
||||
continue;
|
||||
}
|
||||
if (AudioHeap_SearchCaches(FONT_TABLE, CACHE_PERMANENT, fontId) == NULL ||
|
||||
if ((AudioHeap_SearchCaches(FONT_TABLE, CACHE_PERMANENT, fontId) == NULL) ||
|
||||
!AudioLoad_IsFontLoadComplete(fontId)) {
|
||||
continue;
|
||||
}
|
||||
|
|
@ -1393,7 +1393,7 @@ typedef struct {
|
|||
} StorageChange;
|
||||
|
||||
void AudioHeap_ChangeStorage(StorageChange* change, Sample* sample) {
|
||||
if (sample != NULL && ((sample->medium == change->newMedium) || (D_801FD120 != 1)) &&
|
||||
if ((sample != NULL) && ((sample->medium == change->newMedium) || (D_801FD120 != 1)) &&
|
||||
((sample->medium == MEDIUM_RAM) || (D_801FD120 != 0))) {
|
||||
uintptr_t startAddr = change->oldAddr;
|
||||
uintptr_t endAddr = change->oldAddr + change->size;
|
||||
|
|
|
|||
|
|
@ -138,13 +138,13 @@ void* AudioLoad_DmaSampleData(uintptr_t devAddr, size_t size, s32 arg2, u8* dmaI
|
|||
s32 bufferPos;
|
||||
u32 i;
|
||||
|
||||
if (arg2 != 0 || *dmaIndexRef >= gAudioCtx.sampleDmaListSize1) {
|
||||
if ((arg2 != 0) || (*dmaIndexRef >= gAudioCtx.sampleDmaListSize1)) {
|
||||
for (i = gAudioCtx.sampleDmaListSize1; i < gAudioCtx.sampleDmaCount; i++) {
|
||||
dma = &gAudioCtx.sampleDmas[i];
|
||||
bufferPos = devAddr - dma->devAddr;
|
||||
if (0 <= bufferPos && ((u32)bufferPos <= dma->size - size)) {
|
||||
if ((0 <= bufferPos) && ((u32)bufferPos <= (dma->size - size))) {
|
||||
// We already have a DMA request for this memory range.
|
||||
if (dma->ttl == 0 && gAudioCtx.sampleDmaReuseQueue2RdPos != gAudioCtx.sampleDmaReuseQueue2WrPos) {
|
||||
if ((dma->ttl == 0) && (gAudioCtx.sampleDmaReuseQueue2RdPos != gAudioCtx.sampleDmaReuseQueue2WrPos)) {
|
||||
// Move the DMA out of the reuse queue, by swapping it with the
|
||||
// read pos, and then incrementing the read pos.
|
||||
if (dma->reuseIndex != gAudioCtx.sampleDmaReuseQueue2RdPos) {
|
||||
|
|
@ -1905,7 +1905,7 @@ void AudioLoad_RelocateFontAndPreloadSamples(s32 fontId, SoundFontData* fontData
|
|||
}
|
||||
gAudioCtx.numUsedSamples = 0;
|
||||
|
||||
if (gAudioCtx.preloadSampleStackTop != 0 && !preloadInProgress) {
|
||||
if ((gAudioCtx.preloadSampleStackTop != 0) && !preloadInProgress) {
|
||||
topPreload = &gAudioCtx.preloadSampleStack[gAudioCtx.preloadSampleStackTop - 1];
|
||||
sample = topPreload->sample;
|
||||
nChunks = (sample->size >> 12) + 1;
|
||||
|
|
@ -2160,7 +2160,7 @@ void AudioLoad_PreloadSamplesForFont(s32 fontId, s32 async, SampleBankRelocInfo*
|
|||
}
|
||||
gAudioCtx.numUsedSamples = 0;
|
||||
|
||||
if (gAudioCtx.preloadSampleStackTop != 0 && !preloadInProgress) {
|
||||
if ((gAudioCtx.preloadSampleStackTop != 0) && !preloadInProgress) {
|
||||
topPreload = &gAudioCtx.preloadSampleStack[gAudioCtx.preloadSampleStackTop - 1];
|
||||
sample = topPreload->sample;
|
||||
nChunks = (sample->size >> 12) + 1;
|
||||
|
|
|
|||
|
|
@ -597,7 +597,7 @@ s32 AudioPlayback_BuildSyntheticWave(Note* note, SequenceLayer* layer, s32 waveI
|
|||
}
|
||||
|
||||
freqScale = layer->freqScale;
|
||||
if (layer->portamento.mode != 0 && 0.0f < layer->portamento.extent) {
|
||||
if ((layer->portamento.mode != 0) && (0.0f < layer->portamento.extent)) {
|
||||
freqScale *= (layer->portamento.extent + 1.0f);
|
||||
}
|
||||
|
||||
|
|
@ -906,7 +906,7 @@ Note* AudioPlayback_AllocNoteFromActive(NotePool* pool, SequenceLayer* layer) {
|
|||
aPriority = aNote->playbackState.priority;
|
||||
}
|
||||
|
||||
if (rNote == NULL && aNote == NULL) {
|
||||
if ((rNote == NULL) && (aNote == NULL)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
@ -928,8 +928,8 @@ Note* AudioPlayback_AllocNote(SequenceLayer* layer) {
|
|||
|
||||
if (policy & 1) {
|
||||
note = layer->note;
|
||||
if (note != NULL && note->playbackState.prevParentLayer == layer &&
|
||||
note->playbackState.wantedParentLayer == NO_LAYER) {
|
||||
if ((note != NULL) && (note->playbackState.prevParentLayer == layer) &&
|
||||
(note->playbackState.wantedParentLayer == NO_LAYER)) {
|
||||
AudioPlayback_NoteReleaseAndTakeOwnership(note, layer);
|
||||
AudioPlayback_AudioListRemove(¬e->listItem);
|
||||
AudioScript_AudioListPushBack(¬e->listItem.pool->releasing, ¬e->listItem);
|
||||
|
|
|
|||
|
|
@ -275,7 +275,7 @@ void __osFree(Arena* arena, void* ptr) {
|
|||
|
||||
node = (ArenaNode*)((uintptr_t)ptr - sizeof(ArenaNode));
|
||||
|
||||
if (ptr != NULL && node->magic == NODE_MAGIC && !node->isFree) {
|
||||
if ((ptr != NULL) && (node->magic == NODE_MAGIC) && !node->isFree) {
|
||||
next = node->next;
|
||||
prev = node->prev;
|
||||
node->isFree = true;
|
||||
|
|
@ -297,7 +297,7 @@ void __osFree(Arena* arena, void* ptr) {
|
|||
|
||||
// Checks if the previous node is contiguous to the current node and if it isn't currently allocated. Then merge
|
||||
// the two nodes into one.
|
||||
if (prev != NULL && prev->isFree && (uintptr_t)node == (uintptr_t)prev + sizeof(ArenaNode) + prev->size) {
|
||||
if ((prev != NULL) && prev->isFree && ((uintptr_t)node == (uintptr_t)prev + sizeof(ArenaNode) + prev->size)) {
|
||||
if (next != NULL) {
|
||||
next->prev = prev;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ void* SystemHeap_RunBlockFunc8(void* blk, size_t nBlk, size_t blkSize, BlockFunc
|
|||
blk = SystemHeap_Malloc(nBlk * blkSize);
|
||||
}
|
||||
|
||||
if (blk != NULL && blockFunc != NULL) {
|
||||
if ((blk != NULL) && (blockFunc != NULL)) {
|
||||
uintptr_t pos = blk;
|
||||
|
||||
for (; pos < (uintptr_t)blk + (nBlk * blkSize); pos += (blkSize & ~0)) {
|
||||
|
|
|
|||
|
|
@ -403,7 +403,7 @@ void PreRender_ApplyAntiAliasingFilter(PreRender* this) {
|
|||
* Applies filters to the framebuffer prerender to make it look smoother
|
||||
*/
|
||||
void PreRender_ApplyFilters(PreRender* this) {
|
||||
if (this->cvgSave == NULL || this->fbufSave == NULL) {
|
||||
if ((this->cvgSave == NULL) || (this->fbufSave == NULL)) {
|
||||
this->unk_4D = 0;
|
||||
} else {
|
||||
this->unk_4D = 1;
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ u32 JpegUtils_ProcessHuffmanTableImpl(u8* data, JpegHuffmanTable* ht, u8* codesL
|
|||
s32 temp;
|
||||
|
||||
ret = count;
|
||||
if (count == 0 || (isAc && count > 0x100) || (!isAc && count > 0x10)) {
|
||||
if ((count == 0) || (isAc && (count > 0x100)) || (!isAc && (count > 0x10))) {
|
||||
return 0;
|
||||
}
|
||||
if (ret != JpegUtils_GetHuffmanCodes(codesLengths, codes)) {
|
||||
|
|
@ -141,7 +141,7 @@ u32 JpegUtils_ProcessHuffmanTableImplOld(u8* dht, JpegHuffmanTableOld* ht, u8* c
|
|||
|
||||
count2 = count = JpegUtils_ParseHuffmanCodesLengths(dht, codesLengths);
|
||||
|
||||
if (count == 0 || (isAc && count > 0x100) || (!isAc && count > 0x10)) {
|
||||
if ((count == 0) || (isAc && (count > 0x100)) || (!isAc && (count > 0x10))) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ void Sched_SwapFramebuffer(CfbInfo* cfbInfo) {
|
|||
osViSwapBuffer(cfbInfo->swapBuffer);
|
||||
cfbInfo->updateRate2 = cfbInfo->updateRate;
|
||||
|
||||
if (SREG(62) == 0 && cfbInfo->viMode != NULL) {
|
||||
if ((SREG(62) == 0) && (cfbInfo->viMode != NULL)) {
|
||||
D_80096B20 = one;
|
||||
osViSetMode(cfbInfo->viMode);
|
||||
osViSetSpecialFeatures(cfbInfo->features);
|
||||
|
|
@ -68,7 +68,7 @@ void Sched_HandleAudioCancel(SchedContext* sched) {
|
|||
// AUDIO SP Cancel
|
||||
osSyncPrintf("AUDIO SP キャンセルします\n");
|
||||
|
||||
if (sched->curRSPTask != NULL && sched->curRSPTask->list.t.type == M_AUDTASK) {
|
||||
if ((sched->curRSPTask != NULL) && (sched->curRSPTask->list.t.type == M_AUDTASK)) {
|
||||
if (!(HW_REG(SP_STATUS_REG, u32) & SP_STATUS_HALT)) {
|
||||
// Attempts to stop AUDIO SP
|
||||
osSyncPrintf("AUDIO SP止めようとします\n");
|
||||
|
|
@ -130,7 +130,7 @@ void Sched_HandleGfxCancel(SchedContext* sched) {
|
|||
// GRAPH SP Cancel
|
||||
osSyncPrintf("GRAPH SP キャンセルします\n");
|
||||
|
||||
if (sched->curRSPTask != NULL && sched->curRSPTask->list.t.type == M_GFXTASK) {
|
||||
if ((sched->curRSPTask != NULL) && (sched->curRSPTask->list.t.type == M_GFXTASK)) {
|
||||
if (!(HW_REG(SP_STATUS_REG, u32) & SP_STATUS_HALT)) {
|
||||
// GRAPH SP tries to stop
|
||||
osSyncPrintf("GRAPH SP止めようとします\n");
|
||||
|
|
@ -227,7 +227,8 @@ s32 Sched_TaskCheckFramebuffers(SchedContext* sched, OSScTask* task) {
|
|||
void* nextFB = osViGetNextFramebuffer();
|
||||
void* curFB = osViGetCurrentFramebuffer();
|
||||
|
||||
if (task == NULL || sched->pendingSwapBuf1 != NULL || (curFB == TASK_FRAMEBUFFER(task)->fb1 && curFB != nextFB)) {
|
||||
if ((task == NULL) || (sched->pendingSwapBuf1 != NULL) ||
|
||||
((curFB == TASK_FRAMEBUFFER(task)->fb1) && (curFB != nextFB))) {
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
|
|
@ -241,7 +242,7 @@ s32 Sched_Schedule(SchedContext* sched, OSScTask** spTask, OSScTask** dpTask, s3
|
|||
OSScTask* gfxTask = sched->gfxListHead;
|
||||
OSScTask* audioTask = sched->audioListHead;
|
||||
|
||||
if ((ret & OS_SC_SP) && sched->audioListHead != NULL) {
|
||||
if ((ret & OS_SC_SP) && (sched->audioListHead != NULL)) {
|
||||
*spTask = audioTask;
|
||||
ret &= ~OS_SC_SP;
|
||||
sched->audioListHead = sched->audioListHead->next;
|
||||
|
|
@ -249,7 +250,7 @@ s32 Sched_Schedule(SchedContext* sched, OSScTask** spTask, OSScTask** dpTask, s3
|
|||
sched->audioListTail = NULL;
|
||||
}
|
||||
} else if (gfxTask != NULL) {
|
||||
if (gfxTask->state & OS_SC_YIELDED || !(gfxTask->flags & OS_SC_NEEDS_RDP)) {
|
||||
if ((gfxTask->state & OS_SC_YIELDED) || !(gfxTask->flags & OS_SC_NEEDS_RDP)) {
|
||||
if (ret & OS_SC_SP) {
|
||||
*spTask = gfxTask;
|
||||
ret &= ~OS_SC_SP;
|
||||
|
|
@ -259,7 +260,7 @@ s32 Sched_Schedule(SchedContext* sched, OSScTask** spTask, OSScTask** dpTask, s3
|
|||
}
|
||||
}
|
||||
} else if (ret == (OS_SC_SP | OS_SC_DP)) {
|
||||
if (TASK_FRAMEBUFFER(gfxTask) == NULL || Sched_TaskCheckFramebuffers(sched, gfxTask)) {
|
||||
if ((TASK_FRAMEBUFFER(gfxTask) == NULL) || Sched_TaskCheckFramebuffers(sched, gfxTask)) {
|
||||
*spTask = *dpTask = gfxTask;
|
||||
ret &= ~(OS_SC_SP | OS_SC_DP);
|
||||
sched->gfxListHead = sched->gfxListHead->next;
|
||||
|
|
@ -275,7 +276,7 @@ s32 Sched_Schedule(SchedContext* sched, OSScTask** spTask, OSScTask** dpTask, s3
|
|||
void Sched_TaskUpdateFramebuffer(SchedContext* sched, OSScTask* task) {
|
||||
sched->pendingSwapBuf1 = TASK_FRAMEBUFFER(task);
|
||||
|
||||
if (sched->curBuf != NULL && sched->curBuf->updateRate2 > 0) {
|
||||
if ((sched->curBuf != NULL) && (sched->curBuf->updateRate2 > 0)) {
|
||||
return;
|
||||
}
|
||||
Sched_RetraceUpdateFramebuffer(sched, sched->pendingSwapBuf1);
|
||||
|
|
@ -314,7 +315,7 @@ void Sched_RunTask(SchedContext* sched, OSScTask* spTask, OSScTask* dpTask) {
|
|||
return;
|
||||
}
|
||||
// Write back the data cache to ensure imminent SP DMA does not miss anything
|
||||
if (spTask->list.t.type != M_AUDTASK && !(spTask->state & OS_SC_YIELDED)) {
|
||||
if ((spTask->list.t.type != M_AUDTASK) && !(spTask->state & OS_SC_YIELDED)) {
|
||||
osWritebackDCacheAll();
|
||||
}
|
||||
spTask->state &= ~(OS_SC_YIELD | OS_SC_YIELDED);
|
||||
|
|
@ -327,9 +328,11 @@ void Sched_RunTask(SchedContext* sched, OSScTask* spTask, OSScTask* dpTask) {
|
|||
case M_AUDTASK:
|
||||
sRSPAudioStartTime = time;
|
||||
break;
|
||||
|
||||
case M_GFXTASK:
|
||||
sRSPGFXStartTime = time;
|
||||
break;
|
||||
|
||||
default:
|
||||
if (1) {}
|
||||
sRSPOtherStartTime = time;
|
||||
|
|
@ -366,7 +369,7 @@ void Sched_HandleEntry(SchedContext* sched) {
|
|||
Sched_QueueTask(sched, msg);
|
||||
}
|
||||
// If there is an audio task pending and an RSP task is running, yield the current task.
|
||||
if (sched->audioListHead != NULL && sched->curRSPTask != NULL) {
|
||||
if ((sched->audioListHead != NULL) && (sched->curRSPTask != NULL)) {
|
||||
Sched_Yield(sched);
|
||||
return;
|
||||
}
|
||||
|
|
@ -421,9 +424,11 @@ void Sched_HandleRSPDone(SchedContext* sched) {
|
|||
case M_AUDTASK:
|
||||
gRSPAudioTotalTime += time - sRSPAudioStartTime;
|
||||
break;
|
||||
|
||||
case M_GFXTASK:
|
||||
sRSPGFXTotalTime += time - sRSPGFXStartTime;
|
||||
break;
|
||||
|
||||
default:
|
||||
if (1) {}
|
||||
sRSPOtherTotalTime += time - sRSPOtherStartTime;
|
||||
|
|
@ -555,15 +560,19 @@ void Sched_ThreadEntry(void* arg) {
|
|||
case RDP_AUDIO_CANCEL_MSG:
|
||||
Sched_HandleAudioCancel(sched);
|
||||
continue;
|
||||
|
||||
case RSP_GFX_CANCEL_MSG:
|
||||
Sched_HandleGfxCancel(sched);
|
||||
continue;
|
||||
|
||||
case ENTRY_MSG:
|
||||
Sched_HandleEntry(sched);
|
||||
continue;
|
||||
|
||||
case RSP_DONE_MSG:
|
||||
Sched_HandleRSPDone(sched);
|
||||
continue;
|
||||
|
||||
case RDP_DONE_MSG:
|
||||
Sched_HandleRDPDone(sched);
|
||||
continue;
|
||||
|
|
@ -573,9 +582,11 @@ void Sched_ThreadEntry(void* arg) {
|
|||
case OS_SC_RETRACE_MSG:
|
||||
Sched_HandleRetrace(sched);
|
||||
continue;
|
||||
|
||||
case OS_SC_PRE_NMI_MSG:
|
||||
Sched_HandleReset(sched);
|
||||
continue;
|
||||
|
||||
case OS_SC_NMI_MSG:
|
||||
Sched_HandleStop(sched);
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ void Overlay_FreeGameState(GameStateOverlay* overlayEntry) {
|
|||
s32 var_v0;
|
||||
|
||||
if (overlayEntry->loadedRamAddr != NULL) {
|
||||
var_v0 = overlayEntry->unk_28 != 0 ? -1 : 0;
|
||||
var_v0 = (overlayEntry->unk_28 != 0) ? -1 : 0;
|
||||
if (var_v0 == 0) {
|
||||
overlayEntry->unk_14 = (uintptr_t)(
|
||||
(overlayEntry->unk_14 != NULL)
|
||||
|
|
|
|||
|
|
@ -476,6 +476,7 @@ void Actor_DrawZTarget(TargetContext* targetCtx, PlayState* play) {
|
|||
Actor* actor = targetCtx->targetedActor;
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
if (targetCtx->unk48 != 0) {
|
||||
TargetContextEntry* entry;
|
||||
s16 alpha = 255;
|
||||
|
|
@ -598,10 +599,10 @@ void func_800B5814(TargetContext* targetCtx, Player* player, Actor* actor, GameS
|
|||
targetCtx->unk_94 = sp68;
|
||||
}
|
||||
|
||||
if (targetCtx->unk8C != 0) {
|
||||
if (targetCtx->unk8C != NULL) {
|
||||
sp68 = targetCtx->unk8C;
|
||||
targetCtx->unk8C = NULL;
|
||||
} else if (actor != 0) {
|
||||
} else if (actor != NULL) {
|
||||
sp68 = actor;
|
||||
}
|
||||
|
||||
|
|
@ -640,7 +641,7 @@ void func_800B5814(TargetContext* targetCtx, Player* player, Actor* actor, GameS
|
|||
Target_SetColors(targetCtx, sp68, category, play);
|
||||
}
|
||||
|
||||
if (actor != NULL && targetCtx->unk4B == 0) {
|
||||
if ((actor != NULL) && (targetCtx->unk4B == 0)) {
|
||||
Actor_GetProjectedPos(play, &actor->focus.pos, &projectedPos, &invW);
|
||||
if ((projectedPos.z <= 0.0f) || (fabsf(projectedPos.x * invW) >= 1.0f) ||
|
||||
(fabsf(projectedPos.y * invW) >= 1.0f)) {
|
||||
|
|
@ -2028,10 +2029,10 @@ s32 Actor_OfferGetItem(Actor* actor, PlayState* play, GetItemId getItemId, f32 x
|
|||
PLAYER_STATE1_80000 | PLAYER_STATE1_100000 | PLAYER_STATE1_200000)) &&
|
||||
(Player_GetExplosiveHeld(player) <= PLAYER_EXPLOSIVE_NONE)) {
|
||||
if ((actor->xzDistToPlayer <= xzRange) && (fabsf(actor->playerHeightRel) <= fabsf(yRange))) {
|
||||
if ((getItemId == GI_MASK_CIRCUS_LEADER || getItemId == GI_PENDANT_OF_MEMORIES ||
|
||||
getItemId == GI_DEED_LAND ||
|
||||
((player->heldActor != NULL || actor == player->talkActor) &&
|
||||
(getItemId > GI_NONE && getItemId < GI_MAX))) ||
|
||||
if (((getItemId == GI_MASK_CIRCUS_LEADER) || (getItemId == GI_PENDANT_OF_MEMORIES) ||
|
||||
(getItemId == GI_DEED_LAND) ||
|
||||
(((player->heldActor != NULL) || (actor == player->talkActor)) &&
|
||||
((getItemId > GI_NONE) && (getItemId < GI_MAX)))) ||
|
||||
!(player->stateFlags1 & (PLAYER_STATE1_800 | PLAYER_STATE1_20000000))) {
|
||||
s16 yawDiff = actor->yawTowardsPlayer - player->actor.shape.rot.y;
|
||||
s32 absYawDiff = ABS_ALT(yawDiff);
|
||||
|
|
@ -2386,12 +2387,12 @@ Actor* Actor_UpdateActor(UpdateActor_Params* params) {
|
|||
} else {
|
||||
if (!Object_IsLoaded(&play->objectCtx, actor->objBankIndex)) {
|
||||
Actor_Kill(actor);
|
||||
} else if (((params->requiredActorFlag) && !(actor->flags & params->requiredActorFlag)) ||
|
||||
((((!params->requiredActorFlag) != 0)) &&
|
||||
} else if ((params->requiredActorFlag && !(actor->flags & params->requiredActorFlag)) ||
|
||||
(((!params->requiredActorFlag) != 0) &&
|
||||
(!(actor->flags & ACTOR_FLAG_100000) ||
|
||||
((actor->category == ACTORCAT_EXPLOSIVES) && (params->player->stateFlags1 & PLAYER_STATE1_200))) &&
|
||||
params->canFreezeCategory && (actor != params->talkActor) &&
|
||||
((actor != params->player->heldActor)) && (actor->parent != ¶ms->player->actor))) {
|
||||
params->canFreezeCategory && (actor != params->talkActor) && (actor != params->player->heldActor) &&
|
||||
(actor->parent != ¶ms->player->actor))) {
|
||||
CollisionCheck_ResetDamage(&actor->colChkInfo);
|
||||
} else {
|
||||
Math_Vec3f_Copy(&actor->prevPos, &actor->world.pos);
|
||||
|
|
@ -3195,7 +3196,7 @@ Actor* Actor_SpawnAsChildAndCutscene(ActorContext* actorCtx, PlayState* play, s1
|
|||
}
|
||||
|
||||
overlayEntry = &gActorOverlayTable[index];
|
||||
if (overlayEntry->vramStart != 0) {
|
||||
if (overlayEntry->vramStart != NULL) {
|
||||
overlayEntry->numLoaded++;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7790,7 +7790,7 @@ s32 Camera_ChangeModeFlags(Camera* camera, s16 mode, u8 forceChange) {
|
|||
break;
|
||||
|
||||
case CAM_MODE_FOLLOWTARGET:
|
||||
if (camera->target != NULL && camera->target->id != ACTOR_EN_BOOM) {
|
||||
if ((camera->target != NULL) && (camera->target->id != ACTOR_EN_BOOM)) {
|
||||
sModeChangeFlags = CAM_CHANGE_MODE_FOLLOW_TARGET;
|
||||
}
|
||||
break;
|
||||
|
|
@ -7807,6 +7807,9 @@ s32 Camera_ChangeModeFlags(Camera* camera, s16 mode, u8 forceChange) {
|
|||
case CAM_MODE_HANG:
|
||||
sModeChangeFlags = CAM_CHANGE_MODE_4;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// Process Current Camera Mode
|
||||
|
|
|
|||
|
|
@ -92,7 +92,8 @@ f32 CollisionCheck_ApplyBumperDefense(f32 damage, ColliderInfo* ac) {
|
|||
* factors such as the ac collider's defense.
|
||||
*/
|
||||
s32 CollisionCheck_GetToucherDamage(Collider* at, ColliderInfo* atInfo, Collider* ac, ColliderInfo* acInfo) {
|
||||
if (at->actor != NULL && at->actor->id == ACTOR_EN_BOM && ac->actor != NULL && ac->actor->id == ACTOR_PLAYER) {
|
||||
if ((at->actor != NULL) && (at->actor->id == ACTOR_EN_BOM) && (ac->actor != NULL) &&
|
||||
(ac->actor->id == ACTOR_PLAYER)) {
|
||||
return 8;
|
||||
}
|
||||
return atInfo->toucher.damage;
|
||||
|
|
@ -1153,7 +1154,7 @@ s32 CollisionCheck_SetAT(PlayState* play, CollisionCheckContext* colCtxt, Collid
|
|||
}
|
||||
sATResetFuncs[collider->shape](play, collider);
|
||||
|
||||
if (collider->actor != NULL && collider->actor->update == NULL) {
|
||||
if ((collider->actor != NULL) && (collider->actor->update == NULL)) {
|
||||
return -1;
|
||||
}
|
||||
if (colCtxt->colATCount >= ARRAY_COUNT(colCtxt->colAT)) {
|
||||
|
|
@ -1179,7 +1180,7 @@ s32 CollisionCheck_SetAT_SAC(PlayState* play, CollisionCheckContext* colCtxt, Co
|
|||
}
|
||||
sATResetFuncs[collider->shape](play, collider);
|
||||
|
||||
if (collider->actor != NULL && collider->actor->update == NULL) {
|
||||
if ((collider->actor != NULL) && (collider->actor->update == NULL)) {
|
||||
return -1;
|
||||
}
|
||||
if (colCtxt->sacFlags & SAC_ON) {
|
||||
|
|
@ -1213,7 +1214,7 @@ s32 CollisionCheck_SetAC(PlayState* play, CollisionCheckContext* colCtxt, Collid
|
|||
}
|
||||
sACResetFuncs[collider->shape](play, collider);
|
||||
|
||||
if (collider->actor != NULL && collider->actor->update == NULL) {
|
||||
if ((collider->actor != NULL) && (collider->actor->update == NULL)) {
|
||||
return -1;
|
||||
}
|
||||
if (colCtxt->colACCount >= ARRAY_COUNT(colCtxt->colAC)) {
|
||||
|
|
@ -1239,7 +1240,7 @@ s32 CollisionCheck_SetAC_SAC(PlayState* play, CollisionCheckContext* colCtxt, Co
|
|||
}
|
||||
sACResetFuncs[collider->shape](play, collider);
|
||||
|
||||
if (collider->actor != NULL && collider->actor->update == NULL) {
|
||||
if ((collider->actor != NULL) && (collider->actor->update == NULL)) {
|
||||
return -1;
|
||||
}
|
||||
if (colCtxt->sacFlags & SAC_ON) {
|
||||
|
|
@ -1273,7 +1274,7 @@ s32 CollisionCheck_SetOC(PlayState* play, CollisionCheckContext* colCtxt, Collid
|
|||
}
|
||||
sOCResetFuncs[collider->shape](play, collider);
|
||||
|
||||
if (collider->actor != NULL && collider->actor->update == NULL) {
|
||||
if ((collider->actor != NULL) && (collider->actor->update == NULL)) {
|
||||
return -1;
|
||||
}
|
||||
if (colCtxt->colOCCount >= ARRAY_COUNT(colCtxt->colOC)) {
|
||||
|
|
@ -1299,7 +1300,7 @@ s32 CollisionCheck_SetOC_SAC(PlayState* play, CollisionCheckContext* colCtxt, Co
|
|||
}
|
||||
sOCResetFuncs[collider->shape](play, collider);
|
||||
|
||||
if (collider->actor != NULL && collider->actor->update == NULL) {
|
||||
if ((collider->actor != NULL) && (collider->actor->update == NULL)) {
|
||||
return -1;
|
||||
}
|
||||
if (colCtxt->sacFlags & SAC_ON) {
|
||||
|
|
@ -1523,7 +1524,7 @@ void CollisionCheck_RedBloodUnused(PlayState* play, Collider* collider, Vec3f* v
|
|||
void CollisionCheck_HitSolid(PlayState* play, ColliderInfo* info, Collider* collider, Vec3f* hitPos) {
|
||||
s32 flags = info->toucherFlags & TOUCH_SFX_NONE;
|
||||
|
||||
if (flags == TOUCH_SFX_NORMAL && collider->colType != COLTYPE_METAL) {
|
||||
if ((flags == TOUCH_SFX_NORMAL) && (collider->colType != COLTYPE_METAL)) {
|
||||
EffectSsHitmark_SpawnFixedScale(play, 0, hitPos);
|
||||
if (collider->actor == NULL) {
|
||||
play_sound(NA_SE_IT_SHIELD_BOUND);
|
||||
|
|
@ -1558,7 +1559,7 @@ void CollisionCheck_HitSolid(PlayState* play, ColliderInfo* info, Collider* coll
|
|||
* Plays a hit sound effect for AT colliders attached to Player based on the AC element's elemType.
|
||||
*/
|
||||
s32 CollisionCheck_SwordHitAudio(Collider* at, ColliderInfo* acInfo) {
|
||||
if (at->actor != NULL && at->actor->category == ACTORCAT_PLAYER) {
|
||||
if ((at->actor != NULL) && (at->actor->category == ACTORCAT_PLAYER)) {
|
||||
if (acInfo->elemType == ELEMTYPE_UNK0) {
|
||||
Audio_PlaySfxAtPos(&at->actor->projectedPos, NA_SE_IT_SWORD_STRIKE);
|
||||
} else if (acInfo->elemType == ELEMTYPE_UNK1) {
|
||||
|
|
@ -1652,7 +1653,7 @@ s32 CollisionCheck_SetATvsAC(PlayState* play, Collider* at, ColliderInfo* atInfo
|
|||
return 0;
|
||||
}
|
||||
}
|
||||
if ((ac->acFlags & AC_HARD) && at->actor != NULL && ac->actor != NULL) {
|
||||
if ((ac->acFlags & AC_HARD) && (at->actor != NULL) && (ac->actor != NULL)) {
|
||||
CollisionCheck_SetBounce(at, ac);
|
||||
}
|
||||
if (!(acInfo->bumperFlags & BUMP_NO_AT_INFO)) {
|
||||
|
|
@ -1683,8 +1684,8 @@ s32 CollisionCheck_SetATvsAC(PlayState* play, Collider* at, ColliderInfo* atInfo
|
|||
acInfo->bumper.hitPos.y = hitPos->y;
|
||||
acInfo->bumper.hitPos.z = hitPos->z;
|
||||
}
|
||||
if (!(atInfo->toucherFlags & TOUCH_AT_HITMARK) && ac->colType != COLTYPE_METAL && ac->colType != COLTYPE_WOOD &&
|
||||
ac->colType != COLTYPE_HARD) {
|
||||
if (!(atInfo->toucherFlags & TOUCH_AT_HITMARK) && (ac->colType != COLTYPE_METAL) && (ac->colType != COLTYPE_WOOD) &&
|
||||
(ac->colType != COLTYPE_HARD)) {
|
||||
acInfo->bumperFlags |= BUMP_DRAW_HITMARK;
|
||||
} else {
|
||||
CollisionCheck_HitEffects(play, at, atInfo, ac, acInfo, hitPos);
|
||||
|
|
@ -1719,7 +1720,7 @@ void CollisionCheck_AC_JntSphVsJntSph(PlayState* play, CollisionCheckContext* co
|
|||
f32 overlapSize;
|
||||
f32 centerDist;
|
||||
|
||||
if (at->count > 0 && at->elements != NULL && ac->count > 0 && ac->elements != NULL) {
|
||||
if ((at->count > 0) && (at->elements != NULL) && (ac->count > 0) && (ac->elements != NULL)) {
|
||||
for (atElem = at->elements; atElem < &at->elements[at->count]; atElem++) {
|
||||
if (CollisionCheck_SkipTouch(&atElem->info)) {
|
||||
continue;
|
||||
|
|
@ -1773,7 +1774,7 @@ void CollisionCheck_AC_JntSphVsCyl(PlayState* play, CollisionCheckContext* colCt
|
|||
f32 overlapSize;
|
||||
f32 centerDist;
|
||||
|
||||
if (at->count > 0 && at->elements != NULL && ac->dim.radius > 0 && ac->dim.height > 0) {
|
||||
if ((at->count > 0) && (at->elements != NULL) && (ac->dim.radius > 0) && (ac->dim.height > 0)) {
|
||||
if (CollisionCheck_SkipBump(&ac->info)) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -1822,7 +1823,7 @@ void CollisionCheck_AC_JntSphVsTris(PlayState* play, CollisionCheckContext* colC
|
|||
ColliderTrisElement* acElem;
|
||||
Vec3f hitPos;
|
||||
|
||||
if (at->count > 0 && at->elements != NULL && ac->count > 0 && ac->elements != NULL) {
|
||||
if ((at->count > 0) && (at->elements != NULL) && (ac->count > 0) && (ac->elements != NULL)) {
|
||||
for (atElem = at->elements; atElem < &at->elements[at->count]; atElem++) {
|
||||
if (CollisionCheck_SkipTouch(&atElem->info)) {
|
||||
continue;
|
||||
|
|
@ -1858,7 +1859,7 @@ void CollisionCheck_AC_JntSphVsQuad(PlayState* play, CollisionCheckContext* colC
|
|||
Vec3f hitPos;
|
||||
ColliderJntSphElement* sphElem;
|
||||
|
||||
if (at->count > 0 && at->elements != NULL) {
|
||||
if ((at->count > 0) && (at->elements != NULL)) {
|
||||
if (CollisionCheck_SkipBump(&ac->info)) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -1898,7 +1899,7 @@ void CollisionCheck_AC_JntSphVsSphere(PlayState* play, CollisionCheckContext* co
|
|||
f32 overlapSize;
|
||||
f32 centerDist;
|
||||
|
||||
if (at->count > 0 && at->elements != NULL) {
|
||||
if ((at->count > 0) && (at->elements != NULL)) {
|
||||
if (CollisionCheck_SkipBump(&ac->info)) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -1943,7 +1944,7 @@ void CollisionCheck_AC_CylVsJntSph(PlayState* play, CollisionCheckContext* colCt
|
|||
f32 centerDist;
|
||||
ColliderJntSphElement* sphElem;
|
||||
|
||||
if (ac->count > 0 && ac->elements != NULL && at->dim.radius > 0 && at->dim.height > 0) {
|
||||
if ((ac->count > 0) && (ac->elements != NULL) && (at->dim.radius > 0) && (at->dim.height > 0)) {
|
||||
if (CollisionCheck_SkipTouch(&at->info)) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -1994,7 +1995,7 @@ void CollisionCheck_AC_CylVsCyl(PlayState* play, CollisionCheckContext* colCtxt,
|
|||
f32 overlapSize;
|
||||
f32 centerDist;
|
||||
|
||||
if (at->dim.radius > 0 && at->dim.height > 0 && ac->dim.radius > 0 && ac->dim.height > 0) {
|
||||
if ((at->dim.radius > 0) && (at->dim.height > 0) && (ac->dim.radius > 0) && (ac->dim.height > 0)) {
|
||||
if (CollisionCheck_SkipBump(&ac->info)) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -2046,7 +2047,7 @@ void CollisionCheck_AC_CylVsTris(PlayState* play, CollisionCheckContext* colCtxt
|
|||
ColliderTrisElement* acElem;
|
||||
Vec3f hitPos;
|
||||
|
||||
if (at->dim.radius > 0 && at->dim.height > 0 && ac->count > 0 && ac->elements != NULL) {
|
||||
if ((at->dim.radius > 0) && (at->dim.height > 0) && (ac->count > 0) && (ac->elements != NULL)) {
|
||||
if (CollisionCheck_SkipTouch(&at->info)) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -2079,7 +2080,7 @@ void CollisionCheck_AC_CylVsQuad(PlayState* play, CollisionCheckContext* colCtxt
|
|||
ColliderCylinder* at = (ColliderCylinder*)colAT;
|
||||
ColliderQuad* ac = (ColliderQuad*)colAC;
|
||||
|
||||
if (at->dim.height > 0 && at->dim.radius > 0) {
|
||||
if ((at->dim.height > 0) && (at->dim.radius > 0)) {
|
||||
if (CollisionCheck_SkipTouch(&at->info)) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -2119,7 +2120,7 @@ void CollisionCheck_AC_CylVsSphere(PlayState* play, CollisionCheckContext* colCt
|
|||
f32 overlapSize;
|
||||
f32 centerDist;
|
||||
|
||||
if (at->dim.radius > 0 && at->dim.height > 0) {
|
||||
if ((at->dim.radius > 0) && (at->dim.height > 0)) {
|
||||
if (CollisionCheck_SkipTouch(&at->info)) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -2166,7 +2167,7 @@ void CollisionCheck_AC_TrisVsJntSph(PlayState* play, CollisionCheckContext* colC
|
|||
ColliderTrisElement* atElem;
|
||||
Vec3f hitPos;
|
||||
|
||||
if (ac->count > 0 && ac->elements != NULL && at->count > 0 && at->elements != NULL) {
|
||||
if ((ac->count > 0) && (ac->elements != NULL) && (at->count > 0) && (at->elements != NULL)) {
|
||||
for (acElem = ac->elements; acElem < &ac->elements[ac->count]; acElem++) {
|
||||
if (CollisionCheck_SkipBump(&acElem->info)) {
|
||||
continue;
|
||||
|
|
@ -2204,7 +2205,7 @@ void CollisionCheck_AC_TrisVsCyl(PlayState* play, CollisionCheckContext* colCtxt
|
|||
ColliderCylinder* ac = (ColliderCylinder*)colAC;
|
||||
ColliderTrisElement* atElem;
|
||||
|
||||
if (ac->dim.radius > 0 && ac->dim.height > 0 && at->count > 0 && at->elements != NULL) {
|
||||
if ((ac->dim.radius > 0) && (ac->dim.height > 0) && (at->count > 0) && (at->elements != NULL)) {
|
||||
if (CollisionCheck_SkipBump(&ac->info)) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -2238,7 +2239,7 @@ void CollisionCheck_AC_TrisVsTris(PlayState* play, CollisionCheckContext* colCtx
|
|||
ColliderTris* ac = (ColliderTris*)colAC;
|
||||
ColliderTrisElement* acElem;
|
||||
|
||||
if (ac->count > 0 && ac->elements != NULL && at->count > 0 && at->elements != NULL) {
|
||||
if ((ac->count > 0) && (ac->elements != NULL) && (at->count > 0) && (at->elements != NULL)) {
|
||||
for (acElem = ac->elements; acElem < &ac->elements[ac->count]; acElem++) {
|
||||
if (CollisionCheck_SkipBump(&acElem->info)) {
|
||||
continue;
|
||||
|
|
@ -2273,7 +2274,7 @@ void CollisionCheck_AC_TrisVsQuad(PlayState* play, CollisionCheckContext* colCtx
|
|||
ColliderQuad* ac = (ColliderQuad*)colAC;
|
||||
ColliderTrisElement* atElem;
|
||||
|
||||
if (at->count > 0 && at->elements != NULL) {
|
||||
if ((at->count > 0) && (at->elements != NULL)) {
|
||||
if (CollisionCheck_SkipBump(&ac->info)) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -2312,7 +2313,7 @@ void CollisionCheck_AC_TrisVsSphere(PlayState* play, CollisionCheckContext* colC
|
|||
ColliderSphere* ac = (ColliderSphere*)colAC;
|
||||
Vec3f hitPos;
|
||||
|
||||
if (at->count > 0 && at->elements != NULL) {
|
||||
if ((at->count > 0) && (at->elements != NULL)) {
|
||||
if (CollisionCheck_SkipBump(&ac->info)) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -2344,7 +2345,7 @@ void CollisionCheck_AC_QuadVsJntSph(PlayState* play, CollisionCheckContext* colC
|
|||
ColliderQuad* at = (ColliderQuad*)colAT;
|
||||
ColliderJntSph* ac = (ColliderJntSph*)colAC;
|
||||
|
||||
if (ac->count > 0 && ac->elements != NULL) {
|
||||
if ((ac->count > 0) && (ac->elements != NULL)) {
|
||||
if (CollisionCheck_SkipTouch(&at->info)) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -2385,7 +2386,7 @@ void CollisionCheck_AC_QuadVsCyl(PlayState* play, CollisionCheckContext* colCtxt
|
|||
ColliderQuad* at = (ColliderQuad*)colAT;
|
||||
ColliderCylinder* ac = (ColliderCylinder*)colAC;
|
||||
|
||||
if (ac->dim.height > 0 && ac->dim.radius > 0) {
|
||||
if ((ac->dim.height > 0) && (ac->dim.radius > 0)) {
|
||||
if (CollisionCheck_SkipBump(&ac->info)) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -2431,7 +2432,7 @@ void CollisionCheck_AC_QuadVsTris(PlayState* play, CollisionCheckContext* colCtx
|
|||
ColliderTris* ac = (ColliderTris*)colAC;
|
||||
ColliderTrisElement* acElem;
|
||||
|
||||
if (ac->count > 0 && ac->elements != NULL) {
|
||||
if ((ac->count > 0) && (ac->elements != NULL)) {
|
||||
if (CollisionCheck_SkipTouch(&at->info)) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -2546,7 +2547,7 @@ void CollisionCheck_AC_SphereVsJntSph(PlayState* play, CollisionCheckContext* co
|
|||
f32 overlapSize;
|
||||
f32 centerDist;
|
||||
|
||||
if (ac->count > 0 && ac->elements != NULL) {
|
||||
if ((ac->count > 0) && (ac->elements != NULL)) {
|
||||
if (CollisionCheck_SkipTouch(&at->info)) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -2739,7 +2740,7 @@ void CollisionCheck_SetJntSphHitFX(PlayState* play, CollisionCheckContext* colCt
|
|||
ColliderJntSphElement* element;
|
||||
|
||||
for (element = jntSph->elements; element < &jntSph->elements[jntSph->count]; element++) {
|
||||
if ((element->info.bumperFlags & BUMP_DRAW_HITMARK) && element->info.acHitInfo != NULL &&
|
||||
if ((element->info.bumperFlags & BUMP_DRAW_HITMARK) && (element->info.acHitInfo != NULL) &&
|
||||
!(element->info.acHitInfo->toucherFlags & TOUCH_DREW_HITMARK)) {
|
||||
Vec3f hitPos;
|
||||
|
||||
|
|
@ -2758,7 +2759,7 @@ void CollisionCheck_SetJntSphHitFX(PlayState* play, CollisionCheckContext* colCt
|
|||
void CollisionCheck_SetCylHitFX(PlayState* play, CollisionCheckContext* colCtxt, Collider* collider) {
|
||||
ColliderCylinder* cylinder = (ColliderCylinder*)collider;
|
||||
|
||||
if ((cylinder->info.bumperFlags & BUMP_DRAW_HITMARK) && cylinder->info.acHitInfo != NULL &&
|
||||
if ((cylinder->info.bumperFlags & BUMP_DRAW_HITMARK) && (cylinder->info.acHitInfo != NULL) &&
|
||||
!(cylinder->info.acHitInfo->toucherFlags & TOUCH_DREW_HITMARK)) {
|
||||
Vec3f hitPos;
|
||||
|
||||
|
|
@ -2777,7 +2778,7 @@ void CollisionCheck_SetTrisHitFX(PlayState* play, CollisionCheckContext* colCtxt
|
|||
ColliderTrisElement* element;
|
||||
|
||||
for (element = tris->elements; element < &tris->elements[tris->count]; element++) {
|
||||
if ((element->info.bumperFlags & BUMP_DRAW_HITMARK) && element->info.acHitInfo != NULL &&
|
||||
if ((element->info.bumperFlags & BUMP_DRAW_HITMARK) && (element->info.acHitInfo != NULL) &&
|
||||
!(element->info.acHitInfo->toucherFlags & TOUCH_DREW_HITMARK)) {
|
||||
Vec3f hitPos;
|
||||
|
||||
|
|
@ -2796,7 +2797,7 @@ void CollisionCheck_SetTrisHitFX(PlayState* play, CollisionCheckContext* colCtxt
|
|||
void CollisionCheck_SetQuadHitFX(PlayState* play, CollisionCheckContext* colCtxt, Collider* collider) {
|
||||
ColliderQuad* quad = (ColliderQuad*)collider;
|
||||
|
||||
if ((quad->info.bumperFlags & BUMP_DRAW_HITMARK) && quad->info.acHitInfo != NULL &&
|
||||
if ((quad->info.bumperFlags & BUMP_DRAW_HITMARK) && (quad->info.acHitInfo != NULL) &&
|
||||
!(quad->info.acHitInfo->toucherFlags & TOUCH_DREW_HITMARK)) {
|
||||
Vec3f hitPos;
|
||||
|
||||
|
|
@ -2812,7 +2813,7 @@ void CollisionCheck_SetQuadHitFX(PlayState* play, CollisionCheckContext* colCtxt
|
|||
void CollisionCheck_SetSphereHitFX(PlayState* play, CollisionCheckContext* colCtxt, Collider* collider) {
|
||||
ColliderSphere* sphere = (ColliderSphere*)collider;
|
||||
|
||||
if ((sphere->info.bumperFlags & BUMP_DRAW_HITMARK) && sphere->info.acHitInfo != NULL &&
|
||||
if ((sphere->info.bumperFlags & BUMP_DRAW_HITMARK) && (sphere->info.acHitInfo != NULL) &&
|
||||
!(sphere->info.acHitInfo->toucherFlags & TOUCH_DREW_HITMARK)) {
|
||||
Vec3f hitPos;
|
||||
|
||||
|
|
@ -2837,8 +2838,8 @@ void CollisionCheck_SetHitEffects(PlayState* play, CollisionCheckContext* colCtx
|
|||
for (col = &colCtxt->colAC[0]; col < &colCtxt->colAC[colCtxt->colACCount]; col++) {
|
||||
Collider* colAC = *col;
|
||||
|
||||
if (colAC != NULL && (colAC->acFlags & AC_ON)) {
|
||||
if (colAC->actor != NULL && colAC->actor->update == NULL) {
|
||||
if ((colAC != NULL) && (colAC->acFlags & AC_ON)) {
|
||||
if ((colAC->actor != NULL) && (colAC->actor->update == NULL)) {
|
||||
continue;
|
||||
}
|
||||
sColChkApplyFuncs[colAC->shape](play, colCtxt, colAC);
|
||||
|
|
@ -2868,12 +2869,12 @@ void CollisionCheck_AC(PlayState* play, CollisionCheckContext* colCtxt, Collider
|
|||
for (col = &colCtxt->colAC[0]; col < &colCtxt->colAC[colCtxt->colACCount]; col++) {
|
||||
Collider* colAC = *col;
|
||||
|
||||
if (colAC != NULL && (colAC->acFlags & AC_ON)) {
|
||||
if (colAC->actor != NULL && colAC->actor->update == NULL) {
|
||||
if ((colAC != NULL) && (colAC->acFlags & AC_ON)) {
|
||||
if ((colAC->actor != NULL) && (colAC->actor->update == NULL)) {
|
||||
continue;
|
||||
}
|
||||
if ((colAC->acFlags & colAT->atFlags & AC_TYPE_ALL) && colAT != colAC) {
|
||||
if (!(colAT->atFlags & AT_SELF) && colAT->actor != NULL && colAC->actor == colAT->actor) {
|
||||
if ((colAC->acFlags & colAT->atFlags & AC_TYPE_ALL) && (colAT != colAC)) {
|
||||
if (!(colAT->atFlags & AT_SELF) && (colAT->actor != NULL) && (colAC->actor == colAT->actor)) {
|
||||
continue;
|
||||
}
|
||||
sACVsFuncs[colAT->shape][colAC->shape](play, colCtxt, colAT, colAC);
|
||||
|
|
@ -2891,15 +2892,15 @@ void CollisionCheck_AC(PlayState* play, CollisionCheckContext* colCtxt, Collider
|
|||
void CollisionCheck_AT(PlayState* play, CollisionCheckContext* colCtxt) {
|
||||
Collider** col;
|
||||
|
||||
if (colCtxt->colATCount == 0 || colCtxt->colACCount == 0) {
|
||||
if ((colCtxt->colATCount == 0) || (colCtxt->colACCount == 0)) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (col = &colCtxt->colAT[0]; col < &colCtxt->colAT[colCtxt->colATCount]; col++) {
|
||||
Collider* colAC = *col;
|
||||
|
||||
if (colAC != NULL && (colAC->atFlags & AT_ON)) {
|
||||
if (colAC->actor != NULL && colAC->actor->update == NULL) {
|
||||
if ((colAC != NULL) && (colAC->atFlags & AT_ON)) {
|
||||
if ((colAC->actor != NULL) && (colAC->actor->update == NULL)) {
|
||||
continue;
|
||||
}
|
||||
CollisionCheck_AC(play, colCtxt, colAC);
|
||||
|
|
@ -2958,7 +2959,8 @@ void CollisionCheck_SetOCvsOC(PlayState* play, Collider* left, ColliderInfo* lef
|
|||
right->ocFlags2 |= OC2_HIT_PLAYER;
|
||||
}
|
||||
|
||||
if (leftActor == NULL || rightActor == NULL || (left->ocFlags1 & OC1_NO_PUSH) || (right->ocFlags1 & OC1_NO_PUSH)) {
|
||||
if ((leftActor == NULL) || (rightActor == NULL) || (left->ocFlags1 & OC1_NO_PUSH) ||
|
||||
(right->ocFlags1 & OC1_NO_PUSH)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -3032,7 +3034,7 @@ void CollisionCheck_OC_JntSphVsJntSph(PlayState* play, CollisionCheckContext* co
|
|||
ColliderJntSphElement* rightElem;
|
||||
f32 overlap;
|
||||
|
||||
if (left->count > 0 && left->elements != NULL && right->count > 0 && right->elements != NULL &&
|
||||
if ((left->count > 0) && (left->elements != NULL) && (right->count > 0) && (right->elements != NULL) &&
|
||||
(left->base.ocFlags1 & OCELEM_ON) && (right->base.ocFlags1 & OCELEM_ON)) {
|
||||
|
||||
for (leftElem = left->elements; leftElem < &left->elements[left->count]; leftElem++) {
|
||||
|
|
@ -3067,7 +3069,7 @@ void CollisionCheck_OC_JntSphVsCyl(PlayState* play, CollisionCheckContext* colCt
|
|||
ColliderJntSphElement* leftElem;
|
||||
f32 overlap;
|
||||
|
||||
if (left->count > 0 && left->elements != NULL && (left->base.ocFlags1 & OCELEM_ON) &&
|
||||
if ((left->count > 0) && (left->elements != NULL) && (left->base.ocFlags1 & OCELEM_ON) &&
|
||||
(right->base.ocFlags1 & OCELEM_ON) && (right->info.ocElemFlags & OCELEM_ON)) {
|
||||
|
||||
for (leftElem = left->elements; leftElem < &left->elements[left->count]; leftElem++) {
|
||||
|
|
@ -3096,7 +3098,7 @@ void CollisionCheck_OC_JntSphVsSphere(PlayState* play, CollisionCheckContext* co
|
|||
ColliderJntSphElement* leftElem;
|
||||
f32 overlap;
|
||||
|
||||
if (left->count > 0 && left->elements != NULL && (left->base.ocFlags1 & OCELEM_ON) &&
|
||||
if ((left->count > 0) && (left->elements != NULL) && (left->base.ocFlags1 & OCELEM_ON) &&
|
||||
(right->base.ocFlags1 & OCELEM_ON) && (right->info.ocElemFlags & OCELEM_ON)) {
|
||||
|
||||
for (leftElem = left->elements; leftElem < &left->elements[left->count]; leftElem++) {
|
||||
|
|
@ -3252,11 +3254,11 @@ void CollisionCheck_OC(PlayState* play, CollisionCheckContext* colCtxt) {
|
|||
ColChkVsFunc vsFunc;
|
||||
|
||||
for (left = colCtxt->colOC; left < colCtxt->colOC + colCtxt->colOCCount; left++) {
|
||||
if (*left == NULL || CollisionCheck_SkipOC(*left)) {
|
||||
if ((*left == NULL) || CollisionCheck_SkipOC(*left)) {
|
||||
continue;
|
||||
}
|
||||
for (right = left + 1; right < colCtxt->colOC + colCtxt->colOCCount; right++) {
|
||||
if (*right == NULL || CollisionCheck_SkipOC(*right) || CollisionCheck_Incompatible(*left, *right)) {
|
||||
if ((*right == NULL) || CollisionCheck_SkipOC(*right) || CollisionCheck_Incompatible(*left, *right)) {
|
||||
continue;
|
||||
}
|
||||
vsFunc = sOCVsFuncs[(*left)->shape][(*right)->shape];
|
||||
|
|
@ -3353,7 +3355,7 @@ void CollisionCheck_ApplyDamage(PlayState* play, CollisionCheckContext* colCtxt,
|
|||
at = info->acHit;
|
||||
atInfo = info->acHitInfo;
|
||||
|
||||
if (at != NULL && atInfo != NULL && collider != NULL && info != NULL) {
|
||||
if ((at != NULL) && (atInfo != NULL) && (collider != NULL) && (info != NULL)) {
|
||||
damage = CollisionCheck_GetDamageAndEffectOnBumper(at, atInfo, collider, info, &effect);
|
||||
|
||||
if (CollisionCheck_GetToucherDamage(at, atInfo, collider, info) != 0) {
|
||||
|
|
@ -3373,7 +3375,7 @@ void CollisionCheck_ApplyDamage(PlayState* play, CollisionCheckContext* colCtxt,
|
|||
collider->actor->colChkInfo.damageEffect = effect;
|
||||
}
|
||||
if (!(collider->acFlags & AC_HARD) ||
|
||||
((collider->acFlags & AC_HARD) && atInfo->toucher.dmgFlags == 0x20000000)) {
|
||||
((collider->acFlags & AC_HARD) && (atInfo->toucher.dmgFlags == 0x20000000))) {
|
||||
if (collider->actor->colChkInfo.damage < finalDamage) {
|
||||
collider->actor->colChkInfo.damage = finalDamage;
|
||||
}
|
||||
|
|
@ -3388,7 +3390,7 @@ void CollisionCheck_ApplyDamageJntSph(PlayState* play, CollisionCheckContext* co
|
|||
ColliderJntSph* jntSph = (ColliderJntSph*)collider;
|
||||
s32 i;
|
||||
|
||||
if (jntSph->count > 0 && jntSph->elements != NULL) {
|
||||
if ((jntSph->count > 0) && (jntSph->elements != NULL)) {
|
||||
for (i = 0; i < jntSph->count; i++) {
|
||||
CollisionCheck_ApplyDamage(play, colCtxt, &jntSph->base, &jntSph->elements[i].info);
|
||||
}
|
||||
|
|
@ -3965,7 +3967,7 @@ s32 CollisionCheck_CylSideVsLineSeg(f32 radius, f32 height, f32 offset, Vec3f* a
|
|||
if (SQ(actorDotItemXZ) < (4.0f * SQXZ(itemStep) * radSqDiff)) {
|
||||
return 0;
|
||||
}
|
||||
if (SQ(actorDotItemXZ) - (4.0f * SQXZ(itemStep) * radSqDiff) > zero) {
|
||||
if ((SQ(actorDotItemXZ) - (4.0f * SQXZ(itemStep) * radSqDiff)) > zero) {
|
||||
intersect1 = intersect2 = 1;
|
||||
} else {
|
||||
intersect1 = 1;
|
||||
|
|
@ -4005,12 +4007,12 @@ s32 CollisionCheck_CylSideVsLineSeg(f32 radius, f32 height, f32 offset, Vec3f* a
|
|||
}
|
||||
|
||||
if (intersect2 == 0) {
|
||||
if (frac1 < 0.0f || 1.0f < frac1) {
|
||||
if ((frac1 < 0.0f) || (1.0f < frac1)) {
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
test1 = (frac1 < 0.0f || 1.0f < frac1);
|
||||
test2 = (frac2 < 0.0f || 1.0f < frac2);
|
||||
test1 = (frac1 < 0.0f) || (1.0f < frac1);
|
||||
test2 = (frac2 < 0.0f) || (1.0f < frac2);
|
||||
|
||||
if (test1 && test2) {
|
||||
return 0;
|
||||
|
|
@ -4024,14 +4026,14 @@ s32 CollisionCheck_CylSideVsLineSeg(f32 radius, f32 height, f32 offset, Vec3f* a
|
|||
}
|
||||
|
||||
if ((intersect1 != 0) &&
|
||||
((frac1 * itemStep.y + actorToItem.y < 0.0f) || (height < frac1 * itemStep.y + actorToItem.y))) {
|
||||
(((frac1 * itemStep.y + actorToItem.y) < 0.0f) || (height < (frac1 * itemStep.y + actorToItem.y)))) {
|
||||
intersect1 = 0;
|
||||
}
|
||||
if ((intersect2 != 0) &&
|
||||
((frac2 * itemStep.y + actorToItem.y < 0.0f) || (height < frac2 * itemStep.y + actorToItem.y))) {
|
||||
(((frac2 * itemStep.y + actorToItem.y) < 0.0f) || (height < (frac2 * itemStep.y + actorToItem.y)))) {
|
||||
intersect2 = 0;
|
||||
}
|
||||
if (intersect1 == 0 && intersect2 == 0) {
|
||||
if ((intersect1 == 0) && (intersect2 == 0)) {
|
||||
return 0;
|
||||
} else if ((intersect1 != 0) && (intersect2 != 0)) {
|
||||
out1->x = frac1 * itemStep.x + actorToItem.x + actorPos->x;
|
||||
|
|
|
|||
|
|
@ -142,6 +142,7 @@ void FireObj_Draw(PlayState* play, FireObj* fire) {
|
|||
Vec3s vec;
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
Gfx_SetupDL25_Xlu(play->state.gfxCtx);
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0, 32, 64, 1, 0, (fire->timer * -20) % 512U, 32, 128));
|
||||
|
|
|
|||
|
|
@ -16,14 +16,14 @@ s16 sBeatingHeartsDDEnv[3];
|
|||
s16 sHeartsDDPrim[2][3];
|
||||
s16 sHeartsDDEnv[2][3];
|
||||
|
||||
TexturePtr HeartTextures[] = {
|
||||
TexturePtr sHeartTextures[] = {
|
||||
gHeartFullTex, gHeartQuarterTex, gHeartQuarterTex, gHeartQuarterTex,
|
||||
gHeartQuarterTex, gHeartQuarterTex, gHeartHalfTex, gHeartHalfTex,
|
||||
gHeartHalfTex, gHeartHalfTex, gHeartHalfTex, gHeartThreeQuarterTex,
|
||||
gHeartThreeQuarterTex, gHeartThreeQuarterTex, gHeartThreeQuarterTex, gHeartThreeQuarterTex,
|
||||
};
|
||||
|
||||
TexturePtr HeartDDTextures[] = {
|
||||
TexturePtr sHeartDDTextures[] = {
|
||||
gDefenseHeartFullTex, gDefenseHeartQuarterTex, gDefenseHeartQuarterTex,
|
||||
gDefenseHeartQuarterTex, gDefenseHeartQuarterTex, gDefenseHeartQuarterTex,
|
||||
gDefenseHeartHalfTex, gDefenseHeartHalfTex, gDefenseHeartHalfTex,
|
||||
|
|
@ -283,7 +283,7 @@ void LifeMeter_Draw(PlayState* play) {
|
|||
if (i < fullHeartCount) {
|
||||
heartTex = gHeartFullTex;
|
||||
} else if (i == fullHeartCount) {
|
||||
heartTex = HeartTextures[fractionHeartCount];
|
||||
heartTex = sHeartTextures[fractionHeartCount];
|
||||
} else {
|
||||
heartTex = gHeartEmptyTex;
|
||||
}
|
||||
|
|
@ -323,7 +323,7 @@ void LifeMeter_Draw(PlayState* play) {
|
|||
if (i < fullHeartCount) {
|
||||
heartTex = gDefenseHeartFullTex;
|
||||
} else if (i == fullHeartCount) {
|
||||
heartTex = HeartDDTextures[fractionHeartCount];
|
||||
heartTex = sHeartDDTextures[fractionHeartCount];
|
||||
} else {
|
||||
heartTex = gDefenseHeartEmptyTex;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -190,12 +190,12 @@ void Lights_BindDirectional(Lights* lights, LightParams* params, void* unused) {
|
|||
* available in the Lights group. This is at most 7 slots for a new group, but could be less.
|
||||
*/
|
||||
void Lights_BindAll(Lights* lights, LightNode* listHead, Vec3f* refPos, PlayState* play) {
|
||||
static LightsPosBindFunc posBindFuncs[] = {
|
||||
static LightsPosBindFunc sPosBindFuncs[] = {
|
||||
Lights_BindPoint,
|
||||
(LightsPosBindFunc)Lights_BindDirectional,
|
||||
Lights_BindPoint,
|
||||
};
|
||||
static LightsBindFunc dirBindFuncs[] = {
|
||||
static LightsBindFunc sDirBindFuncs[] = {
|
||||
Lights_BindPointWithReference,
|
||||
(LightsBindFunc)Lights_BindDirectional,
|
||||
Lights_BindPointWithReference,
|
||||
|
|
@ -204,12 +204,12 @@ void Lights_BindAll(Lights* lights, LightNode* listHead, Vec3f* refPos, PlayStat
|
|||
if (listHead != NULL) {
|
||||
if ((refPos == NULL) && (lights->enablePosLights == 1)) {
|
||||
do {
|
||||
posBindFuncs[listHead->info->type](lights, &listHead->info->params, play);
|
||||
sPosBindFuncs[listHead->info->type](lights, &listHead->info->params, play);
|
||||
listHead = listHead->next;
|
||||
} while (listHead != NULL);
|
||||
} else {
|
||||
do {
|
||||
dirBindFuncs[listHead->info->type](lights, &listHead->info->params, refPos);
|
||||
sDirBindFuncs[listHead->info->type](lights, &listHead->info->params, refPos);
|
||||
listHead = listHead->next;
|
||||
} while (listHead != NULL);
|
||||
}
|
||||
|
|
@ -338,7 +338,7 @@ Lights* Lights_NewAndDraw(GraphicsContext* gfxCtx, u8 ambientR, u8 ambientG, u8
|
|||
lights->l.a.l.col[0] = lights->l.a.l.colc[0] = ambientR;
|
||||
lights->l.a.l.col[1] = lights->l.a.l.colc[1] = ambientG;
|
||||
lights->l.a.l.col[2] = lights->l.a.l.colc[2] = ambientB;
|
||||
lights->enablePosLights = 0;
|
||||
lights->enablePosLights = false;
|
||||
lights->numLights = numLights;
|
||||
|
||||
for (i = 0; i < numLights; i++) {
|
||||
|
|
@ -363,7 +363,7 @@ Lights* Lights_New(GraphicsContext* gfxCtx, u8 ambientR, u8 ambientG, u8 ambient
|
|||
lights->l.a.l.col[0] = lights->l.a.l.colc[0] = ambientR;
|
||||
lights->l.a.l.col[1] = lights->l.a.l.colc[1] = ambientG;
|
||||
lights->l.a.l.col[2] = lights->l.a.l.colc[2] = ambientB;
|
||||
lights->enablePosLights = 0;
|
||||
lights->enablePosLights = false;
|
||||
lights->numLights = 0;
|
||||
|
||||
return lights;
|
||||
|
|
|
|||
|
|
@ -1508,7 +1508,7 @@ void Play_Main(GameState* thisx) {
|
|||
}
|
||||
|
||||
s32 Play_InCsMode(PlayState* this) {
|
||||
return (this->csCtx.state != 0) || Player_InCsMode(this);
|
||||
return (this->csCtx.state != CS_STATE_IDLE) || Player_InCsMode(this);
|
||||
}
|
||||
|
||||
f32 Play_GetFloorSurfaceImpl(PlayState* this, MtxF* mtx, CollisionPoly** poly, s32* bgId, Vec3f* pos) {
|
||||
|
|
|
|||
|
|
@ -257,7 +257,7 @@ void func_80122C20(PlayState* play, struct_80122D44_arg1* arg1) {
|
|||
for (i = 0; i < ARRAY_COUNT(arg1->unk_04); i++, temp_v1++) {
|
||||
// Can't be `temp_v1->alpha != 0`
|
||||
if (temp_v1->alpha) {
|
||||
phi_a1 = temp_v1->unk_00 == 3 ? (255 / 3) : (255 / 5);
|
||||
phi_a1 = (temp_v1->unk_00 == 3) ? (255 / 3) : (255 / 5);
|
||||
if (phi_a1 >= temp_v1->alpha) {
|
||||
temp_v1->alpha = 0;
|
||||
} else {
|
||||
|
|
@ -369,13 +369,13 @@ void func_80122F28(Player* player) {
|
|||
s32 func_80122F9C(PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
return (player->stateFlags2 & PLAYER_STATE2_80000) && player->unk_AE7 == 2;
|
||||
return (player->stateFlags2 & PLAYER_STATE2_80000) && (player->unk_AE7 == 2);
|
||||
}
|
||||
|
||||
s32 func_80122FCC(PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
return (player->stateFlags2 & PLAYER_STATE2_80000) && (player->unk_AE7 == 1 || player->unk_AE7 == 3);
|
||||
return (player->stateFlags2 & PLAYER_STATE2_80000) && ((player->unk_AE7 == 1) || (player->unk_AE7 == 3));
|
||||
}
|
||||
|
||||
void func_8012300C(PlayState* play, s32 arg1) {
|
||||
|
|
@ -1363,12 +1363,12 @@ s32 func_80123F2C(PlayState* play, s32 ammo) {
|
|||
}
|
||||
|
||||
s32 Player_IsBurningStickInRange(PlayState* play, Vec3f* pos, f32 xzRange, f32 yRange) {
|
||||
Player* this = GET_PLAYER(play);
|
||||
Player* player = GET_PLAYER(play);
|
||||
Vec3f diff;
|
||||
s32 pad;
|
||||
|
||||
if ((this->heldItemAction == PLAYER_IA_STICK) && (this->unk_B28 != 0)) {
|
||||
Math_Vec3f_Diff(&this->meleeWeaponInfo[0].tip, pos, &diff);
|
||||
if ((player->heldItemAction == PLAYER_IA_STICK) && (player->unk_B28 != 0)) {
|
||||
Math_Vec3f_Diff(&player->meleeWeaponInfo[0].tip, pos, &diff);
|
||||
return (SQXZ(diff) <= SQ(xzRange)) && (0.0f <= diff.y) && (diff.y <= yRange);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ void Room_DrawCullable(PlayState* play, Room* room, u32 flags) {
|
|||
gSPMatrix(POLY_XLU_DISP++, &gIdentityMtx, G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
}
|
||||
|
||||
if ((room->enablePosLights != 0) || (MREG(93) != 0)) {
|
||||
if (room->enablePosLights || (MREG(93) != 0)) {
|
||||
gSPSetGeometryMode(POLY_OPA_DISP++, G_LIGHTING_POSITIONAL);
|
||||
gSPSetGeometryMode(POLY_XLU_DISP++, G_LIGHTING_POSITIONAL);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ Gfx* SubS_DrawTransformFlex(PlayState* play, void** skeleton, Vec3s* jointTable,
|
|||
newDlist = rootLimb->dList;
|
||||
limbDList = rootLimb->dList;
|
||||
|
||||
if (overrideLimbDraw == NULL || !overrideLimbDraw(play, 1, &newDlist, &pos, &rot, actor, &gfx)) {
|
||||
if ((overrideLimbDraw == NULL) || !overrideLimbDraw(play, 1, &newDlist, &pos, &rot, actor, &gfx)) {
|
||||
Matrix_TranslateRotateZYX(&pos, &rot);
|
||||
Matrix_Push();
|
||||
|
||||
|
|
@ -1179,7 +1179,7 @@ Actor* SubS_FindActor(PlayState* play, Actor* actorListStart, u8 actorCategory,
|
|||
actor = play->actorCtx.actorLists[actorCategory].first;
|
||||
}
|
||||
|
||||
while (actor != NULL && actorId != actor->id) {
|
||||
while ((actor != NULL) && (actorId != actor->id)) {
|
||||
actor = actor->next;
|
||||
}
|
||||
|
||||
|
|
@ -1503,10 +1503,10 @@ Actor* SubS_FindActorCustom(PlayState* play, Actor* actor, Actor* actorListStart
|
|||
actorIter = play->actorCtx.actorLists[actorCategory].first;
|
||||
}
|
||||
|
||||
while (actorIter != NULL &&
|
||||
(actorId != actorIter->id ||
|
||||
(actorId == actorIter->id &&
|
||||
(verifyActor == NULL || (verifyActor != NULL && !verifyActor(play, actor, actorIter, verifyData)))))) {
|
||||
while ((actorIter != NULL) &&
|
||||
((actorId != actorIter->id) ||
|
||||
((actorId == actorIter->id) &&
|
||||
((verifyActor == NULL) || ((verifyActor != NULL) && !verifyActor(play, actor, actorIter, verifyData)))))) {
|
||||
actorIter = actorIter->next;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ s32 osPfsFileState(OSPfs* pfs, s32 fileNo, OSPfsState* state) {
|
|||
return ret;
|
||||
}
|
||||
|
||||
if (dir.company_code == 0 || dir.game_code == 0) {
|
||||
if ((dir.company_code == 0) || (dir.game_code == 0)) {
|
||||
return PFS_ERR_INVALID;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ void osSetEventMesg(OSEvent e, OSMesgQueue* mq, OSMesg m) {
|
|||
es->message = m;
|
||||
|
||||
if (e == 14) {
|
||||
if (__osShutdown != 0 && D_80097F10 == 0) {
|
||||
if ((__osShutdown != 0) && (D_80097F10 == 0)) {
|
||||
osSendMesg(mq, m, OS_MESG_NOBLOCK);
|
||||
}
|
||||
D_80097F10 = 1;
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ void _Ldtob(_Pft* args, u8 type) {
|
|||
|
||||
if (args->prec < 0) {
|
||||
args->prec = 6;
|
||||
} else if (args->prec == 0 && (type == 'g' || type == 'G')) {
|
||||
} else if ((args->prec == 0) && ((type == 'g') || (type == 'G'))) {
|
||||
args->prec = 1;
|
||||
}
|
||||
err = _Ldunscale(&exp, (_Pft*)args);
|
||||
|
|
@ -101,7 +101,7 @@ void _Ldtob(_Pft* args, u8 type) {
|
|||
gen = 0x13;
|
||||
}
|
||||
*ptr++ = '0';
|
||||
while (gen > 0 && 0 < val) {
|
||||
while ((gen > 0) && (0 < val)) {
|
||||
lo = val;
|
||||
if ((gen -= 8) > 0) {
|
||||
val = (val - lo) * 1.0e8;
|
||||
|
|
@ -124,12 +124,12 @@ void _Ldtob(_Pft* args, u8 type) {
|
|||
--gen, --exp;
|
||||
}
|
||||
|
||||
nsig = ((type == 'f') ? exp + 1 : ((type == 'e' || type == 'E') ? 1 : 0)) + args->prec;
|
||||
nsig = ((type == 'f') ? exp + 1 : (((type == 'e') || (type == 'E')) ? 1 : 0)) + args->prec;
|
||||
if (gen < nsig) {
|
||||
nsig = gen;
|
||||
}
|
||||
if (nsig > 0) {
|
||||
if (nsig < gen && ptr[nsig] > '4') {
|
||||
if ((nsig < gen) && (ptr[nsig] > '4')) {
|
||||
drop = '9';
|
||||
} else {
|
||||
drop = '0';
|
||||
|
|
@ -178,7 +178,7 @@ void _Genld(_Pft* px, u8 code, u8* p, s16 nsig, s16 xexp) {
|
|||
p = (u8*)"0";
|
||||
}
|
||||
|
||||
if (code == 'f' || ((code == 'g' || code == 'G') && (-4 <= xexp) && (xexp < px->prec))) { /* 'f' format */
|
||||
if ((code == 'f') || (((code == 'g') || (code == 'G')) && (-4 <= xexp) && (xexp < px->prec))) { /* 'f' format */
|
||||
++xexp; /* change to leading digit count */
|
||||
if (code != 'f') { /* fixup for 'g' */
|
||||
if (!(px->flags & FLAGS_HASH) && nsig < px->prec) {
|
||||
|
|
@ -225,8 +225,8 @@ void _Genld(_Pft* px, u8 code, u8* p, s16 nsig, s16 xexp) {
|
|||
px->n1 += nsig;
|
||||
px->nz1 = px->prec - nsig;
|
||||
}
|
||||
} else { /* 'e' format */
|
||||
if (code == 'g' || code == 'G') { /* fixup for 'g' */
|
||||
} else { /* 'e' format */
|
||||
if ((code == 'g') || (code == 'G')) { /* fixup for 'g' */
|
||||
if (nsig < px->prec) {
|
||||
px->prec = nsig;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,13 +27,13 @@ void _Litob(_Pft* args, u8 type) {
|
|||
num = -num;
|
||||
}
|
||||
|
||||
if (num != 0 || args->prec != 0) {
|
||||
if ((num != 0) || (args->prec != 0)) {
|
||||
buff[--idx] = numMap[num % base];
|
||||
}
|
||||
|
||||
args->v.ll = num / base;
|
||||
|
||||
while (args->v.ll > 0 && idx > 0) {
|
||||
while ((args->v.ll > 0) && (idx > 0)) {
|
||||
quotrem = lldiv(args->v.ll, base);
|
||||
args->v.ll = quotrem.quot;
|
||||
buff[--idx] = numMap[quotrem.rem];
|
||||
|
|
@ -47,7 +47,7 @@ void _Litob(_Pft* args, u8 type) {
|
|||
args->nz0 = args->prec - args->n1;
|
||||
}
|
||||
|
||||
if (args->prec < 0 && (args->flags & (FLAGS_ZERO | FLAGS_MINUS)) == FLAGS_ZERO) {
|
||||
if ((args->prec < 0) && (args->flags & (FLAGS_ZERO | FLAGS_MINUS)) == FLAGS_ZERO) {
|
||||
idx = args->width - args->n0 - args->nz0 - args->n1;
|
||||
if (idx > 0) {
|
||||
args->nz0 += idx;
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ int _Printf(PrintCallback pfn, void* arg, const char* fmt, va_list ap) {
|
|||
unsigned char ac[0x20];
|
||||
|
||||
s = fmt;
|
||||
while ((c = *s) != 0 && c != '%') {
|
||||
while (((c = *s) != 0) && (c != '%')) {
|
||||
s++;
|
||||
}
|
||||
_PROUT((char*)fmt, s - fmt);
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ s32 __osVoiceGetStatus(OSMesgQueue* mq, s32 port, u8* status) {
|
|||
*status = header.status;
|
||||
|
||||
if (ret == 0) {
|
||||
if (header.typeh == 0 && header.typel == 1) {
|
||||
if ((header.typeh == 0) && (header.typel == 1)) {
|
||||
if (header.status & 4) {
|
||||
ret = CONT_ERR_CONTRFAIL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ void ArmsHook_AttachHookToActor(ArmsHook* this, Actor* actor) {
|
|||
void ArmsHook_Shoot(ArmsHook* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if ((this->actor.parent == NULL) || (!Player_IsHoldingHookshot(player))) {
|
||||
if ((this->actor.parent == NULL) || !Player_IsHoldingHookshot(player)) {
|
||||
ArmsHook_DetachHookFromActor(this);
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
|
|
@ -138,7 +138,7 @@ void ArmsHook_Shoot(ArmsHook* this, PlayState* play) {
|
|||
func_800B8F98(&player->actor, NA_SE_IT_HOOKSHOT_CHAIN - SFX_FLAG);
|
||||
ArmsHook_CheckForCancel(this);
|
||||
|
||||
if (this->timer != 0 && (this->collider.base.atFlags & AT_HIT) &&
|
||||
if ((this->timer != 0) && (this->collider.base.atFlags & AT_HIT) &&
|
||||
(this->collider.info.atHitInfo->elemType != ELEMTYPE_UNK4)) {
|
||||
Actor* touchedActor = this->collider.base.at;
|
||||
|
||||
|
|
@ -191,12 +191,10 @@ void ArmsHook_Shoot(ArmsHook* this, PlayState* play) {
|
|||
} else {
|
||||
if (this->actor.child != NULL) {
|
||||
velocity = 30.0f;
|
||||
} else if (grabbed != NULL) {
|
||||
velocity = 50.0f;
|
||||
} else {
|
||||
if (grabbed != NULL) {
|
||||
velocity = 50.0f;
|
||||
} else {
|
||||
velocity = 200.0f;
|
||||
}
|
||||
velocity = 200.0f;
|
||||
}
|
||||
phi_f16 = bodyDistDiff - velocity;
|
||||
if (bodyDistDiff <= velocity) {
|
||||
|
|
@ -245,7 +243,7 @@ void ArmsHook_Shoot(ArmsHook* this, PlayState* play) {
|
|||
sp60.z = this->unk1EC.z - (this->unk1E0.z - this->unk1EC.z);
|
||||
if (BgCheck_EntityLineTest1(&play->colCtx, &sp60, &this->unk1E0, &posResult, &poly, true, true, true, true,
|
||||
&bgId) &&
|
||||
(func_800B90AC(play, &this->actor, poly, bgId, &posResult) == 0 ||
|
||||
(!func_800B90AC(play, &this->actor, poly, bgId, &posResult) ||
|
||||
BgCheck_ProjectileLineTest(&play->colCtx, &sp60, &this->unk1E0, &posResult, &poly, true, true, true, true,
|
||||
&bgId))) {
|
||||
f32 nx = COLPOLY_GET_NORMAL(poly->normal.x);
|
||||
|
|
|
|||
|
|
@ -249,6 +249,7 @@ void ArrowFire_Draw(Actor* thisx, PlayState* play) {
|
|||
Actor* transform = (arrow->unk_261 & 2) ? &this->actor : &arrow->actor;
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
Matrix_Translate(transform->world.pos.x, transform->world.pos.y, transform->world.pos.z, MTXMODE_NEW);
|
||||
Matrix_RotateYS(transform->shape.rot.y, MTXMODE_APPLY);
|
||||
Matrix_RotateXS(transform->shape.rot.x, MTXMODE_APPLY);
|
||||
|
|
|
|||
|
|
@ -202,24 +202,28 @@ void BgAstrBombwall_Draw(Actor* thixs, PlayState* play) {
|
|||
Gfx* opa;
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
opa = POLY_OPA_DISP;
|
||||
gSPDisplayList(&opa[0], gSetupDLs[SETUPDL_25]);
|
||||
gSPMatrix(&opa[1], Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPSetGeometryMode(&opa[2], G_LIGHTING_POSITIONAL);
|
||||
gSPDisplayList(&opa[3], object_astr_obj_DL_002380);
|
||||
POLY_OPA_DISP = &opa[4];
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
{
|
||||
Gfx* xlu;
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
xlu = POLY_XLU_DISP;
|
||||
gSPDisplayList(&xlu[0], gSetupDLs[SETUPDL_25]);
|
||||
gSPMatrix(&xlu[1], Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPSetGeometryMode(&xlu[2], G_LIGHTING_POSITIONAL);
|
||||
gSPDisplayList(&xlu[3], object_astr_obj_DL_0022E0);
|
||||
POLY_XLU_DISP = &xlu[4];
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -191,11 +191,13 @@ void BgCtowerGear_Draw(Actor* thisx, PlayState* play) {
|
|||
|
||||
void BgCtowerGear_DrawOrgan(Actor* thisx, PlayState* play) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
Gfx_SetupDL25_Opa(play->state.gfxCtx);
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gClockTowerOrganDL);
|
||||
Gfx_SetupDL25_Xlu(play->state.gfxCtx);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gClockTowerOrganPipesDL);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,21 +53,20 @@ void BgF40Switch_CheckAll(BgF40Switch* this, PlayState* play) {
|
|||
u32 inCsMode = Player_InCsMode(play);
|
||||
|
||||
for (actor = play->actorCtx.actorLists[ACTORCAT_SWITCH].first; actor != NULL; actor = actor->next) {
|
||||
if (actor->id == ACTOR_BG_F40_SWITCH && actor->room == this->dyna.actor.room && actor->update != NULL) {
|
||||
if ((actor->id == ACTOR_BG_F40_SWITCH) && (actor->room == this->dyna.actor.room) &&
|
||||
(actor->update != NULL)) {
|
||||
actorAsSwitch = (BgF40Switch*)actor;
|
||||
actorAsSwitch->wasPressed = actorAsSwitch->isPressed;
|
||||
isPressed = DynaPolyActor_IsSwitchPressed(&actorAsSwitch->dyna);
|
||||
if (actorAsSwitch->isPressed && actorAsSwitch->actionFunc == BgF40Switch_IdlePressed) {
|
||||
if (actorAsSwitch->isPressed && (actorAsSwitch->actionFunc == BgF40Switch_IdlePressed)) {
|
||||
// Switch is fully pressed - if there's nothing keeping it pressed, wait a short time before
|
||||
// reverting to unpressed state.
|
||||
if (isPressed || inCsMode) {
|
||||
actorAsSwitch->switchReleaseDelay = 6;
|
||||
} else if (actorAsSwitch->switchReleaseDelay > 0) {
|
||||
actorAsSwitch->switchReleaseDelay--;
|
||||
} else {
|
||||
if (actorAsSwitch->switchReleaseDelay > 0) {
|
||||
actorAsSwitch->switchReleaseDelay--;
|
||||
} else {
|
||||
actorAsSwitch->isPressed = isPressed;
|
||||
}
|
||||
actorAsSwitch->isPressed = isPressed;
|
||||
}
|
||||
} else {
|
||||
// No delay when pressing switch, or releasing from a not-fully-pressed state.
|
||||
|
|
@ -75,9 +74,9 @@ void BgF40Switch_CheckAll(BgF40Switch* this, PlayState* play) {
|
|||
}
|
||||
if (actorAsSwitch->isPressed) {
|
||||
switchFlag = BGF40SWITCH_GET_SWITCHFLAG(&actorAsSwitch->dyna.actor);
|
||||
if (switchFlag >= 0 && switchFlag < 0x80) {
|
||||
if ((switchFlag >= 0) && (switchFlag < 0x80)) {
|
||||
pressedSwitchFlags[(switchFlag & ~0x1F) >> 5] |= 1 << (switchFlag & 0x1F);
|
||||
if (!actorAsSwitch->wasPressed && actorAsSwitch->actionFunc == BgF40Switch_IdleUnpressed &&
|
||||
if (!actorAsSwitch->wasPressed && (actorAsSwitch->actionFunc == BgF40Switch_IdleUnpressed) &&
|
||||
!Flags_GetSwitch(play, switchFlag)) {
|
||||
actorAsSwitch->isInitiator = true;
|
||||
}
|
||||
|
|
@ -86,9 +85,10 @@ void BgF40Switch_CheckAll(BgF40Switch* this, PlayState* play) {
|
|||
}
|
||||
}
|
||||
for (actor = play->actorCtx.actorLists[ACTORCAT_SWITCH].first; actor != NULL; actor = actor->next) {
|
||||
if (actor->id == ACTOR_BG_F40_SWITCH && actor->room == this->dyna.actor.room && actor->update != 0) {
|
||||
if ((actor->id == ACTOR_BG_F40_SWITCH) && (actor->room == this->dyna.actor.room) &&
|
||||
(actor->update != NULL)) {
|
||||
switchFlag = BGF40SWITCH_GET_SWITCHFLAG(actor);
|
||||
if (switchFlag >= 0 && switchFlag < 0x80 && Flags_GetSwitch(play, switchFlag) &&
|
||||
if ((switchFlag >= 0) && (switchFlag < 0x80) && Flags_GetSwitch(play, switchFlag) &&
|
||||
!(pressedSwitchFlags[(switchFlag & ~0x1F) >> 5] & (1 << (switchFlag & 0x1F)))) {
|
||||
Flags_UnsetSwitch(play, switchFlag);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1019,7 +1019,7 @@ void func_80A9D61C(Actor* thisx, PlayState* play) {
|
|||
|
||||
for (i = 0; i < D_80A9E028.count; i++) {
|
||||
unkStruct1 = &D_80A9E028.unk_0000[i];
|
||||
if (unkStruct1->unk_34 != 5 && unkStruct1->unk_34 != 4) {
|
||||
if ((unkStruct1->unk_34 != 5) && (unkStruct1->unk_34 != 4)) {
|
||||
sp68.x = unkStruct1->unk_14.x + this->dyna.actor.home.pos.x;
|
||||
sp68.y = unkStruct1->unk_14.y + this->unk_16C;
|
||||
sp68.z = unkStruct1->unk_14.z + this->dyna.actor.home.pos.z;
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ void func_80AC4C34(BgIcefloe* this, PlayState* play) {
|
|||
WaterBox* water;
|
||||
|
||||
this->timer--;
|
||||
if (this->timer == 0 ||
|
||||
if ((this->timer == 0) ||
|
||||
!WaterBox_GetSurface1_2(play, &play->colCtx, this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.z,
|
||||
&this->dyna.actor.home.pos.y, &water)) {
|
||||
func_80AC4CF0(this);
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ void BgIkanaDharma_WaitForHit(BgIkanaDharma* this, PlayState* play) {
|
|||
this->collider.base.acFlags &= ~AC_HIT;
|
||||
}
|
||||
|
||||
if (wasHit && sFirstHitBgIkanaDharma == NULL) {
|
||||
if (wasHit && (sFirstHitBgIkanaDharma == NULL)) {
|
||||
sFirstHitBgIkanaDharma = this2;
|
||||
Flags_SetSwitch(play, BGIKANADHARMA_GET_SWITCHFLAG(&this->dyna.actor));
|
||||
tempAngle1 = BINANG_ADD(this->dyna.actor.yawTowardsPlayer, 0x8000);
|
||||
|
|
@ -160,8 +160,8 @@ void BgIkanaDharma_WaitForHit(BgIkanaDharma* this, PlayState* play) {
|
|||
this->dyna.actor.speed = 20.0f;
|
||||
Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_DARUMA_VANISH);
|
||||
BgIkanaDharma_SetupStartCutscene(this);
|
||||
} else if ((this->dyna.actor.flags & ACTOR_FLAG_40) == ACTOR_FLAG_40 && sFirstHitBgIkanaDharma == NULL &&
|
||||
this->dyna.actor.xzDistToPlayer < 420.0f) {
|
||||
} else if (CHECK_FLAG_ALL(this->dyna.actor.flags, ACTOR_FLAG_40) && (sFirstHitBgIkanaDharma == NULL) &&
|
||||
(this->dyna.actor.xzDistToPlayer < 420.0f)) {
|
||||
tempAngle1 = BINANG_SUB(this->dyna.actor.yawTowardsPlayer, player->actor.shape.rot.y);
|
||||
tempAngle1 = ABS_ALT(tempAngle1);
|
||||
|
||||
|
|
|
|||
|
|
@ -259,7 +259,7 @@ void func_809542A0(BgIngate* this, PlayState* play) {
|
|||
}
|
||||
|
||||
void func_80954340(BgIngate* this, PlayState* play) {
|
||||
if (!DECR(this->unk16A)) {
|
||||
if (DECR(this->unk16A) == 0) {
|
||||
if (this->timePath != NULL) {
|
||||
func_800B7298(play, &this->dyna.actor, PLAYER_CSMODE_END);
|
||||
this->timePath = &play->setupPathList[this->timePath->unk1];
|
||||
|
|
|
|||
|
|
@ -64,6 +64,7 @@ void BgOpenSpot_Draw(Actor* thisx, PlayState* play) {
|
|||
BgOpenSpot* this = (BgOpenSpot*)thisx;
|
||||
|
||||
AnimatedMat_Draw(play, this->texScrolls);
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
Gfx_SetupDL25_Xlu(play->state.gfxCtx);
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ Actor* func_80C1D78C(PlayState* play) {
|
|||
}
|
||||
|
||||
tempActor = foundActor->next;
|
||||
if (tempActor == NULL || false) {
|
||||
if ((tempActor == NULL) || false) {
|
||||
foundActor = NULL;
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@ Actor* func_80C1C8E8(PlayState* play) {
|
|||
}
|
||||
|
||||
tempActor = foundActor->next;
|
||||
if (tempActor == NULL || false) {
|
||||
if ((tempActor == NULL) || false) {
|
||||
foundActor = NULL;
|
||||
break;
|
||||
}
|
||||
|
|
@ -229,6 +229,9 @@ void func_80C1CAB0(DmAn* this, PlayState* play) {
|
|||
}
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
Cutscene_ActorTranslateAndYaw(&this->actor, play, cueChannel);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -163,7 +163,7 @@ void DmChar03_Draw(Actor* thisx, PlayState* play) {
|
|||
DmChar03* this = THIS;
|
||||
|
||||
if (!this->unk_18E) {
|
||||
if ((Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_136)) &&
|
||||
if (Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_136) &&
|
||||
(play->csCtx.actorCues[Cutscene_GetCueChannel(play, CS_CMD_ACTOR_CUE_136)]->id != 1)) {
|
||||
Gfx_SetupDL25_Opa(play->state.gfxCtx);
|
||||
SkelAnime_DrawTransformFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable,
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@ Actor* func_80C24838(PlayState* play) {
|
|||
}
|
||||
|
||||
tempActor = foundActor->next;
|
||||
if (tempActor == NULL || false) {
|
||||
if ((tempActor == NULL) || false) {
|
||||
foundActor = NULL;
|
||||
break;
|
||||
}
|
||||
|
|
@ -229,6 +229,9 @@ void func_80C24A00(DmGm* this, PlayState* play) {
|
|||
}
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
Cutscene_ActorTranslateAndYaw(&this->actor, play, cueChannel);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -348,7 +348,7 @@ void func_808A1090(DoorShutter* this, PlayState* play) {
|
|||
if (this->unk_166 != 0) {
|
||||
Flags_SetSwitch(play, DOORSHUTTER_GET_7F(&this->slidingDoor.dyna.actor));
|
||||
if (this->doorType != 5) {
|
||||
gSaveContext.save.saveInfo.inventory.dungeonKeys[gSaveContext.mapIndex]--;
|
||||
DUNGEON_KEY_COUNT(gSaveContext.mapIndex) = DUNGEON_KEY_COUNT(gSaveContext.mapIndex) - 1;
|
||||
Actor_PlaySfx(&this->slidingDoor.dyna.actor, NA_SE_EV_CHAIN_KEY_UNLOCK);
|
||||
} else {
|
||||
Actor_PlaySfx(&this->slidingDoor.dyna.actor, NA_SE_EV_CHAIN_KEY_UNLOCK_B);
|
||||
|
|
|
|||
|
|
@ -63,6 +63,7 @@ void EffDust_Init(Actor* thisx, PlayState* play) {
|
|||
this->dz = 1.0f;
|
||||
this->scalingFactor = 0.2f;
|
||||
break;
|
||||
|
||||
case EFF_DUST_TYPE_1:
|
||||
this->actionFunc = func_80918FE4;
|
||||
this->actor.draw = func_80919768;
|
||||
|
|
@ -71,6 +72,7 @@ void EffDust_Init(Actor* thisx, PlayState* play) {
|
|||
this->dz = 0.8f;
|
||||
this->scalingFactor = 0.5f;
|
||||
break;
|
||||
|
||||
case EFF_DUST_TYPE_SPIN_ATTACK_CHARGE:
|
||||
case EFF_DUST_TYPE_3:
|
||||
this->actionFunc = func_80919230;
|
||||
|
|
@ -79,6 +81,7 @@ void EffDust_Init(Actor* thisx, PlayState* play) {
|
|||
this->dx = 0.5f;
|
||||
this->scalingFactor = 15.0f;
|
||||
break;
|
||||
|
||||
case EFF_DUST_TYPE_4:
|
||||
this->actionFunc = func_80919230;
|
||||
this->actor.draw = func_809199FC;
|
||||
|
|
@ -86,6 +89,7 @@ void EffDust_Init(Actor* thisx, PlayState* play) {
|
|||
this->dx = 0.5f;
|
||||
this->scalingFactor = 10.0f;
|
||||
break;
|
||||
|
||||
case EFF_DUST_TYPE_5:
|
||||
this->actionFunc = func_80919230;
|
||||
this->actor.draw = func_809199FC;
|
||||
|
|
@ -93,6 +97,7 @@ void EffDust_Init(Actor* thisx, PlayState* play) {
|
|||
this->dx = 0.5f;
|
||||
this->scalingFactor = 20.0f;
|
||||
break;
|
||||
|
||||
default:
|
||||
SystemArena_Free(this);
|
||||
break;
|
||||
|
|
@ -171,7 +176,7 @@ void func_80919230(EffDust* this, PlayState* play) {
|
|||
s32 i;
|
||||
s32 j;
|
||||
|
||||
if (parent == NULL || parent->update == NULL || !(player->stateFlags1 & PLAYER_STATE1_1000)) {
|
||||
if ((parent == NULL) || (parent->update == NULL) || !(player->stateFlags1 & PLAYER_STATE1_1000)) {
|
||||
if (this->life != 0) {
|
||||
this->life--;
|
||||
} else {
|
||||
|
|
@ -235,6 +240,9 @@ void func_80919230(EffDust* this, PlayState* play) {
|
|||
this->initialPositions[i].z = 4000.0f * Math_CosS(theta);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
this->distanceTraveled[i] = 0.0f;
|
||||
|
|
@ -319,6 +327,7 @@ void func_809199FC(Actor* thisx, PlayState* play2) {
|
|||
Player* player = GET_PLAYER(play);
|
||||
|
||||
OPEN_DISPS(gfxCtx);
|
||||
|
||||
Gfx_SetupDL25_Opa(gfxCtx);
|
||||
|
||||
gDPPipeSync(POLY_XLU_DISP++);
|
||||
|
|
|
|||
|
|
@ -232,8 +232,10 @@ s32 func_80BECFBC(EnAkindonuts* this) {
|
|||
case 3:
|
||||
Inventory_DeleteItem(ITEM_DEED_OCEAN, SLOT(ITEM_DEED_OCEAN));
|
||||
return GI_RUPEE_HUGE;
|
||||
|
||||
default:
|
||||
return GI_NONE;
|
||||
}
|
||||
return GI_NONE;
|
||||
}
|
||||
|
||||
s32 func_80BED034(EnAkindonuts* this) {
|
||||
|
|
@ -249,8 +251,10 @@ s32 func_80BED034(EnAkindonuts* this) {
|
|||
|
||||
case 3:
|
||||
return GI_POTION_BLUE;
|
||||
|
||||
default:
|
||||
return GI_NONE;
|
||||
}
|
||||
return GI_NONE;
|
||||
}
|
||||
|
||||
void func_80BED090(PlayState* play) {
|
||||
|
|
|
|||
|
|
@ -468,6 +468,7 @@ void func_8088ACE0(EnArrow* this, PlayState* play) {
|
|||
|
||||
if ((this->unk_262 = BgCheck_ProjectileLineTest(&play->colCtx, &this->actor.prevPos, &this->actor.world.pos,
|
||||
&sp9C, &this->actor.wallPoly, true, true, true, true, &spA8))) {
|
||||
// `func_800B90AC` only returns a boolean, and does not process any code
|
||||
func_800B90AC(play, &this->actor, this->actor.wallPoly, spA8, &sp9C);
|
||||
Math_Vec3f_Copy(&this->actor.world.pos, &sp9C);
|
||||
this->actor.wallBgId = spA8;
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ void EnAttackNiw_Destroy(Actor* thisx, PlayState* play) {
|
|||
EnAttackNiw* this = THIS;
|
||||
EnNiw* parent = (EnNiw*)this->actor.parent;
|
||||
|
||||
if (this->actor.parent != NULL && this->actor.parent->update != NULL) {
|
||||
if ((this->actor.parent != NULL) && (this->actor.parent->update != NULL)) {
|
||||
if (parent->attackNiwCount > 0) {
|
||||
parent->attackNiwCount--;
|
||||
}
|
||||
|
|
@ -78,11 +78,11 @@ void EnAttackNiw_Destroy(Actor* thisx, PlayState* play) {
|
|||
/**
|
||||
* Summary: instead of using SkelAnime animations AttackNiw modifies head+wings directly to create animations
|
||||
*
|
||||
* EnNiw has its own version of this function, probably copy paste since AttackNiw only uses two animationState (2/5)
|
||||
* EnNiw has its own version of this function, probably copy paste since AttackNiw only uses two animIndex (2/5)
|
||||
*/
|
||||
void EnAttackNiw_AnimateWingHead(EnAttackNiw* this, PlayState* play, s16 animationState) {
|
||||
void EnAttackNiw_AnimateWingHead(EnAttackNiw* this, PlayState* play, s16 animIndex) {
|
||||
if (this->unkTimer24C == 0) {
|
||||
if (animationState == 0) {
|
||||
if (animIndex == 0) {
|
||||
this->targetBodyRotY = 0.0f;
|
||||
} else {
|
||||
this->targetBodyRotY = -10000.0f;
|
||||
|
|
@ -92,7 +92,7 @@ void EnAttackNiw_AnimateWingHead(EnAttackNiw* this, PlayState* play, s16 animati
|
|||
this->unkTimer24C = 3;
|
||||
if ((this->clearRotYToggleTimer % 2) == 0) {
|
||||
this->targetBodyRotY = 0.0f;
|
||||
if (animationState == 0) {
|
||||
if (animIndex == 0) {
|
||||
this->unkTimer24C = Rand_ZeroFloat(30.0f);
|
||||
}
|
||||
}
|
||||
|
|
@ -102,7 +102,7 @@ void EnAttackNiw_AnimateWingHead(EnAttackNiw* this, PlayState* play, s16 animati
|
|||
this->unkToggle28A++;
|
||||
this->unkToggle28A &= 1;
|
||||
|
||||
switch (animationState) { // only case 2 and 5 are ever called in AttackNiw
|
||||
switch (animIndex) { // only case 2 and 5 are ever called in AttackNiw
|
||||
case NIW_ANIM_STILL:
|
||||
this->targetLeftWingRotZ = 0.0f;
|
||||
this->targetRightWingRotZ = 0.0f;
|
||||
|
|
@ -156,6 +156,9 @@ void EnAttackNiw_AnimateWingHead(EnAttackNiw* this, PlayState* play, s16 animati
|
|||
this->targetLeftWingRotY = 10000.0f;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1794,13 +1794,16 @@ void EnAz_Draw(Actor* thisx, PlayState* play2) {
|
|||
func_80A98DA4, func_80A98E48, &this->actor);
|
||||
} else {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(sYoungerBrotherEyeTextures[this->unk_37E]));
|
||||
gSPSegment(POLY_OPA_DISP++, 0x09, Lib_SegmentedToVirtual(sYoungerBrotherBeltTextures[this->unk_380]));
|
||||
SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
|
||||
func_80A98DA4, func_80A98E48, &this->actor);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
if ((this->actor.depthInWater >= 28.0f) && (this->actor.speed > 0.5f)) {
|
||||
Matrix_Translate(this->unk_3B4.x, this->unk_3B4.y, this->unk_3B4.z, MTXMODE_NEW);
|
||||
Matrix_RotateYS(this->actor.shape.rot.y, MTXMODE_APPLY);
|
||||
|
|
@ -1855,6 +1858,7 @@ void EnAz_Draw(Actor* thisx, PlayState* play2) {
|
|||
gSPDisplayList(POLY_XLU_DISP++, gBeaverYoungerBrotherTailSplashDL);
|
||||
}
|
||||
}
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -261,11 +261,14 @@ s32 EnBba01_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f*
|
|||
|
||||
if (limbIndex == BBA_LIMB_RIGHT_LOWER_ARM_ROOT) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
gSPSegment(POLY_OPA_DISP++, 0x06, play->objectCtx.status[this->enHy.headObjIndex].segment);
|
||||
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.status[this->enHy.headObjIndex].segment);
|
||||
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.status[this->enHy.skelLowerObjIndex].segment);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
||||
if (limbIndex == BBA_LIMB_RIGHT_LOWER_ARM_ROOT) {
|
||||
Matrix_Translate(1500.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_RotateXS(this->enHy.headRot.y, MTXMODE_APPLY);
|
||||
|
|
@ -297,8 +300,10 @@ void EnBba01_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* ro
|
|||
|
||||
if (limbIndex == BBA_LIMB_HEAD) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
gSPSegment(POLY_OPA_DISP++, 0x06, play->objectCtx.status[this->enHy.skelUpperObjIndex].segment);
|
||||
gSegments[0x06] = VIRTUAL_TO_PHYSICAL(play->objectCtx.status[this->enHy.skelUpperObjIndex].segment);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -657,6 +657,7 @@ void EnBigokuta_Draw(Actor* thisx, PlayState* play) {
|
|||
Gfx* gfx;
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
if ((this->actionFunc != EnBigokuta_PlayDeathEffects) || (this->timer != 0)) {
|
||||
Scene_SetRenderModeXlu(play, 0, 1);
|
||||
gfx = POLY_OPA_DISP;
|
||||
|
|
|
|||
|
|
@ -375,7 +375,6 @@ void EnBigpo_SpawnCutsceneStage4(EnBigpo* this, PlayState* play) {
|
|||
this->actor.shape.rot.y += this->rotVelocity;
|
||||
EnBigpo_RotateSpawnCutsceneFires(this);
|
||||
|
||||
if (1) {}
|
||||
for (i = 0; i < ARRAY_COUNT(this->fires); i++) {
|
||||
this->fires[i].pos.y += this->actor.velocity.y;
|
||||
}
|
||||
|
|
@ -861,7 +860,7 @@ void EnBigpo_SelectRandomFireLocations(EnBigpo* this, PlayState* play) {
|
|||
|
||||
// count the number of possible fires we can find (4 in vanilla)
|
||||
for (enemyPtr = GET_FIRST_ENEMY(play); enemyPtr != NULL; enemyPtr = enemyPtr->next) {
|
||||
if (enemyPtr->id == ACTOR_EN_BIGPO && enemyPtr->params == ENBIGPO_POSSIBLEFIRE) {
|
||||
if ((enemyPtr->id == ACTOR_EN_BIGPO) && (enemyPtr->params == ENBIGPO_POSSIBLEFIRE)) {
|
||||
fireCount++;
|
||||
}
|
||||
}
|
||||
|
|
@ -882,7 +881,7 @@ void EnBigpo_SelectRandomFireLocations(EnBigpo* this, PlayState* play) {
|
|||
randomIndex = ((s32)Rand_ZeroFloat(fireCount)) % fireCount;
|
||||
|
||||
while (enemyPtr != NULL) {
|
||||
if (enemyPtr->id == ACTOR_EN_BIGPO && enemyPtr->params == ENBIGPO_POSSIBLEFIRE) {
|
||||
if ((enemyPtr->id == ACTOR_EN_BIGPO) && (enemyPtr->params == ENBIGPO_POSSIBLEFIRE)) {
|
||||
if (randomIndex == 0) {
|
||||
randomFirePo = (EnBigpo*)enemyPtr;
|
||||
randomFirePo->actor.params = ENBIGPO_CHOSENFIRE;
|
||||
|
|
@ -1225,8 +1224,8 @@ s32 EnBigpo_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f*
|
|||
Gfx** gfx) {
|
||||
EnBigpo* this = THIS;
|
||||
// not fully invisible
|
||||
if (!(this->mainColor.a != 0 && limbIndex != 7) ||
|
||||
(this->actionFunc == EnBigpo_BurnAwayDeath && this->idleTimer >= 2)) {
|
||||
if ((this->mainColor.a == 0) || (limbIndex == 7) ||
|
||||
((this->actionFunc == EnBigpo_BurnAwayDeath) && (this->idleTimer >= 2))) {
|
||||
*dList = NULL;
|
||||
}
|
||||
return false;
|
||||
|
|
@ -1416,6 +1415,7 @@ void EnBigpo_DrawCircleFlames(Actor* thisx, PlayState* play) {
|
|||
s32 i;
|
||||
|
||||
mtfxPtr = Matrix_GetCurrent();
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
Gfx_SetupDL25_Xlu(play->state.gfxCtx);
|
||||
|
|
|
|||
|
|
@ -122,6 +122,7 @@ void func_80867C8C(struct_80867BDC_a0* arg0, PlayState* play) {
|
|||
|
||||
if (temp_s6 > 0) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
Matrix_Push();
|
||||
for (i = 0; i < temp_s6; i++) {
|
||||
f32 temp_f0 = (f32)i / temp_s6;
|
||||
|
|
@ -150,6 +151,7 @@ void func_80867C8C(struct_80867BDC_a0* arg0, PlayState* play) {
|
|||
}
|
||||
Matrix_Pop();
|
||||
gSPMatrix(POLY_XLU_DISP++, &gIdentityMtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
}
|
||||
|
|
@ -694,6 +696,7 @@ void EnBox_Draw(Actor* thisx, PlayState* play) {
|
|||
EnBox* this = THIS;
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
if (this->unk_1F4.unk_10 != NULL) {
|
||||
this->unk_1F4.unk_10(&this->unk_1F4, play);
|
||||
}
|
||||
|
|
@ -719,5 +722,6 @@ void EnBox_Draw(Actor* thisx, PlayState* play) {
|
|||
POLY_XLU_DISP = SkelAnime_Draw(play, this->skelAnime.skeleton, this->skelAnime.jointTable, NULL,
|
||||
EnBox_PostLimbDraw, &this->dyna.actor, POLY_XLU_DISP);
|
||||
}
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -251,10 +251,12 @@ s32 EnCne01_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f*
|
|||
|
||||
if (limbIndex == CNE_LIMB_HEAD) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
gSPSegment(POLY_OPA_DISP++, 0x06, play->objectCtx.status[this->enHy.headObjIndex].segment);
|
||||
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.status[this->enHy.headObjIndex].segment);
|
||||
*dList = gCneHeadBrownHairDL;
|
||||
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.status[this->enHy.skelLowerObjIndex].segment);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
if (limbIndex == CNE_LIMB_HEAD) {
|
||||
|
|
@ -289,8 +291,10 @@ void EnCne01_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* ro
|
|||
|
||||
if (limbIndex == CNE_LIMB_RIGHT_FOOT) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
gSPSegment(POLY_OPA_DISP++, 0x06, play->objectCtx.status[this->enHy.skelUpperObjIndex].segment);
|
||||
gSegments[0x06] = VIRTUAL_TO_PHYSICAL(play->objectCtx.status[this->enHy.skelUpperObjIndex].segment);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -478,7 +478,7 @@ void func_80866B20(EnDoor* this, PlayState* play) {
|
|||
Animation_PlayOnceSetSpeed(&this->knobDoor.skelAnime, sAnimations[this->knobDoor.animIndex],
|
||||
(player->stateFlags1 & PLAYER_STATE1_8000000) ? 0.75f : 1.5f);
|
||||
if (this->unk_1A6 != 0) {
|
||||
gSaveContext.save.saveInfo.inventory.dungeonKeys[gSaveContext.mapIndex]--;
|
||||
DUNGEON_KEY_COUNT(gSaveContext.mapIndex) = DUNGEON_KEY_COUNT(gSaveContext.mapIndex) - 1;
|
||||
Flags_SetSwitch(play, this->switchFlag);
|
||||
Actor_PlaySfx(&this->knobDoor.dyna.actor, NA_SE_EV_CHAIN_KEY_UNLOCK);
|
||||
}
|
||||
|
|
@ -501,7 +501,7 @@ void func_80866B20(EnDoor* this, PlayState* play) {
|
|||
player->doorDirection = playerPosRelToDoor.z >= 0.0f ? 1.0f : -1.0f;
|
||||
player->doorActor = &this->knobDoor.dyna.actor;
|
||||
if (this->unk_1A6 != 0) {
|
||||
if (gSaveContext.save.saveInfo.inventory.dungeonKeys[((void)0, gSaveContext.mapIndex)] <= 0) {
|
||||
if (DUNGEON_KEY_COUNT(gSaveContext.mapIndex) <= 0) {
|
||||
player->doorType = PLAYER_DOORTYPE_TALKING;
|
||||
this->knobDoor.dyna.actor.textId = 0x1802;
|
||||
} else {
|
||||
|
|
@ -658,6 +658,7 @@ void EnDoor_Draw(Actor* thisx, PlayState* play) {
|
|||
|
||||
if (this->knobDoor.dyna.actor.objBankIndex == this->knobDoor.requiredObjBankIndex) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
if ((this->doorType == ENDOOR_TYPE_7) && (this->switchFlag == 0)) {
|
||||
Gfx_DrawDListOpa(play, gameplay_keep_DL_0221B8);
|
||||
} else {
|
||||
|
|
@ -675,6 +676,7 @@ void EnDoor_Draw(Actor* thisx, PlayState* play) {
|
|||
if (this->unk_1A6) {
|
||||
Actor_DrawDoorLock(play, this->unk_1A6, 0);
|
||||
}
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -110,9 +110,11 @@ void EnDrs_PostLimbDraw(PlayState* play2, s32 limbIndex, Gfx** dList, Vec3s* rot
|
|||
// after that it will no longer be rendered.
|
||||
if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_87_02) && (limbIndex == WEDDING_DRESS_MANNEQUIN_LIMB_MASK)) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
gSPSegment(POLY_OPA_DISP++, 0x06, play->objectCtx.status[temp].segment);
|
||||
gSPDisplayList(POLY_OPA_DISP++, &gMoonMaskDL);
|
||||
gSPSegment(POLY_OPA_DISP++, 0x06, play->objectCtx.status[temp2].segment);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ void func_80A61334(EnDyExtra* this, PlayState* play) {
|
|||
this->actor.velocity.y = 0.0f;
|
||||
}
|
||||
|
||||
if (this->unk14C == 0 && this->unk14A != 0) {
|
||||
if ((this->unk14C == 0) && (this->unk14A != 0)) {
|
||||
this->unk14C = 0x32;
|
||||
this->actionFunc = func_80A613C8;
|
||||
}
|
||||
|
|
@ -64,7 +64,7 @@ void func_80A61334(EnDyExtra* this, PlayState* play) {
|
|||
void func_80A613C8(EnDyExtra* this, PlayState* play) {
|
||||
Math_ApproachF(&this->actor.gravity, 0.0f, 0.1f, 0.005f);
|
||||
|
||||
if (this->unk14C == 0 || this->unk150 < 0.02f) {
|
||||
if ((this->unk14C == 0) || (this->unk150 < 0.02f)) {
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -638,9 +638,9 @@ s32 func_8088DCA4(EnElf* this) {
|
|||
}
|
||||
|
||||
void func_8088DD34(EnElf* this, PlayState* play) {
|
||||
Player* refActor = GET_PLAYER(play);
|
||||
Actor* playerActor = &GET_PLAYER(play)->actor;
|
||||
s32 pad;
|
||||
Player* player2 = GET_PLAYER(play);
|
||||
Player* player = GET_PLAYER(play);
|
||||
f32 heightDiff;
|
||||
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
|
|
@ -652,7 +652,7 @@ void func_8088DD34(EnElf* this, PlayState* play) {
|
|||
|
||||
func_8088CBAC(this, play);
|
||||
if (this->fairyFlags & 0x800) {
|
||||
this->unk_224.y = player2->bodyPartsPos[0].y;
|
||||
this->unk_224.y = player->bodyPartsPos[0].y;
|
||||
}
|
||||
|
||||
func_8088D8D0(this, &this->unk_224);
|
||||
|
|
@ -672,17 +672,17 @@ void func_8088DD34(EnElf* this, PlayState* play) {
|
|||
return;
|
||||
}
|
||||
|
||||
heightDiff = this->actor.world.pos.y - refActor->actor.world.pos.y;
|
||||
heightDiff = this->actor.world.pos.y - playerActor->world.pos.y;
|
||||
|
||||
if ((this->fairyFlags & 0x1000) && (heightDiff > 0.0f) && (heightDiff < 60.0f) &&
|
||||
!func_8088C804(&this->actor.world.pos, &refActor->actor.world.pos, 10.0f)) {
|
||||
!func_8088C804(&this->actor.world.pos, &playerActor->world.pos, 10.0f)) {
|
||||
Health_ChangeBy(play, 0x80);
|
||||
if (this->fairyFlags & 0x200) {
|
||||
Magic_Add(play, MAGIC_FILL_TO_CAPACITY);
|
||||
}
|
||||
gSaveContext.jinxTimer = 0;
|
||||
this->unk_254 = 50.0f;
|
||||
this->unk_248 = refActor->actor.shape.rot.y;
|
||||
this->unk_248 = playerActor->shape.rot.y;
|
||||
this->unk_24C = -0x1000;
|
||||
this->unk_224.y = 30.0f;
|
||||
this->unk_250 = 0.0f;
|
||||
|
|
|
|||
|
|
@ -93,18 +93,18 @@ void EnElforg_Init(Actor* thisx, PlayState* play) {
|
|||
}
|
||||
break;
|
||||
|
||||
case STRAY_FAIRY_TYPE_FAIRY_FOUNTAIN:
|
||||
case STRAY_FAIRY_TYPE_BUBBLE:
|
||||
case STRAY_FAIRY_TYPE_CHEST:
|
||||
case STRAY_FAIRY_TYPE_TURN_IN_TO_FAIRY_FOUNTAIN:
|
||||
break;
|
||||
|
||||
default:
|
||||
if (Flags_GetSwitch(play, STRAY_FAIRY_FLAG(thisx))) {
|
||||
Actor_Kill(thisx);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
|
||||
case STRAY_FAIRY_TYPE_FAIRY_FOUNTAIN:
|
||||
case STRAY_FAIRY_TYPE_BUBBLE:
|
||||
case STRAY_FAIRY_TYPE_CHEST:
|
||||
case STRAY_FAIRY_TYPE_TURN_IN_TO_FAIRY_FOUNTAIN:
|
||||
break;
|
||||
}
|
||||
|
||||
if (Map_IsInDungeonOrBossArea(play)) {
|
||||
|
|
@ -561,7 +561,7 @@ void EnElforg_TrappedByEnemy(EnElforg* this, PlayState* play) {
|
|||
void EnElforg_SetupTrappedByEnemy(EnElforg* this, PlayState* play) {
|
||||
Actor* enemy = EnElforg_GetHoldingEnemy(this, play);
|
||||
|
||||
if (enemy != NULL && enemy->update != NULL) {
|
||||
if ((enemy != NULL) && (enemy->update != NULL)) {
|
||||
this->actionFunc = EnElforg_TrappedByEnemy;
|
||||
this->enemy = enemy;
|
||||
}
|
||||
|
|
@ -587,7 +587,7 @@ void EnElforg_Update(Actor* thisx, PlayState* play) {
|
|||
|
||||
this->actionFunc(this, play);
|
||||
|
||||
if (this->timer == 0 && this->secondaryTimer > 0) {
|
||||
if ((this->timer == 0) && (this->secondaryTimer > 0)) {
|
||||
this->secondaryTimer--;
|
||||
} else {
|
||||
this->timer++;
|
||||
|
|
|
|||
|
|
@ -94,18 +94,25 @@ void EnEndingHero5_Draw(Actor* thisx, PlayState* play) {
|
|||
case 0:
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, 170, 10, 70, 255);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, 170, 200, 255, 255);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, 0, 230, 70, 255);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, 200, 0, 150, 255);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, 245, 155, 0, 255);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, NULL,
|
||||
|
|
|
|||
|
|
@ -890,6 +890,7 @@ void EnFall_FireRing_Draw(Actor* thisx, PlayState* play) {
|
|||
if (this->fireRingAlpha > 1.0f) {
|
||||
this->fireRingAlpha = 1.0f;
|
||||
}
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
AnimatedMat_DrawXlu(play, Lib_SegmentedToVirtual(gMoonFireRingTexAnim));
|
||||
|
|
|
|||
|
|
@ -387,11 +387,13 @@ void EnFg_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot,
|
|||
|
||||
if ((limbIndex == 7) || (limbIndex == 8)) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
Matrix_Push();
|
||||
Matrix_ReplaceRotation(&play->billboardMtxF);
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, *dList);
|
||||
Matrix_Pop();
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
||||
|
|
@ -468,6 +470,7 @@ void EnFg_DrawDust(PlayState* play, EnFgEffectDust* dustEffect) {
|
|||
s16 firstDone = false;
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
Gfx_SetupDL25_Xlu(play->state.gfxCtx);
|
||||
|
||||
for (i = 0; i < 10; i++, dustEffect++) {
|
||||
|
|
|
|||
|
|
@ -615,24 +615,24 @@ void func_80B10868(EnGb2* this, PlayState* play) {
|
|||
}
|
||||
|
||||
void func_80B10924(EnGb2* this, PlayState* play) {
|
||||
s32 sp24;
|
||||
s32 getItemId;
|
||||
|
||||
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_54_40)) {
|
||||
sp24 = 5;
|
||||
getItemId = GI_RUPEE_PURPLE;
|
||||
} else {
|
||||
sp24 = 12;
|
||||
getItemId = GI_HEART_PIECE;
|
||||
}
|
||||
|
||||
if (Actor_HasParent(&this->actor, play)) {
|
||||
this->actor.parent = NULL;
|
||||
if (sp24 == 12) {
|
||||
if (getItemId == GI_HEART_PIECE) {
|
||||
SET_WEEKEVENTREG(WEEKEVENTREG_54_40);
|
||||
} else {
|
||||
Rupees_ChangeBy(50);
|
||||
}
|
||||
this->actionFunc = func_80B109DC;
|
||||
} else {
|
||||
Actor_OfferGetItem(&this->actor, play, sp24, 300.0f, 300.0f);
|
||||
Actor_OfferGetItem(&this->actor, play, getItemId, 300.0f, 300.0f);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -441,6 +441,9 @@ void EnGe1_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot,
|
|||
gSPDisplayList(POLY_OPA_DISP++, sHairstyleDLs[this->hairstyle]);
|
||||
Matrix_MultVec3f(&sInitialFocusPos, &this->picto.actor.focus.pos);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
|
|
|
|||
|
|
@ -114,6 +114,7 @@ s32 EnGiant_IsImprisoned(EnGiant* this) {
|
|||
return true;
|
||||
}
|
||||
break;
|
||||
|
||||
case GIANT_TYPE_MOUNTAIN_TERMINA_FIELD:
|
||||
case GIANT_TYPE_MOUNTAIN_CLOCK_TOWER_SUCCESS:
|
||||
case GIANT_TYPE_MOUNTAIN_GIANTS_CHAMBER_AND_ENDING:
|
||||
|
|
@ -122,6 +123,7 @@ s32 EnGiant_IsImprisoned(EnGiant* this) {
|
|||
return true;
|
||||
}
|
||||
break;
|
||||
|
||||
case GIANT_TYPE_OCEAN_TERMINA_FIELD:
|
||||
case GIANT_TYPE_OCEAN_CLOCK_TOWER_SUCCESS:
|
||||
case GIANT_TYPE_OCEAN_GIANTS_CHAMBER_AND_ENDING:
|
||||
|
|
@ -130,6 +132,7 @@ s32 EnGiant_IsImprisoned(EnGiant* this) {
|
|||
return true;
|
||||
}
|
||||
break;
|
||||
|
||||
case GIANT_TYPE_CANYON_TERMINA_FIELD:
|
||||
case GIANT_TYPE_CANYON_CLOCK_TOWER_SUCCESS:
|
||||
case GIANT_TYPE_CANYON_GIANTS_CHAMBER_AND_ENDING:
|
||||
|
|
@ -138,6 +141,9 @@ s32 EnGiant_IsImprisoned(EnGiant* this) {
|
|||
return true;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
@ -229,11 +235,13 @@ void EnGiant_Init(Actor* thisx, PlayState* play) {
|
|||
case 10:
|
||||
this->sfxId = NA_SE_EV_KYOJIN_GRATITUDE2 - SFX_FLAG;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
case 2:
|
||||
case 3:
|
||||
this->sfxId = NA_SE_EV_KYOJIN_GRATITUDE1 - SFX_FLAG;
|
||||
break;
|
||||
|
||||
default:
|
||||
this->sfxId = NA_SE_EV_KYOJIN_GRATITUDE0 - SFX_FLAG;
|
||||
break;
|
||||
|
|
@ -361,47 +369,56 @@ void EnGiant_PlayAndUpdateAnimation(EnGiant* this) {
|
|||
case GIANT_CUE_ID_LOOKING_UP:
|
||||
EnGiant_ChangeToStartOrLoopAnimation(this, GIANT_ANIM_LOOK_UP_START);
|
||||
break;
|
||||
|
||||
case GIANT_CUE_ID_RAISING_ARMS:
|
||||
EnGiant_ChangeToStartOrLoopAnimation(this, GIANT_ANIM_RAISED_ARMS_START);
|
||||
break;
|
||||
|
||||
case GIANT_CUE_ID_STRUGGLING:
|
||||
EnGiant_ChangeToStartOrLoopAnimation(this, GIANT_ANIM_STRUGGLE_START);
|
||||
break;
|
||||
|
||||
case GIANT_CUE_ID_FALLING_OVER:
|
||||
// Unused
|
||||
EnGiant_ChangeToStartOrLoopAnimation(this, GIANT_ANIM_FALLING_OVER);
|
||||
break;
|
||||
|
||||
case GIANT_CUE_ID_TALKING:
|
||||
EnGiant_ChangeAnim(this, GIANT_ANIM_BIG_CALL_LOOP);
|
||||
break;
|
||||
|
||||
case GIANT_CUE_ID_DONE_TALKING:
|
||||
case GIANT_CUE_ID_PLAYER_LEARNED_OATH_TO_ORDER:
|
||||
EnGiant_ChangeAnim(this, GIANT_ANIM_IDLE_LOOP);
|
||||
break;
|
||||
|
||||
case GIANT_CUE_ID_TEACHING_OATH_TO_ORDER:
|
||||
EnGiant_ChangeAnim(this, GIANT_ANIM_SMALL_CALL_LOOP);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
}
|
||||
}
|
||||
|
||||
void EnGiant_PlaySound(EnGiant* this) {
|
||||
if (this->actor.draw != NULL && this->alpha > 0) {
|
||||
if (this->animIndex == GIANT_ANIM_WALKING_LOOP &&
|
||||
if ((this->actor.draw != NULL) && (this->alpha > 0)) {
|
||||
if ((this->animIndex == GIANT_ANIM_WALKING_LOOP) &&
|
||||
(Animation_OnFrame(&this->skelAnime, 40.0f) || Animation_OnFrame(&this->skelAnime, 100.0f))) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EV_KYOJIN_WALK);
|
||||
}
|
||||
if (this->animIndex == GIANT_ANIM_FALLING_OVER && Animation_OnFrame(&this->skelAnime, 40.0f)) {
|
||||
if ((this->animIndex == GIANT_ANIM_FALLING_OVER) && Animation_OnFrame(&this->skelAnime, 40.0f)) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EV_KYOJIN_VOICE_FAIL);
|
||||
}
|
||||
if (this->sfxId != 0xFFFF &&
|
||||
((this->animIndex == GIANT_ANIM_BIG_CALL_START && this->skelAnime.curFrame >= 18.0f) ||
|
||||
this->animIndex == GIANT_ANIM_BIG_CALL_LOOP)) {
|
||||
if ((this->sfxId != 0xFFFF) &&
|
||||
(((this->animIndex == GIANT_ANIM_BIG_CALL_START) && (this->skelAnime.curFrame >= 18.0f)) ||
|
||||
(this->animIndex == GIANT_ANIM_BIG_CALL_LOOP))) {
|
||||
func_800B9010(&this->actor, this->sfxId);
|
||||
}
|
||||
if ((this->animIndex == GIANT_ANIM_SMALL_CALL_START && this->skelAnime.curFrame >= 18.0f) ||
|
||||
this->animIndex == GIANT_ANIM_SMALL_CALL_LOOP) {
|
||||
if (((this->animIndex == GIANT_ANIM_SMALL_CALL_START) && (this->skelAnime.curFrame >= 18.0f)) ||
|
||||
(this->animIndex == GIANT_ANIM_SMALL_CALL_LOOP)) {
|
||||
func_800B9010(&this->actor, NA_SE_EV_KYOJIN_SIGN - SFX_FLAG);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -234,7 +234,7 @@ s32 EnGirlA_CanBuyArrows(PlayState* play, EnGirlA* this) {
|
|||
}
|
||||
|
||||
s32 EnGirlA_CanBuyNuts(PlayState* play, EnGirlA* this) {
|
||||
if (CUR_CAPACITY(UPG_NUTS) != 0 && CUR_CAPACITY(UPG_NUTS) <= AMMO(ITEM_NUT)) {
|
||||
if ((CUR_CAPACITY(UPG_NUTS) != 0) && (CUR_CAPACITY(UPG_NUTS) <= AMMO(ITEM_NUT))) {
|
||||
return CANBUY_RESULT_NO_ROOM;
|
||||
}
|
||||
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.unk1206C) {
|
||||
|
|
@ -257,7 +257,7 @@ s32 EnGirlA_CanBuyShieldHero(PlayState* play, EnGirlA* this) {
|
|||
}
|
||||
|
||||
s32 EnGirlA_CanBuyStick(PlayState* play, EnGirlA* this) {
|
||||
if (CUR_CAPACITY(UPG_STICKS) != 0 && AMMO(ITEM_STICK) >= CUR_CAPACITY(UPG_STICKS)) {
|
||||
if ((CUR_CAPACITY(UPG_STICKS) != 0) && (AMMO(ITEM_STICK) >= CUR_CAPACITY(UPG_STICKS))) {
|
||||
return CANBUY_RESULT_NO_ROOM;
|
||||
}
|
||||
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.unk1206C) {
|
||||
|
|
@ -385,18 +385,24 @@ void EnGirlA_BuyBottleItem(PlayState* play, EnGirlA* this) {
|
|||
case SI_POTION_RED_6:
|
||||
Item_Give(play, ITEM_POTION_RED);
|
||||
break;
|
||||
|
||||
case SI_POTION_GREEN_1:
|
||||
case SI_POTION_GREEN_2:
|
||||
case SI_POTION_GREEN_3:
|
||||
Item_Give(play, ITEM_POTION_GREEN);
|
||||
break;
|
||||
|
||||
case SI_POTION_BLUE:
|
||||
Item_Give(play, ITEM_POTION_BLUE);
|
||||
break;
|
||||
|
||||
case SI_FAIRY_1:
|
||||
case SI_FAIRY_2:
|
||||
Item_Give(play, ITEM_FAIRY);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
Rupees_ChangeBy(-play->msgCtx.unk1206C);
|
||||
}
|
||||
|
|
@ -411,9 +417,13 @@ void EnGirlA_BuyNuts(PlayState* play, EnGirlA* this) {
|
|||
case 5:
|
||||
Item_Give(play, ITEM_NUTS_5);
|
||||
break;
|
||||
|
||||
case 10:
|
||||
Item_Give(play, ITEM_NUTS_10);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
Rupees_ChangeBy(-play->msgCtx.unk1206C);
|
||||
}
|
||||
|
|
@ -439,12 +449,17 @@ void EnGirlA_BuyBombBag(PlayState* play, EnGirlA* this) {
|
|||
case 20:
|
||||
Item_Give(play, ITEM_BOMB_BAG_20);
|
||||
break;
|
||||
|
||||
case 21:
|
||||
Item_Give(play, ITEM_BOMB_BAG_30);
|
||||
break;
|
||||
|
||||
case 22:
|
||||
Item_Give(play, ITEM_BOMB_BAG_40);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
Rupees_ChangeBy(-play->msgCtx.unk1206C);
|
||||
}
|
||||
|
|
@ -461,15 +476,21 @@ void EnGirlA_BuyBombs(PlayState* play, EnGirlA* this) {
|
|||
case 5:
|
||||
Item_Give(play, ITEM_BOMBS_5);
|
||||
break;
|
||||
|
||||
case 10:
|
||||
Item_Give(play, ITEM_BOMBS_10);
|
||||
break;
|
||||
|
||||
case 20:
|
||||
Item_Give(play, ITEM_BOMBS_20);
|
||||
break;
|
||||
|
||||
case 30:
|
||||
Item_Give(play, ITEM_BOMBS_30);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
Rupees_ChangeBy(-play->msgCtx.unk1206C);
|
||||
}
|
||||
|
|
@ -484,15 +505,21 @@ void EnGirlA_BuySword(PlayState* play, EnGirlA* this) {
|
|||
case 1:
|
||||
Item_Give(play, ITEM_SWORD_KOKIRI);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
Item_Give(play, ITEM_SWORD_RAZOR);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
Item_Give(play, ITEM_SWORD_GILDED);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
Item_Give(play, ITEM_SWORD_GREAT_FAIRY);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
Rupees_ChangeBy(-play->msgCtx.unk1206C);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -955,22 +955,22 @@ void func_80B52430(EnGk* this, PlayState* play) {
|
|||
}
|
||||
|
||||
void func_80B5253C(EnGk* this, PlayState* play) {
|
||||
s32 sp24;
|
||||
s32 getItemId;
|
||||
|
||||
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_41_08)) {
|
||||
sp24 = 0x93;
|
||||
getItemId = GI_GOLD_DUST_2;
|
||||
} else {
|
||||
sp24 = 0x6A;
|
||||
getItemId = GI_GOLD_DUST;
|
||||
}
|
||||
|
||||
if (Actor_HasParent(&this->actor, play)) {
|
||||
this->actor.parent = NULL;
|
||||
if (sp24 == 0x6A) {
|
||||
if (getItemId == GI_GOLD_DUST) {
|
||||
SET_WEEKEVENTREG(WEEKEVENTREG_41_08);
|
||||
}
|
||||
this->actionFunc = func_80B525E0;
|
||||
} else {
|
||||
Actor_OfferGetItem(&this->actor, play, sp24, 300.0f, 300.0f);
|
||||
Actor_OfferGetItem(&this->actor, play, getItemId, 300.0f, 300.0f);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -458,25 +458,25 @@ void func_8099874C(EnGs* this, PlayState* play) {
|
|||
}
|
||||
|
||||
if (phi_v0 != 0) {
|
||||
this->unk_20C = -1;
|
||||
this->getItemId = -1;
|
||||
switch (this->unk_194) {
|
||||
case 1:
|
||||
if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_77_08)) {
|
||||
this->unk_20C = 6;
|
||||
this->getItemId = GI_RUPEE_SILVER;
|
||||
SET_WEEKEVENTREG(WEEKEVENTREG_77_08);
|
||||
}
|
||||
break;
|
||||
|
||||
case 3:
|
||||
if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_77_10)) {
|
||||
this->unk_20C = 6;
|
||||
this->getItemId = GI_RUPEE_SILVER;
|
||||
SET_WEEKEVENTREG(WEEKEVENTREG_77_10);
|
||||
}
|
||||
break;
|
||||
|
||||
case 2:
|
||||
if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_77_20)) {
|
||||
this->unk_20C = 6;
|
||||
this->getItemId = GI_RUPEE_SILVER;
|
||||
SET_WEEKEVENTREG(WEEKEVENTREG_77_20);
|
||||
}
|
||||
break;
|
||||
|
|
@ -484,10 +484,10 @@ void func_8099874C(EnGs* this, PlayState* play) {
|
|||
|
||||
if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_90_10)) {
|
||||
SET_WEEKEVENTREG(WEEKEVENTREG_90_10);
|
||||
this->unk_20C = 12;
|
||||
this->getItemId = GI_HEART_PIECE;
|
||||
}
|
||||
|
||||
if (this->unk_20C > 0) {
|
||||
if (this->getItemId > GI_NONE) {
|
||||
func_809989B4(this, play);
|
||||
} else {
|
||||
func_80997D14(this, play);
|
||||
|
|
@ -502,7 +502,7 @@ void func_8099874C(EnGs* this, PlayState* play) {
|
|||
}
|
||||
|
||||
void func_809989B4(EnGs* this, PlayState* play) {
|
||||
Actor_OfferGetItem(&this->actor, play, this->unk_20C, this->actor.xzDistToPlayer, this->actor.playerHeightRel);
|
||||
Actor_OfferGetItem(&this->actor, play, this->getItemId, this->actor.xzDistToPlayer, this->actor.playerHeightRel);
|
||||
this->actionFunc = func_809989F4;
|
||||
}
|
||||
|
||||
|
|
@ -511,7 +511,8 @@ void func_809989F4(EnGs* this, PlayState* play) {
|
|||
this->actor.parent = NULL;
|
||||
func_80997D14(this, play);
|
||||
} else {
|
||||
Actor_OfferGetItem(&this->actor, play, this->unk_20C, this->actor.xzDistToPlayer, this->actor.playerHeightRel);
|
||||
Actor_OfferGetItem(&this->actor, play, this->getItemId, this->actor.xzDistToPlayer,
|
||||
this->actor.playerHeightRel);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ typedef struct EnGs {
|
|||
/* 0x200 */ f32 unk_200;
|
||||
/* 0x204 */ s32 unk_204;
|
||||
/* 0x208 */ s32 unk_208;
|
||||
/* 0x20C */ s32 unk_20C;
|
||||
/* 0x20C */ s32 getItemId;
|
||||
/* 0x210 */ u16 unk_210;
|
||||
/* 0x212 */ s16 csIdList[2];
|
||||
/* 0x216 */ s16 unk_216;
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ void func_80BC6E10(EnGuruguru* this) {
|
|||
this->headZRotTarget = 0;
|
||||
this->unk268 = 1;
|
||||
this->actor.textId = textIDs[this->textIdIndex];
|
||||
if ((this->textIdIndex == 0 || this->textIdIndex == 1) && CHECK_WEEKEVENTREG(WEEKEVENTREG_77_04)) {
|
||||
if (((this->textIdIndex == 0) || (this->textIdIndex == 1)) && CHECK_WEEKEVENTREG(WEEKEVENTREG_77_04)) {
|
||||
if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_88_04)) {
|
||||
this->actor.textId = 0x295F;
|
||||
} else {
|
||||
|
|
@ -175,7 +175,7 @@ void func_80BC701C(EnGuruguru* this, PlayState* play) {
|
|||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if ((this->unk268 != 0) &&
|
||||
(player->transformation == PLAYER_FORM_HUMAN || player->transformation == PLAYER_FORM_DEKU)) {
|
||||
((player->transformation == PLAYER_FORM_HUMAN) || (player->transformation == PLAYER_FORM_DEKU))) {
|
||||
this->headZRotTarget = 5000;
|
||||
}
|
||||
|
||||
|
|
@ -324,7 +324,7 @@ void EnGuruguru_Update(Actor* thisx, PlayState* play) {
|
|||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
}
|
||||
} else if (this->actor.params == 0 || this->actor.params == 2) {
|
||||
} else if ((this->actor.params == 0) || (this->actor.params == 2)) {
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
}
|
||||
|
|
@ -352,10 +352,10 @@ void EnGuruguru_Update(Actor* thisx, PlayState* play) {
|
|||
this->headXRotTarget = 0;
|
||||
if (yaw < 0x2AF8) {
|
||||
this->headXRotTarget = this->actor.yawTowardsPlayer - this->actor.world.rot.y;
|
||||
if (this->headXRotTarget > 5000) {
|
||||
this->headXRotTarget = 5000;
|
||||
} else if (this->headXRotTarget < -5000) {
|
||||
this->headXRotTarget = -5000;
|
||||
if (this->headXRotTarget > 0x1388) {
|
||||
this->headXRotTarget = 0x1388;
|
||||
} else if (this->headXRotTarget < -0x1388) {
|
||||
this->headXRotTarget = -0x1388;
|
||||
}
|
||||
}
|
||||
Actor_SetScale(&this->actor, 0.01f);
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@ void func_80BDB2B8(EnHiddenNuts* this, PlayState* play) {
|
|||
this->unk_20A = 0;
|
||||
}
|
||||
|
||||
if (Actor_ProcessTalkRequest(&this->actor, &play->state) != 0) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, &play->state)) {
|
||||
func_80BDB580(this);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1033,6 +1033,7 @@ void EnIk_UpdateArmorDraw(EnIk* this, PlayState* play) {
|
|||
sp54 = 0;
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
gfxOpa = POLY_OPA_DISP;
|
||||
gfxXlu = POLY_XLU_DISP;
|
||||
|
||||
|
|
|
|||
|
|
@ -329,7 +329,7 @@ void func_808F38F8(EnIn* this, PlayState* play) {
|
|||
while (true) {
|
||||
//! @bug: Infinite loop if there is only one ACTOR_EN_IN
|
||||
this->unk4A4 = (EnIn*)SubS_FindActor(play, &this->unk4A4->actor, ACTORCAT_NPC, ACTOR_EN_IN);
|
||||
if (this->unk4A4 != NULL && this->unk4A4 != this) {
|
||||
if ((this->unk4A4 != NULL) && (this->unk4A4 != this)) {
|
||||
break;
|
||||
}
|
||||
this->unk4A4 = (EnIn*)this->unk4A4->actor.next;
|
||||
|
|
@ -357,9 +357,13 @@ void func_808F39DC(EnIn* this, PlayState* play) {
|
|||
case WEEKEVENTREG_HORSE_RACE_STATE_2:
|
||||
textId = 0x347A;
|
||||
break;
|
||||
|
||||
case WEEKEVENTREG_HORSE_RACE_STATE_3:
|
||||
textId = 0x3476;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
SET_WEEKEVENTREG_HORSE_RACE_STATE(WEEKEVENTREG_HORSE_RACE_STATE_END);
|
||||
} else {
|
||||
|
|
@ -367,9 +371,13 @@ void func_808F39DC(EnIn* this, PlayState* play) {
|
|||
case WEEKEVENTREG_HORSE_RACE_STATE_2:
|
||||
textId = 0x349D;
|
||||
break;
|
||||
|
||||
case WEEKEVENTREG_HORSE_RACE_STATE_3:
|
||||
textId = 0x3499;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
SET_WEEKEVENTREG_HORSE_RACE_STATE(WEEKEVENTREG_HORSE_RACE_STATE_END);
|
||||
}
|
||||
|
|
@ -482,6 +490,7 @@ u16 func_808F3DD4(PlayState* play, EnIn* this, u32 arg2) {
|
|||
textId = 0x345B;
|
||||
}
|
||||
break;
|
||||
|
||||
case 1:
|
||||
if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_15_10)) {
|
||||
textId = 0x3463;
|
||||
|
|
@ -489,11 +498,12 @@ u16 func_808F3DD4(PlayState* play, EnIn* this, u32 arg2) {
|
|||
textId = 0x346B;
|
||||
}
|
||||
break;
|
||||
|
||||
case 3:
|
||||
if (gSaveContext.save.playerForm == PLAYER_FORM_DEKU) {
|
||||
textId = 0x3485;
|
||||
} else if (gSaveContext.save.playerForm == PLAYER_FORM_ZORA ||
|
||||
gSaveContext.save.playerForm == PLAYER_FORM_GORON) {
|
||||
} else if ((gSaveContext.save.playerForm == PLAYER_FORM_ZORA) ||
|
||||
(gSaveContext.save.playerForm == PLAYER_FORM_GORON)) {
|
||||
textId = 0x3484;
|
||||
} else if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_56_04)) {
|
||||
textId = 0x346D;
|
||||
|
|
@ -501,8 +511,10 @@ u16 func_808F3DD4(PlayState* play, EnIn* this, u32 arg2) {
|
|||
textId = 0x3482;
|
||||
}
|
||||
break;
|
||||
|
||||
case 4:
|
||||
if (gSaveContext.save.playerForm == PLAYER_FORM_ZORA || gSaveContext.save.playerForm == PLAYER_FORM_GORON) {
|
||||
if ((gSaveContext.save.playerForm == PLAYER_FORM_ZORA) ||
|
||||
(gSaveContext.save.playerForm == PLAYER_FORM_GORON)) {
|
||||
textId = 0x348A;
|
||||
} else if (gSaveContext.save.playerForm == PLAYER_FORM_DEKU) {
|
||||
textId = 0x348B;
|
||||
|
|
@ -512,6 +524,7 @@ u16 func_808F3DD4(PlayState* play, EnIn* this, u32 arg2) {
|
|||
textId = 0x3489;
|
||||
}
|
||||
break;
|
||||
|
||||
case 5:
|
||||
if (func_808F33B8()) {
|
||||
textId = 0x34B3;
|
||||
|
|
@ -521,17 +534,22 @@ u16 func_808F3DD4(PlayState* play, EnIn* this, u32 arg2) {
|
|||
textId = 0x3493;
|
||||
}
|
||||
break;
|
||||
|
||||
case 7:
|
||||
if (gSaveContext.save.playerForm == PLAYER_FORM_DEKU) {
|
||||
textId = 0x34A8;
|
||||
} else if (gSaveContext.save.playerForm == PLAYER_FORM_ZORA ||
|
||||
gSaveContext.save.playerForm == PLAYER_FORM_GORON) {
|
||||
} else if ((gSaveContext.save.playerForm == PLAYER_FORM_ZORA) ||
|
||||
(gSaveContext.save.playerForm == PLAYER_FORM_GORON)) {
|
||||
textId = 0x34A7;
|
||||
} else if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_16_04)) {
|
||||
textId = 0x3495;
|
||||
} else {
|
||||
textId = 0x34A5;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (textId == 0) {
|
||||
textId = 1;
|
||||
|
|
@ -540,10 +558,9 @@ u16 func_808F3DD4(PlayState* play, EnIn* this, u32 arg2) {
|
|||
}
|
||||
|
||||
void func_808F4054(PlayState* play, EnIn* this, s32 arg2, u16 textId) {
|
||||
s32 unused;
|
||||
s32 pad;
|
||||
|
||||
if (textId == 0x34AE || textId == 0x34B0 || textId == 0x34B2) {
|
||||
unused = textId;
|
||||
if ((textId == 0x34AE) || (textId == 0x34B0) || (textId == 0x34B2)) {
|
||||
func_80151BB4(play, 0x11);
|
||||
}
|
||||
switch (arg2) {
|
||||
|
|
@ -554,12 +571,15 @@ void func_808F4054(PlayState* play, EnIn* this, s32 arg2, u16 textId) {
|
|||
func_808F35D8(this, play);
|
||||
}
|
||||
break;
|
||||
|
||||
case 2:
|
||||
if (textId == 0x3473) {
|
||||
func_808F35D8(this, play);
|
||||
}
|
||||
break;
|
||||
|
||||
case 0:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -599,7 +619,7 @@ s32 func_808F4150(PlayState* play, EnIn* this, s32 arg2, MessageContext* msgCtx)
|
|||
|
||||
s32 func_808F4270(PlayState* play, EnIn* this, s32 arg2, MessageContext* msgCtx, s32 arg4) {
|
||||
s32 pad;
|
||||
s32 fee = play->msgCtx.unk1206C != 0xFFFF ? play->msgCtx.unk1206C : 10;
|
||||
s32 fee = (play->msgCtx.unk1206C != 0xFFFF) ? play->msgCtx.unk1206C : 10;
|
||||
|
||||
if (msgCtx->choiceIndex == 0) {
|
||||
func_8019F208();
|
||||
|
|
@ -651,31 +671,38 @@ s32 func_808F4414(PlayState* play, EnIn* this, s32 arg2) {
|
|||
Actor_ContinueText(play, &this->actor, 0x34B0);
|
||||
ret = false;
|
||||
break;
|
||||
|
||||
case 0x34A9:
|
||||
func_808F4108(this, play, 0x34AA);
|
||||
SET_WEEKEVENTREG(WEEKEVENTREG_63_40);
|
||||
ret = false;
|
||||
break;
|
||||
|
||||
case 0x34AA:
|
||||
func_808F4108(this, play, 0x34AB);
|
||||
ret = false;
|
||||
break;
|
||||
|
||||
case 0x34AB:
|
||||
func_808F4108(this, play, 0x34AC);
|
||||
ret = false;
|
||||
break;
|
||||
|
||||
case 0x34AC:
|
||||
func_808F4108(this, play, 0x34AD);
|
||||
ret = false;
|
||||
break;
|
||||
|
||||
case 0x34AD:
|
||||
Actor_ContinueText(play, &this->actor, 0x34AE);
|
||||
ret = false;
|
||||
break;
|
||||
|
||||
case 0x34B1:
|
||||
Actor_ContinueText(play, &this->actor, 0x34B2);
|
||||
ret = false;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
@ -688,48 +715,62 @@ s32 func_808F4414(PlayState* play, EnIn* this, s32 arg2) {
|
|||
Actor_ContinueText(play, &this->actor, 0x3459);
|
||||
ret = false;
|
||||
break;
|
||||
|
||||
case 0x3459:
|
||||
Actor_ContinueText(play, &this->actor, 0x345A);
|
||||
ret = false;
|
||||
break;
|
||||
|
||||
case 0x345A:
|
||||
func_80151BB4(play, 0x11);
|
||||
ret = true;
|
||||
break;
|
||||
|
||||
case 0x345B:
|
||||
func_80151BB4(play, 0x11);
|
||||
ret = true;
|
||||
break;
|
||||
|
||||
case 0x345C:
|
||||
Actor_ContinueText(play, &this->actor, 0x345D);
|
||||
ret = false;
|
||||
break;
|
||||
|
||||
case 0x345D:
|
||||
Actor_ContinueText(play, &this->actor, 0x345E);
|
||||
ret = false;
|
||||
break;
|
||||
|
||||
case 0x345E:
|
||||
Actor_ContinueText(play, &this->actor, 0x345F);
|
||||
ret = false;
|
||||
break;
|
||||
|
||||
case 0x345F:
|
||||
func_80151BB4(play, 0x11);
|
||||
ret = true;
|
||||
break;
|
||||
|
||||
case 0x3460:
|
||||
Actor_ContinueText(play, &this->actor, 0x3461);
|
||||
ret = false;
|
||||
break;
|
||||
|
||||
case 0x3461:
|
||||
Actor_ContinueText(play, &this->actor, 0x3462);
|
||||
ret = false;
|
||||
break;
|
||||
|
||||
case 0x3462:
|
||||
func_80151BB4(play, 0x11);
|
||||
ret = true;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 1:
|
||||
switch (textId) {
|
||||
case 0x3463:
|
||||
|
|
@ -737,14 +778,17 @@ s32 func_808F4414(PlayState* play, EnIn* this, s32 arg2) {
|
|||
Actor_ContinueText(play, &this->actor, 0x3464);
|
||||
ret = false;
|
||||
break;
|
||||
|
||||
case 0x3464:
|
||||
Actor_ContinueText(play, &this->actor, 0x3465);
|
||||
ret = false;
|
||||
break;
|
||||
|
||||
case 0x3465:
|
||||
Actor_ContinueText(play, &this->actor, 0x3466);
|
||||
ret = false;
|
||||
break;
|
||||
|
||||
case 0x3466:
|
||||
if (msgCtx->choiceIndex == 0) {
|
||||
func_8019F208();
|
||||
|
|
@ -769,54 +813,65 @@ s32 func_808F4414(PlayState* play, EnIn* this, s32 arg2) {
|
|||
ret = false;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x3467:
|
||||
case 0x3468:
|
||||
case 0x3469:
|
||||
func_80151BB4(play, 0x11);
|
||||
ret = true;
|
||||
break;
|
||||
|
||||
case 0x346B:
|
||||
Actor_ContinueText(play, &this->actor, 0x346C);
|
||||
ret = false;
|
||||
break;
|
||||
|
||||
case 0x346C:
|
||||
Actor_ContinueText(play, &this->actor, 0x3466);
|
||||
ret = false;
|
||||
break;
|
||||
|
||||
case 0x346A:
|
||||
this->actionFunc = func_808F5A94;
|
||||
func_80151BB4(play, 0x11);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 2:
|
||||
switch (textId) {
|
||||
case 0x346E:
|
||||
func_808F4108(this, play, 0x346F);
|
||||
ret = false;
|
||||
break;
|
||||
|
||||
case 0x3470:
|
||||
Actor_ContinueText(play, &this->actor, 0x3471);
|
||||
ret = false;
|
||||
break;
|
||||
|
||||
case 0x3483:
|
||||
Actor_ContinueText(play, &this->actor, 0x3471);
|
||||
ret = false;
|
||||
break;
|
||||
|
||||
case 0x3471:
|
||||
func_808F4150(play, this, arg2, msgCtx);
|
||||
ret = false;
|
||||
break;
|
||||
|
||||
case 0x3472:
|
||||
func_808F43E0(this);
|
||||
CLEAR_WEEKEVENTREG(WEEKEVENTREG_56_08);
|
||||
func_80151BB4(play, 0x11);
|
||||
ret = true;
|
||||
break;
|
||||
|
||||
case 0x3473:
|
||||
CLEAR_WEEKEVENTREG(WEEKEVENTREG_56_08);
|
||||
func_80151BB4(play, 0x11);
|
||||
break;
|
||||
|
||||
case 0x3475:
|
||||
SET_WEEKEVENTREG_HORSE_RACE_STATE(WEEKEVENTREG_HORSE_RACE_STATE_START);
|
||||
func_800FD750(NA_BGM_HORSE);
|
||||
|
|
@ -825,6 +880,7 @@ s32 func_808F4414(PlayState* play, EnIn* this, s32 arg2) {
|
|||
play->transitionTrigger = TRANS_TRIGGER_START;
|
||||
SET_WEEKEVENTREG(WEEKEVENTREG_57_01);
|
||||
break;
|
||||
|
||||
case 0x3478:
|
||||
if (msgCtx->choiceIndex == 0) {
|
||||
func_808F4150(play, this, arg2, msgCtx);
|
||||
|
|
@ -836,13 +892,18 @@ s32 func_808F4414(PlayState* play, EnIn* this, s32 arg2) {
|
|||
ret = false;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x347B:
|
||||
func_808F4108(this, play, 0x347C);
|
||||
CLEAR_WEEKEVENTREG(WEEKEVENTREG_56_08);
|
||||
ret = false;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 3:
|
||||
switch (textId) {
|
||||
case 0x346D:
|
||||
|
|
@ -851,36 +912,44 @@ s32 func_808F4414(PlayState* play, EnIn* this, s32 arg2) {
|
|||
SET_WEEKEVENTREG(WEEKEVENTREG_56_08);
|
||||
ret = false;
|
||||
break;
|
||||
|
||||
case 0x346F:
|
||||
func_808F4108(this, play, 0x3470);
|
||||
ret = false;
|
||||
break;
|
||||
|
||||
case 0x3482:
|
||||
func_808F4108(this, play, 0x3483);
|
||||
SET_WEEKEVENTREG(WEEKEVENTREG_56_08);
|
||||
ret = false;
|
||||
break;
|
||||
|
||||
case 0x3484:
|
||||
func_80151BB4(play, 0x11);
|
||||
break;
|
||||
|
||||
case 0x3485:
|
||||
func_80151BB4(play, 0x11);
|
||||
break;
|
||||
|
||||
case 0x3474:
|
||||
func_808F4108(this, play, 0x3475);
|
||||
ret = false;
|
||||
break;
|
||||
|
||||
case 0x3476:
|
||||
Actor_ContinueText(play, &this->actor, 0x3477);
|
||||
EnIn_ChangeAnim(&this->skelAnime, ENIN_ANIM_1);
|
||||
EnIn_ChangeAnim(&this->unk4A4->skelAnime, ENIN_ANIM_7);
|
||||
ret = false;
|
||||
break;
|
||||
|
||||
case 0x3477:
|
||||
SET_WEEKEVENTREG(WEEKEVENTREG_56_08);
|
||||
func_808F4108(this, play, 0x3478);
|
||||
ret = false;
|
||||
break;
|
||||
|
||||
case 0x347A:
|
||||
EnIn_ChangeAnim(&this->skelAnime, ENIN_ANIM_1);
|
||||
EnIn_ChangeAnim(&this->unk4A4->skelAnime, ENIN_ANIM_7);
|
||||
|
|
@ -904,33 +973,39 @@ s32 func_808F4414(PlayState* play, EnIn* this, s32 arg2) {
|
|||
ret = false;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x347F:
|
||||
Actor_ContinueText(play, &this->actor, 0x3480);
|
||||
ret = false;
|
||||
break;
|
||||
|
||||
case 0x3480:
|
||||
func_808F43E0(this);
|
||||
func_80151BB4(play, 0x11);
|
||||
ret = true;
|
||||
break;
|
||||
|
||||
case 0x3479:
|
||||
func_808F43E0(this);
|
||||
func_808F35D8(this, play);
|
||||
func_80151BB4(play, 0x11);
|
||||
ret = true;
|
||||
break;
|
||||
|
||||
case 0x347C:
|
||||
this->actionFunc = func_808F3D40;
|
||||
Actor_OfferGetItem(&this->actor, play, GI_MASK_GARO, 500.0f, 100.0f);
|
||||
func_808F35D8(this, play);
|
||||
ret = true;
|
||||
break;
|
||||
|
||||
case 0x3481:
|
||||
this->actionFunc = func_808F5A34;
|
||||
func_808F43E0(this);
|
||||
func_80151BB4(play, 0x11);
|
||||
ret = true;
|
||||
break;
|
||||
|
||||
case 0x347D:
|
||||
this->actionFunc = func_808F5A34;
|
||||
func_808F43E0(this);
|
||||
|
|
@ -938,8 +1013,12 @@ s32 func_808F4414(PlayState* play, EnIn* this, s32 arg2) {
|
|||
func_80151BB4(play, 0x2F);
|
||||
ret = true;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 4:
|
||||
switch (textId) {
|
||||
case 0x3486:
|
||||
|
|
@ -947,34 +1026,45 @@ s32 func_808F4414(PlayState* play, EnIn* this, s32 arg2) {
|
|||
SET_WEEKEVENTREG(WEEKEVENTREG_16_01);
|
||||
ret = false;
|
||||
break;
|
||||
|
||||
case 0x3487:
|
||||
Actor_ContinueText(play, &this->actor, 0x3488);
|
||||
ret = false;
|
||||
break;
|
||||
|
||||
case 0x3488:
|
||||
func_80151BB4(play, 0x11);
|
||||
ret = true;
|
||||
break;
|
||||
|
||||
case 0x3489:
|
||||
func_80151BB4(play, 0x11);
|
||||
break;
|
||||
|
||||
case 0x348A:
|
||||
func_80151BB4(play, 0x11);
|
||||
break;
|
||||
|
||||
case 0x348B:
|
||||
Actor_ContinueText(play, &this->actor, 0x348C);
|
||||
ret = false;
|
||||
break;
|
||||
|
||||
case 0x348C:
|
||||
Actor_ContinueText(play, &this->actor, 0x348D);
|
||||
ret = false;
|
||||
break;
|
||||
|
||||
case 0x348D:
|
||||
func_80151BB4(play, 0x11);
|
||||
ret = true;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 5:
|
||||
switch (textId) {
|
||||
case 0x3468:
|
||||
|
|
@ -982,21 +1072,25 @@ s32 func_808F4414(PlayState* play, EnIn* this, s32 arg2) {
|
|||
case 0x3491:
|
||||
func_80151BB4(play, 0x11);
|
||||
break;
|
||||
|
||||
case 0x348E:
|
||||
case 0x34B3:
|
||||
Actor_ContinueText(play, &this->actor, 0x348F);
|
||||
SET_WEEKEVENTREG(WEEKEVENTREG_16_02);
|
||||
ret = false;
|
||||
break;
|
||||
|
||||
case 0x3493:
|
||||
Actor_ContinueText(play, &this->actor, 0x3494);
|
||||
ret = false;
|
||||
break;
|
||||
|
||||
case 0x348F:
|
||||
case 0x3494:
|
||||
Actor_ContinueText(play, &this->actor, 0x3490);
|
||||
ret = false;
|
||||
break;
|
||||
|
||||
case 0x3490:
|
||||
if (msgCtx->choiceIndex == 0) {
|
||||
func_8019F208();
|
||||
|
|
@ -1021,49 +1115,59 @@ s32 func_808F4414(PlayState* play, EnIn* this, s32 arg2) {
|
|||
ret = false;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x3492:
|
||||
this->actionFunc = func_808F5A94;
|
||||
func_80151BB4(play, 0x11);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 7:
|
||||
switch (textId) {
|
||||
case 0x34A8:
|
||||
func_80151BB4(play, 0x11);
|
||||
break;
|
||||
|
||||
case 0x34A7:
|
||||
func_80151BB4(play, 0x11);
|
||||
break;
|
||||
|
||||
case 0x3495:
|
||||
func_808F4108(this, play, 0x3496);
|
||||
SET_WEEKEVENTREG(WEEKEVENTREG_16_04);
|
||||
SET_WEEKEVENTREG(WEEKEVENTREG_56_08);
|
||||
ret = false;
|
||||
break;
|
||||
|
||||
case 0x3497:
|
||||
func_808F4108(this, play, 0x3498);
|
||||
ret = false;
|
||||
break;
|
||||
|
||||
case 0x34A4:
|
||||
this->actionFunc = func_808F5A34;
|
||||
func_808F43E0(this);
|
||||
func_80151BB4(play, 0x11);
|
||||
ret = true;
|
||||
break;
|
||||
|
||||
case 0x34A5:
|
||||
func_808F4108(this, play, 0x34A6);
|
||||
SET_WEEKEVENTREG(WEEKEVENTREG_56_08);
|
||||
ret = false;
|
||||
break;
|
||||
|
||||
case 0x3473:
|
||||
CLEAR_WEEKEVENTREG(WEEKEVENTREG_56_08);
|
||||
func_80151BB4(play, 0x11);
|
||||
break;
|
||||
|
||||
case 0x3474:
|
||||
Actor_ContinueText(play, &this->actor, 0x3475);
|
||||
ret = false;
|
||||
break;
|
||||
|
||||
case 0x3475:
|
||||
SET_WEEKEVENTREG_HORSE_RACE_STATE(WEEKEVENTREG_HORSE_RACE_STATE_START);
|
||||
func_800FD750(NA_BGM_HORSE);
|
||||
|
|
@ -1072,6 +1176,7 @@ s32 func_808F4414(PlayState* play, EnIn* this, s32 arg2) {
|
|||
play->transitionTrigger = TRANS_TRIGGER_START;
|
||||
SET_WEEKEVENTREG(WEEKEVENTREG_57_01);
|
||||
break;
|
||||
|
||||
case 0x349D:
|
||||
EnIn_ChangeAnim(&this->skelAnime, ENIN_ANIM_1);
|
||||
EnIn_ChangeAnim(&this->unk4A4->skelAnime, ENIN_ANIM_7);
|
||||
|
|
@ -1084,12 +1189,14 @@ s32 func_808F4414(PlayState* play, EnIn* this, s32 arg2) {
|
|||
ret = false;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x349F:
|
||||
this->actionFunc = func_808F3D40;
|
||||
Actor_OfferGetItem(&this->actor, play, GI_MASK_GARO, 500.0f, 100.0f);
|
||||
func_808F35D8(this, play);
|
||||
ret = true;
|
||||
break;
|
||||
|
||||
case 0x34A0:
|
||||
this->actionFunc = func_808F5A34;
|
||||
func_80151BB4(play, 0x11);
|
||||
|
|
@ -1097,6 +1204,7 @@ s32 func_808F4414(PlayState* play, EnIn* this, s32 arg2) {
|
|||
func_808F43E0(this);
|
||||
ret = true;
|
||||
break;
|
||||
|
||||
case 0x34A1:
|
||||
func_808F35D8(this, play);
|
||||
if (Inventory_HasEmptyBottle()) {
|
||||
|
|
@ -1108,25 +1216,30 @@ s32 func_808F4414(PlayState* play, EnIn* this, s32 arg2) {
|
|||
ret = false;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x34A2:
|
||||
Actor_ContinueText(play, &this->actor, 0x34A3);
|
||||
ret = false;
|
||||
break;
|
||||
|
||||
case 0x34A3:
|
||||
func_808F43E0(this);
|
||||
func_80151BB4(play, 0x11);
|
||||
ret = true;
|
||||
break;
|
||||
|
||||
case 0x3499:
|
||||
Actor_ContinueText(play, &this->actor, 0x349A);
|
||||
EnIn_ChangeAnim(&this->skelAnime, ENIN_ANIM_1);
|
||||
EnIn_ChangeAnim(&this->unk4A4->skelAnime, ENIN_ANIM_7);
|
||||
ret = false;
|
||||
break;
|
||||
|
||||
case 0x349A:
|
||||
Actor_ContinueText(play, &this->actor, 0x349B);
|
||||
ret = false;
|
||||
break;
|
||||
|
||||
case 0x349B:
|
||||
if (msgCtx->choiceIndex == 0) {
|
||||
func_808F4270(play, this, arg2, msgCtx, 1);
|
||||
|
|
@ -1137,42 +1250,57 @@ s32 func_808F4414(PlayState* play, EnIn* this, s32 arg2) {
|
|||
ret = false;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x349C:
|
||||
func_808F43E0(this);
|
||||
func_808F35D8(this, play);
|
||||
func_80151BB4(play, 0x11);
|
||||
ret = true;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 6:
|
||||
switch (textId) {
|
||||
case 0x3496:
|
||||
func_808F4108(this, play, 0x3497);
|
||||
ret = false;
|
||||
break;
|
||||
|
||||
case 0x3498:
|
||||
case 0x34A6:
|
||||
Actor_ContinueText(play, &this->actor, 0x3471);
|
||||
ret = false;
|
||||
break;
|
||||
|
||||
case 0x3471:
|
||||
func_808F4270(play, this, arg2, msgCtx, 0);
|
||||
ret = false;
|
||||
break;
|
||||
|
||||
case 0x3472:
|
||||
func_808F43E0(this);
|
||||
CLEAR_WEEKEVENTREG(WEEKEVENTREG_56_08);
|
||||
func_80151BB4(play, 0x11);
|
||||
ret = true;
|
||||
break;
|
||||
|
||||
case 0x349E:
|
||||
func_808F4108(this, play, 0x349F);
|
||||
CLEAR_WEEKEVENTREG(WEEKEVENTREG_56_08);
|
||||
ret = false;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
|
@ -1186,6 +1314,7 @@ s32 func_808F5674(PlayState* play, EnIn* this, s32 arg2) {
|
|||
func_808F4054(play, this, arg2, this->actor.textId);
|
||||
ret = true;
|
||||
break;
|
||||
|
||||
case TEXT_STATE_CHOICE:
|
||||
case TEXT_STATE_5:
|
||||
if (Message_ShouldAdvance(play) && func_808F4414(play, this, arg2)) {
|
||||
|
|
@ -1193,6 +1322,9 @@ s32 func_808F5674(PlayState* play, EnIn* this, s32 arg2) {
|
|||
ret = true;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
|
@ -1368,10 +1500,10 @@ void EnIn_Init(Actor* thisx, PlayState* play) {
|
|||
this->unk4AC = 0;
|
||||
type = ENIN_GET_TYPE(thisx);
|
||||
this->unk4B0 = GET_WEEKEVENTREG_HORSE_RACE_STATE;
|
||||
if (type == ENIN_HORSE_RIDER_BLUE_SHIRT || type == ENIN_BLUE_SHIRT) {
|
||||
if ((type == ENIN_HORSE_RIDER_BLUE_SHIRT) || (type == ENIN_BLUE_SHIRT)) {
|
||||
this->unk4AC |= 8;
|
||||
}
|
||||
if (type == ENIN_HORSE_RIDER_YELLOW_SHIRT || type == ENIN_HORSE_RIDER_BLUE_SHIRT) {
|
||||
if ((type == ENIN_HORSE_RIDER_YELLOW_SHIRT) || (type == ENIN_HORSE_RIDER_BLUE_SHIRT)) {
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, NULL, 0.0f);
|
||||
this->unk488 = 1;
|
||||
Animation_Change(&this->skelAnime, &object_in_Anim_016A60, 1.0f, 0.0f,
|
||||
|
|
@ -1387,7 +1519,7 @@ void EnIn_Init(Actor* thisx, PlayState* play) {
|
|||
this->actor.gravity = -4.0f;
|
||||
this->path = SubS_GetPathByIndex(play, ENIN_GET_PATH(&this->actor), 0x3F);
|
||||
this->unk23D = 0;
|
||||
if (type == ENIN_YELLOW_SHIRT || type == ENIN_BLUE_SHIRT) {
|
||||
if ((type == ENIN_YELLOW_SHIRT) || (type == ENIN_BLUE_SHIRT)) {
|
||||
if ((GET_WEEKEVENTREG_HORSE_RACE_STATE == WEEKEVENTREG_HORSE_RACE_STATE_2) ||
|
||||
(GET_WEEKEVENTREG_HORSE_RACE_STATE == WEEKEVENTREG_HORSE_RACE_STATE_3)) {
|
||||
CLEAR_WEEKEVENTREG(WEEKEVENTREG_56_08);
|
||||
|
|
@ -1478,15 +1610,15 @@ void func_808F6334(EnIn* this, PlayState* play) {
|
|||
Player* player = GET_PLAYER(play);
|
||||
s32 talkState = Message_GetState(&play->msgCtx);
|
||||
|
||||
this->unk4C4 += this->unk4C0 != 0.0f ? 40.0f : -40.0f;
|
||||
this->unk4C4 += (this->unk4C0 != 0.0f) ? 40.0f : -40.0f;
|
||||
this->unk4C4 = CLAMP(this->unk4C4, 0.0f, 80.0f);
|
||||
|
||||
Matrix_Translate(this->unk4C4, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
if ((&this->actor == player->talkActor) &&
|
||||
!((play->msgCtx.currentTextId >= 0xFF) && (play->msgCtx.currentTextId <= 0x200)) &&
|
||||
(talkState == TEXT_STATE_3) && (this->prevTalkState == TEXT_STATE_3)) {
|
||||
((play->msgCtx.currentTextId < 0xFF) || (play->msgCtx.currentTextId > 0x200)) && (talkState == TEXT_STATE_3) &&
|
||||
(this->prevTalkState == TEXT_STATE_3)) {
|
||||
if (!(play->state.frames & 1)) {
|
||||
this->unk4C0 = this->unk4C0 != 0.0f ? 0.0f : 1.0f;
|
||||
this->unk4C0 = (this->unk4C0 != 0.0f) ? 0.0f : 1.0f;
|
||||
}
|
||||
} else {
|
||||
this->unk4C0 = 0.0f;
|
||||
|
|
@ -1520,16 +1652,17 @@ s32 EnIn_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po
|
|||
object_in_DL_013440,
|
||||
};
|
||||
|
||||
if (this->unk23C != 0 && limbIndex != 16) {
|
||||
if ((this->unk23C != 0) && (limbIndex != 16)) {
|
||||
if (sp50[limbIndex] != NULL) {
|
||||
*dList = sp50[limbIndex];
|
||||
}
|
||||
}
|
||||
if (this->unk4AC & 4 && limbIndex == 16) {
|
||||
if ((this->unk4AC & 4) && (limbIndex == 16)) {
|
||||
*dList = object_in_DL_01C528;
|
||||
}
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
if (limbIndex == 16) {
|
||||
TexturePtr sp38[] = { object_in_Tex_0035E0, object_in_Tex_004820, object_in_Tex_004C20, object_in_Tex_0043E0 };
|
||||
|
||||
|
|
@ -1538,6 +1671,7 @@ s32 EnIn_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po
|
|||
} else {
|
||||
AnimatedMat_DrawStep(play, Lib_SegmentedToVirtual(object_in_Matanimheader_001C30), this->unk4AC & 8 ? 1 : 0);
|
||||
}
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
|
||||
if (limbIndex == 16) {
|
||||
|
|
@ -1551,7 +1685,7 @@ s32 EnIn_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po
|
|||
Matrix_RotateYS(this->torsoRot.y, MTXMODE_APPLY);
|
||||
Matrix_RotateXS(this->torsoRot.x, MTXMODE_APPLY);
|
||||
}
|
||||
if (limbIndex == 9 || limbIndex == 10 || limbIndex == 13) {
|
||||
if ((limbIndex == 9) || (limbIndex == 10) || (limbIndex == 13)) {
|
||||
rot->y += (s16)(Math_SinS(this->unk376[limbIndex]) * 200.0f);
|
||||
rot->z += (s16)(Math_CosS(this->unk39E[limbIndex]) * 200.0f);
|
||||
}
|
||||
|
|
@ -1593,21 +1727,25 @@ void EnIn_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot,
|
|||
if (this->unk23C == 0) {
|
||||
if (!(this->unk4AC & 8)) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
if (limbIndex == 12) {
|
||||
gSPDisplayList(POLY_OPA_DISP++, object_in_DL_007A70);
|
||||
}
|
||||
if (limbIndex == 15) {
|
||||
gSPDisplayList(POLY_OPA_DISP++, object_in_DL_007C48);
|
||||
}
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (this->unk4AC & 0x20) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
if (limbIndex == 12) {
|
||||
gSPDisplayList(POLY_OPA_DISP++, object_in_DL_007C48);
|
||||
}
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -321,15 +321,15 @@ s32 func_80B85858(EnKaizoku* this, PlayState* play) {
|
|||
|
||||
for (itemAction = play->actorCtx.actorLists[ACTORCAT_ITEMACTION].first; itemAction != NULL;
|
||||
itemAction = itemAction->next) {
|
||||
//! FAKE:
|
||||
if (1) {}
|
||||
if (((itemAction->id == ACTOR_ARMS_HOOK) || (itemAction->id == ACTOR_EN_ARROW)) && (player->unk_D57)) {
|
||||
if (((itemAction->id != ACTOR_ARMS_HOOK) || (this->action != KAIZOKU_ACTION_13)) &&
|
||||
(this->action != KAIZOKU_ACTION_6)) {
|
||||
func_80B87C7C(this);
|
||||
}
|
||||
break;
|
||||
if (((itemAction->id != ACTOR_ARMS_HOOK) && (itemAction->id != ACTOR_EN_ARROW)) || (player->unk_D57 == 0)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (((itemAction->id != ACTOR_ARMS_HOOK) || (this->action != KAIZOKU_ACTION_13)) &&
|
||||
(this->action != KAIZOKU_ACTION_6)) {
|
||||
func_80B87C7C(this);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (prevAction != this->action) {
|
||||
|
|
@ -423,8 +423,8 @@ s32 func_80B85A00(EnKaizoku* this, PlayState* play, s16 arg2) {
|
|||
func_80B87900(this);
|
||||
} else {
|
||||
sp2A = player->actor.shape.rot.y - this->picto.actor.shape.rot.y;
|
||||
if (this->picto.actor.xzDistToPlayer <= 65.0f && !Actor_OtherIsTargeted(play, &this->picto.actor) &&
|
||||
ABS_ALT(sp2A) < 0x5000) {
|
||||
if ((this->picto.actor.xzDistToPlayer <= 65.0f) && !Actor_OtherIsTargeted(play, &this->picto.actor) &&
|
||||
(ABS_ALT(sp2A) < 0x5000)) {
|
||||
if (this->action != KAIZOKU_ACTION_9) {
|
||||
func_80B87F70(this);
|
||||
return 1;
|
||||
|
|
@ -508,7 +508,7 @@ void func_80B85FA8(EnKaizoku* this, PlayState* play) {
|
|||
this->unk_598 = 0;
|
||||
Audio_SetMainBgmVolume(0, 0xA);
|
||||
this->unk_59C++;
|
||||
|
||||
// fallthrough
|
||||
case 1:
|
||||
player->actor.shape.rot.y = player->actor.world.rot.y =
|
||||
Math_Vec3f_Yaw(&player->actor.world.pos, &this->picto.actor.world.pos);
|
||||
|
|
@ -611,7 +611,7 @@ void func_80B85FA8(EnKaizoku* this, PlayState* play) {
|
|||
func_800B7298(play, &this->picto.actor, 6);
|
||||
CutsceneManager_Stop(this->csId);
|
||||
this->unk_59C = 0;
|
||||
this->subCamId = 0;
|
||||
this->subCamId = SUB_CAM_ID_DONE;
|
||||
this->picto.actor.flags &= ~ACTOR_FLAG_100000;
|
||||
this->picto.actor.flags &= ~ACTOR_FLAG_CANT_LOCK_ON;
|
||||
this->picto.actor.flags |= ACTOR_FLAG_1;
|
||||
|
|
@ -657,7 +657,7 @@ void func_80B85FA8(EnKaizoku* this, PlayState* play) {
|
|||
Math_Vec3f_Copy(&this->subCamAt, &this->unk_5D4);
|
||||
}
|
||||
|
||||
if (this->subCamId != 0) {
|
||||
if (this->subCamId != SUB_CAM_ID_DONE) {
|
||||
this->subCamUp.y = 1.0f;
|
||||
this->subCamUp.z = 0.0f;
|
||||
Play_SetCameraAtEyeUp(play, this->subCamId, &this->subCamAt, &this->subCamEye, &this->subCamUp);
|
||||
|
|
@ -665,7 +665,7 @@ void func_80B85FA8(EnKaizoku* this, PlayState* play) {
|
|||
}
|
||||
|
||||
void func_80B86804(EnKaizoku* this, PlayState* play) {
|
||||
if (this->subCamId == 0) {
|
||||
if (this->subCamId == SUB_CAM_ID_DONE) {
|
||||
if (!CutsceneManager_IsNext(this->csId)) {
|
||||
CutsceneManager_Queue(this->csId);
|
||||
return;
|
||||
|
|
@ -725,7 +725,7 @@ void func_80B868B8(EnKaizoku* this, PlayState* play) {
|
|||
Message_CloseTextbox(play);
|
||||
func_800B7298(play, &this->picto.actor, 6);
|
||||
CutsceneManager_Stop(this->csId);
|
||||
this->subCamId = 0;
|
||||
this->subCamId = SUB_CAM_ID_DONE;
|
||||
play->nextEntrance = play->setupExitList[this->exitIndex];
|
||||
gSaveContext.nextCutsceneIndex = 0;
|
||||
Scene_SetExitFade(play);
|
||||
|
|
@ -733,11 +733,13 @@ void func_80B868B8(EnKaizoku* this, PlayState* play) {
|
|||
this->unk_59C++;
|
||||
this->action = KAIZOKU_ACTION_16;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (this->subCamId != 0) {
|
||||
if (this->subCamId != SUB_CAM_ID_DONE) {
|
||||
this->subCamUp.x = 0.0f;
|
||||
this->subCamUp.y = 1.0f;
|
||||
this->subCamUp.z = 0.0f;
|
||||
|
|
@ -861,7 +863,7 @@ void func_80B86B74(EnKaizoku* this, PlayState* play) {
|
|||
play->envCtx.screenFillColor[3] = 0;
|
||||
play->envCtx.fillScreen = false;
|
||||
this->unk_59C = 0;
|
||||
this->subCamId = 0;
|
||||
this->subCamId = SUB_CAM_ID_DONE;
|
||||
func_800B7298(play, &this->picto.actor, 6);
|
||||
CutsceneManager_Stop(this->csId);
|
||||
if (this->switchFlag >= 0) {
|
||||
|
|
@ -871,6 +873,9 @@ void func_80B86B74(EnKaizoku* this, PlayState* play) {
|
|||
}
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
Math_ApproachF(&this->subCamEye.x, this->unk_5C8.x, 0.5f, this->unk_5E0);
|
||||
Math_ApproachF(&this->subCamEye.y, this->unk_5C8.y, 0.5f, this->unk_5E0);
|
||||
|
|
@ -880,7 +885,7 @@ void func_80B86B74(EnKaizoku* this, PlayState* play) {
|
|||
Math_ApproachF(&this->subCamAt.z, this->unk_5D4.z, 0.5f, this->unk_5E0);
|
||||
Math_ApproachF(&this->unk_5E0, 10.0f, 0.5f, 100.0f);
|
||||
|
||||
if (this->subCamId != 0) {
|
||||
if (this->subCamId != SUB_CAM_ID_DONE) {
|
||||
this->subCamUp.x = 0.0f;
|
||||
this->subCamUp.z = 0.0f;
|
||||
this->subCamUp.y = 1.0f;
|
||||
|
|
@ -990,7 +995,8 @@ void func_80B8760C(EnKaizoku* this, PlayState* play) {
|
|||
this->skelAnime.playSpeed = 1.0f;
|
||||
temp_ft0 = this->skelAnime.curFrame - this->skelAnime.playSpeed;
|
||||
temp_ft1 = this->skelAnime.curFrame + this->skelAnime.playSpeed;
|
||||
if (this->skelAnime.curFrame != 0.0f && ((temp_ft0 < 0 && temp_ft1 > 0) || (temp_ft0 < 5 && temp_ft1 >= 6))) {
|
||||
if ((this->skelAnime.curFrame != 0.0f) &&
|
||||
(((temp_ft0 < 0) && (temp_ft1 > 0)) || ((temp_ft0 < 5) && (temp_ft1 >= 6)))) {
|
||||
Actor_PlaySfx(&this->picto.actor, NA_SE_EN_GERUDOFT_WALK);
|
||||
}
|
||||
|
||||
|
|
@ -1007,12 +1013,10 @@ void func_80B8760C(EnKaizoku* this, PlayState* play) {
|
|||
func_80B87E28(this);
|
||||
}
|
||||
}
|
||||
} else if (this->picto.actor.speed >= 0.0f) {
|
||||
this->picto.actor.shape.rot.y += 0x4000;
|
||||
} else {
|
||||
if (this->picto.actor.speed >= 0.0f) {
|
||||
this->picto.actor.shape.rot.y += 0x4000;
|
||||
} else {
|
||||
this->picto.actor.shape.rot.y -= 0x4000;
|
||||
}
|
||||
this->picto.actor.shape.rot.y -= 0x4000;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1042,8 +1046,8 @@ void func_80B8798C(EnKaizoku* this, PlayState* play) {
|
|||
if (this->lookTimer == 0) {
|
||||
this->unk_2D8 = 0;
|
||||
temp_v0 = this->picto.actor.yawTowardsPlayer - this->picto.actor.shape.rot.y;
|
||||
if (ABS_ALT(temp_v0) <= 0x4000 && this->picto.actor.xzDistToPlayer < 40.0f &&
|
||||
fabsf(this->picto.actor.playerHeightRel) < 50.0f) {
|
||||
if ((ABS_ALT(temp_v0) <= 0x4000) && (this->picto.actor.xzDistToPlayer < 40.0f) &&
|
||||
(fabsf(this->picto.actor.playerHeightRel) < 50.0f)) {
|
||||
if (func_800BE184(play, &this->picto.actor, 100.0f, 10000, 0x4000, this->picto.actor.shape.rot.y)) {
|
||||
if (player->meleeWeaponAnimation == PLAYER_MWA_JUMPSLASH_START) {
|
||||
this->bodyCollider.base.acFlags &= ~AC_HARD;
|
||||
|
|
@ -1068,7 +1072,7 @@ void func_80B8798C(EnKaizoku* this, PlayState* play) {
|
|||
this->bodyCollider.base.acFlags &= ~AC_HARD;
|
||||
func_80B88CD8(this);
|
||||
}
|
||||
} else if (this->unk_2B2 == 0 &&
|
||||
} else if ((this->unk_2B2 == 0) &&
|
||||
func_800BE184(play, &this->picto.actor, 100.0f, 10000, 0x4000, this->picto.actor.shape.rot.y)) {
|
||||
if (player->meleeWeaponAnimation == PLAYER_MWA_JUMPSLASH_START) {
|
||||
this->bodyCollider.base.acFlags &= ~AC_HARD;
|
||||
|
|
@ -1314,7 +1318,7 @@ void func_80B88378(EnKaizoku* this, PlayState* play) {
|
|||
}
|
||||
|
||||
if (!func_80B85A00(this, play, false)) {
|
||||
if (this->picto.actor.xzDistToPlayer < 210.0f && this->picto.actor.xzDistToPlayer > 150.0f &&
|
||||
if ((this->picto.actor.xzDistToPlayer < 210.0f) && (this->picto.actor.xzDistToPlayer > 150.0f) &&
|
||||
Actor_IsFacingPlayer(&this->picto.actor, 0x1388)) {
|
||||
if (Actor_IsTargeted(play, &this->picto.actor)) {
|
||||
if (Rand_ZeroOne() > 0.5f) {
|
||||
|
|
@ -1332,7 +1336,7 @@ void func_80B88378(EnKaizoku* this, PlayState* play) {
|
|||
Actor_PlaySfx(&this->picto.actor, NA_SE_EN_PIRATE_BREATH);
|
||||
}
|
||||
|
||||
if ((this->skelAnime.curFrame != 0.0f) && ((sp30 < 0 && sp2C > 0) || (sp30 < 4 && sp2C >= 5))) {
|
||||
if ((this->skelAnime.curFrame != 0.0f) && (((sp30 < 0) && (sp2C > 0)) || ((sp30 < 4) && (sp2C >= 5)))) {
|
||||
Actor_PlaySfx(&this->picto.actor, NA_SE_EN_GERUDOFT_WALK);
|
||||
}
|
||||
}
|
||||
|
|
@ -1414,7 +1418,7 @@ void func_80B88964(EnKaizoku* this, PlayState* play) {
|
|||
}
|
||||
|
||||
this->unk_2D8 = 0;
|
||||
if (this->frameCount <= curFrame && this->unk_2D0 < 2) {
|
||||
if ((this->frameCount <= curFrame) && (this->unk_2D0 < 2)) {
|
||||
if (!Actor_IsFacingPlayer(&this->picto.actor, 0x1554)) {
|
||||
func_80B872A4(this);
|
||||
this->unk_2B2 = Rand_ZeroOne() * 5.0f + 5.0f;
|
||||
|
|
@ -1584,7 +1588,7 @@ void func_80B891B8(EnKaizoku* this) {
|
|||
// EnKaizoku_Stunned
|
||||
void func_80B89280(EnKaizoku* this, PlayState* play) {
|
||||
if (this->drawDmgEffType == ACTOR_DRAW_DMGEFF_FROZEN_SFX) {
|
||||
if (this->unk_2B8 != 0 && this->unk_2B8 < 60) {
|
||||
if ((this->unk_2B8 != 0) && (this->unk_2B8 < 60)) {
|
||||
this->drawDmgEffType = ACTOR_DRAW_DMGEFF_FROZEN_NO_SFX;
|
||||
}
|
||||
}
|
||||
|
|
@ -1604,8 +1608,8 @@ void func_80B89280(EnKaizoku* this, PlayState* play) {
|
|||
this->unk_2D8 = 0;
|
||||
func_80B85A00(this, play, true);
|
||||
|
||||
if (this->drawDmgEffType == ACTOR_DRAW_DMGEFF_FROZEN_SFX ||
|
||||
this->drawDmgEffType == ACTOR_DRAW_DMGEFF_FROZEN_NO_SFX) {
|
||||
if ((this->drawDmgEffType == ACTOR_DRAW_DMGEFF_FROZEN_SFX) ||
|
||||
(this->drawDmgEffType == ACTOR_DRAW_DMGEFF_FROZEN_NO_SFX)) {
|
||||
Actor_SpawnIceEffects(play, &this->picto.actor, this->bodyPartsPos, ARRAY_COUNT(this->bodyPartsPos), 2,
|
||||
0.7f, 0.4f);
|
||||
this->unk_2B8 = 0;
|
||||
|
|
@ -1655,7 +1659,7 @@ void func_80B894C0(EnKaizoku* this, PlayState* play) {
|
|||
}
|
||||
}
|
||||
|
||||
if (this->picto.actor.xzDistToPlayer <= 65.0f && ((play->gameplayFrames % 8) != 0)) {
|
||||
if ((this->picto.actor.xzDistToPlayer <= 65.0f) && ((play->gameplayFrames % 8) != 0)) {
|
||||
this->swordCollider.info.elemType = ELEMTYPE_UNK2;
|
||||
func_80B87F70(this);
|
||||
} else {
|
||||
|
|
@ -1717,7 +1721,7 @@ void func_80B8971C(EnKaizoku* this, PlayState* play) {
|
|||
|
||||
if (curFrame >= 25.0f) {
|
||||
player = GET_PLAYER(play);
|
||||
if (this->subCamId == 0) {
|
||||
if (this->subCamId == SUB_CAM_ID_DONE) {
|
||||
if (!CutsceneManager_IsNext(this->csId)) {
|
||||
CutsceneManager_Queue(this->csId);
|
||||
return;
|
||||
|
|
@ -1743,7 +1747,7 @@ void func_80B8971C(EnKaizoku* this, PlayState* play) {
|
|||
player->actor.shape.rot.y = player->actor.world.rot.y =
|
||||
Math_Vec3f_Yaw(&player->actor.world.pos, &this->picto.actor.world.pos);
|
||||
|
||||
if (this->subCamId != 0) {
|
||||
if (this->subCamId != SUB_CAM_ID_DONE) {
|
||||
this->subCamUp.x = 0.0f;
|
||||
this->subCamUp.y = 1.0f;
|
||||
this->subCamUp.z = 0.0f;
|
||||
|
|
@ -1775,7 +1779,7 @@ void func_80B89A08(EnKaizoku* this, PlayState* play) {
|
|||
if (!(this->swordCollider.base.atFlags & AT_BOUNCED) && (this->swordCollider.base.atFlags & AT_HIT)) {
|
||||
if ((gSaveContext.save.saveInfo.playerData.health <= 0x10) && (this->action != KAIZOKU_ACTION_16)) {
|
||||
this->unk_2D0 = 2;
|
||||
this->subCamId = 0;
|
||||
this->subCamId = SUB_CAM_ID_DONE;
|
||||
this->picto.actor.flags |= ACTOR_FLAG_100000;
|
||||
|
||||
if (!CutsceneManager_IsNext(this->csId)) {
|
||||
|
|
@ -1793,7 +1797,7 @@ void func_80B89A08(EnKaizoku* this, PlayState* play) {
|
|||
if ((gSaveContext.save.saveInfo.playerData.health <= 0x10) && (this->action != KAIZOKU_ACTION_16)) {
|
||||
Health_ChangeBy(play, 0x10);
|
||||
this->unk_2D0 = 2;
|
||||
this->subCamId = 0;
|
||||
this->subCamId = SUB_CAM_ID_DONE;
|
||||
this->picto.actor.flags |= ACTOR_FLAG_100000;
|
||||
|
||||
if (!CutsceneManager_IsNext(this->csId)) {
|
||||
|
|
@ -1833,7 +1837,7 @@ void func_80B89A08(EnKaizoku* this, PlayState* play) {
|
|||
this->unk_2B8 = 40;
|
||||
this->drawDmgEffType = ACTOR_DRAW_DMGEFF_ELECTRIC_SPARKS_MEDIUM;
|
||||
}
|
||||
/* fallthrough */
|
||||
// fallthrough
|
||||
case KAIZOKU_DMGEFF_1:
|
||||
if (((this->drawDmgEffType != ACTOR_DRAW_DMGEFF_FROZEN_SFX) &&
|
||||
(this->drawDmgEffType != ACTOR_DRAW_DMGEFF_FROZEN_NO_SFX)) ||
|
||||
|
|
@ -1908,6 +1912,9 @@ void func_80B89A08(EnKaizoku* this, PlayState* play) {
|
|||
sp64 = 1;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (sp64) {
|
||||
|
|
@ -2104,11 +2111,11 @@ void EnKaizoku_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s*
|
|||
Matrix_MultVec3f(&sFootOffset, &this->rightFootPos);
|
||||
}
|
||||
|
||||
if (limbIndex == KAIZOKU_LIMB_02 || limbIndex == KAIZOKU_LIMB_06 || limbIndex == KAIZOKU_LIMB_07 ||
|
||||
limbIndex == KAIZOKU_LIMB_08 || limbIndex == KAIZOKU_LIMB_0A || limbIndex == KAIZOKU_LIMB_0C ||
|
||||
limbIndex == KAIZOKU_LIMB_0D || limbIndex == KAIZOKU_LIMB_0F || limbIndex == KAIZOKU_LIMB_11 ||
|
||||
limbIndex == KAIZOKU_LIMB_12 || limbIndex == KAIZOKU_LIMB_L_FOOT || limbIndex == KAIZOKU_LIMB_14 ||
|
||||
limbIndex == KAIZOKU_LIMB_15 || limbIndex == KAIZOKU_LIMB_R_FOOT || limbIndex == KAIZOKU_LIMB_17) {
|
||||
if ((limbIndex == KAIZOKU_LIMB_02) || (limbIndex == KAIZOKU_LIMB_06) || (limbIndex == KAIZOKU_LIMB_07) ||
|
||||
(limbIndex == KAIZOKU_LIMB_08) || (limbIndex == KAIZOKU_LIMB_0A) || (limbIndex == KAIZOKU_LIMB_0C) ||
|
||||
(limbIndex == KAIZOKU_LIMB_0D) || (limbIndex == KAIZOKU_LIMB_0F) || (limbIndex == KAIZOKU_LIMB_11) ||
|
||||
(limbIndex == KAIZOKU_LIMB_12) || (limbIndex == KAIZOKU_LIMB_L_FOOT) || (limbIndex == KAIZOKU_LIMB_14) ||
|
||||
(limbIndex == KAIZOKU_LIMB_15) || (limbIndex == KAIZOKU_LIMB_R_FOOT) || (limbIndex == KAIZOKU_LIMB_17)) {
|
||||
Matrix_MultZero(&this->bodyPartsPos[this->bodyPartsPosIndex]);
|
||||
|
||||
this->bodyPartsPosIndex++;
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ void EnKakasi_Init(Actor* thisx, PlayState* play) {
|
|||
this->unkHeight = (this->picto.actor.world.rot.z * 20.0f) + 60.0f;
|
||||
this->picto.actor.world.rot.z = 0;
|
||||
this->picto.actor.targetMode = 0;
|
||||
if (this->picto.actor.world.rot.x > 0 && this->picto.actor.world.rot.x < 8) {
|
||||
if ((this->picto.actor.world.rot.x > 0) && (this->picto.actor.world.rot.x < 8)) {
|
||||
this->picto.actor.targetMode = KAKASI_GET_TARGETMODE(thisx);
|
||||
}
|
||||
this->picto.actor.shape.rot.y = this->picto.actor.world.rot.y;
|
||||
|
|
@ -208,12 +208,12 @@ s32 EnKakasi_ValidatePictograph(PlayState* play, Actor* thisx) {
|
|||
}
|
||||
|
||||
void EnKakasi_CheckAnimationSfx(EnKakasi* this) {
|
||||
if (this->animIndex == ENKAKASI_ANIM_SIDEWAYS_SHAKING || this->animIndex == ENKAKASI_ANIM_ARMS_CROSSED_STILL) {
|
||||
if ((this->animIndex == ENKAKASI_ANIM_SIDEWAYS_SHAKING) || (this->animIndex == ENKAKASI_ANIM_ARMS_CROSSED_STILL)) {
|
||||
if (Animation_OnFrame(&this->skelanime, 1.0f) || Animation_OnFrame(&this->skelanime, 8.0f)) {
|
||||
Actor_PlaySfx(&this->picto.actor, NA_SE_EV_KAKASHI_SWING);
|
||||
}
|
||||
}
|
||||
if (this->animIndex == ENKAKASI_ANIM_HOPPING_REGULAR || this->animIndex == ENKAKASI_ANIM_SLOWROLL) {
|
||||
if ((this->animIndex == ENKAKASI_ANIM_HOPPING_REGULAR) || (this->animIndex == ENKAKASI_ANIM_SLOWROLL)) {
|
||||
if (Animation_OnFrame(&this->skelanime, 4.0f) || Animation_OnFrame(&this->skelanime, 8.0f)) {
|
||||
Actor_PlaySfx(&this->picto.actor, NA_SE_EV_KAKASHI_SWING);
|
||||
}
|
||||
|
|
@ -225,7 +225,7 @@ void EnKakasi_CheckAnimationSfx(EnKakasi* this) {
|
|||
Actor_PlaySfx(&this->picto.actor, NA_SE_EV_KAKASHI_ROLL);
|
||||
}
|
||||
}
|
||||
if (this->animIndex == ENKAKASI_ANIM_SPIN_REACH_OFFER || this->animIndex == ENKAKASI_ANIM_TWIRL) {
|
||||
if ((this->animIndex == ENKAKASI_ANIM_SPIN_REACH_OFFER) || (this->animIndex == ENKAKASI_ANIM_TWIRL)) {
|
||||
if (Animation_OnFrame(&this->skelanime, 1.0f)) {
|
||||
Actor_PlaySfx(&this->picto.actor, NA_SE_EV_KAKASH_LONGI_ROLL);
|
||||
}
|
||||
|
|
@ -274,12 +274,12 @@ void func_8096FAAC(EnKakasi* this, PlayState* play) {
|
|||
* goes off every frame of song teach, but... doing what?
|
||||
*/
|
||||
void func_8096FBB8(EnKakasi* this, PlayState* play) {
|
||||
if (play->msgCtx.unk12048 == 0 || play->msgCtx.unk12048 == 1 || play->msgCtx.unk12048 == 2 ||
|
||||
play->msgCtx.unk12048 == 3 || play->msgCtx.unk12048 == 4) {
|
||||
if ((play->msgCtx.unk12048 == 0) || (play->msgCtx.unk12048 == 1) || (play->msgCtx.unk12048 == 2) ||
|
||||
(play->msgCtx.unk12048 == 3) || (play->msgCtx.unk12048 == 4)) {
|
||||
// why not 0 < x < 4? fewer branches
|
||||
this->unk190++;
|
||||
}
|
||||
if (this->unk190 != 0 && this->animIndex != ENKAKASI_ANIM_SIDEWAYS_SHAKING) {
|
||||
if ((this->unk190 != 0) && (this->animIndex != ENKAKASI_ANIM_SIDEWAYS_SHAKING)) {
|
||||
EnKakasi_ChangeAnim(this, ENKAKASI_ANIM_SIDEWAYS_SHAKING);
|
||||
}
|
||||
if (this->unk190 > 8) {
|
||||
|
|
@ -299,8 +299,8 @@ void EnKakasi_InitTimeSkipDialogue(EnKakasi* this) {
|
|||
void EnKakasi_TimeSkipDialogue(EnKakasi* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (gSaveContext.respawnFlag != -4 && gSaveContext.respawnFlag != -8) {
|
||||
if (gSaveContext.save.time != CLOCK_TIME(6, 0) && gSaveContext.save.time != CLOCK_TIME(18, 0) &&
|
||||
if ((gSaveContext.respawnFlag != -4) && (gSaveContext.respawnFlag != -8)) {
|
||||
if ((gSaveContext.save.time != CLOCK_TIME(6, 0)) && (gSaveContext.save.time != CLOCK_TIME(18, 0)) &&
|
||||
!CHECK_EVENTINF(EVENTINF_17)) {
|
||||
|
||||
if (this->picto.actor.textId == 0) {
|
||||
|
|
@ -359,7 +359,7 @@ void EnKakasi_IdleStanding(EnKakasi* this, PlayState* play) {
|
|||
EnKakasi_ChangeAnim(this, ENKAKASI_ANIM_SIDEWAYS_SHAKING);
|
||||
this->skelanime.playSpeed = 2.0f;
|
||||
}
|
||||
} else if (saveContextDay == 3 && gSaveContext.save.isNight) {
|
||||
} else if ((saveContextDay == 3) && gSaveContext.save.isNight) {
|
||||
this->skelanime.playSpeed = 1.0f;
|
||||
if (this->animIndex != ENKAKASI_ANIM_SIDEWAYS_SHAKING) {
|
||||
EnKakasi_ChangeAnim(this, 1);
|
||||
|
|
@ -391,16 +391,16 @@ void EnKakasi_RegularDialogue(EnKakasi* this, PlayState* play) {
|
|||
|
||||
Math_SmoothStepToS(&this->picto.actor.shape.rot.y, this->picto.actor.yawTowardsPlayer, 5, 2000, 0);
|
||||
// if first dialogue
|
||||
if (this->picto.actor.textId != 0x1644 && this->animeFrameCount <= currentAnimeFrame &&
|
||||
this->animIndex == ENKAKASI_ANIM_SLOWROLL) {
|
||||
if ((this->picto.actor.textId != 0x1644) && (this->animeFrameCount <= currentAnimeFrame) &&
|
||||
(this->animIndex == ENKAKASI_ANIM_SLOWROLL)) {
|
||||
|
||||
EnKakasi_ChangeAnim(this, ENKAKASI_ANIM_SPIN_REACH_OFFER);
|
||||
this->unkCounter1A4 = 0;
|
||||
}
|
||||
|
||||
// if dialogue: oh sorry come back again
|
||||
if (this->picto.actor.textId == 0x1651 || this->picto.actor.textId == 0x1659) {
|
||||
if (this->animeFrameCount <= currentAnimeFrame && this->animIndex != ENKAKASI_ANIM_SPIN_REACH_OFFER) {
|
||||
if ((this->picto.actor.textId == 0x1651) || (this->picto.actor.textId == 0x1659)) {
|
||||
if ((this->animeFrameCount <= currentAnimeFrame) && (this->animIndex != ENKAKASI_ANIM_SPIN_REACH_OFFER)) {
|
||||
if (++this->unkCounter1A4 >= 2) {
|
||||
this->unkCounter1A4 = 0;
|
||||
EnKakasi_ChangeAnim(this, ENKAKASI_ANIM_SPIN_REACH_OFFER);
|
||||
|
|
@ -408,7 +408,7 @@ void EnKakasi_RegularDialogue(EnKakasi* this, PlayState* play) {
|
|||
}
|
||||
}
|
||||
|
||||
if (this->unkState1A8 == 2 && this->unkState196 == 2) {
|
||||
if ((this->unkState1A8 == 2) && (this->unkState196 == 2)) {
|
||||
func_800B7298(play, &this->picto.actor, PLAYER_CSMODE_73);
|
||||
this->unkState1A8 = 0;
|
||||
}
|
||||
|
|
@ -417,7 +417,7 @@ void EnKakasi_RegularDialogue(EnKakasi* this, PlayState* play) {
|
|||
Message_CloseTextbox(play);
|
||||
if (this->talkState == TEXT_STATE_5) {
|
||||
// bad song input
|
||||
if (this->unkState196 == 2 && this->picto.actor.textId == 0x1647) {
|
||||
if ((this->unkState196 == 2) && (this->picto.actor.textId == 0x1647)) {
|
||||
func_800B7298(play, &this->picto.actor, PLAYER_CSMODE_END);
|
||||
}
|
||||
|
||||
|
|
@ -429,7 +429,7 @@ void EnKakasi_RegularDialogue(EnKakasi* this, PlayState* play) {
|
|||
EnKakasi_ChangeAnim(this, ENKAKASI_ANIM_SIDEWAYS_SHAKING);
|
||||
}
|
||||
|
||||
if (saveContextDay2 == 3 && gSaveContext.save.isNight) {
|
||||
if ((saveContextDay2 == 3) && gSaveContext.save.isNight) {
|
||||
// text: dangerous outside
|
||||
this->picto.actor.textId = 0x164F;
|
||||
} else if (gSaveContext.save.isNight) {
|
||||
|
|
@ -443,8 +443,8 @@ void EnKakasi_RegularDialogue(EnKakasi* this, PlayState* play) {
|
|||
Message_ContinueTextbox(play, this->picto.actor.textId);
|
||||
return;
|
||||
|
||||
} else if (this->picto.actor.textId == 0x165D || this->picto.actor.textId == 0x165F ||
|
||||
this->picto.actor.textId == 0x1660 || this->picto.actor.textId == 0x1652) {
|
||||
} else if ((this->picto.actor.textId == 0x165D) || (this->picto.actor.textId == 0x165F) ||
|
||||
(this->picto.actor.textId == 0x1660) || (this->picto.actor.textId == 0x1652)) {
|
||||
func_800B7298(play, &this->picto.actor, PLAYER_CSMODE_4);
|
||||
if (CutsceneManager_GetCurrentCsId() == CS_ID_GLOBAL_TALK) {
|
||||
CutsceneManager_Stop(CS_ID_GLOBAL_TALK);
|
||||
|
|
@ -462,7 +462,7 @@ void EnKakasi_RegularDialogue(EnKakasi* this, PlayState* play) {
|
|||
}
|
||||
return;
|
||||
|
||||
} else if (this->picto.actor.textId == 0x1645 || this->picto.actor.textId == 0x164E) {
|
||||
} else if ((this->picto.actor.textId == 0x1645) || (this->picto.actor.textId == 0x164E)) {
|
||||
this->picto.actor.textId = 0x1650; // "Shall we dance? No Yes"
|
||||
if (this->animIndex != ENKAKASI_ANIM_SIDEWAYS_SHAKING) {
|
||||
EnKakasi_ChangeAnim(this, ENKAKASI_ANIM_SIDEWAYS_SHAKING);
|
||||
|
|
@ -517,7 +517,7 @@ void EnKakasi_RegularDialogue(EnKakasi* this, PlayState* play) {
|
|||
this->picto.actor.textId = 0x1658;
|
||||
} else if (this->picto.actor.textId == 0x165C) {
|
||||
this->picto.actor.textId = 0x165E;
|
||||
} else if (saveContextDay == 3 && gSaveContext.save.isNight) {
|
||||
} else if ((saveContextDay == 3) && gSaveContext.save.isNight) {
|
||||
this->picto.actor.textId = 0x164F;
|
||||
} else {
|
||||
this->picto.actor.textId = 0x1652;
|
||||
|
|
@ -642,11 +642,12 @@ void EnKakasi_TeachingSong(EnKakasi* this, PlayState* play) {
|
|||
void EnKakasi_PostSongLearnTwirl(EnKakasi* this, PlayState* play) {
|
||||
f32 animeFrame = this->skelanime.curFrame;
|
||||
|
||||
if (this->postTeachTimer == 0 && this->animIndex != ENKAKASI_ANIM_TWIRL) {
|
||||
if ((this->postTeachTimer == 0) && (this->animIndex != ENKAKASI_ANIM_TWIRL)) {
|
||||
EnKakasi_ChangeAnim(this, ENKAKASI_ANIM_TWIRL);
|
||||
this->skelanime.playSpeed = 2.0f;
|
||||
}
|
||||
if (this->postTeachTimer == 0 && this->animIndex == ENKAKASI_ANIM_TWIRL && this->animeFrameCount <= animeFrame) {
|
||||
if ((this->postTeachTimer == 0) && (this->animIndex == ENKAKASI_ANIM_TWIRL) &&
|
||||
(this->animeFrameCount <= animeFrame)) {
|
||||
EnKakasi_SetupPostSongLearnDialogue(this, play);
|
||||
}
|
||||
}
|
||||
|
|
@ -682,16 +683,16 @@ void EnKakasi_PostSongLearnDialogue(EnKakasi* this, PlayState* play) {
|
|||
this->unk190 = 1;
|
||||
}
|
||||
|
||||
if (this->picto.actor.textId == 0x1648 && this->animIndex == ENKAKASI_ANIM_HOPPING_REGULAR &&
|
||||
this->animeFrameCount <= tempAnimFrame) {
|
||||
if ((this->picto.actor.textId == 0x1648) && (this->animIndex == ENKAKASI_ANIM_HOPPING_REGULAR) &&
|
||||
(this->animeFrameCount <= tempAnimFrame)) {
|
||||
this->unkCounter1A4++;
|
||||
if (this->unkCounter1A4 >= 2) {
|
||||
EnKakasi_ChangeAnim(this, ENKAKASI_ANIM_ARMS_CROSSED_ROCKING);
|
||||
}
|
||||
}
|
||||
|
||||
if (this->picto.actor.textId == 0x164B && this->animIndex == ENKAKASI_ANIM_ARMS_CROSSED_ROCKING &&
|
||||
this->animeFrameCount <= tempAnimFrame) {
|
||||
if ((this->picto.actor.textId == 0x164B) && (this->animIndex == ENKAKASI_ANIM_ARMS_CROSSED_ROCKING) &&
|
||||
(this->animeFrameCount <= tempAnimFrame)) {
|
||||
this->unkCounter1A4++;
|
||||
if (this->unkCounter1A4 >= 2) {
|
||||
EnKakasi_ChangeAnim(this, ENKAKASI_ANIM_SPIN_REACH_OFFER);
|
||||
|
|
@ -762,7 +763,7 @@ void EnKakasi_PostSongLearnDialogue(EnKakasi* this, PlayState* play) {
|
|||
EnKakasi_ChangeAnim(this, ENKAKASI_ANIM_TWIRL);
|
||||
|
||||
} else {
|
||||
if (this->picto.actor.textId == 0x164C || this->picto.actor.textId == 0x1661) {
|
||||
if ((this->picto.actor.textId == 0x164C) || (this->picto.actor.textId == 0x1661)) {
|
||||
EnKakasi_SetupDigAway(this);
|
||||
return;
|
||||
}
|
||||
|
|
@ -797,7 +798,7 @@ void EnKakasi_DancingRemark(EnKakasi* this, PlayState* play) {
|
|||
} else {
|
||||
CutsceneManager_StartWithPlayerCs(this->csIdList[0], &this->picto.actor);
|
||||
this->subCamId = CutsceneManager_GetCurrentSubCamId(this->picto.actor.csId);
|
||||
if (currentDay == 3 && gSaveContext.save.isNight) {
|
||||
if ((currentDay == 3) && gSaveContext.save.isNight) {
|
||||
EnKakasi_SetupDigAway(this);
|
||||
} else {
|
||||
Audio_PlaySubBgm(NA_BGM_SARIAS_SONG);
|
||||
|
|
@ -833,15 +834,14 @@ void EnKakasi_DancingNightAway(EnKakasi* this, PlayState* play) {
|
|||
Math_Vec3f_Copy(&localVec3f, &this->subCamEyeNext);
|
||||
OLib_Vec3fAdd(&this->picto.actor.home, &localVec3f, &this->subCamEyeNext, OLIB_ADD_OFFSET);
|
||||
|
||||
if (1) {}
|
||||
this->subCamAtNext.x = D_80971EEC[this->unk190].x + this->unk22C.x;
|
||||
this->subCamAtNext.y = D_80971EEC[this->unk190].y + this->unk22C.y;
|
||||
this->subCamAtNext.z = D_80971EEC[this->unk190].z + this->unk22C.z;
|
||||
if (this->unk190 != 6 && this->unk190 != 7) {
|
||||
if ((this->unk190 != 6) && (this->unk190 != 7)) {
|
||||
Math_Vec3f_Copy(&this->subCamEye, &this->subCamEyeNext);
|
||||
Math_Vec3f_Copy(&this->subCamAt, &this->subCamAtNext);
|
||||
}
|
||||
if (this->unk190 >= 7 && this->unk190 != 0xE) {
|
||||
if ((this->unk190 >= 7) && (this->unk190 != 0xE)) {
|
||||
this->picto.actor.shape.rot.y += 0x800;
|
||||
}
|
||||
|
||||
|
|
@ -853,57 +853,64 @@ void EnKakasi_DancingNightAway(EnKakasi* this, PlayState* play) {
|
|||
// twirling
|
||||
this->unk204 = 0x28;
|
||||
this->unk190++;
|
||||
return;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
// end of twirl, start shaking back and forth
|
||||
if (this->unk204 == 0 && this->animeFrameCount <= currentFrame) {
|
||||
if ((this->unk204 == 0) && (this->animeFrameCount <= currentFrame)) {
|
||||
this->unk204 = 0x14;
|
||||
this->unk190++;
|
||||
EnKakasi_ChangeAnim(this, ENKAKASI_ANIM_SIDEWAYS_SHAKING);
|
||||
}
|
||||
return;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
// camera view on the left
|
||||
if (this->unk204 == 0) {
|
||||
this->unk204 = 0x14;
|
||||
this->unk190++;
|
||||
}
|
||||
return;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
// camera view on the right
|
||||
if (this->unk204 == 0) {
|
||||
this->unk204 = 0x14;
|
||||
this->unk190++;
|
||||
}
|
||||
return;
|
||||
break;
|
||||
|
||||
case 4:
|
||||
// camera view close up front
|
||||
if (this->unk204 == 0) {
|
||||
this->unk204 = 0x14;
|
||||
this->unk190++;
|
||||
}
|
||||
return;
|
||||
break;
|
||||
|
||||
case 5:
|
||||
// camera view zoomed out front
|
||||
if (this->unk204 == 0) {
|
||||
this->unk204 = 0xF;
|
||||
this->unk190++;
|
||||
}
|
||||
return;
|
||||
break;
|
||||
|
||||
case 6:
|
||||
// zoom in and sweep down in from case 5
|
||||
if (this->unk204 == 0) {
|
||||
this->unk204 = 0xF;
|
||||
this->unk190++;
|
||||
}
|
||||
return;
|
||||
break;
|
||||
|
||||
case 7:
|
||||
// zoom in close from case 6
|
||||
if (this->unk204 == 0) {
|
||||
this->unk204 = 0xA;
|
||||
this->unk190++;
|
||||
}
|
||||
return;
|
||||
break;
|
||||
|
||||
case 8:
|
||||
case 9:
|
||||
|
|
@ -921,7 +928,8 @@ void EnKakasi_DancingNightAway(EnKakasi* this, PlayState* play) {
|
|||
this->unk204 = 0x14;
|
||||
}
|
||||
}
|
||||
return;
|
||||
break;
|
||||
|
||||
case 14:
|
||||
// goes off once for some camera changes,
|
||||
// otherwise it's the end when camera is back to normal and Player is confused
|
||||
|
|
@ -933,10 +941,7 @@ void EnKakasi_DancingNightAway(EnKakasi* this, PlayState* play) {
|
|||
PLAYER_PARAMS(0xFF, PLAYER_INITMODE_B), &player->unk_3C0, player->unk_3CC);
|
||||
func_80169EFC(&play->state);
|
||||
|
||||
//! FAKE
|
||||
if (1) {}
|
||||
|
||||
if (gSaveContext.save.time > CLOCK_TIME(18, 0) || gSaveContext.save.time < CLOCK_TIME(6, 0)) {
|
||||
if ((gSaveContext.save.time > CLOCK_TIME(18, 0)) || (gSaveContext.save.time < CLOCK_TIME(6, 0))) {
|
||||
gSaveContext.save.time = CLOCK_TIME(6, 0);
|
||||
gSaveContext.respawnFlag = -4;
|
||||
SET_EVENTINF(EVENTINF_27);
|
||||
|
|
@ -948,6 +953,10 @@ void EnKakasi_DancingNightAway(EnKakasi* this, PlayState* play) {
|
|||
this->unk190 = 0;
|
||||
this->actionFunc = EnKakasi_DoNothing;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1031,8 +1040,8 @@ void EnKakasi_SetupIdleUnderground(EnKakasi* this) {
|
|||
}
|
||||
|
||||
void EnKakasi_IdleUnderground(EnKakasi* this, PlayState* play) {
|
||||
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_79_08) && this->picto.actor.xzDistToPlayer < this->songSummonDist &&
|
||||
(BREG(1) != 0 || play->msgCtx.ocarinaMode == 0xD)) {
|
||||
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_79_08) && (this->picto.actor.xzDistToPlayer < this->songSummonDist) &&
|
||||
((BREG(1) != 0) || (play->msgCtx.ocarinaMode == 0xD))) {
|
||||
this->picto.actor.flags &= ~ACTOR_FLAG_CANT_LOCK_ON;
|
||||
play->msgCtx.ocarinaMode = 4;
|
||||
this->actionFunc = EnKakasi_SetupRiseOutOfGround;
|
||||
|
|
@ -1119,7 +1128,7 @@ void EnKakasi_Update(Actor* thisx, PlayState* play) {
|
|||
DECR(this->unk204);
|
||||
|
||||
if (this->unkState196 != 5) {
|
||||
if (this->unk1BC.x != 0.0f || this->unk1BC.z != 0.0f) {
|
||||
if ((this->unk1BC.x != 0.0f) || (this->unk1BC.z != 0.0f)) {
|
||||
Math_Vec3f_Copy(&this->picto.actor.focus.pos, &this->unk1BC);
|
||||
this->picto.actor.focus.pos.y += 10.0f;
|
||||
if (this->subCamId == SUB_CAM_ID_DONE) {
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ void func_80B2654C(EnKendoJs* this, PlayState* play) {
|
|||
s32 phi_v0;
|
||||
s32 sp30;
|
||||
|
||||
if (Actor_ProcessTalkRequest(&this->actor, &play->state) != 0) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, &play->state)) {
|
||||
if (CURRENT_DAY != 0) {
|
||||
sp30 = CURRENT_DAY - 1;
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ void EnKgy_Init(Actor* thisx, PlayState* play) {
|
|||
this->actionFunc = func_80B419B0;
|
||||
this->actor.textId = 0xC4E;
|
||||
this->unk_29C |= 1;
|
||||
this->unk_2EA = 3;
|
||||
this->getItemId = GI_RUPEE_10;
|
||||
} else {
|
||||
EnKgy_ChangeAnim(this, 4, ANIMMODE_LOOP, 0);
|
||||
this->actionFunc = func_80B42714;
|
||||
|
|
@ -420,12 +420,12 @@ void func_80B4163C(EnKgy* this, PlayState* play) {
|
|||
|
||||
if (SkelAnime_Update(&this->skelAnime)) {
|
||||
if (this->unk_2D2 == 6) {
|
||||
if (this->unk_2EA > 0) {
|
||||
if (this->getItemId > GI_NONE) {
|
||||
EnKgy_ChangeAnim(this, 6, ANIMMODE_ONCE, 0.0f);
|
||||
this->unk_2EA--;
|
||||
this->getItemId--;
|
||||
} else {
|
||||
EnKgy_ChangeAnim(this, 9, ANIMMODE_ONCE, -5.0f);
|
||||
this->unk_2EA = (s32)Rand_ZeroFloat(3.0f) + 2;
|
||||
this->getItemId = (s32)Rand_ZeroFloat(GI_RUPEE_PURPLE - GI_RUPEE_BLUE) + GI_RUPEE_BLUE;
|
||||
}
|
||||
} else {
|
||||
EnKgy_ChangeAnim(this, 6, ANIMMODE_ONCE, -5.0f);
|
||||
|
|
@ -598,7 +598,7 @@ void func_80B41D64(EnKgy* this, PlayState* play) {
|
|||
this->actor.flags |= ACTOR_FLAG_10000;
|
||||
func_800B8500(&this->actor, play, 1000.0f, 1000.0f, PLAYER_IA_MINUS1);
|
||||
} else {
|
||||
Actor_OfferGetItem(&this->actor, play, this->unk_2EA, 2000.0f, 1000.0f);
|
||||
Actor_OfferGetItem(&this->actor, play, this->getItemId, 2000.0f, 1000.0f);
|
||||
}
|
||||
func_80B40EE8(this, play);
|
||||
}
|
||||
|
|
@ -790,16 +790,16 @@ void func_80B41E18(EnKgy* this, PlayState* play) {
|
|||
|
||||
case 0xC50:
|
||||
if (func_80B40D8C(play)) {
|
||||
this->unk_2EA = 57;
|
||||
this->getItemId = GI_SWORD_GILDED;
|
||||
this->actor.textId = 0xC53;
|
||||
} else {
|
||||
this->unk_2EA = 56;
|
||||
this->getItemId = GI_SWORD_RAZOR;
|
||||
this->actor.textId = 0xC51;
|
||||
}
|
||||
Message_CloseTextbox(play);
|
||||
this->actionFunc = func_80B41D64;
|
||||
func_80B413C8(this);
|
||||
Actor_OfferGetItem(&this->actor, play, this->unk_2EA, 2000.0f, 1000.0f);
|
||||
Actor_OfferGetItem(&this->actor, play, this->getItemId, 2000.0f, 1000.0f);
|
||||
break;
|
||||
|
||||
case 0xC51:
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ typedef struct EnKgy {
|
|||
/* 0x2E4 */ s16 unk_2E4;
|
||||
/* 0x2E6 */ s16 unk_2E6;
|
||||
/* 0x2E8 */ s16 unk_2E8;
|
||||
/* 0x2EA */ s16 unk_2EA;
|
||||
/* 0x2EA */ s16 getItemId;
|
||||
/* 0x2EC */ LightInfo lightInfo;
|
||||
/* 0x2FC */ LightNode* lightNode;
|
||||
/* 0x300 */ s16 unk_300;
|
||||
|
|
|
|||
|
|
@ -252,7 +252,7 @@ void EnMa4_RunInCircles(EnMa4* this, PlayState* play) {
|
|||
s32 pad;
|
||||
s16 sp2E;
|
||||
|
||||
if (sAnimIndex != 9 && Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
|
||||
if ((sAnimIndex != 9) && Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
|
||||
if (sAnimIndex == 3) {
|
||||
if (D_80AC0250 < 3) {
|
||||
D_80AC0250++;
|
||||
|
|
@ -268,7 +268,7 @@ void EnMa4_RunInCircles(EnMa4* this, PlayState* play) {
|
|||
}
|
||||
}
|
||||
|
||||
if (sAnimIndex == 13 && Animation_OnFrame(&this->skelAnime, 37.0f)) {
|
||||
if ((sAnimIndex == 13) && Animation_OnFrame(&this->skelAnime, 37.0f)) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EV_ROMANI_BOW_FLICK);
|
||||
}
|
||||
|
||||
|
|
@ -291,7 +291,7 @@ void EnMa4_RunInCircles(EnMa4* this, PlayState* play) {
|
|||
}
|
||||
}
|
||||
|
||||
if (this->pathIndex < this->pathPointsCount - 1) {
|
||||
if (this->pathIndex < (this->pathPointsCount - 1)) {
|
||||
this->pathIndex++;
|
||||
} else {
|
||||
this->pathIndex = 0;
|
||||
|
|
@ -345,7 +345,7 @@ void EnMa4_Wait(EnMa4* this, PlayState* play) {
|
|||
}
|
||||
}
|
||||
|
||||
if (Actor_ProcessTalkRequest(&this->actor, &play->state) != 0) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, &play->state)) {
|
||||
EnMa4_StartDialogue(this, play);
|
||||
EnMa4_SetupDialogueHandler(this);
|
||||
} else if (this->type != MA4_TYPE_ALIENS_WON || ABS_ALT(yaw) < 0x4000) {
|
||||
|
|
@ -483,6 +483,9 @@ void EnMa4_HandlePlayerChoice(EnMa4* this, PlayState* play) {
|
|||
func_80151BB4(play, 5);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -614,6 +617,9 @@ void EnMa4_ChooseNextDialogue(EnMa4* this, PlayState* play) {
|
|||
this->textId = 0x3359;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -629,9 +635,6 @@ void EnMa4_SetupDialogueHandler(EnMa4* this) {
|
|||
|
||||
void EnMa4_DialogueHandler(EnMa4* this, PlayState* play) {
|
||||
switch (Message_GetState(&play->msgCtx)) {
|
||||
default:
|
||||
break;
|
||||
|
||||
case TEXT_STATE_CHOICE: // Player answered a question
|
||||
EnMa4_HandlePlayerChoice(this, play);
|
||||
break;
|
||||
|
|
@ -652,6 +655,9 @@ void EnMa4_DialogueHandler(EnMa4* this, PlayState* play) {
|
|||
case TEXT_STATE_CLOSING:
|
||||
case TEXT_STATE_3:
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (this->type != MA4_TYPE_ALIENS_WON) {
|
||||
|
|
@ -818,12 +824,15 @@ void EnMa4_EponasSongCs(EnMa4* this, PlayState* play) {
|
|||
this->hasBow = false;
|
||||
EnMa4_ChangeAnim(this, 4);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Cutscene_ActorTranslateAndYaw(&this->actor, play, cueChannel);
|
||||
if (sCueId == 2 && this->animTimer == 0 && Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
|
||||
if ((sCueId == 2) && (this->animTimer == 0) && Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
|
||||
EnMa4_ChangeAnim(this, 7);
|
||||
}
|
||||
} else {
|
||||
|
|
@ -845,7 +854,7 @@ void EnMa4_EndEponasSongCs(EnMa4* this, PlayState* play) {
|
|||
Player* player = GET_PLAYER(play);
|
||||
|
||||
this->actor.flags |= ACTOR_FLAG_10000;
|
||||
if (Actor_ProcessTalkRequest(&this->actor, &play->state) != 0) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, &play->state)) {
|
||||
player->stateFlags1 &= ~PLAYER_STATE1_20;
|
||||
Message_StartTextbox(play, 0x334C, &this->actor);
|
||||
this->textId = 0x334C;
|
||||
|
|
@ -1054,7 +1063,9 @@ void EnMa4_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot,
|
|||
} else if (limbIndex == ROMANI_LIMB_LEFT_HAND) {
|
||||
if (this->hasBow == true) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
gSPDisplayList(POLY_OPA_DISP++, gRomaniBowDL);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
}
|
||||
|
|
@ -1064,6 +1075,7 @@ void EnMa4_Draw(Actor* thisx, PlayState* play) {
|
|||
EnMa4* this = THIS;
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
if (this->type == MA4_TYPE_ALIENS_WON) {
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gRomaniWoodenBoxDL);
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ void EnMaYto_Init(Actor* thisx, PlayState* play) {
|
|||
this->unk320 = 0;
|
||||
this->eyeTexIndex = 0;
|
||||
|
||||
if (CURRENT_DAY == 1 || CHECK_WEEKEVENTREG(WEEKEVENTREG_22_01)) {
|
||||
if ((CURRENT_DAY == 1) || CHECK_WEEKEVENTREG(WEEKEVENTREG_22_01)) {
|
||||
EnMaYto_SetFaceExpression(this, 0, 1);
|
||||
} else {
|
||||
EnMaYto_SetFaceExpression(this, 5, 2);
|
||||
|
|
@ -186,13 +186,13 @@ void EnMaYto_Init(Actor* thisx, PlayState* play) {
|
|||
s32 EnMaYto_CheckValidSpawn(EnMaYto* this, PlayState* play) {
|
||||
switch (this->type) {
|
||||
case MA_YTO_TYPE_DEFAULT:
|
||||
if (CURRENT_DAY == 3 && !CHECK_WEEKEVENTREG(WEEKEVENTREG_22_01)) {
|
||||
if ((CURRENT_DAY == 3) && !CHECK_WEEKEVENTREG(WEEKEVENTREG_22_01)) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
|
||||
case MA_YTO_TYPE_DINNER:
|
||||
if (CURRENT_DAY != 1 && CHECK_WEEKEVENTREG(WEEKEVENTREG_22_01)) {
|
||||
if ((CURRENT_DAY != 1) && CHECK_WEEKEVENTREG(WEEKEVENTREG_22_01)) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
|
|
@ -205,7 +205,7 @@ s32 EnMaYto_CheckValidSpawn(EnMaYto* this, PlayState* play) {
|
|||
} else if (((this->actor.params & 0x0F00) >> 8) == 0) {
|
||||
return false;
|
||||
}
|
||||
if (gSaveContext.save.time >= CLOCK_TIME(20, 0) && CURRENT_DAY == 3) {
|
||||
if ((gSaveContext.save.time >= CLOCK_TIME(20, 0)) && (CURRENT_DAY == 3)) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
|
|
@ -218,6 +218,7 @@ s32 EnMaYto_CheckValidSpawn(EnMaYto* this, PlayState* play) {
|
|||
break;
|
||||
|
||||
case MA_YTO_TYPE_4:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -304,8 +305,8 @@ s32 EnMaYto_SearchRomani(EnMaYto* this, PlayState* play) {
|
|||
EnMaYts* romani = (EnMaYts*)npcActor;
|
||||
s16 romaniType = EN_MA_YTS_GET_TYPE(&romani->actor);
|
||||
|
||||
if ((this->type == MA_YTO_TYPE_DINNER && romaniType == MA_YTS_TYPE_SITTING) ||
|
||||
(this->type == MA_YTO_TYPE_BARN && romaniType == MA_YTS_TYPE_BARN)) {
|
||||
if (((this->type == MA_YTO_TYPE_DINNER) && (romaniType == MA_YTS_TYPE_SITTING)) ||
|
||||
((this->type == MA_YTO_TYPE_BARN) && (romaniType == MA_YTS_TYPE_BARN))) {
|
||||
this->actor.child = &romani->actor;
|
||||
romani->actor.parent = &this->actor;
|
||||
return true;
|
||||
|
|
@ -394,8 +395,8 @@ void EnMaYto_DefaultWait(EnMaYto* this, PlayState* play) {
|
|||
s16 direction;
|
||||
|
||||
direction = rotY - this->actor.yawTowardsPlayer;
|
||||
if (Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.home.rot.y, 5, 0x3000, 0x100) == 0 &&
|
||||
this->animIndex == 1) {
|
||||
if (!Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.home.rot.y, 5, 0x3000, 0x100) &&
|
||||
(this->animIndex == 1)) {
|
||||
this->animIndex = 11;
|
||||
EnMaYto_ChangeAnim(this, 11);
|
||||
}
|
||||
|
|
@ -439,7 +440,7 @@ void EnMaYto_DefaultDialogueHandler(EnMaYto* this, PlayState* play) {
|
|||
}
|
||||
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 5, 0x3000, 0x100);
|
||||
if (this->textId == 0x3395 && this->skelAnime.animation == &gCremiaSpreadArmsStartAnim &&
|
||||
if ((this->textId == 0x3395) && (this->skelAnime.animation == &gCremiaSpreadArmsStartAnim) &&
|
||||
Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
|
||||
EnMaYto_ChangeAnim(this, 4);
|
||||
}
|
||||
|
|
@ -490,12 +491,15 @@ void EnMaYto_DefaultChooseNextDialogue(EnMaYto* this, PlayState* play) {
|
|||
this->textId = 0x3396;
|
||||
func_80151BB4(play, 6);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void EnMaYto_SetupDinnerWait(EnMaYto* this) {
|
||||
if (CURRENT_DAY == 1 || CHECK_WEEKEVENTREG(WEEKEVENTREG_22_01)) {
|
||||
if ((CURRENT_DAY == 1) || CHECK_WEEKEVENTREG(WEEKEVENTREG_22_01)) {
|
||||
func_80B90E50(this, 0);
|
||||
this->unk31E = 0;
|
||||
} else {
|
||||
|
|
@ -516,7 +520,7 @@ void EnMaYto_DinnerWait(EnMaYto* this, PlayState* play) {
|
|||
} else {
|
||||
Actor* child = this->actor.child;
|
||||
|
||||
if (child != NULL && Actor_ProcessTalkRequest(child, &play->state)) {
|
||||
if ((child != NULL) && Actor_ProcessTalkRequest(child, &play->state)) {
|
||||
Actor_ChangeFocus(&this->actor, play, &this->actor);
|
||||
EnMaYto_DinnerStartDialogue(this, play);
|
||||
EnMaYto_SetupDinnerDialogueHandler(this);
|
||||
|
|
@ -524,7 +528,7 @@ void EnMaYto_DinnerWait(EnMaYto* this, PlayState* play) {
|
|||
func_800B8614(&this->actor, play, 120.0f);
|
||||
|
||||
child = this->actor.child;
|
||||
if (child != NULL && CURRENT_DAY != 2) {
|
||||
if ((child != NULL) && (CURRENT_DAY != 2)) {
|
||||
s16 childDirection = child->shape.rot.y - child->yawTowardsPlayer;
|
||||
|
||||
if (ABS_ALT(childDirection) < 0x4000) {
|
||||
|
|
@ -536,7 +540,7 @@ void EnMaYto_DinnerWait(EnMaYto* this, PlayState* play) {
|
|||
}
|
||||
|
||||
void EnMaYto_SetupDinnerDialogueHandler(EnMaYto* this) {
|
||||
if (CURRENT_DAY == 1 || CHECK_WEEKEVENTREG(WEEKEVENTREG_22_01)) {
|
||||
if ((CURRENT_DAY == 1) || CHECK_WEEKEVENTREG(WEEKEVENTREG_22_01)) {
|
||||
func_80B90E50(this, 1);
|
||||
} else {
|
||||
func_80B90E50(this, 2);
|
||||
|
|
@ -682,12 +686,15 @@ void EnMaYto_DinnerChooseNextDialogue(EnMaYto* this, PlayState* play) {
|
|||
this->textId = 0x33A8;
|
||||
func_80151BB4(play, 6);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void EnMaYto_SetupBarnWait(EnMaYto* this) {
|
||||
if (CURRENT_DAY == 1 || CHECK_WEEKEVENTREG(WEEKEVENTREG_22_01)) {
|
||||
if ((CURRENT_DAY == 1) || CHECK_WEEKEVENTREG(WEEKEVENTREG_22_01)) {
|
||||
EnMaYto_ChangeAnim(this, 13);
|
||||
func_80B90E50(this, 0);
|
||||
this->unk31E = 0;
|
||||
|
|
@ -711,11 +718,11 @@ void EnMaYto_BarnWait(EnMaYto* this, PlayState* play) {
|
|||
} else {
|
||||
Actor* child = this->actor.child;
|
||||
|
||||
if (child != NULL && Actor_ProcessTalkRequest(child, &play->state)) {
|
||||
if ((child != NULL) && Actor_ProcessTalkRequest(child, &play->state)) {
|
||||
Actor_ChangeFocus(&this->actor, play, &this->actor);
|
||||
EnMaYto_BarnStartDialogue(this, play);
|
||||
EnMaYto_SetupBarnDialogueHandler(this);
|
||||
} else if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_22_01) || ABS_ALT(direction) < 0x2000) {
|
||||
} else if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_22_01) || (ABS_ALT(direction) < 0x2000)) {
|
||||
func_800B8614(&this->actor, play, 100.0f);
|
||||
|
||||
child = this->actor.child;
|
||||
|
|
@ -727,7 +734,7 @@ void EnMaYto_BarnWait(EnMaYto* this, PlayState* play) {
|
|||
}
|
||||
|
||||
void EnMaYto_SetupBarnDialogueHandler(EnMaYto* this) {
|
||||
if (CURRENT_DAY == 1 || CHECK_WEEKEVENTREG(WEEKEVENTREG_22_01)) {
|
||||
if ((CURRENT_DAY == 1) || CHECK_WEEKEVENTREG(WEEKEVENTREG_22_01)) {
|
||||
func_80B90E50(this, 1);
|
||||
} else {
|
||||
func_80B90E50(this, 2);
|
||||
|
|
@ -948,6 +955,9 @@ void EnMaYto_AfterMilkRunChooseNextDialogue(EnMaYto* this, PlayState* play) {
|
|||
EnMaYto_SetupPostMilkRunGiveReward(this);
|
||||
EnMaYto_PostMilkRunGiveReward(this, play);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1047,12 +1057,15 @@ void EnMaYto_WarmFuzzyFeelingCs(EnMaYto* this, PlayState* play) {
|
|||
case 3:
|
||||
EnMaYto_ChangeAnim(this, 22);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Cutscene_ActorTranslateAndYaw(&this->actor, play, cueChannel);
|
||||
if (sCueId == 2 && this->skelAnime.animation == &gCremiaHugStartAnim &&
|
||||
if ((sCueId == 2) && (this->skelAnime.animation == &gCremiaHugStartAnim) &&
|
||||
Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
|
||||
EnMaYto_ChangeAnim(this, 20);
|
||||
}
|
||||
|
|
@ -1066,14 +1079,14 @@ void EnMaYto_SetupPostMilkRunWaitDialogueEnd(EnMaYto* this) {
|
|||
}
|
||||
|
||||
void EnMaYto_PostMilkRunWaitDialogueEnd(EnMaYto* this, PlayState* play) {
|
||||
if (Message_GetState(&play->msgCtx) == TEXT_STATE_DONE || Message_GetState(&play->msgCtx) == TEXT_STATE_5) {
|
||||
if (Message_ShouldAdvance(play) && Message_GetState(&play->msgCtx) == TEXT_STATE_5) {
|
||||
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) || (Message_GetState(&play->msgCtx) == TEXT_STATE_5)) {
|
||||
if (Message_ShouldAdvance(play) && (Message_GetState(&play->msgCtx) == TEXT_STATE_5)) {
|
||||
func_800B7298(play, &this->actor, PLAYER_CSMODE_WAIT);
|
||||
Message_CloseTextbox(play);
|
||||
}
|
||||
}
|
||||
|
||||
if (Message_GetState(&play->msgCtx) == TEXT_STATE_NONE && play->msgCtx.unk120B1 == 0) {
|
||||
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_NONE) && (play->msgCtx.unk120B1 == 0)) {
|
||||
EnMaYto_SetupPostMilkRunEnd(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -1096,7 +1109,7 @@ void EnMaYto_PostMilkRunEnd(EnMaYto* this, PlayState* play) {
|
|||
|
||||
void EnMaYto_DefaultStartDialogue(EnMaYto* this, PlayState* play) {
|
||||
if (CURRENT_DAY == 1) {
|
||||
if (Player_GetMask(play) != PLAYER_MASK_NONE && gSaveContext.save.playerForm == PLAYER_FORM_HUMAN) {
|
||||
if ((Player_GetMask(play) != PLAYER_MASK_NONE) && (gSaveContext.save.playerForm == PLAYER_FORM_HUMAN)) {
|
||||
switch (Player_GetMask(play)) {
|
||||
case PLAYER_MASK_ROMANI:
|
||||
Message_StartTextbox(play, 0x235D, &this->actor);
|
||||
|
|
@ -1155,7 +1168,7 @@ void EnMaYto_DefaultStartDialogue(EnMaYto* this, PlayState* play) {
|
|||
void EnMaYto_DinnerStartDialogue(EnMaYto* this, PlayState* play) {
|
||||
switch (CURRENT_DAY) {
|
||||
case 1:
|
||||
if (Player_GetMask(play) != PLAYER_MASK_NONE && gSaveContext.save.playerForm == PLAYER_FORM_HUMAN) {
|
||||
if ((Player_GetMask(play) != PLAYER_MASK_NONE) && (gSaveContext.save.playerForm == PLAYER_FORM_HUMAN)) {
|
||||
switch (Player_GetMask(play)) {
|
||||
case PLAYER_MASK_ROMANI:
|
||||
Message_StartTextbox(play, 0x235D, &this->actor);
|
||||
|
|
@ -1217,6 +1230,9 @@ void EnMaYto_DinnerStartDialogue(EnMaYto* this, PlayState* play) {
|
|||
this->textId = 0x33A7;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1324,7 +1340,7 @@ void EnMaYto_UpdateEyes(EnMaYto* this) {
|
|||
void func_80B90E50(EnMaYto* this, s16 arg1) {
|
||||
EnMaYts* romani = (EnMaYts*)this->actor.child;
|
||||
|
||||
if (romani != NULL && romani->actor.id == ACTOR_EN_MA_YTS) {
|
||||
if ((romani != NULL) && (romani->actor.id == ACTOR_EN_MA_YTS)) {
|
||||
romani->unk_32C = arg1;
|
||||
}
|
||||
}
|
||||
|
|
@ -1344,7 +1360,7 @@ void EnMaYto_SetFaceExpression(EnMaYto* this, s16 overrideEyeTexIndex, s16 mouth
|
|||
}
|
||||
|
||||
void EnMaYto_InitFaceExpression(EnMaYto* this) {
|
||||
if (CURRENT_DAY == 1 || CHECK_WEEKEVENTREG(WEEKEVENTREG_22_01)) {
|
||||
if ((CURRENT_DAY == 1) || CHECK_WEEKEVENTREG(WEEKEVENTREG_22_01)) {
|
||||
EnMaYto_SetFaceExpression(this, 0, 1);
|
||||
EnMaYto_SetRomaniFaceExpression(this, 0, 0);
|
||||
} else {
|
||||
|
|
@ -1372,27 +1388,33 @@ s32 EnMaYto_HasSpokenToPlayerToday(void) {
|
|||
return true;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
s32 EnMaYto_HasSpokenToPlayer(void) {
|
||||
// Please note no case here has a `break`.
|
||||
switch (CURRENT_DAY) {
|
||||
case 3:
|
||||
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_13_10)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// fallthrough
|
||||
case 2:
|
||||
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_13_08)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// fallthrough
|
||||
case 1:
|
||||
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_13_04)) {
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
@ -1410,6 +1432,9 @@ void EnMaYto_SetTalkedFlag(void) {
|
|||
case 3:
|
||||
SET_WEEKEVENTREG(WEEKEVENTREG_13_10);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1458,7 +1483,8 @@ void EnMaYto_Draw(Actor* thisx, PlayState* play) {
|
|||
s32 pad;
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
if (this->type == MA_YTO_TYPE_BARN && CHECK_WEEKEVENTREG(WEEKEVENTREG_22_01)) {
|
||||
|
||||
if ((this->type == MA_YTO_TYPE_BARN) && CHECK_WEEKEVENTREG(WEEKEVENTREG_22_01)) {
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gCremiaWoodenBoxDL);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ void func_80B8D12C(EnMaYts* this, PlayState* play) {
|
|||
Player* player = GET_PLAYER(play);
|
||||
s16 trackingMode = (this->unk_32C == 2) ? NPC_TRACKING_NONE : NPC_TRACKING_PLAYER_AUTO_TURN;
|
||||
|
||||
if (this->unk_32C == 0 || this->actor.parent == NULL) {
|
||||
if ((this->unk_32C == 0) || (this->actor.parent == NULL)) {
|
||||
this->interactInfo.trackPos = player->actor.world.pos;
|
||||
this->interactInfo.trackPos.y -= -10.0f;
|
||||
} else {
|
||||
|
|
@ -144,7 +144,7 @@ void EnMaYts_InitAnimation(EnMaYts* this, PlayState* play) {
|
|||
case MA_YTS_TYPE_SITTING:
|
||||
this->actor.targetMode = 6;
|
||||
// Day 1 or "Winning" the alien invasion
|
||||
if (CURRENT_DAY == 1 || CHECK_WEEKEVENTREG(WEEKEVENTREG_22_01)) {
|
||||
if ((CURRENT_DAY == 1) || CHECK_WEEKEVENTREG(WEEKEVENTREG_22_01)) {
|
||||
EnMaYts_ChangeAnim(this, 14);
|
||||
} else {
|
||||
EnMaYts_ChangeAnim(this, 18);
|
||||
|
|
@ -188,6 +188,9 @@ s32 EnMaYts_CheckValidSpawn(EnMaYts* this, PlayState* play) {
|
|||
return false;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
@ -195,7 +198,7 @@ s32 EnMaYts_CheckValidSpawn(EnMaYts* this, PlayState* play) {
|
|||
// Failing the alien invasion
|
||||
if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_22_01)) {
|
||||
return false;
|
||||
} else if (gSaveContext.save.time >= CLOCK_TIME(20, 0) && CURRENT_DAY == 3) {
|
||||
} else if ((gSaveContext.save.time >= CLOCK_TIME(20, 0)) && (CURRENT_DAY == 3)) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
|
|
@ -209,6 +212,9 @@ s32 EnMaYts_CheckValidSpawn(EnMaYts* this, PlayState* play) {
|
|||
|
||||
case MA_YTS_TYPE_ENDCREDITS:
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
@ -266,7 +272,7 @@ void EnMaYts_Init(Actor* thisx, PlayState* play) {
|
|||
this->mouthTexIndex = 0;
|
||||
this->unk_32C = 2;
|
||||
EnMaYts_SetupEndCreditsHandler(this);
|
||||
} else if (CURRENT_DAY == 2 && gSaveContext.save.isNight == 1 && CHECK_WEEKEVENTREG(WEEKEVENTREG_22_01)) {
|
||||
} else if ((CURRENT_DAY == 2) && (gSaveContext.save.isNight == 1) && CHECK_WEEKEVENTREG(WEEKEVENTREG_22_01)) {
|
||||
EnMaYts_SetupStartDialogue(this);
|
||||
} else {
|
||||
EnMaYts_SetupDoNothing(this);
|
||||
|
|
@ -406,6 +412,9 @@ void EnMaYts_EndCreditsHandler(EnMaYts* this, PlayState* play) {
|
|||
this->hasBow = true;
|
||||
EnMaYts_ChangeAnim(this, 20);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -526,7 +535,9 @@ void EnMaYts_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* ro
|
|||
} else if (limbIndex == ROMANI_LIMB_LEFT_HAND) {
|
||||
if (this->hasBow == true) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
gSPDisplayList(POLY_OPA_DISP++, gRomaniBowDL);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -608,9 +608,11 @@ void EnMinifrog_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s*
|
|||
|
||||
if ((limbIndex == 7) || (limbIndex == 8)) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
Matrix_ReplaceRotation(&play->billboardMtxF);
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, *dList);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ void EnMuto_Init(Actor* thisx, PlayState* play) {
|
|||
this->textIdIndex = 3;
|
||||
}
|
||||
|
||||
if (gSaveContext.save.day != 3 || !gSaveContext.save.isNight) {
|
||||
if ((gSaveContext.save.day != 3) || !gSaveContext.save.isNight) {
|
||||
Actor_Kill(&this->actor);
|
||||
}
|
||||
} else {
|
||||
|
|
@ -113,7 +113,7 @@ void EnMuto_SetHeadRotation(EnMuto* this) {
|
|||
s32 yawRotToTarget = ABS_ALT(BINANG_SUB(this->yawTowardsTarget, this->actor.world.rot.y));
|
||||
|
||||
this->headRotTarget.y = 0;
|
||||
if (this->actor.xzDistToPlayer < 200.0f && yawRotToTarget < 0x4E20) {
|
||||
if ((this->actor.xzDistToPlayer < 200.0f) && (yawRotToTarget < 0x4E20)) {
|
||||
this->headRotTarget.y = BINANG_SUB(this->yawTowardsTarget, this->actor.world.rot.y);
|
||||
if (this->headRotTarget.y > 0x2710) {
|
||||
this->headRotTarget.y = 0x2710;
|
||||
|
|
@ -146,7 +146,7 @@ void EnMuto_Idle(EnMuto* this, PlayState* play) {
|
|||
|
||||
if (1) {} // Needed to match
|
||||
|
||||
if (!this->isInMayorsRoom && Player_GetMask(play) == PLAYER_MASK_KAFEIS_MASK) {
|
||||
if (!this->isInMayorsRoom && (Player_GetMask(play) == PLAYER_MASK_KAFEIS_MASK)) {
|
||||
this->actor.textId = 0x2363;
|
||||
}
|
||||
|
||||
|
|
@ -229,8 +229,8 @@ void EnMuto_InDialogue(EnMuto* this, PlayState* play) {
|
|||
}
|
||||
}
|
||||
|
||||
if (play->msgCtx.currentTextId == 0x2AC6 || play->msgCtx.currentTextId == 0x2AC7 ||
|
||||
play->msgCtx.currentTextId == 0x2AC8) {
|
||||
if ((play->msgCtx.currentTextId == 0x2AC6) || (play->msgCtx.currentTextId == 0x2AC7) ||
|
||||
(play->msgCtx.currentTextId == 0x2AC8)) {
|
||||
this->skelAnime.playSpeed = 0.0f;
|
||||
this->yawTowardsTarget = this->actor.yawTowardsPlayer;
|
||||
this->skelAnime.curFrame = 30.0f;
|
||||
|
|
@ -254,7 +254,7 @@ void EnMuto_Update(Actor* thisx, PlayState* play2) {
|
|||
EnMuto_SetHeadRotation(this);
|
||||
}
|
||||
|
||||
if (this->isInMayorsRoom && gSaveContext.save.day == 3 && gSaveContext.save.isNight) {
|
||||
if (this->isInMayorsRoom && (gSaveContext.save.day == 3) && gSaveContext.save.isNight) {
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -188,6 +188,7 @@ void EnNiw_AnimateWingHead(EnNiw* this, PlayState* play, s16 animationState) {
|
|||
this->targetLimbRots[2] = 0.0f; // both wingRotZ
|
||||
this->targetLimbRots[1] = 0.0f;
|
||||
break;
|
||||
|
||||
case NIW_ANIM_HEAD_PECKING:
|
||||
this->unkTimer24E = 3;
|
||||
this->targetLimbRots[2] = 7000.0f * tempOne; // both wingRotZ
|
||||
|
|
@ -235,6 +236,9 @@ void EnNiw_AnimateWingHead(EnNiw* this, PlayState* play, s16 animationState) {
|
|||
this->targetLimbRots[7] = 10000.0f;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -271,7 +275,7 @@ void EnNiw_SpawnAttackNiw(EnNiw* this, PlayState* play) {
|
|||
Vec3f newNiwPos;
|
||||
Actor* attackNiw;
|
||||
|
||||
if (this->attackNiwSpawnTimer == 0 && this->attackNiwCount < 7) {
|
||||
if ((this->attackNiwSpawnTimer == 0) && (this->attackNiwCount < 7)) {
|
||||
xView = play->view.at.x - play->view.eye.x;
|
||||
yView = play->view.at.y - play->view.eye.y;
|
||||
zView = play->view.at.z - play->view.eye.z;
|
||||
|
|
@ -312,7 +316,7 @@ void EnNiw_UpdateRunning(EnNiw* this, PlayState* play, s32 isStormCucco) {
|
|||
runningDirection = -runningAngles[isStormCucco];
|
||||
}
|
||||
|
||||
if (isStormCucco == true && (this->runAwayTimer == 0 || (this->actor.bgCheckFlags & BGCHECKFLAG_WALL))) {
|
||||
if ((isStormCucco == true) && ((this->runAwayTimer == 0) || (this->actor.bgCheckFlags & BGCHECKFLAG_WALL))) {
|
||||
this->runAwayTimer = 150;
|
||||
if (this->yawTimer == 0) {
|
||||
this->yawTimer = 70;
|
||||
|
|
@ -367,7 +371,7 @@ void EnNiw_Idle(EnNiw* this, PlayState* play) {
|
|||
Math_ApproachF(&this->targetLimbRots[9], sHeadRotations[this->headRotationToggle], 0.5f, 4000.0f); // head rot
|
||||
}
|
||||
|
||||
if (this->unkIdleTimer2 == 0 && this->unkIdleTimer == 0) {
|
||||
if ((this->unkIdleTimer2 == 0) && (this->unkIdleTimer == 0)) {
|
||||
this->unk298++;
|
||||
if (this->unk298 > 7) {
|
||||
this->unkIdleTimer2 = Rand_ZeroFloat(30.0f);
|
||||
|
|
@ -469,14 +473,14 @@ void EnNiw_Held(EnNiw* this, PlayState* play) {
|
|||
|
||||
void EnNiw_Thrown(EnNiw* this, PlayState* play) {
|
||||
if (this->unk2EC == 0) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
this->unk2EC = 1;
|
||||
this->hoppingTimer = 80; // hop timer
|
||||
this->actor.speed = 0.0f;
|
||||
this->actor.velocity.y = 4.0f;
|
||||
} else {
|
||||
return; // wait until back on floor
|
||||
if (!(this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) {
|
||||
// wait until back on floor
|
||||
return;
|
||||
}
|
||||
this->unk2EC = 1;
|
||||
this->hoppingTimer = 80;
|
||||
this->actor.speed = 0.0f;
|
||||
this->actor.velocity.y = 4.0f;
|
||||
} else {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
this->sfxTimer1 = 0;
|
||||
|
|
@ -683,10 +687,10 @@ void EnNiw_LandBeforeIdle(EnNiw* this, PlayState* play) {
|
|||
}
|
||||
|
||||
void EnNiw_CheckRage(EnNiw* this, PlayState* play) {
|
||||
if (!this->isStormActive && this->iframeTimer == 0 && this->niwType == NIW_TYPE_REGULAR) {
|
||||
if (!this->isStormActive && (this->iframeTimer == 0) && (this->niwType == NIW_TYPE_REGULAR)) {
|
||||
|
||||
// is this used? this is before we even know if we've been hit
|
||||
if (this->niwState != NIW_STATE_RUNNING && this->unk2BC.x != 90000.0f) {
|
||||
if ((this->niwState != NIW_STATE_RUNNING) && (this->unk2BC.x != 90000.0f)) {
|
||||
this->iframeTimer = 10;
|
||||
this->sfxTimer1 = 30;
|
||||
this->unk29E = 1;
|
||||
|
|
@ -703,7 +707,7 @@ void EnNiw_CheckRage(EnNiw* this, PlayState* play) {
|
|||
this->actor.colChkInfo.health--;
|
||||
}
|
||||
|
||||
if (!sCuccoStormActive && this->actor.colChkInfo.health == 0) {
|
||||
if (!sCuccoStormActive && (this->actor.colChkInfo.health == 0)) {
|
||||
this->runAwayTimer = 100; // main cucco will run away after storm starts
|
||||
sCuccoStormActive = true;
|
||||
this->unk298 = 0;
|
||||
|
|
@ -774,7 +778,7 @@ void EnNiw_Update(Actor* thisx, PlayState* play) {
|
|||
pos.z = randPlusMinusPoint5Scaled(10.0f) + this->actor.world.pos.z;
|
||||
featherScale = Rand_ZeroFloat(6.0f) + 6.0f;
|
||||
|
||||
if (this->unk29E == 2 && this->unk308 != 0) {
|
||||
if ((this->unk29E == 2) && (this->unk308 != 0)) {
|
||||
pos.y += 10.0f;
|
||||
}
|
||||
|
||||
|
|
@ -817,7 +821,7 @@ void EnNiw_Update(Actor* thisx, PlayState* play) {
|
|||
UPDBGCHECKINFO_FLAG_8 | UPDBGCHECKINFO_FLAG_10);
|
||||
|
||||
// if cucco is off the map
|
||||
if (this->actor.floorHeight <= BGCHECK_Y_MIN || this->actor.floorHeight >= BGCHECK_Y_MAX) {
|
||||
if ((this->actor.floorHeight <= BGCHECK_Y_MIN) || (this->actor.floorHeight >= BGCHECK_Y_MAX)) {
|
||||
Vec3f viewAtToEye;
|
||||
|
||||
// Direction vector for the direction the camera is facing
|
||||
|
|
@ -881,12 +885,12 @@ void EnNiw_Update(Actor* thisx, PlayState* play) {
|
|||
return;
|
||||
}
|
||||
|
||||
if (this->isStormActive && (this->actor.xyzDistToPlayerSq < SQ(dist)) && player->invincibilityTimer == 0) {
|
||||
if (this->isStormActive && (this->actor.xyzDistToPlayerSq < SQ(dist)) && (player->invincibilityTimer == 0)) {
|
||||
func_800B8D50(play, &this->actor, 2.0f, this->actor.world.rot.y, 0.0f, 0x10);
|
||||
}
|
||||
|
||||
EnNiw_CheckRage(this, play);
|
||||
if (this->flutterSfxTimer == 0 && this->niwState == NIW_STATE_HELD) {
|
||||
if ((this->flutterSfxTimer == 0) && (this->niwState == NIW_STATE_HELD)) {
|
||||
this->flutterSfxTimer = 7;
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_CHICKEN_FLUTTER);
|
||||
}
|
||||
|
|
@ -901,13 +905,13 @@ void EnNiw_Update(Actor* thisx, PlayState* play) {
|
|||
}
|
||||
}
|
||||
|
||||
if (!this->isStormActive && this->niwType == NIW_TYPE_REGULAR) {
|
||||
if (!this->isStormActive && (this->niwType == NIW_TYPE_REGULAR)) {
|
||||
Collider_UpdateCylinder(&this->actor, &this->collider);
|
||||
CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base);
|
||||
|
||||
if (play) {}
|
||||
|
||||
if (this->niwState != NIW_STATE_HELD && this->niwState != NIW_STATE_FALLING) {
|
||||
if ((this->niwState != NIW_STATE_HELD) && (this->niwState != NIW_STATE_FALLING)) {
|
||||
CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@ s32 EnNwc_IsFound(EnNwc* this, PlayState* play) {
|
|||
return false;
|
||||
}
|
||||
|
||||
if ((player->stateFlags3 & PLAYER_STATE3_20000000) && this->actor.xzDistToPlayer < 100.0f) {
|
||||
if ((player->stateFlags3 & PLAYER_STATE3_20000000) && (this->actor.xzDistToPlayer < 100.0f)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -178,26 +178,34 @@ void EnNwc_ChangeState(EnNwc* this, s16 newState) {
|
|||
this->stateTimer = 10;
|
||||
this->actionFunc = EnNwc_CheckForBreman;
|
||||
break;
|
||||
|
||||
case NWC_STATE_TURNING:
|
||||
this->stateTimer = Rand_ZeroFloat(20.0f) + 15.0f;
|
||||
this->actionFunc = EnNwc_Turn;
|
||||
this->fallingRotY = (s16)(s32)randPlusMinusPoint5Scaled(65536.0f);
|
||||
this->fallingRotY = (s16)(s32)randPlusMinusPoint5Scaled(0x10000);
|
||||
break;
|
||||
|
||||
case NWC_STATE_HOPPING_FORWARD:
|
||||
this->stateTimer = Rand_ZeroFloat(20.0f) + 15.0f;
|
||||
this->actionFunc = EnNwc_HopForward;
|
||||
break;
|
||||
|
||||
case NWC_STATE_FOLLOWING:
|
||||
this->actionFunc = EnNwc_Follow;
|
||||
this->transformTimer = 0;
|
||||
this->randomRot = (s16)(s32)randPlusMinusPoint5Scaled(10000.0f);
|
||||
break;
|
||||
|
||||
case NWC_STATE_RUNNING:
|
||||
this->actor.world.rot.y = this->actor.home.rot.z * 0x3000 & 0xFFFF; // Fake Match?: & 0xFFFF
|
||||
//! FAKE: & 0xFFFF
|
||||
this->actor.world.rot.y = this->actor.home.rot.z * 0x3000 & 0xFFFF;
|
||||
this->actor.shape.rot.y = this->actor.world.rot.y;
|
||||
this->stateTimer = Rand_ZeroFloat(40.0f) + 120.0f;
|
||||
this->actionFunc = EnNwc_RunAway;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
this->state = newState;
|
||||
|
|
@ -289,7 +297,7 @@ void EnNwc_Follow(EnNwc* this, PlayState* play) {
|
|||
Math_SmoothStepToS(&this->upperBodyRotY, targetUpperBodyRot, 2, 0x1B58, 0x3E8);
|
||||
|
||||
} else { // NOT grown up
|
||||
if ((this->stateTimer & 3) == 3 && this->stateTimer & 20) {
|
||||
if (((this->stateTimer & 3) == 3) && ((this->stateTimer & 0x14) != 0)) {
|
||||
this->actor.velocity.y = 2.0f; // hop up and down
|
||||
}
|
||||
if ((this->stateTimer & 0x1B) == 24) {
|
||||
|
|
@ -473,7 +481,7 @@ void EnNwc_Update(Actor* thisx, PlayState* play) {
|
|||
this->blinkTimer = Rand_S16Offset(0x3C, 0x3C);
|
||||
}
|
||||
|
||||
if (this->blinkTimer == 1 || this->blinkTimer == 3) {
|
||||
if ((this->blinkTimer == 1) || (this->blinkTimer == 3)) {
|
||||
this->blinkState = true;
|
||||
} else {
|
||||
this->blinkState = false;
|
||||
|
|
@ -508,7 +516,7 @@ s32 EnNwc_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p
|
|||
if (limbIndex == NIW_LIMB_UPPER_BODY) {
|
||||
rot->y += this->upperBodyRotY;
|
||||
}
|
||||
if (limbIndex == NIW_LIMB_RIGHT_WING_ROOT || limbIndex == NIW_LIMB_LEFT_WING_ROOT) {
|
||||
if ((limbIndex == NIW_LIMB_RIGHT_WING_ROOT) || (limbIndex == NIW_LIMB_LEFT_WING_ROOT)) {
|
||||
rot->y += this->footRotY;
|
||||
rot->z += this->footRotZ;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -901,6 +901,7 @@ void EnPeehat_PostLimbDraw(PlayState* play2, s32 limbIndex, Gfx** dList, Vec3s*
|
|||
Matrix_MultVecX(-400.0f, vec2);
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
gfx = POLY_OPA_DISP;
|
||||
|
||||
Matrix_Translate(-1000.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
|
|
|
|||
|
|
@ -242,9 +242,9 @@ void EnPoSisters_MatchPlayerXZ(EnPoSisters* this, PlayState* play) {
|
|||
Player* player = GET_PLAYER(play);
|
||||
f32 dist;
|
||||
|
||||
if (this->megCloneId == POE_SISTERS_MEG_REAL || this->actionFunc != EnPoSisters_DamageFlinch) {
|
||||
if ((player->meleeWeaponState == PLAYER_MELEE_WEAPON_STATE_0 ||
|
||||
player->meleeWeaponAnimation >= PLAYER_MWA_SPIN_ATTACK_1H) &&
|
||||
if ((this->megCloneId == POE_SISTERS_MEG_REAL) || (this->actionFunc != EnPoSisters_DamageFlinch)) {
|
||||
if (((player->meleeWeaponState == PLAYER_MELEE_WEAPON_STATE_0) ||
|
||||
(player->meleeWeaponAnimation >= PLAYER_MWA_SPIN_ATTACK_1H)) &&
|
||||
((player->actor.world.pos.y - player->actor.floorHeight) < 1.0f)) {
|
||||
Math_StepToF(&this->megDistToPlayer, 110.0f, 3.0f);
|
||||
} else {
|
||||
|
|
@ -277,7 +277,8 @@ void EnPoSisters_MatchPlayerY(EnPoSisters* this, PlayState* play) {
|
|||
this->actor.world.pos.y += (2.0f + (0.5f * Rand_ZeroOne())) * Math_SinS(this->floatingBobbingTimer * 0x800);
|
||||
|
||||
// fully opaque
|
||||
if (this->color.a == 255 && this->actionFunc != EnPoSisters_SpinAttack && this->actionFunc != EnPoSisters_SpinUp) {
|
||||
if ((this->color.a == 255) && (this->actionFunc != EnPoSisters_SpinAttack) &&
|
||||
(this->actionFunc != EnPoSisters_SpinUp)) {
|
||||
if (this->actionFunc == EnPoSisters_Flee) {
|
||||
func_800B9010(&this->actor, NA_SE_EN_PO_AWAY - SFX_FLAG);
|
||||
} else {
|
||||
|
|
@ -579,7 +580,7 @@ void EnPoSisters_Flee(EnPoSisters* this, PlayState* play) {
|
|||
this->actor.world.rot.y = this->actor.shape.rot.y;
|
||||
this->poSisterFlags |= POE_SISTERS_FLAG_UPDATE_SHAPE_ROT;
|
||||
EnPoSisters_SetupSpinToInvis(this);
|
||||
} else if (this->fleeTimer == 0 && this->actor.xzDistToPlayer > 480.0f) {
|
||||
} else if ((this->fleeTimer == 0) && (this->actor.xzDistToPlayer > 480.0f)) {
|
||||
this->actor.world.rot.y = this->actor.shape.rot.y;
|
||||
EnPoSisters_SetupAimlessIdleFlying(this);
|
||||
}
|
||||
|
|
@ -818,7 +819,7 @@ void EnPoSisters_MegSurroundPlayer(EnPoSisters* this, PlayState* play) {
|
|||
|
||||
DECR(this->megSurroundTimer);
|
||||
|
||||
if (this->megClonesRemaining > 0 && this->megSurroundTimer >= 16) {
|
||||
if ((this->megClonesRemaining > 0) && (this->megSurroundTimer >= 16)) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if (this->megCloneId == POE_SISTERS_MEG_REAL) {
|
||||
if (ABS_ALT(16 - this->floatingBobbingTimer) < 14) {
|
||||
|
|
@ -1092,7 +1093,7 @@ s32 EnPoSisters_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Ve
|
|||
};
|
||||
EnPoSisters* this = THIS;
|
||||
|
||||
if (limbIndex == POE_SISTERS_LIMB_ROOT && (this->poSisterFlags & POE_SISTERS_FLAG_REAL_MEG_ROTATION)) {
|
||||
if ((limbIndex == POE_SISTERS_LIMB_ROOT) && (this->poSisterFlags & POE_SISTERS_FLAG_REAL_MEG_ROTATION)) {
|
||||
if (this->megSurroundTimer >= 284) {
|
||||
rot->x += (this->megSurroundTimer - 284) * 0x1000;
|
||||
} else {
|
||||
|
|
@ -1153,8 +1154,8 @@ void EnPoSisters_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s
|
|||
Matrix_MultVecX(3000.0f, &this->limbPos[7]);
|
||||
}
|
||||
|
||||
if (this->actionFunc == EnPoSisters_DeathStage1 && this->deathTimer >= 8 &&
|
||||
limbIndex == POE_SISTERS_LIMB_MAIN_BODY) {
|
||||
if ((this->actionFunc == EnPoSisters_DeathStage1) && (this->deathTimer >= 8) &&
|
||||
(limbIndex == POE_SISTERS_LIMB_MAIN_BODY)) {
|
||||
gSPMatrix((*gfx)++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList((*gfx)++, gPoeSistersBurnBodyDL);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -153,14 +153,12 @@ s32 EnRuppecrow_ReachedPointClockwise(EnRuppecrow* this, Path* path, s32 pointIn
|
|||
if (currentPoint == 0) {
|
||||
diffX = points[1].x - points[0].x;
|
||||
diffZ = points[1].z - points[0].z;
|
||||
} else if (currentPoint == (pathCount - 1)) {
|
||||
diffX = points[pathCount - 1].x - points[pathCount - 2].x;
|
||||
diffZ = points[pathCount - 1].z - points[pathCount - 2].z;
|
||||
} else {
|
||||
if (currentPoint == (pathCount - 1)) {
|
||||
diffX = points[pathCount - 1].x - points[pathCount - 2].x;
|
||||
diffZ = points[pathCount - 1].z - points[pathCount - 2].z;
|
||||
} else {
|
||||
diffX = points[currentPoint + 1].x - points[currentPoint - 1].x;
|
||||
diffZ = points[currentPoint + 1].z - points[currentPoint - 1].z;
|
||||
}
|
||||
diffX = points[currentPoint + 1].x - points[currentPoint - 1].x;
|
||||
diffZ = points[currentPoint + 1].z - points[currentPoint - 1].z;
|
||||
}
|
||||
|
||||
func_8017B7F8(&point, RAD_TO_BINANG(func_80086B30(diffX, diffZ)), &px, &pz, &d);
|
||||
|
|
@ -188,14 +186,12 @@ s32 EnRuppecrow_ReachedPointCounterClockwise(EnRuppecrow* this, Path* path, s32
|
|||
if (currentPoint == 0) {
|
||||
diffX = points[0].x - points[1].x;
|
||||
diffZ = points[0].z - points[1].z;
|
||||
} else if (currentPoint == (pathCount - 1)) {
|
||||
diffX = points[pathCount - 2].x - points[pathCount - 1].x;
|
||||
diffZ = points[pathCount - 2].z - points[pathCount - 1].z;
|
||||
} else {
|
||||
if (currentPoint == (pathCount - 1)) {
|
||||
diffX = points[pathCount - 2].x - points[pathCount - 1].x;
|
||||
diffZ = points[pathCount - 2].z - points[pathCount - 1].z;
|
||||
} else {
|
||||
diffX = points[currentPoint - 1].x - points[currentPoint + 1].x;
|
||||
diffZ = points[currentPoint - 1].z - points[currentPoint + 1].z;
|
||||
}
|
||||
diffX = points[currentPoint - 1].x - points[currentPoint + 1].x;
|
||||
diffZ = points[currentPoint - 1].z - points[currentPoint + 1].z;
|
||||
}
|
||||
|
||||
func_8017B7F8(&point, RAD_TO_BINANG(func_80086B30(diffX, diffZ)), &px, &pz, &d);
|
||||
|
|
@ -236,19 +232,23 @@ s32 EnRuppecrow_CanSpawnBlueRupees(PlayState* play) {
|
|||
switch (player->transformation) {
|
||||
case PLAYER_FORM_DEKU:
|
||||
return false;
|
||||
|
||||
case PLAYER_FORM_GORON:
|
||||
return true;
|
||||
|
||||
case PLAYER_FORM_ZORA:
|
||||
return false;
|
||||
|
||||
case PLAYER_FORM_HUMAN:
|
||||
if (player->stateFlags1 & PLAYER_STATE1_800000) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
void EnRuppecrow_UpdateRupees(EnRuppecrow* this) {
|
||||
|
|
@ -257,7 +257,7 @@ void EnRuppecrow_UpdateRupees(EnRuppecrow* this) {
|
|||
|
||||
for (rupeeIndex = 0; rupeeIndex < ENRUPPECROW_RUPEE_COUNT; rupeeIndex++) {
|
||||
rupee = this->rupees[rupeeIndex];
|
||||
if (rupee != NULL && rupee->unk152 == 0) {
|
||||
if ((rupee != NULL) && (rupee->unk152 == 0)) {
|
||||
Actor_Kill(&rupee->actor);
|
||||
}
|
||||
}
|
||||
|
|
@ -375,16 +375,19 @@ s32 EnRuppecrow_CheckPlayedMatchingSong(PlayState* play) {
|
|||
return true;
|
||||
}
|
||||
break;
|
||||
|
||||
case PLAYER_FORM_GORON:
|
||||
if (play->msgCtx.lastPlayedSong == OCARINA_SONG_GORON_LULLABY) {
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
|
||||
case PLAYER_FORM_ZORA:
|
||||
if (play->msgCtx.lastPlayedSong == OCARINA_SONG_NEW_WAVE) {
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
|
||||
case PLAYER_FORM_HUMAN:
|
||||
if (play->msgCtx.lastPlayedSong == OCARINA_SONG_SONATA) {
|
||||
return true;
|
||||
|
|
@ -394,6 +397,9 @@ s32 EnRuppecrow_CheckPlayedMatchingSong(PlayState* play) {
|
|||
return true;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -407,6 +413,7 @@ void EnRuppecrow_UpdateSpeed(EnRuppecrow* this, PlayState* play) {
|
|||
case PLAYER_FORM_DEKU:
|
||||
this->speedModifier = 7.0f;
|
||||
break;
|
||||
|
||||
case PLAYER_FORM_GORON:
|
||||
if (player->stateFlags3 & PLAYER_STATE3_1000) { // Goron Link is curled
|
||||
this->speedModifier = 19.0f;
|
||||
|
|
@ -414,9 +421,11 @@ void EnRuppecrow_UpdateSpeed(EnRuppecrow* this, PlayState* play) {
|
|||
this->speedModifier = 7.0f;
|
||||
}
|
||||
break;
|
||||
|
||||
case PLAYER_FORM_ZORA:
|
||||
this->speedModifier = 7.0f;
|
||||
break;
|
||||
|
||||
case PLAYER_FORM_HUMAN:
|
||||
if (player->stateFlags1 & PLAYER_STATE1_800000) {
|
||||
this->speedModifier = 16.0f;
|
||||
|
|
@ -424,6 +433,9 @@ void EnRuppecrow_UpdateSpeed(EnRuppecrow* this, PlayState* play) {
|
|||
this->speedModifier = 7.0f;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
this->skelAnime.playSpeed = this->speedModifier / 6.0f;
|
||||
|
|
|
|||
|
|
@ -176,7 +176,7 @@ void EnSob1_SetupAction(EnSob1* this, EnSob1ActionFunc action) {
|
|||
s32 EnSob1_TestItemSelected(PlayState* play) {
|
||||
MessageContext* msgCtx = &play->msgCtx;
|
||||
|
||||
if (msgCtx->unk12020 == 0x10 || msgCtx->unk12020 == 0x11) {
|
||||
if ((msgCtx->unk12020 == 0x10) || (msgCtx->unk12020 == 0x11)) {
|
||||
return CHECK_BTN_ALL(CONTROLLER1(&play->state)->press.button, BTN_A);
|
||||
}
|
||||
return CHECK_BTN_ALL(CONTROLLER1(&play->state)->press.button, BTN_A) ||
|
||||
|
|
@ -188,7 +188,7 @@ u16 EnSob1_GetTalkOption(EnSob1* this, PlayState* play) {
|
|||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (this->shopType == BOMB_SHOP) {
|
||||
if (gSaveContext.save.day == 1 && gSaveContext.save.time >= CLOCK_TIME(6, 00)) {
|
||||
if ((gSaveContext.save.day == 1) && (gSaveContext.save.time >= CLOCK_TIME(6, 00))) {
|
||||
return 0x648;
|
||||
} else if (CHECK_WEEKEVENTREG(WEEKEVENTREG_33_08)) {
|
||||
return 0x649;
|
||||
|
|
@ -199,10 +199,13 @@ u16 EnSob1_GetTalkOption(EnSob1* this, PlayState* play) {
|
|||
switch (player->transformation) {
|
||||
case PLAYER_FORM_DEKU:
|
||||
return 0x12D8;
|
||||
|
||||
case PLAYER_FORM_GORON:
|
||||
return 0x12D9;
|
||||
|
||||
case PLAYER_FORM_ZORA:
|
||||
return 0x12DA;
|
||||
|
||||
default:
|
||||
return 0x12D7;
|
||||
}
|
||||
|
|
@ -405,6 +408,7 @@ void EnSob1_Init(Actor* thisx, PlayState* play) {
|
|||
case ZORA_SHOP:
|
||||
this->shopType = ZORA_SHOP;
|
||||
break;
|
||||
|
||||
case GORON_SHOP:
|
||||
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_CLEARED_SNOWHEAD_TEMPLE)) {
|
||||
this->shopType = GORON_SHOP_SPRING;
|
||||
|
|
@ -412,9 +416,11 @@ void EnSob1_Init(Actor* thisx, PlayState* play) {
|
|||
this->shopType = GORON_SHOP;
|
||||
}
|
||||
break;
|
||||
|
||||
case BOMB_SHOP:
|
||||
this->shopType = BOMB_SHOP;
|
||||
break;
|
||||
|
||||
default:
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
|
|
@ -579,10 +585,10 @@ void EnSob1_UpdateJoystickInputState(PlayState* play, EnSob1* this) {
|
|||
s8 stickY = CONTROLLER1(&play->state)->rel.stick_y;
|
||||
|
||||
if (this->stickAccumX == 0) {
|
||||
if (stickX > 30 || stickX < -30) {
|
||||
if ((stickX > 30) || (stickX < -30)) {
|
||||
this->stickAccumX = stickX;
|
||||
}
|
||||
} else if (stickX <= 30 && stickX >= -30) {
|
||||
} else if ((stickX <= 30) && (stickX >= -30)) {
|
||||
this->stickAccumX = 0;
|
||||
} else if ((this->stickAccumX * stickX) < 0) { // Stick has swapped directions
|
||||
this->stickAccumX = stickX;
|
||||
|
|
@ -595,10 +601,10 @@ void EnSob1_UpdateJoystickInputState(PlayState* play, EnSob1* this) {
|
|||
}
|
||||
}
|
||||
if (this->stickAccumY == 0) {
|
||||
if (stickY > 30 || stickY < -30) {
|
||||
if ((stickY > 30) || (stickY < -30)) {
|
||||
this->stickAccumY = stickY;
|
||||
}
|
||||
} else if (stickY <= 30 && stickY >= -30) {
|
||||
} else if ((stickY <= 30) && (stickY >= -30)) {
|
||||
this->stickAccumY = 0;
|
||||
} else if ((this->stickAccumY * stickY) < 0) { // Stick has swapped directions
|
||||
this->stickAccumY = stickY;
|
||||
|
|
@ -646,6 +652,7 @@ s32 EnSob1_FacingShopkeeperDialogResult(EnSob1* this, PlayState* play) {
|
|||
func_8019F208();
|
||||
EnSob1_TalkToShopkeeper(play, this);
|
||||
return true;
|
||||
|
||||
case 1:
|
||||
func_8019F230();
|
||||
if (this->shopType == BOMB_SHOP) {
|
||||
|
|
@ -986,6 +993,7 @@ void EnSob1_HandleCanBuyItem(PlayState* play, EnSob1* this) {
|
|||
this->shopItemSelectedTween = 0.0f;
|
||||
item->boughtFunc(play, item);
|
||||
break;
|
||||
|
||||
case CANBUY_RESULT_SUCCESS_2:
|
||||
func_8019F208();
|
||||
item->buyFunc(play, item);
|
||||
|
|
@ -1002,38 +1010,49 @@ void EnSob1_HandleCanBuyItem(PlayState* play, EnSob1* this) {
|
|||
this->shopItemSelectedTween = 0.0f;
|
||||
item->boughtFunc(play, item);
|
||||
break;
|
||||
|
||||
case CANBUY_RESULT_NO_ROOM:
|
||||
play_sound(NA_SE_SY_ERROR);
|
||||
EnSob1_SetupCannotBuy(play, this, sNoRoomTextIds[this->shopType]);
|
||||
break;
|
||||
|
||||
case CANBUY_RESULT_NEED_EMPTY_BOTTLE:
|
||||
play_sound(NA_SE_SY_ERROR);
|
||||
EnSob1_SetupCannotBuy(play, this, sNeedEmptyBottleTextIds[this->shopType]);
|
||||
break;
|
||||
|
||||
case CANBUY_RESULT_NEED_RUPEES:
|
||||
play_sound(NA_SE_SY_ERROR);
|
||||
EnSob1_SetupCannotBuy(play, this, sNeedRupeesTextIds[this->shopType]);
|
||||
break;
|
||||
|
||||
case CANBUY_RESULT_CANNOT_GET_NOW:
|
||||
play_sound(NA_SE_SY_ERROR);
|
||||
EnSob1_SetupCannotBuy(play, this, sCannotGetNowTextIds[this->shopType]);
|
||||
break;
|
||||
|
||||
case CANBUY_RESULT_CANNOT_GET_NOW_2:
|
||||
play_sound(NA_SE_SY_ERROR);
|
||||
EnSob1_SetupCannotBuy(play, this, sCannotGetNow2TextIds[this->shopType]);
|
||||
break;
|
||||
|
||||
case CANBUY_RESULT_NO_ROOM_2:
|
||||
play_sound(NA_SE_SY_ERROR);
|
||||
EnSob1_SetupCannotBuy(play, this, sNoRoom2TextIds[this->shopType]);
|
||||
break;
|
||||
|
||||
case CANBUY_RESULT_ALREADY_HAVE:
|
||||
play_sound(NA_SE_SY_ERROR);
|
||||
EnSob1_SetupCannotBuy(play, this, 0x658);
|
||||
break;
|
||||
|
||||
case CANBUY_RESULT_HAVE_BETTER:
|
||||
play_sound(NA_SE_SY_ERROR);
|
||||
EnSob1_SetupCannotBuy(play, this, 0x659);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1047,6 +1066,7 @@ void EnSob1_SelectItem(EnSob1* this, PlayState* play) {
|
|||
case 0:
|
||||
EnSob1_HandleCanBuyItem(play, this);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
func_8019F230();
|
||||
this->actionFunc = this->prevActionFunc;
|
||||
|
|
@ -1179,11 +1199,11 @@ void EnSob1_UpdateItemSelectedProperty(EnSob1* this) {
|
|||
for (i = 0; i < ARRAY_COUNT(this->items); i++, items++) {
|
||||
item = *items;
|
||||
if (item != NULL) {
|
||||
if (this->actionFunc != EnSob1_SelectItem && this->actionFunc != EnSob1_CannotBuy &&
|
||||
this->drawCursor == 0) {
|
||||
if ((this->actionFunc != EnSob1_SelectItem) && (this->actionFunc != EnSob1_CannotBuy) &&
|
||||
(this->drawCursor == 0)) {
|
||||
item->isSelected = false;
|
||||
} else {
|
||||
item->isSelected = this->cursorIndex == i ? true : false;
|
||||
item->isSelected = (this->cursorIndex == i) ? true : false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1330,10 +1350,10 @@ void EnSob1_ChangeObject(EnSob1* this, PlayState* play) {
|
|||
|
||||
s32 EnSob1_AreObjectsLoaded(EnSob1* this, PlayState* play) {
|
||||
if (Object_IsLoaded(&play->objectCtx, this->mainObjIndex)) {
|
||||
if (this->unusedObjIndex >= 0 && !Object_IsLoaded(&play->objectCtx, this->unusedObjIndex)) {
|
||||
if ((this->unusedObjIndex >= 0) && !Object_IsLoaded(&play->objectCtx, this->unusedObjIndex)) {
|
||||
return false;
|
||||
}
|
||||
if (this->shopkeeperAnimObjIndex >= 0 && !Object_IsLoaded(&play->objectCtx, this->shopkeeperAnimObjIndex)) {
|
||||
if ((this->shopkeeperAnimObjIndex >= 0) && !Object_IsLoaded(&play->objectCtx, this->shopkeeperAnimObjIndex)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -546,7 +546,7 @@ void func_808A650C(EnSt* this) {
|
|||
}
|
||||
|
||||
s32 func_808A6580(EnSt* this, PlayState* play) {
|
||||
Player* sp3C = GET_PLAYER(play);
|
||||
Player* player = GET_PLAYER(play);
|
||||
s32 ret = false;
|
||||
s32 i;
|
||||
|
||||
|
|
@ -666,7 +666,7 @@ s32 func_808A6580(EnSt* this, PlayState* play) {
|
|||
if ((this->unk_316 == 0) && (this->unk_314 == 0) && (this->unk_312 == 0) &&
|
||||
!(this->collider1.base.atFlags & AT_BOUNCED) && (this->actor.colChkInfo.health != 0)) {
|
||||
play->damagePlayer(play, -8);
|
||||
Actor_PlaySfx(&sp3C->actor, NA_SE_PL_BODY_HIT);
|
||||
Actor_PlaySfx(&player->actor, NA_SE_PL_BODY_HIT);
|
||||
func_800B8D98(play, &this->actor, 4.0f, this->actor.yawTowardsPlayer, 6.0f);
|
||||
this->unk_316 = 10;
|
||||
this->unk_18C |= 1;
|
||||
|
|
|
|||
|
|
@ -267,6 +267,7 @@ void func_80BAA9B4(EnSuttari* this) {
|
|||
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, this->animIndex);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
if ((this->animIndex != 1) && (curFrame == frameCount)) {
|
||||
this->animIndex = 1;
|
||||
|
|
@ -281,23 +282,31 @@ void func_80BAAA94(EnSuttari* this) {
|
|||
this->animIndex = 1;
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, this->animIndex);
|
||||
break;
|
||||
|
||||
case 0x29E9:
|
||||
this->enFsn->flags |= ENFSN_ANGRY;
|
||||
break;
|
||||
|
||||
case 0x29EA:
|
||||
this->enFsn->flags |= ENFSN_CALM_DOWN;
|
||||
break;
|
||||
|
||||
case 0x29EB:
|
||||
this->enFsn->flags |= ENFSN_OFFER_FINAL_PRICE;
|
||||
break;
|
||||
|
||||
case 0x29EC:
|
||||
this->animIndex = 7;
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, this->animIndex);
|
||||
break;
|
||||
|
||||
case 0x29ED:
|
||||
this->animIndex = 1;
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, this->animIndex);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -309,52 +318,64 @@ void func_80BAAB78(EnSuttari* this, PlayState* play) {
|
|||
this->csIdIndex = 0;
|
||||
this->textId = 0x29E5;
|
||||
break;
|
||||
|
||||
case 0x29E5:
|
||||
CutsceneManager_Stop(this->csIdList[this->csIdIndex]);
|
||||
this->csIdIndex = 1;
|
||||
this->textId = 0x29E6;
|
||||
break;
|
||||
|
||||
case 0x29E6:
|
||||
CutsceneManager_Stop(this->csIdList[this->csIdIndex]);
|
||||
this->csIdIndex = 0;
|
||||
this->textId = 0x29E7;
|
||||
break;
|
||||
|
||||
case 0x29E7:
|
||||
CutsceneManager_Stop(this->csIdList[this->csIdIndex]);
|
||||
this->csIdIndex = 1;
|
||||
this->textId = 0x29E8;
|
||||
break;
|
||||
|
||||
case 0x29E8:
|
||||
CutsceneManager_Stop(this->csIdList[this->csIdIndex]);
|
||||
this->csIdIndex = 0;
|
||||
this->textId = 0x29E9;
|
||||
break;
|
||||
|
||||
case 0x29E9:
|
||||
CutsceneManager_Stop(this->csIdList[this->csIdIndex]);
|
||||
this->csIdIndex = 1;
|
||||
this->textId = 0x29EA;
|
||||
break;
|
||||
|
||||
case 0x29EA:
|
||||
CutsceneManager_Stop(this->csIdList[this->csIdIndex]);
|
||||
this->csIdIndex = 0;
|
||||
this->textId = 0x29EB;
|
||||
break;
|
||||
|
||||
case 0x29EB:
|
||||
CutsceneManager_Stop(this->csIdList[this->csIdIndex]);
|
||||
this->csIdIndex = 1;
|
||||
this->textId = 0x29EC;
|
||||
break;
|
||||
|
||||
case 0x29EC:
|
||||
CutsceneManager_Stop(this->csIdList[this->csIdIndex]);
|
||||
this->csIdIndex = 0;
|
||||
this->textId = 0x29ED;
|
||||
break;
|
||||
|
||||
case 0x29ED:
|
||||
CutsceneManager_Stop(this->csIdList[this->csIdIndex]);
|
||||
this->flags1 |= 0x400;
|
||||
this->csIdIndex = 1;
|
||||
this->textId = 0x29EE;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (CutsceneManager_GetCurrentCsId() == CS_ID_GLOBAL_TALK) {
|
||||
CutsceneManager_Stop(CS_ID_GLOBAL_TALK);
|
||||
|
|
@ -372,9 +393,11 @@ void func_80BAAB78(EnSuttari* this, PlayState* play) {
|
|||
this->textId = 0x1450;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x1450:
|
||||
this->textId = 0x1451;
|
||||
break;
|
||||
|
||||
case 0x1451:
|
||||
if (this->flags1 & 0x800) {
|
||||
this->flags1 &= ~0x800;
|
||||
|
|
@ -385,6 +408,7 @@ void func_80BAAB78(EnSuttari* this, PlayState* play) {
|
|||
SET_WEEKEVENTREG(WEEKEVENTREG_81_01);
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x1453:
|
||||
this->flags1 |= 0x400;
|
||||
SET_WEEKEVENTREG(WEEKEVENTREG_81_01);
|
||||
|
|
@ -392,25 +416,34 @@ void func_80BAAB78(EnSuttari* this, PlayState* play) {
|
|||
this->flags2 |= 1;
|
||||
this->textId = 0x1454;
|
||||
break;
|
||||
|
||||
case 0x1455:
|
||||
this->textId = 0x1456;
|
||||
break;
|
||||
|
||||
case 0x1456:
|
||||
this->textId = 0x1457;
|
||||
break;
|
||||
|
||||
case 0x1457:
|
||||
this->textId = 0x1458;
|
||||
break;
|
||||
|
||||
case 0x1458:
|
||||
this->textId = 0x1459;
|
||||
break;
|
||||
|
||||
case 0x1459:
|
||||
this->textId = 0x145A;
|
||||
break;
|
||||
|
||||
case 0x145A:
|
||||
this->flags1 |= 0x400;
|
||||
this->textId = 0x145B;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
Message_StartTextbox(play, this->textId, &this->actor);
|
||||
|
|
@ -688,7 +721,7 @@ s32 func_80BABC48(EnSuttari* this, PlayState* play, ScheduleOutput* scheduleOutp
|
|||
if (this->timePath == NULL) {
|
||||
return 0;
|
||||
}
|
||||
if ((this->unk428 != 0 && this->unk428 < 0xC) && (this->timePathTimeSpeed >= 0)) {
|
||||
if ((this->unk428 != 0) && (this->unk428 < 0xC) && (this->timePathTimeSpeed >= 0)) {
|
||||
phi_a0 = sp26;
|
||||
} else {
|
||||
phi_a0 = scheduleOutput->time0;
|
||||
|
|
@ -717,8 +750,8 @@ s32 func_80BABDD8(EnSuttari* this, PlayState* play, ScheduleOutput* scheduleOutp
|
|||
Vec3s* sp28;
|
||||
s32 sp24;
|
||||
|
||||
if (this->unk428 == 10 || this->unk428 == 11 || this->unk428 == 2) {
|
||||
return 0;
|
||||
if ((this->unk428 == 10) || (this->unk428 == 11) || (this->unk428 == 2)) {
|
||||
return false;
|
||||
}
|
||||
sp48 = (EnDoor*)SubS_FindNearestActor(&this->actor, play, ACTORCAT_DOOR, ACTOR_EN_DOOR);
|
||||
sp24 = D_80BAE8F8[scheduleOutput->result];
|
||||
|
|
@ -726,21 +759,21 @@ s32 func_80BABDD8(EnSuttari* this, PlayState* play, ScheduleOutput* scheduleOutp
|
|||
this->timePath = SubS_GetAdditionalPath(play, sp47, sp24);
|
||||
}
|
||||
if ((sp48 == NULL) || (this->timePath == NULL)) {
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
sp28 = Lib_SegmentedToVirtual(this->timePath->points);
|
||||
Math_Vec3s_ToVec3f(&sp38, &sp28[0]);
|
||||
Math_Vec3s_ToVec3f(&sp2C, &sp28[1]);
|
||||
this->unk434 = sp44 - scheduleOutput->time0;
|
||||
this->unk436 = scheduleOutput->time1 - scheduleOutput->time0;
|
||||
if (scheduleOutput->result != 10 && scheduleOutput->result != 11) {
|
||||
if ((scheduleOutput->result != 10) && (scheduleOutput->result != 11)) {
|
||||
sp48->unk_1A7 = 0x4B;
|
||||
}
|
||||
Math_Vec3f_Copy(&this->unk438, &sp38);
|
||||
Math_Vec3f_Copy(&this->unk444, &sp2C);
|
||||
this->actor.world.rot.y = Math_Vec3f_Yaw(&sp38, &sp2C);
|
||||
this->actor.world.pos = sp38;
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
s32 func_80BABF64(EnSuttari* this, PlayState* play, ScheduleOutput* scheduleOutput) {
|
||||
|
|
@ -753,6 +786,7 @@ s32 func_80BABF64(EnSuttari* this, PlayState* play, ScheduleOutput* scheduleOutp
|
|||
case 12:
|
||||
ret = func_80BABC48(this, play, scheduleOutput);
|
||||
break;
|
||||
|
||||
case 11:
|
||||
case 10:
|
||||
case 9:
|
||||
|
|
@ -761,15 +795,17 @@ s32 func_80BABF64(EnSuttari* this, PlayState* play, ScheduleOutput* scheduleOutp
|
|||
case 6:
|
||||
ret = func_80BABDD8(this, play, scheduleOutput);
|
||||
break;
|
||||
|
||||
case 5:
|
||||
case 4:
|
||||
case 3:
|
||||
case 2:
|
||||
case 1:
|
||||
ret = 1;
|
||||
ret = true;
|
||||
break;
|
||||
|
||||
default:
|
||||
ret = 0;
|
||||
ret = false;
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
|
|
@ -853,6 +889,7 @@ void func_80BAC2FC(EnSuttari* this, PlayState* play) {
|
|||
this->flags1 |= 0x80;
|
||||
func_80BABFD4(this, play);
|
||||
break;
|
||||
|
||||
case 15:
|
||||
if ((this->animIndex == 1) && (curFrame == frameCount)) {
|
||||
this->animIndex = 2;
|
||||
|
|
@ -873,15 +910,18 @@ void func_80BAC2FC(EnSuttari* this, PlayState* play) {
|
|||
}
|
||||
func_80BABFD4(this, play);
|
||||
break;
|
||||
|
||||
case 6:
|
||||
case 8:
|
||||
this->flags1 |= 0x80;
|
||||
func_80BAC220(this, play);
|
||||
break;
|
||||
|
||||
case 10:
|
||||
this->flags1 |= 0x80;
|
||||
func_80BAC220(this, play);
|
||||
break;
|
||||
|
||||
case 9:
|
||||
case 11:
|
||||
this->flags1 |= 0x80;
|
||||
|
|
@ -893,19 +933,23 @@ void func_80BAC2FC(EnSuttari* this, PlayState* play) {
|
|||
}
|
||||
func_80BAC220(this, play);
|
||||
break;
|
||||
|
||||
case 7:
|
||||
this->flags1 |= 0x20;
|
||||
this->flags1 |= 0x80;
|
||||
func_80BAC220(this, play);
|
||||
break;
|
||||
|
||||
case 14:
|
||||
this->flags1 |= 0x20;
|
||||
this->flags1 |= 0x80;
|
||||
func_80BABFD4(this, play);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
Actor_Kill(&this->actor);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_81_04)) {
|
||||
this->flags1 |= 0x80;
|
||||
|
|
@ -916,9 +960,10 @@ void func_80BAC2FC(EnSuttari* this, PlayState* play) {
|
|||
this->actionFunc = func_80BADA08;
|
||||
}
|
||||
break;
|
||||
|
||||
case 4:
|
||||
if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_33_08)) {
|
||||
if (this->animIndex == 2 || this->animIndex == 1) {
|
||||
if ((this->animIndex == 2) || (this->animIndex == 1)) {
|
||||
this->animIndex = 5;
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, this->animIndex);
|
||||
}
|
||||
|
|
@ -935,6 +980,9 @@ void func_80BAC2FC(EnSuttari* this, PlayState* play) {
|
|||
this->actionFunc = func_80BAD2B4;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
Math_ApproachS(&this->actor.shape.rot.y, this->actor.world.rot.y, 4, 0x1554);
|
||||
}
|
||||
|
|
@ -947,7 +995,7 @@ void func_80BAC6E8(EnSuttari* this, PlayState* play) {
|
|||
this->actor.flags |= ACTOR_FLAG_1;
|
||||
if (play->sceneId == SCENE_IKANA) {
|
||||
this->flags1 |= 1;
|
||||
if (gSaveContext.save.day == 1 || gSaveContext.save.day == 2) {
|
||||
if ((gSaveContext.save.day == 1) || (gSaveContext.save.day == 2)) {
|
||||
this->animIndex = 2;
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, this->animIndex);
|
||||
this->flags1 |= 0x80;
|
||||
|
|
@ -962,7 +1010,7 @@ void func_80BAC6E8(EnSuttari* this, PlayState* play) {
|
|||
return;
|
||||
}
|
||||
} else if (play->sceneId == SCENE_BACKTOWN) {
|
||||
if (gSaveContext.save.time >= CLOCK_TIME(0, 20) && gSaveContext.save.time < CLOCK_TIME(6, 00)) {
|
||||
if ((gSaveContext.save.time >= CLOCK_TIME(0, 20)) && (gSaveContext.save.time < CLOCK_TIME(6, 00))) {
|
||||
Actor_Kill(&this->actor);
|
||||
}
|
||||
|
||||
|
|
@ -1011,14 +1059,14 @@ void func_80BAC6E8(EnSuttari* this, PlayState* play) {
|
|||
void func_80BACA14(EnSuttari* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (this->animIndex == 1 || this->animIndex == 8) {
|
||||
if ((this->animIndex == 1) || (this->animIndex == 8)) {
|
||||
this->animIndex = 2;
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, this->animIndex);
|
||||
}
|
||||
func_80BABA90(this, 0, 0);
|
||||
func_80BAB434(this);
|
||||
if (player->transformation == PLAYER_FORM_GORON || player->transformation == PLAYER_FORM_ZORA) {
|
||||
if (this->actor.playerHeightRel < 60.0f && this->actor.xzDistToPlayer < 500.0f) {
|
||||
if ((player->transformation == PLAYER_FORM_GORON) || (player->transformation == PLAYER_FORM_ZORA)) {
|
||||
if ((this->actor.playerHeightRel < 60.0f) && (this->actor.xzDistToPlayer < 500.0f)) {
|
||||
this->unk3F2 = this->headRot.y;
|
||||
this->actionFunc = func_80BACBB0;
|
||||
}
|
||||
|
|
@ -1041,7 +1089,7 @@ void func_80BACBB0(EnSuttari* this, PlayState* play) {
|
|||
s16 target;
|
||||
|
||||
this->unk3F2 = this->headRot.y;
|
||||
if (player->transformation == PLAYER_FORM_HUMAN || player->transformation == PLAYER_FORM_DEKU) {
|
||||
if ((player->transformation == PLAYER_FORM_HUMAN) || (player->transformation == PLAYER_FORM_DEKU)) {
|
||||
this->actionFunc = func_80BACA14;
|
||||
}
|
||||
if ((this->actor.playerHeightRel < 60.0f) && (this->actor.xzDistToPlayer < 500.0f)) {
|
||||
|
|
@ -1071,7 +1119,7 @@ void func_80BACD2C(EnSuttari* this, PlayState* play) {
|
|||
Player* player = GET_PLAYER(play);
|
||||
|
||||
this->unk3F2 = this->headRot.y;
|
||||
if (player->transformation == PLAYER_FORM_HUMAN || player->transformation == PLAYER_FORM_DEKU) {
|
||||
if ((player->transformation == PLAYER_FORM_HUMAN) || (player->transformation == PLAYER_FORM_DEKU)) {
|
||||
this->actionFunc = func_80BACA14;
|
||||
}
|
||||
if ((this->actor.playerHeightRel < 60.0f) && (this->actor.xzDistToPlayer < 500.0f)) {
|
||||
|
|
@ -1372,10 +1420,14 @@ void func_80BADA9C(EnSuttari* this, PlayState* play) {
|
|||
this->flags1 |= 0x800;
|
||||
func_80BAAB78(this, play);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
func_8019F230();
|
||||
func_80BAAB78(this, play);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!(this->flags1 & 4)) {
|
||||
|
|
@ -1486,11 +1538,11 @@ void EnSuttari_Update(Actor* thisx, PlayState* play) {
|
|||
EnSuttari_AdvanceTime();
|
||||
}
|
||||
if (this->unk428 != 0) {
|
||||
if (this->animIndex == 2 || this->animIndex == 6) {
|
||||
if ((this->animIndex == 2) || (this->animIndex == 6)) {
|
||||
if (Animation_OnFrame(&this->skelAnime, 8.0f) || Animation_OnFrame(&this->skelAnime, 16.0f)) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EV_PAMERA_WALK);
|
||||
}
|
||||
} else if (this->animIndex == 0 || this->animIndex == 5) {
|
||||
} else if ((this->animIndex == 0) || (this->animIndex == 5)) {
|
||||
if (Animation_OnFrame(&this->skelAnime, 8.0f) || Animation_OnFrame(&this->skelAnime, 17.0f)) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EV_PAMERA_WALK);
|
||||
}
|
||||
|
|
@ -1514,7 +1566,7 @@ s32 EnSuttari_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3
|
|||
Matrix_RotateXS(-this->torsoRot.y, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(-this->torsoRot.x, MTXMODE_APPLY);
|
||||
}
|
||||
if (limbIndex == 8 || limbIndex == 9 || limbIndex == 0xC) {
|
||||
if ((limbIndex == 8) || (limbIndex == 9) || (limbIndex == 0xC)) {
|
||||
rot->y += (s16)(Math_SinS(this->unk2FA[limbIndex]) * 200.0f);
|
||||
rot->z += (s16)(Math_CosS(this->unk31A[limbIndex]) * 200.0f);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -268,7 +268,7 @@ void EnTalkGibud_Init(Actor* thisx, PlayState* play) {
|
|||
this->switchFlag = -1;
|
||||
}
|
||||
|
||||
if (this->switchFlag != -1 && Flags_GetSwitch(play, this->switchFlag)) {
|
||||
if ((this->switchFlag != -1) && Flags_GetSwitch(play, this->switchFlag)) {
|
||||
Actor_Kill(&this->actor);
|
||||
}
|
||||
|
||||
|
|
@ -291,7 +291,7 @@ void EnTalkGibud_SetupIdle(EnTalkGibud* this) {
|
|||
* Gibdo will attack the player if they get too close.
|
||||
*/
|
||||
void EnTalkGibud_Idle(EnTalkGibud* this, PlayState* play) {
|
||||
if (this->actor.xzDistToPlayer <= 150.0f && func_800B715C(play)) {
|
||||
if ((this->actor.xzDistToPlayer <= 150.0f) && func_800B715C(play)) {
|
||||
EnTalkGibud_SetupAttemptPlayerFreeze(this);
|
||||
}
|
||||
|
||||
|
|
@ -345,7 +345,8 @@ void EnTalkGibud_WalkToPlayer(EnTalkGibud* this, PlayState* play) {
|
|||
if (EnTalkGibud_PlayerInRangeWithCorrectState(this, play) && Actor_IsFacingPlayer(&this->actor, 0x38E3)) {
|
||||
if ((this->grabWaitTimer == 0) && (this->actor.xzDistToPlayer <= 45.0f)) {
|
||||
player->actor.freezeTimer = 0;
|
||||
if (gSaveContext.save.playerForm == PLAYER_FORM_GORON || gSaveContext.save.playerForm == PLAYER_FORM_DEKU) {
|
||||
if ((gSaveContext.save.playerForm == PLAYER_FORM_GORON) ||
|
||||
(gSaveContext.save.playerForm == PLAYER_FORM_DEKU)) {
|
||||
// If the Gibdo/Redead tries to grab Goron or Deku Link, it will fail to
|
||||
// do so. It will appear to take damage and shake its head side-to-side.
|
||||
EnTalkGibud_SetupGrabFail(this);
|
||||
|
|
@ -442,6 +443,9 @@ void EnTalkGibud_Grab(EnTalkGibud* this, PlayState* play) {
|
|||
Math_SmoothStepToF(&this->actor.shape.yOffset, 0.0f, 1.0f, 400.0f, 0.0f);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -512,7 +516,7 @@ void EnTalkGibud_WalkToHome(EnTalkGibud* this, PlayState* play) {
|
|||
this->actor.world.rot = this->actor.shape.rot;
|
||||
}
|
||||
if (EnTalkGibud_PlayerInRangeWithCorrectState(this, play)) {
|
||||
if (gSaveContext.save.playerForm != PLAYER_FORM_GORON && gSaveContext.save.playerForm != PLAYER_FORM_DEKU &&
|
||||
if ((gSaveContext.save.playerForm != PLAYER_FORM_GORON) && (gSaveContext.save.playerForm != PLAYER_FORM_DEKU) &&
|
||||
Actor_IsFacingPlayer(&this->actor, 0x38E3)) {
|
||||
EnTalkGibud_SetupWalkToPlayer(this);
|
||||
}
|
||||
|
|
@ -676,6 +680,9 @@ void EnTalkGibud_GetTextIdForRequestedItem(EnTalkGibud* this, PlayState* play) {
|
|||
Message_StartTextbox(play, 0x1395, &this->actor);
|
||||
this->textId = 0x1395;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -700,6 +707,9 @@ void EnTalkGibud_GetNextTextBoxId(EnTalkGibud* this, PlayState* play) {
|
|||
Message_StartTextbox(play, 0xFF, &this->actor);
|
||||
this->textId = 0xFF;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1063,8 +1073,8 @@ void EnTalkGibud_UpdateDamage(EnTalkGibud* this, PlayState* play) {
|
|||
break;
|
||||
|
||||
case EN_TALK_GIBUD_DMGEFF_ZORA_MAGIC:
|
||||
if (this->actionFunc != EnTalkGibud_Grab &&
|
||||
(this->actionFunc != EnTalkGibud_Stunned || this->stunTimer == 0)) {
|
||||
if ((this->actionFunc != EnTalkGibud_Grab) &&
|
||||
((this->actionFunc != EnTalkGibud_Stunned) || (this->stunTimer == 0))) {
|
||||
this->drawDmgEffAlpha = 1.0f;
|
||||
this->drawDmgEffTimer = 40;
|
||||
this->drawDmgEffType = ACTOR_DRAW_DMGEFF_ELECTRIC_SPARKS_SMALL;
|
||||
|
|
@ -1073,10 +1083,13 @@ void EnTalkGibud_UpdateDamage(EnTalkGibud* this, PlayState* play) {
|
|||
break;
|
||||
|
||||
case EN_TALK_GIBUD_DMGEFF_STUN:
|
||||
if ((this->actionFunc != EnTalkGibud_Stunned) || this->stunTimer == 0) {
|
||||
if ((this->actionFunc != EnTalkGibud_Stunned) || (this->stunTimer == 0)) {
|
||||
EnTalkGibud_SetupStunned(this);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1114,7 +1127,7 @@ void EnTalkGibud_MoveGrabbedPlayerAwayFromWall(EnTalkGibud* this, PlayState* pla
|
|||
Actor_UpdateBgCheckInfo(play, &this->actor, 30.0f, 20.0f, 35.0f,
|
||||
UPDBGCHECKINFO_FLAG_1 | UPDBGCHECKINFO_FLAG_4 | UPDBGCHECKINFO_FLAG_8 |
|
||||
UPDBGCHECKINFO_FLAG_10);
|
||||
if (this->actionFunc == EnTalkGibud_Grab && this->grabState == EN_TALK_GIBUD_GRAB_START &&
|
||||
if ((this->actionFunc == EnTalkGibud_Grab) && (this->grabState == EN_TALK_GIBUD_GRAB_START) &&
|
||||
(this->actor.bgCheckFlags & BGCHECKFLAG_WALL)) {
|
||||
targetPos = player->actor.world.pos;
|
||||
targetPos.x += 10.0f * Math_SinS(this->actor.wallYaw);
|
||||
|
|
|
|||
|
|
@ -180,10 +180,10 @@ void EnTanron3_Live(EnTanron3* this, PlayState* play) {
|
|||
Player* player = GET_PLAYER(play);
|
||||
|
||||
this->skelAnime.curFrame = 4.0f;
|
||||
if ((player->actor.bgCheckFlags & BGCHECKFLAG_GROUND) && player->actor.shape.feetPos[0].y >= 438.0f) {
|
||||
if ((player->actor.bgCheckFlags & BGCHECKFLAG_GROUND) && (player->actor.shape.feetPos[0].y >= 438.0f)) {
|
||||
// Player is standing on the central platform, so stop chasing them
|
||||
this->isNonHostile = true;
|
||||
} else if (this->isNonHostile && this->workTimer[WORK_TIMER_WAIT] == 0 && !(this->timer & 0x1F)) {
|
||||
} else if (this->isNonHostile && (this->workTimer[WORK_TIMER_WAIT] == 0) && !(this->timer & 0x1F)) {
|
||||
xDistance = this->targetPos.x - player->actor.world.pos.x;
|
||||
zDistance = this->targetPos.z - player->actor.world.pos.z;
|
||||
if (sqrtf(SQ(xDistance) + SQ(zDistance)) < 500.0f) {
|
||||
|
|
@ -204,20 +204,21 @@ void EnTanron3_Live(EnTanron3* this, PlayState* play) {
|
|||
|
||||
Math_Vec3f_Copy(&this->targetPos, &player->actor.world.pos);
|
||||
if (!(this->timer & 0xF)) {
|
||||
if (Rand_ZeroOne() < 0.5f && this->actor.xzDistToPlayer <= 200.0f) {
|
||||
if ((Rand_ZeroOne() < 0.5f) && (this->actor.xzDistToPlayer <= 200.0f)) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_PIRANHA_ATTACK);
|
||||
}
|
||||
}
|
||||
|
||||
// If the player gets eaten by Gyorg, or if the attack timer ran out,
|
||||
// stop chasing the player for a little bit.
|
||||
if (this->workTimer[WORK_TIMER_ATTACK] == 0 || (player->stateFlags2 & PLAYER_STATE2_80)) {
|
||||
if ((this->workTimer[WORK_TIMER_ATTACK] == 0) || (player->stateFlags2 & PLAYER_STATE2_80)) {
|
||||
this->workTimer[WORK_TIMER_WAIT] = 150;
|
||||
this->isNonHostile = true;
|
||||
}
|
||||
break;
|
||||
|
||||
case true:
|
||||
if (sGyorg->unk_324 != 0 && !(this->timer & 0x7)) {
|
||||
if ((sGyorg->unk_324 != 0) && !(this->timer & 0x7)) {
|
||||
this->nextRotationAngle = 0x4E20;
|
||||
this->actor.speed = 6.0f;
|
||||
} else {
|
||||
|
|
@ -242,7 +243,7 @@ void EnTanron3_Live(EnTanron3* this, PlayState* play) {
|
|||
}
|
||||
|
||||
if (this->workTimer[WORK_TIMER_OUT_OF_WATER] == 0) {
|
||||
if (this->workTimer[WORK_TIMER_PICK_NEW_DEVIATION] == 0 && this->actor.speed > 1.0f) {
|
||||
if ((this->workTimer[WORK_TIMER_PICK_NEW_DEVIATION] == 0) && (this->actor.speed > 1.0f)) {
|
||||
this->workTimer[WORK_TIMER_PICK_NEW_DEVIATION] = Rand_ZeroFloat(20.0f);
|
||||
this->deviation.x = randPlusMinusPoint5Scaled(100.0f);
|
||||
this->deviation.y = randPlusMinusPoint5Scaled(50.0f + extraScaleY);
|
||||
|
|
@ -286,6 +287,7 @@ void EnTanron3_Live(EnTanron3* this, PlayState* play) {
|
|||
this->isBeached = true;
|
||||
}
|
||||
break;
|
||||
|
||||
case true:
|
||||
this->nextRotationAngle = 0x3A98;
|
||||
this->actor.gravity = -1.5f;
|
||||
|
|
@ -423,7 +425,7 @@ void EnTanron3_Update(Actor* thisx, PlayState* play) {
|
|||
CollisionCheck_SetAT(play, &play->colChkCtx, &this->atCollider.base);
|
||||
CollisionCheck_SetAC(play, &play->colChkCtx, &this->acCollider.base);
|
||||
|
||||
if ((s8)sGyorg->actor.colChkInfo.health <= 0 && this->actionFunc != EnTanron3_Die) {
|
||||
if (((s8)sGyorg->actor.colChkInfo.health <= 0) && (this->actionFunc != EnTanron3_Die)) {
|
||||
EnTanron3_SetupDie(this, play);
|
||||
this->workTimer[WORK_TIMER_DIE] = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1164,7 +1164,9 @@ void EnTest3_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList1, Gfx** dL
|
|||
func_80128640(play, &this->player, *dList1);
|
||||
if (this->player.stateFlags3 & PLAYER_STATE3_20000000) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
gSPDisplayList(POLY_OPA_DISP++, object_test3_DL_00EDD0);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
}
|
||||
|
|
@ -1200,7 +1202,9 @@ void EnTest3_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList1, Gfx** dL
|
|||
(this->player.skelAnime.curFrame >= 12.0f))) {
|
||||
if (func_80127438(play, &this->player, this->player.currentMask)) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
gSPDisplayList(POLY_OPA_DISP++, object_mask_ki_tan_DL_0004A0);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
}
|
||||
|
|
@ -1219,7 +1223,9 @@ void EnTest3_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList1, Gfx** dL
|
|||
D_80A41D60 = true;
|
||||
} else {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
gSPDisplayList(POLY_OPA_DISP++, object_test3_DL_00CB60);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -66,13 +66,13 @@ void EnTest5_HandleBottleAction(EnTest5* this, PlayState* play) {
|
|||
|
||||
player = GET_PLAYER(play);
|
||||
|
||||
if (player->interactRangeActor == NULL || player->getItemId != GI_MAX) {
|
||||
if ((player->interactRangeActor == NULL) || (player->getItemId != GI_MAX)) {
|
||||
Math_Vec3f_DistXYZAndStoreDiff(&this->minPos, &player->actor.world.pos, &playerPosRelativeToWater);
|
||||
|
||||
// Make sure that the player is within the bounds of the water and deep enough to grab some
|
||||
if (playerPosRelativeToWater.x >= 0.0f && playerPosRelativeToWater.x <= this->xLength &&
|
||||
playerPosRelativeToWater.z >= 0.0f && playerPosRelativeToWater.z <= this->zLength &&
|
||||
fabsf(playerPosRelativeToWater.y) < 100.0f && player->actor.depthInWater > 12.0f) {
|
||||
if ((playerPosRelativeToWater.x >= 0.0f) && (playerPosRelativeToWater.x <= this->xLength) &&
|
||||
(playerPosRelativeToWater.z >= 0.0f) && (playerPosRelativeToWater.z <= this->zLength) &&
|
||||
(fabsf(playerPosRelativeToWater.y) < 100.0f) && (player->actor.depthInWater > 12.0f)) {
|
||||
Actor_OfferGetItem(&this->actor, play, GI_MAX, this->actor.xzDistToPlayer,
|
||||
fabsf(this->actor.playerHeightRel));
|
||||
}
|
||||
|
|
@ -89,10 +89,10 @@ void EnTest5_Update(Actor* thisx, PlayState* play2) {
|
|||
this->actionFunc(this, play);
|
||||
|
||||
// If it's the hot spring variant, generate steam clouds
|
||||
if (ENTEST5_IS_HOT_SPRING(&this->actor) && (play->state.frames % 4) == 0) {
|
||||
steamPos.x = (Rand_ZeroOne() * this->xLength) + this->minPos.x;
|
||||
if (ENTEST5_IS_HOT_SPRING(&this->actor) && ((play->state.frames % 4) == 0)) {
|
||||
steamPos.x = this->minPos.x + (Rand_ZeroOne() * this->xLength);
|
||||
steamPos.y = this->minPos.y + 100.0f;
|
||||
steamPos.z = (Rand_ZeroOne() * this->zLength) + this->minPos.z;
|
||||
steamPos.z = this->minPos.z + (Rand_ZeroOne() * this->zLength);
|
||||
|
||||
if ((BgCheck_EntityRaycastFloor2(play, &play->colCtx, &poly, &steamPos) + 10.0f) < this->minPos.y) {
|
||||
Vec3f steamVel;
|
||||
|
|
@ -102,8 +102,7 @@ void EnTest5_Update(Actor* thisx, PlayState* play2) {
|
|||
steamVel.x = 0.0f;
|
||||
steamVel.z = 0.0f;
|
||||
|
||||
EffectSsIceSmoke_Spawn(play, &steamPos, &steamVel, &gZeroVec3f,
|
||||
(s16)((-200) - (s32)(Rand_ZeroOne() * 50.0f)));
|
||||
EffectSsIceSmoke_Spawn(play, &steamPos, &steamVel, &gZeroVec3f, -200 - (s32)(Rand_ZeroOne() * 50.0f));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1194,6 +1194,7 @@ void func_80A9369C(Actor* thisx, PlayState* play2) {
|
|||
s32 pad;
|
||||
|
||||
if (this) {}
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
this->unk_148 = POLY_OPA_DISP;
|
||||
|
|
|
|||
|
|
@ -1366,6 +1366,7 @@ void EnTk_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot,
|
|||
gSPDisplayList(POLY_OPA_DISP++, object_tk_DL_00B530);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -160,7 +160,8 @@ void EnTorch2_Draw(Actor* thisx, PlayState* play2) {
|
|||
Gfx* gfx = sShellDLists[this->actor.params];
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
if (this->alpha == 0xFF) {
|
||||
|
||||
if (this->alpha == 255) {
|
||||
Scene_SetRenderModeXlu(play, 0, 0x01);
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, 255, 255, 255, 255);
|
||||
Gfx_DrawDListOpa(play, gfx);
|
||||
|
|
@ -169,5 +170,6 @@ void EnTorch2_Draw(Actor* thisx, PlayState* play2) {
|
|||
gDPSetEnvColor(POLY_XLU_DISP++, 255, 255, 255, this->alpha);
|
||||
Gfx_DrawDListXlu(play, gfx);
|
||||
}
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -205,10 +205,10 @@ void EnToto_Destroy(Actor* thisx, PlayState* play) {
|
|||
}
|
||||
|
||||
void func_80BA383C(EnToto* this, PlayState* play) {
|
||||
if (SkelAnime_Update(&this->skelAnime) && this->actionFuncIndex == 1 &&
|
||||
this->skelAnime.animation != &object_zm_Anim_000C80) {
|
||||
if (play->msgCtx.currentTextId != 0x2A98 && play->msgCtx.currentTextId != 0x2A99) {
|
||||
if (this->unk2B4 & 1 || Rand_ZeroOne() > 0.5f) {
|
||||
if (SkelAnime_Update(&this->skelAnime) && (this->actionFuncIndex == 1) &&
|
||||
(this->skelAnime.animation != &object_zm_Anim_000C80)) {
|
||||
if ((play->msgCtx.currentTextId != 0x2A98) && (play->msgCtx.currentTextId != 0x2A99)) {
|
||||
if ((this->unk2B4 & 1) || (Rand_ZeroOne() > 0.5f)) {
|
||||
this->unk2B4 = (this->unk2B4 + 1) & 3;
|
||||
}
|
||||
}
|
||||
|
|
@ -251,9 +251,8 @@ void func_80BA39C8(EnToto* this, PlayState* play) {
|
|||
return;
|
||||
}
|
||||
|
||||
//! TODO: Neither 0xED02 nor 0xED01 match CLOCK_TIME macro
|
||||
if (((play->sceneId == SCENE_MILK_BAR) &&
|
||||
!((gSaveContext.save.time >= CLOCK_TIME(6, 0)) && (gSaveContext.save.time < 0xED02))) ||
|
||||
!((gSaveContext.save.time >= CLOCK_TIME(6, 0)) && (gSaveContext.save.time <= (CLOCK_TIME(22, 13) + 7)))) ||
|
||||
((play->sceneId != SCENE_MILK_BAR) && func_80BA397C(this, 0x2000))) {
|
||||
if (this->unk2B6 != 0) {
|
||||
this->text = D_80BA5044;
|
||||
|
|
@ -327,7 +326,7 @@ void func_80BA3DBC(EnToto* this, PlayState* play) {
|
|||
if (!func_80BA4C44(this, play)) {
|
||||
return;
|
||||
}
|
||||
if (this->text->unk1 != 0 && ENTOTO_WEEK_EVENT_FLAGS) {
|
||||
if ((this->text->unk1 != 0) && ENTOTO_WEEK_EVENT_FLAGS) {
|
||||
this->unk2B7 = 1;
|
||||
return;
|
||||
}
|
||||
|
|
@ -428,7 +427,7 @@ s32 func_80BA415C(EnToto* this, PlayState* play) {
|
|||
} else {
|
||||
func_8019F208();
|
||||
}
|
||||
return (play->msgCtx.choiceIndex != 0 ? 0 : this->text->unk1) + 1; // Possible msg MACRO
|
||||
return ((play->msgCtx.choiceIndex != 0) ? 0 : this->text->unk1) + 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -584,7 +583,7 @@ s32 func_80BA47E0(EnToto* this, PlayState* play) {
|
|||
this->unk2B3 += 8;
|
||||
}
|
||||
for (i = 0; i < ARRAY_COUNT(D_80BA50DC); i++) {
|
||||
if (gSaveContext.save.playerForm != (i + 1) && (D_80BA5128[i] & this->unk2B3)) {
|
||||
if ((gSaveContext.save.playerForm != (i + 1)) && (D_80BA5128[i] & this->unk2B3)) {
|
||||
Math_Vec3s_ToVec3f(&spawnPos, &D_80BA50DC[i].unk6);
|
||||
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_PLAYER, spawnPos.x, spawnPos.y, spawnPos.z, i + 2, 0, 0,
|
||||
|
|
|
|||
|
|
@ -121,6 +121,7 @@ void EnWizBrock_Draw(Actor* thisx, PlayState* play) {
|
|||
|
||||
if (this->platformType != EN_WIZ_BROCK_PLATFORM_TYPE_INACTIVE) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
AnimatedMat_Draw(play, Lib_SegmentedToVirtual(gWizrobePlatformCenterTexAnim));
|
||||
gDPPipeSync(POLY_XLU_DISP++);
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 255, 255, 255, 255);
|
||||
|
|
|
|||
|
|
@ -170,7 +170,7 @@ void EnYb_ActorShadowFunc(Actor* thisx, Lights* mapper, PlayState* play) {
|
|||
}
|
||||
|
||||
void EnYb_ChangeAnim(PlayState* play, EnYb* this, s16 animIndex, u8 animMode, f32 morphFrames) {
|
||||
if (animIndex >= 0 && animIndex < 3) {
|
||||
if ((animIndex >= 0) && (animIndex < 3)) {
|
||||
if ((animIndex != this->animIndex) || (animMode != ANIMMODE_LOOP)) {
|
||||
if (animIndex > 0) {
|
||||
if (animMode == ANIMMODE_LOOP) {
|
||||
|
|
@ -198,7 +198,7 @@ void EnYb_ChangeAnim(PlayState* play, EnYb* this, s16 animIndex, u8 animMode, f3
|
|||
}
|
||||
|
||||
s32 EnYb_CanTalk(EnYb* this, PlayState* play) {
|
||||
if (this->actor.xzDistToPlayer < 100.0f && Player_IsFacingActor(&this->actor, 0x3000, play) &&
|
||||
if ((this->actor.xzDistToPlayer < 100.0f) && Player_IsFacingActor(&this->actor, 0x3000, play) &&
|
||||
Actor_IsFacingPlayer(&this->actor, 0x3000)) {
|
||||
return true;
|
||||
} else {
|
||||
|
|
@ -296,6 +296,7 @@ void EnYb_Talk(EnYb* this, PlayState* play) {
|
|||
this->actionFunc = EnYb_Disappear;
|
||||
SET_WEEKEVENTREG(WEEKEVENTREG_82_04);
|
||||
break;
|
||||
|
||||
case 0x147C: // Spread my dance across the world
|
||||
if (Player_GetMask(play) == PLAYER_MASK_KAMARO) {
|
||||
Message_CloseTextbox(play);
|
||||
|
|
@ -311,6 +312,7 @@ void EnYb_Talk(EnYb* this, PlayState* play) {
|
|||
EnYb_ReceiveMask(this, play);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
Message_CloseTextbox(play);
|
||||
this->actionFunc = EnYb_Idle;
|
||||
|
|
@ -353,9 +355,9 @@ void EnYb_Idle(EnYb* this, PlayState* play) {
|
|||
Player* player = GET_PLAYER(play);
|
||||
|
||||
EnYb_UpdateAnimation(this, play);
|
||||
if (this->actor.xzDistToPlayer < 180.0f && fabsf(this->actor.playerHeightRel) < 50.0f &&
|
||||
play->msgCtx.ocarinaMode == 3 && play->msgCtx.lastPlayedSong == OCARINA_SONG_HEALING &&
|
||||
gSaveContext.save.playerForm == PLAYER_FORM_HUMAN) {
|
||||
if ((this->actor.xzDistToPlayer < 180.0f) && (fabsf(this->actor.playerHeightRel) < 50.0f) &&
|
||||
(play->msgCtx.ocarinaMode == 3) && (play->msgCtx.lastPlayedSong == OCARINA_SONG_HEALING) &&
|
||||
(gSaveContext.save.playerForm == PLAYER_FORM_HUMAN)) {
|
||||
this->actionFunc = EnYb_TeachingDance;
|
||||
this->teachingCutsceneTimer = 200;
|
||||
EnYb_ChangeCutscene(this, 0);
|
||||
|
|
@ -377,8 +379,8 @@ void EnYb_Idle(EnYb* this, PlayState* play) {
|
|||
if (!(player->stateFlags2 & PLAYER_STATE2_8000000)) {
|
||||
this->playerOcarinaOut &= ~1;
|
||||
}
|
||||
} else if ((player->stateFlags2 & PLAYER_STATE2_8000000) && this->actor.xzDistToPlayer < 180.0f &&
|
||||
fabsf(this->actor.playerHeightRel) < 50.0f) {
|
||||
} else if ((player->stateFlags2 & PLAYER_STATE2_8000000) && (this->actor.xzDistToPlayer < 180.0f) &&
|
||||
(fabsf(this->actor.playerHeightRel) < 50.0f)) {
|
||||
this->playerOcarinaOut |= 1;
|
||||
Actor_PlaySfx(&this->actor, NA_SE_SY_TRE_BOX_APPEAR);
|
||||
}
|
||||
|
|
@ -466,8 +468,6 @@ void EnYb_Draw(Actor* thisx, PlayState* play) {
|
|||
}
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 0, 0, 0, this->alpha);
|
||||
|
||||
if (1) {}
|
||||
|
||||
POLY_XLU_DISP =
|
||||
SkelAnime_DrawFlex(play, this->skelAnime.skeleton, this->skelAnime.jointTable,
|
||||
this->skelAnime.dListCount, NULL, EnYb_PostLimbDrawXlu, &this->actor, POLY_XLU_DISP);
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue