mirror of
https://github.com/zeldaret/oot.git
synced 2024-11-23 22:09:43 +00:00
parent
72334df180
commit
d7f6961918
@ -852,7 +852,7 @@ void EnRr_Draw(Actor* thisx, PlayState* play) {
|
||||
Mtx* segMtx = Graph_Alloc(play->state.gfxCtx, 4 * sizeof(Mtx));
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx, "../z_en_rr.c", 1478);
|
||||
if (1) {}
|
||||
|
||||
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
||||
gSPSegment(POLY_XLU_DISP++, 0x0C, segMtx);
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08,
|
||||
@ -867,9 +867,11 @@ void EnRr_Draw(Actor* thisx, PlayState* play) {
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_en_rr.c", 1501),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
Matrix_Pop();
|
||||
|
||||
zeroVec.x = 0.0f;
|
||||
zeroVec.y = 0.0f;
|
||||
zeroVec.z = 0.0f;
|
||||
|
||||
for (i = 1; i < 5; i++) {
|
||||
Matrix_Translate(0.0f, this->bodySegs[i].height + 1000.0f, 0.0f, MTXMODE_APPLY);
|
||||
|
||||
@ -883,28 +885,34 @@ void EnRr_Draw(Actor* thisx, PlayState* play) {
|
||||
segMtx++;
|
||||
Matrix_MultVec3f(&zeroVec, &this->effectPos[i]);
|
||||
}
|
||||
|
||||
this->effectPos[0] = this->actor.world.pos;
|
||||
Matrix_MultVec3f(&zeroVec, &this->mouthPos);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gLikeLikeDL);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx, "../z_en_rr.c", 1551);
|
||||
|
||||
if (this->effectTimer != 0) {
|
||||
Vec3f effectPos;
|
||||
s16 effectTimer = this->effectTimer - 1;
|
||||
s32 segIndex;
|
||||
s32 offIndex;
|
||||
|
||||
this->actor.colorFilterTimer++;
|
||||
if ((effectTimer & 1) == 0) {
|
||||
s32 segIndex = 4 - (effectTimer >> 2);
|
||||
s32 offIndex = (effectTimer >> 1) & 3;
|
||||
if ((effectTimer & 1) != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
effectPos.x = this->effectPos[segIndex].x + sEffectOffsets[offIndex].x + Rand_CenteredFloat(10.0f);
|
||||
effectPos.y = this->effectPos[segIndex].y + sEffectOffsets[offIndex].y + Rand_CenteredFloat(10.0f);
|
||||
effectPos.z = this->effectPos[segIndex].z + sEffectOffsets[offIndex].z + Rand_CenteredFloat(10.0f);
|
||||
if (this->actor.colorFilterParams & 0x4000) {
|
||||
EffectSsEnFire_SpawnVec3f(play, &this->actor, &effectPos, 100, 0, 0, -1);
|
||||
} else {
|
||||
EffectSsEnIce_SpawnFlyingVec3f(play, &this->actor, &effectPos, 150, 150, 150, 250, 235, 245, 255, 3.0f);
|
||||
}
|
||||
segIndex = 4 - (effectTimer >> 2);
|
||||
offIndex = (effectTimer >> 1) & 3;
|
||||
|
||||
effectPos.x = this->effectPos[segIndex].x + sEffectOffsets[offIndex].x + Rand_CenteredFloat(10.0f);
|
||||
effectPos.y = this->effectPos[segIndex].y + sEffectOffsets[offIndex].y + Rand_CenteredFloat(10.0f);
|
||||
effectPos.z = this->effectPos[segIndex].z + sEffectOffsets[offIndex].z + Rand_CenteredFloat(10.0f);
|
||||
if (this->actor.colorFilterParams & 0x4000) {
|
||||
EffectSsEnFire_SpawnVec3f(play, &this->actor, &effectPos, 100, 0, 0, -1);
|
||||
} else {
|
||||
EffectSsEnIce_SpawnFlyingVec3f(play, &this->actor, &effectPos, 150, 150, 150, 250, 235, 245, 255, 3.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -290,7 +290,6 @@ void func_80AF95C4(EnSda* this, u8* shadowTexture, Player* player, PlayState* pl
|
||||
Matrix_RotateX(BINANG_TO_RAD_ALT(sp178.x), MTXMODE_APPLY);
|
||||
for (i = 0; i < 22; i++) {
|
||||
Matrix_MultVec3f(&D_80AFA180[i], &sp188);
|
||||
if (1) {}
|
||||
sp64[i].x = (((KREG(82) / 100.0f) + 4.0f) * sp188.x) + sp16C.x;
|
||||
sp64[i].y = (((KREG(82) / 100.0f) + 4.0f) * sp188.y) + sp16C.y;
|
||||
sp64[i].z = (((KREG(82) / 100.0f) + 4.0f) * sp188.z) + sp16C.z;
|
||||
@ -306,7 +305,7 @@ void func_80AF95C4(EnSda* this, u8* shadowTexture, Player* player, PlayState* pl
|
||||
temp_t0 = sp188.x + 32.0f;
|
||||
temp_t1 = (s16)sp188.y << 6;
|
||||
|
||||
do {
|
||||
for (j = 0; j < 6; j++) {
|
||||
for (j = 0, phi_a3 = -0xC0; j < 7; j++, phi_a3 += 0x40) {
|
||||
for (phi_a0 = -D_80AFA0E8[j]; phi_a0 < D_80AFA0E8[j] - 1; phi_a0++) {
|
||||
temp_v0 = temp_t0 + phi_a0;
|
||||
@ -318,8 +317,7 @@ void func_80AF95C4(EnSda* this, u8* shadowTexture, Player* player, PlayState* pl
|
||||
}
|
||||
}
|
||||
}
|
||||
j++;
|
||||
} while (j < 6);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (BREG(61) == 1) {
|
||||
|
@ -300,30 +300,33 @@ void EnShopnuts_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s*
|
||||
f32 y;
|
||||
f32 z;
|
||||
|
||||
if ((limbIndex == BUSINESS_SCRUB_LIMB_NOSE) && (this->actionFunc == EnShopnuts_ThrowNut)) {
|
||||
OPEN_DISPS(play->state.gfxCtx, "../z_en_shopnuts.c", 682);
|
||||
curFrame = this->skelAnime.curFrame;
|
||||
if (curFrame <= 6.0f) {
|
||||
y = 1.0f - (curFrame * 0.0833f);
|
||||
x = z = (curFrame * 0.1167f) + 1.0f;
|
||||
} else if (curFrame <= 7.0f) {
|
||||
curFrame -= 6.0f;
|
||||
y = 0.5f + curFrame;
|
||||
x = z = 1.7f - (curFrame * 0.7f);
|
||||
} else if (curFrame <= 10.0f) {
|
||||
y = 1.5f - ((curFrame - 7.0f) * 0.1667f);
|
||||
x = z = 1.0f;
|
||||
} else {
|
||||
x = y = z = 1.0f;
|
||||
}
|
||||
|
||||
Matrix_Scale(x, y, z, MTXMODE_APPLY);
|
||||
if (1) {}
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_en_shopnuts.c", 714),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gBusinessScrubNoseDL);
|
||||
CLOSE_DISPS(play->state.gfxCtx, "../z_en_shopnuts.c", 717);
|
||||
if ((limbIndex != BUSINESS_SCRUB_LIMB_NOSE) || (this->actionFunc != EnShopnuts_ThrowNut)) {
|
||||
return;
|
||||
}
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx, "../z_en_shopnuts.c", 682);
|
||||
|
||||
curFrame = this->skelAnime.curFrame;
|
||||
if (curFrame <= 6.0f) {
|
||||
y = 1.0f - (curFrame * 0.0833f);
|
||||
x = z = (curFrame * 0.1167f) + 1.0f;
|
||||
} else if (curFrame <= 7.0f) {
|
||||
curFrame -= 6.0f;
|
||||
y = 0.5f + curFrame;
|
||||
x = z = 1.7f - (curFrame * 0.7f);
|
||||
} else if (curFrame <= 10.0f) {
|
||||
y = 1.5f - ((curFrame - 7.0f) * 0.1667f);
|
||||
x = z = 1.0f;
|
||||
} else {
|
||||
x = y = z = 1.0f;
|
||||
}
|
||||
|
||||
Matrix_Scale(x, y, z, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_en_shopnuts.c", 714),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gBusinessScrubNoseDL);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx, "../z_en_shopnuts.c", 717);
|
||||
}
|
||||
|
||||
void EnShopnuts_Draw(Actor* thisx, PlayState* play) {
|
||||
|
@ -182,7 +182,6 @@ s32 func_80B0C0CC(EnSw* this, PlayState* play, s32 arg2) {
|
||||
if (phi_s1 == 0) {
|
||||
sp78.x = sp84.x - (this->unk_37C.x * 24.0f);
|
||||
sp78.y = sp84.y - (this->unk_37C.y * 24.0f);
|
||||
if (0) {}
|
||||
sp78.z = sp84.z - (this->unk_37C.z * 24.0f);
|
||||
} else if (phi_s1 == 1) {
|
||||
sp78.x = sp84.x + (this->unk_370.x * 24.0f);
|
||||
@ -194,15 +193,17 @@ s32 func_80B0C0CC(EnSw* this, PlayState* play, s32 arg2) {
|
||||
sp78.z = sp84.z - (this->unk_370.z * 24.0f);
|
||||
}
|
||||
temp_v0_2 = func_80B0C020(play, &sp84, &sp78, &sp9C, &sp6C);
|
||||
if (temp_v0_2 != NULL) {
|
||||
if (arg2 == 1) {
|
||||
func_80B0BE20(this, temp_v0_2);
|
||||
this->actor.world.pos = sp9C;
|
||||
this->actor.floorBgId = sp6C;
|
||||
}
|
||||
sp64 = 1;
|
||||
break;
|
||||
if (temp_v0_2 == NULL) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (arg2 == 1) {
|
||||
func_80B0BE20(this, temp_v0_2);
|
||||
this->actor.world.pos = sp9C;
|
||||
this->actor.floorBgId = sp6C;
|
||||
}
|
||||
sp64 = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -287,33 +287,35 @@ void EnSyatekiMan_WaitForGame(EnSyatekiMan* this, PlayState* play) {
|
||||
EnSyatekiItm* gallery;
|
||||
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if (1) {}
|
||||
|
||||
gallery = ((EnSyatekiItm*)this->actor.parent);
|
||||
if ((gallery->actor.update != NULL) && (gallery->signal == ENSYATEKI_END)) {
|
||||
this->subCamId = OnePointCutscene_Init(play, 8002, -99, &this->actor, CAM_ID_MAIN);
|
||||
switch (gallery->hitCount) {
|
||||
case 10:
|
||||
this->gameResult = SYATEKI_RESULT_WINNER;
|
||||
this->actor.textId = 0x71AF;
|
||||
break;
|
||||
case 8:
|
||||
case 9:
|
||||
this->gameResult = SYATEKI_RESULT_ALMOST;
|
||||
this->actor.textId = 0x71AE;
|
||||
break;
|
||||
default:
|
||||
this->gameResult = SYATEKI_RESULT_FAILURE;
|
||||
this->actor.textId = 0x71AD;
|
||||
if (play->shootingGalleryStatus == 15 + 1) {
|
||||
this->gameResult = SYATEKI_RESULT_REFUSE;
|
||||
this->actor.textId = 0x2D;
|
||||
}
|
||||
break;
|
||||
}
|
||||
play->shootingGalleryStatus = -2;
|
||||
Message_StartTextbox(play, this->actor.textId, NULL);
|
||||
this->actionFunc = EnSyatekiMan_EndGame;
|
||||
if ((gallery->actor.update == NULL) || (gallery->signal != ENSYATEKI_END)) {
|
||||
return;
|
||||
}
|
||||
|
||||
this->subCamId = OnePointCutscene_Init(play, 8002, -99, &this->actor, CAM_ID_MAIN);
|
||||
switch (gallery->hitCount) {
|
||||
case 10:
|
||||
this->gameResult = SYATEKI_RESULT_WINNER;
|
||||
this->actor.textId = 0x71AF;
|
||||
break;
|
||||
case 8:
|
||||
case 9:
|
||||
this->gameResult = SYATEKI_RESULT_ALMOST;
|
||||
this->actor.textId = 0x71AE;
|
||||
break;
|
||||
default:
|
||||
this->gameResult = SYATEKI_RESULT_FAILURE;
|
||||
this->actor.textId = 0x71AD;
|
||||
if (play->shootingGalleryStatus == 15 + 1) {
|
||||
this->gameResult = SYATEKI_RESULT_REFUSE;
|
||||
this->actor.textId = 0x2D;
|
||||
}
|
||||
break;
|
||||
}
|
||||
play->shootingGalleryStatus = -2;
|
||||
Message_StartTextbox(play, this->actor.textId, NULL);
|
||||
this->actionFunc = EnSyatekiMan_EndGame;
|
||||
}
|
||||
|
||||
void EnSyatekiMan_EndGame(EnSyatekiMan* this, PlayState* play) {
|
||||
|
@ -93,33 +93,32 @@ void EnTkEff_Draw(EnTk* this, PlayState* play) {
|
||||
|
||||
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
||||
|
||||
if (1) {}
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(this->eff); i++) {
|
||||
if (eff->active != 0) {
|
||||
if (gfxSetup == 0) {
|
||||
POLY_XLU_DISP = Gfx_SetupDL(POLY_XLU_DISP, SETUPDL_0);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gDampeEff1DL);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 100, 60, 20, 0);
|
||||
gfxSetup = 1;
|
||||
}
|
||||
|
||||
alpha = eff->timeLeft * (255.0f / eff->timeTotal);
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 170, 130, 90, alpha);
|
||||
|
||||
gDPPipeSync(POLY_XLU_DISP++);
|
||||
Matrix_Translate(eff->pos.x, eff->pos.y, eff->pos.z, MTXMODE_NEW);
|
||||
Matrix_ReplaceRotation(&play->billboardMtxF);
|
||||
Matrix_Scale(eff->size, eff->size, 1.0f, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_en_tk_eff.c", 140),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
imageIdx = eff->timeLeft * ((f32)ARRAY_COUNT(dustTextures) / eff->timeTotal);
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(dustTextures[imageIdx]));
|
||||
|
||||
gSPDisplayList(POLY_XLU_DISP++, gDampeEff2DL);
|
||||
for (i = 0; i < ARRAY_COUNT(this->eff); i++, eff++) {
|
||||
if (eff->active == 0) {
|
||||
continue;
|
||||
}
|
||||
eff++;
|
||||
|
||||
if (gfxSetup == 0) {
|
||||
POLY_XLU_DISP = Gfx_SetupDL(POLY_XLU_DISP, SETUPDL_0);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gDampeEff1DL);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 100, 60, 20, 0);
|
||||
gfxSetup = 1;
|
||||
}
|
||||
|
||||
alpha = eff->timeLeft * (255.0f / eff->timeTotal);
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 170, 130, 90, alpha);
|
||||
|
||||
gDPPipeSync(POLY_XLU_DISP++);
|
||||
Matrix_Translate(eff->pos.x, eff->pos.y, eff->pos.z, MTXMODE_NEW);
|
||||
Matrix_ReplaceRotation(&play->billboardMtxF);
|
||||
Matrix_Scale(eff->size, eff->size, 1.0f, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_en_tk_eff.c", 140),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
imageIdx = eff->timeLeft * ((f32)ARRAY_COUNT(dustTextures) / eff->timeTotal);
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(dustTextures[imageIdx]));
|
||||
|
||||
gSPDisplayList(POLY_XLU_DISP++, gDampeEff2DL);
|
||||
}
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx, "../z_en_tk_eff.c", 154);
|
||||
|
@ -872,28 +872,29 @@ void EnViewer_UpdateGanondorfCape(PlayState* play, EnViewer* this) {
|
||||
Vec3f forearmModelOffset;
|
||||
Vec3f forearmWorldOffset;
|
||||
|
||||
if ((this->actor.params >> 8) == ENVIEWER_TYPE_5_GANONDORF) {
|
||||
if (1) {}
|
||||
sGanondorfCape->backPush = BREG(54) / 10.0f;
|
||||
sGanondorfCape->backSwayMagnitude = (BREG(60) + 25) / 100.0f;
|
||||
sGanondorfCape->sideSwayMagnitude = (BREG(55) - 45) / 10.0f;
|
||||
sGanondorfCape->minY = -10000.0f;
|
||||
sGanondorfCape->minDist = 0.0f;
|
||||
sGanondorfCape->gravity = (BREG(67) - 10) / 10.0f;
|
||||
forearmModelOffset.x = KREG(16) - 13.0f;
|
||||
forearmModelOffset.y = KREG(17) + 3.0f + Math_SinS(yOscillationPhase) * KREG(20);
|
||||
forearmModelOffset.z = KREG(18) - 10.0f;
|
||||
yOscillationPhase += KREG(19) * 0x1000 + 0x2000;
|
||||
|
||||
Matrix_RotateY(BINANG_TO_RAD_ALT(this->actor.shape.rot.y), MTXMODE_NEW);
|
||||
Matrix_MultVec3f(&forearmModelOffset, &forearmWorldOffset);
|
||||
sGanondorfCape->rightForearmPos.x = sGanondorfNeckWorldPos.x + forearmWorldOffset.x;
|
||||
sGanondorfCape->rightForearmPos.y = sGanondorfNeckWorldPos.y + forearmWorldOffset.y;
|
||||
sGanondorfCape->rightForearmPos.z = sGanondorfNeckWorldPos.z + forearmWorldOffset.z;
|
||||
forearmModelOffset.x = -(KREG(16) - 13.0f);
|
||||
Matrix_MultVec3f(&forearmModelOffset, &forearmWorldOffset);
|
||||
sGanondorfCape->leftForearmPos.x = sGanondorfNeckWorldPos.x + forearmWorldOffset.x;
|
||||
sGanondorfCape->leftForearmPos.y = sGanondorfNeckWorldPos.y + forearmWorldOffset.y;
|
||||
sGanondorfCape->leftForearmPos.z = sGanondorfNeckWorldPos.z + forearmWorldOffset.z;
|
||||
if ((this->actor.params >> 8) != ENVIEWER_TYPE_5_GANONDORF) {
|
||||
return;
|
||||
}
|
||||
|
||||
sGanondorfCape->backPush = BREG(54) / 10.0f;
|
||||
sGanondorfCape->backSwayMagnitude = (BREG(60) + 25) / 100.0f;
|
||||
sGanondorfCape->sideSwayMagnitude = (BREG(55) - 45) / 10.0f;
|
||||
sGanondorfCape->minY = -10000.0f;
|
||||
sGanondorfCape->minDist = 0.0f;
|
||||
sGanondorfCape->gravity = (BREG(67) - 10) / 10.0f;
|
||||
forearmModelOffset.x = KREG(16) - 13.0f;
|
||||
forearmModelOffset.y = KREG(17) + 3.0f + Math_SinS(yOscillationPhase) * KREG(20);
|
||||
forearmModelOffset.z = KREG(18) - 10.0f;
|
||||
yOscillationPhase += KREG(19) * 0x1000 + 0x2000;
|
||||
|
||||
Matrix_RotateY(BINANG_TO_RAD_ALT(this->actor.shape.rot.y), MTXMODE_NEW);
|
||||
Matrix_MultVec3f(&forearmModelOffset, &forearmWorldOffset);
|
||||
sGanondorfCape->rightForearmPos.x = sGanondorfNeckWorldPos.x + forearmWorldOffset.x;
|
||||
sGanondorfCape->rightForearmPos.y = sGanondorfNeckWorldPos.y + forearmWorldOffset.y;
|
||||
sGanondorfCape->rightForearmPos.z = sGanondorfNeckWorldPos.z + forearmWorldOffset.z;
|
||||
forearmModelOffset.x = -(KREG(16) - 13.0f);
|
||||
Matrix_MultVec3f(&forearmModelOffset, &forearmWorldOffset);
|
||||
sGanondorfCape->leftForearmPos.x = sGanondorfNeckWorldPos.x + forearmWorldOffset.x;
|
||||
sGanondorfCape->leftForearmPos.y = sGanondorfNeckWorldPos.y + forearmWorldOffset.y;
|
||||
sGanondorfCape->leftForearmPos.z = sGanondorfNeckWorldPos.z + forearmWorldOffset.z;
|
||||
}
|
||||
|
@ -55,20 +55,21 @@ void EnZo_SpawnBubble(EnZo* this, Vec3f* pos) {
|
||||
f32 waterSurface;
|
||||
|
||||
effect = this->effects;
|
||||
for (i = 0; i < EN_ZO_EFFECT_COUNT; i++) {
|
||||
if (1) {}
|
||||
if (effect->type == ENZO_EFFECT_NONE) {
|
||||
waterSurface = this->actor.world.pos.y + this->actor.yDistToWater;
|
||||
if (!(waterSurface <= pos->y)) {
|
||||
effect->type = ENZO_EFFECT_BUBBLE;
|
||||
effect->pos = *pos;
|
||||
effect->vec = *pos;
|
||||
effect->vel = vel;
|
||||
effect->scale = ((Rand_ZeroOne() - 0.5f) * 0.02f) + 0.12f;
|
||||
break;
|
||||
}
|
||||
for (i = 0; i < EN_ZO_EFFECT_COUNT; i++, effect++) {
|
||||
if (effect->type != ENZO_EFFECT_NONE) {
|
||||
continue;
|
||||
}
|
||||
|
||||
waterSurface = this->actor.world.pos.y + this->actor.yDistToWater;
|
||||
|
||||
if (!(waterSurface <= pos->y)) {
|
||||
effect->type = ENZO_EFFECT_BUBBLE;
|
||||
effect->pos = *pos;
|
||||
effect->vec = *pos;
|
||||
effect->vel = vel;
|
||||
effect->scale = ((Rand_ZeroOne() - 0.5f) * 0.02f) + 0.12f;
|
||||
break;
|
||||
}
|
||||
effect++;
|
||||
}
|
||||
}
|
||||
|
||||
@ -78,18 +79,17 @@ void EnZo_SpawnSplash(EnZo* this, Vec3f* pos, Vec3f* vel, f32 scale) {
|
||||
s16 i;
|
||||
|
||||
effect = this->effects;
|
||||
for (i = 0; i < EN_ZO_EFFECT_COUNT; i++) {
|
||||
if (1) {}
|
||||
if (effect->type != ENZO_EFFECT_SPLASH) {
|
||||
effect->type = ENZO_EFFECT_SPLASH;
|
||||
effect->pos = *pos;
|
||||
effect->vec = accel;
|
||||
effect->vel = *vel;
|
||||
effect->color.a = (Rand_ZeroOne() * 100.0f) + 100.0f;
|
||||
effect->scale = scale;
|
||||
break;
|
||||
for (i = 0; i < EN_ZO_EFFECT_COUNT; i++, effect++) {
|
||||
if (effect->type == ENZO_EFFECT_SPLASH) {
|
||||
continue;
|
||||
}
|
||||
effect++;
|
||||
effect->type = ENZO_EFFECT_SPLASH;
|
||||
effect->pos = *pos;
|
||||
effect->vec = accel;
|
||||
effect->vel = *vel;
|
||||
effect->color.a = (Rand_ZeroOne() * 100.0f) + 100.0f;
|
||||
effect->scale = scale;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -178,25 +178,27 @@ void EnZo_DrawEffectsRipples(EnZo* this, PlayState* play) {
|
||||
OPEN_DISPS(play->state.gfxCtx, "../z_en_zo_eff.c", 217);
|
||||
materialFlag = false;
|
||||
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
||||
for (i = 0; i < EN_ZO_EFFECT_COUNT; i++) {
|
||||
if (effect->type == ENZO_EFFECT_RIPPLE) {
|
||||
if (!materialFlag) {
|
||||
if (1) {}
|
||||
gDPPipeSync(POLY_XLU_DISP++);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gZoraRipplesMaterialDL);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 155, 155, 155, 0);
|
||||
materialFlag = true;
|
||||
}
|
||||
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, effect->color.a);
|
||||
Matrix_Translate(effect->pos.x, effect->pos.y, effect->pos.z, MTXMODE_NEW);
|
||||
Matrix_Scale(effect->scale, 1.0f, effect->scale, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_en_zo_eff.c", 242),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gZoraRipplesModelDL);
|
||||
for (i = 0; i < EN_ZO_EFFECT_COUNT; i++, effect++) {
|
||||
if (effect->type != ENZO_EFFECT_RIPPLE) {
|
||||
continue;
|
||||
}
|
||||
effect++;
|
||||
|
||||
if (!materialFlag) {
|
||||
gDPPipeSync(POLY_XLU_DISP++);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gZoraRipplesMaterialDL);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 155, 155, 155, 0);
|
||||
materialFlag = true;
|
||||
}
|
||||
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, effect->color.a);
|
||||
Matrix_Translate(effect->pos.x, effect->pos.y, effect->pos.z, MTXMODE_NEW);
|
||||
Matrix_Scale(effect->scale, 1.0f, effect->scale, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_en_zo_eff.c", 242),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gZoraRipplesModelDL);
|
||||
}
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx, "../z_en_zo_eff.c", 248);
|
||||
}
|
||||
|
||||
@ -208,27 +210,28 @@ void EnZo_DrawEffectsBubbles(EnZo* this, PlayState* play) {
|
||||
OPEN_DISPS(play->state.gfxCtx, "../z_en_zo_eff.c", 260);
|
||||
materialFlag = false;
|
||||
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
||||
for (i = 0; i < EN_ZO_EFFECT_COUNT; i++) {
|
||||
if (effect->type == ENZO_EFFECT_BUBBLE) {
|
||||
if (!materialFlag) {
|
||||
if (1) {}
|
||||
gSPDisplayList(POLY_XLU_DISP++, gZoraBubblesMaterialDL);
|
||||
gDPPipeSync(POLY_XLU_DISP++);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 150, 150, 150, 0);
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, 255);
|
||||
|
||||
materialFlag = true;
|
||||
}
|
||||
|
||||
Matrix_Translate(effect->pos.x, effect->pos.y, effect->pos.z, MTXMODE_NEW);
|
||||
Matrix_ReplaceRotation(&play->billboardMtxF);
|
||||
Matrix_Scale(effect->scale, effect->scale, 1.0f, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_en_zo_eff.c", 281),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gZoraBubblesModelDL);
|
||||
for (i = 0; i < EN_ZO_EFFECT_COUNT; i++, effect++) {
|
||||
if (effect->type != ENZO_EFFECT_BUBBLE) {
|
||||
continue;
|
||||
}
|
||||
effect++;
|
||||
|
||||
if (!materialFlag) {
|
||||
gSPDisplayList(POLY_XLU_DISP++, gZoraBubblesMaterialDL);
|
||||
gDPPipeSync(POLY_XLU_DISP++);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 150, 150, 150, 0);
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, 255);
|
||||
|
||||
materialFlag = true;
|
||||
}
|
||||
|
||||
Matrix_Translate(effect->pos.x, effect->pos.y, effect->pos.z, MTXMODE_NEW);
|
||||
Matrix_ReplaceRotation(&play->billboardMtxF);
|
||||
Matrix_Scale(effect->scale, effect->scale, 1.0f, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_en_zo_eff.c", 281),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gZoraBubblesModelDL);
|
||||
}
|
||||
CLOSE_DISPS(play->state.gfxCtx, "../z_en_zo_eff.c", 286);
|
||||
}
|
||||
@ -242,26 +245,25 @@ void EnZo_DrawEffectsSplashes(EnZo* this, PlayState* play) {
|
||||
OPEN_DISPS(play->state.gfxCtx, "../z_en_zo_eff.c", 298);
|
||||
materialFlag = false;
|
||||
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
||||
for (i = 0; i < EN_ZO_EFFECT_COUNT; i++) {
|
||||
if (effect->type == ENZO_EFFECT_SPLASH) {
|
||||
if (!materialFlag) {
|
||||
if (1) {}
|
||||
gSPDisplayList(POLY_XLU_DISP++, gZoraSplashesMaterialDL);
|
||||
gDPPipeSync(POLY_XLU_DISP++);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 200, 200, 200, 0);
|
||||
materialFlag = true;
|
||||
}
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 180, 180, 180, effect->color.a);
|
||||
|
||||
Matrix_Translate(effect->pos.x, effect->pos.y, effect->pos.z, MTXMODE_NEW);
|
||||
Matrix_ReplaceRotation(&play->billboardMtxF);
|
||||
Matrix_Scale(effect->scale, effect->scale, 1.0f, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_en_zo_eff.c", 325),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
gSPDisplayList(POLY_XLU_DISP++, gZoraSplashesModelDL);
|
||||
for (i = 0; i < EN_ZO_EFFECT_COUNT; i++, effect++) {
|
||||
if (effect->type != ENZO_EFFECT_SPLASH) {
|
||||
continue;
|
||||
}
|
||||
effect++;
|
||||
if (!materialFlag) {
|
||||
gSPDisplayList(POLY_XLU_DISP++, gZoraSplashesMaterialDL);
|
||||
gDPPipeSync(POLY_XLU_DISP++);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 200, 200, 200, 0);
|
||||
materialFlag = true;
|
||||
}
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 180, 180, 180, effect->color.a);
|
||||
|
||||
Matrix_Translate(effect->pos.x, effect->pos.y, effect->pos.z, MTXMODE_NEW);
|
||||
Matrix_ReplaceRotation(&play->billboardMtxF);
|
||||
Matrix_Scale(effect->scale, effect->scale, 1.0f, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_en_zo_eff.c", 325),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
gSPDisplayList(POLY_XLU_DISP++, gZoraSplashesModelDL);
|
||||
}
|
||||
CLOSE_DISPS(play->state.gfxCtx, "../z_en_zo_eff.c", 331);
|
||||
}
|
||||
|
@ -4709,30 +4709,29 @@ void Fishing_DrawGroupFishes(PlayState* play) {
|
||||
scale = 0.00475f;
|
||||
}
|
||||
|
||||
if (1) {}
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx, "../z_fishing.c", 8048);
|
||||
|
||||
for (i = 0; i < GROUP_FISH_COUNT; i++) {
|
||||
if (fish->type != FS_GROUP_FISH_NONE) {
|
||||
if (materialFlag == 0) {
|
||||
gSPDisplayList(POLY_OPA_DISP++, gFishingGroupFishMaterialDL);
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 155, 155, 155, 255);
|
||||
materialFlag++;
|
||||
}
|
||||
|
||||
if (fish->shouldDraw) {
|
||||
Matrix_Translate(fish->pos.x, fish->pos.y, fish->pos.z, MTXMODE_NEW);
|
||||
Matrix_RotateY(BINANG_TO_RAD_ALT2((f32)fish->unk_3E), MTXMODE_APPLY);
|
||||
Matrix_RotateX(BINANG_TO_RAD_ALT2(-(f32)fish->unk_3C), MTXMODE_APPLY);
|
||||
Matrix_Scale(fish->scaleX * scale, scale, scale, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_fishing.c", 8093),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gFishingGroupFishModelDL);
|
||||
}
|
||||
for (i = 0; i < GROUP_FISH_COUNT; i++, fish++) {
|
||||
if (fish->type == FS_GROUP_FISH_NONE) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!materialFlag) {
|
||||
gSPDisplayList(POLY_OPA_DISP++, gFishingGroupFishMaterialDL);
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 155, 155, 155, 255);
|
||||
materialFlag++;
|
||||
}
|
||||
|
||||
if (fish->shouldDraw) {
|
||||
Matrix_Translate(fish->pos.x, fish->pos.y, fish->pos.z, MTXMODE_NEW);
|
||||
Matrix_RotateY(BINANG_TO_RAD_ALT2((f32)fish->unk_3E), MTXMODE_APPLY);
|
||||
Matrix_RotateX(BINANG_TO_RAD_ALT2(-(f32)fish->unk_3C), MTXMODE_APPLY);
|
||||
Matrix_Scale(fish->scaleX * scale, scale, scale, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_fishing.c", 8093),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gFishingGroupFishModelDL);
|
||||
}
|
||||
fish++;
|
||||
}
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx, "../z_fishing.c", 8099);
|
||||
|
Loading…
Reference in New Issue
Block a user