Actor Docs (#270)

* Docs

* actor timer_04C -> work_04C

* Actor & Boss unk_04A -> work_04A

* actor & boss unk_048 -> work_048

* actor & boss unk_046 -> work_046

* boss unk_044 -> work_044

* actor event docs

* ActorEvent docs

* name all Event Actor IDs

* EVID names in EventActorInfo comments

* refactor EVC_PASSED_ALL_RINGS by @inspectredc

* clarification comment

* some option docs

* audio enums and macros

* some audio renamings
This commit is contained in:
Alejandro Asenjo Nitti
2024-08-24 19:36:53 -03:00
committed by GitHub
parent 669fff8759
commit e82019fa2b
95 changed files with 2126 additions and 1960 deletions
+1 -1
View File
@@ -137,7 +137,7 @@ void* AudioHeap_Alloc(AudioAllocPool* pool, u32 size) {
u32 aligned = ALIGN16(size);
u8* ramAddr = pool->curRamAddr;
if (pool->startRamAddr + pool->size >= pool->curRamAddr + aligned) {
if ((pool->startRamAddr + pool->size) >= (pool->curRamAddr + aligned)) {
pool->curRamAddr += aligned;
} else {
return NULL;
+29 -17
View File
@@ -214,6 +214,7 @@ void AudioLoad_InitSampleDmaBuffers(s32 numNotes) {
gSampleDmaReuseQueue2WrPos = gSampleDmaCount - gSampleDmaListSize1;
}
// Updates the audiotable entries with their absolute ROM addresses
void AudioLoad_InitTable(AudioTable* table, u8* romAddr, u16 unkMediumParam) {
s32 i;
@@ -259,7 +260,7 @@ void AudioLoad_SyncLoadSeqParts(s32 seqId, s32 flags) {
s32 AudioLoad_SyncLoadSample(Sample* sample, s32 fontId) {
u8* sampleAddr;
if ((sample->isRelocated == 1) && (sample->medium != 0)) {
if ((sample->isRelocated == true) && (sample->medium != MEDIUM_RAM)) {
sampleAddr = AudioHeap_AllocPersistentSampleCache(sample->size, fontId, sample->sampleAddr, sample->medium);
if (sampleAddr == NULL) {
return -1;
@@ -486,6 +487,7 @@ void* AudioLoad_SyncLoadFont(s32 fontId) {
if (didAllocate == 1) {
AudioLoad_RelocateFontAndPreloadSamples(fontId, fontData, &relocInfo, AUDIOLOAD_SYNC);
}
return fontData;
}
@@ -649,13 +651,14 @@ void AudioLoad_RelocateFont(s32 fontId, u32 fontBaseAddr, void* relocData) {
}
}
}
for (i = 1; i <= numInstruments; i++) {
if (fontDataPtrs[i] != 0) {
fontDataPtrs[i] += fontBaseAddr;
instrument = fontDataPtrs[i];
if (instrument->isRelocated == 0) {
if (!instrument->isRelocated) {
if (instrument->normalRangeLo != 0) {
AudioLoad_RelocateSample(&instrument->lowPitchTunedSample, fontBaseAddr, relocData);
}
@@ -669,6 +672,7 @@ void AudioLoad_RelocateFont(s32 fontId, u32 fontBaseAddr, void* relocData) {
}
}
}
gSoundFontList[fontId].drums = fontDataPtrs[0];
gSoundFontList[fontId].instruments = (u32) &fontDataPtrs[1];
}
@@ -723,7 +727,7 @@ s32 AudioLoad_Dma(OSIoMesg* mesg, u32 priority, s32 direction, u32 devAddr, void
return 0;
}
if (size & 0xF) {
if (size % 16) {
size = ALIGN16(size);
}
@@ -763,19 +767,19 @@ void* AudioLoad_AsyncLoadInner(s32 tableType, s32 id, s32 nChunks, s32 retData,
switch (tableType) {
case SEQUENCE_TABLE:
if (gSeqLoadStatus[id] == 1) {
if (gSeqLoadStatus[id] == LOAD_STATUS_IN_PROGRESS) {
return NULL;
}
break;
case FONT_TABLE:
if (gFontLoadStatus[id] == 1) {
if (gFontLoadStatus[id] == LOAD_STATUS_IN_PROGRESS) {
return NULL;
}
break;
case SAMPLE_TABLE:
if (gSampleFontLoadStatus[id] == 1) {
if (gSampleFontLoadStatus[id] == LOAD_STATUS_IN_PROGRESS) {
return NULL;
}
break;
@@ -783,7 +787,7 @@ void* AudioLoad_AsyncLoadInner(s32 tableType, s32 id, s32 nChunks, s32 retData,
ramAddr = AudioLoad_SearchCaches(tableType, id);
if (ramAddr != NULL) {
loadStatus = 2;
loadStatus = LOAD_STATUS_COMPLETE;
osSendMesg(retQueue, (OSMesg) (retData << 0x18), OS_MESG_NOBLOCK);
} else {
table = AudioLoad_GetLoadTable(tableType);
@@ -792,7 +796,7 @@ void* AudioLoad_AsyncLoadInner(s32 tableType, s32 id, s32 nChunks, s32 retData,
medium = table->entries[id].medium;
cachePolicy = table->entries[id].cachePolicy;
romAddr = table->entries[id].romAddr;
loadStatus = 2;
loadStatus = LOAD_STATUS_COMPLETE;
switch (cachePolicy) {
case CACHEPOLICY_0:
@@ -800,7 +804,7 @@ void* AudioLoad_AsyncLoadInner(s32 tableType, s32 id, s32 nChunks, s32 retData,
if (ramAddr == NULL) {
return ramAddr;
}
loadStatus = 5;
loadStatus = LOAD_STATUS_PERMANENTLY_LOADED;
break;
case CACHEPOLICY_1:
@@ -827,7 +831,7 @@ void* AudioLoad_AsyncLoadInner(s32 tableType, s32 id, s32 nChunks, s32 retData,
}
AudioLoad_StartAsyncLoad(romAddr, ramAddr, size, medium, nChunks, retQueue,
(retData << 0x18) | (tableType << 0x10) | (id << 8) | loadStatus);
loadStatus = 1;
loadStatus = LOAD_STATUS_IN_PROGRESS;
}
switch (tableType) {
@@ -892,21 +896,22 @@ void AudioLoad_Init(void) {
*clearContext++ = 0;
}
// 1000 is a conversion from seconds to milliseconds
switch (osTvType) {
case OS_TV_PAL:
gMaxTempoTvTypeFactors = 20.03042f;
gRefreshRate = 50;
gMaxTempoTvTypeFactors = 1000 * REFRESH_RATE_DEVIATION_PAL / REFRESH_RATE_PAL;
gRefreshRate = REFRESH_RATE_PAL;
break;
case OS_TV_MPAL:
gMaxTempoTvTypeFactors = 16.546f;
gRefreshRate = 60;
gMaxTempoTvTypeFactors = 1000 * REFRESH_RATE_DEVIATION_MPAL / REFRESH_RATE_MPAL;
gRefreshRate = REFRESH_RATE_MPAL;
break;
default:
case OS_TV_NTSC:
gMaxTempoTvTypeFactors = 16.713f;
gRefreshRate = 60;
default:
gMaxTempoTvTypeFactors = 1000 * REFRESH_RATE_DEVIATION_NTSC / REFRESH_RATE_NTSC;
gRefreshRate = REFRESH_RATE_NTSC;
break;
}
@@ -940,6 +945,7 @@ void AudioLoad_Init(void) {
gAiBuffers[i][j] = 0;
}
}
gAudioSpecId = AUDIOSPEC_0;
gAudioResetStep = 1;
AudioHeap_ResetStep();
@@ -977,6 +983,7 @@ void AudioLoad_Init(void) {
static const char devstr38[] = "Entry--- %d %d\n";
static const char devstr39[] = "---Block LPS here\n";
static const char devstr40[] = "===Block LPS end\n";
s32 AudioLoad_SlowLoadSample(s32 fontId, u8 instId, s8* status) {
Sample* sample;
AudioSlowLoad* slowLoad;
@@ -995,10 +1002,13 @@ s32 AudioLoad_SlowLoadSample(s32 fontId, u8 instId, s8* status) {
if (slowLoad->state == SLOW_LOAD_DONE) {
slowLoad->state = SLOW_LOAD_WAITING;
}
slowLoad->sample = *sample;
slowLoad->status = status;
slowLoad->curRamAddr =
AudioHeap_AllocTemporarySampleCache(sample->size, fontId, sample->sampleAddr, sample->medium);
if (slowLoad->curRamAddr == NULL) {
if ((sample->medium == MEDIUM_UNK) || (sample->codec == 2)) {
*status = SLOW_LOAD_STATUS_0;
@@ -1008,6 +1018,7 @@ s32 AudioLoad_SlowLoadSample(s32 fontId, u8 instId, s8* status) {
return -1;
}
}
slowLoad->state = SLOW_LOAD_START;
slowLoad->bytesRemaining = ALIGN16(sample->size);
slowLoad->ramAddr = slowLoad->curRamAddr;
@@ -1016,6 +1027,7 @@ s32 AudioLoad_SlowLoadSample(s32 fontId, u8 instId, s8* status) {
slowLoad->seqOrFontId = fontId;
slowLoad->instId = instId;
gSlowLoads.unk_00 ^= 1;
return 0;
}
+3
View File
@@ -1399,11 +1399,14 @@ void func_800168BC(void) {
gSeqChannels[i].layers[j] = NULL;
}
}
func_8001463C();
for (i = 0; i < ARRAY_COUNT(gSeqLayers); i++) {
gSeqLayers[i].channel = NULL;
gSeqLayers[i].enabled = false;
}
for (i = 0; i < ARRAY_COUNT(gSeqPlayers); i++) {
for (j = 0; j < 16; j++) {
gSeqPlayers[i].channels[j] = &gSeqChannelNone;
+59 -34
View File
@@ -513,7 +513,7 @@ void func_80009504(s16* arg0, UnkStruct_800097A8* arg1) {
func_80008364(D_80145D48, D_80146148, 8, D_80146548);
for (i = 0; i < 0x100; i++) {
for (i = 0; i < 256; i++) {
if (D_80145D48[i] > 32767.0f) {
D_80145D48[i] = 32767.0f;
}
@@ -537,6 +537,7 @@ s32 func_8000967C(s32 length, s16* ramAddr, UnkStruct_800097A8* arg2) {
for (i = 0; i < arg2->unk_4; i++) {
ramAddr[i] = temp_t7[i];
}
var_s1 = arg2->unk_4;
temp_t0 = (length - arg2->unk_4 + 0xFF) / 256;
arg2->unk_4 = (temp_t0 * 256) + arg2->unk_4 - length;
@@ -545,6 +546,7 @@ s32 func_8000967C(s32 length, s16* ramAddr, UnkStruct_800097A8* arg2) {
func_80009504(&ramAddr[var_s1], arg2);
var_s1 += 0x100;
}
for (i = 0; i < arg2->unk_4; i++) {
temp_t7[i] = ramAddr[length + i];
}
@@ -568,10 +570,13 @@ u8* func_800097A8(Sample* sample, s32 length, u32 flags, UnkStruct_800097A8* arg
arg3->unk_14->sizeUnused = 0;
}
}
if (gSampleDmaReuseQueue1RdPos != gSampleDmaReuseQueue1WrPos) {
sp1C = &gSampleDmas[gSampleDmaReuseQueue1[gSampleDmaReuseQueue1RdPos++]];
}
if (1) {}
if (1) {} //! FAKE
sp1C->ttl = 2;
sp1C->devAddr = sample->sampleAddr;
sp1C->sizeUnused = length * 2;
@@ -635,6 +640,7 @@ Acmd* func_80009B64(Acmd* aList, s32* cmdCount, s16* aiBufStart, s32 aiBufLen) {
func_8001678C(i - 1);
func_80009AAC(gAudioBufferParams.ticksPerUpdate - i);
}
aiBufPtr = (s32*) aiBufStart;
for (i = gAudioBufferParams.ticksPerUpdate; i > 0; i--) {
if (i == 1) {
@@ -646,22 +652,27 @@ Acmd* func_80009B64(Acmd* aList, s32* cmdCount, s16* aiBufStart, s32 aiBufLen) {
} else {
chunkLen = gAudioBufferParams.samplesPerTick;
}
for (j = 0; j < gNumSynthReverbs; j++) {
if (gSynthReverbs[j].useReverb) {
func_800080C0(chunkLen, gAudioBufferParams.ticksPerUpdate - i, j);
}
}
aCmdPtr = func_8000A25C((s16*) aiBufPtr, chunkLen, aCmdPtr, gAudioBufferParams.ticksPerUpdate - i);
aiBufLen -= chunkLen;
aiBufPtr += chunkLen;
}
for (j = 0; j < gNumSynthReverbs; j++) {
if (gSynthReverbs[j].framesToIgnore != 0) {
gSynthReverbs[j].framesToIgnore--;
}
gSynthReverbs[j].curFrame ^= 1;
}
*cmdCount = aCmdPtr - aList;
return aCmdPtr;
}
@@ -715,6 +726,7 @@ Acmd* func_8000A128(Acmd* aList, s16 reverbIndex, s16 updateIndex) {
aList = func_80009984(aList, sp24->lengthA + 0xC90, 0, sp24->lengthB, reverbIndex);
}
break;
default:
aSaveBuffer(aList++, 0xC90,
OS_K0_TO_PHYSICAL(gSynthReverbs[reverbIndex]
@@ -724,6 +736,7 @@ Acmd* func_8000A128(Acmd* aList, s16 reverbIndex, s16 updateIndex) {
gSynthReverbs[reverbIndex].resampleFlags = 0;
break;
}
return aList;
}
@@ -731,61 +744,66 @@ Acmd* func_8000A25C(s16* aiBuf, s32 aiBufLen, Acmd* aList, s32 updateIndex) {
u8 sp84[0x3C];
NoteSubEu* temp_v0;
s16 var_s2;
s16 var_s3;
s32 var_s1;
s16 i;
s32 j;
var_s2 = 0;
if (gNumSynthReverbs == 0) {
if (gSynthReverbs[var_s3].useReverb) {} // fake?
for (var_s1 = 0; var_s1 < gNumNotes; var_s1++) {
if (gNoteSubsEu[gNumNotes * updateIndex + var_s1].bitField0.enabled) {
sp84[var_s2++] = var_s1;
if (gSynthReverbs[i].useReverb) {} // fake?
for (j = 0; j < gNumNotes; j++) {
if (gNoteSubsEu[gNumNotes * updateIndex + j].bitField0.enabled) {
sp84[var_s2++] = j;
}
}
} else {
for (var_s3 = 0; var_s3 < gNumSynthReverbs; var_s3++) {
for (var_s1 = 0; var_s1 < gNumNotes; var_s1++) {
temp_v0 = &gNoteSubsEu[gNumNotes * updateIndex + var_s1];
if (temp_v0->bitField0.enabled && (temp_v0->bitField1.reverbIndex == var_s3)) {
sp84[var_s2++] = var_s1;
for (i = 0; i < gNumSynthReverbs; i++) {
for (j = 0; j < gNumNotes; j++) {
temp_v0 = &gNoteSubsEu[gNumNotes * updateIndex + j];
if (temp_v0->bitField0.enabled && (temp_v0->bitField1.reverbIndex == i)) {
sp84[var_s2++] = j;
}
}
}
for (var_s1 = 0; var_s1 < gNumNotes; var_s1++) {
temp_v0 = &gNoteSubsEu[gNumNotes * updateIndex + var_s1];
for (j = 0; j < gNumNotes; j++) {
temp_v0 = &gNoteSubsEu[gNumNotes * updateIndex + j];
if (temp_v0->bitField0.enabled && (temp_v0->bitField1.reverbIndex >= gNumSynthReverbs)) {
sp84[var_s2++] = var_s1;
sp84[var_s2++] = j;
}
}
}
aClearBuffer(aList++, 0x990, 0x300);
var_s1 = 0;
for (var_s3 = 0; var_s3 < gNumSynthReverbs; var_s3++) {
D_8014C1B2 = gSynthReverbs[var_s3].useReverb;
j = 0;
for (i = 0; i < gNumSynthReverbs; i++) {
D_8014C1B2 = gSynthReverbs[i].useReverb;
if (D_8014C1B2) {
aList = func_80009D78(aList, aiBufLen, var_s3, updateIndex);
aList = func_80009D78(aList, aiBufLen, i, updateIndex);
}
while (var_s1 < var_s2) {
if (var_s3 != gNoteSubsEu[updateIndex * gNumNotes + sp84[var_s1]].bitField1.reverbIndex) {
while (j < var_s2) {
if (i != gNoteSubsEu[updateIndex * gNumNotes + sp84[j]].bitField1.reverbIndex) {
break;
}
aList = func_8000A700(sp84[var_s1], &gNoteSubsEu[updateIndex * gNumNotes + sp84[var_s1]],
&gNotes[sp84[var_s1]].synthesisState, aiBuf, aiBufLen, aList, updateIndex);
var_s1++;
aList = func_8000A700(sp84[j], &gNoteSubsEu[updateIndex * gNumNotes + sp84[j]],
&gNotes[sp84[j]].synthesisState, aiBuf, aiBufLen, aList, updateIndex);
j++;
}
if (gSynthReverbs[var_s3].useReverb) {
aList = func_8000A128(aList, var_s3, updateIndex);
if (gSynthReverbs[i].useReverb) {
aList = func_8000A128(aList, i, updateIndex);
}
}
while (var_s1 < var_s2) {
aList = func_8000A700(sp84[var_s1], &gNoteSubsEu[updateIndex * gNumNotes + sp84[var_s1]],
&gNotes[sp84[var_s1]].synthesisState, aiBuf, aiBufLen, aList, updateIndex);
var_s1++;
while (j < var_s2) {
aList = func_8000A700(sp84[j], &gNoteSubsEu[updateIndex * gNumNotes + sp84[j]], &gNotes[sp84[j]].synthesisState,
aiBuf, aiBufLen, aList, updateIndex);
j++;
}
var_s1 = aiBufLen * 2;
aSetBuffer(aList++, 0, 0, 0x450, var_s1);
j = aiBufLen * 2;
aSetBuffer(aList++, 0, 0, 0x450, j);
aInterleave(aList++, 0, 0x990, 0xB10, 0);
aSaveBuffer(aList++, 0x450, OS_K0_TO_PHYSICAL(aiBuf), var_s1 * 2);
aSaveBuffer(aList++, 0x450, OS_K0_TO_PHYSICAL(aiBuf), j * 2);
return aList;
}
@@ -1209,8 +1227,10 @@ Acmd* func_8000B51C(Acmd* aList, NoteSubEu* noteSub, NoteSynthesisState* synthSt
} else {
var_a2 = 0;
}
synthState->curVolLeft = temp_t1 + (var_t0 * (aiBufLen >> 3));
synthState->curVolRight = temp_t2 + (var_a3 * (aiBufLen >> 3));
if (noteSub->bitField0.usesHeadsetPanEffects) {
aClearBuffer(aList++, 0x650, 0x180);
aEnvSetup1(aList++, (temp_a1 & 0x7F), var_a2, var_t0, var_a3);
@@ -1255,6 +1275,7 @@ Acmd* func_8000B98C(Acmd* aList, NoteSubEu* noteSub, NoteSynthesisState* synthSt
var_v1 = synthState->prevHaasEffectLeftDelaySize;
synthState->prevHaasEffectLeftDelaySize = var_a1;
break;
case 2:
var_t0 = 0xB10;
var_a1 = noteSub->rightDelaySize;
@@ -1262,9 +1283,11 @@ Acmd* func_8000B98C(Acmd* aList, NoteSubEu* noteSub, NoteSynthesisState* synthSt
var_v1 = synthState->prevHaasEffectRightDelaySize;
synthState->prevHaasEffectRightDelaySize = var_a1;
break;
default:
return aList;
}
if (flags != 1) {
if (var_a1 != var_v1) {
temp = (((size << 0xF) / 2) - 1) / ((size + var_a1 - var_v1 - 2) / 2);
@@ -1289,6 +1312,8 @@ Acmd* func_8000B98C(Acmd* aList, NoteSubEu* noteSub, NoteSynthesisState* synthSt
aSaveBuffer(aList++, size + 0x650, OS_K0_TO_PHYSICAL(synthState->synthesisBuffers->panSamplesBuffer),
ALIGN16(var_a1));
}
aAddMixer(aList++, ALIGN64(size), 0x650, var_t0, 0x7FFF);
return aList;
}
+10 -1
View File
@@ -57,26 +57,33 @@ SPTask* AudioThread_CreateTask(void) {
if ((gAudioTaskCountQ % gAudioBufferParams.count) != 0) {
return gWaitingAudioTask;
}
osSendMesg(gAudioTaskStartQueue, (OSMesg) gAudioTaskCountQ, OS_MESG_NOBLOCK);
gAudioTaskIndexQ ^= 1;
gCurAiBuffIndex++;
gCurAiBuffIndex %= 3;
aiBuffIndex = (gCurAiBuffIndex + 1) % 3;
aiSamplesLeft = osAiGetLength() / 4;
if ((gAudioResetTimer < 16) && (gAiBuffLengths[aiBuffIndex] != 0)) {
osAiSetNextBuffer(gAiBuffers[aiBuffIndex], gAiBuffLengths[aiBuffIndex] * 4);
}
if (gCurAudioFrameDmaCount && gCurAudioFrameDmaCount) {}
if (gCurAudioFrameDmaCount && gCurAudioFrameDmaCount) {} //! FAKE ?
gCurAudioFrameDmaCount = 0;
AudioLoad_DecreaseSampleDmaTtls();
AudioLoad_ProcessLoads(gAudioResetStep);
if (MQ_GET_MESG(gAudioSpecQueue, &specId)) {
if (gAudioResetStep == 0) {
gAudioResetStep = 5;
}
gAudioSpecId = specId;
}
if ((gAudioResetStep != 0) && (AudioHeap_ResetStep() == 0)) {
if (gAudioResetStep == 0) {
osSendMesg(gAudioResetQueue, (OSMesg) (s32) gAudioSpecId, OS_MESG_NOBLOCK);
@@ -84,12 +91,14 @@ SPTask* AudioThread_CreateTask(void) {
gWaitingAudioTask = NULL;
return NULL;
}
if (gAudioResetTimer > 16) {
return NULL;
}
if (gAudioResetTimer != 0) {
gAudioResetTimer++;
}
gAudioCurTask = &gAudioRspTasks[gAudioTaskIndexQ];
gCurAbiCmdBuffer = gAbiCmdBuffs[gAudioTaskIndexQ];
aiBuffIndex = gCurAiBuffIndex;
+97 -77
View File
@@ -295,8 +295,8 @@ void ActorAllRange_SetShadowData(Actor* this) {
Vec3f temp1;
f32 temp4;
f32 temp5;
Vec3f spE4;
Vec3f spD8;
Vec3f src;
Vec3f dest;
Vec3f spCC;
Vec3f spC0;
Vec3f spB4;
@@ -306,6 +306,7 @@ void ActorAllRange_SetShadowData(Actor* this) {
s32 pad[2];
this->fwork[25] = this->fwork[26] = this->fwork[28] = this->fwork[27] = 0.0f;
if (this->drawShadow && (gLevelMode == LEVELMODE_ALL_RANGE) && (gLevelType == LEVELTYPE_PLANET)) {
for (i = 0, scenery360 = gScenery360; i < 200; i++, scenery360++) {
if ((scenery360->obj.status == OBJ_ACTIVE) &&
@@ -321,17 +322,17 @@ void ActorAllRange_SetShadowData(Actor* this) {
temp4 = scenery360->obj.rot.y;
Matrix_RotateY(gCalcMatrix, -temp4 * M_DTOR, MTXF_NEW);
spE4.x = this->obj.pos.x - temp1.x;
spE4.y = 0.0f;
spE4.z = this->obj.pos.z - temp1.z;
Matrix_MultVec3fNoTranslate(gCalcMatrix, &spE4, &spD8);
src.x = this->obj.pos.x - temp1.x;
src.y = 0.0f;
src.z = this->obj.pos.z - temp1.z;
Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest);
spC0.x = temp1.x;
spC0.y = temp1.y;
spCC.x = spD8.x + temp1.x;
spCC.x = dest.x + temp1.x;
spC0.z = temp1.z; // fake? weird ordering
spCC.y = spD8.y + temp1.y;
spCC.z = spD8.z + temp1.z;
spCC.y = dest.y + temp1.y;
spCC.z = dest.z + temp1.z;
if ((scenery360->obj.id == OBJ_SCENERY_FO_MOUNTAIN_2) ||
(scenery360->obj.id == OBJ_SCENERY_FO_MOUNTAIN_3)) {
@@ -618,7 +619,11 @@ void ActorAllRange_UpdateEnemyEvents(Actor* this) {
ActorAllRange* enemy2;
s32 j;
#ifdef AVOID_UB
for (j = 0, enemy2 = &gActors[AI360_ENEMY]; j < 50; j++, enemy2++) {
#else
for (j = 0, enemy2 = &gActors[AI360_ENEMY]; j <= 50; j++, enemy2++) { // bug? should be <
#endif
if ((enemy2->obj.status == OBJ_ACTIVE) && (enemy2->state == STATE360_2) &&
(enemy2->aiIndex == enemy->aiIndex)) {
return;
@@ -742,7 +747,14 @@ void ActorAllRange_UpdateEvents(Actor* this) {
ActorAllRange_SpawnSupplies(this);
}
s32 func_360_800301F4(Actor* this) {
/**
* Checks whether an actor is close to Scenery objects or Bosses in Space Levels.
* Return values:
* 1: Object nearby is found below the actor
* -1: Object nearby is found above the actor
* 0: No objects found
*/
s32 ActorAllRange_CheckObjectNearbySpace(Actor* this) {
Boss* boss;
f32 temp_ft4;
f32 temp_ft5;
@@ -775,6 +787,7 @@ s32 func_360_800301F4(Actor* this) {
}
boss = &gBosses[0];
// Check if the actor is close to the Great Fox in Sector Z.
if ((gCurrentLevel == LEVEL_SECTOR_Z) && (fabsf(boss->obj.pos.x - (this->obj.pos.x + temp_ft4)) < 2000.0f) &&
(fabsf(boss->obj.pos.z - (this->obj.pos.z + temp_ft5)) < 2000.0f)) {
if (fabsf(boss->obj.pos.y - this->obj.pos.y) < 1500.0f) {
@@ -788,15 +801,22 @@ s32 func_360_800301F4(Actor* this) {
return 0;
}
s32 func_360_8003049C(ActorAllRange* this) {
/**
* Checks whether an actor is close to Scenery objects or specific Bosses.
* Return values:
* 1: Object nearby is found below the actor
* -1: Object nearby is found above the actor
* 0: No objects found
*/
s32 ActorAllRange_CheckObjectNearby(ActorAllRange* this) {
Scenery360* scenery360;
s32 i;
f32 sp44;
f32 sp40;
f32 sp3C;
f32 temp_fa0;
f32 temp_ft4;
f32 var_ft5;
f32 distThreshold;
f32 sinRotY;
f32 cosRotY;
f32 xOffset;
f32 zOffset;
f32 yDistThreshold;
Boss* boss = &gBosses[0];
s32 pad[4];
@@ -805,45 +825,45 @@ s32 func_360_8003049C(ActorAllRange* this) {
}
if ((gLevelType == LEVELTYPE_SPACE) && (gCurrentLevel != LEVEL_BOLSE)) {
return func_360_800301F4(this);
return ActorAllRange_CheckObjectNearbySpace(this);
}
sp40 = SIN_DEG(this->obj.rot.y);
sp3C = COS_DEG(this->obj.rot.y);
sinRotY = SIN_DEG(this->obj.rot.y);
cosRotY = COS_DEG(this->obj.rot.y);
temp_fa0 = this->fwork[9] * 10.0f + (sp40 * 650.0f);
temp_ft4 = this->fwork[9] * 10.0f + (sp3C * 650.0f);
xOffset = this->fwork[9] * 10.0f + (sinRotY * 650.0f);
zOffset = this->fwork[9] * 10.0f + (cosRotY * 650.0f);
if (gLevelMode == LEVELMODE_ALL_RANGE) {
for (i = 0, scenery360 = gScenery360; i < 200; i++, scenery360++) {
if ((scenery360->obj.status == OBJ_ACTIVE) &&
(fabsf(scenery360->obj.pos.x - (this->obj.pos.x + temp_fa0)) < 1200.0f) &&
(fabsf(scenery360->obj.pos.z - (this->obj.pos.z + temp_ft4)) < 1200.0f) && (this->obj.pos.y < 650.0f)) {
(fabsf(scenery360->obj.pos.x - (this->obj.pos.x + xOffset)) < 1200.0f) &&
(fabsf(scenery360->obj.pos.z - (this->obj.pos.z + zOffset)) < 1200.0f) && (this->obj.pos.y < 650.0f)) {
return 1;
}
}
}
sp44 = 1200.0f;
var_ft5 = 650.0f;
distThreshold = 1200.0f;
yDistThreshold = 650.0f;
if (this->aiType < AI360_KATT) {
var_ft5 = 720.0f;
if (this->aiType <= AI360_ANDREW) {
yDistThreshold = 720.0f;
}
if (boss->obj.id == OBJ_BOSS_CO_CARRIER) {
var_ft5 = 350.0f;
yDistThreshold = 350.0f;
} else if (boss->obj.id == OBJ_BOSS_BO_BASE) {
sp44 = 2000.0f;
var_ft5 = 750.0f;
distThreshold = 2000.0f;
yDistThreshold = 750.0f;
} else if (boss->obj.id == OBJ_BOSS_KA_FLBASE) {
sp44 = 1500.0f;
var_ft5 = 700.0f;
distThreshold = 1500.0f;
yDistThreshold = 700.0f;
}
if ((fabsf(boss->obj.pos.x - (this->obj.pos.x + temp_fa0)) < sp44) &&
(fabsf(boss->obj.pos.z - (this->obj.pos.z + temp_ft4)) < sp44) &&
(fabsf(boss->obj.pos.y - this->obj.pos.y) < var_ft5)) {
if ((fabsf(boss->obj.pos.x - (this->obj.pos.x + xOffset)) < distThreshold) &&
(fabsf(boss->obj.pos.z - (this->obj.pos.z + zOffset)) < distThreshold) &&
(fabsf(boss->obj.pos.y - this->obj.pos.y) < yDistThreshold)) {
return 1;
} else {
return 0;
@@ -945,7 +965,7 @@ void ActorAllRange_ApplyDamage(ActorAllRange* this) {
this->timer_0C2 = 10;
this->timer_0BE = 0;
this->timer_04C = RAND_INT(2.9f);
this->work_04C = RAND_INT(2.9f);
switch (RAND_INT(4.0f)) {
case 0:
@@ -1262,7 +1282,7 @@ static Vec3f sSectorZRetreatPath[6] = {
void ActorAllRange_Update(ActorAllRange* this) {
u8 sp10F;
s32 sp108;
s32 objectNearby;
s32 sp104;
s32 temp_v0_27;
RadarMark* radarMark;
@@ -1336,7 +1356,7 @@ void ActorAllRange_Update(ActorAllRange* this) {
if (this->rot_0F4.x > 180.0f) {
this->rot_0F4.x -= 360.0f;
}
this->unk_046 = 0;
this->work_046 = 0;
break;
case STATE360_9:
@@ -1462,7 +1482,7 @@ void ActorAllRange_Update(ActorAllRange* this) {
this->fwork[7] = 360.0f;
this->fwork[8] = 0.0f;
AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, this->sfxSource, 0);
this->unk_046 = 0;
this->work_046 = 0;
}
gTeamShields[this->aiType] = -1;
gTeamDamage[this->aiType] = 0;
@@ -1479,13 +1499,13 @@ void ActorAllRange_Update(ActorAllRange* this) {
gTeamShields[this->aiType] = -1;
gTeamDamage[this->aiType] = 0;
if (gCurrentLevel == LEVEL_SECTOR_Z) {
this->fwork[4] = sSectorZRetreatPath[this->unk_046].x;
this->fwork[5] = sSectorZRetreatPath[this->unk_046].y;
this->fwork[6] = sSectorZRetreatPath[this->unk_046].z;
if ((fabsf(this->obj.pos.x - sSectorZRetreatPath[this->unk_046].x) < 800.0f) &&
(fabsf(this->obj.pos.z - sSectorZRetreatPath[this->unk_046].z) < 800.0f)) {
this->unk_046++;
if (this->unk_046 >= 4) {
this->fwork[4] = sSectorZRetreatPath[this->work_046].x;
this->fwork[5] = sSectorZRetreatPath[this->work_046].y;
this->fwork[6] = sSectorZRetreatPath[this->work_046].z;
if ((fabsf(this->obj.pos.x - sSectorZRetreatPath[this->work_046].x) < 800.0f) &&
(fabsf(this->obj.pos.z - sSectorZRetreatPath[this->work_046].z) < 800.0f)) {
this->work_046++;
if (this->work_046 >= 4) {
Object_Kill(&this->obj, this->sfxSource);
}
}
@@ -1989,7 +2009,7 @@ void ActorAllRange_Update(ActorAllRange* this) {
Math_SmoothStepToAngle(&this->obj.rot.z, 5.0f, 0.1f, 3.0f, 0.01f);
}
switch (this->unk_046) {
switch (this->work_046) {
case 0:
Math_SmoothStepToF(&this->rot_0F4.x, 200.0f, 0.1f, 6.0f, 0.0001f);
if (this->rot_0F4.x > 190.0f) {
@@ -2003,7 +2023,7 @@ void ActorAllRange_Update(ActorAllRange* this) {
this->obj.rot.z -= 360.0f;
}
this->timer_0BC = 40;
this->unk_046++;
this->work_046++;
}
this->obj.pos.y -= 3.0f;
break;
@@ -2057,12 +2077,12 @@ void ActorAllRange_Update(ActorAllRange* this) {
spD8 = this->fwork[20];
spD4 = this->fwork[19];
sp108 = 0;
objectNearby = 0;
if (sp104 == 1) {
if (this->aiType < AI360_GREAT_FOX) {
sp108 = func_360_8003049C(this);
if ((sp108 != 0) && (this->aiType < AI360_ENEMY) && (this->timer_0BE == 0) &&
objectNearby = ActorAllRange_CheckObjectNearby(this);
if ((objectNearby != 0) && (this->aiType < AI360_ENEMY) && (this->timer_0BE == 0) &&
((this->fwork[7] < 0.01f) || (this->fwork[7] > 359.9f))) {
this->timer_0BE = RAND_INT(200.0f) + 200;
if (Rand_ZeroOne() < 0.5f) {
@@ -2075,11 +2095,11 @@ void ActorAllRange_Update(ActorAllRange* this) {
}
}
if (sp108 != 0) {
if (objectNearby != 0) {
if ((this->aiType < AI360_ENEMY) || (gCurrentLevel != LEVEL_FORTUNA)) {
spD8 += 40.0f * sp108;
spD8 += 40.0f * objectNearby;
} else {
spD8 += 20.0f * sp108;
spD8 += 20.0f * objectNearby;
}
if (spD8 >= 360.0f) {
spD8 -= 360.0f;
@@ -2277,9 +2297,9 @@ void ActorAllRange_Update(ActorAllRange* this) {
if (gCurrentLevel == LEVEL_FORTUNA) {
ActorAllRange_SetShadowData(this);
} else if (gCurrentLevel == LEVEL_VENOM_ANDROSS) {
this->unk_04A++;
if (this->unk_04A >= Animation_GetFrameCount(&D_VE2_600C200)) {
this->unk_04A = 0;
this->work_04A++;
if (this->work_04A >= Animation_GetFrameCount(&D_VE2_600C200)) {
this->work_04A = 0;
}
}
@@ -2404,35 +2424,35 @@ void ActorAllRange_Draw(ActorAllRange* this) {
case AI360_PIGMA:
case AI360_ANDREW:
if (gCurrentLevel == LEVEL_VENOM_2) {
gSPDisplayList(gMasterDisp++, D_STAR_WOLF_F0103D0);
gSPDisplayList(gMasterDisp++, aStarWolfUpgradedShipDL);
Matrix_Push(&gGfxMatrix);
Matrix_Translate(gGfxMatrix, 30.0f, 0.0f, -60.0f, MTXF_APPLY);
Actor_DrawEngineGlow(this, 2);
Actor_DrawEngineGlow(this, EG_GREEN);
Matrix_Pop(&gGfxMatrix);
Matrix_Push(&gGfxMatrix);
Matrix_Translate(gGfxMatrix, -30.0f, 0.0f, -60.0f, MTXF_APPLY);
Actor_DrawEngineGlow(this, 2);
Actor_DrawEngineGlow(this, EG_GREEN);
Matrix_Pop(&gGfxMatrix);
ActorAllRange_DrawBarrelRoll(this);
ActorAllRange_DrawShield(this);
} else {
gSPDisplayList(gMasterDisp++, D_STAR_WOLF_F00F200);
gSPDisplayList(gMasterDisp++, aStarWolfStandardShipDL);
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY);
if (gCurrentLevel == LEVEL_BOLSE) {
Actor_DrawEngineGlow(this, 3);
Actor_DrawEngineGlow(this, EG_ORANGE);
} else {
Actor_DrawEngineGlow(this, 2);
Actor_DrawEngineGlow(this, EG_GREEN);
}
}
break;
case AI360_KATT:
gSPDisplayList(gMasterDisp++, D_D009A40);
gSPDisplayList(gMasterDisp++, aKattShipDL);
Actor_DrawEngineAndContrails(this);
break;
case AI360_BILL:
gSPDisplayList(gMasterDisp++, D_D00B880);
gSPDisplayList(gMasterDisp++, aBillShipDL);
Actor_DrawEngineAndContrails(this);
break;
@@ -2443,12 +2463,12 @@ void ActorAllRange_Draw(ActorAllRange* this) {
break;
case AI360_MISSILE:
Animation_GetFrameData(&D_SZ_6006D64, 0, jointTable);
Animation_GetFrameData(&aSzMissileAnim, 0, jointTable);
Animation_DrawSkeleton(3, aSzMissileSkel, jointTable, ActorAllRange_MissileOverrideLimbDraw, NULL, this,
gCalcMatrix);
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -400.0f, MTXF_APPLY);
Matrix_Scale(gGfxMatrix, this->fwork[29], this->fwork[29], this->fwork[29], MTXF_APPLY);
Actor_DrawEngineGlow(this, 3);
Actor_DrawEngineGlow(this, EG_ORANGE);
break;
default:
@@ -2458,7 +2478,7 @@ void ActorAllRange_Draw(ActorAllRange* this) {
gSPDisplayList(gMasterDisp++, D_FO_6006BE0);
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -100.0f, MTXF_APPLY);
Matrix_Scale(gGfxMatrix, 1.5f, 1.5f, 1.5f, MTXF_APPLY);
Actor_DrawEngineGlow(this, 2);
Actor_DrawEngineGlow(this, EG_GREEN);
} else if (gCurrentLevel == LEVEL_KATINA) {
switch (this->animFrame) {
case 0:
@@ -2467,7 +2487,7 @@ void ActorAllRange_Draw(ActorAllRange* this) {
case 1:
gSPDisplayList(gMasterDisp++, aKaCornerianFighterDL);
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY);
Actor_DrawEngineGlow(this, 0);
Actor_DrawEngineGlow(this, EG_RED);
break;
case 3:
gSPDisplayList(gMasterDisp++, aKaEnemy1DL);
@@ -2478,29 +2498,29 @@ void ActorAllRange_Draw(ActorAllRange* this) {
} else if (gCurrentLevel == LEVEL_SECTOR_Z) {
gSPDisplayList(gMasterDisp++, D_SZ_6004FE0);
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY);
Actor_DrawEngineGlow(this, 2);
Actor_DrawEngineGlow(this, EG_GREEN);
} else if (gCurrentLevel == LEVEL_BOLSE) {
gSPDisplayList(gMasterDisp++, D_BO_6008770);
Matrix_Push(&gGfxMatrix);
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY);
Actor_DrawEngineGlow(this, 2);
Actor_DrawEngineGlow(this, EG_GREEN);
Matrix_Pop(&gGfxMatrix);
ActorAllRange_DrawShield(this);
} else if (gCurrentLevel == LEVEL_VENOM_ANDROSS) {
Animation_GetFrameData(&D_VE2_600C200, this->unk_04A, this->vwork);
Animation_GetFrameData(&D_VE2_600C200, this->work_04A, this->vwork);
Matrix_Scale(gGfxMatrix, 10.0f, 10.0f, 10.0f, MTXF_APPLY);
Animation_DrawSkeleton(0, D_VE2_600C2AC, this->vwork, NULL, NULL, this, &gIdentityMatrix);
} else if (gCurrentLevel == LEVEL_VERSUS) {
gSPDisplayList(gMasterDisp++, D_versus_3015740);
} else if (gCurrentLevel == LEVEL_TRAINING) {
if (this->aiIndex == AI360_FOX) {
gSPDisplayList(gMasterDisp++, D_STAR_WOLF_F00F200);
gSPDisplayList(gMasterDisp++, aStarWolfStandardShipDL);
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY);
Actor_DrawEngineGlow(this, 3);
Actor_DrawEngineGlow(this, EG_ORANGE);
} else {
gSPDisplayList(gMasterDisp++, D_ENMY_PLANET_40068F0);
gSPDisplayList(gMasterDisp++, aVenomFighter1DL);
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY);
Actor_DrawEngineGlow(this, 2);
Actor_DrawEngineGlow(this, EG_GREEN);
}
}
break;
+22 -9
View File
@@ -126,9 +126,11 @@ void PlayerShot_Impact(PlayerShot* shot) {
Object_Kill(&shot->obj, shot->sfxSource);
return;
}
shot->obj.pos.z = gShotHitPosZ; // strange order on the globals
shot->obj.pos.y = gShotHitPosY;
shot->obj.pos.x = gShotHitPosX;
if ((shot->obj.id == PLAYERSHOT_BOMB) ||
((gCurrentLevel != LEVEL_AQUAS) && (shot->obj.id == PLAYERSHOT_LOCK_ON) && (shot->unk_5C != 0))) {
if (shot->obj.id == PLAYERSHOT_LOCK_ON) {
@@ -138,10 +140,13 @@ void PlayerShot_Impact(PlayerShot* shot) {
PlayerShot_ExplodeBomb(shot);
} else if (shot->obj.id == PLAYERSHOT_LOCK_ON) {
shot->scale = 7.5f;
for (i = 0; i < ARRAY_COUNT(gActors); i++) {
gActors[i].lockOnTimers[shot->sourceId] = 0;
}
shot->vel.x = shot->vel.y = shot->vel.z = 0.0f;
if (gCurrentLevel == LEVEL_AQUAS) {
gLight3R = gLight3G = gLight3B = 0;
Effect_Effect384_Spawn(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 10.0f, 4);
@@ -195,7 +200,7 @@ void PlayerShot_SpawnEffect344(f32 xPos, f32 yPos, f32 zPos, f32 arg3, f32 arg4,
}
}
void PlayerShot_SetupEffect345(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 yRot, f32 scale) {
void PlayerShot_LaserMark1_Setup(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 yRot, f32 scale) {
Effect_Initialize(effect);
effect->obj.status = OBJ_INIT;
effect->obj.id = OBJ_EFFECT_LASER_MARK_1;
@@ -216,7 +221,7 @@ void PlayerShot_HitGround(f32 xPos, f32 yPos, f32 zPos, f32 yRot, f32 scale) {
(gCurrentLevel != LEVEL_TRAINING) && (gCurrentLevel != LEVEL_SOLAR) && (gCurrentLevel != LEVEL_ZONESS)) {
for (i = 0; i < 50; i++) {
if (gEffects[i].obj.status == OBJ_FREE) {
PlayerShot_SetupEffect345(&gEffects[i], xPos, yPos, zPos, yRot, scale);
PlayerShot_LaserMark1_Setup(&gEffects[i], xPos, yPos, zPos, yRot, scale);
func_effect_8007D10C(xPos, yPos, zPos, 2.0f);
break;
}
@@ -363,6 +368,7 @@ s32 PlayerShot_CheckEventHitbox(PlayerShot* shot, Actor* actor) {
(fabsf(shot->obj.pos.y - actor->obj.pos.y) < 2000.0f) &&
(fabsf(shot->obj.pos.x - actor->obj.pos.x) < 2000.0f)) {
hitboxData = actor->info.hitbox;
count = *hitboxData++;
if (count != 0) {
xySizeMod = 0.0f;
@@ -373,6 +379,7 @@ s32 PlayerShot_CheckEventHitbox(PlayerShot* shot, Actor* actor) {
xySizeMod += 30.0f;
}
}
for (i = 0; i < count; i++, hitboxData += 6) {
if (actor->info.unk_16 == 1) {
shotPx = shot->obj.pos.x;
@@ -394,7 +401,7 @@ s32 PlayerShot_CheckEventHitbox(PlayerShot* shot, Actor* actor) {
}
if (((actor->vwork[29].z != 0.0f) || (actor->vwork[29].x != 0.0f) || (actor->rot_0F4.z != 0.0f) ||
(actor->vwork[29].y != 0.0f)) &&
(actor->eventType != EVID_31)) {
(actor->eventType != EVID_A6_UMBRA_STATION)) {
Matrix_RotateZ(gCalcMatrix, -(actor->vwork[29].z + actor->rot_0F4.z) * M_DTOR, MTXF_APPLY);
Matrix_RotateX(gCalcMatrix, -actor->vwork[29].x * M_DTOR, MTXF_APPLY);
Matrix_RotateY(gCalcMatrix, -actor->vwork[29].y * M_DTOR, MTXF_APPLY);
@@ -407,6 +414,7 @@ s32 PlayerShot_CheckEventHitbox(PlayerShot* shot, Actor* actor) {
shotPy = actor->obj.pos.y + sp70.y;
shotPz = actor->obj.pos.z + sp70.z;
}
hitbox = (Hitbox*) hitboxData;
if ((fabsf(hitbox->z.offset + actor->obj.pos.z - shotPz) < (hitbox->z.size + 50.0f)) &&
(fabsf(hitbox->x.offset + actor->obj.pos.x - shotPx) < (hitbox->x.size + xySizeMod)) &&
@@ -687,10 +695,10 @@ void PlayerShot_ApplyDamageToActor(PlayerShot* shot, Actor* actor, s32 hitIndex)
actor->hitPos.y = shot->obj.pos.y;
actor->hitPos.z = shot->obj.pos.z;
if (((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->dmgPart == 0) &&
((actor->eventType == EVID_48) || (actor->eventType == EVID_49) || (actor->eventType == EVID_50))) ||
((actor->eventType == EVID_SY_ROBOT_1) || (actor->eventType == EVID_SY_ROBOT_2) ||
(actor->eventType == EVID_SY_ROBOT_3))) ||
((actor->obj.id == OBJ_ACTOR_ALLRANGE) && (actor->fwork[23] > 1.0f)) ||
((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->dmgPart == 0) &&
(actor->eventType == EVID_METEO_PYRAMID_SHIP)) ||
((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->dmgPart == 0) && (actor->eventType == EVID_ME_FLIP_BOT)) ||
((actor->obj.id == OBJ_ACTOR_AQ_SCULPIN) && (shot->obj.id != PLAYERSHOT_LOCK_ON) &&
((actor->state < 3) || (actor->state >= 5))) ||
((actor->obj.id == OBJ_ACTOR_AQ_GAROA) && (shot->obj.id != PLAYERSHOT_LOCK_ON) && (actor->timer_0BC != 0))) {
@@ -767,13 +775,13 @@ void PlayerShot_CollisionCheck(PlayerShot* shot) {
}
break;
case OBJ_ACTOR_EVENT:
if (actor->eventType == EVID_42) {
if (actor->eventType == EVID_SY_SHIP_2) {
if (PlayerShot_CheckPolyCollision(shot, ACTOR_EVENT_ID, &actor->obj)) {
actor->dmgType = DMG_BEAM;
actor->dmgPart = shot->sourceId;
return;
}
} else if (actor->eventType == EVID_63) {
} else if (actor->eventType == EVID_ME_BIG_METEOR) {
test.x = fabsf(actor->obj.pos.x - shot->obj.pos.x);
test.y = fabsf(actor->obj.pos.y - shot->obj.pos.y);
test.z = fabsf(actor->obj.pos.z - shot->obj.pos.z);
@@ -1929,7 +1937,7 @@ void PlayerShot_ApplyExplosionDamage(PlayerShot* shot, s32 damage) {
actor->obj.status = OBJ_DYING;
actor->timer_0BC = RAND_INT(15.0f) + 10;
actor->timer_0BE = 0;
actor->timer_04C = 4;
actor->work_04C = 4;
actor->obj.rot.x = Math_ModF(actor->obj.rot.x, 360.0f);
if (actor->info.bonus != 0) {
shot->bonus++;
@@ -2267,12 +2275,14 @@ void PlayerShot_Update(PlayerShot* shot) {
switch (shot->obj.status) {
case SHOT_FREE:
break;
case SHOT_ACTIVE:
ticks = 1;
switch (shot->obj.id) {
case PLAYERSHOT_GFOX_LASER:
ticks = 4;
break;
case PLAYERSHOT_SINGLE_LASER:
case PLAYERSHOT_TWIN_LASER:
if ((shot->unk_58 == 0) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO)) {
@@ -2281,10 +2291,12 @@ void PlayerShot_Update(PlayerShot* shot) {
ticks = 3;
}
break;
case PLAYERSHOT_TANK:
ticks = 2;
break;
}
for (i = 0; i < ticks && (shot->obj.status == SHOT_ACTIVE); i++) {
if (shot->timer > 0) {
shot->timer--;
@@ -2295,6 +2307,7 @@ void PlayerShot_Update(PlayerShot* shot) {
PlayerShot_UpdateShot(shot, i);
}
break;
case SHOT_HITMARK:
PlayerShot_UpdateHitmark(shot);
break;
+36 -35
View File
@@ -90,6 +90,7 @@ void func_demo_80048CC4(ActorCutscene* this, s32 index) {
this->rot_0F4.y = 0.0f;
this->rot_0F4.z = D_demo_800C9F90[index];
Object_SetInfo(&this->info, this->obj.id);
if (index == 3) {
@@ -103,8 +104,8 @@ void func_demo_80048CC4(ActorCutscene* this, s32 index) {
}
void Cutscene_WarpZoneComplete(Player* player) {
Vec3f sp5C;
Vec3f sp50;
Vec3f src;
Vec3f dest;
s32 pad[2];
f32 temp_ft3;
f32 temp_ret;
@@ -140,10 +141,10 @@ void Cutscene_WarpZoneComplete(Player* player) {
Math_SmoothStepToF(&player->baseSpeed, 0.0f, 1.0f, 0.5f, 0.0f);
Matrix_RotateX(gCalcMatrix, -5.0f * M_DTOR, MTXF_NEW);
Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[1] * M_DTOR, MTXF_APPLY);
sp5C.x = 0.0f;
sp5C.y = 0.0f;
sp5C.z = 300.0f;
Matrix_MultVec3f(gCalcMatrix, &sp5C, &sp50);
src.x = 0.0f;
src.y = 0.0f;
src.z = 300.0f;
Matrix_MultVec3f(gCalcMatrix, &src, &dest);
gCsCamAtX = player->pos.x;
gCsCamAtY = player->pos.y;
gCsCamAtZ = player->trueZpos + gPathProgress;
@@ -221,9 +222,9 @@ void Cutscene_WarpZoneComplete(Player* player) {
}
}
} else {
gCsCamEyeX = player->pos.x + sp50.x;
gCsCamEyeY = player->pos.y + sp50.y;
gCsCamEyeZ = player->trueZpos + gPathProgress + sp50.z;
gCsCamEyeX = player->pos.x + dest.x;
gCsCamEyeY = player->pos.y + dest.y;
gCsCamEyeZ = player->trueZpos + gPathProgress + dest.z;
}
break;
@@ -238,14 +239,14 @@ void Cutscene_WarpZoneComplete(Player* player) {
Matrix_RotateY(gCalcMatrix, (player->rot.y + 180.0f) * M_DTOR, MTXF_NEW);
Matrix_RotateX(gCalcMatrix, -((player->rot.x + player->aerobaticPitch) * M_DTOR), MTXF_APPLY);
sp5C.x = 0.0f;
sp5C.y = 0.0f;
sp5C.z = player->baseSpeed + player->boostSpeed;
src.x = 0.0f;
src.y = 0.0f;
src.z = player->baseSpeed + player->boostSpeed;
Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp5C, &sp50);
player->vel.x = sp50.x;
player->vel.z = sp50.z;
player->vel.y = sp50.y;
Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest);
player->vel.x = dest.x;
player->vel.z = dest.z;
player->vel.y = dest.y;
player->pos.x += player->vel.x;
player->pos.y += player->vel.y;
@@ -267,8 +268,8 @@ static Vec3f D_demo_800C9FA0[] = {
};
void func_demo_80049630(ActorCutscene* this) {
Vec3f sp3C;
Vec3f sp30;
Vec3f src;
Vec3f dest;
switch (this->state) {
case 0:
@@ -300,15 +301,15 @@ void func_demo_80049630(ActorCutscene* this) {
Matrix_RotateY(gCalcMatrix, (this->rot_0F4.y + 180.0f) * M_DTOR, MTXF_NEW);
Matrix_RotateX(gCalcMatrix, -(this->rot_0F4.x * M_DTOR), MTXF_APPLY);
sp3C.x = 0.0f;
sp3C.y = 0.0f;
sp3C.z = this->fwork[0];
src.x = 0.0f;
src.y = 0.0f;
src.z = this->fwork[0];
Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp3C, &sp30);
Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest);
this->vel.x = sp30.x;
this->vel.y = sp30.y;
this->vel.z = sp30.z;
this->vel.x = dest.x;
this->vel.y = dest.y;
this->vel.z = dest.z;
this->obj.rot.x = -this->rot_0F4.x;
this->obj.rot.y = this->rot_0F4.y + 180.0f;
@@ -2526,10 +2527,10 @@ void ActorCutscene_Draw(ActorCutscene* this) {
switch (this->animFrame) {
case 1000:
RCP_SetupDL(&gMasterDisp, SETUPDL_45);
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->unk_046);
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->work_046);
gSPDisplayList(gMasterDisp++, D_ENMY_PLANET_40018A0);
if (this->unk_046 > 50) {
if (this->work_046 > 50) {
Actor_DrawEngineAndContrails(this);
}
break;
@@ -2568,11 +2569,11 @@ void ActorCutscene_Draw(ActorCutscene* this) {
break;
case 20:
gSPDisplayList(gMasterDisp++, D_ENMY_SPACE_400AAE0);
gSPDisplayList(gMasterDisp++, aCommanderDL);
break;
case 24:
gSPDisplayList(gMasterDisp++, D_D009A40);
gSPDisplayList(gMasterDisp++, aKattShipDL);
Actor_DrawEngineAndContrails(this);
break;
@@ -2587,19 +2588,19 @@ void ActorCutscene_Draw(ActorCutscene* this) {
case 26:
gSPDisplayList(gMasterDisp++, D_SZ_6004FE0);
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY);
Actor_DrawEngineGlow(this, 2);
Actor_DrawEngineGlow(this, EG_GREEN);
break;
case 28:
gSPDisplayList(gMasterDisp++, D_ENMY_SPACE_400AAE0);
gSPDisplayList(gMasterDisp++, aCommanderDL);
Matrix_Translate(gGfxMatrix, 0.f, 0.f, -60.0f, MTXF_APPLY);
Actor_DrawEngineGlow(this, 2);
Actor_DrawEngineGlow(this, EG_GREEN);
break;
case 30:
Display_SetSecondLight(&this->obj.pos);
if (this->unk_046 != 0) {
if (this->work_046 != 0) {
RCP_SetupDL(&gMasterDisp, SETUPDL_55);
gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK);
Rand_SetSeed(1, 29000, 9876);
@@ -2729,12 +2730,12 @@ void ActorCutscene_Draw(ActorCutscene* this) {
case 33:
if ((this->index == 3) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) {
gSPDisplayList(gMasterDisp++, D_D00B880);
gSPDisplayList(gMasterDisp++, aBillShipDL);
} else {
gSPDisplayList(gMasterDisp++, aKaCornerianFighterDL);
}
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY);
Actor_DrawEngineGlow(this, 0);
Actor_DrawEngineGlow(this, EG_RED);
break;
case 34:
+7 -7
View File
@@ -780,7 +780,7 @@ void Display_PlayerShadow_Draw(Player* player) {
Matrix_Scale(gGfxMatrix, 1.5f * 1.67f, 1.5f, 1.5f * 1.67f, MTXF_APPLY);
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 30.0f, MTXF_APPLY);
Matrix_SetGfxMtx(&gMasterDisp);
gSPDisplayList(gMasterDisp++, D_1032780);
gSPDisplayList(gMasterDisp++, aArwingShadowDL);
break;
case FORM_LANDMASTER:
@@ -815,21 +815,21 @@ void Display_PlayerShadow_Draw(Player* player) {
}
}
void Display_DrawEngineGlow(s32 levelType) {
void Display_DrawEngineGlow(EngineGlowColor color) {
RCP_SetupDL(&gMasterDisp, SETUPDL_67);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255);
switch (levelType) {
case LEVELTYPE_PLANET:
switch (color) {
case EG_RED:
gDPSetEnvColor(gMasterDisp++, 255, 0, 0, 255);
break;
case LEVELTYPE_SPACE:
case EG_BLUE:
gDPSetEnvColor(gMasterDisp++, 0, 0, 255, 255);
break;
case LEVELTYPE_UNK2:
case EG_GREEN:
gDPSetEnvColor(gMasterDisp++, 0, 255, 0, 255);
break;
case LEVELTYPE_UNK3:
case EG_ORANGE:
gDPSetEnvColor(gMasterDisp++, 255, 64, 0, 255);
break;
}
+30 -7
View File
@@ -1,3 +1,26 @@
/**
* Glossary:
*
* Level Prefixes:
* CO: Corneria
* ME: Meteo
* SX: Sector X
* SY: Sector Y
* SZ: Sector Z
* KA: Katina
* AQ: Aquas
* A6: Area 6
* FO: Fortuna
* SO: Solar
* MA: Macbeth
* TI: Titania
* BO: Bolse
* ZO: Zoness
* VE1: Venom 1
* VE2: Venom 2
* AND: Venom Andross
*/
#include "global.h"
#include "assets/ast_versus.h"
@@ -77,17 +100,17 @@ f32 gTeamHitbox[] = {
f32 gActorAllRangeHItbox[] = {
1.0f, 0.0f, 40.0f, 0.0f, 40.0f, 0.0f, 40.0f,
};
f32 gWarpZoneEvent94Hitbox[] = {
f32 aWzMeteor1Hitbox[] = {
1.0f, 0.0f, 140.0f, 0.0f, 170.0f, 0.0f, 140.0f,
};
f32 gWarpZoneEvent96Hitbox[] = {
f32 aWzGateHitbox[] = {
4.0f, 0.0f, 140.0f, -675.0f, 140.0f, 0.0f, 810.0f, 0.0f, 140.0f, 675.0f, 140.0f, 0.0f, 810.0f,
0.0f, 140.0f, 0.0f, 810.0f, 675.0f, 140.0f, 0.0f, 140.0f, 0.0f, 810.0f, -675.0f, 140.0f,
};
f32 gWarpZoneEvent92Hitbox[] = {
f32 aWzPillar1Hitbox[] = {
1.0f, 0.0f, 140.0f, 0.0f, 140.0f, 0.0f, 1800.0f,
};
f32 gWarpZoneEvent93Hitbox[] = {
f32 aWzPillar2Hitbox[] = {
2.0f, 0.0f, 140.0f, 0.0f, 140.0f, 0.0f, 1800.0f, 1.0f, 141.0f, 1.0f, 1800.0f, 1.0f, 140.0f,
};
@@ -157,7 +180,7 @@ ObjectInfo gObjectInfo[] = {
/* OBJ_SCENERY_MA_TOWER, */ {(void*) Macbeth_MaTower_Draw, 1, (ObjectFunc) NULL, aMaTowerHitbox, 200.0f, 0, 0, 5, 0, 0.0f, 0 },
/* OBJ_SCENERY_MA_WALL_1, */ {(void*) aMaWall1DL, 0, (ObjectFunc) NULL, gNoHitbox, 1500.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_SCENERY_GUILLOTINE_HOUSING, */ {(void*) aMaGuillotineHousingDL, 0, (ObjectFunc) NULL, aMaGuillotineHousingHitbox, 500.0f, 0, 0, 5, 0, 0.0f, 0 },
/* OBJ_SCENERY_MA_GUILLOTINE, */ {(void*) aMaGuillotineDL, 0, (ObjectFunc) NULL, aMaGuillotineHitbox, 100.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_SCENERY_MA_GUILLOTINE, */ {(void*) aMaGuillotine1DL, 0, (ObjectFunc) NULL, aMaGuillotineHitbox, 100.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_SCENERY_MA_PROXIMITY_LIGHT, */ {(void*) Macbeth_MaProximityLight_Draw, 1, (ObjectFunc) NULL, aMaProximityLightHitbox, 400.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_SCENERY_MA_WALL_2, */ {(void*) aMaWall2DL, 0, (ObjectFunc) NULL, aMaWall2Hitbox, 2500.0f, 0, 0, 5, 0, 0.0f, 0 },
/* OBJ_SCENERY_MA_WALL_3, */ {(void*) aMaWall3DL, 0, (ObjectFunc) NULL, aMaWall3Hitbox, 2000.0f, 0, 0, 5, 0, 0.0f, 0 },
@@ -208,7 +231,7 @@ ObjectInfo gObjectInfo[] = {
/* OBJ_SCENERY_SY_SHIP_2_DESTROYED */ {(void*) aSyShip4DestroyedDL, 0, (ObjectFunc) SectorY_SyShip4Destroyed_Update, aSyShip4DestroyedHitbox, 4000.0f, 0, 0, 41, 0, 0.0f, 0 },
/* OBJ_SPRITE_SY_SHIP_2 */ {(void*) aSyShip2SpriteDL, 0, (ObjectFunc) NULL, gNoHitbox, 2000.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_SPRITE_SY_SHIP_3 */ {(void*) aSyShip3SpriteDL, 0, (ObjectFunc) NULL, gNoHitbox, 2000.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_SCENERY_SY_SHIP_PROJECTILE */ {(void*) aSyShipProjectileDL, 0, (ObjectFunc) NULL, aSyShipProjectileHitbox, 2000.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_SCENERY_SY_SHIP_MISSILE */ {(void*) aSyShipMissileDL, 0, (ObjectFunc) NULL, aSyShipMissileHitbox, 2000.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_SCENERY_SY_SHIP_WINDOWS */ {(void*) aSyShipWindowsDL, 0, (ObjectFunc) NULL, aSyShipWindowsHitbox, 2000.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_SCENERY_AQ_CORAL_REEF_1 */ {(void*) aAqCoralReef1DL, 0, (ObjectFunc) NULL, aAqCoralReef1Hitbox, 2000.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_SCENERY_AQ_TUNNEL_1 */ {(void*) aAqTunnel1DL, 0, (ObjectFunc) NULL, aAqTunnel1Hitbox, 2000.0f, 0, 0, 41, 0, 0.0f, 0 },
@@ -274,7 +297,7 @@ ObjectInfo gObjectInfo[] = {
/* OBJ_ACTOR_CO_GARUDA_3 */ {(void*) Corneria_CoGaruda3_Draw, 2, (ObjectFunc) Corneria_CoGaruda3_Update, CoGarudaHitbox, 500.0f, 0, 0, 39, 1, 200.0f, 1 },
/* OBJ_ACTOR_CO_GARUDA_DESTROY */ {(void*) Corneria_CoGarudaDestroy_Draw, 2, (ObjectFunc) Corneria_CoGarudaDestroy_Update, aCoGarudaDestroyHitbox, 500.0f, 0, 0, 39, 1, 0.0f, 1 },
/* OBJ_ACTOR_ME_MOLAR_ROCK */ {(void*) MeMolarRock_Draw, 1, (ObjectFunc) MeMolarRock_Update, gNoHitbox, 1000.0f, 0, 0, 39, 0, 0.0f, 1 },
/* OBJ_ACTOR_ME_METEOR_1 */ {(void*) aMeMeteorDL, 0, (ObjectFunc) Meteo_MeMeteor1_Update, aMeMeteor1Hitbox, 200.0f, 0, 0, 39, 0, 1.0f, 1 },
/* OBJ_ACTOR_ME_METEOR_1 */ {(void*) aMeMeteor1DL, 0, (ObjectFunc) Meteo_MeMeteor1_Update, aMeMeteor1Hitbox, 200.0f, 0, 0, 39, 0, 1.0f, 1 },
/* OBJ_ACTOR_ME_METEOR_2 */ {(void*) MeMeteor2_Draw, 1, (ObjectFunc) Meteo_MeMeteor2_Update, aMeMeteor2Hitbox, 100.0f, 0, 1, 39, 0, 1.0f, 1 },
/* OBJ_ACTOR_ME_METEOR_SHOWER_1 */ {(void*) Meteo_MeMeteorShower1_Draw, 1, (ObjectFunc) Meteo_MeteorShower_Update, gNoHitbox, 100.0f, 0, 1, 39, 0, 0.0f, 1 },
/* OBJ_ACTOR_ME_METEOR_SHOWER_2 */ {(void*) Meteo_MeMeteorShower2_Draw, 1, (ObjectFunc) Meteo_MeteorShower_Update, gNoHitbox, 100.0f, 0, 1, 39, 0, 0.0f, 1 },
+59 -59
View File
@@ -92,9 +92,9 @@ f32 D_edisplay_800CFA2C[] = {
void MeHopBot_Draw(MeHopBot* this) {
Vec3f sp30[30];
f32 temp = D_edisplay_800CF9B0[this->animFrame] - 114.0f;
f32 yTrans = D_edisplay_800CF9B0[this->animFrame] - 114.0f;
Matrix_Translate(gGfxMatrix, 0.f, -temp, 0.0f, MTXF_APPLY);
Matrix_Translate(gGfxMatrix, 0.f, -yTrans, 0.0f, MTXF_APPLY);
Matrix_SetGfxMtx(&gMasterDisp);
Animation_GetFrameData(&aMeHopBotAnim, this->animFrame, sp30);
Animation_DrawSkeleton(1, aMeHopBotSkel, sp30, NULL, MeHopBot_PostLimbDraw, &this->index, &gIdentityMatrix);
@@ -104,11 +104,11 @@ void MeteoTunnel_Draw(MeTunnel* this) {
gSPDisplayList(gMasterDisp++, aMeMeteoTunnelDL);
}
void Scenery_DrawTitaniaBones(Scenery* scenery) {
if (scenery->obj.id == OBJ_SCENERY_TI_SKULL) {
void Scenery_DrawTitaniaBones(Scenery* this) {
if (this->obj.id == OBJ_SCENERY_TI_SKULL) {
gSPDisplayList(gMasterDisp++, D_TI1_7007350);
} else {
Graphics_SetScaleMtx(D_edisplay_800CFA2C[scenery->obj.id - 29]);
Graphics_SetScaleMtx(D_edisplay_800CFA2C[this->obj.id - 29]);
gSPDisplayList(gMasterDisp++, D_TI1_700BB10);
}
}
@@ -282,12 +282,12 @@ void ActorDebris_Draw(ActorDebris* this) {
case 39:
gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK);
gSPDisplayList(gMasterDisp++, D_edisplay_800CFAC4[this->unk_048]);
gSPDisplayList(gMasterDisp++, D_edisplay_800CFAC4[this->work_048]);
break;
case 40:
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255);
switch (this->unk_048) {
switch (this->work_048) {
case 0:
break;
case 1:
@@ -304,7 +304,7 @@ void ActorDebris_Draw(ActorDebris* this) {
}
if (gCurrentLevel != LEVEL_SOLAR) {
gSPDisplayList(gMasterDisp++, D_TI_801B769C[this->unk_046]);
gSPDisplayList(gMasterDisp++, D_TI_801B769C[this->work_046]);
} else {
if (gBosses[0].fwork[3] < 4800.0f) {
RCP_SetupDL(&gMasterDisp, SETUPDL_30);
@@ -316,28 +316,28 @@ void ActorDebris_Draw(ActorDebris* this) {
gSPFogPosition(gMasterDisp++, gFogNear, gFogFar);
}
Graphics_SetScaleMtx(this->scale);
gSPDisplayList(gMasterDisp++, D_edisplay_800CFB40[this->unk_046]);
gSPDisplayList(gMasterDisp++, D_edisplay_800CFB40[this->work_046]);
}
break;
case 41:
Graphics_SetScaleMtx(this->scale);
gSPDisplayList(gMasterDisp++, D_edisplay_800CFADC[this->unk_048]);
gSPDisplayList(gMasterDisp++, D_edisplay_800CFADC[this->work_048]);
break;
case 42:
Graphics_SetScaleMtx(this->scale);
gSPDisplayList(gMasterDisp++, D_edisplay_800CFB08[this->unk_048]);
gSPDisplayList(gMasterDisp++, D_edisplay_800CFB08[this->work_048]);
break;
case 43:
Graphics_SetScaleMtx(this->scale);
gSPDisplayList(gMasterDisp++, D_edisplay_800CFB14[this->unk_048]);
gSPDisplayList(gMasterDisp++, D_edisplay_800CFB14[this->work_048]);
break;
case 44:
Graphics_SetScaleMtx(this->scale);
gSPDisplayList(gMasterDisp++, D_edisplay_800CFB28[this->unk_048]);
gSPDisplayList(gMasterDisp++, D_edisplay_800CFB28[this->work_048]);
break;
case 45:
@@ -345,25 +345,25 @@ void ActorDebris_Draw(ActorDebris* this) {
break;
case 46:
if ((this->unk_048 == 2) || (this->unk_048 == 3) || (this->unk_048 == 4)) {
if ((this->work_048 == 2) || (this->work_048 == 3) || (this->work_048 == 4)) {
RCP_SetupDL(&gMasterDisp, SETUPDL_33);
}
gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK);
gSPDisplayList(gMasterDisp++, D_TI_801B7584[this->unk_048]);
gSPDisplayList(gMasterDisp++, D_TI_801B7584[this->work_048]);
break;
case 47:
gSPDisplayList(gMasterDisp++, D_TI_801B7608[this->unk_048]);
gSPDisplayList(gMasterDisp++, D_TI_801B7608[this->work_048]);
break;
case 48:
Graphics_SetScaleMtx(this->scale);
gSPDisplayList(gMasterDisp++, D_edisplay_800CFB64[this->unk_048]);
gSPDisplayList(gMasterDisp++, D_edisplay_800CFB64[this->work_048]);
break;
case 49:
Graphics_SetScaleMtx(this->scale);
gSPDisplayList(gMasterDisp++, D_edisplay_800CFB88[this->unk_048]);
gSPDisplayList(gMasterDisp++, D_edisplay_800CFB88[this->work_048]);
break;
case 50:
@@ -401,27 +401,27 @@ void ActorDebris_Draw(ActorDebris* this) {
case 51:
Graphics_SetScaleMtx(this->scale);
gSPDisplayList(gMasterDisp++, D_edisplay_800CFBA8[this->unk_048]);
gSPDisplayList(gMasterDisp++, D_edisplay_800CFBA8[this->work_048]);
break;
case 52:
Graphics_SetScaleMtx(this->scale);
gSPDisplayList(gMasterDisp++, D_edisplay_800CFBE4[this->unk_048]);
gSPDisplayList(gMasterDisp++, D_edisplay_800CFBE4[this->work_048]);
break;
case 53:
Graphics_SetScaleMtx(this->scale);
gSPDisplayList(gMasterDisp++, D_edisplay_800CFC0C[this->unk_048]);
gSPDisplayList(gMasterDisp++, D_edisplay_800CFC0C[this->work_048]);
break;
case 54:
Graphics_SetScaleMtx(this->scale);
gSPDisplayList(gMasterDisp++, D_edisplay_800CFC40[this->unk_048]);
gSPDisplayList(gMasterDisp++, D_edisplay_800CFC40[this->work_048]);
break;
case 55:
Graphics_SetScaleMtx(this->scale);
gSPDisplayList(gMasterDisp++, D_edisplay_800CFC50[this->unk_048]);
gSPDisplayList(gMasterDisp++, D_edisplay_800CFC50[this->work_048]);
break;
case 56:
@@ -429,7 +429,7 @@ void ActorDebris_Draw(ActorDebris* this) {
RCP_SetupDL(&gMasterDisp, SETUPDL_41);
Matrix_SetGfxMtx(&gMasterDisp);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 191, 255, 223, 255);
gSPDisplayList(gMasterDisp++, D_edisplay_800CFC64[this->unk_048]);
gSPDisplayList(gMasterDisp++, D_edisplay_800CFC64[this->work_048]);
break;
case 58:
@@ -441,7 +441,7 @@ void ActorDebris_Draw(ActorDebris* this) {
case 59:
Graphics_SetScaleMtx(this->scale);
Matrix_SetGfxMtx(&gMasterDisp);
gSPDisplayList(gMasterDisp++, D_edisplay_800CFC7C[this->unk_048]);
gSPDisplayList(gMasterDisp++, D_edisplay_800CFC7C[this->work_048]);
break;
case 70:
@@ -449,7 +449,7 @@ void ActorDebris_Draw(ActorDebris* this) {
break;
case 57:
gSPDisplayList(gMasterDisp++, D_VE1_8019A008[this->unk_048]);
gSPDisplayList(gMasterDisp++, D_VE1_8019A008[this->work_048]);
break;
default:
@@ -467,7 +467,7 @@ void Actor_DrawEngineAndContrails(Actor* this) {
f32 sp5C;
f32 temp1;
f32 sp54;
s32 pad[5]; // fake? seems like a lot of padding
s32 pad[5];
if ((this->iwork[11] != 0) && (this->obj.status == OBJ_ACTIVE)) {
temp1 = 652.5f * 0.001f; // 0.65250003f;
@@ -527,7 +527,7 @@ f32 D_edisplay_800CFCA0[] = {
1.7f, 1.8f, 2.0f, 3.0f, 3.0f, 3.0f, 3.0f, 3.0f,
};
void Actor_DrawEngineGlow(Actor* actor, s32 levelType) {
void Actor_DrawEngineGlow(Actor* actor, EngineGlowColor color) {
f32 scale;
if ((actor->iwork[11] != 0) && (actor->obj.status == OBJ_ACTIVE)) {
@@ -545,7 +545,7 @@ void Actor_DrawEngineGlow(Actor* actor, s32 levelType) {
Matrix_RotateY(gGfxMatrix, -actor->obj.rot.y * M_DTOR, MTXF_APPLY);
Matrix_RotateY(gGfxMatrix, -gPlayer[gPlayerNum].camYaw, MTXF_APPLY);
Matrix_SetGfxMtx(&gMasterDisp);
Display_DrawEngineGlow(levelType);
Display_DrawEngineGlow(color);
Matrix_Pop(&gGfxMatrix);
}
}
@@ -609,14 +609,14 @@ void MeMolarRock_Draw(MeMolarRock* this) {
}
void MeMeteor2_Draw(MeMeteor2* this) {
RCP_SetupDL_29(this->unk_046, gFogGreen, gFogBlue, gFogAlpha, this->unk_048, gFogFar);
RCP_SetupDL_29(this->work_046, gFogGreen, gFogBlue, gFogAlpha, this->work_048, gFogFar);
Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 0.5f, MTXF_APPLY);
Matrix_SetGfxMtx(&gMasterDisp);
gSPDisplayList(gMasterDisp++, aMeMeteorDL);
gSPDisplayList(gMasterDisp++, aMeMeteor1DL);
}
void MeLaserCannon1_Draw(MeLaserCannon1* this) {
RCP_SetupDL_29(this->unk_046, gFogGreen, gFogBlue, gFogAlpha, this->unk_048, gFogFar);
RCP_SetupDL_29(this->work_046, gFogGreen, gFogBlue, gFogAlpha, this->work_048, gFogFar);
gSPDisplayList(gMasterDisp++, aMeLaserCannon1DL);
}
@@ -630,9 +630,9 @@ void ActorMissileSeek_Draw(Actor* missile) {
case 1:
if (gCurrentLevel == LEVEL_AREA_6) {
gSPDisplayList(gMasterDisp++, D_ENMY_SPACE_400B390);
gSPDisplayList(gMasterDisp++, aAttacker3DL);
} else {
gSPDisplayList(gMasterDisp++, D_ENMY_PLANET_4007AF0);
gSPDisplayList(gMasterDisp++, aGrangaFighter2DL);
}
break;
}
@@ -645,7 +645,7 @@ void ActorMissileSeek_Draw(Actor* missile) {
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY);
missile->iwork[11] = 1;
Matrix_Scale(gGfxMatrix, scale, scale, scale, MTXF_APPLY);
Actor_DrawEngineGlow(missile, 2);
Actor_DrawEngineGlow(missile, EG_GREEN);
}
void CoSkibot_Draw(CoSkibot* this) {
@@ -689,14 +689,14 @@ void Object_SetShadowDL(ObjectId objId, s32 index) {
case OBJ_ACTOR_TEAM_BOSS:
case OBJ_ACTOR_EVENT:
switch (gActors[index].eventType) {
case EVID_3:
case EVID_SPY_EYE:
Matrix_Scale(gGfxMatrix, 2.3f, 0.0f, 2.3f, MTXF_APPLY);
Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY);
Matrix_SetGfxMtx(&gMasterDisp);
gSPDisplayList(gMasterDisp++, D_102A010);
break;
case EVID_81:
case EVID_VE1_BLOCKER:
RCP_SetupDL(&gMasterDisp, SETUPDL_48);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, 255);
gDPSetEnvColor(gMasterDisp++, 0, 0, 0, 255);
@@ -715,7 +715,7 @@ void Object_SetShadowDL(ObjectId objId, s32 index) {
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 30.0f, MTXF_APPLY);
Matrix_SetGfxMtx(&gMasterDisp);
gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK);
gSPDisplayList(gMasterDisp++, D_1032780);
gSPDisplayList(gMasterDisp++, aArwingShadowDL);
break;
}
break;
@@ -1084,7 +1084,7 @@ void Actor_DrawOnRails(Actor* this) {
this->obj.pos.y += gCameraShakeY;
func_edisplay_8005D008(&this->obj, this->info.drawType);
this->obj.pos.y -= gCameraShakeY;
} else if ((this->obj.id == OBJ_ACTOR_EVENT) && (this->eventType != EVID_31)) {
} else if ((this->obj.id == OBJ_ACTOR_EVENT) && (this->eventType != EVID_A6_UMBRA_STATION)) {
func_edisplay_8005D3CC(&this->obj, this->vwork[29].x, this->vwork[29].y,
this->vwork[29].z + this->rot_0F4.z, this->info.drawType);
} else {
@@ -1383,37 +1383,37 @@ void Item_Draw(Item* this, s32 arg1) {
}
}
void ActorAllRange_DrawShadow(Actor* actor) {
Matrix_Translate(gGfxMatrix, actor->obj.pos.x, actor->fwork[25] + 3.0f, actor->obj.pos.z, MTXF_APPLY);
void ActorAllRange_DrawShadow(ActorAllRange* this) {
Matrix_Translate(gGfxMatrix, this->obj.pos.x, this->fwork[25] + 3.0f, this->obj.pos.z, MTXF_APPLY);
if (gCurrentLevel == LEVEL_FORTUNA) {
Matrix_RotateY(gGfxMatrix, actor->fwork[27], MTXF_APPLY);
Matrix_RotateX(gGfxMatrix, actor->fwork[26], MTXF_APPLY);
Matrix_RotateZ(gGfxMatrix, actor->fwork[28], MTXF_APPLY);
Matrix_RotateY(gGfxMatrix, -actor->fwork[27], MTXF_APPLY);
Matrix_RotateY(gGfxMatrix, this->fwork[27], MTXF_APPLY);
Matrix_RotateX(gGfxMatrix, this->fwork[26], MTXF_APPLY);
Matrix_RotateZ(gGfxMatrix, this->fwork[28], MTXF_APPLY);
Matrix_RotateY(gGfxMatrix, -this->fwork[27], MTXF_APPLY);
}
Matrix_Scale(gGfxMatrix, 1.4f, 0.0f, 1.4f, MTXF_APPLY);
Matrix_RotateY(gGfxMatrix, (actor->obj.rot.y + 180.0f) * M_DTOR, MTXF_APPLY);
Matrix_RotateZ(gGfxMatrix, actor->obj.rot.z * M_DTOR, MTXF_APPLY);
Matrix_RotateY(gGfxMatrix, (this->obj.rot.y + 180.0f) * M_DTOR, MTXF_APPLY);
Matrix_RotateZ(gGfxMatrix, this->obj.rot.z * M_DTOR, MTXF_APPLY);
Matrix_SetGfxMtx(&gMasterDisp);
if (actor->aiType <= AI360_PEPPY) {
if (this->aiType <= AI360_PEPPY) {
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 30.0f, MTXF_APPLY);
Matrix_SetGfxMtx(&gMasterDisp);
gSPDisplayList(gMasterDisp++, D_1032780);
gSPDisplayList(gMasterDisp++, aArwingShadowDL);
} else if (gCurrentLevel == LEVEL_KATINA) {
if ((actor->animFrame == 1) || (actor->animFrame == 2)) {
gSPDisplayList(gMasterDisp++, D_KA_600D730);
if ((this->animFrame == 1) || (this->animFrame == 2)) {
gSPDisplayList(gMasterDisp++, aKaCornerianFighterShadowDL);
} else {
gSPDisplayList(gMasterDisp++, D_KA_600DBC0);
gSPDisplayList(gMasterDisp++, aKaEnemyShadowDL);
}
} else if ((actor->aiType <= AI360_ANDREW) || (gCurrentLevel != LEVEL_FORTUNA)) {
gSPDisplayList(gMasterDisp++, D_STAR_WOLF_F014310);
} else if ((this->aiType <= AI360_ANDREW) || (gCurrentLevel != LEVEL_FORTUNA)) {
gSPDisplayList(gMasterDisp++, aStarWolfShadowDL);
} else if (gCurrentLevel == LEVEL_FORTUNA) {
gSPDisplayList(gMasterDisp++, D_FO_6009F90);
gSPDisplayList(gMasterDisp++, aFoEnemyShadowDL);
} else {
gSPDisplayList(gMasterDisp++, D_STAR_WOLF_F014310);
gSPDisplayList(gMasterDisp++, aStarWolfShadowDL);
}
}
@@ -1810,7 +1810,7 @@ void Object_DrawAll(s32 arg0) {
Lights_SetOneLight(&gMasterDisp, -60, -60, 60, 150, 150, 150, 20, 20, 20);
for (i = 0, item = gItems; i < ARRAY_COUNT(gItems); i++, item++) {
for (i = 0, item = &gItems[0]; i < ARRAY_COUNT(gItems); i++, item++) {
if (item->obj.status >= OBJ_ACTIVE) {
Matrix_Push(&gGfxMatrix);
RCP_SetupDL(&gMasterDisp, SETUPDL_29);
@@ -1831,7 +1831,7 @@ void Effect_DrawAll(s32 arg0) {
RCP_SetupDL(&gMasterDisp, SETUPDL_64);
for (i = 0, effect = gEffects; i < ARRAY_COUNT(gEffects); i++, effect++) {
for (i = 0, effect = &gEffects[0]; i < ARRAY_COUNT(gEffects); i++, effect++) {
if (effect->obj.status >= OBJ_ACTIVE) {
if (effect->info.unk_14 == 1) {
effect->obj.rot.y = RAD_TO_DEG(-gPlayer[gPlayerNum].camYaw);
@@ -1856,7 +1856,7 @@ void Effect_DrawAll(s32 arg0) {
}
}
for (i = 0, boss = gBosses; i < ARRAY_COUNT(gBosses); i++, boss++) {
for (i = 0, boss = &gBosses[0]; i < ARRAY_COUNT(gBosses); i++, boss++) {
if ((boss->obj.status >= OBJ_ACTIVE) && (boss->obj.id == OBJ_BOSS_BO_BASE_SHIELD)) {
if ((boss->timer_05C % 2) == 0) {
RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
+1 -1
View File
@@ -3915,7 +3915,7 @@ void Effect_Effect395_Draw(Effect395* this) {
case 3:
RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
gSPDisplayList(gMasterDisp++, D_A6_601A120);
gSPDisplayList(gMasterDisp++, aA6SpaceMineDL);
break;
case 4:
+11 -11
View File
@@ -1179,8 +1179,8 @@ void Object_Init(s32 index, ObjectId objId) {
break;
case OBJ_ACTOR_ME_METEOR_2:
case OBJ_ACTOR_ME_LASER_CANNON_1:
gActors[index].unk_046 = gFogRed;
gActors[index].unk_048 = gFogNear;
gActors[index].work_046 = gFogRed;
gActors[index].work_048 = gFogNear;
gActors[index].obj.rot.x = RAND_FLOAT(360.0f);
gActors[index].obj.rot.y = RAND_FLOAT(360.0f);
break;
@@ -1218,11 +1218,11 @@ void Object_Init(s32 index, ObjectId objId) {
}
break;
case OBJ_ACTOR_ME_MORA:
gActors[index].unk_046 = 100;
gActors[index].work_046 = 100;
for (i = 0; i < 2; i++) {
if (gMeMoraStatus[i] == 0) {
gMeMoraStatus[i] = 1;
gActors[index].unk_046 = i;
gActors[index].work_046 = i;
for (j = 0; j < 100; j++) {
gMeMoraYpos[i][j] = gActors[index].obj.pos.y;
gMeMoraZpos[i][j] = gActors[index].obj.pos.z;
@@ -1230,7 +1230,7 @@ void Object_Init(s32 index, ObjectId objId) {
break;
}
}
if (gActors[index].unk_046 == 100) {
if (gActors[index].work_046 == 100) {
gActors[index].obj.status = OBJ_FREE;
}
break;
@@ -1425,8 +1425,8 @@ void func_enmy_80065380(MeMeteor2* this, f32 xPos, f32 yPos, f32 zPos, f32 arg4,
this->obj.pos.x = xPos;
this->obj.pos.y = yPos;
this->obj.pos.z = zPos;
this->unk_046 = 255;
this->unk_048 = 900;
this->work_046 = 255;
this->work_048 = 900;
this->obj.rot.z = RAND_FLOAT(360.0f);
this->obj.rot.y = RAND_FLOAT(360.0f);
Object_SetInfo(&this->info, this->obj.id);
@@ -2658,7 +2658,7 @@ void Actor_Move(Actor* this) {
var_fv0 = 4000.0f;
if ((this->obj.id == OBJ_ACTOR_ZO_DODORA) || (gCurrentLevel == LEVEL_MACBETH) ||
((this->obj.id == OBJ_ACTOR_EVENT) && (this->eventType == EVID_56))) {
((this->obj.id == OBJ_ACTOR_EVENT) && (this->eventType == EVID_TI_GREAT_FOX))) {
var_fv0 = 8000.0f;
} else if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ENTER_WARP_ZONE) {
var_fv0 = 100000.0f;
@@ -2680,13 +2680,13 @@ void Actor_Move(Actor* this) {
break;
case OBJ_ACTOR_ME_MORA:
gMeMoraStatus[this->unk_046] = 0;
gMeMoraStatus[this->work_046] = 0;
break;
case OBJ_ACTOR_EVENT:
if ((this->eventType >= EVID_200) && (this->eventType < EVID_300)) {
gMeMoraStatus[this->unk_046] = 0;
} else if ((this->eventType == EVID_SX_WARP_GATE) && (this->unk_046 != 2)) {
gMeMoraStatus[this->work_046] = 0;
} else if ((this->eventType == EVID_SX_WARP_GATE) && (this->work_046 != 2)) {
gRingPassCount = -1;
}
break;
+532 -513
View File
File diff suppressed because it is too large Load Diff
+19 -19
View File
@@ -1778,7 +1778,7 @@ void func_hud_80089AF4(void) {
gDPSetPrimColor(gMasterDisp++, 0, 0, 0, 0, 0, 255);
Matrix_Scale(gGfxMatrix, 54.0f, 54.0f, 1.0f, MTXF_APPLY);
Matrix_SetGfxMtx(&gMasterDisp);
gSPDisplayList(gMasterDisp++, D_STAR_WOLF_F014180);
gSPDisplayList(gMasterDisp++, aStarWolfRadarMarkDL);
}
void func_hud_80089B94(void) {
@@ -2461,7 +2461,7 @@ s32 func_hud_8008B774(void) {
(gCurrentLevel == LEVEL_SECTOR_Y))) {
for (i = 0; i < ARRAY_COUNT(gActors); i++) {
if ((gActors[i].obj.status == OBJ_ACTIVE) && (gActors[i].iwork[12] == temp)) {
if ((gActors[i].eventType == EVID_SLIPPY_METEO) || (gActors[i].eventType == EVID_TEAMMATE) ||
if ((gActors[i].eventType == EVID_ME_SLIPPY) || (gActors[i].eventType == EVID_TEAMMATE) ||
((gActors[i].obj.id == OBJ_ACTOR_TEAM_BOSS) &&
((gActors[i].aiType == AI360_FALCO) || (gActors[i].aiType == AI360_SLIPPY) ||
(gActors[i].aiType == AI360_PEPPY)))) {
@@ -4525,7 +4525,7 @@ bool func_hud_800927A0(ActorTeamBoss* this) {
bool ret = false;
if (this->iwork[11] == 0) {
this->unk_046 = 0;
this->work_046 = 0;
this->iwork[11] = 1;
this->iwork[1] = 1;
this->vwork[29].x = this->obj.rot.x;
@@ -4537,22 +4537,22 @@ bool func_hud_800927A0(ActorTeamBoss* this) {
Math_SmoothStepToAngle(&this->vwork[29].x, 0.0f, 0.1f, 5.0f, 0.0f);
sp50 = Math_RadToDeg(Math_Atan2F(0.0f - this->obj.pos.x, 0.0f - this->obj.pos.z));
switch (this->unk_046) {
switch (this->work_046) {
case 0:
if (this->unk_04A != 0) {
if (this->work_04A != 0) {
this->timer_0BC = 30;
} else {
this->timer_0BC = 10;
}
this->unk_046 = 1;
this->work_046 = 1;
if (this->fwork[19] > 180.0f) {
this->fwork[19] = this->fwork[19] - 360.0f;
}
case 1:
if (this->timer_0BC == 0) {
this->unk_046 = 2;
if (this->unk_04A != 0) {
this->work_046 = 2;
if (this->work_04A != 0) {
this->timer_0BC = 80;
} else {
this->timer_0BC = 60;
@@ -4589,7 +4589,7 @@ bool func_hud_800927A0(ActorTeamBoss* this) {
this->fwork[20] = -180.0f;
}
this->iwork[1] = 1;
this->unk_046 = 3;
this->work_046 = 3;
}
this->fwork[28] -= 0.2f;
break;
@@ -4607,7 +4607,7 @@ bool func_hud_800927A0(ActorTeamBoss* this) {
Math_SmoothStepToF(&this->fwork[16], -sp54, 0.3f, 100.0f, 0.0f);
Math_SmoothStepToF(&this->fwork[27], -sp54, 0.3f, 100.0f, 0.0f);
if (this->unk_04A != 0) {
if (this->work_04A != 0) {
Math_SmoothStepToAngle(&this->rot_0F4.y, sp50, 0.1f, 2.0f, 0.0f);
}
@@ -4622,7 +4622,7 @@ bool func_hud_800927A0(ActorTeamBoss* this) {
if (this->timer_0BC == 0) {
ret = true;
this->iwork[11] = 0;
this->unk_046 = 0;
this->work_046 = 0;
this->fwork[28] = 0.0f;
this->fwork[20] = 0.0f;
this->fwork[29] = 1.0f;
@@ -4689,7 +4689,7 @@ void ActorTeamBoss_Update(ActorTeamBoss* this) {
this->health = gTeamShields[this->aiType];
switch (this->unk_048) {
switch (this->work_048) {
case 0:
func_hud_800914FC(this);
func_hud_80091864(this);
@@ -4724,29 +4724,29 @@ void ActorTeamBoss_Update(ActorTeamBoss* this) {
if ((this->iwork[10] != 0) && (gLevelMode == LEVELMODE_ALL_RANGE) && (this->iwork[9] == 0) &&
(gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE)) {
this->unk_048 = 2;
this->unk_04A = 0;
this->work_048 = 2;
this->work_04A = 0;
}
if ((gLevelMode == LEVELMODE_ALL_RANGE) &&
(fabsf(this->obj.pos.x > var_fv1) || fabsf(this->obj.pos.z > var_fv1)) &&
(gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE)) {
this->unk_048 = 2;
this->unk_04A = 1;
this->work_048 = 2;
this->work_04A = 1;
}
break;
case 1:
if (func_hud_800924E0(this) != 0) {
this->unk_048 = 0;
this->work_048 = 0;
this->iwork[9] = RAND_INT(30.0f) + 90;
}
break;
case 2:
if (func_hud_800927A0(this) != 0) {
this->unk_04A = 0;
this->unk_048 = this->unk_04A;
this->work_04A = 0;
this->work_048 = this->work_04A;
this->iwork[9] = RAND_INT(30.0f) + 90;
}
break;
+3 -3
View File
@@ -2035,14 +2035,14 @@ void Player_CollisionCheck(Player* player) {
Player_ApplyDamage(player, temp_v0, actor->info.damage);
}
} else if (actor->obj.id == OBJ_ACTOR_EVENT) {
if (actor->eventType == EVID_42) {
if (actor->eventType == EVID_SY_SHIP_2) {
temp_v0 = Player_CheckPolyCollision(player, ACTOR_EVENT_ID, actor->obj.pos.x, actor->obj.pos.y,
actor->obj.pos.z, actor->obj.rot.x, actor->obj.rot.y,
actor->obj.rot.z);
if (temp_v0 != 0) {
Player_ApplyDamage(player, temp_v0, actor->info.damage);
}
} else if (actor->eventType == EVID_63) {
} else if (actor->eventType == EVID_ME_BIG_METEOR) {
spfD4.x = fabsf(actor->obj.pos.x - player->pos.x);
spfD4.y = fabsf(actor->obj.pos.y - player->pos.y);
spfD4.z = fabsf(actor->obj.pos.z - player->trueZpos);
@@ -2059,7 +2059,7 @@ void Player_CollisionCheck(Player* player) {
if ((temp_v0 < 0) && (actor->eventType == EVID_SX_WARP_GATE)) {
actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SX_6032328);
if (gRingPassCount >= 0) {
actor->unk_046 = 2;
actor->work_046 = 2;
gRingPassCount++;
if (gRingPassCount == 3) {
Radio_PlayMessage(gMsg_ID_5504, RCID_FALCO);
+4 -4
View File
@@ -4,7 +4,7 @@
#include "sf64audio_provisional.h"
extern s32 spectrumAnalyzerMode;
extern bool D_menu_801B9320;
extern bool sMusicPlaying;
extern s32 D_menu_801B9244;
extern OptionId D_menu_801B9124;
extern s32 D_menu_801B912C;
@@ -163,11 +163,11 @@ void Jukebox_Update(void) {
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1);
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1);
AUDIO_PLAY_SFX(sfx, sfxSource, 4);
D_menu_801B9320 = true;
sMusicPlaying = true;
}
if (contPress->button & B_BUTTON) {
if (!D_menu_801B9320) {
if (!sMusicPlaying) {
AUDIO_PLAY_SFX(NA_SE_ARWING_CANCEL, gDefaultSfxSource, 4);
AUDIO_PLAY_BGM(NA_BGM_SELECT);
gDrawMode = DRAW_NONE;
@@ -180,7 +180,7 @@ void Jukebox_Update(void) {
Audio_KillSfxBySource(sfxSource);
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1);
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1);
D_menu_801B9320 = false;
sMusicPlaying = false;
}
}
+1 -1
View File
@@ -345,7 +345,7 @@ void Spawner(void) {
sObjType++;
switch (sObjType) {
case OBJ_SPAWN_EVENT:
sObjId = EVID_0;
sObjId = EVID_VENOM_FIGHTER_1;
break;
case OBJ_SPAWN_SCENERY:
sObjId = OBJ_SCENERY_CO_STONE_ARCH;
+3 -3
View File
@@ -1470,7 +1470,7 @@ void Ending_8018B6D8(Actor* actor, s32 arg1) {
actor->iwork[1] = 100;
actor->fwork[0] = 30.0f;
actor->iwork[0] = sp20[arg1];
actor->unk_046 = arg1;
actor->work_046 = arg1;
}
void Ending_8018B860(void) {
@@ -1843,7 +1843,7 @@ void Ending_8018C21C(void) {
Matrix_RotateX(gGfxMatrix, gActors[i].obj.rot.x * M_DTOR, MTXF_APPLY);
Matrix_RotateZ(gGfxMatrix, gActors[i].obj.rot.z * M_DTOR, MTXF_APPLY);
Matrix_SetGfxMtx(&gMasterDisp);
gSPDisplayList(gMasterDisp++, D_D00B880);
gSPDisplayList(gMasterDisp++, aBillShipDL);
Matrix_Push(&gGfxMatrix);
RCP_SetupDL(&gMasterDisp, SETUPDL_49);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 64);
@@ -1857,7 +1857,7 @@ void Ending_8018C21C(void) {
spE4 = gActors[i].fwork[1];
RCP_SetupDL(&gMasterDisp, SETUPDL_41);
switch (gActors[i].unk_046) {
switch (gActors[i].work_046) {
case 0:
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 200, 0, 0, gActors[i].iwork[1]);
break;
+2 -2
View File
@@ -554,7 +554,7 @@ void Ending_8018F64C(u32 arg0, AssetInfo* asset) {
}
Matrix_SetGfxMtx(&gMasterDisp);
gSPDisplayList(gMasterDisp++, D_D009A40);
gSPDisplayList(gMasterDisp++, aKattShipDL);
RCP_SetupDL(&gMasterDisp, SETUPDL_67);
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY);
@@ -621,7 +621,7 @@ void Ending_8018FC60(u32 arg0, AssetInfo* asset) {
}
Matrix_SetGfxMtx(&gMasterDisp);
gSPDisplayList(gMasterDisp++, D_D00B880);
gSPDisplayList(gMasterDisp++, aBillShipDL);
RCP_SetupDL(&gMasterDisp, SETUPDL_67);
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -50.0f, MTXF_APPLY);
+2 -2
View File
@@ -516,8 +516,8 @@ void Corneria_CoGranga_DecideNextAction(CoGranga* this) {
}
void Corneria_80188C7C(CoGranga* this) {
if (this->unk_044 == 0) {
this->unk_044++;
if (this->work_044 == 0) {
this->work_044++;
this->fwork[GRANGA_FWK_12] *= -0.2f;
AUDIO_PLAY_SFX(NA_SE_OB_METAL_BOUND_L, this->sfxSource, 4);
func_enmy_80062B60(sCoGrangaWork[GRANGA_WORK_56], sCoGrangaWork[GRANGA_WORK_58], 0, 30.0f);
+1 -1
View File
@@ -1424,7 +1424,7 @@ void Venom1_Ve1Golemech_Update(Ve1Golemech* this) {
actor->obj.rot.z = D_i1_8019B838[spF4].unk_30[0].z;
actor->state = 57;
actor->iwork[0] = 0;
actor->unk_048 = spF4;
actor->work_048 = spF4;
if (this->swork[25] == 0) {
actor->vel.x = RAND_FLOAT_CENTERED(5.0f);
actor->vel.y = 10.0f + RAND_FLOAT_CENTERED(2.0f);
+26 -25
View File
@@ -80,15 +80,15 @@ void Meteo_MeMeteor2_Update(MeMeteor2* this) {
this->obj.rot.y += 1.7f;
this->obj.rot.x += 3.3f;
this->unk_046 -= 15;
this->work_046 -= 15;
if (this->unk_046 < 0) {
this->unk_046 = 0;
if (this->work_046 < 0) {
this->work_046 = 0;
}
this->unk_048 += 8;
if (this->unk_048 > 995) {
this->unk_048 = 995;
this->work_048 += 8;
if (this->work_048 > 995) {
this->work_048 = 995;
}
if ((this->timer_0BC % 4U) == 1) {
@@ -175,15 +175,15 @@ void Meteo_80187B08(MeLaserCannon1* this) {
this->obj.rot.y += 7.0f;
this->obj.rot.x += 3.3f;
this->unk_046 -= 11;
this->work_046 -= 11;
if (this->unk_046 < 0) {
this->unk_046 = 0;
if (this->work_046 < 0) {
this->work_046 = 0;
}
this->unk_048 += 4;
if (this->unk_048 > 995) {
this->unk_048 = 995;
this->work_048 += 4;
if (this->work_048 > 995) {
this->work_048 = 995;
}
if ((this->timer_0BC % 4) == 0) {
@@ -199,7 +199,8 @@ void Meteo_80187B08(MeLaserCannon1* this) {
}
}
void Meteo_80187C68(Actor* this, f32 x, f32 y, f32 z, f32 arg4, f32 xRot, f32 yRot, s32 timerBC, s32 arg8, s32 objId) {
void Meteo_80187C68(Actor* this, f32 x, f32 y, f32 z, f32 arg4, f32 xRot, f32 yRot, s32 timerBC, s32 eventType,
s32 objId) {
Actor_Initialize(this);
this->obj.status = OBJ_INIT;
this->obj.id = objId;
@@ -213,7 +214,7 @@ void Meteo_80187C68(Actor* this, f32 x, f32 y, f32 z, f32 arg4, f32 xRot, f32 yR
this->timer_0BC = timerBC;
this->timer_0BE = 20;
this->eventType = arg8;
this->eventType = eventType;
this->fwork[5] = arg4;
Object_SetInfo(&this->info, this->obj.id);
}
@@ -394,15 +395,15 @@ void Meteo_MeCrusherShield_Update(MeCrusherShield* this) {
this->timer_054 = 5;
this->swork[0] += 32;
Audio_SetTransposeAndPlaySfx(this->sfxSource, NA_SE_EN_GRN_BEAM_CHARGE, this->unk_04A);
Audio_SetTransposeAndPlaySfx(this->sfxSource, NA_SE_EN_GRN_BEAM_CHARGE, this->work_04A);
this->unk_04A++;
if (this->unk_04A > 7) {
this->unk_04A = 7;
this->work_04A++;
if (this->work_04A > 7) {
this->work_04A = 7;
}
if (this->swork[0] >= 255) {
this->unk_04A = 0;
this->work_04A = 0;
Audio_KillSfxBySource(this->sfxSource);
@@ -520,7 +521,7 @@ void Meteo_MeCrusher_Init(MeCrusher* this) {
this->fwork[9] = -3000.0f;
this->fwork[15] = 8.0f;
i = this->unk_044 = 1;
i = this->work_044 = 1;
Boss_Initialize(&gBosses[i]);
@@ -1109,7 +1110,7 @@ void Meteo_MeCrusher_Update(MeCrusher* this) {
if (this->fwork[0] >= 0.0f) {
this->state = 2;
this->timer_050 = 50;
gBosses[this->unk_044].state = 1;
gBosses[this->work_044].state = 1;
}
}
@@ -1165,7 +1166,7 @@ void Meteo_MeCrusher_Update(MeCrusher* this) {
}
}
if (gBosses[this->unk_044].state < 3) {
if (gBosses[this->work_044].state < 3) {
var_v0 = 0;
if (this->swork[2] == 0) {
var_v0 = 1;
@@ -1184,14 +1185,14 @@ void Meteo_MeCrusher_Update(MeCrusher* this) {
this->obj.rot.z += 0.1f;
}
if (var_v0 == 4) {
gBosses[this->unk_044].state = 3;
gBosses[this->work_044].state = 3;
this->state = 4;
this->timer_050 = 250;
this->timer_05A = 30;
this->fwork[10] = 0;
}
if ((this->timer_050 == 0) && (gBosses[this->unk_044].state == 2)) {
if ((this->timer_050 == 0) && (gBosses[this->work_044].state == 2)) {
this->fwork[2] = 90.0f;
this->timer_050 = D_i2_80195520[var_v0] + 45;
AUDIO_PLAY_SFX(NA_SE_EN_SHIELD_ROLL, this->sfxSource, 4);
@@ -1199,7 +1200,7 @@ void Meteo_MeCrusher_Update(MeCrusher* this) {
if (this->fwork[2] > 0.0f) {
this->fwork[2] -= 2.0f;
gBosses[this->unk_044].rot_078.z -= 2.0f;
gBosses[this->work_044].rot_078.z -= 2.0f;
}
}
+2 -2
View File
@@ -168,7 +168,7 @@ void SectorX_SxSlippy_Update(SxSlippy* this) {
void SectorX_SxSlippy_Draw(SxSlippy* this) {
switch (this->animFrame) {
case 0:
gSPDisplayList(gMasterDisp++, D_SX_6020D20);
gSPDisplayList(gMasterDisp++, aSxBaseWallTile1DL);
break;
case 1:
@@ -210,7 +210,7 @@ void SectorX_8018FA04(f32 x, f32 y, f32 z) {
actor->obj.pos.y = y;
actor->obj.pos.z = z;
Object_SetInfo(&actor->info, actor->obj.id);
actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SX_60328CC);
actor->info.hitbox = SEGMENTED_TO_VIRTUAL(aSxBaseWallTile1Hitbox);
xRot = Math_Atan2F(gPlayer[0].pos.x - x, gPlayer[0].trueZpos - z);
pad = sqrtf(SQ(gPlayer[0].pos.x - x) + SQ(gPlayer[0].trueZpos - z));
yRot = -Math_Atan2F(gPlayer[0].pos.y - y, pad);
+1 -1
View File
@@ -344,7 +344,7 @@ void Aquas_SetupDebris(ActorDebris* this, Vec3f* pos, Vec3f* rot, f32 xVel, f32
this->obj.id = OBJ_ACTOR_DEBRIS;
this->state = state;
this->scale = scale;
this->unk_048 = unk48;
this->work_048 = unk48;
this->obj.pos = *pos;
this->obj.rot = *rot;
this->vel.x = xVel;
+8 -8
View File
@@ -257,8 +257,8 @@ void Solar_SoWave_Update(SoWave* this) {
}
}
if ((this->unk_046 == 0) || (this->unk_046 == 1)) {
this->unk_046 = 3;
if ((this->work_046 == 0) || (this->work_046 == 1)) {
this->work_046 = 3;
Object_SetSfxSourceToPos(this->sfxSource, &this->obj.pos);
AUDIO_PLAY_SFX(NA_SE_OB_MAGMA_WAVE, this->sfxSource, 0);
}
@@ -947,7 +947,7 @@ void Solar_801A0CEC(SoWave* this, f32 xPos, f32 zPos, f32 zVel, s32 unkB8) {
this->obj.pos.x = xPos;
this->obj.pos.z = zPos;
this->unk_046 = 1;
this->work_046 = 1;
this->state = unkB8;
this->vel.z = zVel;
this->fwork[1] = zVel;
@@ -1288,8 +1288,8 @@ void Solar_801A1CD8(ActorDebris* this, f32 xPos, f32 yPos, f32 zPos, f32 xRot, f
this->obj.id = OBJ_ACTOR_DEBRIS;
this->state = 40;
this->unk_046 = unk46;
this->unk_04A = 3;
this->work_046 = unk46;
this->work_04A = 3;
this->obj.pos.x = xPos;
this->obj.pos.y = yPos;
@@ -1801,7 +1801,7 @@ void Solar_801A3128(SoVulkain* this) {
void Solar_801A3468(SoVulkain* this) {
this->swork[SO_SWK_0] = 4;
this->unk_048 = 0;
this->work_048 = 0;
if ((this->swork[SO_SWK_2] != 0) || (this->swork[SO_SWK_3] != 0)) {
if (this->swork[SO_SWK_3] != 0) {
@@ -1811,7 +1811,7 @@ void Solar_801A3468(SoVulkain* this) {
}
} else {
if (Rand_ZeroOne() >= 0.5f) {
this->unk_048 = 1;
this->work_048 = 1;
this->swork[SO_SWK_1] = 5;
} else {
this->timer_050 = 0;
@@ -1885,7 +1885,7 @@ void Solar_801A3510(SoVulkain* this) {
}
}
if ((this->unk_048 != 0) && (this->animFrame == 68)) {
if ((this->work_048 != 0) && (this->animFrame == 68)) {
this->swork[SO_SWK_1] = 9;
this->fwork[SO_FWK_0] = 0.01f;
this->animFrame = 20;
+8 -8
View File
@@ -488,7 +488,7 @@ void Zoness_ActorDebris_Setup(ActorDebris* this, Vec3f* pos, Vec3f* rot, f32 xVe
this->state = state;
this->scale = scale;
this->unk_048 = unk48;
this->work_048 = unk48;
this->obj.pos = *pos;
this->obj.rot = *rot;
this->vel.x = xVel;
@@ -755,7 +755,7 @@ void Zoness_ZoDodora_Draw2(ZoDodora* this) {
s32 k;
PosRot* zoDodoraPosRots;
for (i = this->unk_04A = 0; i < 20; i++, hitbox++) {
for (i = this->work_04A = 0; i < 20; i++, hitbox++) {
k = (D_i3_801BF56C[i] + this->counter_04E) % 200;
zoDodoraPosRots = &gZoDodoraPosRots[k];
@@ -960,7 +960,7 @@ void Zoness_ZGull_Update(ZGull* this) {
}
this->animFrame++;
if (this->animFrame >= Animation_GetFrameCount(&D_ENMY_PLANET_40057AC)) {
if (this->animFrame >= Animation_GetFrameCount(&aFirebirdAnim)) {
this->animFrame = 0;
}
@@ -1035,8 +1035,8 @@ void Zoness_ZGull_Update(ZGull* this) {
}
void Zoness_ZGull_Draw(ZGull* this) {
Animation_GetFrameData(&D_ENMY_PLANET_40057AC, this->animFrame, this->vwork);
Animation_DrawSkeleton(1, D_ENMY_PLANET_40058B8, this->vwork, NULL, NULL, &this->index, &gIdentityMatrix);
Animation_GetFrameData(&aFirebirdAnim, this->animFrame, this->vwork);
Animation_DrawSkeleton(1, aFirebirdSkel, this->vwork, NULL, NULL, &this->index, &gIdentityMatrix);
}
void Zoness_ZoEnergyBall_Init2(ZoEnergyBall* this) {
@@ -4620,7 +4620,7 @@ void Zoness_ZoBarrier_Init(ZoBarrier* this) {
gActors[i].state = 1;
this->unk_046 = i + 1;
this->work_046 = i + 1;
Object_SetInfo(&gActors[i].info, gActors[i].obj.id);
gActors[i].info.hitbox = SEGMENTED_TO_VIRTUAL(D_ZO_602C028);
break;
@@ -4647,8 +4647,8 @@ void Zoness_ZoBarrier_Update(ZoBarrier* this) {
}
}
if (this->unk_046 != 0) {
otherActor = &gActors[this->unk_046 - 1];
if (this->work_046 != 0) {
otherActor = &gActors[this->work_046 - 1];
otherActor->obj.pos.y += this->fwork[1] * 0.3f;
if (otherActor->obj.pos.y > this->fwork[2] + 370.0f) {
otherActor->obj.pos.y = this->fwork[2] + 370.0f;
+2 -2
View File
@@ -1537,7 +1537,7 @@ void Bolse_LevelComplete(Player* player) {
actor50->obj.pos.y - RAND_FLOAT(2000.0f),
RAND_FLOAT_CENTERED(300.0f) + actor50->obj.pos.z, 5.11f);
};
actor50->unk_046 = 1;
actor50->work_046 = 1;
break;
case 235:
@@ -1673,7 +1673,7 @@ void Bolse_LevelComplete(Player* player) {
break;
}
if (actor50->unk_046 != 0) {
if (actor50->work_046 != 0) {
Math_SmoothStepToF(&actor50->fwork[20], 3.0f, 0.03f, 0.01f, 0);
if ((gGameFrameCount % 2U) == 0) {
Effect_Effect389_Spawn(
+1 -1
View File
@@ -2652,7 +2652,7 @@ void Katina_EnemyDraw(ActorAllRange* this) {
case 1:
gSPDisplayList(gMasterDisp++, aKaCornerianFighterDL);
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY);
Actor_DrawEngineGlow(this, 0);
Actor_DrawEngineGlow(this, EG_RED);
break;
}
}
+17 -17
View File
@@ -1227,7 +1227,7 @@ void Macbeth_MaBoulder_Setup(MaBoulder* this, f32 xPos, f32 yPos, f32 zPos, f32
this->timer_0BE = 20;
this->fwork[0] = arg4;
this->vel.z = zVel;
this->unk_046 = arg9;
this->work_046 = arg9;
Object_SetInfo(&this->info, this->obj.id);
}
@@ -3111,7 +3111,7 @@ bool Macbeth_801A3C20(f32 arg0) {
void Macbeth_MaMaRailroadSwitch_Init(MaRailroadSwitch* this) {
this->state = 0;
this->unk_046 = D_i5_801BA1D8;
this->work_046 = D_i5_801BA1D8;
D_i5_801BA1D8++;
}
@@ -3144,7 +3144,7 @@ void Macbeth_MaRailroadSwitch_Update(MaRailroadSwitch* this) {
Math_SmoothStepToF(&this->fwork[2], 41.0f, 0.6f, 8.0f, 0.0f);
if (this->fwork[2] >= 40.0f) {
this->state = 3;
D_i5_801BE308[this->unk_046] = 1;
D_i5_801BE308[this->work_046] = 1;
}
} else {
this->iwork[0]--;
@@ -3222,12 +3222,12 @@ void Macbeth_MaRailroadSwitch_Draw(MaRailroadSwitch* this) {
void Macbeth_MaBoulder_Init(MaBoulder* this) {
this->gravity = 0;
this->unk_04A = this->unk_046;
this->work_04A = this->work_046;
this->health = 60;
if (this->fwork[0] < 0.0f) {
this->unk_048 = 0;
this->work_048 = 0;
} else {
this->unk_048 = 1;
this->work_048 = 1;
}
}
@@ -3243,17 +3243,17 @@ void Macbeth_MaBoulder_Update(MaBoulder* this) {
Math_SmoothStepToF(&this->gravity, 5.0f, 0.08f, 1.0f, 0.0f);
if (this->obj.pos.y < 80.0f) {
if (this->unk_046 != 0) {
if (this->work_046 != 0) {
AUDIO_PLAY_SFX(NA_SE_OB_ROCK_BOUND, this->sfxSource, 0);
this->obj.pos.y = 80.0f;
if (this->vel.y < 0) {
this->vel.y = -this->vel.y * (this->unk_046 * 0.07f);
this->vel.y = -this->vel.y * (this->work_046 * 0.07f);
}
this->fwork[0] /= 1.2f + RAND_FLOAT(1.0f) / 2;
this->unk_046--;
this->work_046--;
this->vel.z /= 1.5f;
if (this->unk_046 == 0) {
if (this->work_046 == 0) {
this->timer_0BE = RAND_INT(30.0f);
}
} else {
@@ -3266,19 +3266,19 @@ void Macbeth_MaBoulder_Update(MaBoulder* this) {
}
}
if (this->unk_048 != 0) {
if (this->work_048 != 0) {
this->obj.rot.z -= 0.5f * this->vel.x;
} else {
this->obj.rot.z -= 0.5f * this->vel.x;
}
if (this->unk_046 != this->unk_04A) {
if (this->work_046 != this->work_04A) {
this->obj.rot.x = this->obj.rot.x + (0.1 * this->vel.z);
}
}
if (this->unk_046 == 7) {
if (this->unk_048 != 0) {
if (this->work_046 == 7) {
if (this->work_048 != 0) {
this->obj.rot.z -= 1.0f;
} else {
this->obj.rot.z += 1.0f;
@@ -5835,7 +5835,7 @@ void Macbeth_MaBombDrop_Update(MaBombDrop* this) {
this->state = 1;
this->timer_0BC = 200;
this->unk_046 = 192;
this->work_046 = 192;
this->scale = 2.5f;
this->fwork[0] = 2.5f;
@@ -5858,8 +5858,8 @@ void Macbeth_MaBombDrop_Update(MaBombDrop* this) {
this->scale += ((20.0f - this->scale) * 0.1f);
if (this->scale > 19.0f) {
this->fwork[0] -= 0.3f;
this->unk_046 -= 20;
if (this->unk_046 < 0) {
this->work_046 -= 20;
if (this->work_046 < 0) {
Object_Kill(&this->obj, this->sfxSource);
}
}
+32 -32
View File
@@ -529,7 +529,7 @@ void Titania_TiBoulder_Update(TiBoulder* this) {
}
}
if (this->unk_046 == 2) {
if (this->work_046 == 2) {
this->gravity = 0.0f;
Ground_801B6E20(this->obj.pos.x, this->obj.pos.z + gPathProgress, &sp4C, &sp44, &sp48);
this->fwork[0] = sp4C;
@@ -546,10 +546,10 @@ void Titania_TiBoulder_Update(TiBoulder* this) {
temp_fv1 = (this->scale * 50.0f);
if (this->obj.pos.y > sp44 + temp_fv1) {
this->unk_046 = 0;
this->work_046 = 0;
} else {
this->obj.pos.y = sp44 + temp_fv1;
if (this->unk_046 == 0) {
if (this->work_046 == 0) {
if (this->vel.y < -6.0f) {
AUDIO_PLAY_SFX(NA_SE_OB_BOUND_M, this->sfxSource, 4);
}
@@ -561,7 +561,7 @@ void Titania_TiBoulder_Update(TiBoulder* this) {
if (this->vel.y < 10.0f) {
this->vel.y = 0.0f;
}
this->unk_046 = 1;
this->work_046 = 1;
} else {
if ((s32) sp48 == 0) {
this->vel.x *= 0.9;
@@ -692,7 +692,7 @@ void Titania_TiRasco_Init(TiRasco* this) {
actorPtr->obj.pos.x = this->obj.pos.x + sp68[k].x;
actorPtr->obj.pos.y = this->obj.pos.y + sp68[k].y;
actorPtr->obj.pos.z = this->obj.pos.z + sp68[k].z;
actorPtr->unk_046 = 2;
actorPtr->work_046 = 2;
actorPtr->iwork[0] = (uintptr_t) this;
actorPtr->iwork[1] = k;
Object_SetInfo(&actorPtr->info, actorPtr->obj.id);
@@ -800,7 +800,7 @@ void Titania_TiRasco_Update(Actor* this) {
Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW);
if ((this->animFrame >= 26) && (this->animFrame <= 53) && (sp3C != NULL)) {
if (this->animFrame == 26) {
sp3C->unk_046 = 2;
sp3C->work_046 = 2;
sp3C->vel.x = 0.0f;
sp3C->vel.y = 0.0f;
sp3C->vel.z = 0.0f;
@@ -812,7 +812,7 @@ void Titania_TiRasco_Update(Actor* this) {
sp3C->vel.x = dest.x;
sp3C->vel.y = dest.y;
sp3C->vel.z = dest.z;
sp3C->unk_046 = 0;
sp3C->work_046 = 0;
sp3C->iwork[0] = (uintptr_t) NULL;
this->iwork[0] = (uintptr_t) NULL;
}
@@ -827,7 +827,7 @@ void Titania_TiRasco_Update(Actor* this) {
if ((this->animFrame >= 26) && (this->animFrame <= 57) && (sp38 != NULL)) {
if (this->animFrame == 26) {
sp38->unk_046 = 2;
sp38->work_046 = 2;
sp38->vel.x = 0.0f;
sp38->vel.y = 0.0f;
sp38->vel.z = 0.0f;
@@ -840,7 +840,7 @@ void Titania_TiRasco_Update(Actor* this) {
sp38->vel.x = dest.x;
sp38->vel.y = dest.y;
sp38->vel.z = dest.z;
sp38->unk_046 = 0;
sp38->work_046 = 0;
sp38->iwork[0] = (uintptr_t) NULL;
this->iwork[1] = (uintptr_t) NULL;
}
@@ -894,7 +894,7 @@ void Titania_TiRasco_Dying(TiRasco* this) {
if (actorPtr != NULL) {
actorPtr->obj.status = OBJ_ACTIVE;
actorPtr->state = 46;
actorPtr->unk_048 = i;
actorPtr->work_048 = i;
Matrix_MultVec3f(gCalcMatrix, &var_s1->pos, &sp70);
actorPtr->obj.pos.x = this->obj.pos.x + sp70.x;
actorPtr->obj.pos.y = this->obj.pos.y + sp70.y;
@@ -916,12 +916,12 @@ void Titania_TiRasco_Dying(TiRasco* this) {
if (actorPtr != NULL) {
actorPtr->iwork[0] = (uintptr_t) NULL;
this->iwork[0] = (uintptr_t) NULL;
actorPtr->unk_046 = 0;
actorPtr->work_046 = 0;
}
actorPtr = (Actor*) this->iwork[1];
if (actorPtr != NULL) {
actorPtr->unk_046 = 0;
actorPtr->work_046 = 0;
actorPtr->iwork[0] = (uintptr_t) NULL;
this->iwork[1] = (uintptr_t) NULL;
}
@@ -1611,7 +1611,7 @@ void Titania_TiDesertCrawler_Update(TiDesertCrawler* this) {
actorPtr = Game_SpawnActor(OBJ_ACTOR_DEBRIS);
if ((actorPtr != NULL) && D_i5_801B7630[i][1] == 1) {
actorPtr->state = 47;
actorPtr->unk_048 = i;
actorPtr->work_048 = i;
Matrix_MultVec3f(gCalcMatrix, &var_s1->unk_00.pos, &sp158);
actorPtr->obj.pos.x = this->obj.pos.x + sp158.x;
actorPtr->obj.pos.y = this->obj.pos.y + sp158.y;
@@ -1647,7 +1647,7 @@ void Titania_TiDesertCrawler_Update(TiDesertCrawler* this) {
actorPtr = Game_SpawnActor(OBJ_ACTOR_DEBRIS);
if (actorPtr != NULL) {
actorPtr->state = 47;
actorPtr->unk_048 = 9;
actorPtr->work_048 = 9;
Matrix_MultVec3f(gCalcMatrix, &var_s1->unk_00.pos, &sp158);
actorPtr->obj.pos.x = this->obj.pos.x + sp158.x;
actorPtr->obj.pos.y = this->obj.pos.y + sp158.y;
@@ -3836,8 +3836,8 @@ void Titania_80193DF0(TiGoras* this) {
actor = Game_SpawnActor(OBJ_ACTOR_DEBRIS);
if (actor != NULL) {
actor->state = 40;
actor->unk_046 = D_i5_801B7770[i][5];
actor->unk_048 = D_i5_801B7770[i][1];
actor->work_046 = D_i5_801B7770[i][5];
actor->work_048 = D_i5_801B7770[i][1];
if (D_i5_801B7770[i][0] == 85) {
actor->fwork[0] = 5.0f;
actor->fwork[1] = 5.0f;
@@ -4215,8 +4215,8 @@ void Titania_80193DF0(TiGoras* this) {
actor->obj.pos.y = 0.0f;
actor->obj.pos.z = this->obj.pos.z + 2000.0f;
actor->info.cullDistance = 5000.0f;
actor->unk_046 = D_i5_801B7770[D_i5_801B8198[i].unk_00][5];
actor->unk_048 = D_i5_801B7770[D_i5_801B8198[i].unk_00][1];
actor->work_046 = D_i5_801B7770[D_i5_801B8198[i].unk_00][5];
actor->work_048 = D_i5_801B7770[D_i5_801B8198[i].unk_00][1];
D_i5_801B8198[i].unk_0C = D_i5_801B8198[i].unk_04;
actor->vel.z = this->vel.z;
D_i5_801BBF00[D_i5_801B8198[i].unk_00].unk_26 |= 1;
@@ -4778,7 +4778,7 @@ void Titania_80193DF0(TiGoras* this) {
this->obj.status = OBJ_DYING;
D_i5_801BBEF4[12] = 0.0f;
this->fwork[35] = 0.0f;
this->unk_044 = 0;
this->work_044 = 0;
this->timer_050 = 280;
D_i5_801BBEF0[16] = 0;
D_i5_801BBEF0[17] = 0;
@@ -5477,7 +5477,7 @@ void Titania_801990DC(TiGoras* this) {
Vec3f sp60;
Actor* actor;
if (this->unk_044 == 0) {
if (this->work_044 == 0) {
AUDIO_PLAY_SFX(NA_SE_EN_TIBOSS_DW_CRY, this->sfxSource, 4);
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 50);
@@ -5501,8 +5501,8 @@ void Titania_801990DC(TiGoras* this) {
if (actor != NULL) {
actor->state = 40;
actor->unk_046 = D_i5_801B7770[i][5];
actor->unk_048 = D_i5_801B7770[i][1];
actor->work_046 = D_i5_801B7770[i][5];
actor->work_048 = D_i5_801B7770[i][1];
Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW);
Matrix_MultVec3f(gCalcMatrix, &D_i5_801BBF00[i].unk_00.pos, &sp60);
@@ -5536,7 +5536,7 @@ void Titania_801990DC(TiGoras* this) {
D_i5_801BBF00[i].unk_26 = 4;
}
}
this->unk_044 = 1;
this->work_044 = 1;
} else {
this->obj.pos.z = gPlayer[0].pos.z;
}
@@ -5550,9 +5550,9 @@ void Titania_801990DC(TiGoras* this) {
actor->state = 40;
actor->unk_046 = 25;
actor->unk_048 = 0;
actor->unk_04A = 4 | 2;
actor->work_046 = 25;
actor->work_048 = 0;
actor->work_04A = 4 | 2;
actor->fwork[3] = 0.0f;
actor->fwork[4] = -200.0f;
@@ -5577,9 +5577,9 @@ void Titania_801990DC(TiGoras* this) {
actor->state = 40;
actor->unk_046 = 2;
actor->unk_048 = 1;
actor->unk_04A = 4 | 2;
actor->work_046 = 2;
actor->work_048 = 1;
actor->work_04A = 4 | 2;
actor->iwork[1] = (s32) 1;
actor->fwork[3] = -150.0f;
@@ -5604,9 +5604,9 @@ void Titania_801990DC(TiGoras* this) {
actor->state = 40;
actor->unk_046 = 2;
actor->unk_048 = 1;
actor->unk_04A = 4 | 2;
actor->work_046 = 2;
actor->work_048 = 1;
actor->work_04A = 4 | 2;
actor->iwork[1] = 2;
actor->fwork[3] = 100.0f;
+22 -21
View File
@@ -32,14 +32,14 @@ void Andross_80193710(void);
void Andross_80187530(ActorEvent* this) {
s32 index;
switch (this->unk_048) {
switch (this->work_048) {
case 0:
break;
case 1:
this->animFrame += (s32) this->fwork[22];
if (this->animFrame >= Animation_GetFrameCount(&D_VE2_6014658)) {
this->animFrame = Animation_GetFrameCount(&D_VE2_6014658) - 1;
if (this->animFrame >= Animation_GetFrameCount(&aVe2AndrossGateAnim)) {
this->animFrame = Animation_GetFrameCount(&aVe2AndrossGateAnim) - 1;
}
break;
@@ -59,18 +59,19 @@ void Andross_80187530(ActorEvent* this) {
this->obj.rot.z = D_Andross_801A7F68;
}
bool Andross_8018767C(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) {
bool Andross_Gate_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) {
if (limbIndex == 13) {
*dList = NULL;
}
return 0;
}
void Andross_8018769C(ActorEvent* this) {
void Andross_Gate_Draw(ActorEvent* this) {
Vec3f frameTable[20];
Animation_GetFrameData(&D_VE2_6014658, this->animFrame, frameTable);
Animation_DrawSkeleton(1, D_VE2_6014844, frameTable, Andross_8018767C, NULL, NULL, &gIdentityMatrix);
Animation_GetFrameData(&aVe2AndrossGateAnim, this->animFrame, frameTable);
Animation_DrawSkeleton(1, aVe2AndrossGateSkel, frameTable, Andross_Gate_OverrideLimbDraw, NULL, NULL,
&gIdentityMatrix);
}
void Andross_801876FC(void) {
@@ -2545,7 +2546,7 @@ void Andross_AndAndross_Update(AndAndross* this) {
if ((this->animFrame == 45) && (this->swork[8] == 2)) {
this->state = 18;
this->animFrame = 0;
this->unk_044 = 0;
this->work_044 = 0;
this->timer_050 = 40;
this->fwork[9] = 0.0f;
}
@@ -2739,13 +2740,13 @@ void Andross_AndAndross_Update(AndAndross* this) {
Math_SmoothStepToF(&this->fwork[9], 1.0f, 1.0f, 0.05f, 0);
switch (this->unk_044) {
switch (this->work_044) {
case 0:
if (this->timer_050 != 0) {
limbCount = Animation_GetFrameData(&D_ANDROSS_C00DE48, 45, spD0);
Math_SmoothStepToVec3fArray(spD0, D_i6_801A7F80, 1, limbCount, this->fwork[9], 100.0f, 0.0f);
} else {
this->unk_044 = 1;
this->work_044 = 1;
this->timer_050 = 30;
this->swork[9] = 20;
this->fwork[9] = 0.0f;
@@ -2759,7 +2760,7 @@ void Andross_AndAndross_Update(AndAndross* this) {
limbCount = Animation_GetFrameData(&D_ANDROSS_C017430, 0, spD0);
Math_SmoothStepToVec3fArray(spD0, D_i6_801A7F80, 1, limbCount, this->fwork[9], 100.0f, 0.0f);
} else {
this->unk_044 = 2;
this->work_044 = 2;
this->timer_050 = 70;
this->fwork[9] = 0.0f;
AUDIO_PLAY_SFX(NA_SE_VO_ANDROSS_EXCITE, this->sfxSource, 4);
@@ -3661,8 +3662,8 @@ void Andross_AndDoor_Update(AndDoor* this) {
this->info.hitbox[17] = -130.0f - (this->unk_44 * 1.6f);
this->info.hitbox[27] = -130.0f - (this->unk_44 * 1.6f);
this->unk_44 += 2;
if (this->unk_44 >= Animation_GetFrameCount(&D_VE2_6014658)) {
this->unk_44 = Animation_GetFrameCount(&D_VE2_6014658) - 1;
if (this->unk_44 >= Animation_GetFrameCount(&aVe2AndrossGateAnim)) {
this->unk_44 = Animation_GetFrameCount(&aVe2AndrossGateAnim) - 1;
}
break;
}
@@ -3679,8 +3680,8 @@ bool Andross_801934EC(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void*
void Andross_AndDoor_Draw(AndDoor* this) {
Vec3f frameTable[20];
Animation_GetFrameData(&D_VE2_6014658, this->unk_44, frameTable);
Animation_DrawSkeleton(1, D_VE2_6014844, frameTable, Andross_801934EC, NULL, NULL, &gIdentityMatrix);
Animation_GetFrameData(&aVe2AndrossGateAnim, this->unk_44, frameTable);
Animation_DrawSkeleton(1, aVe2AndrossGateSkel, frameTable, Andross_801934EC, NULL, NULL, &gIdentityMatrix);
}
void Andross_AndPassage_Update(AndPassage* this) {
@@ -3701,11 +3702,11 @@ bool Andross_801935B4(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void*
void Andross_AndPassage_Draw(AndPassage* this) {
Vec3f frameTable[20];
Animation_GetFrameData(&D_VE2_6014658, this->unk_44, frameTable);
Animation_GetFrameData(&aVe2AndrossGateAnim, this->unk_44, frameTable);
if (gLevelMode == LEVELMODE_ALL_RANGE) {
gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK);
}
Animation_DrawSkeleton(1, D_VE2_6014844, frameTable, Andross_801935B4, NULL, NULL, &gIdentityMatrix);
Animation_DrawSkeleton(1, aVe2AndrossGateSkel, frameTable, Andross_801935B4, NULL, NULL, &gIdentityMatrix);
}
void Andross_AndPassage_Setup(AndPassage* this, f32 xPos, f32 yPos, f32 zPos, s32 arg4) {
@@ -3791,7 +3792,7 @@ void Andross_801939A0(s32 actorIndex) {
}
if (actorIndex == 1) {
actor->state = 1;
actor->unk_046 = 255;
actor->work_046 = 255;
actor->animFrame = 1000;
}
@@ -4442,9 +4443,9 @@ void Andross_80195E44(ActorCutscene* this) {
case 2:
Math_SmoothStepToF(&this->rot_0F4.x, 180.0f, 0.1f, 1.0f, 0.0f);
Math_SmoothStepToF(&this->rot_0F4.y, 200.0f, 0.1f, 1.0f, 0.0f);
this->unk_046 -= 5;
if (this->unk_046 < 0) {
this->unk_046 = 0;
this->work_046 -= 5;
if (this->work_046 < 0) {
this->work_046 = 0;
Object_Kill(&this->obj, this->sfxSource);
}
break;
+41 -41
View File
@@ -49,7 +49,7 @@ void SectorY_80197B30(ActorCutscene* this, s32 timer) {
this->obj.rot.z = gPlayer[0].rot.z;
this->state = 5;
this->timer_04C = timer;
this->work_04C = timer;
this->iwork[11] = 1;
Object_SetInfo(&this->info, this->obj.id);
AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4);
@@ -625,8 +625,8 @@ void SectorY_80199438(SyShogun* this) {
if (this->index != 0) {
Object_Kill(&gActors[D_ctx_80177A10[9]].obj, gActors[D_ctx_80177A10[9]].sfxSource);
if ((gBosses[1].obj.status == OBJ_FREE) || (gBosses[2].obj.status == OBJ_FREE)) {
gBosses[0].unk_04A = 1;
gScenery360[0].info.dList = D_SY_601F3D0;
gBosses[0].work_04A = 1;
gScenery360[0].info.dList = aSySaruzinDL;
gScenery360[0].info.drawType = 0;
} else {
gPlayer[0].state_1C8 = PLAYERSTATE_1C8_ACTIVE;
@@ -1002,15 +1002,15 @@ void SectorY_8019AEC0(SyShogun* this) {
this->vel.x = 0.0f;
this->vel.y = 0.0f;
this->vel.z = 0.0f;
this->unk_044 = 0;
this->work_044 = 0;
}
void SectorY_8019AEEC(SyShogun* this) {
if ((this->obj.pos.y != 365.0f) && (this->swork[21] != 1)) {
if (this->unk_04A != 0) {
if (this->unk_04A == 1) {
if (this->work_04A != 0) {
if (this->work_04A == 1) {
Audio_PlaySequence(SEQ_PLAYER_BGM, NA_BGM_REAL_BOSS, 0, 0);
this->unk_04A++;
this->work_04A++;
gPlayer[0].cam.eye.x = 0.0f;
gPlayer[0].cam.eye.y = 200.0f;
gPlayer[0].cam.eye.z = -20000.0f;
@@ -1696,7 +1696,7 @@ void SectorY_SyShogun_Update(SyShogun* this) {
if ((gBossFrameCount >= 350) || (this->swork[34] != 0)) {
if (this->swork[34] != 0) {
gBossHealthBar = this->health * 1.7f;
} else if (gBosses[0].unk_04A == 0) {
} else if (gBosses[0].work_04A == 0) {
gBossHealthBar = (gBosses[1].health + gBosses[2].health) * 1.275f;
}
}
@@ -2027,9 +2027,9 @@ void SectorY_8019EB80(void) {
s32 actorCount;
if (gHitCount >= 100) {
actorCount = 9;
actorCount = 9; // Teammates + Cornerian ships
} else {
actorCount = 2;
actorCount = 2; // Teammates only
}
Rand_SetSeed(1, 29100, 9786);
@@ -2437,8 +2437,8 @@ void SectorY_8019FF00(ActorCutscene* this) {
case 5:
Math_SmoothStepToF(&this->rot_0F4.x, 0.0f, 0.1f, 5.0f, 0.0f);
x = this->obj.pos.x - gBosses[this->timer_04C].obj.pos.x;
z = this->obj.pos.z - gBosses[this->timer_04C].obj.pos.z;
x = this->obj.pos.x - gBosses[this->work_04C].obj.pos.x;
z = this->obj.pos.z - gBosses[this->work_04C].obj.pos.z;
Math_SmoothStepToAngle(
&this->rot_0F4.z,
Math_SmoothStepToAngle(&this->rot_0F4.y, Math_RadToDeg(Math_Atan2F(x, z)), 0.5f, 2.0f, 0.0001f) * 30.0f,
@@ -3496,74 +3496,74 @@ void SectorY_SyRobot_Update(SyRobot* this) {
this->iwork[18]--;
}
if ((this->unk_048 != 0) && (this->unk_046 != 3)) {
switch (this->unk_048) {
if ((this->work_048 != 0) && (this->work_046 != 3)) {
switch (this->work_048) {
case 1:
this->unk_046 = 1;
this->work_046 = 1;
this->timer_0BE = 50;
this->iwork[19] = 0;
break;
case 2:
this->unk_046 = 1;
this->work_046 = 1;
this->timer_0BE = 20;
this->iwork[19] = 0;
break;
case 3:
this->unk_046 = 2;
this->work_046 = 2;
this->animFrame = 0;
break;
case 4:
this->unk_046 = 0;
this->work_046 = 0;
this->animFrame = 0;
break;
case 8:
this->unk_046 = 1;
this->work_046 = 1;
this->timer_0BE = 50;
this->iwork[19] = 1;
break;
case 9:
this->unk_046 = 1;
this->work_046 = 1;
this->timer_0BE = 20;
this->iwork[19] = 1;
break;
case 10:
this->unk_046 = 1;
this->work_046 = 1;
this->timer_0BE = 50;
this->iwork[19] = -1;
break;
case 11:
this->unk_046 = 1;
this->work_046 = 1;
this->timer_0BE = 20;
this->iwork[19] = -1;
break;
case 6:
this->unk_046 = 4;
this->work_046 = 4;
this->animFrame = 0;
break;
case 5:
this->unk_046 = 5;
this->work_046 = 5;
this->animFrame = Animation_GetFrameCount(&D_SY_602B778) - 1;
break;
case 7:
this->unk_046 = 6;
this->work_046 = 6;
this->animFrame = Animation_GetFrameCount(&D_SY_602B778) - 1;
break;
}
this->unk_048 = 0;
this->work_048 = 0;
this->fwork[15] = 0.0f;
}
switch (this->unk_046) {
switch (this->work_046) {
case 0:
i = this->iwork[17];
if (i != 0) {
@@ -3612,12 +3612,12 @@ void SectorY_SyRobot_Update(SyRobot* this) {
gPlayer[0].pos.y = sp1E0;
AUDIO_PLAY_SFX(NA_SE_EN_MS_SHOT_S, this->sfxSource, 4);
}
this->unk_048 = 0;
this->work_048 = 0;
}
if (this->timer_0BE == 0) {
this->animFrame = 0;
this->unk_046 = 0;
this->work_046 = 0;
this->fwork[15] = 0.0f;
}
break;
@@ -3632,7 +3632,7 @@ void SectorY_SyRobot_Update(SyRobot* this) {
case 4:
this->animFrame++;
if (this->animFrame >= (Animation_GetFrameCount(&D_SY_602B778) - 1)) {
this->unk_046 = 0;
this->work_046 = 0;
this->iwork[17] = 0;
this->fwork[15] = 0.0f;
}
@@ -3644,12 +3644,12 @@ void SectorY_SyRobot_Update(SyRobot* this) {
this->animFrame--;
if (this->animFrame < 8) {
this->fwork[15] = 0.1f;
if (this->unk_046 == 5) {
if (this->work_046 == 5) {
this->iwork[17] = 1;
} else {
this->iwork[17] = 2;
}
this->unk_046 = 0;
this->work_046 = 0;
}
sp4C = Animation_GetFrameData(&D_SY_602B778, this->animFrame, sp68);
break;
@@ -3686,7 +3686,7 @@ void SectorY_SyRobot_Update(SyRobot* this) {
break;
}
if ((this->unk_046 == 1) || (this->unk_046 == 2)) {
if ((this->work_046 == 1) || (this->work_046 == 2)) {
Matrix_RotateZ(gCalcMatrix, -this->vwork[29].z * M_DTOR, MTXF_NEW);
Matrix_RotateX(gCalcMatrix, -this->vwork[29].x * M_DTOR, MTXF_APPLY);
Matrix_RotateY(gCalcMatrix, -this->vwork[29].y * M_DTOR, MTXF_APPLY);
@@ -3740,7 +3740,7 @@ void SectorY_SyRobot_Update(SyRobot* this) {
Math_SmoothStepToAngle(&this->fwork[29], sp1D8, 0.2f, 5.0f, 0.0f);
Math_SmoothStepToVec3fArray(sp68, this->vwork, 1, sp4C, this->fwork[15], 100.0f, 0.0f);
if ((this->unk_046 == 6) || (this->unk_046 == 5)) {
if ((this->work_046 == 6) || (this->work_046 == 5)) {
Math_SmoothStepToF(&this->fwork[15], 0.3f, 1.0f, 0.05f, 0.0f);
} else {
Math_SmoothStepToF(&this->fwork[15], 0.2f, 1.0f, 0.015f, 0.0f);
@@ -3754,23 +3754,23 @@ void SectorY_SyRobot_Update(SyRobot* this) {
}
this->info.hitbox = SEGMENTED_TO_VIRTUAL(aSyRobotHitbox);
if (this->unk_046 == 1) {
if (this->work_046 == 1) {
this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SY_603421C);
}
i = this->iwork[17];
if (i != 0) {
if (i == 1) {
this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SY_6034124);
this->info.hitbox = SEGMENTED_TO_VIRTUAL(aSyRobot4Hitbox);
} else if (i == 2) {
this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SY_60341A8);
}
}
if (this->unk_046 == 2) {
if (this->work_046 == 2) {
this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SY_60340C0);
}
if ((this->dmgType != DMG_NONE) && (this->unk_046 != 3)) {
if ((this->dmgType != DMG_NONE) && (this->work_046 != 3)) {
if (this->dmgType == DMG_EXPLOSION) {
this->dmgPart = 1;
@@ -3788,8 +3788,8 @@ void SectorY_SyRobot_Update(SyRobot* this) {
this->health -= this->damage;
if (this->health <= 0) {
this->unk_046 = 3;
this->unk_048 = 0;
this->work_046 = 3;
this->work_048 = 0;
this->animFrame = 0;
this->timer_0BE = 50;
this->fwork[15] = 0.0f;
@@ -3828,7 +3828,7 @@ bool SectorY_SyRobot_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Ve
if (limbIndex == 17) {
rot->x += actor->fwork[28];
rot->y -= actor->fwork[29];
if (actor->eventType == EVID_48) {
if (actor->eventType == EVID_SY_ROBOT_1) {
*dList = D_SY_6014BD0;
}
}
+1 -1
View File
@@ -6254,7 +6254,7 @@ void Map_801AC530(s32 index) {
Lights_SetOneLight(&gMasterDisp, dirX, dirY, dirZ, 50, 50, 40, 0, 0, 0);
gSPDisplayList(gMasterDisp++, D_MAP_604A9F0);
gSPDisplayList(gMasterDisp++, aMapArwingDL);
Matrix_Pop(&gGfxMatrix);
}
+283 -283
View File
@@ -93,12 +93,12 @@ f32 D_menu_801B921C;
f32 D_menu_801B9220;
f32 D_menu_801B9224;
f32 D_menu_801B9228;
s32 D_menu_801B922C;
s32 D_menu_801B9230;
s32 D_menu_801B9234;
s32 D_menu_801B9238;
s32 D_menu_801B923C;
s32 D_menu_801B9240;
s32 sArwingLightColR; // colR
s32 sArwingLightColG; // colG
s32 sArwingLightColB; // colB
s32 sArwingLightAmbR; // ambR
s32 sArwingLightAmbG; // ambG
s32 sArwingLightAmbB; // ambB
s32 D_menu_801B9244;
s32 D_menu_801B9248;
u8 D_menu_801B924C;
@@ -113,7 +113,7 @@ UnkStruct_D_menu_801B9250 D_menu_801B9290;
f32 D_menu_801B9298[32];
s32 spectrumAnalyzerMode;
s32 D_menu_801B931C;
bool D_menu_801B9320; // MusicPlaying status in the expert sound options
bool sMusicPlaying; // MusicPlaying status in the expert sound options
extern s32 BSS_PAD_0;
s32 D_menu_801B9330[2];
s32 D_menu_801B933C;
@@ -156,11 +156,11 @@ struct BssPad1 {
// struct BssPad4 {int x;};
extern s32 BSS_PAD_2;
static f32 sOptionCardPosY[] = { 60.0f, 36.0f, 12.0f, -12.0f, -36.0f, -60.0f }; // D_menu_801AE570
static f32 sOptionCardTextPosX[] = { 124.0f, 118.0f, 145.0f, 125.0f, 133.0f, 118.0f }; // D_menu_801AE588
static f32 sOptionCardTextPosY[] = { 54.0f, 78.0f, 103.0f, 126.0f, 151.0f, 175.0f }; // D_menu_801AE5A0
static f32 sOptionCardCurTextPosX[] = { 124.0f, 118.0f, 145.0f, 125.0f, 133.0f, 118.0f }; // D_menu_801AE5B8
static f32 sOptionCardCurTextPosY[] = { 54.0f, 78.0f, 103.0f, 126.0f, 151.0f, 175.0f }; // D_menu_801AE5D0
static f32 sOptionCardPosY[] = { 60.0f, 36.0f, 12.0f, -12.0f, -36.0f, -60.0f };
static f32 sOptionCardTextPosX[] = { 124.0f, 118.0f, 145.0f, 125.0f, 133.0f, 118.0f };
static f32 sOptionCardTextPosY[] = { 54.0f, 78.0f, 103.0f, 126.0f, 151.0f, 175.0f };
static f32 sOptionCardCurTextPosX[] = { 124.0f, 118.0f, 145.0f, 125.0f, 133.0f, 118.0f };
static f32 sOptionCardCurTextPosY[] = { 54.0f, 78.0f, 103.0f, 126.0f, 151.0f, 175.0f };
static f32 D_menu_801AE5E8[] = { 124.0f, 125.0f };
static f32 D_menu_801AE5F0[] = { 54.0f, 55.0f };
static f32 D_menu_801AE5F8[] = { 133.0f, 125.0f };
@@ -376,12 +376,12 @@ void Option_Setup(void) {
#endif
gVIsPerFrame = 2;
sOptionCardList[0].unk_00.unk_08 = D_OPT_8003B50;
sOptionCardList[0].unk_00.unk_10 = 72;
sOptionCardList[0].unk_00.unk_14 = 12;
sOptionCardList[4].unk_00.unk_08 = D_OPT_80046B0;
sOptionCardList[4].unk_00.unk_10 = 64;
sOptionCardList[4].unk_00.unk_14 = 10;
sOptionCardList[0].unk_00.texture = D_OPT_8003B50;
sOptionCardList[0].unk_00.width = 72;
sOptionCardList[0].unk_00.height = 12;
sOptionCardList[4].unk_00.texture = D_OPT_80046B0;
sOptionCardList[4].unk_00.width = 64;
sOptionCardList[4].unk_00.height = 10;
for (i = 0; i < OPTION_COUNT; i++) {
sOptionCardCurTextPosX[i] = sOptionCardTextPosX[i];
@@ -474,30 +474,30 @@ void Option_Setup(void) {
if (i == 2) {
continue;
}
sOptionCardList[i].unk_38.unk_0C = 0.01f;
sOptionCardList[i].unk_38.unk_10 = 0.21f;
sOptionCardList[i].unk_38.unk_04 = sOptionCardPosY[i];
sOptionCardList[i].unk_38.unk_00 = 0.0f;
sOptionCardList[i].unk_38.unk_08 = 0.0f;
sOptionCardList[i].unk_5C = 0;
sOptionCardList[i].unk_38.xScale = 0.01f;
sOptionCardList[i].unk_38.yScale = 0.21f;
sOptionCardList[i].unk_38.y = sOptionCardPosY[i];
sOptionCardList[i].unk_38.x = 0.0f;
sOptionCardList[i].unk_38.z = 0.0f;
sOptionCardList[i].unk_5C = false;
sOptionCardList[i].unk_00.unk_20 = 0.01f;
sOptionCardList[i].unk_00.unk_24 = 1.0f;
sOptionCardList[i].unk_00.unk_18 = 158.0f;
sOptionCardList[i].unk_00.unk_1C = sOptionCardCurTextPosY[i];
sOptionCardList[i].unk_58 = 0;
sOptionCardList[i].unk_00.xScale = 0.01f;
sOptionCardList[i].unk_00.yScale = 1.0f;
sOptionCardList[i].unk_00.xPos = 158.0f;
sOptionCardList[i].unk_00.yPos = sOptionCardCurTextPosY[i];
sOptionCardList[i].unk_58 = false;
}
sOptionCardList[2].unk_38.unk_00 = 0.0f;
sOptionCardList[2].unk_38.unk_08 = 0.0f;
sOptionCardList[2].unk_38.unk_04 = 90.0f;
sOptionCardList[2].unk_38.unk_0C = 0.4f;
sOptionCardList[2].unk_38.unk_10 = 0.21f;
sOptionCardList[2].unk_5C = 1;
sOptionCardList[2].unk_00.unk_20 = 1.0f;
sOptionCardList[2].unk_00.unk_24 = 1.0f;
sOptionCardList[2].unk_00.unk_18 = 145.0f;
sOptionCardList[2].unk_00.unk_1C = 25.0f;
sOptionCardList[2].unk_58 = 1;
sOptionCardList[2].unk_38.x = 0.0f;
sOptionCardList[2].unk_38.z = 0.0f;
sOptionCardList[2].unk_38.y = 90.0f;
sOptionCardList[2].unk_38.xScale = 0.4f;
sOptionCardList[2].unk_38.yScale = 0.21f;
sOptionCardList[2].unk_5C = true;
sOptionCardList[2].unk_00.xScale = 1.0f;
sOptionCardList[2].unk_00.yScale = 1.0f;
sOptionCardList[2].unk_00.xPos = 145.0f;
sOptionCardList[2].unk_00.yPos = 25.0f;
sOptionCardList[2].unk_58 = true;
D_menu_801B9124 = OPTION_VERSUS;
} else {
@@ -527,12 +527,12 @@ void Option_Setup(void) {
D_menu_801B9224 = -80.0f;
D_menu_801B9228 = 0.0f;
D_menu_801B922C = 225;
D_menu_801B9230 = 225;
D_menu_801B9234 = 225;
D_menu_801B9238 = 30;
D_menu_801B923C = 30;
D_menu_801B9240 = 30;
sArwingLightColR = 225;
sArwingLightColG = 225;
sArwingLightColB = 225;
sArwingLightAmbR = 30;
sArwingLightAmbG = 30;
sArwingLightAmbB = 30;
D_menu_801B91F8 = 0.1f;
D_menu_801B91F4 = -130.0f;
@@ -826,26 +826,26 @@ void Option_801929F0(void) {
if (D_menu_801B9244 == 0) {
D_menu_801B91BC = 1;
for (i = 0; i < OPTION_COUNT; i++) {
sOptionCardList[i].unk_00.unk_18 = sOptionCardCurTextPosX[i];
sOptionCardList[i].unk_00.unk_1C = sOptionCardCurTextPosY[i];
sOptionCardList[i].unk_00.unk_20 = 1.0f;
sOptionCardList[i].unk_00.unk_24 = 1.0f;
sOptionCardList[i].unk_58 = 1;
sOptionCardList[i].unk_00.xPos = sOptionCardCurTextPosX[i];
sOptionCardList[i].unk_00.yPos = sOptionCardCurTextPosY[i];
sOptionCardList[i].unk_00.xScale = 1.0f;
sOptionCardList[i].unk_00.yScale = 1.0f;
sOptionCardList[i].unk_58 = true;
sOptionCardList[i].unk_38.unk_0C = 0.4f;
sOptionCardList[i].unk_38.unk_10 = 0.21f;
sOptionCardList[i].unk_38.unk_04 = sOptionCardPosY[i];
sOptionCardList[i].unk_38.unk_08 = 0.0f;
sOptionCardList[i].unk_5C = 1;
sOptionCardList[i].unk_38.xScale = 0.4f;
sOptionCardList[i].unk_38.yScale = 0.21f;
sOptionCardList[i].unk_38.y = sOptionCardPosY[i];
sOptionCardList[i].unk_38.z = 0.0f;
sOptionCardList[i].unk_5C = true;
}
} else {
D_menu_801B91BC = 0;
for (i = 0; i < OPTION_COUNT; i++) {
sOptionCardList[i].unk_00.unk_24 = 1.0f;
sOptionCardList[i].unk_38.unk_10 = 0.21f;
sOptionCardList[i].unk_38.unk_08 = 0.0f;
sOptionCardList[i].unk_5C = 1;
sOptionCardList[i].unk_58 = 1;
sOptionCardList[i].unk_00.yScale = 1.0f;
sOptionCardList[i].unk_38.yScale = 0.21f;
sOptionCardList[i].unk_38.z = 0.0f;
sOptionCardList[i].unk_5C = true;
sOptionCardList[i].unk_58 = true;
}
}
@@ -881,32 +881,32 @@ void Option_MainMenuUpdate(void) {
case 1000:
for (i = 0; i < OPTION_COUNT; i++) {
if (sOptionCardList[i].unk_38.unk_0C < 0.4f) {
sOptionCardList[i].unk_38.unk_0C += 0.04f;
if (sOptionCardList[i].unk_38.unk_0C > 0.4f) {
sOptionCardList[i].unk_38.unk_0C = 0.4f;
if (sOptionCardList[i].unk_38.xScale < 0.4f) {
sOptionCardList[i].unk_38.xScale += 0.04f;
if (sOptionCardList[i].unk_38.xScale > 0.4f) {
sOptionCardList[i].unk_38.xScale = 0.4f;
}
}
if (sOptionCardList[i].unk_00.unk_20 < 1.0f) {
sOptionCardList[i].unk_00.unk_20 += 0.1f;
if (sOptionCardList[i].unk_00.unk_20 > 1.0f) {
sOptionCardList[i].unk_00.unk_20 = 1.0f;
if (sOptionCardList[i].unk_00.xScale < 1.0f) {
sOptionCardList[i].unk_00.xScale += 0.1f;
if (sOptionCardList[i].unk_00.xScale > 1.0f) {
sOptionCardList[i].unk_00.xScale = 1.0f;
}
}
Math_SmoothStepToF(&sOptionCardList[i].unk_00.unk_1C, sOptionCardCurTextPosY[i], 0.15f, 100.0f, 0.1f);
Math_SmoothStepToF(&sOptionCardList[i].unk_38.unk_04, sOptionCardPosY[i], 0.15f, 100.0f, 0.1f);
Math_SmoothStepToF(&sOptionCardList[i].unk_00.unk_18, sOptionCardCurTextPosX[i], 0.2f,
D_menu_801AE620[i], 0.1f);
Math_SmoothStepToF(&sOptionCardList[i].unk_00.yPos, sOptionCardCurTextPosY[i], 0.15f, 100.0f, 0.1f);
Math_SmoothStepToF(&sOptionCardList[i].unk_38.y, sOptionCardPosY[i], 0.15f, 100.0f, 0.1f);
Math_SmoothStepToF(&sOptionCardList[i].unk_00.xPos, sOptionCardCurTextPosX[i], 0.2f, D_menu_801AE620[i],
0.1f);
}
gBlurAlpha += 4;
if (sOptionCardList[D_menu_801B91A4].unk_38.unk_04 == sOptionCardPosY[D_menu_801B91A4]) {
if (sOptionCardList[D_menu_801B91A4].unk_38.y == sOptionCardPosY[D_menu_801B91A4]) {
for (i = 0; i < OPTION_COUNT; i++) {
sOptionCardList[i].unk_00.unk_20 = 1.0f;
sOptionCardList[i].unk_00.unk_18 = sOptionCardCurTextPosX[i];
sOptionCardList[i].unk_00.unk_1C = sOptionCardCurTextPosY[i];
sOptionCardList[i].unk_00.xScale = 1.0f;
sOptionCardList[i].unk_00.xPos = sOptionCardCurTextPosX[i];
sOptionCardList[i].unk_00.yPos = sOptionCardCurTextPosY[i];
}
D_menu_801B91BC = 1;
gBlurAlpha = 255;
@@ -925,17 +925,17 @@ void Option_MainMenuUpdate(void) {
Option_8019C418(&D_menu_801B91B0, 1, 0, 0, 20, 5, 4, gMainController, &D_menu_801B9190)) {
AUDIO_PLAY_SFX(NA_SE_ARWING_CURSOR, gDefaultSfxSource, 4);
if (D_menu_801B91B0) {
sOptionCardList[0].unk_00.unk_08 = D_OPT_8004C50;
sOptionCardList[0].unk_00.unk_10 = 80;
sOptionCardList[0].unk_00.unk_14 = 12;
sOptionCardList[0].unk_00.unk_18 = 125.0f;
sOptionCardList[0].unk_00.unk_1C = 55.0f;
sOptionCardList[0].unk_00.texture = D_OPT_8004C50;
sOptionCardList[0].unk_00.width = 80;
sOptionCardList[0].unk_00.height = 12;
sOptionCardList[0].unk_00.xPos = 125.0f;
sOptionCardList[0].unk_00.yPos = 55.0f;
} else {
sOptionCardList[0].unk_00.unk_08 = D_OPT_8003B50;
sOptionCardList[0].unk_00.unk_10 = 72;
sOptionCardList[0].unk_00.unk_14 = 12;
sOptionCardList[0].unk_00.unk_18 = 124.0f;
sOptionCardList[0].unk_00.unk_1C = 54.0f;
sOptionCardList[0].unk_00.texture = D_OPT_8003B50;
sOptionCardList[0].unk_00.width = 72;
sOptionCardList[0].unk_00.height = 12;
sOptionCardList[0].unk_00.xPos = 124.0f;
sOptionCardList[0].unk_00.yPos = 54.0f;
}
gExpertMode = D_menu_801B91B0;
}
@@ -944,17 +944,17 @@ void Option_MainMenuUpdate(void) {
Option_8019C418(&D_menu_801B91AC, 1, 0, 0, 20, 5, 4, gMainController, &D_menu_801B9198)) {
AUDIO_PLAY_SFX(NA_SE_ARWING_CURSOR, gDefaultSfxSource, 4);
if (D_menu_801B91AC) {
sOptionCardList[4].unk_00.unk_08 = D_OPT_8004C50;
sOptionCardList[4].unk_00.unk_10 = 80;
sOptionCardList[4].unk_00.unk_14 = 12;
sOptionCardList[4].unk_00.unk_18 = 125.0f;
sOptionCardList[4].unk_00.unk_1C = 151.0f;
sOptionCardList[4].unk_00.texture = D_OPT_8004C50;
sOptionCardList[4].unk_00.width = 80;
sOptionCardList[4].unk_00.height = 12;
sOptionCardList[4].unk_00.xPos = 125.0f;
sOptionCardList[4].unk_00.yPos = 151.0f;
} else {
sOptionCardList[4].unk_00.unk_08 = D_OPT_80046B0;
sOptionCardList[4].unk_00.unk_10 = 64;
sOptionCardList[4].unk_00.unk_14 = 10;
sOptionCardList[4].unk_00.unk_18 = 133.0f;
sOptionCardList[4].unk_00.unk_1C = 151.0f;
sOptionCardList[4].unk_00.texture = D_OPT_80046B0;
sOptionCardList[4].unk_00.width = 64;
sOptionCardList[4].unk_00.height = 10;
sOptionCardList[4].unk_00.xPos = 133.0f;
sOptionCardList[4].unk_00.yPos = 151.0f;
}
}
@@ -975,22 +975,22 @@ void Option_MainMenuUpdate(void) {
case 11:
gBlurAlpha = 16;
D_menu_801B9178 = 3;
sOptionCardList[D_menu_801B91A4].unk_38.unk_0C -= 0.01f;
sOptionCardList[D_menu_801B91A4].unk_38.unk_10 -= 0.01f;
sOptionCardList[D_menu_801B91A4].unk_00.unk_20 -= 0.1f;
sOptionCardList[D_menu_801B91A4].unk_00.unk_24 -= 0.1f;
sOptionCardList[D_menu_801B91A4].unk_00.unk_18 += 4.0f;
sOptionCardList[D_menu_801B91A4].unk_38.xScale -= 0.01f;
sOptionCardList[D_menu_801B91A4].unk_38.yScale -= 0.01f;
sOptionCardList[D_menu_801B91A4].unk_00.xScale -= 0.1f;
sOptionCardList[D_menu_801B91A4].unk_00.yScale -= 0.1f;
sOptionCardList[D_menu_801B91A4].unk_00.xPos += 4.0f;
D_menu_801B917C = 3;
D_menu_801B912C++;
break;
case 12:
if (D_menu_801B9178 == 1) {
sOptionCardList[D_menu_801B91A4].unk_38.unk_0C += 0.01f;
sOptionCardList[D_menu_801B91A4].unk_38.unk_10 += 0.01f;
sOptionCardList[D_menu_801B91A4].unk_00.unk_20 += 0.1f;
sOptionCardList[D_menu_801B91A4].unk_00.unk_24 += 0.1f;
sOptionCardList[D_menu_801B91A4].unk_00.unk_18 -= 4.0f;
sOptionCardList[D_menu_801B91A4].unk_38.xScale += 0.01f;
sOptionCardList[D_menu_801B91A4].unk_38.yScale += 0.01f;
sOptionCardList[D_menu_801B91A4].unk_00.xScale += 0.1f;
sOptionCardList[D_menu_801B91A4].unk_00.yScale += 0.1f;
sOptionCardList[D_menu_801B91A4].unk_00.xPos -= 4.0f;
D_menu_801B9214 = 1;
}
@@ -999,13 +999,13 @@ void Option_MainMenuUpdate(void) {
continue;
}
if (sOptionCardList[i].unk_38.unk_0C > 0.01f) {
sOptionCardList[i].unk_38.unk_0C -= 0.05f;
sOptionCardList[i].unk_00.unk_20 -= 0.19f;
Math_SmoothStepToF(&sOptionCardList[i].unk_00.unk_18, 158.0f, 0.2f, D_menu_801AE608[i], 0.1f);
if (sOptionCardList[i].unk_38.xScale > 0.01f) {
sOptionCardList[i].unk_38.xScale -= 0.05f;
sOptionCardList[i].unk_00.xScale -= 0.19f;
Math_SmoothStepToF(&sOptionCardList[i].unk_00.xPos, 158.0f, 0.2f, D_menu_801AE608[i], 0.1f);
} else {
sOptionCardList[i].unk_5C = 0;
sOptionCardList[i].unk_58 = 0;
sOptionCardList[i].unk_5C = false;
sOptionCardList[i].unk_58 = false;
}
}
@@ -1018,13 +1018,13 @@ void Option_MainMenuUpdate(void) {
var_fs1 = 120.0f;
}
Math_SmoothStepToF(&sOptionCardList[D_menu_801B91A4].unk_00.unk_1C, var_fs0, 0.25f, 100.0f, 0.1f);
Math_SmoothStepToF(&sOptionCardList[D_menu_801B91A4].unk_38.unk_04, var_fs1, 0.25f, 100.0f, 0.1f);
Math_SmoothStepToF(&sOptionCardList[D_menu_801B91A4].unk_00.yPos, var_fs0, 0.25f, 100.0f, 0.1f);
Math_SmoothStepToF(&sOptionCardList[D_menu_801B91A4].unk_38.y, var_fs1, 0.25f, 100.0f, 0.1f);
gBlurAlpha += 4;
if ((sOptionCardList[D_menu_801B91A4].unk_00.unk_1C == var_fs0) &&
(sOptionCardList[D_menu_801B91A4].unk_38.unk_04 == var_fs1)) {
if ((sOptionCardList[D_menu_801B91A4].unk_00.yPos == var_fs0) &&
(sOptionCardList[D_menu_801B91A4].unk_38.y == var_fs1)) {
gBlurAlpha += 255;
D_menu_801B9124 = D_menu_801B91A4;
@@ -1070,7 +1070,7 @@ void Option_MainMenuDraw(void) {
Matrix_Pop(&gGfxMatrix);
for (i = 0; i < OPTION_COUNT; i++) {
if (!(sOptionCardList[i].unk_58) || (sOptionCardList[i].unk_00.unk_20) <= 0.0f) {
if (!(sOptionCardList[i].unk_58) || (sOptionCardList[i].unk_00.xScale) <= 0.0f) {
continue;
}
if ((i == 0) && D_menu_801B91C8 && ((D_menu_801B912C == 0) || (D_menu_801B912C == 1))) {
@@ -1096,26 +1096,26 @@ void Option_80193B04(void) {
D_menu_801B91BC = 1;
for (i = 0; i < 3; i++) {
sOptionVSCardList[i].unk_00.unk_18 = D_menu_801AEF90[i];
sOptionVSCardList[i].unk_00.unk_1C = D_menu_801AEF9C[i];
sOptionVSCardList[i].unk_00.unk_20 = 1.0f;
sOptionVSCardList[i].unk_00.unk_24 = 1.0f;
sOptionVSCardList[i].unk_58 = 1;
sOptionVSCardList[i].unk_38.unk_0C = 0.4f;
sOptionVSCardList[i].unk_38.unk_10 = 0.21f;
sOptionVSCardList[i].unk_38.unk_04 = D_menu_801AEF84[i];
sOptionVSCardList[i].unk_38.unk_08 = 0.0f;
sOptionVSCardList[i].unk_5C = 1;
sOptionVSCardList[i].unk_00.xPos = D_menu_801AEF90[i];
sOptionVSCardList[i].unk_00.yPos = D_menu_801AEF9C[i];
sOptionVSCardList[i].unk_00.xScale = 1.0f;
sOptionVSCardList[i].unk_00.yScale = 1.0f;
sOptionVSCardList[i].unk_58 = true;
sOptionVSCardList[i].unk_38.xScale = 0.4f;
sOptionVSCardList[i].unk_38.yScale = 0.21f;
sOptionVSCardList[i].unk_38.y = D_menu_801AEF84[i];
sOptionVSCardList[i].unk_38.z = 0.0f;
sOptionVSCardList[i].unk_5C = true;
}
} else {
D_menu_801B91BC = 0;
for (i = 0; i < 3; i++) {
sOptionVSCardList[i].unk_00.unk_24 = 1.0f;
sOptionVSCardList[i].unk_38.unk_10 = 0.21f;
sOptionVSCardList[i].unk_38.unk_08 = 0.0f;
sOptionVSCardList[i].unk_58 = 1;
sOptionVSCardList[i].unk_5C = 1;
sOptionVSCardList[i].unk_00.yScale = 1.0f;
sOptionVSCardList[i].unk_38.yScale = 0.21f;
sOptionVSCardList[i].unk_38.z = 0.0f;
sOptionVSCardList[i].unk_58 = true;
sOptionVSCardList[i].unk_5C = true;
}
}
@@ -1141,39 +1141,39 @@ void Option_VersusUpdate(void) {
case 1000:
for (i = 0; i < 3; i++) {
if (sOptionVSCardList[i].unk_38.unk_0C < 0.4f) {
sOptionVSCardList[i].unk_38.unk_0C += 0.04f;
if (sOptionVSCardList[i].unk_38.unk_0C > 0.4f) {
sOptionVSCardList[i].unk_38.unk_0C = 0.4f;
if (sOptionVSCardList[i].unk_38.xScale < 0.4f) {
sOptionVSCardList[i].unk_38.xScale += 0.04f;
if (sOptionVSCardList[i].unk_38.xScale > 0.4f) {
sOptionVSCardList[i].unk_38.xScale = 0.4f;
}
}
if (sOptionVSCardList[i].unk_00.unk_20 < 1.0f) {
sOptionVSCardList[i].unk_00.unk_20 += 0.15f;
if (sOptionVSCardList[i].unk_00.unk_20 > 1.0f) {
sOptionVSCardList[i].unk_00.unk_20 = 1.0f;
if (sOptionVSCardList[i].unk_00.xScale < 1.0f) {
sOptionVSCardList[i].unk_00.xScale += 0.15f;
if (sOptionVSCardList[i].unk_00.xScale > 1.0f) {
sOptionVSCardList[i].unk_00.xScale = 1.0f;
}
}
Math_SmoothStepToF(&sOptionVSCardList[i].unk_38.unk_04, D_menu_801AEF84[i], 0.15f, 100.0f, 0.1f);
Math_SmoothStepToF(&sOptionVSCardList[i].unk_00.unk_18, D_menu_801AEF90[i], 0.2f, 3.1f, 0.1f);
Math_SmoothStepToF(&sOptionVSCardList[i].unk_00.unk_1C, D_menu_801AEF9C[i], 0.15f, 100.0f, 0.1f);
Math_SmoothStepToF(&sOptionVSCardList[i].unk_38.y, D_menu_801AEF84[i], 0.15f, 100.0f, 0.1f);
Math_SmoothStepToF(&sOptionVSCardList[i].unk_00.xPos, D_menu_801AEF90[i], 0.2f, 3.1f, 0.1f);
Math_SmoothStepToF(&sOptionVSCardList[i].unk_00.yPos, D_menu_801AEF9C[i], 0.15f, 100.0f, 0.1f);
}
Math_SmoothStepToF(&sOptionCardList[D_menu_801B91A4].unk_00.unk_1C, 25.0f, 0.25f, 100.0f, 0.1f);
Math_SmoothStepToF(&sOptionCardList[D_menu_801B91A4].unk_38.unk_04, 90.0f, 0.25f, 100.0f, 0.1f);
Math_SmoothStepToF(&sOptionCardList[D_menu_801B91A4].unk_00.yPos, 25.0f, 0.25f, 100.0f, 0.1f);
Math_SmoothStepToF(&sOptionCardList[D_menu_801B91A4].unk_38.y, 90.0f, 0.25f, 100.0f, 0.1f);
gBlurAlpha += 4;
if (sOptionVSCardList[D_menu_801B91A8].unk_38.unk_04 == D_menu_801AEF84[D_menu_801B91A8]) {
if (sOptionVSCardList[D_menu_801B91A8].unk_38.y == D_menu_801AEF84[D_menu_801B91A8]) {
for (i = 0; i < 3; i++) {
sOptionVSCardList[i].unk_00.unk_20 = 1.0f;
sOptionVSCardList[i].unk_00.unk_1C = D_menu_801AEF9C[i];
sOptionVSCardList[i].unk_00.unk_18 = D_menu_801AEF90[i];
sOptionVSCardList[i].unk_00.xScale = 1.0f;
sOptionVSCardList[i].unk_00.yPos = D_menu_801AEF9C[i];
sOptionVSCardList[i].unk_00.xPos = D_menu_801AEF90[i];
}
sOptionCardList[D_menu_801B91A4].unk_00.unk_1C = 25.0f;
sOptionCardList[D_menu_801B91A4].unk_38.unk_04 = 90.0f;
sOptionCardList[D_menu_801B91A4].unk_00.yPos = 25.0f;
sOptionCardList[D_menu_801B91A4].unk_38.y = 90.0f;
D_menu_801B91BC = 1;
gBlurAlpha = 255;
D_menu_801B912C = 1;
@@ -1206,22 +1206,22 @@ void Option_VersusUpdate(void) {
case 11:
gBlurAlpha = 16;
D_menu_801B9178 = 5;
sOptionVSCardList[D_menu_801B91A8].unk_38.unk_0C -= 0.01f;
sOptionVSCardList[D_menu_801B91A8].unk_38.unk_10 -= 0.01f;
sOptionVSCardList[D_menu_801B91A8].unk_00.unk_20 -= 0.1f;
sOptionVSCardList[D_menu_801B91A8].unk_00.unk_24 -= 0.1f;
sOptionVSCardList[D_menu_801B91A8].unk_00.unk_18 += 4.0f;
sOptionVSCardList[D_menu_801B91A8].unk_38.xScale -= 0.01f;
sOptionVSCardList[D_menu_801B91A8].unk_38.yScale -= 0.01f;
sOptionVSCardList[D_menu_801B91A8].unk_00.xScale -= 0.1f;
sOptionVSCardList[D_menu_801B91A8].unk_00.yScale -= 0.1f;
sOptionVSCardList[D_menu_801B91A8].unk_00.xPos += 4.0f;
D_menu_801B917C = 5;
D_menu_801B912C++;
break;
case 12:
if (D_menu_801B9178 == 1) {
sOptionVSCardList[D_menu_801B91A8].unk_38.unk_0C += 0.01f;
sOptionVSCardList[D_menu_801B91A8].unk_38.unk_10 += 0.01f;
sOptionVSCardList[D_menu_801B91A8].unk_00.unk_20 += 0.1f;
sOptionVSCardList[D_menu_801B91A8].unk_00.unk_24 += 0.1f;
sOptionVSCardList[D_menu_801B91A8].unk_00.unk_18 -= 4.0f;
sOptionVSCardList[D_menu_801B91A8].unk_38.xScale += 0.01f;
sOptionVSCardList[D_menu_801B91A8].unk_38.yScale += 0.01f;
sOptionVSCardList[D_menu_801B91A8].unk_00.xScale += 0.1f;
sOptionVSCardList[D_menu_801B91A8].unk_00.yScale += 0.1f;
sOptionVSCardList[D_menu_801B91A8].unk_00.xPos -= 4.0f;
D_menu_801B9214 = 1;
}
@@ -1230,13 +1230,13 @@ void Option_VersusUpdate(void) {
continue;
}
if (sOptionVSCardList[i].unk_38.unk_0C > 0.01f) {
sOptionVSCardList[i].unk_38.unk_0C -= 0.05f;
sOptionVSCardList[i].unk_00.unk_20 -= 0.19f;
Math_SmoothStepToF(&sOptionVSCardList[i].unk_00.unk_18, 158.0f, 0.2f, D_menu_801AE608[i + 1], 0.1f);
if (sOptionVSCardList[i].unk_38.xScale > 0.01f) {
sOptionVSCardList[i].unk_38.xScale -= 0.05f;
sOptionVSCardList[i].unk_00.xScale -= 0.19f;
Math_SmoothStepToF(&sOptionVSCardList[i].unk_00.xPos, 158.0f, 0.2f, D_menu_801AE608[i + 1], 0.1f);
} else {
sOptionVSCardList[i].unk_5C = 0;
sOptionVSCardList[i].unk_58 = 0;
sOptionVSCardList[i].unk_5C = false;
sOptionVSCardList[i].unk_58 = false;
}
}
@@ -1247,15 +1247,15 @@ void Option_VersusUpdate(void) {
var_fs0 = 131.0f;
}
Math_SmoothStepToF(&sOptionVSCardList[D_menu_801B91A8].unk_00.unk_1C, var_fs0, 0.25f, 100.0f, 0.1f);
Math_SmoothStepToF(&sOptionVSCardList[D_menu_801B91A8].unk_38.unk_04, -15.5f, 0.25f, 100.0f, 0.1f);
Math_SmoothStepToF(&sOptionCardList[D_menu_801B91A4].unk_00.unk_1C, -10.0f, 0.35f, 100.0f, 0.1f);
Math_SmoothStepToF(&sOptionCardList[D_menu_801B91A4].unk_38.unk_04, 150.0f, 0.35f, 100.0f, 0.1f);
Math_SmoothStepToF(&sOptionVSCardList[D_menu_801B91A8].unk_00.yPos, var_fs0, 0.25f, 100.0f, 0.1f);
Math_SmoothStepToF(&sOptionVSCardList[D_menu_801B91A8].unk_38.y, -15.5f, 0.25f, 100.0f, 0.1f);
Math_SmoothStepToF(&sOptionCardList[D_menu_801B91A4].unk_00.yPos, -10.0f, 0.35f, 100.0f, 0.1f);
Math_SmoothStepToF(&sOptionCardList[D_menu_801B91A4].unk_38.y, 150.0f, 0.35f, 100.0f, 0.1f);
gBlurAlpha += 4;
if ((var_fs0 == sOptionVSCardList[D_menu_801B91A8].unk_00.unk_1C) &&
(sOptionVSCardList[D_menu_801B91A8].unk_38.unk_04 == -15.5f)) {
if ((var_fs0 == sOptionVSCardList[D_menu_801B91A8].unk_00.yPos) &&
(sOptionVSCardList[D_menu_801B91A8].unk_38.y == -15.5f)) {
gBlurAlpha += 255;
D_menu_801B9124 = (D_menu_801B91A8 + 1) * 10;
gVsMatchType = D_menu_801B91A8;
@@ -1274,7 +1274,7 @@ void Option_VersusDraw(void) {
Option_8019BDF0();
for (i = 0; i < 3; i++) {
if (sOptionVSCardList[i].unk_5C != 0) {
if (sOptionVSCardList[i].unk_5C) {
Option_DrawMenuCard(sOptionVSCardList[i].unk_38);
}
}
@@ -1283,7 +1283,7 @@ void Option_VersusDraw(void) {
Matrix_Pop(&gGfxMatrix);
for (i = 0; i < 3; i++) {
if ((sOptionVSCardList[i].unk_58 != 0) && !(sOptionVSCardList[i].unk_00.unk_20 <= 0.0f)) {
if ((sOptionVSCardList[i].unk_58) && !(sOptionVSCardList[i].unk_00.xScale <= 0.0f)) {
Option_DrawCardLabel(sOptionVSCardList[i].unk_00);
}
}
@@ -1322,9 +1322,9 @@ void Option_SoundInit(void) {
Audio_SetVolume(AUDIO_TYPE_VOICE, gVolumeSettings[AUDIO_TYPE_VOICE]);
Audio_SetVolume(AUDIO_TYPE_SFX, gVolumeSettings[AUDIO_TYPE_SFX]);
D_menu_801AEB48[0].unk_18 = gVolumeSettings[AUDIO_TYPE_MUSIC] + 146.0f;
D_menu_801AEB48[1].unk_18 = gVolumeSettings[AUDIO_TYPE_VOICE] + 146.0f;
D_menu_801AEB48[2].unk_18 = gVolumeSettings[AUDIO_TYPE_SFX] + 146.0f;
D_menu_801AEB48[0].xPos = gVolumeSettings[AUDIO_TYPE_MUSIC] + 146.0f;
D_menu_801AEB48[1].xPos = gVolumeSettings[AUDIO_TYPE_VOICE] + 146.0f;
D_menu_801AEB48[2].xPos = gVolumeSettings[AUDIO_TYPE_SFX] + 146.0f;
D_menu_801B9288 = 0;
D_menu_801B9284 = 0;
@@ -1414,8 +1414,8 @@ void Option_80194BD0(void) {
D_menu_801B924C = D_menu_801AE99C[D_menu_801B9288 - 1];
if (Option_8019C66C(&(D_menu_801AEB48[D_menu_801B9288 - 1].unk_18), 146.0f, 245.0f, &D_menu_801B9268)) {
var_v1 = D_menu_801AEB48[D_menu_801B9288 - 1].unk_18 - 146.0f;
if (Option_8019C66C(&(D_menu_801AEB48[D_menu_801B9288 - 1].xPos), 146.0f, 245.0f, &D_menu_801B9268)) {
var_v1 = D_menu_801AEB48[D_menu_801B9288 - 1].xPos - 146.0f;
gVolumeSettings[D_menu_801B9288 - 1] = var_v1;
@@ -1534,9 +1534,9 @@ void Option_801952B4(void) {
}
for (i = 2; i < 4; i++) {
D_menu_801AE9C0[i].unk_20 += 0.02f;
D_menu_801AE9C0[i].unk_24 += 0.02f;
D_menu_801AE9C0[i].unk_18 -= 0.1f;
D_menu_801AE9C0[i].xScale += 0.02f;
D_menu_801AE9C0[i].yScale += 0.02f;
D_menu_801AE9C0[i].xPos -= 0.1f;
}
D_menu_801B9178 = 2;
@@ -1546,9 +1546,9 @@ void Option_801952B4(void) {
case 2:
if (D_menu_801B9178 == 0) {
for (i = 2; i < 4; i++) {
D_menu_801AE9C0[i].unk_20 -= 0.02f;
D_menu_801AE9C0[i].unk_24 -= 0.02f;
D_menu_801AE9C0[i].unk_18 += 0.1f;
D_menu_801AE9C0[i].xScale -= 0.02f;
D_menu_801AE9C0[i].yScale -= 0.02f;
D_menu_801AE9C0[i].xPos += 0.1f;
}
D_menu_801B914C++;
}
@@ -1564,10 +1564,10 @@ void Option_801952B4(void) {
case 0:
if (D_menu_801B917C == 0) {
for (i = 0; i < 4; i++) {
D_menu_801AE9C0[i].unk_20 += 0.08f;
D_menu_801AE9C0[i].unk_24 += 0.08f;
D_menu_801AE9C0[i].unk_18 -= 0.4f;
D_menu_801AE9C0[i].unk_1C -= 0.4f;
D_menu_801AE9C0[i].xScale += 0.08f;
D_menu_801AE9C0[i].yScale += 0.08f;
D_menu_801AE9C0[i].xPos -= 0.4f;
D_menu_801AE9C0[i].yPos -= 0.4f;
}
D_menu_801B917C = 2;
@@ -1579,10 +1579,10 @@ void Option_801952B4(void) {
if (D_menu_801B917C == 0) {
for (i = 0; i < 4; i++) {
D_menu_801AE9C0[i].unk_20 -= 0.08f;
D_menu_801AE9C0[i].unk_24 -= 0.08f;
D_menu_801AE9C0[i].unk_18 += 0.4f;
D_menu_801AE9C0[i].unk_1C += 0.4f;
D_menu_801AE9C0[i].xScale -= 0.08f;
D_menu_801AE9C0[i].yScale -= 0.08f;
D_menu_801AE9C0[i].xPos += 0.4f;
D_menu_801AE9C0[i].yPos += 0.4f;
}
D_menu_801B917C = 2;
@@ -1600,10 +1600,10 @@ void Option_801952B4(void) {
} else {
for (i = 0; i < 4; i++) {
D_menu_801AE9C0[i].unk_20 = 1.0f;
D_menu_801AE9C0[i].unk_24 = 1.0f;
D_menu_801AE9C0[i].unk_18 = D_menu_801AE9A0[i];
D_menu_801AE9C0[i].unk_1C = D_menu_801AE9B0[i];
D_menu_801AE9C0[i].xScale = 1.0f;
D_menu_801AE9C0[i].yScale = 1.0f;
D_menu_801AE9C0[i].xPos = D_menu_801AE9A0[i];
D_menu_801AE9C0[i].yPos = D_menu_801AE9B0[i];
}
}
@@ -1628,7 +1628,7 @@ void Option_ExpertSoundInit(void) {
D_menu_801B9290.unk_4 = 0;
spectrumAnalyzerMode = 0;
D_menu_801B9320 = 0;
sMusicPlaying = false;
// clang-format off
for (i = 0; i < 32; i++) { D_menu_801B9298[i] = 0.0f; }
@@ -1661,11 +1661,11 @@ void Option_ExpertSoundUpdate(void) {
if (gControllerPress[gMainController].button & A_BUTTON) {
Audio_PlaySoundTestTrack(D_menu_801B931C);
D_menu_801B9320 = true;
sMusicPlaying = true;
}
if (gControllerPress[gMainController].button & B_BUTTON) {
if (!D_menu_801B9320) {
if (!sMusicPlaying) {
AUDIO_PLAY_SFX(NA_SE_ARWING_CANCEL, gDefaultSfxSource, 4);
AUDIO_PLAY_BGM(NA_BGM_SELECT);
gDrawMode = DRAW_NONE;
@@ -1676,7 +1676,7 @@ void Option_ExpertSoundUpdate(void) {
AUDIO_PLAY_SFX(NA_SE_CANCEL, gDefaultSfxSource, 4);
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1);
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1);
D_menu_801B9320 = false;
sMusicPlaying = false;
}
}
@@ -1750,7 +1750,7 @@ void Option_ExpertSoundDraw(void) {
D_menu_801AF034[i], D_menu_801AF044[i]);
}
if (D_menu_801B9320 != 0) {
if (sMusicPlaying) {
temp_v0_4 = Audio_UpdateFrequencyAnalysis();
var_fv1 = 60.0f;
@@ -1874,12 +1874,12 @@ void Option_DataUpdate(void) {
gExpertMode = false;
sOptionCardList[0].unk_00.unk_08 = D_OPT_8003B50;
sOptionCardList[0].unk_00.unk_10 = 72;
sOptionCardList[0].unk_00.unk_14 = 12;
sOptionCardList[4].unk_00.unk_08 = D_OPT_80046B0;
sOptionCardList[4].unk_00.unk_10 = 64;
sOptionCardList[4].unk_00.unk_14 = 10;
sOptionCardList[0].unk_00.texture = D_OPT_8003B50;
sOptionCardList[0].unk_00.width = 72;
sOptionCardList[0].unk_00.height = 12;
sOptionCardList[4].unk_00.texture = D_OPT_80046B0;
sOptionCardList[4].unk_00.width = 64;
sOptionCardList[4].unk_00.height = 10;
for (i = 0; i < OPTION_COUNT; i++) {
sOptionCardCurTextPosX[i] = sOptionCardTextPosX[i];
@@ -2343,18 +2343,15 @@ void Option_801982B0(s32 arg0, s32 arg1, f32 arg2, f32 arg3, s32 arg4) {
if ((arg3 > 30.0f) && (arg3 < 200.0f)) {
RCP_SetupDL(&gMasterDisp, SETUPDL_76);
if (arg1 < 6) {
b = 255;
g = 255;
r = 255;
r = g = b = 255;
if (arg1 < (arg4 - 1)) {
start = gSaveFile.save.data.unk_5E[arg0][arg1].unk_8 & 0xF;
end = gSaveFile.save.data.unk_5E[arg0][arg1 + 1].unk_8 & 0xF;
temp_v0 = Option_80199284(start, end);
g = 255;
b = 255;
r = 255;
r = g = b = 255;
switch (temp_v0) {
case 0:
@@ -2395,24 +2392,24 @@ void Option_801984D0(s32 arg0, s32 arg1, f32 arg2, f32 arg3) {
}
}
void Option_80198608(s32 arg0, s32 arg1, f32 arg2, f32 arg3) {
f32 var_fs1;
void Option_80198608(s32 arg0, s32 arg1, f32 xPos, f32 yPos) {
f32 xOffset;
s32 sp90[3];
s32 i;
if ((arg3 > 12.0f) && (arg3 < 154.0f)) {
if ((yPos > 12.0f) && (yPos < 154.0f)) {
RCP_SetupDL(&gMasterDisp, SETUPDL_83);
sp90[0] = gSaveFile.save.data.unk_5E[arg0][arg1].unk_D & 1;
sp90[1] = gSaveFile.save.data.unk_5E[arg0][arg1].unk_F & 1;
sp90[2] = gSaveFile.save.data.unk_5E[arg0][arg1].unk_E & 1;
for (var_fs1 = 0.0f, i = 0; i < 3; i++, var_fs1 += 9.0f) {
for (xOffset = 0.0f, i = 0; i < 3; i++, xOffset += 9.0f) {
if (sp90[i] == 0) {
continue;
}
gDPSetPrimColor(gMasterDisp++, 0, 0, D_menu_801AF0D0[i], D_menu_801AF0DC[i], D_menu_801AF0E8[i], 255);
Graphics_DisplaySmallText(arg2 + var_fs1 - 1.0f, arg3 + 24.0f + 8.0f + 1.0f, 1.0f, 1.0f,
Graphics_DisplaySmallText(xPos + xOffset - 1.0f, yPos + 24.0f + 8.0f + 1.0f, 1.0f, 1.0f,
D_menu_801AF0C4[i]);
}
}
@@ -2434,9 +2431,9 @@ void Option_8019882C(s32 arg0, s32 arg1, f32 arg2, f32 arg3) {
}
void Option_8019896C(s32 arg0, f32 y, s32 arg2) {
static f32 D_menu_801AF130 = 0.0f;
static f32 D_menu_801AF134 = -121.0f;
static f32 D_menu_801AF138 = 40.1f;
static f32 zAngle = 0.0f;
static f32 xStart = -121.0f;
static f32 xAdvance = 40.1f;
s32 i;
PlanetId planet;
s32 spFC;
@@ -2451,7 +2448,7 @@ void Option_8019896C(s32 arg0, f32 y, s32 arg2) {
Lib_InitOrtho(&gMasterDisp);
spFC = gSaveFile.save.data.unk_4A[arg0];
for (x = D_menu_801AF134, i = 0; i < arg2; i++, x += D_menu_801AF138) {
for (x = xStart, i = 0; i < arg2; i++, x += xAdvance) {
planet = gSaveFile.save.data.unk_5E[arg0][i].unk_8 & 0xF;
switch (planet) {
@@ -2463,7 +2460,7 @@ void Option_8019896C(s32 arg0, f32 y, s32 arg2) {
Matrix_Push(&gGfxMatrix);
Matrix_Translate(gGfxMatrix, x, y, 0.0f, MTXF_APPLY);
Matrix_RotateZ(gGfxMatrix, M_DTOR * D_menu_801AF130, MTXF_APPLY);
Matrix_RotateZ(gGfxMatrix, M_DTOR * zAngle, MTXF_APPLY);
Matrix_Scale(gGfxMatrix, 0.3f, 0.3f, 0.3f, MTXF_APPLY);
Matrix_SetGfxMtx(&gMasterDisp);
@@ -2583,7 +2580,7 @@ void Option_8019896C(s32 arg0, f32 y, s32 arg2) {
Option_80192738();
D_menu_801AF130 += 0.1f;
zAngle += 0.1f;
Lib_InitPerspective(&gMasterDisp);
}
@@ -2624,8 +2621,8 @@ void Option_VersusMenuInit(void) {
D_menu_801B93D0 = D_menu_801B9124;
if (D_game_800D2870) {
sOptionCardList[1].unk_00.unk_1C = 129.0f;
sOptionCardList[1].unk_38.unk_04 = -7.5f;
sOptionCardList[1].unk_00.yPos = 129.0f;
sOptionCardList[1].unk_38.y = -7.5f;
}
gVsPointsToWin = 3;
@@ -3479,8 +3476,8 @@ void Option_DrawMenuCard(MenuContext_38 arg0) {
Matrix_Push(&gGfxMatrix);
Matrix_Translate(gGfxMatrix, arg0.unk_00, arg0.unk_04, arg0.unk_08, MTXF_APPLY);
Matrix_Scale(gGfxMatrix, arg0.unk_0C, arg0.unk_10, 1.0f, MTXF_APPLY);
Matrix_Translate(gGfxMatrix, arg0.x, arg0.y, arg0.z, MTXF_APPLY);
Matrix_Scale(gGfxMatrix, arg0.xScale, arg0.yScale, 1.0f, MTXF_APPLY);
Matrix_RotateX(gGfxMatrix, M_DTOR * 90.0f, MTXF_APPLY);
Matrix_SetGfxMtx(&gMasterDisp);
@@ -3492,36 +3489,36 @@ void Option_DrawMenuCard(MenuContext_38 arg0) {
Lib_InitPerspective(&gMasterDisp);
}
void Option_DrawMenuArwing(ArwingPosition arg0) {
void Option_DrawMenuArwing(ArwingPosition arwing) {
if (D_menu_801B91BC != 0) {
Option_8019BC44(arg0.unk_0, arg0.unk_4, D_menu_801B91F4, D_menu_801B9200, 90.0f, D_menu_801B91F8);
Option_8019BC44(arg0.unk_0 + arg0.unk_8, arg0.unk_4, D_menu_801B91F4, D_menu_801B91FC, -90.0f, D_menu_801B91F8);
Option_DrawArwing(arwing.x, arwing.y, D_menu_801B91F4, D_menu_801B9200, 90.0f, D_menu_801B91F8);
Option_DrawArwing(arwing.x + arwing.range, arwing.y, D_menu_801B91F4, D_menu_801B91FC, -90.0f, D_menu_801B91F8);
}
}
void Option_8019BC44(f32 x, f32 y, f32 arg2, f32 arg3, f32 arg4, f32 arg5) {
f32 sp44;
f32 sp40;
f32 sp3C;
void Option_DrawArwing(f32 x, f32 y, f32 z, f32 yRot, f32 zRot, f32 scale) {
f32 dirX;
f32 dirY;
f32 dirZ;
Option_8019BE7C(D_menu_801B9224, D_menu_801B9228, 100.0f, &sp44, &sp40, &sp3C);
Option_8019BE7C(D_menu_801B9224, D_menu_801B9228, 100.0f, &dirX, &dirY, &dirZ);
Lights_SetOneLight(&gMasterDisp, sp44, sp40, sp3C, D_menu_801B922C, D_menu_801B9230, D_menu_801B9234,
D_menu_801B9238, D_menu_801B923C, D_menu_801B9240);
Lights_SetOneLight(&gMasterDisp, dirX, dirY, dirZ, sArwingLightColR, sArwingLightColG, sArwingLightColB,
sArwingLightAmbR, sArwingLightAmbG, sArwingLightAmbB);
Matrix_Push(&gGfxMatrix);
Matrix_Translate(gGfxMatrix, x, y, arg2, MTXF_APPLY);
Matrix_Translate(gGfxMatrix, x, y, z, MTXF_APPLY);
Matrix_Scale(gGfxMatrix, arg5, arg5, arg5, MTXF_APPLY);
Matrix_RotateZ(gGfxMatrix, M_DTOR * arg4, MTXF_APPLY);
Matrix_RotateY(gGfxMatrix, M_DTOR * arg3, MTXF_APPLY);
Matrix_Scale(gGfxMatrix, scale, scale, scale, MTXF_APPLY);
Matrix_RotateZ(gGfxMatrix, M_DTOR * zRot, MTXF_APPLY);
Matrix_RotateY(gGfxMatrix, M_DTOR * yRot, MTXF_APPLY);
Matrix_SetGfxMtx(&gMasterDisp);
RCP_SetupDL_55();
gSPDisplayList(gMasterDisp++, D_MAP_604A9F0);
gSPDisplayList(gMasterDisp++, aMapArwingDL);
Matrix_Pop(&gGfxMatrix);
}
@@ -3532,21 +3529,21 @@ void Option_8019BDF0(void) {
MTXF_APPLY);
}
void Option_8019BE7C(f32 arg0, f32 arg1, f32 arg2, f32* arg3, f32* arg4, f32* arg5) {
Vec3f sp24;
Vec3f sp18;
void Option_8019BE7C(f32 xRot, f32 yRot, f32 arg2, f32* arg3, f32* arg4, f32* arg5) {
Vec3f dest;
Vec3f src;
sp18.x = 0.0f;
sp18.y = 0.0f;
sp18.z = arg2;
src.x = 0.0f;
src.y = 0.0f;
src.z = arg2;
Matrix_RotateY(gCalcMatrix, M_DTOR * arg1, MTXF_NEW);
Matrix_RotateX(gCalcMatrix, M_DTOR * arg0, MTXF_APPLY);
Matrix_MultVec3f(gCalcMatrix, &sp18, &sp24);
Matrix_RotateY(gCalcMatrix, M_DTOR * yRot, MTXF_NEW);
Matrix_RotateX(gCalcMatrix, M_DTOR * xRot, MTXF_APPLY);
Matrix_MultVec3f(gCalcMatrix, &src, &dest);
*arg3 = sp24.x;
*arg4 = sp24.y;
*arg5 = sp24.z;
*arg3 = dest.x;
*arg4 = dest.y;
*arg5 = dest.z;
}
void Option_8019BF34(void) {
@@ -3595,35 +3592,37 @@ void Option_8019C04C(void) {
Lib_InitPerspective(&gMasterDisp);
}
void Option_DrawCardLabel(OptionTexture arg0) {
if (!(arg0.unk_20 <= 0.0f) && !(arg0.unk_24 <= 0.0f)) {
switch (arg0.unk_00) {
//! TODO: Enum for Texture types
void Option_DrawCardLabel(OptionTexture tex) {
if (!(tex.xScale <= 0.0f) && !(tex.yScale <= 0.0f)) {
switch (tex.type) {
case 1:
RCP_SetupDL(&gMasterDisp, SETUPDL_78);
gDPSetPrimColor(gMasterDisp++, 0, 0, arg0.unk_28, arg0.unk_2C, arg0.unk_30, arg0.unk_34);
TextureRect_CI4(&gMasterDisp, arg0.unk_08, arg0.unk_0C, arg0.unk_10, arg0.unk_14, arg0.unk_18,
arg0.unk_1C, arg0.unk_20, arg0.unk_24);
gDPSetPrimColor(gMasterDisp++, 0, 0, tex.red, tex.green, tex.blue, tex.alpha);
TextureRect_CI4(&gMasterDisp, tex.texture, tex.palette, tex.width, tex.height, tex.xPos, tex.yPos,
tex.xScale, tex.yScale);
break;
case 2:
RCP_SetupDL(&gMasterDisp, SETUPDL_78);
gDPSetPrimColor(gMasterDisp++, 0, 0, arg0.unk_28, arg0.unk_2C, arg0.unk_30, arg0.unk_34);
TextureRect_CI8(&gMasterDisp, arg0.unk_08, arg0.unk_0C, arg0.unk_10, arg0.unk_14, arg0.unk_18,
arg0.unk_1C, arg0.unk_20, arg0.unk_24);
gDPSetPrimColor(gMasterDisp++, 0, 0, tex.red, tex.green, tex.blue, tex.alpha);
TextureRect_CI8(&gMasterDisp, tex.texture, tex.palette, tex.width, tex.height, tex.xPos, tex.yPos,
tex.xScale, tex.yScale);
break;
case 0:
RCP_SetupDL(&gMasterDisp, SETUPDL_76);
gDPSetPrimColor(gMasterDisp++, 0, 0, arg0.unk_28, arg0.unk_2C, arg0.unk_30, arg0.unk_34);
TextureRect_IA8(&gMasterDisp, arg0.unk_08, arg0.unk_10, arg0.unk_14, arg0.unk_18, arg0.unk_1C,
arg0.unk_20, arg0.unk_24);
gDPSetPrimColor(gMasterDisp++, 0, 0, tex.red, tex.green, tex.blue, tex.alpha);
TextureRect_IA8(&gMasterDisp, tex.texture, tex.width, tex.height, tex.xPos, tex.yPos, tex.xScale,
tex.yScale);
break;
case 3:
RCP_SetupDL(&gMasterDisp, SETUPDL_76);
gDPSetPrimColor(gMasterDisp++, 0, 0, arg0.unk_28, arg0.unk_2C, arg0.unk_30, arg0.unk_34);
TextureRect_RGBA16(&gMasterDisp, arg0.unk_08, arg0.unk_10, arg0.unk_14, arg0.unk_18, arg0.unk_1C,
arg0.unk_20, arg0.unk_24);
gDPSetPrimColor(gMasterDisp++, 0, 0, tex.red, tex.green, tex.blue, tex.alpha);
TextureRect_RGBA16(&gMasterDisp, tex.texture, tex.width, tex.height, tex.xPos, tex.yPos, tex.xScale,
tex.yScale);
break;
}
}
@@ -4125,7 +4124,8 @@ void Option_8019D624(void) {
s32 i;
s32 j;
s32 var_t2;
s32 var_a3, var_a0;
s32 var_a3;
s32 var_a0;
s32 var_a1;
u8 sp142[11][3];
u8 sp122[11];
@@ -4305,15 +4305,15 @@ void Option_8019DD44(void) {
D_menu_801B91D4 = 114.0f - D_menu_801B93E4 * 130.0f;
D_menu_801B91D8 = -6.0f + D_menu_801B93E4 * 130.0f;
sOptionCardList[3].unk_00.unk_18 = sOptionCardCurTextPosX[3];
sOptionCardList[3].unk_00.unk_1C = 23.0f;
sOptionCardList[3].unk_00.unk_20 = 1.0f;
sOptionCardList[3].unk_00.unk_24 = 1.0f;
sOptionCardList[3].unk_58 = 1;
sOptionCardList[3].unk_38.unk_04 = 90.0f;
sOptionCardList[3].unk_38.unk_0C = 0.4f;
sOptionCardList[3].unk_38.unk_10 = 0.21f;
sOptionCardList[3].unk_5C = 1;
sOptionCardList[3].unk_00.xPos = sOptionCardCurTextPosX[3];
sOptionCardList[3].unk_00.yPos = 23.0f;
sOptionCardList[3].unk_00.xScale = 1.0f;
sOptionCardList[3].unk_00.yScale = 1.0f;
sOptionCardList[3].unk_58 = true;
sOptionCardList[3].unk_38.y = 90.0f;
sOptionCardList[3].unk_38.xScale = 0.4f;
sOptionCardList[3].unk_38.yScale = 0.21f;
sOptionCardList[3].unk_5C = true;
D_menu_801B912C++;
break;
+5
View File
@@ -105,6 +105,7 @@ void Audio_ThreadEntry(void* arg0) {
AudioLoad_Init();
Audio_InitSounds();
task = AudioThread_CreateTask();
if (task != NULL) {
task->mesgQueue = &gAudioTaskMesgQueue;
@@ -112,6 +113,7 @@ void Audio_ThreadEntry(void* arg0) {
osWritebackDCacheAll();
osSendMesg(&gTaskMesgQueue, task, OS_MESG_NOBLOCK);
}
while (true) {
task = AudioThread_CreateTask();
if (task != NULL) {
@@ -120,6 +122,7 @@ void Audio_ThreadEntry(void* arg0) {
osWritebackDCacheAll();
}
MQ_GET_MESG(&gAudioTaskMesgQueue, NULL);
if (task != NULL) {
osSendMesg(&gTaskMesgQueue, task, OS_MESG_NOBLOCK);
}
@@ -176,6 +179,7 @@ void Main_SetVIMode(void) {
(gControllerHold[3].button & R_TRIG) && (gControllerHold[3].button & Z_TRIG)) {
sGammaMode = 1 - sGammaMode;
}
switch (osTvType) {
case OS_TV_PAL:
osViSetMode(&osViModePalLan1);
@@ -188,6 +192,7 @@ void Main_SetVIMode(void) {
osViSetMode(&osViModeNtscLan1);
break;
}
if (sGammaMode != 0) {
osViSetSpecialFeatures(OS_VI_DITHER_FILTER_ON | OS_VI_DIVOT_OFF | OS_VI_GAMMA_ON | OS_VI_GAMMA_DITHER_ON);
} else {