mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-21 06:21:16 +00:00
[ntsc-1.2] Match z_file_choose.c and z_boss_tw.c (#2146)
* Match z_file_choose.c * Match z_boss_tw.c * Format * end: -> close_disps:
This commit is contained in:
parent
ed870e051d
commit
8a3ba35070
7 changed files with 90 additions and 53 deletions
|
@ -3411,45 +3411,48 @@ void func_80942C70(Actor* thisx, PlayState* play) {
|
|||
|
||||
OPEN_DISPS(play->state.gfxCtx, "../z_boss_tw.c", 6765);
|
||||
|
||||
if (this->beamDist != 0.0f) {
|
||||
Matrix_Push();
|
||||
gSPSegment(POLY_XLU_DISP++, 0xC,
|
||||
Gfx_TexScroll(play->state.gfxCtx, 0, (u8)(this->work[CS_TIMER_1] * -0xF), 0x20, 0x40));
|
||||
alpha = this->beamScale * 100.0f * 255.0f;
|
||||
|
||||
if (this->actor.params == TW_KOUME) {
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 60, alpha);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, 128);
|
||||
} else {
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, alpha);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 100, 100, 255, 128);
|
||||
}
|
||||
|
||||
Matrix_Translate(this->beamOrigin.x, this->beamOrigin.y, this->beamOrigin.z, MTXMODE_NEW);
|
||||
Matrix_RotateY(this->beamYaw, MTXMODE_APPLY);
|
||||
Matrix_RotateX(this->beamPitch, MTXMODE_APPLY);
|
||||
Matrix_RotateZ(this->beamRoll, MTXMODE_APPLY);
|
||||
Matrix_Scale(this->beamScale, this->beamScale, (this->beamDist * 0.01f * 98.0f) / 20000.0f, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_boss_tw.c", 6846),
|
||||
G_MTX_LOAD | G_MTX_MODELVIEW | G_MTX_NOPUSH);
|
||||
gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gTwinrovaBeamDL));
|
||||
|
||||
if (this->beamReflectionDist > 10.0f) {
|
||||
Matrix_Translate(this->beamReflectionOrigin.x, this->beamReflectionOrigin.y, this->beamReflectionOrigin.z,
|
||||
MTXMODE_NEW);
|
||||
Matrix_RotateY(this->beamReflectionYaw, MTXMODE_APPLY);
|
||||
Matrix_RotateX(this->beamReflectionPitch, MTXMODE_APPLY);
|
||||
Matrix_RotateZ(this->beamRoll, MTXMODE_APPLY);
|
||||
Matrix_Scale(this->beamScale, this->beamScale, (this->beamReflectionDist * 0.01f * 100.0f) / 20000.0f,
|
||||
MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_boss_tw.c", 6870),
|
||||
G_MTX_LOAD | G_MTX_MODELVIEW | G_MTX_NOPUSH);
|
||||
gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gTwinrovaBeamDL));
|
||||
}
|
||||
|
||||
Matrix_Pop();
|
||||
if (this->beamDist == 0.0f) {
|
||||
goto close_disps;
|
||||
}
|
||||
|
||||
Matrix_Push();
|
||||
gSPSegment(POLY_XLU_DISP++, 0xC,
|
||||
Gfx_TexScroll(play->state.gfxCtx, 0, (u8)(this->work[CS_TIMER_1] * -0xF), 0x20, 0x40));
|
||||
alpha = this->beamScale * 100.0f * 255.0f;
|
||||
|
||||
if (this->actor.params == TW_KOUME) {
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 60, alpha);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, 128);
|
||||
} else {
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, alpha);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 100, 100, 255, 128);
|
||||
}
|
||||
|
||||
Matrix_Translate(this->beamOrigin.x, this->beamOrigin.y, this->beamOrigin.z, MTXMODE_NEW);
|
||||
Matrix_RotateY(this->beamYaw, MTXMODE_APPLY);
|
||||
Matrix_RotateX(this->beamPitch, MTXMODE_APPLY);
|
||||
Matrix_RotateZ(this->beamRoll, MTXMODE_APPLY);
|
||||
Matrix_Scale(this->beamScale, this->beamScale, (this->beamDist * 0.01f * 98.0f) / 20000.0f, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_boss_tw.c", 6846),
|
||||
G_MTX_LOAD | G_MTX_MODELVIEW | G_MTX_NOPUSH);
|
||||
gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gTwinrovaBeamDL));
|
||||
|
||||
if (this->beamReflectionDist > 10.0f) {
|
||||
Matrix_Translate(this->beamReflectionOrigin.x, this->beamReflectionOrigin.y, this->beamReflectionOrigin.z,
|
||||
MTXMODE_NEW);
|
||||
Matrix_RotateY(this->beamReflectionYaw, MTXMODE_APPLY);
|
||||
Matrix_RotateX(this->beamReflectionPitch, MTXMODE_APPLY);
|
||||
Matrix_RotateZ(this->beamRoll, MTXMODE_APPLY);
|
||||
Matrix_Scale(this->beamScale, this->beamScale, (this->beamReflectionDist * 0.01f * 100.0f) / 20000.0f,
|
||||
MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_boss_tw.c", 6870),
|
||||
G_MTX_LOAD | G_MTX_MODELVIEW | G_MTX_NOPUSH);
|
||||
gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gTwinrovaBeamDL));
|
||||
}
|
||||
|
||||
Matrix_Pop();
|
||||
|
||||
close_disps:
|
||||
CLOSE_DISPS(play->state.gfxCtx, "../z_boss_tw.c", 6878);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue