mirror of
https://github.com/HarbourMasters/Starship
synced 2026-08-16 05:29:13 -04:00
Docs relating to fox_360. Also a UB fix in audio_load. (#215)
* docs * format * format plz
This commit is contained in:
+383
-356
File diff suppressed because it is too large
Load Diff
@@ -2,10 +2,11 @@
|
||||
|
||||
void func_800A3CA0(void) {
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_LookAt(gGfxMatrix, gCsCamEyeX, gCsCamEyeY, gCsCamEyeZ, gCsCamAtX, gCsCamAtY, gCsCamAtZ, 0.0f, 1.0f, 0.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -200.0f, 1);
|
||||
Matrix_RotateY(gGfxMatrix, gControllerPress[gPlayerNum].stick_x * M_DTOR, 1);
|
||||
Matrix_RotateX(gGfxMatrix, gControllerPress[gPlayerNum].stick_y * M_DTOR, 1);
|
||||
Matrix_LookAt(gGfxMatrix, gCsCamEyeX, gCsCamEyeY, gCsCamEyeZ, gCsCamAtX, gCsCamAtY, gCsCamAtZ, 0.0f, 1.0f, 0.0f,
|
||||
MTXF_APPLY);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -200.0f, MTXF_APPLY);
|
||||
Matrix_RotateY(gGfxMatrix, gControllerPress[gPlayerNum].stick_x * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateX(gGfxMatrix, gControllerPress[gPlayerNum].stick_y * M_DTOR, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
RCP_SetupDL_23();
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
|
||||
+139
-135
@@ -281,12 +281,12 @@ s32 func_beam_80036874(PlayerShot* shot, f32* hitboxData, Object* obj) {
|
||||
shotPy = shot->obj.pos.y;
|
||||
shotPz = shot->obj.pos.z;
|
||||
} else {
|
||||
Matrix_RotateZ(gCalcMatrix, -boxRotZ * M_DTOR, 0);
|
||||
Matrix_RotateX(gCalcMatrix, -boxRotX * M_DTOR, 1);
|
||||
Matrix_RotateY(gCalcMatrix, -boxRotY * M_DTOR, 1);
|
||||
Matrix_RotateZ(gCalcMatrix, -obj->rot.z * M_DTOR, 1);
|
||||
Matrix_RotateX(gCalcMatrix, -obj->rot.x * M_DTOR, 1);
|
||||
Matrix_RotateY(gCalcMatrix, -obj->rot.y * M_DTOR, 1);
|
||||
Matrix_RotateZ(gCalcMatrix, -boxRotZ * M_DTOR, MTXF_NEW);
|
||||
Matrix_RotateX(gCalcMatrix, -boxRotX * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateY(gCalcMatrix, -boxRotY * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateZ(gCalcMatrix, -obj->rot.z * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateX(gCalcMatrix, -obj->rot.x * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateY(gCalcMatrix, -obj->rot.y * M_DTOR, MTXF_APPLY);
|
||||
spAC.x = shot->obj.pos.x - obj->pos.x;
|
||||
spAC.y = shot->obj.pos.y - obj->pos.y;
|
||||
spAC.z = shot->obj.pos.z - obj->pos.z;
|
||||
@@ -379,24 +379,24 @@ s32 func_beam_80036F88(PlayerShot* shot, Actor* actor) {
|
||||
shotPz = shot->obj.pos.z;
|
||||
} else {
|
||||
if (hitboxData[0] == HITBOX_ROTATED) {
|
||||
Matrix_RotateZ(gCalcMatrix, -hitboxData[3] * M_DTOR, 0);
|
||||
Matrix_RotateX(gCalcMatrix, -hitboxData[1] * M_DTOR, 1);
|
||||
Matrix_RotateY(gCalcMatrix, -hitboxData[2] * M_DTOR, 1);
|
||||
Matrix_RotateZ(gCalcMatrix, -actor->obj.rot.z * M_DTOR, 1);
|
||||
Matrix_RotateX(gCalcMatrix, -actor->obj.rot.x * M_DTOR, 1);
|
||||
Matrix_RotateY(gCalcMatrix, -actor->obj.rot.y * M_DTOR, 1);
|
||||
Matrix_RotateZ(gCalcMatrix, -hitboxData[3] * M_DTOR, MTXF_NEW);
|
||||
Matrix_RotateX(gCalcMatrix, -hitboxData[1] * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateY(gCalcMatrix, -hitboxData[2] * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateZ(gCalcMatrix, -actor->obj.rot.z * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateX(gCalcMatrix, -actor->obj.rot.x * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateY(gCalcMatrix, -actor->obj.rot.y * M_DTOR, MTXF_APPLY);
|
||||
hitboxData += 4;
|
||||
} else {
|
||||
Matrix_RotateZ(gCalcMatrix, -actor->obj.rot.z * M_DTOR, 0);
|
||||
Matrix_RotateX(gCalcMatrix, -actor->obj.rot.x * M_DTOR, 1);
|
||||
Matrix_RotateY(gCalcMatrix, -actor->obj.rot.y * M_DTOR, 1);
|
||||
Matrix_RotateZ(gCalcMatrix, -actor->obj.rot.z * M_DTOR, MTXF_NEW);
|
||||
Matrix_RotateX(gCalcMatrix, -actor->obj.rot.x * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateY(gCalcMatrix, -actor->obj.rot.y * M_DTOR, MTXF_APPLY);
|
||||
}
|
||||
if (((actor->vwork[29].z != 0.0f) || (actor->vwork[29].x != 0.0f) || (actor->unk_0F4.z != 0.0f) ||
|
||||
(actor->vwork[29].y != 0.0f)) &&
|
||||
(actor->unk_0B4 != 31)) {
|
||||
Matrix_RotateZ(gCalcMatrix, -(actor->vwork[29].z + actor->unk_0F4.z) * M_DTOR, 1);
|
||||
Matrix_RotateX(gCalcMatrix, -actor->vwork[29].x * M_DTOR, 1);
|
||||
Matrix_RotateY(gCalcMatrix, -actor->vwork[29].y * M_DTOR, 1);
|
||||
Matrix_RotateZ(gCalcMatrix, -(actor->vwork[29].z + actor->unk_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);
|
||||
}
|
||||
sp7C.x = shot->obj.pos.x - actor->obj.pos.x;
|
||||
sp7C.y = shot->obj.pos.y - actor->obj.pos.y;
|
||||
@@ -427,8 +427,8 @@ bool func_beam_80037438(PlayerShot* shot, Actor* actor) {
|
||||
|
||||
if (((s32) hitboxData[0] != 0) && (sqrtf(SQ(temp_fv1) + SQ(temp_fa0)) <= 500.0f)) {
|
||||
if (shot->playerNum < 4) {
|
||||
temp_fv1 = actor->obj.pos.x - gPlayer[0].camEye.x;
|
||||
temp_fa0 = actor->obj.pos.z + D_ctx_80177D20 - gPlayer[0].camEye.z;
|
||||
temp_fv1 = actor->obj.pos.x - gPlayer[0].cam.eye.x;
|
||||
temp_fa0 = actor->obj.pos.z + D_ctx_80177D20 - gPlayer[0].cam.eye.z;
|
||||
var_fa1 = (sqrtf(SQ(temp_fv1) + SQ(temp_fa0)) / 50.0f) + 20.0f + 10.0f;
|
||||
if (var_fa1 > 200.0f) {
|
||||
var_fa1 = 200.0f;
|
||||
@@ -486,7 +486,7 @@ bool func_beam_8003774C(PlayerShot* shot, ObjectId objId, Object* obj) {
|
||||
// undefined behavior: if this check fails, the function returns no value
|
||||
if (((fabsf(sp7C.x) < 1100.0f) && (fabsf(sp7C.z) < 1100.0f) && (shot->obj.pos.y < 900.0f)) ||
|
||||
(objId == OBJ_BOSS_313) || (objId == ACTOR_EVENT_ID) || (objId == OBJ_80_39)) {
|
||||
Matrix_RotateY(gCalcMatrix, -obj->rot.y * M_DTOR, 0);
|
||||
Matrix_RotateY(gCalcMatrix, -obj->rot.y * M_DTOR, MTXF_NEW);
|
||||
sp7C.x = shot->obj.pos.x - obj->pos.x;
|
||||
sp7C.y = shot->obj.pos.y - obj->pos.y;
|
||||
sp7C.z = shot->obj.pos.z - obj->pos.z;
|
||||
@@ -614,7 +614,7 @@ bool func_beam_8003774C(PlayerShot* shot, ObjectId objId, Object* obj) {
|
||||
func_beam_80036318(shot);
|
||||
func_effect_8007A6F0(&shot->obj.pos, 0x29121007);
|
||||
if (gCurrentLevel == LEVEL_METEO) {
|
||||
Matrix_RotateY(gCalcMatrix, obj->rot.y * M_DTOR, 0);
|
||||
Matrix_RotateY(gCalcMatrix, obj->rot.y * M_DTOR, MTXF_NEW);
|
||||
sp7C.x = sp4C.x - obj->pos.x;
|
||||
sp7C.y = sp4C.y - obj->pos.y;
|
||||
sp7C.z = sp4C.z - obj->pos.z;
|
||||
@@ -701,8 +701,8 @@ void func_beam_80037CF4(PlayerShot* shot, Actor* actor, s32 hitIndex) {
|
||||
shot->unk_64 = 25;
|
||||
shot->obj.rot.y += 90.0f;
|
||||
shot->obj.rot.x = RAND_FLOAT(360.0f);
|
||||
Matrix_RotateY(gCalcMatrix, shot->obj.rot.y * M_DTOR, 0);
|
||||
Matrix_RotateX(gCalcMatrix, shot->obj.rot.x * M_DTOR, 1);
|
||||
Matrix_RotateY(gCalcMatrix, shot->obj.rot.y * M_DTOR, MTXF_NEW);
|
||||
Matrix_RotateX(gCalcMatrix, shot->obj.rot.x * M_DTOR, MTXF_APPLY);
|
||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp44, &sp38);
|
||||
shot->vel.x = sp38.x;
|
||||
shot->vel.y = sp38.y;
|
||||
@@ -839,15 +839,15 @@ void func_beam_80038140(PlayerShot* shot) {
|
||||
}
|
||||
test.z = test.x;
|
||||
if ((i != shot->playerNum) &&
|
||||
((player->state_1C8 == PLAYERSTATE_1C8_3) || (player->state_1C8 == PLAYERSTATE_1C8_4)) &&
|
||||
((player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (player->state_1C8 == PLAYERSTATE_1C8_DOWN)) &&
|
||||
(fabsf(player->unk_138 - shot->obj.pos.z) < test.z) &&
|
||||
(fabsf(player->pos.x - shot->obj.pos.x) < test.x) &&
|
||||
(fabsf(player->pos.y - shot->obj.pos.y) < test.y)) {
|
||||
if (player->unk_280 >= 100) {
|
||||
shot->obj.rot.y = player->unk_0E8 + player->unk_114 + 180.0f + 90.0f;
|
||||
shot->obj.rot.x = RAND_FLOAT(360.0f);
|
||||
Matrix_RotateY(gCalcMatrix, shot->obj.rot.y * M_DTOR, 0);
|
||||
Matrix_RotateX(gCalcMatrix, shot->obj.rot.x * M_DTOR, 1);
|
||||
Matrix_RotateY(gCalcMatrix, shot->obj.rot.y * M_DTOR, MTXF_NEW);
|
||||
Matrix_RotateX(gCalcMatrix, shot->obj.rot.x * M_DTOR, MTXF_APPLY);
|
||||
sp88.x = sp88.y = 0.0f;
|
||||
sp88.z = -133.33333f;
|
||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp88, &sp7C);
|
||||
@@ -1031,7 +1031,7 @@ void func_beam_80038F34(PlayerShot* shot) {
|
||||
Vec3f sp4C = { 0.0f, 0.0f, 0.0f };
|
||||
s32 sp48 = 0;
|
||||
|
||||
Matrix_Translate(gGfxMatrix, shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z + D_ctx_80177D20, 1);
|
||||
Matrix_Translate(gGfxMatrix, shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z + D_ctx_80177D20, MTXF_APPLY);
|
||||
Matrix_MultVec3f(gGfxMatrix, &sp4C, &D_beam_8015F950);
|
||||
if ((D_beam_8015F950.z < 0.0f) && (D_beam_8015F950.z > -10000.0f)) {
|
||||
if (fabsf(D_beam_8015F950.x) < (fabsf(D_beam_8015F950.z * 0.5f) + 500.0f)) {
|
||||
@@ -1046,11 +1046,11 @@ void func_beam_80038F34(PlayerShot* shot) {
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
shot->obj.rot.y = -gPlayer[gPlayerNum].unk_058;
|
||||
Matrix_RotateY(gGfxMatrix, shot->obj.rot.y, 1);
|
||||
Matrix_Scale(gGfxMatrix, 2.0f, 2.0f, 2.0f, 1);
|
||||
shot->obj.rot.y = -gPlayer[gPlayerNum].camYaw;
|
||||
Matrix_RotateY(gGfxMatrix, shot->obj.rot.y, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, 2.0f, 2.0f, 2.0f, MTXF_APPLY);
|
||||
if (shot->obj.id == PLAYERSHOT_7) {
|
||||
Matrix_Scale(gGfxMatrix, 0.2f, 0.2f, 0.2f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 0.2f, 0.2f, 0.2f, MTXF_APPLY);
|
||||
}
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
RCP_SetupDL_40();
|
||||
@@ -1062,7 +1062,7 @@ void func_beam_80038F34(PlayerShot* shot) {
|
||||
gSPDisplayList(gMasterDisp++, D_1025800);
|
||||
break;
|
||||
case 2:
|
||||
Matrix_Scale(gGfxMatrix, 1.5f, 0.7f, 1.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 1.5f, 0.7f, 1.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_1025800);
|
||||
break;
|
||||
@@ -1081,7 +1081,8 @@ void func_beam_80039210(PlayerShot* shot) {
|
||||
if (gCamCount < 4) {
|
||||
RCP_SetupDL_21();
|
||||
sp70 = 9.0f;
|
||||
if ((shot->unk_58 == 0) || ((gCurrentLevel == LEVEL_METEO) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_2))) {
|
||||
if ((shot->unk_58 == 0) ||
|
||||
((gCurrentLevel == LEVEL_METEO) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO))) {
|
||||
var_fv0 = 4.0f;
|
||||
var_fv1 = 20.0f;
|
||||
} else {
|
||||
@@ -1099,12 +1100,12 @@ void func_beam_80039210(PlayerShot* shot) {
|
||||
if (gCurrentLevel == LEVEL_AQUAS) {
|
||||
sp70 = 4.0f;
|
||||
}
|
||||
Matrix_Scale(gGfxMatrix, var_fv0, var_fv0, var_fv1, 1);
|
||||
Matrix_RotateY(gGfxMatrix, M_PI, 1);
|
||||
Matrix_Translate(gGfxMatrix, sp70, 0.f, 0.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, var_fv0, var_fv0, var_fv1, MTXF_APPLY);
|
||||
Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY);
|
||||
Matrix_Translate(gGfxMatrix, sp70, 0.f, 0.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, sp6C);
|
||||
Matrix_Translate(gGfxMatrix, -(2.0f * sp70), 0.0f, 0.f, 1);
|
||||
Matrix_Translate(gGfxMatrix, -(2.0f * sp70), 0.0f, 0.f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, sp6C);
|
||||
} else {
|
||||
@@ -1116,7 +1117,7 @@ void func_beam_80039210(PlayerShot* shot) {
|
||||
var_a1 = 2;
|
||||
}
|
||||
} else if (gCurrentLevel == LEVEL_KATINA) {
|
||||
if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_2) {
|
||||
if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO) {
|
||||
if (shot->playerNum >= 104) {
|
||||
if (gActors[shot->playerNum - 100].unk_0B6 == 0) {
|
||||
var_a1 = 1;
|
||||
@@ -1131,40 +1132,40 @@ void func_beam_80039210(PlayerShot* shot) {
|
||||
}
|
||||
switch (var_a1) {
|
||||
case 0:
|
||||
Matrix_Scale(gGfxMatrix, var_fv0, var_fv0, var_fv1, 1);
|
||||
Matrix_RotateY(gGfxMatrix, M_PI, 1);
|
||||
Matrix_Scale(gGfxMatrix, var_fv0, var_fv0, var_fv1, MTXF_APPLY);
|
||||
Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_101AED0);
|
||||
break;
|
||||
case 1:
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.f, 150.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 0.7f, 0.7f, 1.5f, 1);
|
||||
Matrix_RotateY(gGfxMatrix, M_PI, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.f, 150.0f, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, 0.7f, 0.7f, 1.5f, MTXF_APPLY);
|
||||
Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_101ABD0);
|
||||
break;
|
||||
case 2:
|
||||
Matrix_Scale(gGfxMatrix, var_fv0, var_fv0, var_fv1, 1);
|
||||
Matrix_RotateY(gGfxMatrix, M_PI, 1);
|
||||
Matrix_Translate(gGfxMatrix, 25.0f, 0.0f, 0.f, 1);
|
||||
Matrix_Scale(gGfxMatrix, var_fv0, var_fv0, var_fv1, MTXF_APPLY);
|
||||
Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY);
|
||||
Matrix_Translate(gGfxMatrix, 25.0f, 0.0f, 0.f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_101AED0);
|
||||
sp6C = D_101AED0;
|
||||
Matrix_Translate(gGfxMatrix, -50.0f, 0.0f, 0.f, 1);
|
||||
Matrix_Translate(gGfxMatrix, -50.0f, 0.0f, 0.f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, sp6C);
|
||||
break;
|
||||
case 3:
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, 50.0f, 0.0f, 150.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 0.7f, 0.7f, 1.5f, 1);
|
||||
Matrix_RotateY(gGfxMatrix, M_PI, 1);
|
||||
Matrix_Translate(gGfxMatrix, 50.0f, 0.0f, 150.0f, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, 0.7f, 0.7f, 1.5f, MTXF_APPLY);
|
||||
Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_101ABD0);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, -50.0f, 0.0f, 150.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 0.7f, 0.7f, 1.5f, 1);
|
||||
Matrix_RotateY(gGfxMatrix, M_PI, 1);
|
||||
Matrix_Translate(gGfxMatrix, -50.0f, 0.0f, 150.0f, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, 0.7f, 0.7f, 1.5f, MTXF_APPLY);
|
||||
Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_101ABD0);
|
||||
break;
|
||||
@@ -1186,14 +1187,14 @@ void func_beam_80039210(PlayerShot* shot) {
|
||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 32, 32, 255, 255);
|
||||
break;
|
||||
}
|
||||
Matrix_Scale(gGfxMatrix, 6.0f, 4.0f, 10.0f, 1);
|
||||
Matrix_RotateY(gGfxMatrix, M_PI, 1);
|
||||
Matrix_Scale(gGfxMatrix, 6.0f, 4.0f, 10.0f, MTXF_APPLY);
|
||||
Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
if (gLaserStrength[shot->playerNum] != LASERS_SINGLE) {
|
||||
Matrix_Translate(gGfxMatrix, 6.0f, 0.0f, 0.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, 6.0f, 0.0f, 0.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_versus_302D120);
|
||||
Matrix_Translate(gGfxMatrix, -12.0f, 0.0f, 0.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, -12.0f, 0.0f, 0.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_versus_302D120);
|
||||
} else {
|
||||
@@ -1212,7 +1213,7 @@ void func_beam_80039A50(PlayerShot* shot) {
|
||||
f32 var_fv1;
|
||||
s32 sp104 = 0;
|
||||
|
||||
Matrix_Translate(gGfxMatrix, shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z + D_ctx_80177D20, 1);
|
||||
Matrix_Translate(gGfxMatrix, shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z + D_ctx_80177D20, MTXF_APPLY);
|
||||
Matrix_MultVec3f(gGfxMatrix, &sp11C, &D_beam_8015F950);
|
||||
if ((D_beam_8015F950.z < 0.0f) && (D_beam_8015F950.z > -10000.0f)) {
|
||||
var_fv1 = fabsf(D_beam_8015F950.x); // probably fake. The use of temps was likely different
|
||||
@@ -1228,20 +1229,20 @@ void func_beam_80039A50(PlayerShot* shot) {
|
||||
}
|
||||
} else {
|
||||
if ((shot->obj.id == PLAYERSHOT_5) || (shot->obj.id == PLAYERSHOT_6) || (shot->obj.id == PLAYERSHOT_7)) {
|
||||
shot->obj.rot.y = RAD_TO_DEG(-gPlayer[gPlayerNum].unk_058);
|
||||
shot->obj.rot.x = RAD_TO_DEG(gPlayer[gPlayerNum].unk_05C);
|
||||
shot->obj.rot.y = RAD_TO_DEG(-gPlayer[gPlayerNum].camYaw);
|
||||
shot->obj.rot.x = RAD_TO_DEG(gPlayer[gPlayerNum].camPitch);
|
||||
}
|
||||
if (shot->obj.id != PLAYERSHOT_2) {
|
||||
Matrix_RotateY(gGfxMatrix, shot->obj.rot.y * M_DTOR, 1);
|
||||
Matrix_RotateX(gGfxMatrix, shot->obj.rot.x * M_DTOR, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, shot->obj.rot.z * M_DTOR, 1);
|
||||
Matrix_RotateY(gGfxMatrix, shot->obj.rot.y * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateX(gGfxMatrix, shot->obj.rot.x * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateZ(gGfxMatrix, shot->obj.rot.z * M_DTOR, MTXF_APPLY);
|
||||
if ((shot->obj.id == PLAYERSHOT_3) && (shot->unk_5C == 0)) {
|
||||
Matrix_RotateZ(gGfxMatrix, shot->unk_34 * M_DTOR, 1);
|
||||
Matrix_RotateY(gGfxMatrix, shot->unk_30 * M_DTOR, 1);
|
||||
Matrix_RotateX(gGfxMatrix, shot->unk_2C * M_DTOR, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, shot->unk_34 * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateY(gGfxMatrix, shot->unk_30 * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateX(gGfxMatrix, shot->unk_2C * M_DTOR, MTXF_APPLY);
|
||||
}
|
||||
}
|
||||
Matrix_Translate(gGfxMatrix, 0.f, 0.f, D_800C9BD8[shot->obj.id], 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.f, 0.f, D_800C9BD8[shot->obj.id], MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
switch (shot->obj.id) {
|
||||
case PLAYERSHOT_0:
|
||||
@@ -1254,14 +1255,15 @@ void func_beam_80039A50(PlayerShot* shot) {
|
||||
gSPDisplayList(gMasterDisp++, D_10231A0);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z + D_ctx_80177D20, 1);
|
||||
Matrix_RotateY(gGfxMatrix, -gPlayer[gPlayerNum].unk_058, 1);
|
||||
Matrix_RotateX(gGfxMatrix, gPlayer[gPlayerNum].unk_05C, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 40.0f * M_DTOR, 1);
|
||||
Matrix_Translate(gGfxMatrix, shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z + D_ctx_80177D20,
|
||||
MTXF_APPLY);
|
||||
Matrix_RotateY(gGfxMatrix, -gPlayer[gPlayerNum].camYaw, MTXF_APPLY);
|
||||
Matrix_RotateX(gGfxMatrix, gPlayer[gPlayerNum].camPitch, MTXF_APPLY);
|
||||
Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 40.0f * M_DTOR, MTXF_APPLY);
|
||||
if (((gGameFrameCount % 2) == 0)) {
|
||||
Matrix_Scale(gGfxMatrix, 1.7f, 1.7f, 1.7f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 1.7f, 1.7f, 1.7f, MTXF_APPLY);
|
||||
} else {
|
||||
Matrix_Scale(gGfxMatrix, 1.2f, 1.2f, 1.2f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 1.2f, 1.2f, 1.2f, MTXF_APPLY);
|
||||
}
|
||||
RCP_SetupDL(&gMasterDisp, 0x31);
|
||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255);
|
||||
@@ -1286,7 +1288,7 @@ void func_beam_80039A50(PlayerShot* shot) {
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_1024AC0);
|
||||
} else {
|
||||
Matrix_Scale(gGfxMatrix, shot->unk_44, shot->unk_44, shot->unk_44, 1);
|
||||
Matrix_Scale(gGfxMatrix, shot->unk_44, shot->unk_44, shot->unk_44, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
if (gVersusMode) {
|
||||
RCP_SetupDL_49();
|
||||
@@ -1321,17 +1323,17 @@ void func_beam_80039A50(PlayerShot* shot) {
|
||||
D_800C9C08[shot->playerNum], 255);
|
||||
RCP_SetupDL(&gMasterDisp, 0x31);
|
||||
if (gLaserStrength[shot->playerNum] != LASERS_SINGLE) {
|
||||
Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 48.0f * M_DTOR, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 48.0f * M_DTOR, MTXF_APPLY);
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, 0.f, 50.0f, 0.0f, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 70.0f * M_DTOR, 1);
|
||||
Matrix_Scale(gGfxMatrix, 2.0f, 2.0f, 2.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.f, 50.0f, 0.0f, MTXF_APPLY);
|
||||
Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 70.0f * M_DTOR, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, 2.0f, 2.0f, 2.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_versus_301AD60);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, -50.0f, 0.0f, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 70.0f * M_DTOR, 1);
|
||||
Matrix_Scale(gGfxMatrix, 2.0f, 2.0f, 2.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, -50.0f, 0.0f, MTXF_APPLY);
|
||||
Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 70.0f * M_DTOR, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, 2.0f, 2.0f, 2.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_versus_301AD60);
|
||||
} else {
|
||||
@@ -1340,9 +1342,9 @@ void func_beam_80039A50(PlayerShot* shot) {
|
||||
} else {
|
||||
var_fv1 = 0.0f;
|
||||
}
|
||||
Matrix_RotateY(gGfxMatrix, var_fv1, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, 30.0f * M_DTOR, 1);
|
||||
Matrix_Scale(gGfxMatrix, 2.0f, 2.0f, 2.0f, 1);
|
||||
Matrix_RotateY(gGfxMatrix, var_fv1, MTXF_APPLY);
|
||||
Matrix_RotateZ(gGfxMatrix, 30.0f * M_DTOR, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, 2.0f, 2.0f, 2.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_versus_301AD60);
|
||||
}
|
||||
@@ -1352,9 +1354,9 @@ void func_beam_80039A50(PlayerShot* shot) {
|
||||
} else {
|
||||
var_fv1 = 0.0f;
|
||||
}
|
||||
Matrix_RotateY(gGfxMatrix, var_fv1, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, 30.0f * M_DTOR, 1);
|
||||
Matrix_Scale(gGfxMatrix, 1.0f, 0.65f, 1.0f, 1);
|
||||
Matrix_RotateY(gGfxMatrix, var_fv1, MTXF_APPLY);
|
||||
Matrix_RotateZ(gGfxMatrix, 30.0f * M_DTOR, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, 1.0f, 0.65f, 1.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
RCP_SetupDL_68();
|
||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255);
|
||||
@@ -1365,20 +1367,20 @@ void func_beam_80039A50(PlayerShot* shot) {
|
||||
break;
|
||||
case PLAYERSHOT_6:
|
||||
case PLAYERSHOT_7:
|
||||
Matrix_Scale(gGfxMatrix, shot->unk_44, shot->unk_44, shot->unk_44, 1);
|
||||
Matrix_Scale(gGfxMatrix, shot->unk_44, shot->unk_44, shot->unk_44, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
RCP_SetupDL(&gMasterDisp, 0x31);
|
||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255);
|
||||
gDPSetEnvColor(gMasterDisp++, D_800C9C00[shot->playerNum], D_800C9C04[shot->playerNum],
|
||||
D_800C9C08[shot->playerNum], 255);
|
||||
if (gLaserStrength[shot->playerNum] != LASERS_SINGLE) {
|
||||
Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 48.0f * M_DTOR, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 48.0f * M_DTOR, MTXF_APPLY);
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, 0.f, 40.0f, 0.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.f, 40.0f, 0.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_versus_301AEF0);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, 0.f, -40.0f, 0.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.f, -40.0f, 0.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_versus_301AEF0);
|
||||
} else {
|
||||
@@ -1386,15 +1388,16 @@ void func_beam_80039A50(PlayerShot* shot) {
|
||||
}
|
||||
break;
|
||||
case PLAYERSHOT_8:
|
||||
Matrix_RotateY(gGfxMatrix, M_PI, 1);
|
||||
Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
if (gCurrentLevel == LEVEL_AQUAS) {
|
||||
RCP_SetupDL(&gMasterDisp, 0x3C);
|
||||
gSPDisplayList(gMasterDisp++, D_AQ_600DB80);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, shot->obj.pos.x, gGroundLevel, shot->obj.pos.z + D_ctx_80177D20, 1);
|
||||
Matrix_Scale(gGfxMatrix, shot->unk_2C, shot->unk_30, shot->unk_34, 1);
|
||||
Matrix_Translate(gGfxMatrix, shot->obj.pos.x, gGroundLevel, shot->obj.pos.z + D_ctx_80177D20,
|
||||
MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, shot->unk_2C, shot->unk_30, shot->unk_34, MTXF_APPLY);
|
||||
RCP_SetupDL(&gMasterDisp, 0x31);
|
||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 32, 32, 0, shot->unk_58);
|
||||
gDPSetEnvColor(gMasterDisp++, 32, 16, 16, shot->unk_58);
|
||||
@@ -1405,11 +1408,11 @@ void func_beam_80039A50(PlayerShot* shot) {
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z + D_ctx_80177D20,
|
||||
1);
|
||||
Matrix_RotateY(gGfxMatrix, -gPlayer[gPlayerNum].unk_058, 1);
|
||||
Matrix_RotateX(gGfxMatrix, gPlayer[gPlayerNum].unk_05C, 1);
|
||||
MTXF_APPLY);
|
||||
Matrix_RotateY(gGfxMatrix, -gPlayer[gPlayerNum].camYaw, MTXF_APPLY);
|
||||
Matrix_RotateX(gGfxMatrix, gPlayer[gPlayerNum].camPitch, MTXF_APPLY);
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Scale(gGfxMatrix, 20.0f, 20.0f, 20.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 20.0f, 20.0f, 20.0f, MTXF_APPLY);
|
||||
RCP_SetupDL(&gMasterDisp, 0x31);
|
||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255);
|
||||
if (gVersusMode) {
|
||||
@@ -1430,17 +1433,17 @@ void func_beam_80039A50(PlayerShot* shot) {
|
||||
} else {
|
||||
gDPSetEnvColor(gMasterDisp++, 0, 255, 0, 255);
|
||||
}
|
||||
Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 53.0f * M_DTOR, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 53.0f * M_DTOR, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_101C2E0);
|
||||
Matrix_RotateZ(gGfxMatrix, gGameFrameCount * -53.0f * 2.0f * M_DTOR, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, gGameFrameCount * -53.0f * 2.0f * M_DTOR, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_101C2E0);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
if (((gGameFrameCount % 2) == 0)) {
|
||||
Matrix_Scale(gGfxMatrix, 1.7f, 1.7f, 1.7f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 1.7f, 1.7f, 1.7f, MTXF_APPLY);
|
||||
} else {
|
||||
Matrix_Scale(gGfxMatrix, 1.3f, 1.3f, 1.3f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 1.3f, 1.3f, 1.3f, MTXF_APPLY);
|
||||
}
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_1024AC0);
|
||||
@@ -1450,13 +1453,14 @@ void func_beam_80039A50(PlayerShot* shot) {
|
||||
gSPDisplayList(gMasterDisp++, D_10231A0);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z + D_ctx_80177D20, 1);
|
||||
Matrix_RotateY(gGfxMatrix, -gPlayer[gPlayerNum].unk_058, 1);
|
||||
Matrix_RotateX(gGfxMatrix, gPlayer[gPlayerNum].unk_05C, 1);
|
||||
Matrix_Translate(gGfxMatrix, shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z + D_ctx_80177D20,
|
||||
MTXF_APPLY);
|
||||
Matrix_RotateY(gGfxMatrix, -gPlayer[gPlayerNum].camYaw, MTXF_APPLY);
|
||||
Matrix_RotateX(gGfxMatrix, gPlayer[gPlayerNum].camPitch, MTXF_APPLY);
|
||||
if (((gGameFrameCount % 2) == 0)) {
|
||||
Matrix_Scale(gGfxMatrix, 1.2f, 1.2f, 1.2f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 1.2f, 1.2f, 1.2f, MTXF_APPLY);
|
||||
} else {
|
||||
Matrix_Scale(gGfxMatrix, 1.5f, 1.5f, 1.5f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 1.5f, 1.5f, 1.5f, MTXF_APPLY);
|
||||
}
|
||||
RCP_SetupDL(&gMasterDisp, 0x31);
|
||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 0, 255);
|
||||
@@ -1466,8 +1470,8 @@ void func_beam_80039A50(PlayerShot* shot) {
|
||||
}
|
||||
break;
|
||||
case PLAYERSHOT_9:
|
||||
Matrix_RotateY(gGfxMatrix, M_PI, 1);
|
||||
Matrix_Scale(gGfxMatrix, 3.0f, 3.0f, 20.0f, 1);
|
||||
Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, 3.0f, 3.0f, 20.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
RCP_SetupDL_40();
|
||||
gSPDisplayList(gMasterDisp++, D_GREAT_FOX_E00DFB0);
|
||||
@@ -1501,10 +1505,10 @@ void func_beam_8003B00C(PlayerShot* shot, Player* player) {
|
||||
Vec3f sp38;
|
||||
switch (shot->unk_5C) {
|
||||
case 0:
|
||||
Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, 0);
|
||||
Matrix_RotateX(gCalcMatrix, -(player->unk_0E4 * M_DTOR), 1);
|
||||
Matrix_RotateZ(gCalcMatrix, -((player->unk_0F8 + player->unk_0F0) * M_DTOR), 1);
|
||||
Matrix_Translate(gCalcMatrix, player->unk_084, player->unk_080, 0.0f, 1);
|
||||
Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, MTXF_NEW);
|
||||
Matrix_RotateX(gCalcMatrix, -(player->unk_0E4 * M_DTOR), MTXF_APPLY);
|
||||
Matrix_RotateZ(gCalcMatrix, -((player->unk_0F8 + player->unk_0F0) * M_DTOR), MTXF_APPLY);
|
||||
Matrix_Translate(gCalcMatrix, player->unk_084, player->unk_080, 0.0f, MTXF_APPLY);
|
||||
sp5C.x = 0.0f;
|
||||
sp5C.y = 0.0f;
|
||||
sp5C.z = player->unk_0D0 + 200.0f;
|
||||
@@ -1605,9 +1609,9 @@ void func_beam_8003B55C(PlayerShot* shot, s32 index) {
|
||||
if ((gCamCount != 4) && (gCurrentLevel != LEVEL_AQUAS)) {
|
||||
if ((shot->playerNum == 0) && (gLaserStrength[0] != LASERS_SINGLE) &&
|
||||
(gPlayer[0].form != FORM_LANDMASTER)) {
|
||||
Matrix_RotateY(gCalcMatrix, shot->obj.rot.y * M_DTOR, 0);
|
||||
Matrix_RotateX(gCalcMatrix, shot->obj.rot.x * M_DTOR, 1);
|
||||
Matrix_RotateZ(gCalcMatrix, shot->obj.rot.z * M_DTOR, 1);
|
||||
Matrix_RotateY(gCalcMatrix, shot->obj.rot.y * M_DTOR, MTXF_NEW);
|
||||
Matrix_RotateX(gCalcMatrix, shot->obj.rot.x * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateZ(gCalcMatrix, shot->obj.rot.z * M_DTOR, MTXF_APPLY);
|
||||
sp44.y = sp44.z = 0.0f;
|
||||
sp44.x = 40.0f;
|
||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp44, &sp38);
|
||||
@@ -1708,8 +1712,8 @@ bool func_beam_8003BB4C(PlayerShot* shot) {
|
||||
}
|
||||
if (gVersusMode) {
|
||||
for (i = 0, player = gPlayer; i < gCamCount; i++, player++) {
|
||||
if ((player->state_1C8 == PLAYERSTATE_1C8_3) && (player->unk_4DC == 0) && (player->form != FORM_ON_FOOT) &&
|
||||
(i != shot->playerNum) && (D_ctx_80177B00[i][shot->playerNum] == 0) &&
|
||||
if ((player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (player->unk_4DC == 0) &&
|
||||
(player->form != FORM_ON_FOOT) && (i != shot->playerNum) && (D_ctx_80177B00[i][shot->playerNum] == 0) &&
|
||||
(fabsf(shot->obj.pos.x - player->pos.x) <= var_fa0) &&
|
||||
(fabsf(shot->obj.pos.y - player->pos.y) <= var_fa0) &&
|
||||
(fabsf(shot->obj.pos.z - player->unk_138) <= var_fa0)) {
|
||||
@@ -1773,17 +1777,17 @@ void func_beam_8003C008(PlayerShot* shot) {
|
||||
if (count != 0) {
|
||||
for (j = 0; j < count; j++, hitboxData += 6) {
|
||||
if (hitboxData[0] == HITBOX_ROTATED) {
|
||||
Matrix_RotateZ(gCalcMatrix, -hitboxData[3] * M_DTOR, 0);
|
||||
Matrix_RotateX(gCalcMatrix, -hitboxData[1] * M_DTOR, 1);
|
||||
Matrix_RotateY(gCalcMatrix, -hitboxData[2] * M_DTOR, 1);
|
||||
Matrix_RotateZ(gCalcMatrix, -boss->obj.rot.z * M_DTOR, 1);
|
||||
Matrix_RotateX(gCalcMatrix, -boss->obj.rot.x * M_DTOR, 1);
|
||||
Matrix_RotateY(gCalcMatrix, -boss->obj.rot.y * M_DTOR, 1);
|
||||
Matrix_RotateZ(gCalcMatrix, -hitboxData[3] * M_DTOR, MTXF_NEW);
|
||||
Matrix_RotateX(gCalcMatrix, -hitboxData[1] * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateY(gCalcMatrix, -hitboxData[2] * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateZ(gCalcMatrix, -boss->obj.rot.z * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateX(gCalcMatrix, -boss->obj.rot.x * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateY(gCalcMatrix, -boss->obj.rot.y * M_DTOR, MTXF_APPLY);
|
||||
hitboxData += 4;
|
||||
} else {
|
||||
Matrix_RotateZ(gCalcMatrix, -boss->obj.rot.z * M_DTOR, 0);
|
||||
Matrix_RotateX(gCalcMatrix, -boss->obj.rot.x * M_DTOR, 1);
|
||||
Matrix_RotateY(gCalcMatrix, -boss->obj.rot.y * M_DTOR, 1);
|
||||
Matrix_RotateZ(gCalcMatrix, -boss->obj.rot.z * M_DTOR, MTXF_NEW);
|
||||
Matrix_RotateX(gCalcMatrix, -boss->obj.rot.x * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateY(gCalcMatrix, -boss->obj.rot.y * M_DTOR, MTXF_APPLY);
|
||||
}
|
||||
if ((j == var_s6) && (hitboxData[1] > -100.0f) && (hitboxData[3] > -100.0f)) {
|
||||
sp8C.x = shot->obj.pos.x - boss->obj.pos.x;
|
||||
@@ -1961,7 +1965,7 @@ void func_beam_8003C4D0(PlayerShot* shot, s32 damage) {
|
||||
}
|
||||
if (gVersusMode) {
|
||||
for (i = 0, player = gPlayer; i < gCamCount; i++, player++) {
|
||||
if ((i != shot->playerNum) && (player->state_1C8 == PLAYERSTATE_1C8_3) && (player->unk_1F4 == 0)) {
|
||||
if ((i != shot->playerNum) && (player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (player->unk_1F4 == 0)) {
|
||||
sp68 = player->pos.x - shot->obj.pos.x;
|
||||
sp64 = player->pos.y - shot->obj.pos.y;
|
||||
sp60 = player->unk_138 - shot->obj.pos.z;
|
||||
@@ -2026,8 +2030,8 @@ void func_beam_8003CC08(PlayerShot* shot) {
|
||||
shot->obj.rot.y += 1.0f;
|
||||
Math_SmoothStepToF(&shot->unk_44, shot->unk_48, 0.05f, 1.5f, 0.001f);
|
||||
if ((shot->unk_64 > 0) && (shot->unk_64 < 30)) {
|
||||
if (!gVersusMode &&
|
||||
((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_5))) {
|
||||
if (!gVersusMode && ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) ||
|
||||
(gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN))) {
|
||||
test.x = gPlayer[0].pos.x - shot->obj.pos.x;
|
||||
test.y = gPlayer[0].pos.y - shot->obj.pos.y;
|
||||
test.z = gPlayer[0].unk_138 - shot->obj.pos.z;
|
||||
@@ -2091,7 +2095,7 @@ void func_beam_8003CF90(PlayerShot* shot) {
|
||||
}
|
||||
}
|
||||
for (i = 0, player = gPlayer; i < gCamCount; i++, player++) {
|
||||
if (((player->state_1C8 == PLAYERSTATE_1C8_3) || (player->state_1C8 == PLAYERSTATE_1C8_5)) &&
|
||||
if (((player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (player->state_1C8 == PLAYERSTATE_1C8_U_TURN)) &&
|
||||
(D_ctx_80177B00[i][shot->playerNum] != 0)) {
|
||||
var_a3 = 1;
|
||||
D_ctx_80177B00[i][shot->playerNum] = 2;
|
||||
@@ -2141,8 +2145,8 @@ void func_beam_8003CF90(PlayerShot* shot) {
|
||||
|
||||
shot->obj.rot.y = shot->unk_30;
|
||||
shot->obj.rot.x = shot->unk_2C;
|
||||
Matrix_RotateY(gCalcMatrix, shot->obj.rot.y * M_DTOR, 0);
|
||||
Matrix_RotateX(gCalcMatrix, shot->obj.rot.x * M_DTOR, 1);
|
||||
Matrix_RotateY(gCalcMatrix, shot->obj.rot.y * M_DTOR, MTXF_NEW);
|
||||
Matrix_RotateX(gCalcMatrix, shot->obj.rot.x * M_DTOR, MTXF_APPLY);
|
||||
sp44.x = sp44.y = 0.0f;
|
||||
sp44.z = -(shot->unk_54 + 40.0f);
|
||||
Matrix_MultVec3f(gCalcMatrix, &sp44, &sp38);
|
||||
@@ -2253,7 +2257,7 @@ void func_beam_8003D854(PlayerShot* shot) {
|
||||
break;
|
||||
case PLAYERSHOT_0:
|
||||
case PLAYERSHOT_1:
|
||||
if ((shot->unk_58 == 0) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_2)) {
|
||||
if ((shot->unk_58 == 0) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO)) {
|
||||
var_s5 = 4;
|
||||
} else {
|
||||
var_s5 = 3;
|
||||
|
||||
+146
-142
@@ -262,7 +262,7 @@ void func_bg_8003E1E8(void) {
|
||||
sp11C = gCurrentLevel;
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
if (D_ctx_80177C70 == 2) {
|
||||
Matrix_Scale(gGfxMatrix, 1.2f, 1.2f, 1.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 1.2f, 1.2f, 1.0f, MTXF_APPLY);
|
||||
}
|
||||
switch (var_s0) {
|
||||
case LEVELTYPE_PLANET:
|
||||
@@ -272,14 +272,14 @@ void func_bg_8003E1E8(void) {
|
||||
case LEVEL_KATINA:
|
||||
case LEVEL_VENOM_2:
|
||||
case LEVEL_VERSUS:
|
||||
sp134 = (gPlayer[gPlayerNum].unk_05C * -6000.0f) - (gPlayer[gPlayerNum].camEye.y * 0.4f);
|
||||
sp13C = Math_ModF(Math_RadToDeg(gPlayer[gPlayerNum].unk_058) * (-7280.0f / 360.0f) * 5.0f, 7280.0f);
|
||||
Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].unk_034 * M_DTOR, 1);
|
||||
Matrix_Translate(gGfxMatrix, sp13C, -2000.0f + sp134, -6000.0f, 1);
|
||||
sp134 = (gPlayer[gPlayerNum].camPitch * -6000.0f) - (gPlayer[gPlayerNum].cam.eye.y * 0.4f);
|
||||
sp13C = Math_ModF(Math_RadToDeg(gPlayer[gPlayerNum].camYaw) * (-7280.0f / 360.0f) * 5.0f, 7280.0f);
|
||||
Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].camRoll * M_DTOR, MTXF_APPLY);
|
||||
Matrix_Translate(gGfxMatrix, sp13C, -2000.0f + sp134, -6000.0f, MTXF_APPLY);
|
||||
if (gCurrentLevel == LEVEL_FORTUNA) {
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, -2000.0f, 0, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, -2000.0f, 0, MTXF_APPLY);
|
||||
} else if (gCurrentLevel == LEVEL_KATINA) {
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, -2500.0f, 0, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, -2500.0f, 0, MTXF_APPLY);
|
||||
}
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
switch (gCurrentLevel) {
|
||||
@@ -302,7 +302,7 @@ void func_bg_8003E1E8(void) {
|
||||
gSPDisplayList(gMasterDisp++, D_VE2_600F670);
|
||||
break;
|
||||
}
|
||||
Matrix_Translate(gGfxMatrix, 7280.0f, 0.0f, 0.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, 7280.0f, 0.0f, 0.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
switch (gCurrentLevel) {
|
||||
case LEVEL_VERSUS:
|
||||
@@ -327,10 +327,10 @@ void func_bg_8003E1E8(void) {
|
||||
break;
|
||||
case LEVEL_CORNERIA:
|
||||
case LEVEL_VENOM_1:
|
||||
sp134 = (gPlayer[gPlayerNum].unk_05C * -6000.0f) - (gPlayer[gPlayerNum].camEye.y * 0.6f);
|
||||
sp13C = Math_ModF(Math_RadToDeg(gPlayer[gPlayerNum].unk_058) * (-7280.0f / 360.0f) * 5.0f, 7280.0f);
|
||||
Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].unk_034 * M_DTOR, 1);
|
||||
Matrix_Translate(gGfxMatrix, sp13C, -2000.0f + sp134, -6000.0f, 1);
|
||||
sp134 = (gPlayer[gPlayerNum].camPitch * -6000.0f) - (gPlayer[gPlayerNum].cam.eye.y * 0.6f);
|
||||
sp13C = Math_ModF(Math_RadToDeg(gPlayer[gPlayerNum].camYaw) * (-7280.0f / 360.0f) * 5.0f, 7280.0f);
|
||||
Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].camRoll * M_DTOR, MTXF_APPLY);
|
||||
Matrix_Translate(gGfxMatrix, sp13C, -2000.0f + sp134, -6000.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
switch (gCurrentLevel) {
|
||||
case LEVEL_CORNERIA:
|
||||
@@ -340,7 +340,7 @@ void func_bg_8003E1E8(void) {
|
||||
gSPDisplayList(gMasterDisp++, D_VE1_60046F0);
|
||||
break;
|
||||
}
|
||||
Matrix_Translate(gGfxMatrix, 7280.0f, 0.0f, 0.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, 7280.0f, 0.0f, 0.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
switch (gCurrentLevel) {
|
||||
case LEVEL_CORNERIA:
|
||||
@@ -354,8 +354,8 @@ void func_bg_8003E1E8(void) {
|
||||
case LEVEL_VENOM_ANDROSS:
|
||||
if (D_ctx_80177AB0 != 6) {
|
||||
if ((D_ctx_80177AB0 == 2) || (D_ctx_80177AB0 == 7)) {
|
||||
Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].unk_034 * M_DTOR, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, -4000.0f, -7000.0f, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].camRoll * M_DTOR, MTXF_APPLY);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, -4000.0f, -7000.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_VE2_600F670);
|
||||
} else if ((D_ctx_80177AB0 == 3) || (D_ctx_80177AB0 == 4)) {
|
||||
@@ -372,15 +372,15 @@ void func_bg_8003E1E8(void) {
|
||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, (s32) D_bg_80161394, (s32) D_bg_80161394,
|
||||
(s32) D_bg_800C9C30);
|
||||
|
||||
sp134 = (gPlayer[gPlayerNum].unk_05C * -6000.0f) - (gPlayer[gPlayerNum].camEye.y * 0.4f);
|
||||
sp13C = Math_ModF(Math_RadToDeg(gPlayer[gPlayerNum].unk_058) * (-7280.0f / 360.0f) * 5.0f,
|
||||
sp134 = (gPlayer[gPlayerNum].camPitch * -6000.0f) - (gPlayer[gPlayerNum].cam.eye.y * 0.4f);
|
||||
sp13C = Math_ModF(Math_RadToDeg(gPlayer[gPlayerNum].camYaw) * (-7280.0f / 360.0f) * 5.0f,
|
||||
7280.0f);
|
||||
Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].unk_034 * M_DTOR, 1);
|
||||
Matrix_Translate(gGfxMatrix, sp13C, -2000.0f + sp134, -6000.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, -2500.0f, 0.0f, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].camRoll * M_DTOR, MTXF_APPLY);
|
||||
Matrix_Translate(gGfxMatrix, sp13C, -2000.0f + sp134, -6000.0f, MTXF_APPLY);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, -2500.0f, 0.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_VE2_60038E0);
|
||||
Matrix_Translate(gGfxMatrix, 7280.0f, 0.0f, 0.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, 7280.0f, 0.0f, 0.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_VE2_60038E0);
|
||||
} else {
|
||||
@@ -391,18 +391,19 @@ void func_bg_8003E1E8(void) {
|
||||
} else {
|
||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 255, 128, (s32) D_bg_800C9C30);
|
||||
}
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -290.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -290.0f, MTXF_APPLY);
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Scale(gGfxMatrix, 11.0f, 11.0f, 1.0f, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, (gPlayer[0].unk_034 + (gGameFrameCount * 1.5f)) * M_DTOR, 1);
|
||||
Matrix_Scale(gGfxMatrix, 11.0f, 11.0f, 1.0f, MTXF_APPLY);
|
||||
Matrix_RotateZ(gGfxMatrix, (gPlayer[0].camRoll + (gGameFrameCount * 1.5f)) * M_DTOR,
|
||||
MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_ANDROSS_C039208);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
if (D_ctx_80177AB0 != 5) {
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Scale(gGfxMatrix, 10.0f, 10.0f, 1.0f, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, (gPlayer[0].unk_034 + (gGameFrameCount * -1.3f)) * M_DTOR,
|
||||
1);
|
||||
Matrix_Scale(gGfxMatrix, 10.0f, 10.0f, 1.0f, MTXF_APPLY);
|
||||
Matrix_RotateZ(gGfxMatrix, (gPlayer[0].camRoll + (gGameFrameCount * -1.3f)) * M_DTOR,
|
||||
MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_ANDROSS_C039208);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
@@ -411,17 +412,17 @@ void func_bg_8003E1E8(void) {
|
||||
}
|
||||
break;
|
||||
case LEVEL_AQUAS:
|
||||
if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_2) {
|
||||
sp13C = ((Math_RadToDeg(gPlayer[gPlayerNum].unk_058) - gPlayer[gPlayerNum].unk_114));
|
||||
sp134 = (gPlayer[gPlayerNum].unk_05C * -7000.0f) - (gPlayer[gPlayerNum].camEye.y * 0.6f);
|
||||
if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) {
|
||||
sp13C = ((Math_RadToDeg(gPlayer[gPlayerNum].camYaw) - gPlayer[gPlayerNum].unk_114));
|
||||
sp134 = (gPlayer[gPlayerNum].camPitch * -7000.0f) - (gPlayer[gPlayerNum].cam.eye.y * 0.6f);
|
||||
sp13C = Math_ModF(sp13C * -40.44444f * 2.0f, 7280.0f); // close to 7280.0f / 180.0f
|
||||
RCP_SetupDL_17();
|
||||
Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].unk_034 * M_DTOR, 1);
|
||||
Matrix_Scale(gGfxMatrix, 1.5f, 1.0f, 1.0f, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].camRoll * M_DTOR, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, 1.5f, 1.0f, 1.0f, MTXF_APPLY);
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, sp13C, sp134, -7000.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, sp13C, sp134, -7000.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_2) {
|
||||
if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) {
|
||||
gSPDisplayList(gMasterDisp++, D_AQ_601AFF0);
|
||||
} else {
|
||||
gSPDisplayList(gMasterDisp++, D_AQ_601C080);
|
||||
@@ -432,9 +433,9 @@ void func_bg_8003E1E8(void) {
|
||||
} else {
|
||||
sp13C = -1.0f;
|
||||
}
|
||||
Matrix_Translate(gGfxMatrix, 7280.0f * sp13C, 0.0f, 0.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, 7280.0f * sp13C, 0.0f, 0.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_2) {
|
||||
if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) {
|
||||
gSPDisplayList(gMasterDisp++, D_AQ_601AFF0);
|
||||
|
||||
} else {
|
||||
@@ -447,29 +448,29 @@ void func_bg_8003E1E8(void) {
|
||||
case LEVEL_ZONESS:
|
||||
case LEVEL_MACBETH:
|
||||
case LEVEL_TITANIA:
|
||||
sp12C = Math_RadToDeg(gPlayer[gPlayerNum].unk_058) - gPlayer[gPlayerNum].unk_114;
|
||||
sp134 = (gPlayer[gPlayerNum].unk_05C * -7000.0f) - (gPlayer[gPlayerNum].camEye.y * 0.6f);
|
||||
sp12C = Math_RadToDeg(gPlayer[gPlayerNum].camYaw) - gPlayer[gPlayerNum].unk_114;
|
||||
sp134 = (gPlayer[gPlayerNum].camPitch * -7000.0f) - (gPlayer[gPlayerNum].cam.eye.y * 0.6f);
|
||||
sp13C = sp12C * -40.44444f * 2.0f; // close to 7280.0f / 180.0f
|
||||
if ((gCurrentLevel == LEVEL_TITANIA) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_2) &&
|
||||
if ((gCurrentLevel == LEVEL_TITANIA) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) &&
|
||||
(gPlayer[0].unk_1D0 < 3)) {
|
||||
D_bg_8015F968 += __sinf(gPlayer[0].unk_058) * 20.0f;
|
||||
D_bg_8015F968 += __sinf(gPlayer[0].camYaw) * 20.0f;
|
||||
sp13C += D_bg_8015F968;
|
||||
}
|
||||
if ((gCurrentLevel == LEVEL_SOLAR) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_2) &&
|
||||
(gPlayer[0].unk_1D0 >= 2) && (gPlayer[0].camEye.z <= -1900.0f)) {
|
||||
D_bg_8015F968 = __sinf(gPlayer[0].unk_05C) * 7000.0f;
|
||||
if ((gCurrentLevel == LEVEL_SOLAR) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) &&
|
||||
(gPlayer[0].unk_1D0 >= 2) && (gPlayer[0].cam.eye.z <= -1900.0f)) {
|
||||
D_bg_8015F968 = __sinf(gPlayer[0].camPitch) * 7000.0f;
|
||||
sp134 -= fabsf(D_bg_8015F968);
|
||||
}
|
||||
sp13C = Math_ModF(sp13C, 7280.0f);
|
||||
RCP_SetupDL_17();
|
||||
Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].unk_034 * M_DTOR, 1);
|
||||
Matrix_Scale(gGfxMatrix, 1.5f, 1.0f, 1.0f, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].camRoll * M_DTOR, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, 1.5f, 1.0f, 1.0f, MTXF_APPLY);
|
||||
if ((gCurrentLevel == LEVEL_TITANIA) || (gCurrentLevel == LEVEL_ZONESS)) {
|
||||
Matrix_Translate(gGfxMatrix, sp13C, -3000.0f + sp134, -7000.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, sp13C, -3000.0f + sp134, -7000.0f, MTXF_APPLY);
|
||||
} else if (gCurrentLevel == LEVEL_SOLAR) {
|
||||
Matrix_Translate(gGfxMatrix, sp13C, -3500.0f + sp134, -7000.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, sp13C, -3500.0f + sp134, -7000.0f, MTXF_APPLY);
|
||||
} else if (gCurrentLevel == LEVEL_MACBETH) {
|
||||
Matrix_Translate(gGfxMatrix, sp13C, -4000.0f + sp134, -7000.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, sp13C, -4000.0f + sp134, -7000.0f, MTXF_APPLY);
|
||||
}
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
if (gCurrentLevel == LEVEL_TITANIA) {
|
||||
@@ -486,7 +487,7 @@ void func_bg_8003E1E8(void) {
|
||||
} else {
|
||||
sp13C = -1.0f;
|
||||
}
|
||||
Matrix_Translate(gGfxMatrix, 7280.0f * sp13C, 0.0f, 0.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, 7280.0f * sp13C, 0.0f, 0.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
if (gCurrentLevel == LEVEL_TITANIA) {
|
||||
gSPDisplayList(gMasterDisp++, D_TI_6000A80);
|
||||
@@ -501,10 +502,10 @@ void func_bg_8003E1E8(void) {
|
||||
}
|
||||
break;
|
||||
case LEVELTYPE_SPACE:
|
||||
if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_8) {
|
||||
if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_ENTER_WARP_ZONE) {
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
sp12C = Math_RadToDeg(gPlayer[0].unk_058);
|
||||
sp130 = Math_RadToDeg(gPlayer[0].unk_05C);
|
||||
sp12C = Math_RadToDeg(gPlayer[0].camYaw);
|
||||
sp130 = Math_RadToDeg(gPlayer[0].camPitch);
|
||||
if (((sp12C < 45.0f) || (sp12C > 315.0f)) && ((sp130 < 40.0f) || (sp130 > 325.0f))) {
|
||||
RCP_SetupDL_36();
|
||||
sp138 = D_ctx_80178420;
|
||||
@@ -525,7 +526,7 @@ void func_bg_8003E1E8(void) {
|
||||
sp138 = Math_ModF(sp138 - 34.5f, 480.0f);
|
||||
sp134 = Math_ModF(sp134 + 19.0f, 360.0f);
|
||||
} else if (sp11C == LEVEL_BOLSE) {
|
||||
if ((gPlayer[0].state_1C8 != PLAYERSTATE_1C8_7) || (gPlayer[0].unk_1D0 < 10)) {
|
||||
if ((gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE) || (gPlayer[0].unk_1D0 < 10)) {
|
||||
sp134 = Math_ModF(sp134 + 360.0f - 100.0f, 360.0f);
|
||||
}
|
||||
} else {
|
||||
@@ -538,41 +539,43 @@ void func_bg_8003E1E8(void) {
|
||||
if ((sp130 > 180.0f) && (sp134 > 280.0f)) {
|
||||
sp134 = -(360.0f - sp134);
|
||||
}
|
||||
Matrix_RotateZ(gGfxMatrix, D_ctx_80178428, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, D_ctx_80178428, MTXF_APPLY);
|
||||
switch (sp11C) {
|
||||
case LEVEL_WARP_ZONE:
|
||||
if ((s32) D_bg_8015F960 != 0) {
|
||||
RCP_SetupDL_62();
|
||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, (s32) D_bg_8015F960);
|
||||
Matrix_Translate(gGfxMatrix, sp138 - 120.0f, -(sp134 - 120.0f), -290.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 1.7f, 1.7f, 1.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, sp138 - 120.0f, -(sp134 - 120.0f), -290.0f, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, 1.7f, 1.7f, 1.0f, MTXF_APPLY);
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_RotateZ(gGfxMatrix, -(f32) gGameFrameCount * 10.0f * M_DTOR, 1);
|
||||
Matrix_Scale(gGfxMatrix, 1.07f, 0.93f, 1.0f, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 10.0f * M_DTOR, 1);
|
||||
Matrix_Scale(gGfxMatrix, 1.07f, 0.93f, 1.0f, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, -(f32) gGameFrameCount * 10.0f * M_DTOR, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, 1.07f, 0.93f, 1.0f, MTXF_APPLY);
|
||||
Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 10.0f * M_DTOR, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, 1.07f, 0.93f, 1.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_WZ_7001540);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
}
|
||||
break;
|
||||
case LEVEL_METEO:
|
||||
if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7) && (gCsFrameCount > 260)) {
|
||||
Matrix_Translate(gGfxMatrix, sp138 - 120.0f, -(sp134 - 120.0f) - 30.0f, -290.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 1.0f, 1);
|
||||
if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) && (gCsFrameCount > 260)) {
|
||||
Matrix_Translate(gGfxMatrix, sp138 - 120.0f, -(sp134 - 120.0f) - 30.0f, -290.0f,
|
||||
MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 1.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_ME_600DDF0);
|
||||
} else if (D_ctx_80177D20 > 185668.0f) {
|
||||
Matrix_Translate(gGfxMatrix, sp138 - 120.0f, -(sp134 - 120.0f) - 130.0f, -290.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 0.4f, 0.4f, 1.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, sp138 - 120.0f, -(sp134 - 120.0f) - 130.0f, -290.0f,
|
||||
MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, 0.4f, 0.4f, 1.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_ME_600DDF0);
|
||||
}
|
||||
break;
|
||||
case LEVEL_SECTOR_X:
|
||||
if (gOverlayStage == 0) {
|
||||
Matrix_Translate(gGfxMatrix, sp138 - 120.0f, -(sp134 - 120.0f), -290.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 3.0f, 3.0f, 1.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, sp138 - 120.0f, -(sp134 - 120.0f), -290.0f, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, 3.0f, 3.0f, 1.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
RCP_SetupDL_62();
|
||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 192);
|
||||
@@ -580,8 +583,8 @@ void func_bg_8003E1E8(void) {
|
||||
}
|
||||
break;
|
||||
case LEVEL_TRAINING:
|
||||
Matrix_Translate(gGfxMatrix, sp138 - 120.0f, -(sp134 - 120.0f), -290.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 0.2f, 0.2f, 1.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, sp138 - 120.0f, -(sp134 - 120.0f), -290.0f, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, 0.2f, 0.2f, 1.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
RCP_SetupDL_62();
|
||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255);
|
||||
@@ -593,15 +596,15 @@ void func_bg_8003E1E8(void) {
|
||||
if (sp128 > 3.5f) {
|
||||
sp128 = 3.5f;
|
||||
}
|
||||
if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7) {
|
||||
if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) {
|
||||
sp128 = D_bg_8015F984;
|
||||
if (sp128 > 3.5f) {
|
||||
sp128 = 3.5f;
|
||||
}
|
||||
}
|
||||
sp128 = sp128;
|
||||
Matrix_Translate(gGfxMatrix, sp138 - 120.0f, -(sp134 - 120.0f), -290.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, sp128 * 0.75, sp128 * 0.75f, 1.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, sp138 - 120.0f, -(sp134 - 120.0f), -290.0f, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, sp128 * 0.75, sp128 * 0.75f, 1.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_A6_601BB40);
|
||||
break;
|
||||
@@ -610,31 +613,31 @@ void func_bg_8003E1E8(void) {
|
||||
if ((gCsFrameCount > 400) && (gNextPlanetPath == 0)) {
|
||||
sp128 = 0.75f;
|
||||
}
|
||||
Matrix_Translate(gGfxMatrix, sp138 - 120.0f, -(sp134 - 120.0f), -290.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, sp128, sp128, sp128, 1);
|
||||
Matrix_Translate(gGfxMatrix, sp138 - 120.0f, -(sp134 - 120.0f), -290.0f, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, sp128, sp128, sp128, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_FO_600B4B0);
|
||||
break;
|
||||
case LEVEL_BOLSE:
|
||||
sp128 = 1.0f;
|
||||
if ((gCsFrameCount > 500) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7)) {
|
||||
if ((gCsFrameCount > 500) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) {
|
||||
sp128 = 1.3f;
|
||||
}
|
||||
Matrix_Translate(gGfxMatrix, sp138 - 120.0f, -(sp134 - 120.0f), -290.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, sp128, sp128, sp128, 1);
|
||||
Matrix_Translate(gGfxMatrix, sp138 - 120.0f, -(sp134 - 120.0f), -290.0f, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, sp128, sp128, sp128, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_BO_600D190);
|
||||
break;
|
||||
case LEVEL_SECTOR_Z:
|
||||
Matrix_Translate(gGfxMatrix, sp138 - 120.0f, -(sp134 - 120.0f), -290.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 0.5f, 1);
|
||||
Matrix_RotateX(gGfxMatrix, M_PI / 2, 1);
|
||||
Matrix_Translate(gGfxMatrix, sp138 - 120.0f, -(sp134 - 120.0f), -290.0f, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 0.5f, MTXF_APPLY);
|
||||
Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_SZ_6002F80);
|
||||
break;
|
||||
case LEVEL_SECTOR_Y:
|
||||
Matrix_Translate(gGfxMatrix, sp138 - 120.0f, -(sp134 - 120.0f), -290.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 0.4f, 0.4f, 1.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, sp138 - 120.0f, -(sp134 - 120.0f), -290.0f, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, 0.4f, 0.4f, 1.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
RCP_SetupDL_62();
|
||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 192);
|
||||
@@ -657,9 +660,10 @@ void func_bg_8003E1E8(void) {
|
||||
*sp50 = RAND_FLOAT_SEEDED(480.0f) - 80.0f;
|
||||
*sp4C = RAND_FLOAT_SEEDED(360.0f) - 60.0f;
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, (*sp50 - 160.0f) * 10.0f, (*sp4C - 120.0f) * 10.0f, -5000.0f, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, sp48, 1);
|
||||
Matrix_Scale(gGfxMatrix, 10.0f, 1.0f, -D_ctx_80178414, 1);
|
||||
Matrix_Translate(gGfxMatrix, (*sp50 - 160.0f) * 10.0f, (*sp4C - 120.0f) * 10.0f, -5000.0f,
|
||||
MTXF_APPLY);
|
||||
Matrix_RotateZ(gGfxMatrix, sp48, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, 10.0f, 1.0f, -D_ctx_80178414, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_edisplay_800CFD80);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
@@ -689,21 +693,21 @@ void func_bg_80040450(void) {
|
||||
if (gPlayerFillScreenAlphas[gPlayerNum] > 300) {
|
||||
gPlayerFillScreenAlphas[gPlayerNum] = 0;
|
||||
}
|
||||
if (((gCurrentLevel == LEVEL_AQUAS) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_2)) ||
|
||||
(((gPlayer[gPlayerNum].state_1C8 == PLAYERSTATE_1C8_5) || (gLevelMode == LEVELMODE_ALL_RANGE) ||
|
||||
(gPlayer[gPlayerNum].state_1C8 == PLAYERSTATE_1C8_7)) &&
|
||||
if (((gCurrentLevel == LEVEL_AQUAS) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO)) ||
|
||||
(((gPlayer[gPlayerNum].state_1C8 == PLAYERSTATE_1C8_U_TURN) || (gLevelMode == LEVELMODE_ALL_RANGE) ||
|
||||
(gPlayer[gPlayerNum].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) &&
|
||||
(gLevelType == LEVELTYPE_PLANET) && (gCurrentLevel != LEVEL_TITANIA) && (gCurrentLevel != LEVEL_AQUAS))) {
|
||||
gPlayerFillScreenReds[gPlayerNum] = 128;
|
||||
gPlayerFillScreenGreens[gPlayerNum] = 128;
|
||||
gPlayerFillScreenBlues[gPlayerNum] = 128;
|
||||
sp44 = Math_RadToDeg(gPlayer[gPlayerNum].unk_058);
|
||||
var_fa0 = Math_RadToDeg(gPlayer[gPlayerNum].unk_05C);
|
||||
sp44 = Math_RadToDeg(gPlayer[gPlayerNum].camYaw);
|
||||
var_fa0 = Math_RadToDeg(gPlayer[gPlayerNum].camPitch);
|
||||
if (var_fa0 > 180.0f) {
|
||||
var_fa0 -= 360.0f;
|
||||
}
|
||||
sp44 -= 135.0f;
|
||||
D_ctx_801783D0 = -sp44 * 3.2f;
|
||||
D_ctx_801783D4 = ((-var_fa0 * 3.2f) + 130.0f) - ((gPlayer[gPlayerNum].camEye.y - 350.0f) * 0.015f);
|
||||
D_ctx_801783D4 = ((-var_fa0 * 3.2f) + 130.0f) - ((gPlayer[gPlayerNum].cam.eye.y - 350.0f) * 0.015f);
|
||||
if (gCurrentLevel == LEVEL_KATINA) {
|
||||
D_ctx_801783D4 -= 80.0f;
|
||||
}
|
||||
@@ -720,8 +724,8 @@ void func_bg_80040450(void) {
|
||||
}
|
||||
if (gPlayerFillScreenAlphas[gPlayerNum] != 0) {
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].unk_034 * M_DTOR, 1);
|
||||
Matrix_Translate(gGfxMatrix, D_ctx_801783D0, D_ctx_801783D4, -200.0f, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].camRoll * M_DTOR, MTXF_APPLY);
|
||||
Matrix_Translate(gGfxMatrix, D_ctx_801783D0, D_ctx_801783D4, -200.0f, MTXF_APPLY);
|
||||
RCP_SetupDL_62();
|
||||
var_s1 = D_bg_800C9D94;
|
||||
var_s2 = D_bg_800C9DE4;
|
||||
@@ -735,7 +739,7 @@ void func_bg_80040450(void) {
|
||||
}
|
||||
for (i = 0; i < 5; i++, var_s1++, var_s2++, var_s3++, var_s4++) {
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Scale(gGfxMatrix, *var_s4, *var_s4, *var_s4, 1);
|
||||
Matrix_Scale(gGfxMatrix, *var_s4, *var_s4, *var_s4, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, var_s1->r, var_s1->g, var_s1->b, *var_s2);
|
||||
gSPDisplayList(gMasterDisp++, *var_s3);
|
||||
@@ -767,8 +771,8 @@ void func_bg_80040954(void) {
|
||||
}
|
||||
var_fs2 *= D_bg_800C9E5C[gLevelType];
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].unk_034 * M_DTOR, 1);
|
||||
Matrix_Translate(gGfxMatrix, D_ctx_801783D0, D_ctx_801783D4, -200.0f, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].camRoll * M_DTOR, MTXF_APPLY);
|
||||
Matrix_Translate(gGfxMatrix, D_ctx_801783D0, D_ctx_801783D4, -200.0f, MTXF_APPLY);
|
||||
RCP_SetupDL_62();
|
||||
temp_fs0 = D_ctx_801783D0 * -0.03f;
|
||||
temp_fs1 = D_ctx_801783D4 * 0.03f;
|
||||
@@ -786,10 +790,10 @@ void func_bg_80040954(void) {
|
||||
}
|
||||
for (i = 5; i < 13; i++, var_s1++, var_s4++, var_s5++, var_s6++, var_s7++) {
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, *var_s7 * temp_fs0, *var_s7 * -temp_fs1, 0.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, *var_s6, *var_s6, *var_s6, 1);
|
||||
Matrix_Translate(gGfxMatrix, *var_s7 * temp_fs0, *var_s7 * -temp_fs1, 0.0f, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, *var_s6, *var_s6, *var_s6, MTXF_APPLY);
|
||||
if (((i == 5) || (i == 11)) && (gCurrentLevel != LEVEL_KATINA)) {
|
||||
Matrix_RotateX(gGfxMatrix, M_PI / 2, 1);
|
||||
Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY);
|
||||
}
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
var_fv0 = *var_s4;
|
||||
@@ -814,7 +818,7 @@ void func_bg_80040CE4(void) {
|
||||
u16* sp1C4;
|
||||
Gfx* sp1C0;
|
||||
|
||||
if ((gCurrentLevel != LEVEL_VENOM_2) && ((gPlayer[0].camEye.y > 4000.0f) || (D_ctx_80177A98 == 0))) {
|
||||
if ((gCurrentLevel != LEVEL_VENOM_2) && ((gPlayer[0].cam.eye.y > 4000.0f) || (D_ctx_80177A98 == 0))) {
|
||||
return;
|
||||
}
|
||||
if ((gCurrentLevel == LEVEL_BOLSE) && (D_bg_800C9C34 != 0)) {
|
||||
@@ -842,10 +846,10 @@ void func_bg_80040CE4(void) {
|
||||
sp1B4.x = 0;
|
||||
sp1B4.y = 0;
|
||||
sp1B4.z = -5500.0f;
|
||||
Matrix_RotateY(gCalcMatrix, -gPlayer[gPlayerNum].unk_058, 0);
|
||||
Matrix_RotateY(gCalcMatrix, -gPlayer[gPlayerNum].camYaw, MTXF_NEW);
|
||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp1B4, &sp1A8);
|
||||
temp_fv1 = gPlayer[gPlayerNum].camEye.x + sp1A8.x;
|
||||
temp_fa0 = gPlayer[gPlayerNum].camEye.z + sp1A8.z;
|
||||
temp_fv1 = gPlayer[gPlayerNum].cam.eye.x + sp1A8.x;
|
||||
temp_fa0 = gPlayer[gPlayerNum].cam.eye.z + sp1A8.z;
|
||||
if (temp_fv1 > 6000.0f) {
|
||||
gPlayer[gPlayerNum].unk_0AC = 12000.0f;
|
||||
}
|
||||
@@ -872,9 +876,9 @@ void func_bg_80040CE4(void) {
|
||||
}
|
||||
}
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, gPlayer[gPlayerNum].unk_0AC, -3.0f + gCameraShakeY, sp1D4, 1);
|
||||
Matrix_Translate(gGfxMatrix, gPlayer[gPlayerNum].unk_0AC, -3.0f + gCameraShakeY, sp1D4, MTXF_APPLY);
|
||||
if (D_ctx_80177C70 == 2) {
|
||||
Matrix_Scale(gGfxMatrix, 1.2f, 1.2f, 1.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 1.2f, 1.2f, 1.0f, MTXF_APPLY);
|
||||
}
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
switch (gCurrentLevel) {
|
||||
@@ -907,13 +911,13 @@ void func_bg_80040CE4(void) {
|
||||
break;
|
||||
}
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -3000.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 0.5f, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -3000.0f, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 0.5f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_CO_601B640);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 3000.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 0.5f, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 3000.0f, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 0.5f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_CO_601B640);
|
||||
} else {
|
||||
@@ -921,7 +925,7 @@ void func_bg_80040CE4(void) {
|
||||
gBgColor = 0x845; // 8, 8, 32
|
||||
for (i = 0; i < 4; i++) {
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, D_bg_800C9E64[i], 0.0f, D_bg_800C9E74[i], 1);
|
||||
Matrix_Translate(gGfxMatrix, D_bg_800C9E64[i], 0.0f, D_bg_800C9E74[i], MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_CO_601EAA0);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
@@ -953,14 +957,14 @@ void func_bg_80040CE4(void) {
|
||||
gDPSetupTile(gMasterDisp++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 32, temp_fv0, temp_s0,
|
||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 5, 5, G_TX_NOLOD, G_TX_NOLOD);
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -3000.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 0.5f, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -3000.0f, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 0.5f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, sp1C0);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 3000.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 0.5f, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 3000.0f, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 0.5f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, sp1C0);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
@@ -972,23 +976,23 @@ void func_bg_80040CE4(void) {
|
||||
D_ctx_80177CE8 -= 290.0f;
|
||||
}
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -3000.0f + D_ctx_80177CE8, 1);
|
||||
Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 0.5f, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -3000.0f + D_ctx_80177CE8, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 0.5f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_TR_6005880);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
if (1) {}
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 3000.0f + D_ctx_80177CE8, 1);
|
||||
Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 0.5f, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 3000.0f + D_ctx_80177CE8, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 0.5f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_TR_6005880);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
} else {
|
||||
for (i = 0; i < 4; i++) {
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, D_bg_800C9E64[i], 0.0f, D_bg_800C9E74[i], 1);
|
||||
Matrix_Scale(gGfxMatrix, 1.5f, 1.0f, 1.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, D_bg_800C9E64[i], 0.0f, D_bg_800C9E74[i], MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, 1.5f, 1.0f, 1.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_TR_6005880);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
@@ -1010,14 +1014,14 @@ void func_bg_80040CE4(void) {
|
||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 5, 5, G_TX_NOLOD, G_TX_NOLOD);
|
||||
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -3000.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 0.5f, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -3000.0f, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 0.5f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, sp1C0);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 3000.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 0.5f, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 3000.0f, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 0.5f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, sp1C0);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
@@ -1035,22 +1039,22 @@ void func_bg_80040CE4(void) {
|
||||
} else {
|
||||
RCP_SetupDL(&gMasterDisp, 0x25);
|
||||
}
|
||||
if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_2) && (gPlayer[0].unk_1D0 < 2)) {
|
||||
if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) && (gPlayer[0].unk_1D0 < 2)) {
|
||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255);
|
||||
} else if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7) {
|
||||
} else if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) {
|
||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, D_bg_8015F974, D_bg_8015F978, D_bg_8015F97C,
|
||||
D_bg_8015F980);
|
||||
} else {
|
||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, (s32) D_AQ_801C4188);
|
||||
}
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, D_bg_8015F970, -3000.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 2.0f, 1.0f, 0.5f, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, D_bg_8015F970, -3000.0f, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, 2.0f, 1.0f, 0.5f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_AQ_602AC40);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, D_bg_8015F970, 3000.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 2.0f, 1.0f, 0.5f, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, D_bg_8015F970, 3000.0f, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, 2.0f, 1.0f, 0.5f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_AQ_602AC40);
|
||||
}
|
||||
@@ -1066,7 +1070,7 @@ void func_bg_80040CE4(void) {
|
||||
}
|
||||
for (i = 0; i < 4; i++) {
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, D_bg_800C9E64[i], 0.0f, D_bg_800C9E74[i], 1);
|
||||
Matrix_Translate(gGfxMatrix, D_bg_800C9E64[i], 0.0f, D_bg_800C9E74[i], MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
if (gCurrentLevel == LEVEL_FORTUNA) {
|
||||
gSPDisplayList(gMasterDisp++, D_FO_6001360);
|
||||
@@ -1088,7 +1092,7 @@ void func_bg_80040CE4(void) {
|
||||
}
|
||||
for (i = 0; i < 4; i++) {
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, D_bg_800C9E64[i], 0.0f, D_bg_800C9E74[i], 1);
|
||||
Matrix_Translate(gGfxMatrix, D_bg_800C9E64[i], 0.0f, D_bg_800C9E74[i], MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
if (gVersusStage == VS_STAGE_CORNERIA) {
|
||||
gSPDisplayList(gMasterDisp++, D_versus_3018800);
|
||||
@@ -1100,8 +1104,8 @@ void func_bg_80040CE4(void) {
|
||||
break;
|
||||
case LEVEL_SOLAR:
|
||||
RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -2000.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 3.0f, 2.0f, 3.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -2000.0f, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, 3.0f, 2.0f, 3.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
if ((gGameFrameCount % 2) != 0) {
|
||||
gSPDisplayList(gMasterDisp++, D_SO_60005B0);
|
||||
@@ -1111,8 +1115,8 @@ void func_bg_80040CE4(void) {
|
||||
break;
|
||||
case LEVEL_ZONESS:
|
||||
RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -1500.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 3.0f, 2.0f, 3.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -1500.0f, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, 3.0f, 2.0f, 3.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
if ((gGameFrameCount % 2) != 0) {
|
||||
gSPDisplayList(gMasterDisp++, D_ZO_6008830);
|
||||
@@ -1128,15 +1132,15 @@ void func_bg_80042D38(void) {
|
||||
f32 xEye;
|
||||
f32 zEye;
|
||||
|
||||
if (!gPlayer[gPlayerNum].camEye.x) {}
|
||||
if (!gPlayer[gPlayerNum].camEye.y) {} // all sorts of fake
|
||||
if (!gPlayer[gPlayerNum].cam.eye.x) {}
|
||||
if (!gPlayer[gPlayerNum].cam.eye.y) {} // all sorts of fake
|
||||
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
xEye = gPlayer[gPlayerNum].camEye.x;
|
||||
xEye = gPlayer[gPlayerNum].cam.eye.x;
|
||||
if (0) {}
|
||||
zEye = gPlayer[gPlayerNum].camEye.z;
|
||||
Matrix_Translate(gGfxMatrix, xEye, 2.0f + gCameraShakeY, zEye, 1);
|
||||
Matrix_Scale(gGfxMatrix, 1.5f, 1.0f, 1.0f, 1);
|
||||
zEye = gPlayer[gPlayerNum].cam.eye.z;
|
||||
Matrix_Translate(gGfxMatrix, xEye, 2.0f + gCameraShakeY, zEye, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, 1.5f, 1.0f, 1.0f, MTXF_APPLY);
|
||||
RCP_SetupDL_37(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
|
||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 125);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
|
||||
@@ -108,7 +108,7 @@ void func_boss_8004319C(Player* player, f32 arg1, f32 arg2, f32 arg3) {
|
||||
D_ctx_80178440 = arg1;
|
||||
D_ctx_80178444 = arg2;
|
||||
|
||||
player->state_1C8 = PLAYERSTATE_1C8_7;
|
||||
player->state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE;
|
||||
player->unk_1D0 = 10;
|
||||
player->timer_1F8 = 50;
|
||||
player->timer_1FC = 50;
|
||||
|
||||
@@ -164,7 +164,7 @@ f32 D_ctx_80178470[3];
|
||||
f32 gCameraShakeY;
|
||||
s32 gCameraShake;
|
||||
s32 D_ctx_80178484;
|
||||
bool D_ctx_80178488;
|
||||
bool gLoadLevelObjects;
|
||||
UNK_TYPE F_8017848C;
|
||||
UNK_TYPE F_80178490;
|
||||
s32 D_ctx_80178494;
|
||||
|
||||
+209
-206
File diff suppressed because it is too large
Load Diff
+245
-232
@@ -17,7 +17,7 @@ f32 D_display_801615B8[4];
|
||||
|
||||
s32 D_display_800CA220 = 0;
|
||||
u8 sPlayersVisible[] = { 0, 0, 0, 0 }; //
|
||||
s32 D_display_800CA228 = 0; //
|
||||
s32 sDrawCockpit = 0; //
|
||||
s32 D_display_800CA22C = 0; //
|
||||
f32 D_display_800CA230 = 0.0f;
|
||||
Actor* D_display_800CA234 = NULL;
|
||||
@@ -35,7 +35,7 @@ void func_display_80051B30(void) {
|
||||
if ((gPlayState == PLAY_PAUSE) || (D_display_800CA234 == NULL)) {
|
||||
return;
|
||||
}
|
||||
if ((D_display_800CA234->obj.status != OBJ_ACTIVE) || (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_3)) {
|
||||
if ((D_display_800CA234->obj.status != OBJ_ACTIVE) || (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_ACTIVE)) {
|
||||
D_display_800CA234 = NULL;
|
||||
D_display_Timer_800CA238 = 0;
|
||||
return;
|
||||
@@ -48,11 +48,11 @@ void func_display_80051B30(void) {
|
||||
}
|
||||
}
|
||||
if (!(D_display_Timer_800CA238 & 4)) {
|
||||
Matrix_RotateY(gCalcMatrix, gPlayer[0].unk_058, 0);
|
||||
Matrix_RotateX(gCalcMatrix, gPlayer[0].unk_05C, 1);
|
||||
sp68.x = D_display_800CA234->obj.pos.x - gPlayer[0].camEye.x;
|
||||
sp68.y = D_display_800CA234->obj.pos.y - gPlayer[0].camEye.y;
|
||||
sp68.z = D_display_800CA234->obj.pos.z + D_ctx_80177D20 - gPlayer[0].camEye.z;
|
||||
Matrix_RotateY(gCalcMatrix, gPlayer[0].camYaw, MTXF_NEW);
|
||||
Matrix_RotateX(gCalcMatrix, gPlayer[0].camPitch, MTXF_APPLY);
|
||||
sp68.x = D_display_800CA234->obj.pos.x - gPlayer[0].cam.eye.x;
|
||||
sp68.y = D_display_800CA234->obj.pos.y - gPlayer[0].cam.eye.y;
|
||||
sp68.z = D_display_800CA234->obj.pos.z + D_ctx_80177D20 - gPlayer[0].cam.eye.z;
|
||||
Matrix_MultVec3f(gCalcMatrix, &sp68, &sp5C);
|
||||
sp7C = 0;
|
||||
if ((sp5C.z < 0.0f) && (sp5C.z > -12000.0f) && (fabsf(sp5C.x) < fabsf(sp5C.z * 0.4f))) {
|
||||
@@ -80,26 +80,26 @@ void func_display_80051B30(void) {
|
||||
sp74 = -M_PI / 2;
|
||||
}
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, sp78, 0.0f, -50.0f, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, sp74, 1);
|
||||
Matrix_Scale(gGfxMatrix, 0.03f, 0.03f, 0.03f, 1);
|
||||
Matrix_Translate(gGfxMatrix, sp78, 0.0f, -50.0f, MTXF_APPLY);
|
||||
Matrix_RotateZ(gGfxMatrix, sp74, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, 0.03f, 0.03f, 0.03f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_1023700);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
break;
|
||||
case 1:
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, 20.0f, 0.0f, -50.0f, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, -M_PI / 2, 1);
|
||||
Matrix_Scale(gGfxMatrix, 0.03f, 0.03f, 0.03f, 1);
|
||||
Matrix_Translate(gGfxMatrix, 20.0f, 0.0f, -50.0f, MTXF_APPLY);
|
||||
Matrix_RotateZ(gGfxMatrix, -M_PI / 2, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, 0.03f, 0.03f, 0.03f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_1023700);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
sp78 = -20.0f;
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, -20.0f, 0.0f, -50.0f, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, M_PI / 2, 1);
|
||||
Matrix_Scale(gGfxMatrix, 0.03f, 0.03f, 0.03f, 1);
|
||||
Matrix_Translate(gGfxMatrix, -20.0f, 0.0f, -50.0f, MTXF_APPLY);
|
||||
Matrix_RotateZ(gGfxMatrix, M_PI / 2, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, 0.03f, 0.03f, 0.03f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_1023700);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
@@ -232,11 +232,11 @@ void func_display_8005250C(s32 limbIndex, Vec3f* rot, void* data) {
|
||||
void func_display_80052584(Player* player) {
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Copy(gGfxMatrix, &gIdentityMatrix);
|
||||
if ((player->state_1C8 == PLAYERSTATE_1C8_3) && (player->timer_1F8 != 0)) {
|
||||
if ((player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (player->timer_1F8 != 0)) {
|
||||
Matrix_Translate(gGfxMatrix, D_display_801613B0[player->num].x, D_display_801613B0[player->num].y,
|
||||
D_display_801613B0[player->num].z, 1);
|
||||
D_display_801613B0[player->num].z, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, D_display_800CA23C[player->timer_1F8 - 1], D_display_800CA23C[player->timer_1F8 - 1],
|
||||
D_display_800CA23C[player->timer_1F8 - 1], 1);
|
||||
D_display_800CA23C[player->timer_1F8 - 1], MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
RCP_SetupDL_40();
|
||||
gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK);
|
||||
@@ -247,8 +247,8 @@ void func_display_80052584(Player* player) {
|
||||
|
||||
void func_display_800526B8(Player* player) {
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Scale(gCalcMatrix, 0.5f, 0.5f, 0.5f, 1);
|
||||
Matrix_Translate(gCalcMatrix, 0.0f, 35.0f, 0.0f, 1);
|
||||
Matrix_Scale(gCalcMatrix, 0.5f, 0.5f, 0.5f, MTXF_APPLY);
|
||||
Matrix_Translate(gCalcMatrix, 0.0f, 35.0f, 0.0f, MTXF_APPLY);
|
||||
switch (player->num) {
|
||||
case 0:
|
||||
Animation_DrawSkeleton(5, D_versus_301D258, player->jointTable, func_display_800520FC,
|
||||
@@ -284,9 +284,9 @@ void func_display_80052884(Player* player) {
|
||||
gSPDisplayList(gMasterDisp++, D_versus_300FB80);
|
||||
}
|
||||
Matrix_MultVec3f(gGfxMatrix, &sp40, &D_display_80161518[player->num]);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 51.0f, -10.0f, 1);
|
||||
Matrix_RotateY(gGfxMatrix, -player->unk_180 * M_DTOR, 1);
|
||||
Matrix_RotateX(gGfxMatrix, player->unk_17C * M_DTOR, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 51.0f, -10.0f, MTXF_APPLY);
|
||||
Matrix_RotateY(gGfxMatrix, -player->unk_180 * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateX(gGfxMatrix, player->unk_17C * M_DTOR, MTXF_APPLY);
|
||||
if (gPlayerNum == player->num) {
|
||||
sp64 = 0.0f;
|
||||
if (gChargeTimers[player->num] >= 20) {
|
||||
@@ -323,18 +323,18 @@ f32 sPlayerShadowing = 0.0f;
|
||||
|
||||
void func_display_80052B80(Player* player) {
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
if ((player->state_1C8 == PLAYERSTATE_1C8_3) && (player->unk_1A0 != 0)) {
|
||||
if ((player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (player->unk_1A0 != 0)) {
|
||||
Matrix_Translate(gGfxMatrix, D_display_80161548[player->num].x, D_display_80161548[player->num].y,
|
||||
D_display_80161548[player->num].z, 1);
|
||||
D_display_80161548[player->num].z, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, D_display_800CA248[player->unk_1A0 - 1], D_display_800CA248[player->unk_1A0 - 1],
|
||||
D_display_800CA248[player->unk_1A0 - 1], 1);
|
||||
D_display_800CA248[player->unk_1A0 - 1], MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
if (gVersusMode) {
|
||||
RCP_SetupDL_40();
|
||||
gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK);
|
||||
gSPDisplayList(gMasterDisp++, D_versus_301FD20);
|
||||
} else {
|
||||
Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 0.5f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 0.5f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
RCP_SetupDL(&gMasterDisp, 0x43);
|
||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255);
|
||||
@@ -367,12 +367,12 @@ void func_display_80052D48(Player* player) {
|
||||
sp2C *= 1.1f;
|
||||
}
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, 20.0f, 30.0f, -10.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, 20.0f, 30.0f, -10.0f, MTXF_APPLY);
|
||||
if (!gVersusMode) {
|
||||
Matrix_RotateY(gGfxMatrix, -gPlayer[gPlayerNum].unk_058, 1);
|
||||
Matrix_RotateY(gGfxMatrix, -gPlayer[gPlayerNum].camYaw, MTXF_APPLY);
|
||||
}
|
||||
Matrix_Scale(gGfxMatrix, sp2C, sp2C, sp2C, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, -30.0f, 0.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, sp2C, sp2C, sp2C, MTXF_APPLY);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, -30.0f, 0.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
if (!gVersusMode) {
|
||||
gSPDisplayList(gMasterDisp++, D_landmaster_30066B0);
|
||||
@@ -390,12 +390,12 @@ void func_display_80052D48(Player* player) {
|
||||
sp2C *= 1.1f;
|
||||
}
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, -20.0f, 30.0f, -10.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, -20.0f, 30.0f, -10.0f, MTXF_APPLY);
|
||||
if (!gVersusMode) {
|
||||
Matrix_RotateY(gGfxMatrix, -gPlayer[gPlayerNum].unk_058, 1);
|
||||
Matrix_RotateY(gGfxMatrix, -gPlayer[gPlayerNum].camYaw, MTXF_APPLY);
|
||||
}
|
||||
Matrix_Scale(gGfxMatrix, sp2C, sp2C, sp2C, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, -30.0f, 0.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, sp2C, sp2C, sp2C, MTXF_APPLY);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, -30.0f, 0.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
if (!gVersusMode) {
|
||||
gSPDisplayList(gMasterDisp++, D_landmaster_30066B0);
|
||||
@@ -520,7 +520,7 @@ bool func_display_800531A4(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos, Vec3f* rot,
|
||||
|
||||
void func_display_80053658(WingInfo* wings) {
|
||||
Vec3f sp68[30];
|
||||
s32 sp64;
|
||||
s32 modelId;
|
||||
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
wings->unk_18 = 0.0f;
|
||||
@@ -539,32 +539,32 @@ void func_display_80053658(WingInfo* wings) {
|
||||
Animation_DrawSkeleton(1, D_arwing_3016610, sp68, func_display_800531A4, NULL, wings, &gIdentityMatrix);
|
||||
}
|
||||
D_display_800CA22C = 0;
|
||||
sp64 = wings->unk_2C;
|
||||
modelId = wings->modelId;
|
||||
if (D_display_800CA220 != 0) {
|
||||
sp64 = 1;
|
||||
modelId = 1;
|
||||
}
|
||||
if (sp64 != 0) {
|
||||
if (modelId != 0) {
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 6.4f, -16.5f, 1);
|
||||
Matrix_RotateY(gGfxMatrix, wings->unk_34 * M_DTOR, 1);
|
||||
Matrix_RotateX(gGfxMatrix, wings->unk_30 * M_DTOR, 1);
|
||||
Matrix_Scale(gGfxMatrix, 1.0f / 70.925f, 1.0f / 70.925f, 1.0f / 70.925f, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 6.4f, -16.5f, MTXF_APPLY);
|
||||
Matrix_RotateY(gGfxMatrix, wings->unk_34 * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateX(gGfxMatrix, wings->unk_30 * M_DTOR, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, 1.0f / 70.925f, 1.0f / 70.925f, 1.0f / 70.925f, MTXF_APPLY);
|
||||
if (gGameState == GSTATE_ENDING) {
|
||||
Matrix_Scale(gGfxMatrix, 0.95f, 0.95f, 0.95f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 0.95f, 0.95f, 0.95f, MTXF_APPLY);
|
||||
}
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
if (gExpertMode) {
|
||||
gSPDisplayList(gMasterDisp++, D_display_800CA27C[sp64 - 1]);
|
||||
gSPDisplayList(gMasterDisp++, D_display_800CA27C[modelId - 1]);
|
||||
} else {
|
||||
gSPDisplayList(gMasterDisp++, D_display_800CA26C[sp64 - 1]);
|
||||
gSPDisplayList(gMasterDisp++, D_display_800CA26C[modelId - 1]);
|
||||
}
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
}
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 17.2f, -25.8f, 1);
|
||||
Matrix_RotateX(gGfxMatrix, wings->unk_38 * M_DTOR, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 17.2f, -25.8f, MTXF_APPLY);
|
||||
Matrix_RotateX(gGfxMatrix, wings->unk_38 * M_DTOR, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
RCP_SetupDL_64_2();
|
||||
if ((gGameState == GSTATE_PLAY) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_2) &&
|
||||
if ((gGameState == GSTATE_PLAY) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) &&
|
||||
(gCurrentLevel == LEVEL_CORNERIA)) {
|
||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 120);
|
||||
gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK);
|
||||
@@ -588,8 +588,8 @@ void func_display_80053B00(f32 arg0, f32 arg1, UNK_TYPE arg2, UNK_TYPE arg3) {
|
||||
void func_display_80053B18(void) {
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Copy(gGfxMatrix, &D_display_80161418[0]);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, D_display_800CA290, D_display_800CA294, 1);
|
||||
Matrix_Scale(gGfxMatrix, D_display_800CA28C, D_display_800CA28C, D_display_800CA28C, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, D_display_800CA290, D_display_800CA294, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, D_display_800CA28C, D_display_800CA28C, D_display_800CA28C, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
RCP_SetupDL_64_2();
|
||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 120);
|
||||
@@ -616,12 +616,12 @@ void func_display_80053C38(Player* player, s32 arg1) {
|
||||
Matrix_MultVec3f(gGfxMatrix, &sp4C, &D_display_801613E0[1]);
|
||||
}
|
||||
if ((player->cockpitView != 0) && (gLevelMode == LEVELMODE_ON_RAILS) &&
|
||||
(fabsf(player->unk_138 + D_ctx_80177D20 - player->camEye.z) < 10.0f)) {
|
||||
(fabsf(player->unk_138 + D_ctx_80177D20 - player->cam.eye.z) < 10.0f)) {
|
||||
if (arg1 == 0) {
|
||||
D_display_800CA228 = 1;
|
||||
sDrawCockpit = 1;
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, -8.0f, 5.0f, 1);
|
||||
Matrix_RotateY(gGfxMatrix, M_PI, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, -8.0f, 5.0f, MTXF_APPLY);
|
||||
Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_arwing_30131F0);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
@@ -657,11 +657,12 @@ void func_display_80053F7C(Player* player) {
|
||||
|
||||
if ((gPlayerNum == player->num) && ((player->form == FORM_ARWING) || (player->form == FORM_LANDMASTER)) &&
|
||||
(player->unk_234 != 0) &&
|
||||
(((gGameState == GSTATE_PLAY) && (player->state_1C8 == PLAYERSTATE_1C8_3)) || (gGameState == GSTATE_MENU))) {
|
||||
(((gGameState == GSTATE_PLAY) && (player->state_1C8 == PLAYERSTATE_1C8_ACTIVE)) ||
|
||||
(gGameState == GSTATE_MENU))) {
|
||||
for (i = 0; i < 2; i++) {
|
||||
translate = &D_display_801613E0[i];
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, translate->x, translate->y, translate->z, 1);
|
||||
Matrix_Translate(gGfxMatrix, translate->x, translate->y, translate->z, MTXF_APPLY);
|
||||
if (gChargeTimers[player->num] >= 20) {
|
||||
RCP_SetupDL(&gMasterDisp, 0x3F);
|
||||
if (i == 1) {
|
||||
@@ -676,10 +677,11 @@ void func_display_80053F7C(Player* player) {
|
||||
RCP_SetupDL_36();
|
||||
}
|
||||
if (i == 1) {
|
||||
Matrix_Scale(gGfxMatrix, sCrosshairScales[player->num], sCrosshairScales[player->num], 1.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, sCrosshairScales[player->num], sCrosshairScales[player->num], 1.0f,
|
||||
MTXF_APPLY);
|
||||
Math_SmoothStepToF(&sCrosshairScales[player->num], 1.0f, 1.0f, 0.2f, 0.0f);
|
||||
}
|
||||
Matrix_Scale(gGfxMatrix, 4.0f, 4.0f, 4.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 4.0f, 4.0f, 4.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_1024F60);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
@@ -719,15 +721,15 @@ void func_display_80054300(Player* player) {
|
||||
switch (player->form) {
|
||||
case FORM_ARWING:
|
||||
fake_label:
|
||||
Matrix_Scale(gGfxMatrix, 2.5049999f, 1.5f, 2.5049999f, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 30.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 2.5049999f, 1.5f, 2.5049999f, MTXF_APPLY);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 30.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_1032780);
|
||||
break;
|
||||
case FORM_LANDMASTER:
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Scale(gGfxMatrix, 1.17f, 1.17f, 1.17f, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 20.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 1.17f, 1.17f, 1.17f, MTXF_APPLY);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 20.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
if (gCurrentLevel == LEVEL_MACBETH) {
|
||||
RCP_SetupDL(&gMasterDisp, 0x41);
|
||||
@@ -743,8 +745,8 @@ void func_display_80054300(Player* player) {
|
||||
break;
|
||||
case FORM_ON_FOOT:
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 0.5f, 1);
|
||||
Matrix_RotateX(gGfxMatrix, M_PI / 2, 1);
|
||||
Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 0.5f, MTXF_APPLY);
|
||||
Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK);
|
||||
gSPDisplayList(gMasterDisp++, D_102A8A0);
|
||||
@@ -779,20 +781,20 @@ void func_display_8005478C(Player* player) {
|
||||
RCP_SetupDL_64();
|
||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 100);
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_RotateZ(gGfxMatrix, player->unk_0F8 * M_DTOR, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, player->unk_0F8 * M_DTOR, MTXF_APPLY);
|
||||
if (player->form == FORM_LANDMASTER) {
|
||||
if (player->unk_194 <= 0.0f) {
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
return;
|
||||
}
|
||||
Matrix_Scale(gGfxMatrix, player->unk_194, player->unk_194, 1.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, player->unk_194, player->unk_194, 1.0f, MTXF_APPLY);
|
||||
} else {
|
||||
Matrix_Scale(gGfxMatrix, player->unk_194, player->unk_194, 1.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, player->unk_194, player->unk_194, 1.0f, MTXF_APPLY);
|
||||
}
|
||||
if ((gGameFrameCount % 2) != 0) {
|
||||
Matrix_Scale(gGfxMatrix, 0.9f, 0.63f, 1.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 0.9f, 0.63f, 1.0f, MTXF_APPLY);
|
||||
} else {
|
||||
Matrix_Scale(gGfxMatrix, 0.80999994f, 0.567f, 1.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 0.80999994f, 0.567f, 1.0f, MTXF_APPLY);
|
||||
}
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
func_display_8005465C(gLevelType);
|
||||
@@ -805,11 +807,11 @@ void func_display_80054914(Player* player) {
|
||||
Vec3f sp34;
|
||||
|
||||
if (player->unk_280 != 0) {
|
||||
Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + player->unk_134 + 180.0f) * M_DTOR, 0);
|
||||
Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + player->unk_134 + 180.0f) * M_DTOR, MTXF_NEW);
|
||||
Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4 + player->unk_134 + player->unk_4D8) * M_DTOR),
|
||||
1);
|
||||
Matrix_RotateZ(gCalcMatrix, -((player->unk_0F8 + player->unk_0F0 + player->unk_134) * M_DTOR), 1);
|
||||
Matrix_Translate(gCalcMatrix, player->unk_084, player->unk_080, 0.0f, 1);
|
||||
MTXF_APPLY);
|
||||
Matrix_RotateZ(gCalcMatrix, -((player->unk_0F8 + player->unk_0F0 + player->unk_134) * M_DTOR), MTXF_APPLY);
|
||||
Matrix_Translate(gCalcMatrix, player->unk_084, player->unk_080, 0.0f, MTXF_APPLY);
|
||||
sp40.x = 0.0f;
|
||||
sp40.y = 0.0f;
|
||||
sp40.z = -30.0f;
|
||||
@@ -820,17 +822,17 @@ void func_display_80054914(Player* player) {
|
||||
}
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, player->pos.x + sp34.x, player->pos.y + sp34.y,
|
||||
player->unk_138 + player->unk_144 + sp34.z, 1);
|
||||
Matrix_RotateY(gGfxMatrix, -gPlayer[gPlayerNum].unk_058, 1);
|
||||
Matrix_RotateX(gGfxMatrix, gPlayer[gPlayerNum].unk_05C, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 20.0f * sp4C * M_DTOR, 1);
|
||||
player->unk_138 + player->unk_144 + sp34.z, MTXF_APPLY);
|
||||
Matrix_RotateY(gGfxMatrix, -gPlayer[gPlayerNum].camYaw, MTXF_APPLY);
|
||||
Matrix_RotateX(gGfxMatrix, gPlayer[gPlayerNum].camPitch, MTXF_APPLY);
|
||||
Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 20.0f * sp4C * M_DTOR, MTXF_APPLY);
|
||||
if (player->form == FORM_ARWING) {
|
||||
Matrix_Scale(gGfxMatrix, 2.0f, 2.0f, 2.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 2.0f, 2.0f, 2.0f, MTXF_APPLY);
|
||||
} else {
|
||||
Matrix_Scale(gGfxMatrix, 1.2f, 1.2f, 1.2f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 1.2f, 1.2f, 1.2f, MTXF_APPLY);
|
||||
}
|
||||
if (player->unk_1F0 < 0) {
|
||||
Matrix_RotateX(gGfxMatrix, M_PI, 1);
|
||||
Matrix_RotateX(gGfxMatrix, M_PI, MTXF_APPLY);
|
||||
}
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
RCP_SetupDL(&gMasterDisp, 0x43);
|
||||
@@ -845,8 +847,8 @@ void func_display_80054CA4(Player* player) {
|
||||
if (D_ctx_80177AB8[player->num] > 1.0f) {
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Copy(gGfxMatrix, &D_display_80161418[player->num]);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, -5.0f, 10.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 2.5f, 1.6f, 2.5f, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, -5.0f, 10.0f, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, 2.5f, 1.6f, 2.5f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
RCP_SetupDL(&gMasterDisp, 0x44);
|
||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 255, 255, (s32) D_ctx_80177AB8[player->num]);
|
||||
@@ -878,13 +880,13 @@ void func_display_80054E80(Player* player) {
|
||||
}
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
sp80 = gChargeTimers[player->num] / 20.0f;
|
||||
Matrix_Translate(gGfxMatrix, sp94.x, sp94.y, sp94.z, 0);
|
||||
Matrix_Scale(gGfxMatrix, sp80, sp80, 1.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, sp94.x, sp94.y, sp94.z, MTXF_NEW);
|
||||
Matrix_Scale(gGfxMatrix, sp80, sp80, 1.0f, MTXF_APPLY);
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
if ((player->cockpitView != 0) && (gLevelMode == LEVELMODE_ON_RAILS)) {
|
||||
Matrix_Scale(gGfxMatrix, 3.0f, 3.0f, 3.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 3.0f, 3.0f, 3.0f, MTXF_APPLY);
|
||||
} else {
|
||||
Matrix_Scale(gGfxMatrix, 10.0f, 10.0f, 10.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 10.0f, 10.0f, 10.0f, MTXF_APPLY);
|
||||
}
|
||||
RCP_SetupDL(&gMasterDisp, 0x31);
|
||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 128);
|
||||
@@ -906,21 +908,21 @@ void func_display_80054E80(Player* player) {
|
||||
} else {
|
||||
gDPSetEnvColor(gMasterDisp++, 0, 255, 0, 128);
|
||||
}
|
||||
Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 53.0f * M_DTOR, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 53.0f * M_DTOR, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_101C2E0);
|
||||
Matrix_RotateZ(gGfxMatrix, gGameFrameCount * -53.0f * 2.0f * M_DTOR, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, gGameFrameCount * -53.0f * 2.0f * M_DTOR, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_101C2E0);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
if ((player->cockpitView != 0) && (gLevelMode == LEVELMODE_ON_RAILS)) {
|
||||
Matrix_Scale(gGfxMatrix, 0.3f, 0.3f, 0.3f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 0.3f, 0.3f, 0.3f, MTXF_APPLY);
|
||||
}
|
||||
Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 1.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 1.0f, MTXF_APPLY);
|
||||
if (((gGameFrameCount % 2) == 0)) {
|
||||
Matrix_Scale(gGfxMatrix, 1.7f, 1.7f, 1.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 1.7f, 1.7f, 1.0f, MTXF_APPLY);
|
||||
} else {
|
||||
Matrix_Scale(gGfxMatrix, 1.3f, 1.3f, 1.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 1.3f, 1.3f, 1.0f, MTXF_APPLY);
|
||||
}
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_1024AC0);
|
||||
@@ -944,8 +946,8 @@ void func_display_80054E80(Player* player) {
|
||||
Matrix_MultVec3f(gCalcMatrix, &spC4, &sp94);
|
||||
}
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, sp94.x, sp94.y, sp94.z, 0);
|
||||
Matrix_Scale(gGfxMatrix, D_ctx_80177AA0[player->num], D_ctx_80177AA0[player->num], 1.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, sp94.x, sp94.y, sp94.z, MTXF_NEW);
|
||||
Matrix_Scale(gGfxMatrix, D_ctx_80177AA0[player->num], D_ctx_80177AA0[player->num], 1.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_1024AC0);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
@@ -962,14 +964,14 @@ void func_display_80054E80(Player* player) {
|
||||
Matrix_MultVec3f(gCalcMatrix, &spAC, &sp94);
|
||||
Matrix_MultVec3f(gCalcMatrix, &spA0, &sp88);
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, sp94.x, sp94.y, sp94.z, 0);
|
||||
Matrix_Scale(gGfxMatrix, D_ctx_80177AA0[player->num], D_ctx_80177AA0[player->num], 1.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, sp94.x, sp94.y, sp94.z, MTXF_NEW);
|
||||
Matrix_Scale(gGfxMatrix, D_ctx_80177AA0[player->num], D_ctx_80177AA0[player->num], 1.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_1024AC0);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, sp88.x, sp88.y, sp88.z, 0);
|
||||
Matrix_Scale(gGfxMatrix, D_ctx_80177AA0[player->num], D_ctx_80177AA0[player->num], 1.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, sp88.x, sp88.y, sp88.z, MTXF_NEW);
|
||||
Matrix_Scale(gGfxMatrix, D_ctx_80177AA0[player->num], D_ctx_80177AA0[player->num], 1.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_1024AC0);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
@@ -987,10 +989,10 @@ void func_display_80055788(Player* player) {
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
sp54 = gChargeTimers[player->num] / 20.0f;
|
||||
Matrix_Translate(gGfxMatrix, D_display_80161548[player->num].x, D_display_80161548[player->num].y,
|
||||
D_display_80161548[player->num].z, 0);
|
||||
Matrix_Scale(gGfxMatrix, sp54, sp54, 1.0f, 1);
|
||||
D_display_80161548[player->num].z, MTXF_NEW);
|
||||
Matrix_Scale(gGfxMatrix, sp54, sp54, 1.0f, MTXF_APPLY);
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Scale(gGfxMatrix, 10.0f, 10.0f, 10.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 10.0f, 10.0f, 10.0f, MTXF_APPLY);
|
||||
RCP_SetupDL(&gMasterDisp, 0x31);
|
||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 128);
|
||||
if (gVersusMode) {
|
||||
@@ -1011,18 +1013,18 @@ void func_display_80055788(Player* player) {
|
||||
} else {
|
||||
gDPSetEnvColor(gMasterDisp++, 0, 255, 0, 128);
|
||||
}
|
||||
Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 53.0f * M_DTOR, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 53.0f * M_DTOR, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_101C2E0);
|
||||
Matrix_RotateZ(gGfxMatrix, gGameFrameCount * -53.0f * 2.0f * M_DTOR, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, gGameFrameCount * -53.0f * 2.0f * M_DTOR, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_101C2E0);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 1.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 1.0f, MTXF_APPLY);
|
||||
if (((gGameFrameCount % 2) == 0)) {
|
||||
Matrix_Scale(gGfxMatrix, 1.7f, 1.7f, 1.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 1.7f, 1.7f, 1.0f, MTXF_APPLY);
|
||||
} else {
|
||||
Matrix_Scale(gGfxMatrix, 1.3f, 1.3f, 1.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 1.3f, 1.3f, 1.0f, MTXF_APPLY);
|
||||
}
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_1024AC0);
|
||||
@@ -1036,14 +1038,17 @@ void func_display_80055B58(Player* player) {
|
||||
f32 var_fv0;
|
||||
s32 pad[3];
|
||||
|
||||
if ((player->unk_234 != 0) && (player->state_1C8 != PLAYERSTATE_1C8_4)) {
|
||||
if ((player->unk_234 != 0) && (player->state_1C8 != PLAYERSTATE_1C8_DOWN)) {
|
||||
switch (player->form) {
|
||||
case FORM_ARWING:
|
||||
Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + player->unk_134 + 180.0f) * M_DTOR, 0);
|
||||
Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + player->unk_134 + 180.0f) * M_DTOR,
|
||||
MTXF_NEW);
|
||||
Matrix_RotateX(gCalcMatrix,
|
||||
-((player->unk_120 + player->unk_0E4 + player->unk_134 + player->unk_4D8) * M_DTOR), 1);
|
||||
Matrix_RotateZ(gCalcMatrix, -((player->unk_0F8 + player->unk_0F0 + player->unk_134) * M_DTOR), 1);
|
||||
Matrix_Translate(gCalcMatrix, player->unk_084, player->unk_080, 0.0f, 1);
|
||||
-((player->unk_120 + player->unk_0E4 + player->unk_134 + player->unk_4D8) * M_DTOR),
|
||||
MTXF_APPLY);
|
||||
Matrix_RotateZ(gCalcMatrix, -((player->unk_0F8 + player->unk_0F0 + player->unk_134) * M_DTOR),
|
||||
MTXF_APPLY);
|
||||
Matrix_Translate(gCalcMatrix, player->unk_084, player->unk_080, 0.0f, MTXF_APPLY);
|
||||
var_fv0 = player->unk_194 * 30.0f;
|
||||
if (var_fv0 > 30.0f) {
|
||||
var_fv0 = 30.0f;
|
||||
@@ -1056,9 +1061,9 @@ void func_display_80055B58(Player* player) {
|
||||
Matrix_MultVec3f(gCalcMatrix, &sp4C, &sp40);
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, player->pos.x + sp40.x, player->pos.y + sp40.y,
|
||||
player->unk_138 + player->unk_144 + sp40.z, 1);
|
||||
Matrix_RotateY(gGfxMatrix, -gPlayer[gPlayerNum].unk_058, 1);
|
||||
Matrix_RotateX(gGfxMatrix, gPlayer[gPlayerNum].unk_05C, 1);
|
||||
player->unk_138 + player->unk_144 + sp40.z, MTXF_APPLY);
|
||||
Matrix_RotateY(gGfxMatrix, -gPlayer[gPlayerNum].camYaw, MTXF_APPLY);
|
||||
Matrix_RotateX(gGfxMatrix, gPlayer[gPlayerNum].camPitch, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
func_display_8005478C(player);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
@@ -1070,7 +1075,7 @@ void func_display_80055B58(Player* player) {
|
||||
func_display_80052D48(player);
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, D_display_80161518[player->num].x, D_display_80161518[player->num].y,
|
||||
D_display_80161518[player->num].z, 0);
|
||||
D_display_80161518[player->num].z, MTXF_NEW);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
func_display_8005478C(player);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
@@ -1107,7 +1112,7 @@ void func_display_80055E98(Player* player) {
|
||||
}
|
||||
var_fs0 = var_fs0 * 0.25f;
|
||||
sp50 = player->unk_0E4 * 0.25f;
|
||||
if (player->state_1C8 == PLAYERSTATE_1C8_7) {
|
||||
if (player->state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) {
|
||||
var_fs0 = 0.0f;
|
||||
sp50 = 0.0f;
|
||||
}
|
||||
@@ -1115,26 +1120,26 @@ void func_display_80055E98(Player* player) {
|
||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 100);
|
||||
if (player->wings.leftState == WINGSTATE_INTACT) {
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, sp5C, sp58, -100.0f, 1);
|
||||
Matrix_RotateX(gGfxMatrix, M_DTOR * sp50, 1);
|
||||
Matrix_RotateY(gGfxMatrix, -(M_DTOR * var_fs0), 1);
|
||||
Matrix_Scale(gGfxMatrix, player->unk_25C, 1.0f, 50.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -17.5f, 1);
|
||||
Matrix_RotateX(gGfxMatrix, M_PI / 2, 1);
|
||||
Matrix_RotateY(gGfxMatrix, M_DTOR * sp54, 1);
|
||||
Matrix_Translate(gGfxMatrix, sp5C, sp58, -100.0f, MTXF_APPLY);
|
||||
Matrix_RotateX(gGfxMatrix, M_DTOR * sp50, MTXF_APPLY);
|
||||
Matrix_RotateY(gGfxMatrix, -(M_DTOR * var_fs0), MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, player->unk_25C, 1.0f, 50.0f, MTXF_APPLY);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -17.5f, MTXF_APPLY);
|
||||
Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY);
|
||||
Matrix_RotateY(gGfxMatrix, M_DTOR * sp54, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_102A8A0);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
}
|
||||
if (player->wings.rightState == WINGSTATE_INTACT) {
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, -sp5C, sp58, -100.0f, 1);
|
||||
Matrix_RotateX(gGfxMatrix, M_DTOR * sp50, 1);
|
||||
Matrix_RotateY(gGfxMatrix, -(M_DTOR * var_fs0), 1);
|
||||
Matrix_Scale(gGfxMatrix, player->unk_25C, 1.0f, 50.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -17.5f, 1);
|
||||
Matrix_RotateX(gGfxMatrix, M_PI / 2, 1);
|
||||
Matrix_RotateY(gGfxMatrix, M_DTOR * sp54, 1);
|
||||
Matrix_Translate(gGfxMatrix, -sp5C, sp58, -100.0f, MTXF_APPLY);
|
||||
Matrix_RotateX(gGfxMatrix, M_DTOR * sp50, MTXF_APPLY);
|
||||
Matrix_RotateY(gGfxMatrix, -(M_DTOR * var_fs0), MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, player->unk_25C, 1.0f, 50.0f, MTXF_APPLY);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -17.5f, MTXF_APPLY);
|
||||
Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY);
|
||||
Matrix_RotateY(gGfxMatrix, M_DTOR * sp54, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_102A8A0);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
@@ -1146,11 +1151,11 @@ void func_display_80056230(Player* player) {
|
||||
if ((player->unk_234 != 0) && (player->form == FORM_ARWING) && (gCurrentLevel != LEVEL_VENOM_ANDROSS) &&
|
||||
(gCurrentLevel != LEVEL_TRAINING) && (gLevelType == LEVELTYPE_PLANET)) {
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, player->pos.x, player->pos.y, player->unk_138 + player->unk_144, 1);
|
||||
Matrix_RotateY(gGfxMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, 1);
|
||||
Matrix_RotateX(gGfxMatrix, -((player->unk_120 + player->unk_0E4 + player->unk_4D8) * M_DTOR), 1);
|
||||
Matrix_RotateZ(gGfxMatrix, -((player->unk_0F8 + player->unk_0F0 + player->unk_134) * M_DTOR), 1);
|
||||
Matrix_Translate(gGfxMatrix, player->unk_084, player->unk_080, 0.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, player->pos.x, player->pos.y, player->unk_138 + player->unk_144, MTXF_APPLY);
|
||||
Matrix_RotateY(gGfxMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateX(gGfxMatrix, -((player->unk_120 + player->unk_0E4 + player->unk_4D8) * M_DTOR), MTXF_APPLY);
|
||||
Matrix_RotateZ(gGfxMatrix, -((player->unk_0F8 + player->unk_0F0 + player->unk_134) * M_DTOR), MTXF_APPLY);
|
||||
Matrix_Translate(gGfxMatrix, player->unk_084, player->unk_080, 0.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
func_display_80055E98(player);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
@@ -1188,10 +1193,10 @@ void func_display_800564C0(Player* player, s32 arg1) {
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
if (player->form == FORM_LANDMASTER) {
|
||||
if (player->unk_1D4 != 0) {
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, gCameraShakeY, 0.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, gCameraShakeY, 0.0f, MTXF_APPLY);
|
||||
}
|
||||
Matrix_Translate(gGfxMatrix, player->pos.x, player->pos.y + player->unk_18C + 30.0f,
|
||||
player->unk_138 + player->unk_144, 1);
|
||||
player->unk_138 + player->unk_144, MTXF_APPLY);
|
||||
if (gVersusMode) {
|
||||
for (i = 0; i < gCamCount; i++) {
|
||||
if (D_ctx_80177B00[player->num][i] != 0) {
|
||||
@@ -1210,18 +1215,18 @@ void func_display_800564C0(Player* player, s32 arg1) {
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
return;
|
||||
}
|
||||
Matrix_RotateX(gGfxMatrix, (player->unk_0E4 + player->unk_134) * M_DTOR, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, (player->unk_0EC + player->unk_0F0 + player->unk_134) * M_DTOR, 1);
|
||||
Matrix_RotateY(gGfxMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, 1);
|
||||
Matrix_RotateX(gGfxMatrix, (player->unk_0E4 + player->unk_134) * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateZ(gGfxMatrix, (player->unk_0EC + player->unk_0F0 + player->unk_134) * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateY(gGfxMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, MTXF_APPLY);
|
||||
if (gVersusMode) {
|
||||
Matrix_RotateX(gGfxMatrix, player->unk_000 * M_DTOR, 1);
|
||||
Matrix_RotateX(gGfxMatrix, player->unk_000 * M_DTOR, MTXF_APPLY);
|
||||
}
|
||||
Matrix_RotateZ(gGfxMatrix, (-player->unk_12C - player->unk_130) * M_DTOR, 1);
|
||||
Matrix_Translate(gGfxMatrix, player->unk_084, player->unk_080 - 30.0f, 0.0f, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, (-player->unk_12C - player->unk_130) * M_DTOR, MTXF_APPLY);
|
||||
Matrix_Translate(gGfxMatrix, player->unk_084, player->unk_080 - 30.0f, 0.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
} else if (player->form == FORM_ON_FOOT) {
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, player->pos.x, player->pos.y, player->unk_138 + player->unk_144, 1);
|
||||
Matrix_Translate(gGfxMatrix, player->pos.x, player->pos.y, player->unk_138 + player->unk_144, MTXF_APPLY);
|
||||
if (!func_display_800563B4(player->num, arg1)) {
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
@@ -1229,13 +1234,14 @@ void func_display_800564C0(Player* player, s32 arg1) {
|
||||
}
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
Matrix_Translate(gCalcMatrix, player->pos.x, player->pos.y + gCameraShakeY,
|
||||
player->unk_138 + player->unk_144, 0);
|
||||
Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + player->unk_134 + 180.0f) * M_DTOR, 1);
|
||||
Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4 + player->unk_134) * M_DTOR), 1);
|
||||
Matrix_RotateZ(gCalcMatrix, -((player->unk_0F8 + player->unk_0F0 + player->unk_134) * M_DTOR), 1);
|
||||
Matrix_Translate(gCalcMatrix, player->unk_084, player->unk_080, 0.0f, 1);
|
||||
player->unk_138 + player->unk_144, MTXF_NEW);
|
||||
Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + player->unk_134 + 180.0f) * M_DTOR,
|
||||
MTXF_APPLY);
|
||||
Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4 + player->unk_134) * M_DTOR), MTXF_APPLY);
|
||||
Matrix_RotateZ(gCalcMatrix, -((player->unk_0F8 + player->unk_0F0 + player->unk_134) * M_DTOR), MTXF_APPLY);
|
||||
Matrix_Translate(gCalcMatrix, player->unk_084, player->unk_080, 0.0f, MTXF_APPLY);
|
||||
} else {
|
||||
Matrix_Translate(gGfxMatrix, player->pos.x, player->pos.y, player->unk_138 + player->unk_144, 1);
|
||||
Matrix_Translate(gGfxMatrix, player->pos.x, player->pos.y, player->unk_138 + player->unk_144, MTXF_APPLY);
|
||||
if (gVersusMode) {
|
||||
for (i = 0; i < gCamCount; i++) {
|
||||
if (D_ctx_80177B00[player->num][i] != 0) {
|
||||
@@ -1254,11 +1260,13 @@ void func_display_800564C0(Player* player, s32 arg1) {
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
return;
|
||||
}
|
||||
Matrix_RotateY(gGfxMatrix, (player->unk_114 + player->unk_0E8 + player->unk_134 + 180.0f) * M_DTOR, 1);
|
||||
Matrix_RotateY(gGfxMatrix, (player->unk_114 + player->unk_0E8 + player->unk_134 + 180.0f) * M_DTOR,
|
||||
MTXF_APPLY);
|
||||
Matrix_RotateX(gGfxMatrix,
|
||||
-((player->unk_120 + player->unk_0E4 + player->unk_4D8 + player->unk_134) * M_DTOR), 1);
|
||||
Matrix_RotateZ(gGfxMatrix, -((player->unk_0F8 + player->unk_0F0 + player->unk_134) * M_DTOR), 1);
|
||||
Matrix_Translate(gGfxMatrix, player->unk_084, player->unk_080, 0.0f, 1);
|
||||
-((player->unk_120 + player->unk_0E4 + player->unk_4D8 + player->unk_134) * M_DTOR),
|
||||
MTXF_APPLY);
|
||||
Matrix_RotateZ(gGfxMatrix, -((player->unk_0F8 + player->unk_0F0 + player->unk_134) * M_DTOR), MTXF_APPLY);
|
||||
Matrix_Translate(gGfxMatrix, player->unk_084, player->unk_080, 0.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
}
|
||||
switch (player->unk_200) {
|
||||
@@ -1319,33 +1327,35 @@ void func_display_80056E2C(Player* player) {
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
if (gLevelMode == LEVELMODE_ALL_RANGE) {
|
||||
if (player->form == FORM_ON_FOOT) {
|
||||
Matrix_Translate(gGfxMatrix, player->unk_064, player->unk_068 + 2.0f, player->unk_06C, 1);
|
||||
Matrix_Translate(gGfxMatrix, player->unk_064, player->unk_068 + 2.0f, player->unk_06C, MTXF_APPLY);
|
||||
} else {
|
||||
Matrix_Translate(gGfxMatrix, player->unk_064, player->unk_068 + 2.0f, player->unk_06C, 1);
|
||||
Matrix_Translate(gGfxMatrix, player->unk_064, player->unk_068 + 2.0f, player->unk_06C, MTXF_APPLY);
|
||||
}
|
||||
} else {
|
||||
Matrix_Translate(gGfxMatrix, player->unk_064, player->unk_068 + 2.0f, player->unk_06C + player->unk_144, 1);
|
||||
Matrix_Translate(gGfxMatrix, player->unk_064, player->unk_068 + 2.0f, player->unk_06C + player->unk_144,
|
||||
MTXF_APPLY);
|
||||
}
|
||||
Matrix_RotateY(gGfxMatrix, player->unk_070, 1);
|
||||
Matrix_RotateX(gGfxMatrix, player->unk_248, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, player->unk_24C, 1);
|
||||
Matrix_Scale(gGfxMatrix, 0.8f + sp34, 0.0f, 0.8f + sp30, 1);
|
||||
Matrix_RotateY(gGfxMatrix, player->unk_070, MTXF_APPLY);
|
||||
Matrix_RotateX(gGfxMatrix, player->unk_248, MTXF_APPLY);
|
||||
Matrix_RotateZ(gGfxMatrix, player->unk_24C, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, 0.8f + sp34, 0.0f, 0.8f + sp30, MTXF_APPLY);
|
||||
if ((player->form == FORM_ARWING) || (player->form == FORM_BLUE_MARINE) || (player->form == FORM_ON_FOOT)) {
|
||||
sp2C = player->unk_0F8 + player->unk_0F0 + player->unk_134;
|
||||
if (((sp2C > 70.0f) && (sp2C < 110.0f)) || ((sp2C < -70.0f) && (sp2C > -110.0f))) {
|
||||
sp2C = 70.0f;
|
||||
}
|
||||
Matrix_RotateY(gGfxMatrix, -player->unk_070, 1);
|
||||
Matrix_RotateY(gGfxMatrix, (player->unk_114 + player->unk_0E8 + player->unk_134) * M_DTOR, 1);
|
||||
Matrix_RotateY(gGfxMatrix, -player->unk_070, MTXF_APPLY);
|
||||
Matrix_RotateY(gGfxMatrix, (player->unk_114 + player->unk_0E8 + player->unk_134) * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateX(gGfxMatrix,
|
||||
-((player->unk_120 + player->unk_0E4 + player->unk_4D8 + player->unk_134) * M_DTOR), 1);
|
||||
Matrix_RotateZ(gGfxMatrix, M_DTOR * sp2C, 1);
|
||||
-((player->unk_120 + player->unk_0E4 + player->unk_4D8 + player->unk_134) * M_DTOR),
|
||||
MTXF_APPLY);
|
||||
Matrix_RotateZ(gGfxMatrix, M_DTOR * sp2C, MTXF_APPLY);
|
||||
} else {
|
||||
Matrix_RotateY(gGfxMatrix, player->unk_114 * M_DTOR, 1);
|
||||
Matrix_RotateX(gGfxMatrix, (player->unk_0E4 + player->unk_4D8 + player->unk_134) * M_DTOR, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, (player->unk_0EC + player->unk_0F0 + player->unk_134) * M_DTOR, 1);
|
||||
Matrix_RotateY(gGfxMatrix, player->unk_0E8 * M_DTOR, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, (-player->unk_12C - player->unk_130) * M_DTOR, 1);
|
||||
Matrix_RotateY(gGfxMatrix, player->unk_114 * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateX(gGfxMatrix, (player->unk_0E4 + player->unk_4D8 + player->unk_134) * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateZ(gGfxMatrix, (player->unk_0EC + player->unk_0F0 + player->unk_134) * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateY(gGfxMatrix, player->unk_0E8 * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateZ(gGfxMatrix, (-player->unk_12C - player->unk_130) * M_DTOR, MTXF_APPLY);
|
||||
}
|
||||
func_display_80054300(player);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
@@ -1368,12 +1378,12 @@ void func_display_80057248(void) {
|
||||
}
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, gTeamArrowsViewPos[i].x, gTeamArrowsViewPos[i].y, gTeamArrowsViewPos[i].z,
|
||||
1);
|
||||
Matrix_Scale(gGfxMatrix, var_fs0 * 0.25f, var_fs0 * 0.25f, 1.0f, 1);
|
||||
MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, var_fs0 * 0.25f, var_fs0 * 0.25f, 1.0f, MTXF_APPLY);
|
||||
if ((i == 0) && (gCurrentLevel == LEVEL_SECTOR_Z)) {
|
||||
Matrix_Scale(gGfxMatrix, 2.0f, 2.0f, 1.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 2.0f, 2.0f, 1.0f, MTXF_APPLY);
|
||||
}
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 150.0f, 0.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 150.0f, 0.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gDPSetTextureFilter(gMasterDisp++, G_TF_POINT);
|
||||
if ((i == 0) && (gCurrentLevel == LEVEL_SECTOR_Z)) {
|
||||
@@ -1408,14 +1418,14 @@ void func_display_80057504(void) {
|
||||
}
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, D_display_80161578[i].x, D_display_80161578[i].y, D_display_80161578[i].z,
|
||||
1);
|
||||
MTXF_APPLY);
|
||||
if ((gPlayState != PLAY_PAUSE) && (i == gPlayerNum)) {
|
||||
Math_SmoothStepToF(&D_display_801615A8[i], 0.0f, 0.5f, 20.0f, 0);
|
||||
Math_SmoothStepToF(&D_display_801615B8[i], 1.0, 0.5f, 0.2f, 0);
|
||||
}
|
||||
var_fs0 *= D_display_801615B8[i];
|
||||
Matrix_Scale(gGfxMatrix, var_fs0 * 1.5f, var_fs0 * 1.5f, 1.0f, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, D_display_801615A8[i] * M_DTOR, 1);
|
||||
Matrix_Scale(gGfxMatrix, var_fs0 * 1.5f, var_fs0 * 1.5f, 1.0f, MTXF_APPLY);
|
||||
Matrix_RotateZ(gGfxMatrix, D_display_801615A8[i] * M_DTOR, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
RCP_SetupDL(&gMasterDisp, 0x43);
|
||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255);
|
||||
@@ -1462,24 +1472,24 @@ void func_display_800578C4(Player* player) {
|
||||
case 0:
|
||||
Math_SmoothStepToAngle(&player->wings.unk_30, 0.0f, 0.2f, 3.0f, 0.0f);
|
||||
Math_SmoothStepToAngle(&player->wings.unk_34, 0.0f, 0.2f, 3.0f, 0.0f);
|
||||
gPlayerCamEye.x = player->camEye.x;
|
||||
gPlayerCamEye.y = player->camEye.y;
|
||||
gPlayerCamEye.z = player->camEye.z;
|
||||
gPlayerCamAt.x = player->camAt.x;
|
||||
gPlayerCamAt.y = player->camAt.y;
|
||||
gPlayerCamAt.z = player->camAt.z;
|
||||
gPlayerCamEye.x = player->cam.eye.x;
|
||||
gPlayerCamEye.y = player->cam.eye.y;
|
||||
gPlayerCamEye.z = player->cam.eye.z;
|
||||
gPlayerCamAt.x = player->cam.at.x;
|
||||
gPlayerCamAt.y = player->cam.at.y;
|
||||
gPlayerCamAt.z = player->cam.at.z;
|
||||
break;
|
||||
case 1:
|
||||
case 2:
|
||||
case 3:
|
||||
sp38 = Math_RadToDeg(player->unk_05C) + player->unk_0E4;
|
||||
sp38 = Math_RadToDeg(player->camPitch) + player->unk_0E4;
|
||||
if (sp38 > 360.0f) {
|
||||
sp38 -= 360.0f;
|
||||
}
|
||||
if (sp38 < 0.0f) {
|
||||
sp38 += 360.0f;
|
||||
}
|
||||
sp3C = (Math_RadToDeg(player->unk_058) + 180.0f) - player->unk_0E8;
|
||||
sp3C = (Math_RadToDeg(player->camYaw) + 180.0f) - player->unk_0E8;
|
||||
if (sp3C > 360.0f) {
|
||||
sp3C -= 360.0f;
|
||||
}
|
||||
@@ -1493,8 +1503,8 @@ void func_display_800578C4(Player* player) {
|
||||
Math_SmoothStepToF(&D_display_800CA384, gControllerPress->stick_x * 3.0f, 0.1f, 5.0f, 0.0f);
|
||||
Math_SmoothStepToF(&D_display_800CA388, D_display_800CA38C[D_display_800CA220], 0.1f, 10.0f, 0.0f);
|
||||
sp4C.z = D_display_800CA388;
|
||||
Matrix_RotateX(gCalcMatrix, (player->unk_0E8 + D_display_800CA380) * M_DTOR, 0);
|
||||
Matrix_RotateY(gCalcMatrix, (player->unk_0E4 + D_display_800CA384) * M_DTOR, 1);
|
||||
Matrix_RotateX(gCalcMatrix, (player->unk_0E8 + D_display_800CA380) * M_DTOR, MTXF_NEW);
|
||||
Matrix_RotateY(gCalcMatrix, (player->unk_0E4 + D_display_800CA384) * M_DTOR, MTXF_APPLY);
|
||||
Matrix_MultVec3f(gCalcMatrix, &sp4C, &sp40);
|
||||
gPlayerCamEye.x = player->pos.x + sp40.x;
|
||||
gPlayerCamEye.y = player->pos.y + sp40.y + 20.0f;
|
||||
@@ -1515,40 +1525,40 @@ void Play_Draw(void) {
|
||||
Player* opponent;
|
||||
Player* player = &gPlayer[gPlayerNum];
|
||||
|
||||
D_display_800CA228 = 0;
|
||||
sDrawCockpit = 0;
|
||||
|
||||
if (gHitCount > 511) {
|
||||
gHitCount = 511;
|
||||
}
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
if ((gCurrentLevel == LEVEL_AQUAS) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3)) {
|
||||
if ((gCurrentLevel == LEVEL_AQUAS) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE)) {
|
||||
Math_SmoothStepToF(&D_display_800CA230, 0.01f, 0.2f, 0.002f, 0.0f);
|
||||
} else {
|
||||
Math_SmoothStepToF(&D_display_800CA230, 0.0f, 0.2f, 0.002f, 0.0f);
|
||||
}
|
||||
Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 10.0f * M_DTOR, 1);
|
||||
Matrix_Scale(gGfxMatrix, 1.0f + D_display_800CA230, 1.0f - D_display_800CA230, 1.0f, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, -(f32) gGameFrameCount * 10.0f * M_DTOR, 1);
|
||||
Matrix_Scale(gGfxMatrix, 1.0f + D_display_800CA230, 1.0f - D_display_800CA230, 1.0f, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 10.0f * M_DTOR, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, 1.0f + D_display_800CA230, 1.0f - D_display_800CA230, 1.0f, MTXF_APPLY);
|
||||
Matrix_RotateZ(gGfxMatrix, -(f32) gGameFrameCount * 10.0f * M_DTOR, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, 1.0f + D_display_800CA230, 1.0f - D_display_800CA230, 1.0f, MTXF_APPLY);
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
func_play_800B73E0(player);
|
||||
Lights_SetOneLight(&gMasterDisp, gLight1x, gLight1y, gLight1z, gLight1R, gLight1G, gLight1B, gAmbientR, gAmbientG,
|
||||
gAmbientB);
|
||||
if (gLevelMode == LEVELMODE_ON_RAILS) {
|
||||
Matrix_RotateY(gCalcMatrix, player->unk_114 * M_DTOR, 0);
|
||||
Matrix_RotateX(gCalcMatrix, player->unk_120 * M_DTOR, 1);
|
||||
Matrix_RotateY(gCalcMatrix, player->unk_114 * M_DTOR, MTXF_NEW);
|
||||
Matrix_RotateX(gCalcMatrix, player->unk_120 * M_DTOR, MTXF_APPLY);
|
||||
|
||||
tempVec.x = player->camEye.x - player->pos.x;
|
||||
tempVec.y = player->camEye.y - player->pos.y;
|
||||
tempVec.z = player->camEye.z - (player->unk_138 + player->unk_144);
|
||||
tempVec.x = player->cam.eye.x - player->pos.x;
|
||||
tempVec.y = player->cam.eye.y - player->pos.y;
|
||||
tempVec.z = player->cam.eye.z - (player->unk_138 + player->unk_144);
|
||||
Matrix_MultVec3f(gCalcMatrix, &tempVec, &gPlayerCamEye);
|
||||
gPlayerCamEye.x += player->pos.x;
|
||||
gPlayerCamEye.y += player->pos.y;
|
||||
gPlayerCamEye.z += player->unk_138 + player->unk_144;
|
||||
|
||||
tempVec.x = player->camAt.x - player->pos.x;
|
||||
tempVec.y = player->camAt.y - player->pos.y;
|
||||
tempVec.z = player->camAt.z - (player->unk_138 + player->unk_144);
|
||||
tempVec.x = player->cam.at.x - player->pos.x;
|
||||
tempVec.y = player->cam.at.y - player->pos.y;
|
||||
tempVec.z = player->cam.at.z - (player->unk_138 + player->unk_144);
|
||||
Matrix_MultVec3f(gCalcMatrix, &tempVec, &gPlayerCamAt);
|
||||
gPlayerCamAt.x += player->pos.x;
|
||||
gPlayerCamAt.y += player->pos.y;
|
||||
@@ -1557,28 +1567,28 @@ void Play_Draw(void) {
|
||||
if ((player->cockpitView != 0) && (player->unk_110 > 5.0f)) {
|
||||
gPlayerCamAt.x += SIN_DEG(gGameFrameCount * 150.0f) * player->unk_110 * 0.2f;
|
||||
}
|
||||
} else if (player->state_1C8 == PLAYERSTATE_1C8_7) {
|
||||
} else if (player->state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) {
|
||||
func_display_800578C4(player);
|
||||
} else {
|
||||
gPlayerCamEye.x = player->camEye.x;
|
||||
gPlayerCamEye.y = player->camEye.y;
|
||||
gPlayerCamEye.z = player->camEye.z;
|
||||
gPlayerCamAt.x = player->camAt.x;
|
||||
gPlayerCamAt.y = player->camAt.y;
|
||||
gPlayerCamAt.z = player->camAt.z;
|
||||
gPlayerCamEye.x = player->cam.eye.x;
|
||||
gPlayerCamEye.y = player->cam.eye.y;
|
||||
gPlayerCamEye.z = player->cam.eye.z;
|
||||
gPlayerCamAt.x = player->cam.at.x;
|
||||
gPlayerCamAt.y = player->cam.at.y;
|
||||
gPlayerCamAt.z = player->cam.at.z;
|
||||
}
|
||||
player->unk_058 = -Math_Atan2F(gPlayerCamEye.x - gPlayerCamAt.x, gPlayerCamEye.z - gPlayerCamAt.z);
|
||||
player->unk_05C = -Math_Atan2F(gPlayerCamEye.y - gPlayerCamAt.y,
|
||||
sqrtf(SQ(gPlayerCamEye.z - gPlayerCamAt.z) + SQ(gPlayerCamEye.x - gPlayerCamAt.x)));
|
||||
Matrix_RotateY(gCalcMatrix, -player->unk_058, 0);
|
||||
Matrix_RotateX(gCalcMatrix, player->unk_05C, 1);
|
||||
Matrix_RotateZ(gCalcMatrix, -player->unk_034 * M_DTOR, 1);
|
||||
player->camYaw = -Math_Atan2F(gPlayerCamEye.x - gPlayerCamAt.x, gPlayerCamEye.z - gPlayerCamAt.z);
|
||||
player->camPitch = -Math_Atan2F(gPlayerCamEye.y - gPlayerCamAt.y,
|
||||
sqrtf(SQ(gPlayerCamEye.z - gPlayerCamAt.z) + SQ(gPlayerCamEye.x - gPlayerCamAt.x)));
|
||||
Matrix_RotateY(gCalcMatrix, -player->camYaw, MTXF_NEW);
|
||||
Matrix_RotateX(gCalcMatrix, player->camPitch, MTXF_APPLY);
|
||||
Matrix_RotateZ(gCalcMatrix, -player->camRoll * M_DTOR, MTXF_APPLY);
|
||||
tempVec.x = 0.0f;
|
||||
tempVec.y = 100.0f;
|
||||
tempVec.z = 0.0f;
|
||||
Matrix_MultVec3f(gCalcMatrix, &tempVec, &playerCamUp);
|
||||
if (D_ctx_80178410 != 0) {
|
||||
D_ctx_80178428 = DEG_TO_RAD(gPlayer[0].unk_034);
|
||||
D_ctx_80178428 = DEG_TO_RAD(gPlayer[0].camRoll);
|
||||
func_play_800B6F50(gPlayerCamEye.x, gPlayerCamEye.y, gPlayerCamEye.z, gPlayerCamAt.x, gPlayerCamAt.y,
|
||||
gPlayerCamAt.z);
|
||||
func_bg_8003DAF0();
|
||||
@@ -1587,12 +1597,12 @@ void Play_Draw(void) {
|
||||
func_bg_80040450();
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_LookAt(gGfxMatrix, gPlayerCamEye.x, gPlayerCamEye.y, gPlayerCamEye.z, gPlayerCamAt.x, gPlayerCamAt.y,
|
||||
gPlayerCamAt.z, playerCamUp.x, playerCamUp.y, playerCamUp.z, 1);
|
||||
gPlayerCamAt.z, playerCamUp.x, playerCamUp.y, playerCamUp.z, MTXF_APPLY);
|
||||
if ((gLevelType == LEVELTYPE_PLANET) || (gCurrentLevel == LEVEL_BOLSE)) {
|
||||
if ((gCurrentLevel == LEVEL_TITANIA) &&
|
||||
((gPlayer[0].state_1C8 != PLAYERSTATE_1C8_2) || (gPlayer[0].unk_19C != 0))) {
|
||||
((gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO) || (gPlayer[0].unk_19C != 0))) {
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, gCameraShakeY, 0.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, gCameraShakeY, 0.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
Ground_801B58AC(&gMasterDisp, D_ctx_80177CC8);
|
||||
D_ctx_80177CC8 = 0.0f;
|
||||
@@ -1612,11 +1622,11 @@ void Play_Draw(void) {
|
||||
func_display_800564C0(opponent, 0);
|
||||
func_display_80057814(opponent);
|
||||
}
|
||||
if ((gGroundType == GROUNDTYPE_WATER) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_2)) {
|
||||
if ((gGroundType == GROUNDTYPE_WATER) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO)) {
|
||||
Lights_SetOneLight(&gMasterDisp, gLight2x, -1 * gLight2y, gLight2z, gLight2R, gLight2G, gLight2B, gAmbientR,
|
||||
gAmbientG, gAmbientB);
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Scale(gGfxMatrix, 1.0f, -1.0f, 1.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 1.0f, -1.0f, 1.0f, MTXF_APPLY);
|
||||
for (i = 0, opponent = gPlayer; i < gCamCount; i++, opponent++) {
|
||||
opponentPos.x = opponent->pos.x;
|
||||
opponentPos.y = opponent->pos.y;
|
||||
@@ -1631,17 +1641,17 @@ void Play_Draw(void) {
|
||||
TexturedLine_Draw();
|
||||
gReflectY = 1;
|
||||
PlayerShot_Draw();
|
||||
if ((gGroundType == GROUNDTYPE_WATER) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_2)) {
|
||||
if ((gGroundType == GROUNDTYPE_WATER) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO)) {
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Scale(gGfxMatrix, 1.0f, -1.0f, 1.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 1.0f, -1.0f, 1.0f, MTXF_APPLY);
|
||||
gReflectY = -1;
|
||||
PlayerShot_Draw();
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
}
|
||||
gReflectY = -1;
|
||||
if ((gGroundType == GROUNDTYPE_WATER) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_2)) {
|
||||
if ((gGroundType == GROUNDTYPE_WATER) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO)) {
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Scale(gGfxMatrix, 1.0f, -1.0f, 1.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 1.0f, -1.0f, 1.0f, MTXF_APPLY);
|
||||
for (i = 0, opponent = gPlayer; i < gCamCount; i++, opponent++) {
|
||||
if (sPlayersVisible[i] != 0) {
|
||||
func_display_80055B58(opponent);
|
||||
@@ -1660,7 +1670,8 @@ void Play_Draw(void) {
|
||||
}
|
||||
if ((gCurrentLevel != LEVEL_AQUAS) &&
|
||||
(((gCurrentLevel != LEVEL_CORNERIA) && (gCurrentLevel != LEVEL_VENOM_ANDROSS)) ||
|
||||
((gPlayer[0].state_1C8 != PLAYERSTATE_1C8_7) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_2)))) {
|
||||
((gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE) &&
|
||||
(gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO)))) {
|
||||
Effect_Draw(0);
|
||||
}
|
||||
gReflectY = 1;
|
||||
@@ -1671,18 +1682,19 @@ void Play_Draw(void) {
|
||||
func_display_80056230(opponent);
|
||||
}
|
||||
}
|
||||
if ((gCurrentLevel == LEVEL_AQUAS) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3)) {
|
||||
if ((gCurrentLevel == LEVEL_AQUAS) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE)) {
|
||||
Aquas_801AA20C();
|
||||
}
|
||||
if (((gCurrentLevel == LEVEL_CORNERIA) || (gCurrentLevel == LEVEL_VENOM_ANDROSS)) &&
|
||||
((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_2))) {
|
||||
((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) ||
|
||||
(gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO))) {
|
||||
Effect_Draw(0);
|
||||
}
|
||||
BonusText_DrawAll();
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
func_display_80057248();
|
||||
func_display_80057504();
|
||||
if (D_display_800CA228 != 0) {
|
||||
if (sDrawCockpit != 0) {
|
||||
func_display_80053B18();
|
||||
}
|
||||
for (i = 0, opponent = gPlayer; i < gCamCount; i++, opponent++) {
|
||||
@@ -1697,11 +1709,12 @@ void Play_Draw(void) {
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((gLevelMode == LEVELMODE_UNK_2) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3)) {
|
||||
if ((gLevelMode == LEVELMODE_UNK_2) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE)) {
|
||||
Turret_801A6164(gPlayer);
|
||||
}
|
||||
func_bg_80040954();
|
||||
if ((gCamCount != 1) && ((player->state_1C8 == PLAYERSTATE_1C8_3) || (player->state_1C8 == PLAYERSTATE_1C8_5))) {
|
||||
if ((gCamCount != 1) &&
|
||||
((player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (player->state_1C8 == PLAYERSTATE_1C8_U_TURN))) {
|
||||
func_hud_8008FA84();
|
||||
func_hud_8008CA44();
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ f32* D_edata_800CF964[] = { NULL };
|
||||
|
||||
void func_edata_800594F0(Object_80* obj80) {
|
||||
RCP_SetupDL_57(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
|
||||
Matrix_RotateY(gGfxMatrix, M_PI, 1);
|
||||
Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_VE1_6007D90);
|
||||
RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
|
||||
@@ -14,7 +14,7 @@ void func_edata_800594F0(Object_80* obj80) {
|
||||
|
||||
void func_edata_800595D0(Object_80* obj80) {
|
||||
RCP_SetupDL_57(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
|
||||
Matrix_RotateY(gGfxMatrix, M_PI, 1);
|
||||
Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_VE1_6007CF0);
|
||||
RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
|
||||
|
||||
@@ -364,8 +364,8 @@ ObjectInfo D_edata_800CC124[0x190] = {
|
||||
/* OBJ_ACTOR_268 */ {(void*) Aquas_801BDE6C, 1, (ObjectFunc) Aquas_801BD54C, D_AQ_6031570, 10000.0f, 0, 0, 0, 0, 0.0f, 0 },
|
||||
/* OBJ_ACTOR_269 */ {(void*) Aquas_801BD264, 1, (ObjectFunc) Aquas_801BC9A0, D_AQ_6030D20, 2000.0f, 0, 0, 40, 0, 0.0f, 0 },
|
||||
/* OBJ_ACTOR_270 */ {(void*) Aquas_801BEB1C, 1, (ObjectFunc) Aquas_801BE3F8, D_AQ_60314C8, 1000.0f, 0, 0, 40, 0, 0.0f, 0 },
|
||||
/* OBJ_ACTOR_271 */ {(void*) func_360_8002E694, 2, (ObjectFunc) func_360_8002E670, D_BO_6011B24, 0.0f, 0, 0, 39, 0, 730.0f, 1 },
|
||||
/* OBJ_ACTOR_272 */ {(void*) func_360_8002E6DC, 1, (ObjectFunc) func_360_8002E6B8, D_BO_6011BF4, 0.0f, 0, 0, 39, 0, 150.0f, 1 },
|
||||
/* OBJ_ACTOR_271 */ {(void*) Actor271_Draw, 2, (ObjectFunc) Actor271_Update, D_BO_6011B24, 0.0f, 0, 0, 39, 0, 730.0f, 1 },
|
||||
/* OBJ_ACTOR_272 */ {(void*) Actor272_Draw, 1, (ObjectFunc) Actor272_Update, D_BO_6011BF4, 0.0f, 0, 0, 39, 0, 150.0f, 1 },
|
||||
/* OBJ_ACTOR_273 */ {(void*) Fortuna_80188FE4, 2, (ObjectFunc) Fortuna_80188AD0, D_FO_600FF30, 0.0f, 0, 0, 39, 0, 220.0f, 1 },
|
||||
/* OBJ_ACTOR_274 */ {(void*) SectorZ_8019E3A8, 1, (ObjectFunc) SectorZ_8019E234, gDefaultCubeHitbox200, 0.0f, 0, 0, 39, 0, 1.0f, 0 },
|
||||
/* OBJ_ACTOR_275 */ {(void*) Solar_8019F7AC, 1, (ObjectFunc) Solar_8019F20C, gDefaultCubeHitbox100, 200.0f, 0, 0, 39, 0, 1.0f, 1 },
|
||||
@@ -402,8 +402,8 @@ ObjectInfo D_edata_800CC124[0x190] = {
|
||||
/* OBJ_BOSS_306 */ {(void*) Titania_801982A8, 1, (ObjectFunc) Titania_80197A94,D_TI_801B83A8, 1000.0f, 0, 0, 40, 1, 0.0f, 10 },
|
||||
/* OBJ_BOSS_ZO */ {(void*) Zoness_801949DC, 2, (ObjectFunc) Zoness_80194A84, D_ZO_602C044, 1000.0f, 0, 0, 40, 0, 1.0f, 10 },
|
||||
/* OBJ_BOSS_308 */ {(void*) func_hud_8008FE78, 1, (ObjectFunc) func_hud_800907C4, D_FO_600FFE0, 0.0f, 0, 0, 40, 1, 0.0f, 10 },
|
||||
/* OBJ_BOSS_309 */ {(void*) func_360_8002E604, 1, (ObjectFunc) func_360_8002E5E0, gHitboxNone, 0.0f, 0, 0, 40, 1, 0.0f, 10 },
|
||||
/* OBJ_BOSS_310 */ {(void*) func_360_8002E64C, 1, (ObjectFunc) func_360_8002E628, gHitboxNone, 0.0f, 0, 0, 40, 1, 0.0f, 10 },
|
||||
/* OBJ_BOSS_309 */ {(void*) Boss309_Draw, 1, (ObjectFunc) Boss309_Update, gHitboxNone, 0.0f, 0, 0, 40, 1, 0.0f, 10 },
|
||||
/* OBJ_BOSS_310 */ {(void*) Boss310_Draw, 1, (ObjectFunc) Boss310_Update, gHitboxNone, 0.0f, 0, 0, 40, 1, 0.0f, 10 },
|
||||
/* OBJ_BOSS_311 */ {(void*) Bolse_80191AFC, 2, (ObjectFunc) Bolse_801912FC, D_BO_6011C80, 0.0f, 0, 0, 40, 1, 0.0f, 10 },
|
||||
/* OBJ_BOSS_312 */ {(void*) Venom2_80196288, 2, (ObjectFunc) Venom2_80196210, D_VE2_60166F4, 0.0f, 0, 0, 40, 1, 0.0f, 10 },
|
||||
/* OBJ_BOSS_313 */ {(void*) SectorZ_8019E98C, 1, (ObjectFunc) SectorZ_8019E454, D_SZ_6009388, 0.0f, 0, 0, 40, 0, 0.0f, 10 },
|
||||
|
||||
+209
-207
@@ -31,10 +31,10 @@ WingInfo D_edisplay_80161630;
|
||||
char D_edisplay_800CF970[] = "$Id: fox_edisplay.c,v 1.196 1997/05/08 08:31:50 morita Exp $";
|
||||
|
||||
void func_edisplay_800596C0(void) {
|
||||
Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 13.0f * M_DTOR, 1);
|
||||
Matrix_Scale(gGfxMatrix, 1.02f, 0.98f, 1.0f, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, -(f32) gGameFrameCount * 13.0f * M_DTOR, 1);
|
||||
Matrix_Scale(gGfxMatrix, 1.02f, 0.98f, 1.0f, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 13.0f * M_DTOR, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, 1.02f, 0.98f, 1.0f, MTXF_APPLY);
|
||||
Matrix_RotateZ(gGfxMatrix, -(f32) gGameFrameCount * 13.0f * M_DTOR, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, 1.02f, 0.98f, 1.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ void func_edisplay_800597C0(s32 arg0) {
|
||||
}
|
||||
|
||||
void Graphics_SetScaleMtx(f32 scale) {
|
||||
Matrix_Scale(gGfxMatrix, scale, scale, scale, 1);
|
||||
Matrix_Scale(gGfxMatrix, scale, scale, scale, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ void Actor202_Draw(Actor202* this) {
|
||||
Vec3f sp30[30];
|
||||
f32 temp = D_edisplay_800CF9B0[this->unk_0B6] - 114.0f;
|
||||
|
||||
Matrix_Translate(gGfxMatrix, 0.f, -temp, 0.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.f, -temp, 0.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
Animation_GetFrameData(&D_ME_601E8C4, this->unk_0B6, sp30);
|
||||
Animation_DrawSkeleton(1, D_ME_601E9D0, sp30, NULL, func_edisplay_800599A4, &this->index, &gIdentityMatrix);
|
||||
@@ -135,33 +135,33 @@ void FogShadow_Draw(FogShadow* this) {
|
||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 180);
|
||||
switch (this->unk_45) {
|
||||
case OBJ_80_0:
|
||||
Matrix_Scale(gGfxMatrix, 2.0f, 1.0f, 0.7f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 2.0f, 1.0f, 0.7f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_CO_6034B90);
|
||||
break;
|
||||
case OBJ_80_21:
|
||||
Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 0.7f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 0.7f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_CO_6034B90);
|
||||
break;
|
||||
case OBJ_80_6:
|
||||
case OBJ_80_7:
|
||||
Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 10.55f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 10.55f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_Gfx_800DAC20);
|
||||
break;
|
||||
case OBJ_80_56:
|
||||
Matrix_Scale(gGfxMatrix, 1.6f, 1.0f, 1.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 1.6f, 1.0f, 1.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_CO_6034B90);
|
||||
break;
|
||||
case OBJ_80_20:
|
||||
Matrix_Scale(gGfxMatrix, 1.2f, 1.0f, 1.3f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 1.2f, 1.0f, 1.3f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_CO_6034B90);
|
||||
break;
|
||||
case OBJ_80_22:
|
||||
Matrix_Scale(gGfxMatrix, 2.2f, 1.0f, 1.4f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 2.2f, 1.0f, 1.4f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_CO_6034B90);
|
||||
break;
|
||||
@@ -170,7 +170,7 @@ void FogShadow_Draw(FogShadow* this) {
|
||||
}
|
||||
|
||||
void func_edisplay_80059F68(Object_80* obj80) {
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -95.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -95.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_CO_602DA20);
|
||||
}
|
||||
@@ -181,7 +181,7 @@ void func_edisplay_80059FDC(Object_80* obj80) {
|
||||
|
||||
void func_edisplay_8005A010(Sprite* sprite) {
|
||||
if (sprite->unk_48 == 0) {
|
||||
Matrix_RotateY(gGfxMatrix, M_PI / 2, 1);
|
||||
Matrix_RotateY(gGfxMatrix, M_PI / 2, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_CO_60361F0);
|
||||
}
|
||||
@@ -239,14 +239,14 @@ Gfx* D_edisplay_800CFC7C[] = { D_ZO_601B570, D_ZO_601B710, D_ZO_60209B0, D_ZO_60
|
||||
void Actor189_Draw(Actor189* this) {
|
||||
switch (this->state) {
|
||||
case 0:
|
||||
Matrix_Translate(gGfxMatrix, 18.0f, 15.0f, -15.0f, 1);
|
||||
Matrix_RotateY(gGfxMatrix, M_PI, 1);
|
||||
Matrix_Translate(gGfxMatrix, 18.0f, 15.0f, -15.0f, MTXF_APPLY);
|
||||
Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_arwing_3016660);
|
||||
break;
|
||||
case 1:
|
||||
Matrix_Translate(gGfxMatrix, -18.0f, 15.0f, -15.0f, 1);
|
||||
Matrix_RotateY(gGfxMatrix, M_PI, 1);
|
||||
Matrix_Translate(gGfxMatrix, -18.0f, 15.0f, -15.0f, MTXF_APPLY);
|
||||
Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_arwing_3015D80);
|
||||
break;
|
||||
@@ -439,13 +439,13 @@ void func_edisplay_8005ADAC(Actor* actor) {
|
||||
sp5C *= 1.111f;
|
||||
}
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, sp5C, sp5C * 0.7f, sp5C, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, -actor->obj.rot.z * M_DTOR, 1);
|
||||
Matrix_RotateX(gGfxMatrix, -actor->obj.rot.x * M_DTOR, 1);
|
||||
Matrix_RotateY(gGfxMatrix, -actor->obj.rot.y * M_DTOR, 1);
|
||||
Matrix_RotateY(gGfxMatrix, -gPlayer[gPlayerNum].unk_058, 1);
|
||||
Matrix_RotateX(gGfxMatrix, gPlayer[gPlayerNum].unk_05C, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, sp5C, sp5C * 0.7f, sp5C, MTXF_APPLY);
|
||||
Matrix_RotateZ(gGfxMatrix, -actor->obj.rot.z * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateX(gGfxMatrix, -actor->obj.rot.x * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateY(gGfxMatrix, -actor->obj.rot.y * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateY(gGfxMatrix, -gPlayer[gPlayerNum].camYaw, MTXF_APPLY);
|
||||
Matrix_RotateX(gGfxMatrix, gPlayer[gPlayerNum].camPitch, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
func_display_8005465C(gLevelType);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
@@ -459,20 +459,20 @@ void func_edisplay_8005ADAC(Actor* actor) {
|
||||
RCP_SetupDL_64_2();
|
||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 100);
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, 70.0f, -10.0f, -100.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, sp5C, 1.0f, 50.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -17.5f, 1);
|
||||
Matrix_RotateX(gGfxMatrix, M_PI / 2, 1);
|
||||
Matrix_RotateY(gGfxMatrix, M_DTOR * sp54, 1);
|
||||
Matrix_Translate(gGfxMatrix, 70.0f, -10.0f, -100.0f, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, sp5C, 1.0f, 50.0f, MTXF_APPLY);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -17.5f, MTXF_APPLY);
|
||||
Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY);
|
||||
Matrix_RotateY(gGfxMatrix, M_DTOR * sp54, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_102A8A0);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, -70.0f, -10.0f, -100.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, sp5C, 1.0f, 50.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -17.5f, 1);
|
||||
Matrix_RotateX(gGfxMatrix, M_PI / 2, 1);
|
||||
Matrix_RotateY(gGfxMatrix, M_DTOR * sp54, 1);
|
||||
Matrix_Translate(gGfxMatrix, -70.0f, -10.0f, -100.0f, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, sp5C, 1.0f, 50.0f, MTXF_APPLY);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -17.5f, MTXF_APPLY);
|
||||
Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY);
|
||||
Matrix_RotateY(gGfxMatrix, M_DTOR * sp54, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_102A8A0);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
@@ -495,11 +495,11 @@ void func_edisplay_8005B1E8(Actor* actor, s32 levelType) {
|
||||
scale *= 1.2f;
|
||||
}
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Scale(gGfxMatrix, scale, scale, scale, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, -actor->obj.rot.z * M_DTOR, 1);
|
||||
Matrix_RotateX(gGfxMatrix, -actor->obj.rot.x * M_DTOR, 1);
|
||||
Matrix_RotateY(gGfxMatrix, -actor->obj.rot.y * M_DTOR, 1);
|
||||
Matrix_RotateY(gGfxMatrix, -gPlayer[gPlayerNum].unk_058, 1);
|
||||
Matrix_Scale(gGfxMatrix, scale, scale, scale, MTXF_APPLY);
|
||||
Matrix_RotateZ(gGfxMatrix, -actor->obj.rot.z * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateX(gGfxMatrix, -actor->obj.rot.x * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateY(gGfxMatrix, -actor->obj.rot.y * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateY(gGfxMatrix, -gPlayer[gPlayerNum].camYaw, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
func_display_8005465C(levelType);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
@@ -512,15 +512,15 @@ void func_edisplay_8005B388(Actor* actor) {
|
||||
|
||||
Matrix_MultVec3f(gGfxMatrix, &sp3C, &sp30);
|
||||
if ((((fabsf(sp30.z) < 3000.0f) && (fabsf(sp30.x) < 3000.0f) && (gBossActive == 0)) ||
|
||||
(gPlayer[0].state_1C8 == PLAYERSTATE_1C8_0) || (gCurrentLevel == LEVEL_VENOM_ANDROSS) ||
|
||||
(gCurrentLevel == LEVEL_VENOM_2) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7)) &&
|
||||
(gPlayer[0].state_1C8 == PLAYERSTATE_1C8_STANDBY) || (gCurrentLevel == LEVEL_VENOM_ANDROSS) ||
|
||||
(gCurrentLevel == LEVEL_VENOM_2) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) &&
|
||||
(gCurrentLevel != LEVEL_MACBETH) && (gCurrentLevel != LEVEL_TITANIA)) {
|
||||
if (actor->obj.id == OBJ_ACTOR_195) {
|
||||
if (((gCurrentLevel == LEVEL_VENOM_2) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7) &&
|
||||
if (((gCurrentLevel == LEVEL_VENOM_2) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) &&
|
||||
(actor->index == 10)) ||
|
||||
((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7) && (gPlayer[0].unk_1D0 >= 100) &&
|
||||
((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) && (gPlayer[0].unk_1D0 >= 100) &&
|
||||
(gCurrentLevel == LEVEL_KATINA) && (actor->index == 1)) ||
|
||||
((gCurrentLevel == LEVEL_SECTOR_Y) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_0) &&
|
||||
((gCurrentLevel == LEVEL_SECTOR_Y) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_STANDBY) &&
|
||||
(actor->state == 5))) {
|
||||
D_edisplay_80161630.rightState = gPlayer[0].wings.rightState;
|
||||
D_edisplay_80161630.leftState = gPlayer[0].wings.leftState;
|
||||
@@ -537,7 +537,7 @@ void func_edisplay_8005B388(Actor* actor) {
|
||||
D_edisplay_80161630.unk_14 = D_edisplay_80161630.unk_18 = D_edisplay_80161630.unk_1C =
|
||||
D_edisplay_80161630.unk_20 = D_edisplay_80161630.unk_38 = D_edisplay_80161630.unk_24 = 0.0f;
|
||||
D_edisplay_80161630.unk_28 = actor->fwork[17];
|
||||
D_edisplay_80161630.unk_2C = actor->iwork[14];
|
||||
D_edisplay_80161630.modelId = actor->iwork[14];
|
||||
D_edisplay_80161630.unk_30 = actor->fwork[20];
|
||||
D_edisplay_80161630.unk_34 = actor->fwork[19];
|
||||
if (gLevelType == LEVELTYPE_SPACE) {
|
||||
@@ -556,14 +556,14 @@ void func_edisplay_8005B388(Actor* actor) {
|
||||
}
|
||||
|
||||
void func_edisplay_8005B6A4(Actor* actor) {
|
||||
Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 1.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 1.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_ME_6024B60);
|
||||
}
|
||||
|
||||
void func_edisplay_8005B71C(Actor* actor) {
|
||||
RCP_SetupDL_29(actor->unk_046, gFogGreen, gFogBlue, gFogAlpha, actor->unk_048, gFogFar);
|
||||
Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 0.5f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 0.5f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_ME_6018C00);
|
||||
}
|
||||
@@ -592,14 +592,14 @@ void func_edisplay_8005B848(Actor* actor) {
|
||||
if ((gGameFrameCount % 2) != 0) {
|
||||
scale = 1.7f;
|
||||
}
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY);
|
||||
actor->iwork[11] = 1;
|
||||
Matrix_Scale(gGfxMatrix, scale, scale, scale, 1);
|
||||
Matrix_Scale(gGfxMatrix, scale, scale, scale, MTXF_APPLY);
|
||||
func_edisplay_8005B1E8(actor, 2);
|
||||
}
|
||||
|
||||
void func_edisplay_8005B9A4(Actor* actor) {
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, -124.0f, 0.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, -124.0f, 0.0f, MTXF_APPLY);
|
||||
Animation_GetFrameData(&D_CO_6029528, actor->unk_0B6, actor->vwork);
|
||||
Animation_DrawSkeleton(1, D_CO_6029674, actor->vwork, NULL, NULL, actor, &gIdentityMatrix);
|
||||
}
|
||||
@@ -627,8 +627,8 @@ void func_edisplay_8005BAB4(ObjectId objId, s32 index) {
|
||||
switch (objId) {
|
||||
case OBJ_EFFECT_374:
|
||||
if (gEffects[index].state == 0) {
|
||||
Matrix_Scale(gGfxMatrix, 1.2f, 0.0f, 1.2f, 1);
|
||||
Matrix_RotateX(gGfxMatrix, M_PI / 2, 1);
|
||||
Matrix_Scale(gGfxMatrix, 1.2f, 0.0f, 1.2f, MTXF_APPLY);
|
||||
Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_102A8A0);
|
||||
}
|
||||
@@ -639,8 +639,8 @@ void func_edisplay_8005BAB4(ObjectId objId, s32 index) {
|
||||
case OBJ_ACTOR_EVENT:
|
||||
switch (gActors[index].unk_0B4) {
|
||||
case EINFO_3:
|
||||
Matrix_Scale(gGfxMatrix, 2.3f, 0.0f, 2.3f, 1);
|
||||
Matrix_RotateX(gGfxMatrix, M_PI / 2, 1);
|
||||
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;
|
||||
@@ -649,17 +649,17 @@ void func_edisplay_8005BAB4(ObjectId objId, s32 index) {
|
||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, 255);
|
||||
gDPSetEnvColor(gMasterDisp++, 0, 0, 0, 255);
|
||||
temp_fv0 = gActors[index].fwork[15] * 3.0f;
|
||||
Matrix_Scale(gGfxMatrix, temp_fv0, temp_fv0, temp_fv0, 1);
|
||||
Matrix_RotateX(gGfxMatrix, -M_PI / 2, 1);
|
||||
Matrix_Scale(gGfxMatrix, temp_fv0, temp_fv0, temp_fv0, MTXF_APPLY);
|
||||
Matrix_RotateX(gGfxMatrix, -M_PI / 2, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_1024AC0);
|
||||
break;
|
||||
default:
|
||||
temp1 = D_edisplay_800CFCCC[gGameFrameCount % 8U];
|
||||
temp2 = D_edisplay_800CFCCC[(gGameFrameCount + 4) % 8U];
|
||||
Matrix_Scale(gGfxMatrix, 1.4f + temp1, 0.0f, 1.4f + temp2, 1);
|
||||
Matrix_RotateY(gGfxMatrix, M_PI, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 30.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 1.4f + temp1, 0.0f, 1.4f + temp2, MTXF_APPLY);
|
||||
Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 30.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK);
|
||||
gSPDisplayList(gMasterDisp++, D_1032780);
|
||||
@@ -670,11 +670,11 @@ void func_edisplay_8005BAB4(ObjectId objId, s32 index) {
|
||||
gSPDisplayList(gMasterDisp++, D_CO_6034B90);
|
||||
break;
|
||||
case OBJ_BOSS_316:
|
||||
if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_0) {
|
||||
if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_STANDBY) {
|
||||
RCP_SetupDL(&gMasterDisp, 0x40);
|
||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, 200);
|
||||
}
|
||||
Matrix_RotateX(gGfxMatrix, M_PI / 2, 1);
|
||||
Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY);
|
||||
Graphics_SetScaleMtx(150.0f);
|
||||
gSPDisplayList(gMasterDisp++, D_102A8A0);
|
||||
break;
|
||||
@@ -703,7 +703,7 @@ void func_edisplay_8005BAB4(ObjectId objId, s32 index) {
|
||||
break;
|
||||
case OBJ_ACTOR_192:
|
||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 150);
|
||||
Matrix_Scale(gGfxMatrix, 0.4f, 0.4f, gActors[index].scale, 1);
|
||||
Matrix_Scale(gGfxMatrix, 0.4f, 0.4f, gActors[index].scale, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_CO_6034B90);
|
||||
break;
|
||||
@@ -713,10 +713,10 @@ void func_edisplay_8005BAB4(ObjectId objId, s32 index) {
|
||||
gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK);
|
||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, 255);
|
||||
gDPSetEnvColor(gMasterDisp++, 0, 0, 0, 0);
|
||||
Matrix_RotateX(gGfxMatrix, gActors[index].fwork[0], 1);
|
||||
Matrix_RotateZ(gGfxMatrix, gActors[index].fwork[2], 1);
|
||||
Matrix_Scale(gGfxMatrix, gActors[index].scale, 1.0f, gActors[index].scale, 1);
|
||||
Matrix_RotateX(gGfxMatrix, -M_PI / 2, 1);
|
||||
Matrix_RotateX(gGfxMatrix, gActors[index].fwork[0], MTXF_APPLY);
|
||||
Matrix_RotateZ(gGfxMatrix, gActors[index].fwork[2], MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, gActors[index].scale, 1.0f, gActors[index].scale, MTXF_APPLY);
|
||||
Matrix_RotateX(gGfxMatrix, -M_PI / 2, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_1024AC0);
|
||||
break;
|
||||
@@ -725,12 +725,12 @@ void func_edisplay_8005BAB4(ObjectId objId, s32 index) {
|
||||
gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK);
|
||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, 255);
|
||||
gDPSetEnvColor(gMasterDisp++, 0, 0, 0, 0);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 120.0f, 1);
|
||||
Matrix_RotateX(gGfxMatrix, gActors[index].fwork[1] * M_DTOR, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, gActors[index].fwork[2] * M_DTOR, 1);
|
||||
Matrix_RotateY(gGfxMatrix, gActors[index].obj.rot.y * M_DTOR, 1);
|
||||
Matrix_Scale(gGfxMatrix, 6.0f, 1.0f, 7.5f, 1);
|
||||
Matrix_RotateX(gGfxMatrix, -M_PI / 2, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 120.0f, MTXF_APPLY);
|
||||
Matrix_RotateX(gGfxMatrix, gActors[index].fwork[1] * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateZ(gGfxMatrix, gActors[index].fwork[2] * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateY(gGfxMatrix, gActors[index].obj.rot.y * M_DTOR, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, 6.0f, 1.0f, 7.5f, MTXF_APPLY);
|
||||
Matrix_RotateX(gGfxMatrix, -M_PI / 2, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_1024AC0);
|
||||
break;
|
||||
@@ -738,11 +738,11 @@ void func_edisplay_8005BAB4(ObjectId objId, s32 index) {
|
||||
RCP_SetupDL(&gMasterDisp, 0x45);
|
||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, 255);
|
||||
gDPSetEnvColor(gMasterDisp++, 0, 0, 0, 0);
|
||||
Matrix_RotateX(gGfxMatrix, gActors[index].fwork[1], 1);
|
||||
Matrix_RotateZ(gGfxMatrix, gActors[index].fwork[2], 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 0.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 1.2f, 1.0f, 1.2f, 1);
|
||||
Matrix_RotateX(gGfxMatrix, -M_PI / 2, 1);
|
||||
Matrix_RotateX(gGfxMatrix, gActors[index].fwork[1], MTXF_APPLY);
|
||||
Matrix_RotateZ(gGfxMatrix, gActors[index].fwork[2], MTXF_APPLY);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 0.0f, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, 1.2f, 1.0f, 1.2f, MTXF_APPLY);
|
||||
Matrix_RotateX(gGfxMatrix, -M_PI / 2, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_1024AC0);
|
||||
break;
|
||||
@@ -750,7 +750,7 @@ void func_edisplay_8005BAB4(ObjectId objId, s32 index) {
|
||||
RCP_SetupDL_48();
|
||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, 255);
|
||||
gDPSetEnvColor(gMasterDisp++, 0, 0, 0, 255);
|
||||
Matrix_Scale(gGfxMatrix, 4.0f, 4.0f, 4.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 4.0f, 4.0f, 4.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_1024AC0);
|
||||
break;
|
||||
@@ -767,7 +767,7 @@ void ItemCheckpoint_Draw(ItemCheckpoint* this) {
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
RCP_SetupDL(&gMasterDisp, 0x40);
|
||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 0, 255);
|
||||
Matrix_Scale(gGfxMatrix, 3.2f, 3.2f, 3.2f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 3.2f, 3.2f, 3.2f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gDPSetTextureFilter(gMasterDisp++, G_TF_POINT);
|
||||
gSPDisplayList(gMasterDisp++, D_1023C80);
|
||||
@@ -777,13 +777,13 @@ void ItemCheckpoint_Draw(ItemCheckpoint* this) {
|
||||
RCP_SetupDL(&gMasterDisp, 0x1D);
|
||||
gSPTexture(gMasterDisp++, 2000, 2000, 0, G_TX_RENDERTILE, G_ON);
|
||||
gSPSetGeometryMode(gMasterDisp++, G_TEXTURE_GEN);
|
||||
Matrix_RotateZ(gGfxMatrix, this->unk_58 * M_DTOR, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, this->unk_58 * M_DTOR, MTXF_APPLY);
|
||||
|
||||
for (i = 0; i < 8; i++) {
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_RotateZ(gGfxMatrix, i * 45.0f * M_DTOR, 1);
|
||||
Matrix_Translate(gGfxMatrix, 2.0f * this->scale, 0.0f, 0.0f, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, (gGameFrameCount + (i * 110.0f)) * M_DTOR * 7.2f * this->unk_54, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, i * 45.0f * M_DTOR, MTXF_APPLY);
|
||||
Matrix_Translate(gGfxMatrix, 2.0f * this->scale, 0.0f, 0.0f, MTXF_APPLY);
|
||||
Matrix_RotateZ(gGfxMatrix, (gGameFrameCount + (i * 110.0f)) * M_DTOR * 7.2f * this->unk_54, MTXF_APPLY);
|
||||
Graphics_SetScaleMtx(2.0f * this->unk_50);
|
||||
gSPDisplayList(gMasterDisp++, D_101CAE0);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
@@ -850,8 +850,8 @@ void ItemLasers_Draw(ItemLasers* this) {
|
||||
void ItemMeteoWarp_Draw(ItemMeteoWarp* this) {
|
||||
s32 i;
|
||||
|
||||
this->obj.rot.y = (Math_Atan2F(gPlayer[gPlayerNum].camEye.x - this->obj.pos.x,
|
||||
gPlayer[gPlayerNum].camEye.z - (this->obj.pos.z + D_ctx_80177D20)) *
|
||||
this->obj.rot.y = (Math_Atan2F(gPlayer[gPlayerNum].cam.eye.x - this->obj.pos.x,
|
||||
gPlayer[gPlayerNum].cam.eye.z - (this->obj.pos.z + D_ctx_80177D20)) *
|
||||
180.0f) /
|
||||
M_PI;
|
||||
if (this->state != 0) {
|
||||
@@ -863,8 +863,8 @@ void ItemMeteoWarp_Draw(ItemMeteoWarp* this) {
|
||||
gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK | G_LIGHTING);
|
||||
for (i = 0; i < 7; i++) {
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_RotateZ(gGfxMatrix, (i * 360.0f / 7.0f) * M_DTOR, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, this->scale, 0.0f, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, (i * 360.0f / 7.0f) * M_DTOR, MTXF_APPLY);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, this->scale, 0.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_102FE80);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
@@ -874,68 +874,68 @@ void ItemMeteoWarp_Draw(ItemMeteoWarp* this) {
|
||||
|
||||
void func_edisplay_8005D008(Object* obj, s32 drawType) {
|
||||
if (drawType == 2) {
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, D_ctx_80177D20, 1);
|
||||
Matrix_Translate(gCalcMatrix, obj->pos.x, obj->pos.y, obj->pos.z, 0);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, D_ctx_80177D20, MTXF_APPLY);
|
||||
Matrix_Translate(gCalcMatrix, obj->pos.x, obj->pos.y, obj->pos.z, MTXF_NEW);
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Mult(gGfxMatrix, gCalcMatrix, 1);
|
||||
Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY);
|
||||
Matrix_Copy(&D_edisplay_801615F0, gGfxMatrix);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
Matrix_RotateY(gCalcMatrix, obj->rot.y * M_DTOR, 1);
|
||||
Matrix_RotateX(gCalcMatrix, obj->rot.x * M_DTOR, 1);
|
||||
Matrix_RotateZ(gCalcMatrix, obj->rot.z * M_DTOR, 1);
|
||||
Matrix_RotateY(gCalcMatrix, obj->rot.y * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateX(gCalcMatrix, obj->rot.x * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateZ(gCalcMatrix, obj->rot.z * M_DTOR, MTXF_APPLY);
|
||||
} else {
|
||||
Matrix_Translate(gGfxMatrix, obj->pos.x, obj->pos.y, obj->pos.z + D_ctx_80177D20, 1);
|
||||
Matrix_Translate(gGfxMatrix, obj->pos.x, obj->pos.y, obj->pos.z + D_ctx_80177D20, MTXF_APPLY);
|
||||
Matrix_Copy(&D_edisplay_801615F0, gGfxMatrix);
|
||||
Matrix_RotateY(gGfxMatrix, obj->rot.y * M_DTOR, 1);
|
||||
Matrix_RotateX(gGfxMatrix, obj->rot.x * M_DTOR, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, obj->rot.z * M_DTOR, 1);
|
||||
Matrix_RotateY(gGfxMatrix, obj->rot.y * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateX(gGfxMatrix, obj->rot.x * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateZ(gGfxMatrix, obj->rot.z * M_DTOR, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
}
|
||||
}
|
||||
|
||||
void func_edisplay_8005D1F0(Object* obj, s32 drawType) {
|
||||
if (drawType == 2) {
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, D_ctx_80177D20, 1);
|
||||
Matrix_Translate(gCalcMatrix, obj->pos.x, obj->pos.y, obj->pos.z, 0);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, D_ctx_80177D20, MTXF_APPLY);
|
||||
Matrix_Translate(gCalcMatrix, obj->pos.x, obj->pos.y, obj->pos.z, MTXF_NEW);
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Mult(gGfxMatrix, gCalcMatrix, 1);
|
||||
Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY);
|
||||
Matrix_Copy(&D_edisplay_801615F0, gGfxMatrix);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
Matrix_RotateY(gCalcMatrix, obj->rot.y * M_DTOR, 1);
|
||||
Matrix_RotateX(gCalcMatrix, obj->rot.x * M_DTOR, 1);
|
||||
Matrix_RotateZ(gCalcMatrix, obj->rot.z * M_DTOR, 1);
|
||||
Matrix_RotateY(gCalcMatrix, obj->rot.y * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateX(gCalcMatrix, obj->rot.x * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateZ(gCalcMatrix, obj->rot.z * M_DTOR, MTXF_APPLY);
|
||||
} else {
|
||||
Matrix_Translate(gGfxMatrix, obj->pos.x, obj->pos.y, obj->pos.z + D_ctx_80177D20, 1);
|
||||
Matrix_Translate(gGfxMatrix, obj->pos.x, obj->pos.y, obj->pos.z + D_ctx_80177D20, MTXF_APPLY);
|
||||
Matrix_Copy(&D_edisplay_801615F0, gGfxMatrix);
|
||||
Matrix_RotateY(gGfxMatrix, obj->rot.y * M_DTOR, 1);
|
||||
Matrix_RotateX(gGfxMatrix, obj->rot.x * M_DTOR, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, obj->rot.z * M_DTOR, 1);
|
||||
Matrix_RotateY(gGfxMatrix, obj->rot.y * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateX(gGfxMatrix, obj->rot.x * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateZ(gGfxMatrix, obj->rot.z * M_DTOR, MTXF_APPLY);
|
||||
}
|
||||
}
|
||||
|
||||
void func_edisplay_8005D3CC(Object* obj, f32 xRot, f32 yRot, f32 zRot, s32 drawType) {
|
||||
if (drawType == 2) {
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, D_ctx_80177D20, 1);
|
||||
Matrix_Translate(gCalcMatrix, obj->pos.x, obj->pos.y, obj->pos.z, 0);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, D_ctx_80177D20, MTXF_APPLY);
|
||||
Matrix_Translate(gCalcMatrix, obj->pos.x, obj->pos.y, obj->pos.z, MTXF_NEW);
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Mult(gGfxMatrix, gCalcMatrix, 1);
|
||||
Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY);
|
||||
Matrix_Copy(&D_edisplay_801615F0, gGfxMatrix);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
Matrix_RotateY(gCalcMatrix, M_DTOR * yRot, 1);
|
||||
Matrix_RotateX(gCalcMatrix, M_DTOR * xRot, 1);
|
||||
Matrix_RotateZ(gCalcMatrix, M_DTOR * zRot, 1);
|
||||
Matrix_RotateY(gCalcMatrix, obj->rot.y * M_DTOR, 1);
|
||||
Matrix_RotateX(gCalcMatrix, obj->rot.x * M_DTOR, 1);
|
||||
Matrix_RotateZ(gCalcMatrix, obj->rot.z * M_DTOR, 1);
|
||||
Matrix_RotateY(gCalcMatrix, M_DTOR * yRot, MTXF_APPLY);
|
||||
Matrix_RotateX(gCalcMatrix, M_DTOR * xRot, MTXF_APPLY);
|
||||
Matrix_RotateZ(gCalcMatrix, M_DTOR * zRot, MTXF_APPLY);
|
||||
Matrix_RotateY(gCalcMatrix, obj->rot.y * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateX(gCalcMatrix, obj->rot.x * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateZ(gCalcMatrix, obj->rot.z * M_DTOR, MTXF_APPLY);
|
||||
} else {
|
||||
Matrix_Translate(gGfxMatrix, obj->pos.x, obj->pos.y, obj->pos.z + D_ctx_80177D20, 1);
|
||||
Matrix_Translate(gGfxMatrix, obj->pos.x, obj->pos.y, obj->pos.z + D_ctx_80177D20, MTXF_APPLY);
|
||||
Matrix_Copy(&D_edisplay_801615F0, gGfxMatrix);
|
||||
Matrix_RotateY(gGfxMatrix, M_DTOR * yRot, 1);
|
||||
Matrix_RotateX(gGfxMatrix, M_DTOR * xRot, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, M_DTOR * zRot, 1);
|
||||
Matrix_RotateY(gGfxMatrix, obj->rot.y * M_DTOR, 1);
|
||||
Matrix_RotateX(gGfxMatrix, obj->rot.x * M_DTOR, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, obj->rot.z * M_DTOR, 1);
|
||||
Matrix_RotateY(gGfxMatrix, M_DTOR * yRot, MTXF_APPLY);
|
||||
Matrix_RotateX(gGfxMatrix, M_DTOR * xRot, MTXF_APPLY);
|
||||
Matrix_RotateZ(gGfxMatrix, M_DTOR * zRot, MTXF_APPLY);
|
||||
Matrix_RotateY(gGfxMatrix, obj->rot.y * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateX(gGfxMatrix, obj->rot.x * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateZ(gGfxMatrix, obj->rot.z * M_DTOR, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
}
|
||||
}
|
||||
@@ -1047,10 +1047,10 @@ void Actor_DrawAllRange(Actor* this) {
|
||||
|
||||
D_edisplay_801615EC = 0;
|
||||
if (this->info.drawType == 2) {
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, D_ctx_80177D20, 1);
|
||||
Matrix_Translate(gCalcMatrix, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 0);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, D_ctx_80177D20, MTXF_APPLY);
|
||||
Matrix_Translate(gCalcMatrix, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, MTXF_NEW);
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Mult(gGfxMatrix, gCalcMatrix, 1);
|
||||
Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY);
|
||||
Matrix_MultVec3f(gGfxMatrix, &sp50, &D_edisplay_801615E0);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
var_fv0 = 0.0f;
|
||||
@@ -1062,12 +1062,12 @@ void Actor_DrawAllRange(Actor* this) {
|
||||
if ((var_fv0 > D_edisplay_801615E0.z) && (D_edisplay_801615E0.z > var_fv1)) {
|
||||
if (fabsf(D_edisplay_801615E0.x) < (fabsf(D_edisplay_801615E0.z * 0.5f) + 500.0f)) {
|
||||
if (fabsf(D_edisplay_801615E0.y) < (fabsf(D_edisplay_801615E0.z * 0.5f) + 500.0f)) {
|
||||
Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, 1);
|
||||
Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, 1);
|
||||
Matrix_RotateZ(gCalcMatrix, this->obj.rot.z * M_DTOR, 1);
|
||||
Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateZ(gCalcMatrix, this->obj.rot.z * M_DTOR, MTXF_APPLY);
|
||||
this->info.draw(&this->obj);
|
||||
D_edisplay_801615EC = 1;
|
||||
if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) && (this->obj.id == OBJ_ACTOR_ALLRANGE) &&
|
||||
if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (this->obj.id == OBJ_ACTOR_ALLRANGE) &&
|
||||
(this->aiType == AI360_MISSILE)) {
|
||||
gTeamArrowsViewPos[0] = D_edisplay_801615E0;
|
||||
}
|
||||
@@ -1075,9 +1075,10 @@ void Actor_DrawAllRange(Actor* this) {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Matrix_Translate(gGfxMatrix, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 1);
|
||||
Matrix_Translate(gGfxMatrix, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, MTXF_APPLY);
|
||||
Matrix_MultVec3f(gGfxMatrix, &sp50, &D_edisplay_801615E0);
|
||||
if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_2) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_0) ||
|
||||
if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) ||
|
||||
(gPlayer[0].state_1C8 == PLAYERSTATE_1C8_STANDBY) ||
|
||||
((this->obj.id == OBJ_ACTOR_ALLRANGE) && (this->aiType >= AI360_GREAT_FOX)) ||
|
||||
((this->obj.id == OBJ_ACTOR_195) && (this->info.bonus != 0))) {
|
||||
var_ft5 = var_fv0 = 3000.0f;
|
||||
@@ -1093,13 +1094,13 @@ void Actor_DrawAllRange(Actor* this) {
|
||||
if (fabsf(D_edisplay_801615E0.x) < (fabsf(D_edisplay_801615E0.z * var_fa1) + var_ft5)) {
|
||||
if (fabsf(D_edisplay_801615E0.y) < (fabsf(D_edisplay_801615E0.z * var_fa1) + var_ft5)) {
|
||||
if (this->info.draw != NULL) {
|
||||
Matrix_RotateY(gGfxMatrix, this->obj.rot.y * M_DTOR, 1);
|
||||
Matrix_RotateX(gGfxMatrix, this->obj.rot.x * M_DTOR, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, this->obj.rot.z * M_DTOR, 1);
|
||||
Matrix_RotateY(gGfxMatrix, this->obj.rot.y * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateX(gGfxMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateZ(gGfxMatrix, this->obj.rot.z * M_DTOR, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
this->info.draw(&this->obj);
|
||||
D_edisplay_801615EC = 1;
|
||||
if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) &&
|
||||
if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) &&
|
||||
(((this->obj.id == OBJ_ACTOR_ALLRANGE) &&
|
||||
((this->aiType <= AI360_PEPPY) || (this->aiType == AI360_KATT) ||
|
||||
(this->aiType == AI360_BILL))) ||
|
||||
@@ -1218,9 +1219,9 @@ void Effect_DrawAllRange(Effect* this) {
|
||||
|
||||
if (this->info.unk_14 == -1) {
|
||||
Matrix_Translate(gGfxMatrix, this->obj.pos.x, this->obj.pos.y + gCameraShakeY, this->obj.pos.z + D_ctx_80177D20,
|
||||
1);
|
||||
MTXF_APPLY);
|
||||
} else {
|
||||
Matrix_Translate(gGfxMatrix, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + D_ctx_80177D20, 1);
|
||||
Matrix_Translate(gGfxMatrix, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + D_ctx_80177D20, MTXF_APPLY);
|
||||
}
|
||||
Matrix_MultVec3f(gGfxMatrix, &sp4C, &sp40);
|
||||
if ((gCurrentLevel == LEVEL_SECTOR_Z) || (gCurrentLevel == LEVEL_BOLSE)) {
|
||||
@@ -1232,9 +1233,9 @@ void Effect_DrawAllRange(Effect* this) {
|
||||
if (fabsf(sp40.x) < (fabsf(sp40.z * 0.5f) + 500.0f)) {
|
||||
if (fabsf(sp40.y) < (fabsf(sp40.z * 0.5f) + 500.0f)) {
|
||||
if (this->info.draw != NULL) {
|
||||
Matrix_RotateY(gGfxMatrix, this->obj.rot.y * M_DTOR, 1);
|
||||
Matrix_RotateX(gGfxMatrix, this->obj.rot.x * M_DTOR, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, this->obj.rot.z * M_DTOR, 1);
|
||||
Matrix_RotateY(gGfxMatrix, this->obj.rot.y * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateX(gGfxMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateZ(gGfxMatrix, this->obj.rot.z * M_DTOR, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
this->info.draw(&this->obj);
|
||||
}
|
||||
@@ -1253,16 +1254,16 @@ void Item_Draw(Item* this, s32 arg1) {
|
||||
Vec3f sp38;
|
||||
u8 var_v0;
|
||||
|
||||
Matrix_Translate(gGfxMatrix, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + D_ctx_80177D20, 1);
|
||||
Matrix_Translate(gGfxMatrix, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + D_ctx_80177D20, MTXF_APPLY);
|
||||
Matrix_MultVec3f(gGfxMatrix, &sp44, &sp38);
|
||||
var_v0 = 0;
|
||||
if ((sp38.z < 0.0f) && (sp38.z > -12000.0f)) {
|
||||
if (fabsf(sp38.x) < (fabsf(sp38.z * 0.5f) + 500.0f)) {
|
||||
if (fabsf(sp38.y) < (fabsf(sp38.z * 0.5f) + 500.0f)) {
|
||||
if (this->info.draw != NULL) {
|
||||
Matrix_RotateY(gGfxMatrix, this->obj.rot.y * M_DTOR, 1);
|
||||
Matrix_RotateX(gGfxMatrix, this->obj.rot.x * M_DTOR, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, this->obj.rot.z * M_DTOR, 1);
|
||||
Matrix_RotateY(gGfxMatrix, this->obj.rot.y * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateX(gGfxMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateZ(gGfxMatrix, this->obj.rot.z * M_DTOR, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
if (this->info.drawType == 0) {
|
||||
gSPDisplayList(gMasterDisp++, this->info.dList);
|
||||
@@ -1282,19 +1283,19 @@ void Item_Draw(Item* this, s32 arg1) {
|
||||
}
|
||||
|
||||
void func_edisplay_8005EA24(Actor* actor) {
|
||||
Matrix_Translate(gGfxMatrix, actor->obj.pos.x, actor->fwork[25] + 3.0f, actor->obj.pos.z, 1);
|
||||
Matrix_Translate(gGfxMatrix, actor->obj.pos.x, actor->fwork[25] + 3.0f, actor->obj.pos.z, MTXF_APPLY);
|
||||
if (gCurrentLevel == LEVEL_FORTUNA) {
|
||||
Matrix_RotateY(gGfxMatrix, actor->fwork[27], 1);
|
||||
Matrix_RotateX(gGfxMatrix, actor->fwork[26], 1);
|
||||
Matrix_RotateZ(gGfxMatrix, actor->fwork[28], 1);
|
||||
Matrix_RotateY(gGfxMatrix, -actor->fwork[27], 1);
|
||||
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_Scale(gGfxMatrix, 1.4f, 0.0f, 1.4f, 1);
|
||||
Matrix_RotateY(gGfxMatrix, (actor->obj.rot.y + 180.0f) * M_DTOR, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, actor->obj.rot.z * M_DTOR, 1);
|
||||
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_SetGfxMtx(&gMasterDisp);
|
||||
if (actor->aiType <= AI360_PEPPY) {
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 30.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 30.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_1032780);
|
||||
} else if (gCurrentLevel == LEVEL_KATINA) {
|
||||
@@ -1321,29 +1322,29 @@ void func_edisplay_8005ECD8(s32 index, Object* obj) {
|
||||
switch (obj->id) {
|
||||
case OBJ_ACTOR_230:
|
||||
Matrix_Translate(gGfxMatrix, obj->pos.x, gGroundLevel + 2.0f + gActors[index].fwork[1],
|
||||
obj->pos.z + D_ctx_80177D20, 1);
|
||||
obj->pos.z + D_ctx_80177D20, MTXF_APPLY);
|
||||
break;
|
||||
case OBJ_ACTOR_229:
|
||||
case OBJ_ACTOR_231:
|
||||
Matrix_Translate(gGfxMatrix, obj->pos.x, gGroundLevel + 2.0f + gActors[index].fwork[0],
|
||||
obj->pos.z + D_ctx_80177D20, 1);
|
||||
obj->pos.z + D_ctx_80177D20, MTXF_APPLY);
|
||||
break;
|
||||
case OBJ_BOSS_316:
|
||||
Matrix_Translate(gGfxMatrix, obj->pos.x, gGroundLevel + 2.0f + gCameraShakeY, obj->pos.z, 1);
|
||||
Matrix_Translate(gGfxMatrix, obj->pos.x, gGroundLevel + 2.0f + gCameraShakeY, obj->pos.z, MTXF_APPLY);
|
||||
break;
|
||||
default:
|
||||
Matrix_Translate(gGfxMatrix, obj->pos.x, gGroundLevel + 2.0f, obj->pos.z + D_ctx_80177D20, 1);
|
||||
Matrix_Translate(gGfxMatrix, obj->pos.x, gGroundLevel + 2.0f, obj->pos.z + D_ctx_80177D20, MTXF_APPLY);
|
||||
break;
|
||||
}
|
||||
if ((D_ctx_801784AC != 4) || (obj->id == OBJ_ACTOR_EVENT) || (obj->id == OBJ_ACTOR_195) ||
|
||||
(obj->id == OBJ_ACTOR_TEAM_BOSS)) {
|
||||
Matrix_Scale(gGfxMatrix, 1.0f, 0.0f, 1.0f, 1);
|
||||
Matrix_RotateY(gGfxMatrix, obj->rot.y * M_DTOR, 1);
|
||||
Matrix_Scale(gGfxMatrix, 1.0f, 0.0f, 1.0f, MTXF_APPLY);
|
||||
Matrix_RotateY(gGfxMatrix, obj->rot.y * M_DTOR, MTXF_APPLY);
|
||||
}
|
||||
if ((obj->id < OBJ_BOSS_292) && (obj->id != OBJ_ACTOR_230) && (obj->id != OBJ_ACTOR_229) &&
|
||||
(obj->id != OBJ_ACTOR_231)) {
|
||||
Matrix_RotateX(gGfxMatrix, obj->rot.x * M_DTOR, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, obj->rot.z * M_DTOR, 1);
|
||||
Matrix_RotateX(gGfxMatrix, obj->rot.x * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateZ(gGfxMatrix, obj->rot.z * M_DTOR, MTXF_APPLY);
|
||||
}
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
func_edisplay_8005BAB4(obj->id, index);
|
||||
@@ -1378,8 +1379,8 @@ void func_edisplay_8005F0E8(f32* sfxSrc, Vec3f* pos) {
|
||||
if (gCamCount != 1) {
|
||||
sfxSrc[0] = sfxSrc[1] = sfxSrc[2] = 0.0f;
|
||||
} else {
|
||||
Matrix_RotateY(gCalcMatrix, gPlayer[0].unk_058, 0);
|
||||
Matrix_RotateX(gCalcMatrix, gPlayer[0].unk_05C, 1);
|
||||
Matrix_RotateY(gCalcMatrix, gPlayer[0].camYaw, MTXF_NEW);
|
||||
Matrix_RotateX(gCalcMatrix, gPlayer[0].camPitch, MTXF_APPLY);
|
||||
sp2C.x = pos->x - gPlayerCamEye.x;
|
||||
sp2C.y = pos->y - gPlayerCamEye.y;
|
||||
sp2C.z = pos->z + D_ctx_80177D20 - gPlayerCamEye.z;
|
||||
@@ -1440,9 +1441,9 @@ void Object_58_Draw(Object_58* this) {
|
||||
sp38 = 0.9f;
|
||||
}
|
||||
if ((gLevelType == LEVELTYPE_PLANET) || (gCurrentLevel == LEVEL_BOLSE)) {
|
||||
Matrix_Translate(gGfxMatrix, this->obj.pos.x, this->obj.pos.y + gCameraShakeY, this->obj.pos.z, 1);
|
||||
Matrix_Translate(gGfxMatrix, this->obj.pos.x, this->obj.pos.y + gCameraShakeY, this->obj.pos.z, MTXF_APPLY);
|
||||
} else {
|
||||
Matrix_Translate(gGfxMatrix, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 1);
|
||||
Matrix_Translate(gGfxMatrix, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, MTXF_APPLY);
|
||||
}
|
||||
Matrix_MultVec3f(gGfxMatrix, &sp54, &sp48);
|
||||
if ((sp48.z < sp44) && (sp40 < sp48.z)) {
|
||||
@@ -1450,15 +1451,15 @@ void Object_58_Draw(Object_58* this) {
|
||||
if (fabsf(sp48.x) < (fabsf(sp48.z * sp38) + sp3C)) {
|
||||
func_edisplay_8005F670(&this->obj.pos);
|
||||
if (this->obj.id == OBJ_80_131) {
|
||||
Matrix_RotateY(gGfxMatrix, this->obj.rot.y * M_DTOR, 1);
|
||||
Matrix_RotateX(gGfxMatrix, this->obj.rot.x * M_DTOR, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, this->obj.rot.z * M_DTOR, 1);
|
||||
Matrix_RotateY(gGfxMatrix, M_PI / 2, 1);
|
||||
Matrix_Translate(gGfxMatrix, -551.0f, 0.0f, 0.0f, 1);
|
||||
Matrix_RotateY(gGfxMatrix, this->obj.rot.y * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateX(gGfxMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateZ(gGfxMatrix, this->obj.rot.z * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateY(gGfxMatrix, M_PI / 2, MTXF_APPLY);
|
||||
Matrix_Translate(gGfxMatrix, -551.0f, 0.0f, 0.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_VE2_6007650);
|
||||
} else {
|
||||
Matrix_RotateY(gGfxMatrix, this->obj.rot.y * M_DTOR, 1);
|
||||
Matrix_RotateY(gGfxMatrix, this->obj.rot.y * M_DTOR, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, this->info.dList);
|
||||
}
|
||||
@@ -1485,7 +1486,7 @@ void func_edisplay_8005F670(Vec3f* arg0) {
|
||||
sp9C.y = arg0->y - D_ctx_80178374;
|
||||
sp9C.z = arg0->z - D_ctx_80178378;
|
||||
temp_fv0 = (VEC3F_MAG(&sp9C));
|
||||
if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_2) {
|
||||
if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) {
|
||||
var_fs0 = 700.0f / temp_fv0;
|
||||
} else {
|
||||
var_fs0 = 200.0f / temp_fv0;
|
||||
@@ -1499,10 +1500,10 @@ void func_edisplay_8005F670(Vec3f* arg0) {
|
||||
sp94 = Math_Atan2F(sp9C.x, sp9C.z);
|
||||
sp98 = -Math_Atan2F(sp9C.y, sqrtf(SQ(sp9C.x) + SQ(sp9C.z)));
|
||||
Matrix_Push(&gCalcMatrix);
|
||||
Matrix_RotateZ(gCalcMatrix, gPlayer[gPlayerNum].unk_034 * D_ctx_80177950 * M_DTOR, 0);
|
||||
Matrix_RotateX(gCalcMatrix, -gPlayer[gPlayerNum].unk_05C, 1);
|
||||
Matrix_RotateY(gCalcMatrix, gPlayer[gPlayerNum].unk_058 + sp94, 1);
|
||||
Matrix_RotateX(gCalcMatrix, sp98, 1);
|
||||
Matrix_RotateZ(gCalcMatrix, gPlayer[gPlayerNum].camRoll * D_ctx_80177950 * M_DTOR, MTXF_NEW);
|
||||
Matrix_RotateX(gCalcMatrix, -gPlayer[gPlayerNum].camPitch, MTXF_APPLY);
|
||||
Matrix_RotateY(gCalcMatrix, gPlayer[gPlayerNum].camYaw + sp94, MTXF_APPLY);
|
||||
Matrix_RotateX(gCalcMatrix, sp98, MTXF_APPLY);
|
||||
sp6C.x = 0.0f;
|
||||
sp6C.y = 0.0f;
|
||||
sp6C.z = -100.0f;
|
||||
@@ -1520,11 +1521,11 @@ bool func_edisplay_8005F9DC(Vec3f* arg0) {
|
||||
Vec3f sp2C;
|
||||
Vec3f sp20;
|
||||
|
||||
Matrix_RotateY(gCalcMatrix, gPlayer[gPlayerNum].unk_058, 0);
|
||||
Matrix_RotateX(gCalcMatrix, gPlayer[gPlayerNum].unk_05C, 1);
|
||||
sp2C.x = arg0->x - gPlayer[gPlayerNum].camEye.x;
|
||||
sp2C.y = arg0->y - gPlayer[gPlayerNum].camEye.y;
|
||||
sp2C.z = arg0->z - gPlayer[gPlayerNum].camEye.z;
|
||||
Matrix_RotateY(gCalcMatrix, gPlayer[gPlayerNum].camYaw, MTXF_NEW);
|
||||
Matrix_RotateX(gCalcMatrix, gPlayer[gPlayerNum].camPitch, MTXF_APPLY);
|
||||
sp2C.x = arg0->x - gPlayer[gPlayerNum].cam.eye.x;
|
||||
sp2C.y = arg0->y - gPlayer[gPlayerNum].cam.eye.y;
|
||||
sp2C.z = arg0->z - gPlayer[gPlayerNum].cam.eye.z;
|
||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp2C, &sp20);
|
||||
if ((sp20.z < 1000.0f) && (sp20.z > -13000.0f)) {
|
||||
if (fabsf(sp20.x) < (fabsf(sp20.z * 0.4f) + 2000.0f)) {
|
||||
@@ -1633,8 +1634,8 @@ void Object_DrawAll(s32 arg0) {
|
||||
case LEVELMODE_ON_RAILS:
|
||||
case LEVELMODE_UNK_2:
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_2) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7) ||
|
||||
(gCurrentLevel == LEVEL_AQUAS)) {
|
||||
if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) ||
|
||||
(gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) || (gCurrentLevel == LEVEL_AQUAS)) {
|
||||
func_edisplay_8005F670(&actor->obj.pos);
|
||||
}
|
||||
func_edisplay_800597C0(arg0);
|
||||
@@ -1685,8 +1686,8 @@ void Effect_DrawAll(s32 arg0) {
|
||||
for (i = 0, effect = gEffects; 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].unk_058);
|
||||
effect->obj.rot.x = RAD_TO_DEG(gPlayer[gPlayerNum].unk_05C);
|
||||
effect->obj.rot.y = RAD_TO_DEG(-gPlayer[gPlayerNum].camYaw);
|
||||
effect->obj.rot.x = RAD_TO_DEG(gPlayer[gPlayerNum].camPitch);
|
||||
}
|
||||
if (gLevelMode == LEVELMODE_ALL_RANGE) {
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
@@ -1723,12 +1724,12 @@ void Effect_DrawAll(s32 arg0) {
|
||||
void Object_Draw(s32 arg0) {
|
||||
gReflectY = 1;
|
||||
Object_DrawAll(1);
|
||||
if ((gGroundType == GROUNDTYPE_WATER) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_2)) {
|
||||
if ((gGroundType == GROUNDTYPE_WATER) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO)) {
|
||||
gReflectY = -1;
|
||||
Lights_SetOneLight(&gMasterDisp, gLight1x, -1 * gLight1y, gLight1z, gLight1R, gLight1G, gLight1B, gAmbientR,
|
||||
gAmbientG, gAmbientB);
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Scale(gGfxMatrix, 1.0f, -1.0f, 1.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 1.0f, -1.0f, 1.0f, MTXF_APPLY);
|
||||
Object_DrawAll(-1);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
Lights_SetOneLight(&gMasterDisp, gLight1x, gLight1y, gLight1z, gLight1R, gLight1G, gLight1B, gAmbientR,
|
||||
@@ -1740,10 +1741,10 @@ void Effect_Draw(u8 arg0) {
|
||||
if (arg0 == 0) {
|
||||
gReflectY = 1;
|
||||
Effect_DrawAll(1);
|
||||
} else if ((gGroundType == GROUNDTYPE_WATER) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_2)) {
|
||||
} else if ((gGroundType == GROUNDTYPE_WATER) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO)) {
|
||||
gReflectY = -1;
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Scale(gGfxMatrix, 1.0f, -1.0f, 1.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 1.0f, -1.0f, 1.0f, MTXF_APPLY);
|
||||
Effect_DrawAll(-1);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
}
|
||||
@@ -1778,26 +1779,27 @@ void TexturedLine_Draw(void) {
|
||||
|
||||
if (gTexturedLines[i].mode != 0) {
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, texLine->unk_04.x, texLine->unk_04.y, texLine->unk_04.z + D_ctx_80177D20, 1);
|
||||
Matrix_RotateY(gGfxMatrix, texLine->unk_20, 1);
|
||||
Matrix_RotateX(gGfxMatrix, texLine->unk_1C, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, texLine->unk_20, 1);
|
||||
Matrix_Scale(gGfxMatrix, texLine->unk_28, texLine->unk_28, texLine->unk_24, 1);
|
||||
Matrix_Translate(gGfxMatrix, texLine->unk_04.x, texLine->unk_04.y, texLine->unk_04.z + D_ctx_80177D20,
|
||||
MTXF_APPLY);
|
||||
Matrix_RotateY(gGfxMatrix, texLine->unk_20, MTXF_APPLY);
|
||||
Matrix_RotateX(gGfxMatrix, texLine->unk_1C, MTXF_APPLY);
|
||||
Matrix_RotateZ(gGfxMatrix, texLine->unk_20, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, texLine->unk_28, texLine->unk_28, texLine->unk_24, MTXF_APPLY);
|
||||
|
||||
if ((gCurrentLevel == LEVEL_AQUAS) || (gCurrentLevel == LEVEL_VENOM_ANDROSS)) {
|
||||
s32 alpha = ((gGameFrameCount % 2) != 0) ? 180 : 50;
|
||||
|
||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, alpha);
|
||||
if (gCurrentLevel == LEVEL_AQUAS) {
|
||||
Matrix_Scale(gGfxMatrix, 0.01f, 0.3f, 0.0025f, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -200.0f, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 5.0f * M_DTOR, 1);
|
||||
Matrix_Scale(gGfxMatrix, 0.01f, 0.3f, 0.0025f, MTXF_APPLY);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -200.0f, MTXF_APPLY);
|
||||
Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 5.0f * M_DTOR, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_AQ_60119A0);
|
||||
} else if (gCurrentLevel == LEVEL_VENOM_ANDROSS) {
|
||||
Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 0.0025f, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -200.0f, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 25.0f * M_DTOR, 1);
|
||||
Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 0.0025f, MTXF_APPLY);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -200.0f, MTXF_APPLY);
|
||||
Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 25.0f * M_DTOR, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_ANDROSS_C017440);
|
||||
}
|
||||
@@ -1826,11 +1828,11 @@ void TexturedLine_DrawPath(s32 index) {
|
||||
}
|
||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, texLine->unk_2C, texLine->unk_2D, texLine->unk_2E, texLine->unk_2F);
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, texLine->unk_04.x, texLine->unk_04.y, texLine->unk_04.z, 1);
|
||||
Matrix_RotateY(gGfxMatrix, texLine->unk_20, 1);
|
||||
Matrix_RotateX(gGfxMatrix, texLine->unk_1C, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, texLine->unk_1C, 1);
|
||||
Matrix_Scale(gGfxMatrix, texLine->unk_28, 1.0f, texLine->unk_24, 1);
|
||||
Matrix_Translate(gGfxMatrix, texLine->unk_04.x, texLine->unk_04.y, texLine->unk_04.z, MTXF_APPLY);
|
||||
Matrix_RotateY(gGfxMatrix, texLine->unk_20, MTXF_APPLY);
|
||||
Matrix_RotateX(gGfxMatrix, texLine->unk_1C, MTXF_APPLY);
|
||||
Matrix_RotateZ(gGfxMatrix, texLine->unk_1C, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, texLine->unk_28, 1.0f, texLine->unk_24, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK);
|
||||
gSPDisplayList(gMasterDisp++, D_edisplay_800CFD80);
|
||||
|
||||
+108
-107
@@ -53,7 +53,7 @@ void BonusText_Update(void) {
|
||||
|
||||
if (gLevelMode == LEVELMODE_ON_RAILS) {
|
||||
bonus->pos.z -= D_ctx_80177D08;
|
||||
} else if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) {
|
||||
} else if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) {
|
||||
bonus->pos.x += gPlayer[0].vel.x;
|
||||
bonus->pos.z += gPlayer[0].vel.z;
|
||||
}
|
||||
@@ -83,16 +83,16 @@ void BonusText_Draw(BonusText* bonus) {
|
||||
f32 sp50;
|
||||
|
||||
if (bonus->timer <= 45) {
|
||||
Matrix_Translate(gGfxMatrix, bonus->pos.x, bonus->pos.y, bonus->pos.z + D_ctx_80177D20, 1);
|
||||
Matrix_Translate(gGfxMatrix, bonus->pos.x, bonus->pos.y, bonus->pos.z + D_ctx_80177D20, MTXF_APPLY);
|
||||
Matrix_MultVec3f(gGfxMatrix, &sp60, &sp54);
|
||||
|
||||
if ((fabsf(sp54.x) < 20000.0f) && (fabsf(sp54.y) < 20000.0f)) {
|
||||
if ((sp54.z < 0.0f) && (sp54.z > -20000.0f)) {
|
||||
sp50 = (VEC3F_MAG(&sp54)) * 0.0015f * 0.2f;
|
||||
Matrix_RotateY(gGfxMatrix, -gPlayer[gPlayerNum].unk_058, 1);
|
||||
Matrix_RotateX(gGfxMatrix, gPlayer[gPlayerNum].unk_05C, 1);
|
||||
Matrix_Scale(gGfxMatrix, sp50, sp50, 1.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, bonus->unk_10, 0.0f, 1);
|
||||
Matrix_RotateY(gGfxMatrix, -gPlayer[gPlayerNum].camYaw, MTXF_APPLY);
|
||||
Matrix_RotateX(gGfxMatrix, gPlayer[gPlayerNum].camPitch, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, sp50, sp50, 1.0f, MTXF_APPLY);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, bonus->unk_10, 0.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
|
||||
if (bonus->hits <= 10) {
|
||||
@@ -206,8 +206,8 @@ void func_effect_80077A7C(Effect* effect) {
|
||||
RCP_SetupDL_49();
|
||||
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->unk_44);
|
||||
gDPSetEnvColor(gMasterDisp++, 255, 255, 255, effect->unk_44);
|
||||
Matrix_Scale(gGfxMatrix, effect->scale1, effect->scale2, 1.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 20.0f, 0.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, effect->scale1, effect->scale2, 1.0f, MTXF_APPLY);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 20.0f, 0.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_ZO_6024220);
|
||||
RCP_SetupDL(&gMasterDisp, 0x40);
|
||||
@@ -220,7 +220,7 @@ void func_effect_80077B84(Effect* effect) {
|
||||
Graphics_SetScaleMtx(effect->scale2);
|
||||
|
||||
if ((effect->scale1 == 71.0f) ||
|
||||
((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7) && (gCurrentLevel == LEVEL_CORNERIA))) {
|
||||
((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) && (gCurrentLevel == LEVEL_CORNERIA))) {
|
||||
RCP_SetupDL(&gMasterDisp, 0x26);
|
||||
} else {
|
||||
RCP_SetupDL(&gMasterDisp, 0x43);
|
||||
@@ -349,14 +349,14 @@ void func_effect_800780F8(Effect* effect) {
|
||||
for (i = 0; i < 10; i++) {
|
||||
if ((i >= effect->unk_48) && (i < effect->unk_46)) {
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, -60.0f, 0.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 0.8f, 3.0f, 1.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, -60.0f, 0.0f, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, 0.8f, 3.0f, 1.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_102F5E0);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
}
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, -120.0f, 0.0f, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, D_800D1534[effect->unk_4C][i] * M_DTOR, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, -120.0f, 0.0f, MTXF_APPLY);
|
||||
Matrix_RotateZ(gGfxMatrix, D_800D1534[effect->unk_4C][i] * M_DTOR, MTXF_APPLY);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -375,7 +375,7 @@ void func_effect_80078438(Effect* effect) {
|
||||
void func_effect_800784B4(Effect* effect) {
|
||||
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->unk_46);
|
||||
Graphics_SetScaleMtx(effect->scale2);
|
||||
Matrix_RotateX(gGfxMatrix, M_PI / 2, 1);
|
||||
Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_BG_PLANET_200D750);
|
||||
}
|
||||
@@ -400,9 +400,9 @@ void func_effect_80078604(Effect* effect) {
|
||||
void func_effect_8007868C(Effect* effect) {
|
||||
RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
|
||||
gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK);
|
||||
Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, 1);
|
||||
Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, MTXF_APPLY);
|
||||
if (effect->unk_44 >= 2) {
|
||||
Matrix_RotateX(gGfxMatrix, M_PI / 2, 1);
|
||||
Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY);
|
||||
}
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_1029780);
|
||||
@@ -412,8 +412,8 @@ void func_effect_8007868C(Effect* effect) {
|
||||
void func_effect_8007879C(Effect* effect) {
|
||||
RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
|
||||
gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK);
|
||||
Matrix_Scale(gGfxMatrix, effect->scale2 * 0.6f, 1.0f, effect->scale2 * 3.5f, 1);
|
||||
Matrix_RotateX(gGfxMatrix, M_PI / 2, 1);
|
||||
Matrix_Scale(gGfxMatrix, effect->scale2 * 0.6f, 1.0f, effect->scale2 * 3.5f, MTXF_APPLY);
|
||||
Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_1029780);
|
||||
RCP_SetupDL(&gMasterDisp, 0x40);
|
||||
@@ -594,8 +594,8 @@ void func_effect_8007905C(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scal
|
||||
yAng = Math_Atan2F(sp3C.x - xPos, sp3C.z - zPos);
|
||||
sp38 = sqrtf(SQ(sp3C.x - xPos) + SQ(sp3C.z - zPos));
|
||||
xAng = -Math_Atan2F(sp3C.y - yPos, sp38);
|
||||
Matrix_RotateY(gCalcMatrix, yAng, 0);
|
||||
Matrix_RotateX(gCalcMatrix, xAng, 1);
|
||||
Matrix_RotateY(gCalcMatrix, yAng, MTXF_NEW);
|
||||
Matrix_RotateX(gCalcMatrix, xAng, MTXF_APPLY);
|
||||
sp54.x = RAND_FLOAT_CENTERED(50.0f);
|
||||
sp54.y = RAND_FLOAT_CENTERED(50.0f);
|
||||
sp54.z = RAND_FLOAT(10.0f) + 150.0f;
|
||||
@@ -683,7 +683,8 @@ void func_effect_8007968C(Effect* effect) {
|
||||
effect->vel.y -= 0.5f;
|
||||
}
|
||||
|
||||
if ((gCurrentLevel == LEVEL_BOLSE) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7) && (gCsFrameCount > 175)) {
|
||||
if ((gCurrentLevel == LEVEL_BOLSE) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) &&
|
||||
(gCsFrameCount > 175)) {
|
||||
effect->vel.x *= 0.95f;
|
||||
effect->vel.y *= 0.95f;
|
||||
effect->vel.z *= 0.95f;
|
||||
@@ -710,7 +711,7 @@ bool func_effect_800798C4(s32 arg0, Gfx** arg1, Vec3f* arg2, Vec3f* arg3, void*
|
||||
void func_effect_800798F0(Effect* effect) {
|
||||
Vec3f frameJointTable[50];
|
||||
|
||||
if ((gCurrentLevel == LEVEL_BOLSE) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7)) {
|
||||
if ((gCurrentLevel == LEVEL_BOLSE) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) {
|
||||
func_edisplay_8005F670(&effect->obj.pos);
|
||||
}
|
||||
|
||||
@@ -840,16 +841,16 @@ void func_effect_800798F0(Effect* effect) {
|
||||
case 1:
|
||||
switch ((s32) (effect->index % 4U)) {
|
||||
case 0:
|
||||
Matrix_Scale(gGfxMatrix, 1.0f, 0.3f, 1.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 1.0f, 0.3f, 1.0f, MTXF_APPLY);
|
||||
break;
|
||||
case 1:
|
||||
Matrix_Scale(gGfxMatrix, 0.3f, 1.0f, 1.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 0.3f, 1.0f, 1.0f, MTXF_APPLY);
|
||||
break;
|
||||
case 2:
|
||||
Matrix_Scale(gGfxMatrix, 1.0f, 0.5f, 1.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 1.0f, 0.5f, 1.0f, MTXF_APPLY);
|
||||
break;
|
||||
case 3:
|
||||
Matrix_Scale(gGfxMatrix, 0.5f, 1.0f, 1.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 0.5f, 1.0f, 1.0f, MTXF_APPLY);
|
||||
break;
|
||||
}
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
@@ -900,7 +901,7 @@ void func_effect_8007A28C(Effect* effect) {
|
||||
|
||||
void func_effect_8007A3C0(Effect* effect) {
|
||||
if (gReflectY > 0) {
|
||||
Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, 1);
|
||||
Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
RCP_SetupDL_64_2();
|
||||
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->unk_44);
|
||||
@@ -1046,7 +1047,7 @@ void func_effect_8007AA60(Effect* effect) {
|
||||
RCP_SetupDL(&gMasterDisp, 0x44);
|
||||
gDPSetPrimColor(gMasterDisp++, 0, 0, 31, 10, 00, effect->unk_44);
|
||||
gDPSetEnvColor(gMasterDisp++, 141, 73, 5, 0);
|
||||
Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, 1.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, 1.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_800D178C[effect->unk_4C]);
|
||||
effect->unk_4C = effect->unk_48;
|
||||
@@ -1467,11 +1468,11 @@ void func_effect_8007BC7C(f32 xPos, f32 yPos, f32 zPos, f32 scale2) {
|
||||
}
|
||||
|
||||
void func_effect_8007BCE8(Effect* effect) {
|
||||
if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7) {
|
||||
effect->obj.rot.x = RAD_TO_DEG(gPlayer[0].unk_05C);
|
||||
effect->obj.rot.y = RAD_TO_DEG(-gPlayer[0].unk_058);
|
||||
if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) {
|
||||
effect->obj.rot.x = RAD_TO_DEG(gPlayer[0].camPitch);
|
||||
effect->obj.rot.y = RAD_TO_DEG(-gPlayer[0].camYaw);
|
||||
}
|
||||
if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_6) {
|
||||
if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_NEXT) {
|
||||
effect->unk_46 = 2;
|
||||
effect->vel.y -= 0.13f;
|
||||
}
|
||||
@@ -1699,7 +1700,7 @@ void func_effect_8007C6FC(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scal
|
||||
if (Rand_ZeroOne() < 0.5f) {
|
||||
effect->unk_48 = -effect->unk_48;
|
||||
}
|
||||
if ((gCurrentLevel == LEVEL_FORTUNA) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_6)) {
|
||||
if ((gCurrentLevel == LEVEL_FORTUNA) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_NEXT)) {
|
||||
effect->unk_4A = 180;
|
||||
} else {
|
||||
effect->unk_4A = 255;
|
||||
@@ -1736,7 +1737,7 @@ void func_effect_8007C8C4(Effect* effect) {
|
||||
s32 var_v0;
|
||||
|
||||
var_v0 = 0;
|
||||
if ((gCurrentLevel == LEVEL_FORTUNA) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_6)) {
|
||||
if ((gCurrentLevel == LEVEL_FORTUNA) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_NEXT)) {
|
||||
var_v0 = 3;
|
||||
}
|
||||
|
||||
@@ -1780,7 +1781,7 @@ void func_effect_8007CAF0(Effect* effect) {
|
||||
gDPSetPrimColor(gMasterDisp++, 0, 0, 0, 0, 0, effect->unk_4A);
|
||||
gSPDisplayList(gMasterDisp++, D_102A010);
|
||||
} else {
|
||||
Matrix_Scale(gGfxMatrix, 1.5f, 1.5f, 1.5f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 1.5f, 1.5f, 1.5f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->unk_4A);
|
||||
gSPDisplayList(gMasterDisp++, D_BG_PLANET_20031B0);
|
||||
@@ -1964,7 +1965,7 @@ void func_effect_8007D2C8(f32 xPos, f32 yPos, f32 zPos, f32 scale2) {
|
||||
|
||||
void func_effect_8007D2F4(Effect* effect) {
|
||||
if (gLevelType == LEVELTYPE_PLANET) {
|
||||
if ((gCurrentLevel == LEVEL_KATINA) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7)) {
|
||||
if ((gCurrentLevel == LEVEL_KATINA) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) {
|
||||
effect->vel.y += 0.1f;
|
||||
if (effect->timer_50 == 0) {
|
||||
effect->unk_4C++;
|
||||
@@ -1977,7 +1978,7 @@ void func_effect_8007D2F4(Effect* effect) {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ((gCurrentLevel == LEVEL_MACBETH) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7) &&
|
||||
if ((gCurrentLevel == LEVEL_MACBETH) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) &&
|
||||
(effect->vel.x != 0)) {
|
||||
Math_SmoothStepToF(&effect->vel.x, -1.0f, 1.0f, 1.0f, 0.0f);
|
||||
Math_SmoothStepToF(&effect->vel.z, 4.0f, 1.0f, 1.0f, 0.0f);
|
||||
@@ -2053,14 +2054,14 @@ void func_effect_8007D55C(Effect* effect) {
|
||||
gDPSetPrimColor(gMasterDisp++, 0, 0, D_800D184C[effect->unk_4C][0], D_800D184C[effect->unk_4C][1],
|
||||
D_800D184C[effect->unk_4C][2], D_800D184C[effect->unk_4C][3]);
|
||||
scale = D_800D17F8[effect->unk_4C] - 0.5f;
|
||||
Matrix_Scale(gGfxMatrix, scale, scale, 1.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, scale, scale, 1.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_800D17A4[effect->unk_4C]);
|
||||
return;
|
||||
}
|
||||
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 100, effect->unk_44);
|
||||
if (effect->unk_4C == 0) {
|
||||
Matrix_Scale(gGfxMatrix, 2.5f, 2.5f, 2.5f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 2.5f, 2.5f, 2.5f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_800D18A0[effect->unk_4C]);
|
||||
return;
|
||||
@@ -2173,7 +2174,7 @@ void func_effect_8007DB70(Effect* effect) {
|
||||
switch (effect->state) {
|
||||
case 0:
|
||||
effect->vel.y -= 0.5f;
|
||||
if ((effect->timer_50 == 0) && ((func_enmy_8006351C(1000, &effect->obj.pos, &sp54, 1) != 0) ||
|
||||
if ((effect->timer_50 == 0) && ((Object_CheckCollision(1000, &effect->obj.pos, &sp54, 1) != 0) ||
|
||||
(effect->obj.pos.y < (gGroundLevel + 10.0f)))) {
|
||||
effect->vel.y = 0.0f;
|
||||
if (effect->obj.pos.y < (gGroundLevel + 10.0f)) {
|
||||
@@ -2228,7 +2229,7 @@ void func_effect_8007DED4(Effect* effect) {
|
||||
break;
|
||||
|
||||
case 1:
|
||||
Matrix_Scale(gGfxMatrix, effect->scale1, effect->scale2, 2.5f, 1);
|
||||
Matrix_Scale(gGfxMatrix, effect->scale1, effect->scale2, 2.5f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
RCP_SetupDL_40();
|
||||
gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK);
|
||||
@@ -2380,8 +2381,8 @@ void func_effect_8007E6B8(Effect* effect, u32 objId, f32 xPos, f32 yPos, f32 zPo
|
||||
temp_ft4 = sqrtf(SQ(gPlayer[0].pos.x - xPos) + SQ(gPlayer[0].unk_138 - zPos));
|
||||
sp54 = -Math_Atan2F(gPlayer[0].pos.y - yPos, temp_ft4);
|
||||
|
||||
Matrix_RotateY(gCalcMatrix, sp50, 0);
|
||||
Matrix_RotateX(gCalcMatrix, sp54, 1);
|
||||
Matrix_RotateY(gCalcMatrix, sp50, MTXF_NEW);
|
||||
Matrix_RotateX(gCalcMatrix, sp54, MTXF_APPLY);
|
||||
|
||||
sp40.x = 0.0f;
|
||||
sp40.y = 0.0f;
|
||||
@@ -2433,12 +2434,12 @@ void func_effect_8007E93C(Effect* effect, u32 objId, f32 xPos, f32 yPos, f32 zPo
|
||||
effect->obj.pos.z = zPos;
|
||||
|
||||
Object_SetInfo(&effect->info, effect->obj.id);
|
||||
sp50 = Math_Atan2F(gPlayer[0].camEye.x - xPos, gPlayer[0].camEye.z - zPos);
|
||||
temp_ft4 = sqrtf(SQ(gPlayer[0].camEye.x - xPos) + SQ(gPlayer[0].camEye.z - zPos));
|
||||
sp54 = -Math_Atan2F(gPlayer[0].camEye.y - yPos, temp_ft4);
|
||||
sp50 = Math_Atan2F(gPlayer[0].cam.eye.x - xPos, gPlayer[0].cam.eye.z - zPos);
|
||||
temp_ft4 = sqrtf(SQ(gPlayer[0].cam.eye.x - xPos) + SQ(gPlayer[0].cam.eye.z - zPos));
|
||||
sp54 = -Math_Atan2F(gPlayer[0].cam.eye.y - yPos, temp_ft4);
|
||||
|
||||
Matrix_RotateY(gCalcMatrix, sp50, 0);
|
||||
Matrix_RotateX(gCalcMatrix, sp54, 1);
|
||||
Matrix_RotateY(gCalcMatrix, sp50, MTXF_NEW);
|
||||
Matrix_RotateX(gCalcMatrix, sp54, MTXF_APPLY);
|
||||
|
||||
sp40.x = 0.0f;
|
||||
sp40.y = 0.0f;
|
||||
@@ -2547,12 +2548,12 @@ void func_effect_8007EE68(ObjectId objId, Vec3f* pos, Vec3f* rot, Vec3f* arg3, V
|
||||
s32 i;
|
||||
Vec3f sp68;
|
||||
|
||||
Matrix_RotateY(gCalcMatrix, arg3->y * M_DTOR, 0);
|
||||
Matrix_RotateX(gCalcMatrix, arg3->x * M_DTOR, 1);
|
||||
Matrix_RotateZ(gCalcMatrix, arg3->z * M_DTOR, 1);
|
||||
Matrix_RotateY(gCalcMatrix, rot->y * M_DTOR, 1);
|
||||
Matrix_RotateX(gCalcMatrix, rot->x * M_DTOR, 1);
|
||||
Matrix_RotateZ(gCalcMatrix, rot->z * M_DTOR, 1);
|
||||
Matrix_RotateY(gCalcMatrix, arg3->y * M_DTOR, MTXF_NEW);
|
||||
Matrix_RotateX(gCalcMatrix, arg3->x * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateZ(gCalcMatrix, arg3->z * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateY(gCalcMatrix, rot->y * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateX(gCalcMatrix, rot->x * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateZ(gCalcMatrix, rot->z * M_DTOR, MTXF_APPLY);
|
||||
Matrix_MultVec3f(gCalcMatrix, arg4, &sp68);
|
||||
|
||||
for (i = ARRAY_COUNT(gEffects) - 1; i >= 0; i--) {
|
||||
@@ -2596,7 +2597,7 @@ void func_effect_8007F11C(ObjectId objId, f32 xPos, f32 yPos, f32 zPos, f32 spee
|
||||
void func_effect_8007F20C(ObjectId objId, f32 xPos, f32 yPos, f32 zPos, f32 speed) {
|
||||
s32 i;
|
||||
|
||||
if ((fabsf(zPos - gPlayer[0].camEye.z) > 300.0f) || (fabsf(xPos - gPlayer[0].camEye.x) > 300.0f)) {
|
||||
if ((fabsf(zPos - gPlayer[0].cam.eye.z) > 300.0f) || (fabsf(xPos - gPlayer[0].cam.eye.x) > 300.0f)) {
|
||||
for (i = ARRAY_COUNT(gEffects) - 1; i >= 0; i--) {
|
||||
if (gEffects[i].obj.status == OBJ_FREE) {
|
||||
Matrix_Push(&gCalcMatrix);
|
||||
@@ -2864,8 +2865,8 @@ void func_effect_8007FE88(Effect* effect) {
|
||||
if ((gPlayer[0].unk_280 != 0) || (gPlayer[0].timer_27C != 0)) {
|
||||
effect->obj.rot.y = 90.0f;
|
||||
effect->obj.rot.x = RAND_FLOAT(360.0f);
|
||||
Matrix_RotateY(gCalcMatrix, effect->obj.rot.y * M_DTOR, 0);
|
||||
Matrix_RotateX(gCalcMatrix, effect->obj.rot.x * M_DTOR, 1);
|
||||
Matrix_RotateY(gCalcMatrix, effect->obj.rot.y * M_DTOR, MTXF_NEW);
|
||||
Matrix_RotateX(gCalcMatrix, effect->obj.rot.x * M_DTOR, MTXF_APPLY);
|
||||
srcVelocity.x = 0.0f;
|
||||
srcVelocity.y = 0.0f;
|
||||
srcVelocity.z = 100.0f;
|
||||
@@ -2911,7 +2912,7 @@ void func_effect_8007FE88(Effect* effect) {
|
||||
velocity.z = effect->vel.z;
|
||||
|
||||
if (gCurrentLevel != LEVEL_MACBETH) {
|
||||
if (func_enmy_8006351C(1000, &effect->obj.pos, &velocity, 2) != 0) {
|
||||
if (Object_CheckCollision(1000, &effect->obj.pos, &velocity, 2) != 0) {
|
||||
func_effect_8007D10C(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 2.0f);
|
||||
Object_Kill(&effect->obj, effect->sfxSource);
|
||||
}
|
||||
@@ -2963,8 +2964,8 @@ void func_effect_8008040C(Effect* effect) {
|
||||
yRot = Math_Atan2F(gPlayer[0].pos.x - effect->obj.pos.x, gPlayer[0].unk_138 - effect->obj.pos.z);
|
||||
temp = sqrtf(SQ(gPlayer[0].pos.x - effect->obj.pos.x) + SQ(gPlayer[0].unk_138 - effect->obj.pos.z));
|
||||
xRot = -Math_Atan2F(gPlayer[0].pos.y - effect->obj.pos.y, temp);
|
||||
Matrix_RotateY(gCalcMatrix, yRot, 0);
|
||||
Matrix_RotateX(gCalcMatrix, xRot, 1);
|
||||
Matrix_RotateY(gCalcMatrix, yRot, MTXF_NEW);
|
||||
Matrix_RotateX(gCalcMatrix, xRot, MTXF_APPLY);
|
||||
srcVelocity.y = 0.0f;
|
||||
srcVelocity.x = 0.0f;
|
||||
srcVelocity.z = 100.0f;
|
||||
@@ -2997,8 +2998,8 @@ void func_effect_8008040C(Effect* effect) {
|
||||
if ((gPlayer[0].unk_280 != 0) || (gPlayer[0].timer_27C != 0)) {
|
||||
effect->obj.rot.y = 90.0f;
|
||||
effect->obj.rot.x = RAND_FLOAT(360.0f);
|
||||
Matrix_RotateY(gCalcMatrix, effect->obj.rot.y * M_DTOR, 0);
|
||||
Matrix_RotateX(gCalcMatrix, effect->obj.rot.x * M_DTOR, 1);
|
||||
Matrix_RotateY(gCalcMatrix, effect->obj.rot.y * M_DTOR, MTXF_NEW);
|
||||
Matrix_RotateX(gCalcMatrix, effect->obj.rot.x * M_DTOR, MTXF_APPLY);
|
||||
srcVelocity.y = 0.0f;
|
||||
srcVelocity.x = 0.0f;
|
||||
srcVelocity.z = 100.0f;
|
||||
@@ -3041,7 +3042,7 @@ void func_effect_8008040C(Effect* effect) {
|
||||
sp3C.y = effect->vel.y;
|
||||
sp3C.z = effect->vel.z;
|
||||
|
||||
if (func_enmy_8006351C(1000, &effect->obj.pos, &sp3C, 2) != 0) {
|
||||
if (Object_CheckCollision(1000, &effect->obj.pos, &sp3C, 2) != 0) {
|
||||
func_effect_8007D10C(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 2.0f);
|
||||
Object_Kill(&effect->obj, effect->sfxSource);
|
||||
}
|
||||
@@ -3058,7 +3059,7 @@ void func_effect_8008092C(Effect* effect) {
|
||||
RCP_SetupDL(&gMasterDisp, 0x31);
|
||||
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255);
|
||||
gDPSetEnvColor(gMasterDisp++, 255, 0, 0, 255);
|
||||
Matrix_Scale(gGfxMatrix, 4.0f, 2.0f, 4.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 4.0f, 2.0f, 4.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_ZO_6018AF0);
|
||||
break;
|
||||
@@ -3067,8 +3068,8 @@ void func_effect_8008092C(Effect* effect) {
|
||||
RCP_SetupDL(&gMasterDisp, 0x31);
|
||||
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255);
|
||||
gDPSetEnvColor(gMasterDisp++, 255, 0, 0, 255);
|
||||
Matrix_RotateZ(gGfxMatrix, 30.0f * M_DTOR, 1);
|
||||
Matrix_Scale(gGfxMatrix, 3.0f, 1.5f, 3.0f, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, 30.0f * M_DTOR, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, 3.0f, 1.5f, 3.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_1024AC0);
|
||||
break;
|
||||
@@ -3186,7 +3187,7 @@ void func_effect_80080D04(Effect* effect) {
|
||||
case 10:
|
||||
RCP_SetupDL(&gMasterDisp, 0x41);
|
||||
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->unk_48);
|
||||
Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, effect->scale2, 1);
|
||||
Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, effect->scale2, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_TI_A000000);
|
||||
RCP_SetupDL(&gMasterDisp, 0x40);
|
||||
@@ -3238,19 +3239,19 @@ void func_effect_80080D04(Effect* effect) {
|
||||
case 16:
|
||||
Graphics_SetScaleMtx(effect->scale2);
|
||||
gDPSetPrimColor(gMasterDisp++, 0, 0, 96, 96, 255, 255);
|
||||
Matrix_Translate(gGfxMatrix, 34.14f, 0.0f, 0.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, 34.14f, 0.0f, 0.0f, MTXF_APPLY);
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Scale(gGfxMatrix, 0.25f, 1.0f, 1.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 0.25f, 1.0f, 1.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_102F5E0);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
|
||||
for (i = 0; i < 7; i++) {
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 10.0f, 0.0f, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, M_PI / 4, 1);
|
||||
Matrix_Translate(gGfxMatrix, 1.0f, 20.0f, 0.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 10.0f, 0.0f, MTXF_APPLY);
|
||||
Matrix_RotateZ(gGfxMatrix, M_PI / 4, MTXF_APPLY);
|
||||
Matrix_Translate(gGfxMatrix, 1.0f, 20.0f, 0.0f, MTXF_APPLY);
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Scale(gGfxMatrix, 0.25f, 1.0f, 1.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 0.25f, 1.0f, 1.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_102F5E0);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
@@ -3277,13 +3278,13 @@ void func_effect_80080D04(Effect* effect) {
|
||||
|
||||
for (i = 0; i < 10; i++) {
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, -60.0f, 0.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 0.8f, 3.0f, 1.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, -60.0f, 0.0f, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, 0.8f, 3.0f, 1.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_102F5E0);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, -120.0f, 0.0f, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, D_800D1534[D_800D18E4][i] * M_DTOR, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, -120.0f, 0.0f, MTXF_APPLY);
|
||||
Matrix_RotateZ(gGfxMatrix, D_800D1534[D_800D18E4][i] * M_DTOR, MTXF_APPLY);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -3498,7 +3499,7 @@ void func_effect_80081C5C(Effect* effect) {
|
||||
effect->vel.z, RAND_FLOAT(0.05f) + 0.05f, 0);
|
||||
}
|
||||
|
||||
if (func_enmy_8006351C(effect->index, &effect->obj.pos, &velocity, 1) != 0) {
|
||||
if (Object_CheckCollision(effect->index, &effect->obj.pos, &velocity, 1) != 0) {
|
||||
func_effect_8007B344(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 3.0f, 7);
|
||||
Object_Kill(&effect->obj, effect->sfxSource);
|
||||
}
|
||||
@@ -3525,7 +3526,7 @@ void func_effect_80081C5C(Effect* effect) {
|
||||
Math_SmoothStepToF(&effect->scale2, 0.5f, 0.01f, 0.02f, 0.0f);
|
||||
}
|
||||
|
||||
if (func_enmy_8006351C(effect->index, &effect->obj.pos, &velocity, 1) != 0) {
|
||||
if (Object_CheckCollision(effect->index, &effect->obj.pos, &velocity, 1) != 0) {
|
||||
Object_Kill(&effect->obj, effect->sfxSource);
|
||||
func_effect_8007D0E0(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 1.0f);
|
||||
}
|
||||
@@ -3563,7 +3564,7 @@ void func_effect_80081C5C(Effect* effect) {
|
||||
(RAND_FLOAT_CENTERED(effect->scale2) * 50.0f) + effect->obj.pos.z, effect->vel.x,
|
||||
effect->vel.y, effect->vel.z, RAND_FLOAT(0.03f) + 0.05f, 10);
|
||||
}
|
||||
if (func_enmy_8006351C(effect->index, &effect->obj.pos, &velocity, 1) != 0) {
|
||||
if (Object_CheckCollision(effect->index, &effect->obj.pos, &velocity, 1) != 0) {
|
||||
func_effect_8007B344(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 3.0f, 7);
|
||||
Object_Kill(&effect->obj, effect->sfxSource);
|
||||
}
|
||||
@@ -3653,8 +3654,8 @@ void func_effect_80081C5C(Effect* effect) {
|
||||
|
||||
case 8:
|
||||
Math_SmoothStepToF(D_ctx_801779A8, 30.0f, 1.0f, 5.0f, 0.0f);
|
||||
Matrix_RotateY(gCalcMatrix, gBosses[0].obj.rot.y * M_DTOR, 0);
|
||||
Matrix_RotateX(gCalcMatrix, gBosses[0].obj.rot.x * M_DTOR, 1);
|
||||
Matrix_RotateY(gCalcMatrix, gBosses[0].obj.rot.y * M_DTOR, MTXF_NEW);
|
||||
Matrix_RotateX(gCalcMatrix, gBosses[0].obj.rot.x * M_DTOR, MTXF_APPLY);
|
||||
|
||||
velocity.y = 0.0f;
|
||||
velocity.x = 0;
|
||||
@@ -3723,8 +3724,8 @@ void func_effect_80081C5C(Effect* effect) {
|
||||
yRotDeg = Math_RadToDeg(Math_Atan2F(posXDiff, posZDiff));
|
||||
xRotDeg = Math_RadToDeg(-Math_Atan2F(posYDiff, sqrtf(SQ(posXDiff) + SQ(posZDiff))));
|
||||
|
||||
Matrix_RotateY(gCalcMatrix, M_DTOR * yRotDeg, 0);
|
||||
Matrix_RotateX(gCalcMatrix, M_DTOR * xRotDeg, 1);
|
||||
Matrix_RotateY(gCalcMatrix, M_DTOR * yRotDeg, MTXF_NEW);
|
||||
Matrix_RotateX(gCalcMatrix, M_DTOR * xRotDeg, MTXF_APPLY);
|
||||
|
||||
velocity.x = velocity.y = 0.0f;
|
||||
velocity.z = 20.0f;
|
||||
@@ -3764,13 +3765,13 @@ void func_effect_80081C5C(Effect* effect) {
|
||||
}
|
||||
if ((((gGameFrameCount % 16) == 0)) && (effect->timer_50 == 0)) {
|
||||
D_800D18EC =
|
||||
RAD_TO_DEG(Math_Atan2F(gPlayer[0].camEye.x - gBosses[0].obj.pos.x,
|
||||
gPlayer[0].camEye.z - (gBosses[0].obj.pos.z + D_ctx_80177D20)));
|
||||
RAD_TO_DEG(Math_Atan2F(gPlayer[0].cam.eye.x - gBosses[0].obj.pos.x,
|
||||
gPlayer[0].cam.eye.z - (gBosses[0].obj.pos.z + D_ctx_80177D20)));
|
||||
|
||||
D_800D18E8 = RAD_TO_DEG(
|
||||
-Math_Atan2F(gPlayer[0].camEye.y - gBosses[0].obj.pos.y,
|
||||
sqrtf(SQ(gPlayer[0].camEye.z - (gBosses[0].obj.pos.z + D_ctx_80177D20)) +
|
||||
SQ(gPlayer[0].camEye.x - gBosses[0].obj.pos.x))));
|
||||
-Math_Atan2F(gPlayer[0].cam.eye.y - gBosses[0].obj.pos.y,
|
||||
sqrtf(SQ(gPlayer[0].cam.eye.z - (gBosses[0].obj.pos.z + D_ctx_80177D20)) +
|
||||
SQ(gPlayer[0].cam.eye.x - gBosses[0].obj.pos.x))));
|
||||
}
|
||||
if (gBosses[0].timer_050 == 0) {
|
||||
gBosses[0].swork[39] = effect->index;
|
||||
@@ -3792,8 +3793,8 @@ void func_effect_80081C5C(Effect* effect) {
|
||||
effect->obj.rot.y = gBosses[0].obj.rot.y;
|
||||
effect->obj.rot.z += 30.0f;
|
||||
|
||||
Matrix_RotateY(gCalcMatrix, gBosses[0].obj.rot.y * M_DTOR, 0);
|
||||
Matrix_RotateX(gCalcMatrix, gBosses[0].obj.rot.x * M_DTOR, 1);
|
||||
Matrix_RotateY(gCalcMatrix, gBosses[0].obj.rot.y * M_DTOR, MTXF_NEW);
|
||||
Matrix_RotateX(gCalcMatrix, gBosses[0].obj.rot.x * M_DTOR, MTXF_APPLY);
|
||||
|
||||
velocity.x = velocity.y = 0.0f;
|
||||
velocity.z = 250.0f;
|
||||
@@ -3864,7 +3865,7 @@ void func_effect_80082F78(Effect* effect) {
|
||||
switch (effect->state) {
|
||||
case 0:
|
||||
RCP_SetupDL(&gMasterDisp, 0x31);
|
||||
Matrix_Scale(gGfxMatrix, 0.7f, 0.7f, 1.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 0.7f, 0.7f, 1.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255);
|
||||
gDPSetEnvColor(gMasterDisp++, 32, 32, 255, 255);
|
||||
@@ -3880,7 +3881,7 @@ void func_effect_80082F78(Effect* effect) {
|
||||
|
||||
case 2:
|
||||
RCP_SetupDL(&gMasterDisp, 0x31);
|
||||
Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, 1);
|
||||
Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255);
|
||||
gDPSetEnvColor(gMasterDisp++, 32, 32, 255, 255);
|
||||
@@ -3924,7 +3925,7 @@ void func_effect_80082F78(Effect* effect) {
|
||||
|
||||
case 8:
|
||||
RCP_SetupDL(&gMasterDisp, 0x31);
|
||||
Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, 1);
|
||||
Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255);
|
||||
gDPSetEnvColor(gMasterDisp++, 255, 0, 128, 255);
|
||||
@@ -3933,7 +3934,7 @@ void func_effect_80082F78(Effect* effect) {
|
||||
|
||||
case 9:
|
||||
RCP_SetupDL(&gMasterDisp, 0x31);
|
||||
Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, 1);
|
||||
Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->scale1);
|
||||
gDPSetEnvColor(gMasterDisp++, 255, 255, 128, 255);
|
||||
@@ -3945,7 +3946,7 @@ void func_effect_80082F78(Effect* effect) {
|
||||
Texture_Scroll(D_A6_6012840, 16, 16, 0);
|
||||
}
|
||||
RCP_SetupDL(&gMasterDisp, 0x35);
|
||||
Matrix_Scale(gGfxMatrix, effect->unk_60.x, effect->unk_60.y, effect->unk_60.z, 1);
|
||||
Matrix_Scale(gGfxMatrix, effect->unk_60.x, effect->unk_60.y, effect->unk_60.z, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK);
|
||||
gSPDisplayList(gMasterDisp++, D_A6_6012550);
|
||||
@@ -4050,15 +4051,15 @@ void func_effect_800837EC(Effect* effect) {
|
||||
break;
|
||||
}
|
||||
|
||||
effect->obj.rot.y = RAD_TO_DEG(Math_Atan2F(gPlayer[0].camEye.x - effect->obj.pos.x,
|
||||
gPlayer[0].camEye.z - (effect->obj.pos.z + D_ctx_80177D20)));
|
||||
effect->obj.rot.y = RAD_TO_DEG(Math_Atan2F(gPlayer[0].cam.eye.x - effect->obj.pos.x,
|
||||
gPlayer[0].cam.eye.z - (effect->obj.pos.z + D_ctx_80177D20)));
|
||||
}
|
||||
|
||||
void func_effect_80083B8C(Effect* effect) {
|
||||
RCP_SetupDL_49();
|
||||
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->unk_44);
|
||||
gDPSetEnvColor(gMasterDisp++, 36, 45, 28, 255);
|
||||
Matrix_Scale(gGfxMatrix, effect->unk_60.x, effect->scale2 * effect->unk_60.y, effect->scale2, 1);
|
||||
Matrix_Scale(gGfxMatrix, effect->unk_60.x, effect->scale2 * effect->unk_60.y, effect->scale2, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_ZO_601BAD0);
|
||||
RCP_SetupDL(&gMasterDisp, 0x40);
|
||||
@@ -4120,8 +4121,8 @@ void func_effect_80083D2C(f32 xPos, f32 yPos, f32 zPos, f32 srcZ) {
|
||||
yRot = Math_Atan2F(x, z);
|
||||
xRot = -Math_Atan2F(y, sqrtf(SQ(x) + SQ(z)));
|
||||
|
||||
Matrix_RotateY(gCalcMatrix, yRot, 0);
|
||||
Matrix_RotateX(gCalcMatrix, xRot, 1);
|
||||
Matrix_RotateY(gCalcMatrix, yRot, MTXF_NEW);
|
||||
Matrix_RotateX(gCalcMatrix, xRot, MTXF_APPLY);
|
||||
|
||||
src.x = src.y = 0.0f;
|
||||
src.z = srcZ;
|
||||
@@ -4152,12 +4153,12 @@ void func_effect_80083FA8(Effect* effect) {
|
||||
return;
|
||||
}
|
||||
|
||||
effect->obj.rot.y = RAD_TO_DEG(-gPlayer[0].unk_058);
|
||||
effect->obj.rot.x = RAD_TO_DEG(gPlayer[0].unk_05C);
|
||||
effect->obj.rot.y = RAD_TO_DEG(-gPlayer[0].camYaw);
|
||||
effect->obj.rot.x = RAD_TO_DEG(gPlayer[0].camPitch);
|
||||
effect->obj.rot.z += 20.0f;
|
||||
|
||||
Matrix_RotateZ(gCalcMatrix, effect->unk_60.z * M_DTOR, 0);
|
||||
Matrix_RotateZ(gCalcMatrix, effect->unk_46 * M_DTOR, 1);
|
||||
Matrix_RotateZ(gCalcMatrix, effect->unk_60.z * M_DTOR, MTXF_NEW);
|
||||
Matrix_RotateZ(gCalcMatrix, effect->unk_46 * M_DTOR, MTXF_APPLY);
|
||||
|
||||
src.x = 0.0f;
|
||||
src.y = effect->scale1;
|
||||
@@ -4196,14 +4197,14 @@ void func_effect_80084194(Effect* effect) {
|
||||
|
||||
if (gCurrentLevel != LEVEL_AQUAS) {
|
||||
RCP_SetupDL(&gMasterDisp, 0x31);
|
||||
Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, 1);
|
||||
Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255);
|
||||
tmp = effect->unk_44 * 4;
|
||||
gDPSetEnvColor(gMasterDisp++, D_800D18F0[tmp + 0], D_800D18F0[tmp + 1], D_800D18F0[tmp + 2], 255);
|
||||
} else {
|
||||
RCP_SetupDL(&gMasterDisp, 0x31);
|
||||
Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, 1);
|
||||
Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, D_800D1950[effect->unk_44]);
|
||||
gDPSetEnvColor(gMasterDisp++, 255, 0, 0, 255);
|
||||
|
||||
+103
-103
@@ -94,13 +94,13 @@ bool func_enmy_80060FE4(Vec3f* arg0, f32 arg1) {
|
||||
Vec3f sp2C;
|
||||
Vec3f sp20;
|
||||
|
||||
if ((gLevelMode != LEVELMODE_ALL_RANGE) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_2)) {
|
||||
if ((gLevelMode != LEVELMODE_ALL_RANGE) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO)) {
|
||||
return true;
|
||||
}
|
||||
Matrix_RotateY(gCalcMatrix, gPlayer[gPlayerNum].unk_058, 0);
|
||||
sp2C.x = arg0->x - gPlayer[gPlayerNum].camEye.x;
|
||||
Matrix_RotateY(gCalcMatrix, gPlayer[gPlayerNum].camYaw, MTXF_NEW);
|
||||
sp2C.x = arg0->x - gPlayer[gPlayerNum].cam.eye.x;
|
||||
sp2C.y = 0.0f;
|
||||
sp2C.z = arg0->z - gPlayer[gPlayerNum].camEye.z;
|
||||
sp2C.z = arg0->z - gPlayer[gPlayerNum].cam.eye.z;
|
||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp2C, &sp20);
|
||||
|
||||
if ((sp20.z < 1000.0f) && (arg1 < sp20.z) && (fabsf(sp20.x) < (fabsf(sp20.z * 0.5f) + 2000.0f))) {
|
||||
@@ -116,13 +116,13 @@ bool func_enmy_80061148(Vec3f* arg0, f32 arg1) {
|
||||
if (gLevelMode != LEVELMODE_ALL_RANGE) {
|
||||
return true;
|
||||
}
|
||||
if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7) {
|
||||
if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) {
|
||||
return func_enmy_80060FE4(arg0, arg1);
|
||||
}
|
||||
Matrix_RotateY(gCalcMatrix, gPlayer[gPlayerNum].unk_058, 0);
|
||||
sp2C.x = arg0->x - gPlayer[gPlayerNum].camEye.x;
|
||||
Matrix_RotateY(gCalcMatrix, gPlayer[gPlayerNum].camYaw, MTXF_NEW);
|
||||
sp2C.x = arg0->x - gPlayer[gPlayerNum].cam.eye.x;
|
||||
sp2C.y = 0.0f;
|
||||
sp2C.z = arg0->z - gPlayer[gPlayerNum].camEye.z;
|
||||
sp2C.z = arg0->z - gPlayer[gPlayerNum].cam.eye.z;
|
||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp2C, &sp20);
|
||||
|
||||
if ((sp20.z < 0.0f) && (arg1 < sp20.z) && (fabsf(sp20.x) < (fabsf(sp20.z * 0.5f) + 500.0f))) {
|
||||
@@ -393,9 +393,9 @@ void func_enmy_80061F0C(Actor* actor, ObjectInit* objInit, s32 index) {
|
||||
actor->iwork[1] = gPrevEventActorIndex;
|
||||
actor->iwork[10] = gActors[gPrevEventActorIndex].aiType;
|
||||
actor->fwork[22] = D_play_80161A54;
|
||||
Matrix_RotateZ(gCalcMatrix, -D_ctx_80177E88.z * M_DTOR, 0);
|
||||
Matrix_RotateX(gCalcMatrix, -D_ctx_80177E88.x * M_DTOR, 1);
|
||||
Matrix_RotateY(gCalcMatrix, -D_ctx_80177E88.y * M_DTOR, 1);
|
||||
Matrix_RotateZ(gCalcMatrix, -D_ctx_80177E88.z * M_DTOR, MTXF_NEW);
|
||||
Matrix_RotateX(gCalcMatrix, -D_ctx_80177E88.x * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateY(gCalcMatrix, -D_ctx_80177E88.y * M_DTOR, MTXF_APPLY);
|
||||
sp24.x = actor->obj.pos.x - D_ctx_80177F10.x;
|
||||
sp24.y = actor->obj.pos.y - D_ctx_80177F10.y;
|
||||
sp24.z = actor->obj.pos.z - D_ctx_80177F10.z;
|
||||
@@ -517,7 +517,7 @@ void func_enmy_80062568(void) {
|
||||
}
|
||||
}
|
||||
|
||||
void func_enmy_80062664(void) {
|
||||
void Object_LoadFromInit(void) {
|
||||
ObjectInit* objInit;
|
||||
f32 xMax;
|
||||
f32 xMin;
|
||||
@@ -650,7 +650,7 @@ void func_enmy_80062D04(f32 xPos, f32 yPos) {
|
||||
}
|
||||
}
|
||||
|
||||
bool func_enmy_80062DBC(Vec3f* pos, f32* hitboxData, Object* obj, f32 xRot, f32 yRot, f32 zRot) {
|
||||
bool Object_CheckHitboxCollision(Vec3f* pos, f32* hitboxData, Object* obj, f32 xRot, f32 yRot, f32 zRot) {
|
||||
s32 i;
|
||||
Vec3f hitRot;
|
||||
Vec3f hitPos;
|
||||
@@ -681,16 +681,16 @@ bool func_enmy_80062DBC(Vec3f* pos, f32* hitboxData, Object* obj, f32 xRot, f32
|
||||
hitPos.y = pos->y;
|
||||
hitPos.z = pos->z;
|
||||
} else {
|
||||
Matrix_RotateZ(gCalcMatrix, -hitRot.z * M_DTOR, 0);
|
||||
Matrix_RotateX(gCalcMatrix, -hitRot.x * M_DTOR, 1);
|
||||
Matrix_RotateY(gCalcMatrix, -hitRot.y * M_DTOR, 1);
|
||||
Matrix_RotateZ(gCalcMatrix, -obj->rot.z * M_DTOR, 1);
|
||||
Matrix_RotateX(gCalcMatrix, -obj->rot.x * M_DTOR, 1);
|
||||
Matrix_RotateY(gCalcMatrix, -obj->rot.y * M_DTOR, 1);
|
||||
Matrix_RotateZ(gCalcMatrix, -hitRot.z * M_DTOR, MTXF_NEW);
|
||||
Matrix_RotateX(gCalcMatrix, -hitRot.x * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateY(gCalcMatrix, -hitRot.y * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateZ(gCalcMatrix, -obj->rot.z * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateX(gCalcMatrix, -obj->rot.x * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateY(gCalcMatrix, -obj->rot.y * M_DTOR, MTXF_APPLY);
|
||||
if ((xRot != 0.0f) || (yRot != 0.0f) || (zRot != 0.0f)) {
|
||||
Matrix_RotateZ(gCalcMatrix, -zRot * M_DTOR, 1);
|
||||
Matrix_RotateX(gCalcMatrix, -xRot * M_DTOR, 1);
|
||||
Matrix_RotateY(gCalcMatrix, -yRot * M_DTOR, 1);
|
||||
Matrix_RotateZ(gCalcMatrix, -zRot * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateX(gCalcMatrix, -xRot * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateY(gCalcMatrix, -yRot * M_DTOR, MTXF_APPLY);
|
||||
}
|
||||
sp80.x = pos->x - obj->pos.x;
|
||||
sp80.y = pos->y - obj->pos.y;
|
||||
@@ -711,40 +711,40 @@ bool func_enmy_80062DBC(Vec3f* pos, f32* hitboxData, Object* obj, f32 xRot, f32
|
||||
return false;
|
||||
}
|
||||
|
||||
bool func_enmy_800631A8(Vec3f* posD, f32* hitboxData, Vec3f* posA) {
|
||||
bool Object_CheckSingleHitbox(Vec3f* checkPos, f32* hitboxData, Vec3f* hitboxPos) {
|
||||
if ((s32) hitboxData[0] != 0) {
|
||||
if ((fabsf(hitboxData[1] + posA->z - posD->z) < (hitboxData[2] + 20.0f)) &&
|
||||
(fabsf(hitboxData[5] + posA->x - posD->x) < (hitboxData[6] + 20.0f)) &&
|
||||
(fabsf(hitboxData[3] + posA->y - posD->y) < (hitboxData[4] + 20.0f))) {
|
||||
if ((fabsf(hitboxData[1] + hitboxPos->z - checkPos->z) < (hitboxData[2] + 20.0f)) &&
|
||||
(fabsf(hitboxData[5] + hitboxPos->x - checkPos->x) < (hitboxData[6] + 20.0f)) &&
|
||||
(fabsf(hitboxData[3] + hitboxPos->y - checkPos->y) < (hitboxData[4] + 20.0f))) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool func_enmy_8006326C(Vec3f* arg0, Vec3f* arg1, ObjectId objId, Object* obj) {
|
||||
bool Object_CheckPolyCollision(Vec3f* pos, Vec3f* vel, ObjectId objId, Object* obj) {
|
||||
Vec3f sp74;
|
||||
Vec3f sp68;
|
||||
Vec3f sp5C;
|
||||
Vec3f sp50;
|
||||
Vec3f relPos;
|
||||
Vec3f objPos;
|
||||
Vec3f sp44;
|
||||
s32 colId;
|
||||
s32 pad1[2];
|
||||
f32 sp30[2];
|
||||
s32 pad2;
|
||||
|
||||
sp74.x = arg0->x - obj->pos.x;
|
||||
sp74.z = arg0->z - obj->pos.z;
|
||||
sp74.x = pos->x - obj->pos.x;
|
||||
sp74.z = pos->z - obj->pos.z;
|
||||
if (((fabsf(sp74.x) < 1100.0f) && (fabsf(sp74.z) < 1100.0f)) || (objId == OBJ_ACTOR_180)) {
|
||||
sp74.y = arg0->y - obj->pos.y;
|
||||
Matrix_RotateY(gCalcMatrix, -obj->rot.y * M_DTOR, 0);
|
||||
sp74.y = pos->y - obj->pos.y;
|
||||
Matrix_RotateY(gCalcMatrix, -obj->rot.y * M_DTOR, MTXF_NEW);
|
||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp74, &sp68);
|
||||
sp5C.x = obj->pos.x + sp68.x;
|
||||
sp5C.y = obj->pos.y + sp68.y;
|
||||
sp5C.z = obj->pos.z + sp68.z;
|
||||
sp50.x = obj->pos.x;
|
||||
sp50.y = obj->pos.y;
|
||||
sp50.z = obj->pos.z;
|
||||
relPos.x = obj->pos.x + sp68.x;
|
||||
relPos.y = obj->pos.y + sp68.y;
|
||||
relPos.z = obj->pos.z + sp68.z;
|
||||
objPos.x = obj->pos.x;
|
||||
objPos.y = obj->pos.y;
|
||||
objPos.z = obj->pos.z;
|
||||
if ((objId == OBJ_ACTOR_180) || (objId == OBJ_80_149) || (objId == OBJ_80_150) || (objId == OBJ_BOSS_308) ||
|
||||
(objId == OBJ_BOSS_313) || (objId == OBJ_BOSS_312) || (objId == OBJ_BOSS_309) || (objId == OBJ_80_39)) {
|
||||
colId = COL1_0;
|
||||
@@ -764,7 +764,7 @@ bool func_enmy_8006326C(Vec3f* arg0, Vec3f* arg1, ObjectId objId, Object* obj) {
|
||||
} else if (objId == OBJ_BOSS_313) {
|
||||
colId = COL1_8;
|
||||
}
|
||||
if (func_col1_800998FC(&sp5C, &sp50, arg1, colId, &sp44, sp30) > 0) {
|
||||
if (func_col1_800998FC(&relPos, &objPos, vel, colId, &sp44, sp30) > 0) {
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
@@ -786,7 +786,7 @@ bool func_enmy_8006326C(Vec3f* arg0, Vec3f* arg1, ObjectId objId, Object* obj) {
|
||||
} else if ((objId == OBJ_80_4) || (objId == OBJ_80_5)) {
|
||||
colId = COL2_1;
|
||||
}
|
||||
if (func_col2_800A3690(&sp5C, &sp50, colId, &sp44)) {
|
||||
if (func_col2_800A3690(&relPos, &objPos, colId, &sp44)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -794,7 +794,7 @@ bool func_enmy_8006326C(Vec3f* arg0, Vec3f* arg1, ObjectId objId, Object* obj) {
|
||||
return false;
|
||||
}
|
||||
|
||||
s32 func_enmy_8006351C(s32 index, Vec3f* pos, Vec3f* arg2, s32 arg3) {
|
||||
s32 Object_CheckCollision(s32 index, Vec3f* pos, Vec3f* vel, s32 mode) {
|
||||
Object_58* obj58;
|
||||
Object_80* obj80;
|
||||
Sprite* sprite;
|
||||
@@ -810,12 +810,12 @@ s32 func_enmy_8006351C(s32 index, Vec3f* pos, Vec3f* arg2, s32 arg3) {
|
||||
if ((obj58->obj.id == OBJ_80_1) || (obj58->obj.id == OBJ_80_3) || (obj58->obj.id == OBJ_80_117) ||
|
||||
(obj58->obj.id == OBJ_80_141) || (obj58->obj.id == OBJ_80_150) || (obj58->obj.id == OBJ_80_149) ||
|
||||
(obj58->obj.id == OBJ_80_148) || (obj58->obj.id == OBJ_80_140)) {
|
||||
if (func_enmy_8006326C(pos, arg2, obj58->obj.id, &obj58->obj)) {
|
||||
if (Object_CheckPolyCollision(pos, vel, obj58->obj.id, &obj58->obj)) {
|
||||
return 999;
|
||||
}
|
||||
} else if ((fabsf(pos->x - obj58->obj.pos.x) < 2000.0f) &&
|
||||
(fabsf(pos->z - obj58->obj.pos.z) < 2000.0f)) {
|
||||
if (func_enmy_80062DBC(pos, obj58->info.hitbox, &obj58->obj, 0.0f, 0.0f, 0.0f)) {
|
||||
if (Object_CheckHitboxCollision(pos, obj58->info.hitbox, &obj58->obj, 0.0f, 0.0f, 0.0f)) {
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
@@ -827,11 +827,11 @@ s32 func_enmy_8006351C(s32 index, Vec3f* pos, Vec3f* arg2, s32 arg3) {
|
||||
if (obj80->obj.status == OBJ_ACTIVE) {
|
||||
if ((obj80->obj.id == OBJ_80_1) || (obj80->obj.id == OBJ_80_4) || (obj80->obj.id == OBJ_80_5) ||
|
||||
(obj80->obj.id == OBJ_80_2) || (obj80->obj.id == OBJ_80_39) || (obj80->obj.id == OBJ_80_3)) {
|
||||
if (func_enmy_8006326C(pos, arg2, obj80->obj.id, &obj80->obj)) {
|
||||
if (Object_CheckPolyCollision(pos, vel, obj80->obj.id, &obj80->obj)) {
|
||||
return 2;
|
||||
}
|
||||
} else if ((fabsf(pos->x - obj80->obj.pos.x) < 2000.0f) && (fabsf(pos->z - obj80->obj.pos.z) < 2000.0f)) {
|
||||
if (func_enmy_80062DBC(pos, obj80->info.hitbox, &obj80->obj, 0.0f, 0.0f, 0.0f)) {
|
||||
if (Object_CheckHitboxCollision(pos, obj80->info.hitbox, &obj80->obj, 0.0f, 0.0f, 0.0f)) {
|
||||
return i + 10;
|
||||
}
|
||||
}
|
||||
@@ -841,7 +841,7 @@ s32 func_enmy_8006351C(s32 index, Vec3f* pos, Vec3f* arg2, s32 arg3) {
|
||||
for (i = 0; i < ARRAY_COUNT(gSprites); i++, sprite++) {
|
||||
if ((sprite->obj.status == OBJ_ACTIVE) && (fabsf(pos->x - sprite->obj.pos.x) < 500.0f) &&
|
||||
(fabsf(pos->z - sprite->obj.pos.z) < 500.0f) &&
|
||||
func_enmy_800631A8(pos, sprite->info.hitbox, &sprite->obj.pos)) {
|
||||
Object_CheckSingleHitbox(pos, sprite->info.hitbox, &sprite->obj.pos)) {
|
||||
if ((sprite->obj.id == OBJ_SPRITE_FO_POLE) || (sprite->obj.id == OBJ_SPRITE_CO_TREE) ||
|
||||
(sprite->obj.id == OBJ_SPRITE_CO_TREE)) {
|
||||
sprite->unk_46 = 1;
|
||||
@@ -849,14 +849,14 @@ s32 func_enmy_8006351C(s32 index, Vec3f* pos, Vec3f* arg2, s32 arg3) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
if ((arg3 == 0) || (arg3 == 2) || (arg3 == 3)) {
|
||||
if (arg3 != 2) {
|
||||
if ((mode == 0) || (mode == 2) || (mode == 3)) {
|
||||
if (mode != 2) {
|
||||
boss = gBosses;
|
||||
for (i = 0; i < ARRAY_COUNT(gBosses); i++, boss++) {
|
||||
if (boss->obj.status == OBJ_ACTIVE) {
|
||||
if ((boss->obj.id == OBJ_BOSS_308) || (boss->obj.id == OBJ_BOSS_312) ||
|
||||
(boss->obj.id == OBJ_BOSS_313) || (boss->obj.id == OBJ_BOSS_309)) {
|
||||
if (func_enmy_8006326C(pos, arg2, boss->obj.id, &boss->obj)) {
|
||||
if (Object_CheckPolyCollision(pos, vel, boss->obj.id, &boss->obj)) {
|
||||
return 2;
|
||||
}
|
||||
} else if (boss->obj.id == OBJ_BOSS_310) {
|
||||
@@ -878,7 +878,7 @@ s32 func_enmy_8006351C(s32 index, Vec3f* pos, Vec3f* arg2, s32 arg3) {
|
||||
}
|
||||
if ((fabsf(pos->x - boss->obj.pos.x) < 2000.0f) &&
|
||||
(fabsf(pos->z - boss->obj.pos.z) < 2000.0f)) {
|
||||
if (func_enmy_80062DBC(pos, boss->info.hitbox, &boss->obj, 0.0f, 0.0f, 0.0f)) {
|
||||
if (Object_CheckHitboxCollision(pos, boss->info.hitbox, &boss->obj, 0.0f, 0.0f, 0.0f)) {
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
@@ -892,12 +892,12 @@ s32 func_enmy_8006351C(s32 index, Vec3f* pos, Vec3f* arg2, s32 arg3) {
|
||||
(fabsf(pos->z - actor->obj.pos.z) < 1500.0f) && (index != i) && (actor->info.unk_16 != 2) &&
|
||||
!((actor->obj.id == OBJ_ACTOR_ALLRANGE) && (actor->aiType <= AI360_PEPPY)) && (actor->timer_0C2 == 0)) {
|
||||
if (actor->obj.id == OBJ_ACTOR_180) {
|
||||
if (func_enmy_8006326C(pos, arg2, actor->obj.id, &actor->obj)) {
|
||||
if (Object_CheckPolyCollision(pos, vel, actor->obj.id, &actor->obj)) {
|
||||
return 2;
|
||||
}
|
||||
} else if (actor->scale < 0.0f) {
|
||||
if (func_enmy_80062DBC(pos, actor->info.hitbox, &actor->obj, actor->vwork[29].x, actor->vwork[29].y,
|
||||
actor->vwork[29].z + actor->unk_0F4.z)) {
|
||||
if (Object_CheckHitboxCollision(pos, actor->info.hitbox, &actor->obj, actor->vwork[29].x,
|
||||
actor->vwork[29].y, actor->vwork[29].z + actor->unk_0F4.z)) {
|
||||
actor->unk_0D0 = 1;
|
||||
actor->damage = 10;
|
||||
actor->unk_0D2 = -1;
|
||||
@@ -906,8 +906,8 @@ s32 func_enmy_8006351C(s32 index, Vec3f* pos, Vec3f* arg2, s32 arg3) {
|
||||
actor->unk_0D8.z = pos->z;
|
||||
return 2;
|
||||
}
|
||||
} else if ((arg3 != 2) && (arg3 != 3)) {
|
||||
if (func_enmy_800631A8(pos, actor->info.hitbox, &actor->obj.pos)) {
|
||||
} else if ((mode != 2) && (mode != 3)) {
|
||||
if (Object_CheckSingleHitbox(pos, actor->info.hitbox, &actor->obj.pos)) {
|
||||
actor->unk_0D0 = 1;
|
||||
actor->damage = 10;
|
||||
actor->unk_0D2 = -1;
|
||||
@@ -1579,8 +1579,8 @@ void func_enmy_800656D4(Actor* actor) {
|
||||
sp8C.x = actor->vel.x;
|
||||
sp8C.y = actor->vel.y;
|
||||
sp8C.z = actor->vel.z;
|
||||
if ((func_enmy_8006351C(actor->index, &actor->obj.pos, &sp8C, 1) != 0) || (actor->unk_0D0 != 0) ||
|
||||
(actor->obj.pos.y < (gGroundLevel + 10.0f)) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7)) {
|
||||
if ((Object_CheckCollision(actor->index, &actor->obj.pos, &sp8C, 1) != 0) || (actor->unk_0D0 != 0) ||
|
||||
(actor->obj.pos.y < (gGroundLevel + 10.0f)) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) {
|
||||
func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 3.0f);
|
||||
Object_Kill(&actor->obj, actor->sfxSource);
|
||||
if (actor->unk_0D0 != 0) {
|
||||
@@ -1603,7 +1603,7 @@ void func_enmy_800656D4(Actor* actor) {
|
||||
if (fabsf(actor->obj.pos.z - gPlayer[0].unk_138) < 100.0f) {
|
||||
actor->iwork[10] = 1;
|
||||
}
|
||||
if (gPlayer[0].camEye.z < (actor->obj.pos.z + D_ctx_80177D20)) {
|
||||
if (gPlayer[0].cam.eye.z < (actor->obj.pos.z + D_ctx_80177D20)) {
|
||||
Object_Kill(&actor->obj, actor->sfxSource);
|
||||
}
|
||||
}
|
||||
@@ -1673,7 +1673,7 @@ void Actor_Despawn(Actor* actor) {
|
||||
}
|
||||
if (actor->obj.id == OBJ_ACTOR_ALLRANGE) {
|
||||
if ((actor->aiType >= AI360_WOLF) && (actor->aiType < AI360_KATT)) {
|
||||
func_360_8002E3E0(actor);
|
||||
AllRange_GetStarWolfHits(actor);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1818,8 +1818,8 @@ void func_enmy_80066A8C(Object_80* obj80) {
|
||||
sp64.x = 120.0f;
|
||||
}
|
||||
for (yf = 0.0f; yf < 680.0f; yf += 100.0f) {
|
||||
Matrix_RotateY(gCalcMatrix, obj80->obj.rot.y * M_DTOR, 0);
|
||||
Matrix_RotateX(gCalcMatrix, obj80->obj.rot.x * M_DTOR, 1);
|
||||
Matrix_RotateY(gCalcMatrix, obj80->obj.rot.y * M_DTOR, MTXF_NEW);
|
||||
Matrix_RotateX(gCalcMatrix, obj80->obj.rot.x * M_DTOR, MTXF_APPLY);
|
||||
sp64.y = yf;
|
||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp64, &sp58);
|
||||
func_effect_8007D0E0(obj80->obj.pos.x + sp58.x, obj80->obj.pos.y + sp58.y, obj80->obj.pos.z + sp58.z, 4.0f);
|
||||
@@ -1836,7 +1836,7 @@ void func_enmy_80066C00(Object_80* obj80) {
|
||||
if (obj80->obj.rot.y > 90.0f) {
|
||||
sp64.x = 100.0f;
|
||||
}
|
||||
Matrix_RotateY(gCalcMatrix, obj80->obj.rot.y * M_DTOR, 0);
|
||||
Matrix_RotateY(gCalcMatrix, obj80->obj.rot.y * M_DTOR, MTXF_NEW);
|
||||
|
||||
for (zf = -180.0f; zf <= 0.0f; zf += 30.0f) {
|
||||
sp64.z = zf;
|
||||
@@ -1879,7 +1879,7 @@ void Sprite167_Update(Sprite167* this) {
|
||||
|
||||
void func_enmy_80066EA8(Object_80* obj80) {
|
||||
obj80->obj.rot.y = 0.0f;
|
||||
if (gPlayer[0].camEye.x < obj80->obj.pos.x) {
|
||||
if (gPlayer[0].cam.eye.x < obj80->obj.pos.x) {
|
||||
obj80->obj.rot.y = 271.0f;
|
||||
}
|
||||
}
|
||||
@@ -1890,7 +1890,7 @@ void func_enmy_80066EE4(Sprite* sprite) {
|
||||
void func_enmy_80066EF0(Item* item) {
|
||||
f32 var_fa1;
|
||||
|
||||
if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_0)) {
|
||||
if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_STANDBY)) {
|
||||
Object_Kill(&item->obj, item->sfxSource);
|
||||
}
|
||||
if ((gLevelMode == LEVELMODE_ON_RAILS) && (gLastPathChange == 0)) {
|
||||
@@ -1944,7 +1944,7 @@ void func_enmy_800671D0(Item* item) {
|
||||
var_v0 = 7;
|
||||
}
|
||||
if (!(var_v0 & gGameFrameCount)) {
|
||||
Matrix_RotateY(gCalcMatrix, gGameFrameCount * 23.0f * M_DTOR, 0);
|
||||
Matrix_RotateY(gCalcMatrix, gGameFrameCount * 23.0f * M_DTOR, MTXF_NEW);
|
||||
sp40.x = 50.0f;
|
||||
sp40.y = RAND_FLOAT_CENTERED(120.0f);
|
||||
sp40.z = 0.0f;
|
||||
@@ -2025,8 +2025,8 @@ void ActorSupplies_Update(ActorSupplies* this) {
|
||||
Object_Kill(&this->obj, this->sfxSource);
|
||||
}
|
||||
}
|
||||
gRadarMarks[63].unk_00 = 1;
|
||||
gRadarMarks[63].unk_02 = 103;
|
||||
gRadarMarks[63].status = 1;
|
||||
gRadarMarks[63].type = 103;
|
||||
gRadarMarks[63].pos.x = this->obj.pos.x;
|
||||
gRadarMarks[63].pos.y = this->obj.pos.y;
|
||||
gRadarMarks[63].pos.z = this->obj.pos.z;
|
||||
@@ -2039,9 +2039,9 @@ void ActorSupplies_Draw(Actor* actor) {
|
||||
Lights_SetOneLight(&gMasterDisp, -60, -60, 60, 150, 150, 150, 20, 20, 20);
|
||||
for (i = 0; i < 6; i++) {
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, D_enmy_800CFEC4[i].x, D_enmy_800CFEC4[i].y, D_enmy_800CFEC4[i].z, 1);
|
||||
Matrix_RotateY(gGfxMatrix, D_enmy_800CFF0C[i].y * M_DTOR, 1);
|
||||
Matrix_RotateX(gGfxMatrix, D_enmy_800CFF0C[i].x * M_DTOR, 1);
|
||||
Matrix_Translate(gGfxMatrix, D_enmy_800CFEC4[i].x, D_enmy_800CFEC4[i].y, D_enmy_800CFEC4[i].z, MTXF_APPLY);
|
||||
Matrix_RotateY(gGfxMatrix, D_enmy_800CFF0C[i].y * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateX(gGfxMatrix, D_enmy_800CFF0C[i].x * M_DTOR, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_10177C0);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
@@ -2206,14 +2206,14 @@ void ItemSupplyRing_Update(Item* this) {
|
||||
this->obj.pos.z += (gPlayer[this->playerNum].unk_138 - this->obj.pos.z) * 0.5f;
|
||||
}
|
||||
this->obj.rot.z += 22.0f;
|
||||
Math_SmoothStepToAngle(&this->obj.rot.y, Math_RadToDeg(-gPlayer[this->playerNum].unk_058), 0.2f, 10.0f,
|
||||
Math_SmoothStepToAngle(&this->obj.rot.y, Math_RadToDeg(-gPlayer[this->playerNum].camYaw), 0.2f, 10.0f,
|
||||
0.0f);
|
||||
if (this->timer_48 == 0) {
|
||||
Object_Kill(&this->obj, this->sfxSource);
|
||||
}
|
||||
if (this->scale > 0.3f) {
|
||||
Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, 0);
|
||||
Matrix_RotateZ(gCalcMatrix, gGameFrameCount * 37.0f * M_DTOR, 1);
|
||||
Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW);
|
||||
Matrix_RotateZ(gCalcMatrix, gGameFrameCount * 37.0f * M_DTOR, MTXF_APPLY);
|
||||
sp4C.x = 0.0f;
|
||||
sp4C.y = this->scale * 100.0f;
|
||||
sp4C.z = 0.0f;
|
||||
@@ -2277,7 +2277,7 @@ void ItemMeteoWarp_Update(ItemMeteoWarp* this) {
|
||||
}
|
||||
gRingPassCount++;
|
||||
if (gRingPassCount >= 7) {
|
||||
gPlayer[0].state_1C8 = PLAYERSTATE_1C8_8;
|
||||
gPlayer[0].state_1C8 = PLAYERSTATE_1C8_ENTER_WARP_ZONE;
|
||||
gPlayer[0].unk_1D0 = 0;
|
||||
AUDIO_PLAY_SFX(0x1900602A, gDefaultSfxSource, 0);
|
||||
gNextPlanetPath = 2;
|
||||
@@ -2345,14 +2345,14 @@ void ItemRingCheck_Update(Item* item) {
|
||||
|
||||
void ItemPathChange_Update(Item* this) {
|
||||
gLastPathChange = this->obj.id;
|
||||
if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_3) {
|
||||
if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_ACTIVE) {
|
||||
Object_Kill(&this->obj, this->sfxSource);
|
||||
} else if (((gCurrentLevel == LEVEL_METEO) || (gCurrentLevel == LEVEL_SECTOR_X)) && (gLevelStage == 1)) {
|
||||
gPlayer[0].state_1C8 = PLAYERSTATE_1C8_7;
|
||||
gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE;
|
||||
gPlayer[0].unk_1D0 = 0;
|
||||
Object_Kill(&this->obj, this->sfxSource);
|
||||
} else if (gCurrentLevel == LEVEL_TRAINING) {
|
||||
gPlayer[0].state_1C8 = PLAYERSTATE_1C8_9;
|
||||
gPlayer[0].state_1C8 = PLAYERSTATE_1C8_START_360;
|
||||
gPlayer[0].unk_1D0 = 0;
|
||||
Object_Kill(&this->obj, this->sfxSource);
|
||||
} else if (this->state == 0) {
|
||||
@@ -2418,10 +2418,10 @@ void ItemPathChange_Update(Item* this) {
|
||||
}
|
||||
|
||||
void Sprite_UpdateDoodad(Sprite* this) {
|
||||
this->obj.rot.y =
|
||||
(Math_Atan2F(gPlayer[0].camEye.x - this->obj.pos.x, gPlayer[0].camEye.z - (this->obj.pos.z + D_ctx_80177D20)) *
|
||||
180.0f) /
|
||||
M_PI;
|
||||
this->obj.rot.y = (Math_Atan2F(gPlayer[0].cam.eye.x - this->obj.pos.x,
|
||||
gPlayer[0].cam.eye.z - (this->obj.pos.z + D_ctx_80177D20)) *
|
||||
180.0f) /
|
||||
M_PI;
|
||||
if (this->unk_46 != 0) {
|
||||
this->obj.status = OBJ_FREE;
|
||||
func_effect_8007A6F0(&this->obj.pos, 0x1903400F);
|
||||
@@ -2495,10 +2495,10 @@ void Actor_Move(Actor* actor) {
|
||||
if ((actor->obj.id == OBJ_ACTOR_236) || (gCurrentLevel == LEVEL_MACBETH) ||
|
||||
((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->unk_0B4 == EINFO_56))) {
|
||||
var_fv0 = 8000.0f;
|
||||
} else if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_8) {
|
||||
} else if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ENTER_WARP_ZONE) {
|
||||
var_fv0 = 100000.0f;
|
||||
}
|
||||
if (((gPlayer[0].camEye.z + actor->info.unk_10) < (actor->obj.pos.z + D_ctx_80177D20)) ||
|
||||
if (((gPlayer[0].cam.eye.z + actor->info.unk_10) < (actor->obj.pos.z + D_ctx_80177D20)) ||
|
||||
((actor->obj.pos.z + D_ctx_80177D20) < -15000.0f) || (actor->obj.pos.y < (gPlayer[0].unk_0B0 - var_fv0)) ||
|
||||
((gPlayer[0].unk_0B0 + var_fv0) < actor->obj.pos.y) ||
|
||||
((gPlayer[0].unk_0AC + var_fv0) < actor->obj.pos.x) ||
|
||||
@@ -2534,20 +2534,20 @@ void Boss_Move(Boss* boss) {
|
||||
boss->obj.pos.y += boss->vel.y;
|
||||
boss->obj.pos.z += boss->vel.z;
|
||||
boss->vel.y -= boss->gravity;
|
||||
if ((D_ctx_80161AB8 != 0) && ((boss->obj.pos.z + D_ctx_80177D20) > (boss->info.unk_10 - gPlayer[0].camEye.z))) {
|
||||
if (gPlayer[0].camEye.z) {} // fake
|
||||
if ((D_ctx_80161AB8 != 0) && ((boss->obj.pos.z + D_ctx_80177D20) > (boss->info.unk_10 - gPlayer[0].cam.eye.z))) {
|
||||
if (gPlayer[0].cam.eye.z) {} // fake
|
||||
Object_Kill(&boss->obj, boss->sfxSource);
|
||||
}
|
||||
}
|
||||
|
||||
void Object80_Move(Object_80* obj80) {
|
||||
if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_2) {
|
||||
if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) {
|
||||
obj80->obj.pos.z += obj80->unk_60;
|
||||
if (obj80->info.unk_10 < obj80->obj.pos.z) {
|
||||
Object_Kill(&obj80->obj, obj80->sfxSource);
|
||||
}
|
||||
} else if ((gLevelMode == LEVELMODE_ON_RAILS) && (gBossActive != 2)) {
|
||||
f32 temp_fv0 = fabsf(obj80->obj.pos.x - gPlayer[0].camEye.x);
|
||||
f32 temp_fv0 = fabsf(obj80->obj.pos.x - gPlayer[0].cam.eye.x);
|
||||
f32 var_fa0 = 500.0f;
|
||||
|
||||
if ((obj80->obj.id == OBJ_80_6) || (obj80->obj.id == OBJ_80_7)) {
|
||||
@@ -2557,7 +2557,7 @@ void Object80_Move(Object_80* obj80) {
|
||||
if ((fabsf(gPlayer[0].unk_114) > 1.0f) || (gCurrentLevel == LEVEL_MACBETH)) {
|
||||
temp_fv0 = 0.0f;
|
||||
}
|
||||
temp_fv0 -= gPlayer[0].camEye.z;
|
||||
temp_fv0 -= gPlayer[0].cam.eye.z;
|
||||
if ((obj80->info.unk_10 - temp_fv0) < (obj80->obj.pos.z + D_ctx_80177D20)) {
|
||||
Object_Kill(&obj80->obj, obj80->sfxSource);
|
||||
}
|
||||
@@ -2566,7 +2566,7 @@ void Object80_Move(Object_80* obj80) {
|
||||
|
||||
void Sprite_Move(Sprite* sprite) {
|
||||
if (D_ctx_80161AB8 != 0) {
|
||||
f32 temp_fv0 = fabsf(sprite->obj.pos.x - gPlayer[0].camEye.x);
|
||||
f32 temp_fv0 = fabsf(sprite->obj.pos.x - gPlayer[0].cam.eye.x);
|
||||
f32 var_fa0 = 500.0f;
|
||||
|
||||
if (((sprite->obj.id == OBJ_SPRITE_FOG_SHADOW) &&
|
||||
@@ -2575,7 +2575,7 @@ void Sprite_Move(Sprite* sprite) {
|
||||
var_fa0 = 1000.0f;
|
||||
}
|
||||
temp_fv0 = ((temp_fv0 - var_fa0) < 0.0f) ? 0.0f * 1.7f : (temp_fv0 - var_fa0) * 1.7f;
|
||||
temp_fv0 -= gPlayer[0].camEye.z;
|
||||
temp_fv0 -= gPlayer[0].cam.eye.z;
|
||||
if ((sprite->info.unk_10 - temp_fv0) < (sprite->obj.pos.z + D_ctx_80177D20)) {
|
||||
sprite->obj.status = OBJ_FREE;
|
||||
}
|
||||
@@ -2587,10 +2587,10 @@ void Effect_Move(Effect* effect) {
|
||||
effect->obj.pos.y += effect->vel.y;
|
||||
effect->obj.pos.z += effect->vel.z;
|
||||
if (D_ctx_80161AB8 != 0) {
|
||||
if ((gPlayer[0].camEye.z + effect->info.unk_10) < (effect->obj.pos.z + D_ctx_80177D20)) {
|
||||
if ((gPlayer[0].cam.eye.z + effect->info.unk_10) < (effect->obj.pos.z + D_ctx_80177D20)) {
|
||||
Object_Kill(&effect->obj, effect->sfxSource);
|
||||
} else if ((fabsf(effect->obj.pos.y - gPlayer[0].camEye.y) > 25000.0f) ||
|
||||
(fabsf(effect->obj.pos.x - gPlayer[0].camEye.x) > 25000.0f)) {
|
||||
} else if ((fabsf(effect->obj.pos.y - gPlayer[0].cam.eye.y) > 25000.0f) ||
|
||||
(fabsf(effect->obj.pos.x - gPlayer[0].cam.eye.x) > 25000.0f)) {
|
||||
Object_Kill(&effect->obj, effect->sfxSource);
|
||||
}
|
||||
}
|
||||
@@ -2598,7 +2598,7 @@ void Effect_Move(Effect* effect) {
|
||||
|
||||
void Item_Move(Item* item) {
|
||||
if (D_ctx_80161AB8 != 0) {
|
||||
f32 temp = (0.0f - gPlayer[0].camEye.z);
|
||||
f32 temp = (0.0f - gPlayer[0].cam.eye.z);
|
||||
|
||||
if ((item->info.unk_10 - temp) < (item->obj.pos.z + D_ctx_80177D20)) {
|
||||
Object_Kill(&item->obj, item->sfxSource);
|
||||
@@ -2811,9 +2811,9 @@ void TexturedLine_Update(TexturedLine* this) {
|
||||
|
||||
if (gGameState == GSTATE_PLAY) {
|
||||
if (((this->mode == 1) || (this->mode == 101) || (this->mode == 50)) &&
|
||||
(gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) && (gPlayer[0].unk_1F4 == 0)) {
|
||||
Matrix_RotateX(gCalcMatrix, -this->unk_1C, 0);
|
||||
Matrix_RotateY(gCalcMatrix, -this->unk_20, 1);
|
||||
(gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (gPlayer[0].unk_1F4 == 0)) {
|
||||
Matrix_RotateX(gCalcMatrix, -this->unk_1C, MTXF_NEW);
|
||||
Matrix_RotateY(gCalcMatrix, -this->unk_20, MTXF_APPLY);
|
||||
sp44.x = gPlayer[gPlayerNum].pos.x - this->unk_04.x;
|
||||
sp44.y = gPlayer[gPlayerNum].pos.y - this->unk_04.y;
|
||||
sp44.z = gPlayer[gPlayerNum].unk_138 - this->unk_04.z;
|
||||
@@ -2866,14 +2866,14 @@ void Object_Update(void) {
|
||||
|
||||
D_ctx_80161AB8 = 0;
|
||||
if ((gLevelMode == LEVELMODE_ON_RAILS) &&
|
||||
((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_1) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) ||
|
||||
(gPlayer[0].state_1C8 == PLAYERSTATE_1C8_4) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_8) ||
|
||||
(gPlayer[0].state_1C8 == PLAYERSTATE_1C8_9) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_6))) {
|
||||
((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_INIT) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) ||
|
||||
(gPlayer[0].state_1C8 == PLAYERSTATE_1C8_DOWN) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ENTER_WARP_ZONE) ||
|
||||
(gPlayer[0].state_1C8 == PLAYERSTATE_1C8_START_360) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_NEXT))) {
|
||||
D_ctx_80161AB8 = 1;
|
||||
}
|
||||
if (gLevelMode != LEVELMODE_ALL_RANGE) {
|
||||
if ((D_ctx_80178488 != 0) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_2)) {
|
||||
func_enmy_80062664();
|
||||
if ((gLoadLevelObjects != 0) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO)) {
|
||||
Object_LoadFromInit();
|
||||
}
|
||||
for (i = 0, obj80 = gObjects80; i < ARRAY_COUNT(gObjects80); i++, obj80++) {
|
||||
if (obj80->obj.status != OBJ_FREE) {
|
||||
|
||||
+100
-97
@@ -109,7 +109,7 @@ void Obj54_Update(Object80_54* this) {
|
||||
|
||||
Texture_Scroll(D_CO_60038F8, 32, 32, 1);
|
||||
if ((gGameFrameCount % 4) == 0) {
|
||||
Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, 0);
|
||||
Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW);
|
||||
|
||||
sp18.x = RAND_FLOAT_CENTERED(700.0f);
|
||||
sp18.y = RAND_FLOAT(50.0f);
|
||||
@@ -135,10 +135,10 @@ void Actor201_Update(Actor201* this) {
|
||||
this->timer_0BC = 20;
|
||||
}
|
||||
sp2C = this->obj.pos.z + D_ctx_80177D20;
|
||||
this->obj.rot.y = Math_RadToDeg(Math_Atan2F(gPlayer[0].camEye.x - this->obj.pos.x, gPlayer[0].camEye.z - sp2C));
|
||||
this->obj.rot.x =
|
||||
-Math_RadToDeg(Math_Atan2F(gPlayer[0].camEye.y - this->obj.pos.y,
|
||||
sqrtf(SQ(gPlayer[0].camEye.z - sp2C) + SQ(gPlayer[0].camEye.x - this->obj.pos.x))));
|
||||
this->obj.rot.y = Math_RadToDeg(Math_Atan2F(gPlayer[0].cam.eye.x - this->obj.pos.x, gPlayer[0].cam.eye.z - sp2C));
|
||||
this->obj.rot.x = -Math_RadToDeg(
|
||||
Math_Atan2F(gPlayer[0].cam.eye.y - this->obj.pos.y,
|
||||
sqrtf(SQ(gPlayer[0].cam.eye.z - sp2C) + SQ(gPlayer[0].cam.eye.x - this->obj.pos.x))));
|
||||
}
|
||||
|
||||
void Actor202_Update(Actor202* this) {
|
||||
@@ -294,15 +294,15 @@ void Actor194_8006B46C(Actor194* this, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f
|
||||
Vec3f sp34 = { 0.0f, 0.0f, 0.0f };
|
||||
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, arg1, arg2, arg3 + D_ctx_80177D20, 1);
|
||||
Matrix_Translate(gGfxMatrix, arg1, arg2, arg3 + D_ctx_80177D20, MTXF_APPLY);
|
||||
|
||||
if (arg7 != 1) {
|
||||
Matrix_RotateY(gGfxMatrix, M_DTOR * arg5, 1);
|
||||
Matrix_RotateX(gGfxMatrix, M_DTOR * arg4, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, M_DTOR * arg6, 1);
|
||||
Matrix_RotateY(gGfxMatrix, M_DTOR * arg5, MTXF_APPLY);
|
||||
Matrix_RotateX(gGfxMatrix, M_DTOR * arg4, MTXF_APPLY);
|
||||
Matrix_RotateZ(gGfxMatrix, M_DTOR * arg6, MTXF_APPLY);
|
||||
}
|
||||
|
||||
Matrix_Scale(gGfxMatrix, arg8, arg8, 1.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, arg8, arg8, 1.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
|
||||
if (arg7 != 1) {
|
||||
@@ -623,7 +623,7 @@ void Actor189_Update(Actor189* this) {
|
||||
case 52:
|
||||
case 53:
|
||||
case 55:
|
||||
if (((this->timer_0BC == 0) || (func_enmy_8006351C(this->index, &this->obj.pos, &D_800D0030, 1) != 0) ||
|
||||
if (((this->timer_0BC == 0) || (Object_CheckCollision(this->index, &this->obj.pos, &D_800D0030, 1) != 0) ||
|
||||
(this->obj.pos.y < (gGroundLevel + 10.0f))) &&
|
||||
(this->timer_0BE == 0)) {
|
||||
func_effect_8007B8F8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 50.0f, this->scale * 10.0f);
|
||||
@@ -634,7 +634,7 @@ void Actor189_Update(Actor189* this) {
|
||||
|
||||
case 56:
|
||||
Math_SmoothStepToF(&this->scale, 0.0f, 0.1f, 2.0f, 0.0001f);
|
||||
if (((this->timer_0BC == 0) || (func_enmy_8006351C(this->index, &this->obj.pos, &D_800D0030, 1) != 0) ||
|
||||
if (((this->timer_0BC == 0) || (Object_CheckCollision(this->index, &this->obj.pos, &D_800D0030, 1) != 0) ||
|
||||
(this->obj.pos.y < (gGroundLevel + 10.0f))) &&
|
||||
(this->timer_0BE == 0)) {
|
||||
func_effect_8007B8F8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 50.0f, this->scale * 10.0f);
|
||||
@@ -655,7 +655,7 @@ void Actor189_Update(Actor189* this) {
|
||||
this->obj.rot.y += this->fwork[1];
|
||||
this->obj.rot.z += this->fwork[2];
|
||||
|
||||
if (((this->timer_0BC == 0) || (func_enmy_8006351C(this->index, &this->obj.pos, &D_800D0030, 1) != 0) ||
|
||||
if (((this->timer_0BC == 0) || (Object_CheckCollision(this->index, &this->obj.pos, &D_800D0030, 1) != 0) ||
|
||||
(this->obj.pos.y < (gGroundLevel + 10.0f))) &&
|
||||
(this->timer_0BE == 0)) {
|
||||
func_effect_8007B8F8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 50.0f, this->scale * 10.0f);
|
||||
@@ -665,7 +665,7 @@ void Actor189_Update(Actor189* this) {
|
||||
break;
|
||||
|
||||
case 54:
|
||||
if (((this->timer_0BC == 0) || (func_enmy_8006351C(this->index, &this->obj.pos, &D_800D0030, 1) != 0) ||
|
||||
if (((this->timer_0BC == 0) || (Object_CheckCollision(this->index, &this->obj.pos, &D_800D0030, 1) != 0) ||
|
||||
(this->obj.pos.y < (gGroundLevel + 10.0f))) &&
|
||||
(this->timer_0BE == 0)) {
|
||||
func_effect_8007B8F8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 70.0f, this->scale * 20.0f);
|
||||
@@ -683,7 +683,7 @@ void Actor189_Update(Actor189* this) {
|
||||
this->obj.rot.x += this->fwork[0];
|
||||
this->obj.rot.y += this->fwork[1];
|
||||
this->obj.rot.z += this->fwork[2];
|
||||
if (func_enmy_8006351C(this->index, &this->obj.pos, &D_tank_800C9F2C, 1) != 0) {
|
||||
if (Object_CheckCollision(this->index, &this->obj.pos, &D_tank_800C9F2C, 1) != 0) {
|
||||
this->vel.x *= -0.7f;
|
||||
}
|
||||
if (this->obj.pos.y < gGroundLevel) {
|
||||
@@ -696,7 +696,7 @@ void Actor189_Update(Actor189* this) {
|
||||
this->obj.rot.y += this->fwork[1];
|
||||
this->obj.rot.z += this->fwork[2];
|
||||
|
||||
if (func_enmy_8006351C(this->index, &this->obj.pos, &D_tank_800C9F2C, 1) != 0) {
|
||||
if (Object_CheckCollision(this->index, &this->obj.pos, &D_tank_800C9F2C, 1) != 0) {
|
||||
this->vel.x *= -0.7f;
|
||||
}
|
||||
|
||||
@@ -731,12 +731,14 @@ void Actor189_Update(Actor189* this) {
|
||||
this->obj.rot.z += this->fwork[12];
|
||||
|
||||
if (this->state == 70) {
|
||||
if ((this->timer_0BC == 0) || (func_enmy_8006351C(this->index, &this->obj.pos, &D_800D0030, 1) != 0) ||
|
||||
if ((this->timer_0BC == 0) ||
|
||||
(Object_CheckCollision(this->index, &this->obj.pos, &D_800D0030, 1) != 0) ||
|
||||
(this->obj.pos.y < (gGroundLevel + 10.0f))) {
|
||||
Object_Kill(&this->obj, this->sfxSource);
|
||||
}
|
||||
} else if (this->state == 39) {
|
||||
if (((this->timer_0BC == 0) || (func_enmy_8006351C(this->index, &this->obj.pos, &D_800D0030, 1) != 0) ||
|
||||
if (((this->timer_0BC == 0) ||
|
||||
(Object_CheckCollision(this->index, &this->obj.pos, &D_800D0030, 1) != 0) ||
|
||||
(this->obj.pos.y < (gGroundLevel + 10.0f))) &&
|
||||
(this->timer_0BE == 0)) {
|
||||
func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 10.0f);
|
||||
@@ -745,7 +747,7 @@ void Actor189_Update(Actor189* this) {
|
||||
}
|
||||
} else if (((this->state >= 41) && (this->state < 45)) || (this->state == 59)) {
|
||||
if (((this->timer_0BC == 0) ||
|
||||
(func_enmy_8006351C(this->index, &this->obj.pos, &D_800D0030, 1) != 0)) &&
|
||||
(Object_CheckCollision(this->index, &this->obj.pos, &D_800D0030, 1) != 0)) &&
|
||||
(this->timer_0BE == 0)) {
|
||||
func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 2.0f * this->scale);
|
||||
Object_Kill(&this->obj, this->sfxSource);
|
||||
@@ -759,7 +761,8 @@ void Actor189_Update(Actor189* this) {
|
||||
if ((this->timer_0BC & 3) == 0) {
|
||||
func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->scale);
|
||||
}
|
||||
if (((this->timer_0BC == 0) || (func_enmy_8006351C(this->index, &this->obj.pos, &D_800D0030, 1) != 0) ||
|
||||
if (((this->timer_0BC == 0) ||
|
||||
(Object_CheckCollision(this->index, &this->obj.pos, &D_800D0030, 1) != 0) ||
|
||||
(this->obj.pos.y < (gGroundLevel + 10.0f))) &&
|
||||
(this->timer_0BE == 0)) {
|
||||
func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->vel.x, this->vel.y,
|
||||
@@ -771,7 +774,7 @@ void Actor189_Update(Actor189* this) {
|
||||
if ((this->state == 3) && ((this->timer_0BC % 8) == 0)) {
|
||||
func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 1.5f);
|
||||
}
|
||||
if ((func_enmy_8006351C(this->index, &this->obj.pos, &D_800D0030, 1) != 0) ||
|
||||
if ((Object_CheckCollision(this->index, &this->obj.pos, &D_800D0030, 1) != 0) ||
|
||||
(this->obj.pos.y < (gGroundLevel + 10.0f))) {
|
||||
if (gLevelType == LEVELTYPE_SPACE) {
|
||||
func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 2.0f);
|
||||
@@ -838,7 +841,7 @@ void func_enmy2_8006D0F4(Actor* actor) {
|
||||
hitboxData = D_edata_800CF964[gObjects80[i].obj.id];
|
||||
count = *hitboxData;
|
||||
if (count != 0) {
|
||||
Matrix_RotateY(gCalcMatrix, -gObjects80[i].obj.rot.y * M_DTOR, 0);
|
||||
Matrix_RotateY(gCalcMatrix, -gObjects80[i].obj.rot.y * M_DTOR, MTXF_NEW);
|
||||
|
||||
spA8.x = actor->obj.pos.x - gObjects80[i].obj.pos.x;
|
||||
spA8.y = actor->obj.pos.y - gObjects80[i].obj.pos.y;
|
||||
@@ -1108,7 +1111,7 @@ void ActorEvent_ProcessScript(ActorEvent* this) {
|
||||
this->unk_0C9 = 1;
|
||||
}
|
||||
|
||||
if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) {
|
||||
if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) {
|
||||
if (this->unk_0B4 == EINFO_86) {
|
||||
Audio_PlayFanfare(SEQ_ID_KATT, 20, 10, 10);
|
||||
}
|
||||
@@ -1255,7 +1258,7 @@ void ActorEvent_ProcessScript(ActorEvent* this) {
|
||||
|
||||
case EV_OPC(EVOP_PLAY_MSG):
|
||||
msg = Message_PtrFromId(actorScript[this->aiIndex + 1]);
|
||||
if ((msg != NULL) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3)) {
|
||||
if ((msg != NULL) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE)) {
|
||||
Radio_PlayMessage(msg, actorScript[this->aiIndex] & 0x1FF);
|
||||
}
|
||||
this->aiIndex += 2;
|
||||
@@ -1742,11 +1745,11 @@ void ActorEvent_8006F254(ActorEvent* this) {
|
||||
Vec3f sp54;
|
||||
Vec3f sp48;
|
||||
|
||||
Matrix_RotateY(gCalcMatrix, this->vwork[29].y * M_DTOR, 0);
|
||||
Matrix_RotateX(gCalcMatrix, this->vwork[29].x * M_DTOR, 1);
|
||||
Matrix_RotateZ(gCalcMatrix, (this->vwork[29].z + this->unk_0F4.z) * M_DTOR, 1);
|
||||
Matrix_RotateY(gCalcMatrix, this->unk_0F4.y * M_DTOR, 1);
|
||||
Matrix_RotateX(gCalcMatrix, this->unk_0F4.x * M_DTOR, 1);
|
||||
Matrix_RotateY(gCalcMatrix, this->vwork[29].y * M_DTOR, MTXF_NEW);
|
||||
Matrix_RotateX(gCalcMatrix, this->vwork[29].x * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateZ(gCalcMatrix, (this->vwork[29].z + this->unk_0F4.z) * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateY(gCalcMatrix, this->unk_0F4.y * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateX(gCalcMatrix, this->unk_0F4.x * M_DTOR, MTXF_APPLY);
|
||||
|
||||
sp54.x = 0.0f;
|
||||
sp54.y = 0.0f;
|
||||
@@ -1764,9 +1767,9 @@ void ActorEvent_ProcessActions(ActorEvent* this) {
|
||||
Vec3f sp6C;
|
||||
Sprite* sprite;
|
||||
|
||||
if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) && (this->unk_0B4 != EINFO_52) && (this->unk_0B4 != EINFO_103) &&
|
||||
(this->unk_0B4 != EINFO_104) && (this->unk_0B4 != EINFO_48) && (this->unk_0B4 != EINFO_49) &&
|
||||
(this->unk_0B4 != EINFO_50)) {
|
||||
if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (this->unk_0B4 != EINFO_52) &&
|
||||
(this->unk_0B4 != EINFO_103) && (this->unk_0B4 != EINFO_104) && (this->unk_0B4 != EINFO_48) &&
|
||||
(this->unk_0B4 != EINFO_49) && (this->unk_0B4 != EINFO_50)) {
|
||||
switch (this->unk_048) {
|
||||
case EVACT_NONE:
|
||||
break;
|
||||
@@ -1808,11 +1811,11 @@ void ActorEvent_ProcessActions(ActorEvent* this) {
|
||||
break;
|
||||
|
||||
case EVACT_5:
|
||||
Matrix_RotateY(gCalcMatrix, this->vwork[29].y * M_DTOR, 0);
|
||||
Matrix_RotateX(gCalcMatrix, this->vwork[29].x * M_DTOR, 1);
|
||||
Matrix_RotateZ(gCalcMatrix, (this->vwork[29].z + this->unk_0F4.z) * M_DTOR, 1);
|
||||
Matrix_RotateY(gCalcMatrix, this->unk_0F4.y * M_DTOR, 1);
|
||||
Matrix_RotateX(gCalcMatrix, this->unk_0F4.x * M_DTOR, 1);
|
||||
Matrix_RotateY(gCalcMatrix, this->vwork[29].y * M_DTOR, MTXF_NEW);
|
||||
Matrix_RotateX(gCalcMatrix, this->vwork[29].x * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateZ(gCalcMatrix, (this->vwork[29].z + this->unk_0F4.z) * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateY(gCalcMatrix, this->unk_0F4.y * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateX(gCalcMatrix, this->unk_0F4.x * M_DTOR, MTXF_APPLY);
|
||||
|
||||
sp78.x = 0.0f;
|
||||
sp78.y = 0.0f;
|
||||
@@ -1908,7 +1911,7 @@ void ActorEvent_ProcessActions(ActorEvent* this) {
|
||||
break;
|
||||
|
||||
case EVACT_17:
|
||||
if (this->obj.pos.z < (gPlayer[0].camEye.z - 600.0f)) {
|
||||
if (this->obj.pos.z < (gPlayer[0].cam.eye.z - 600.0f)) {
|
||||
func_effect_8007F20C(OBJ_EFFECT_353, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z,
|
||||
gEnemyShotSpeed);
|
||||
}
|
||||
@@ -1933,8 +1936,8 @@ void ActorEvent_ProcessActions(ActorEvent* this) {
|
||||
sp54 = Math_RadToDeg(sp54);
|
||||
sp58 = -Math_Atan2F(sp60, sqrtf(SQ(sp64) + SQ(sp5C)));
|
||||
sp58 = Math_RadToDeg(sp58);
|
||||
Matrix_RotateY(gCalcMatrix, M_DTOR * sp54, 0);
|
||||
Matrix_RotateX(gCalcMatrix, M_DTOR * sp58, 1);
|
||||
Matrix_RotateY(gCalcMatrix, M_DTOR * sp54, MTXF_NEW);
|
||||
Matrix_RotateX(gCalcMatrix, M_DTOR * sp58, MTXF_APPLY);
|
||||
sp6C.x = 0.0f;
|
||||
sp6C.y = 0.0f;
|
||||
sp6C.z = 50.0f;
|
||||
@@ -2218,7 +2221,7 @@ void ActorEvent_800701E0(ActorEvent* this) {
|
||||
sp3C.y = this->vel.y;
|
||||
sp3C.z = this->vel.z;
|
||||
|
||||
if ((func_enmy_8006351C(this->index, &this->obj.pos, &sp3C, 0) != 0) ||
|
||||
if ((Object_CheckCollision(this->index, &this->obj.pos, &sp3C, 0) != 0) ||
|
||||
(this->obj.pos.y < (gGroundLevel + 20.0f))) {
|
||||
this->obj.status = OBJ_DYING;
|
||||
this->obj.pos.z -= this->vel.z;
|
||||
@@ -2783,9 +2786,9 @@ void ActorEvent_80071DC0(ActorEvent* this) {
|
||||
s32 rInd;
|
||||
Vec3f sp38;
|
||||
|
||||
Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, 0);
|
||||
Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, 1);
|
||||
Matrix_RotateZ(gCalcMatrix, this->obj.rot.z * M_DTOR, 1);
|
||||
Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW);
|
||||
Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateZ(gCalcMatrix, this->obj.rot.z * M_DTOR, MTXF_APPLY);
|
||||
|
||||
if (this->unk_0B4 == EINFO_30) {
|
||||
rInd = RAND_FLOAT(ARRAY_COUNT(D_800D1074) - 1.1f); // off by 1 error?
|
||||
@@ -2872,7 +2875,7 @@ void ActorEvent_800722EC(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 yRot)
|
||||
Vec3f sp20;
|
||||
|
||||
Effect_Initialize(effect);
|
||||
Matrix_RotateY(gCalcMatrix, M_DTOR * yRot, 0);
|
||||
Matrix_RotateY(gCalcMatrix, M_DTOR * yRot, MTXF_NEW);
|
||||
sp2C.x = 0.0f;
|
||||
sp2C.y = 0.0f;
|
||||
sp2C.z = 20.0f;
|
||||
@@ -2955,7 +2958,7 @@ void ActorEvent_Update(ActorEvent* this) {
|
||||
Vec3f spAC;
|
||||
Vec3f spA0;
|
||||
|
||||
if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7) || (D_ctx_8017828C != 0)) {
|
||||
if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) || (D_ctx_8017828C != 0)) {
|
||||
Object_Kill(&this->obj, this->sfxSource);
|
||||
return;
|
||||
}
|
||||
@@ -3032,14 +3035,14 @@ void ActorEvent_Update(ActorEvent* this) {
|
||||
spE8 = this->obj.pos.z;
|
||||
|
||||
if ((this->unk_0B4 == EINFO_33) || (this->unk_0B4 == EINFO_68)) {
|
||||
Matrix_RotateZ(gCalcMatrix, -(this->vwork[29].z + this->unk_0F4.z) * M_DTOR, 0);
|
||||
Matrix_RotateX(gCalcMatrix, -this->vwork[29].x * M_DTOR, 1);
|
||||
Matrix_RotateY(gCalcMatrix, -this->vwork[29].y * M_DTOR, 1);
|
||||
Matrix_RotateZ(gCalcMatrix, -(this->vwork[29].z + this->unk_0F4.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);
|
||||
|
||||
if ((this->state == EVSTATE_14) || (this->state == EVSTATE_15)) {
|
||||
spB8.x = gPlayer[0].camEye.x - spF0;
|
||||
spB8.y = gPlayer[0].camEye.y - (spEC + 25.0f);
|
||||
spB8.z = (gPlayer[0].camEye.z * 15.0f) - spE8;
|
||||
spB8.x = gPlayer[0].cam.eye.x - spF0;
|
||||
spB8.y = gPlayer[0].cam.eye.y - (spEC + 25.0f);
|
||||
spB8.z = (gPlayer[0].cam.eye.z * 15.0f) - spE8;
|
||||
} else {
|
||||
spB8.x = gPlayer[0].pos.x - spF0;
|
||||
spB8.y = gPlayer[0].pos.y - (spEC + 25.0f);
|
||||
@@ -3068,17 +3071,17 @@ void ActorEvent_Update(ActorEvent* this) {
|
||||
Math_SmoothStepToAngle(&this->fwork[15], spE4, 0.2f, this->fwork[24], 0.001f);
|
||||
|
||||
if (((this->timer_0BC % 32) == 0) && (spFC == 0)) {
|
||||
Matrix_RotateY(gCalcMatrix, this->vwork[29].y * M_DTOR, 0);
|
||||
Matrix_RotateX(gCalcMatrix, this->vwork[29].x * M_DTOR, 1);
|
||||
Matrix_RotateZ(gCalcMatrix, (this->vwork[29].z + this->unk_0F4.z) * M_DTOR, 1);
|
||||
Matrix_RotateY(gCalcMatrix, this->vwork[29].y * M_DTOR, MTXF_NEW);
|
||||
Matrix_RotateX(gCalcMatrix, this->vwork[29].x * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateZ(gCalcMatrix, (this->vwork[29].z + this->unk_0F4.z) * M_DTOR, MTXF_APPLY);
|
||||
|
||||
spB8.x = 0.0f;
|
||||
spB8.y = 25.0f;
|
||||
spB8.z = 0.0f;
|
||||
|
||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &spB8, &spA0);
|
||||
Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, 1);
|
||||
Matrix_RotateX(gCalcMatrix, this->fwork[15] * M_DTOR, 1);
|
||||
Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateX(gCalcMatrix, this->fwork[15] * M_DTOR, MTXF_APPLY);
|
||||
|
||||
spB8.x = 0.0f;
|
||||
spB8.y = 0.0f;
|
||||
@@ -3101,9 +3104,9 @@ void ActorEvent_Update(ActorEvent* this) {
|
||||
}
|
||||
} else {
|
||||
if ((this->state == EVSTATE_14) || (this->state == EVSTATE_15)) {
|
||||
spCC = gPlayer[0].camEye.x;
|
||||
spC8 = gPlayer[0].camEye.y;
|
||||
spC4 = gPlayer[0].camEye.z;
|
||||
spCC = gPlayer[0].cam.eye.x;
|
||||
spC8 = gPlayer[0].cam.eye.y;
|
||||
spC4 = gPlayer[0].cam.eye.z;
|
||||
} else {
|
||||
spCC = gPlayer[0].pos.x;
|
||||
spC8 = gPlayer[0].pos.y;
|
||||
@@ -3256,9 +3259,9 @@ void ActorEvent_Update(ActorEvent* this) {
|
||||
if (gActors[this->iwork[9]].obj.status != OBJ_ACTIVE) {
|
||||
this->iwork[13] = 0;
|
||||
} else {
|
||||
Matrix_RotateY(gCalcMatrix, gActors[this->iwork[9]].obj.rot.y * M_DTOR, 0);
|
||||
Matrix_RotateX(gCalcMatrix, gActors[this->iwork[9]].obj.rot.x * M_DTOR, 1);
|
||||
Matrix_RotateZ(gCalcMatrix, gActors[this->iwork[9]].obj.rot.z * M_DTOR, 1);
|
||||
Matrix_RotateY(gCalcMatrix, gActors[this->iwork[9]].obj.rot.y * M_DTOR, MTXF_NEW);
|
||||
Matrix_RotateX(gCalcMatrix, gActors[this->iwork[9]].obj.rot.x * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateZ(gCalcMatrix, gActors[this->iwork[9]].obj.rot.z * M_DTOR, MTXF_APPLY);
|
||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &this->vwork[28], &spAC);
|
||||
this->obj.pos.x = gActors[this->iwork[9]].obj.pos.x + spAC.x;
|
||||
this->obj.pos.y = gActors[this->iwork[9]].obj.pos.y + spAC.y;
|
||||
@@ -3340,9 +3343,9 @@ void ActorEvent_Update(ActorEvent* this) {
|
||||
}
|
||||
|
||||
Math_SmoothStepToAngle(&this->obj.rot.z, this->fwork[23], 0.2f, 100.0f, 0.0001f);
|
||||
Matrix_RotateZ(gCalcMatrix, (this->vwork[29].z + this->unk_0F4.z) * M_DTOR, 0);
|
||||
Matrix_RotateY(gCalcMatrix, this->unk_0F4.y * M_DTOR, 1);
|
||||
Matrix_RotateX(gCalcMatrix, this->unk_0F4.x * M_DTOR, 1);
|
||||
Matrix_RotateZ(gCalcMatrix, (this->vwork[29].z + this->unk_0F4.z) * M_DTOR, MTXF_NEW);
|
||||
Matrix_RotateY(gCalcMatrix, this->unk_0F4.y * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateX(gCalcMatrix, this->unk_0F4.x * M_DTOR, MTXF_APPLY);
|
||||
|
||||
spB8.x = 0.0f;
|
||||
spB8.y = 0.0f;
|
||||
@@ -3368,7 +3371,7 @@ void ActorEvent_Update(ActorEvent* this) {
|
||||
this->vel.z -= D_ctx_80177D08;
|
||||
}
|
||||
|
||||
if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_8) {
|
||||
if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ENTER_WARP_ZONE) {
|
||||
this->vel.z = 100.0f;
|
||||
}
|
||||
|
||||
@@ -3522,7 +3525,7 @@ void ActorEvent_Update(ActorEvent* this) {
|
||||
break;
|
||||
|
||||
case 0:
|
||||
Matrix_RotateZ(gCalcMatrix, this->unk_0F4.z * M_DTOR, 0);
|
||||
Matrix_RotateZ(gCalcMatrix, this->unk_0F4.z * M_DTOR, MTXF_NEW);
|
||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &D_800D1290, &sp90);
|
||||
|
||||
if ((this->obj.pos.y + sp90.y) > -30.0f) {
|
||||
@@ -3543,7 +3546,7 @@ void ActorEvent_Update(ActorEvent* this) {
|
||||
sp84.z = 0.0f;
|
||||
effect->unk_44 = 10;
|
||||
effect->scale2 = 1.0f;
|
||||
Matrix_RotateY(gCalcMatrix, (RAND_FLOAT(180.0f) + 180.0f) * M_DTOR, 0);
|
||||
Matrix_RotateY(gCalcMatrix, (RAND_FLOAT(180.0f) + 180.0f) * M_DTOR, MTXF_NEW);
|
||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp84, &sp78);
|
||||
effect->vel.x = sp78.x;
|
||||
effect->vel.y = sp78.y;
|
||||
@@ -3561,7 +3564,7 @@ void ActorEvent_Update(ActorEvent* this) {
|
||||
if ((fabsf(this->fwork[0]) > 10.0f) && ((gGameFrameCount % 2) == 0)) {
|
||||
effect = func_effect_8007783C(OBJ_EFFECT_394);
|
||||
if (effect != NULL) {
|
||||
Matrix_RotateZ(gCalcMatrix, this->unk_0F4.z * M_DTOR, 0);
|
||||
Matrix_RotateZ(gCalcMatrix, this->unk_0F4.z * M_DTOR, MTXF_NEW);
|
||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &D_800D1290, &sp90);
|
||||
|
||||
effect->unk_78 = effect->unk_7A = 11;
|
||||
@@ -3736,11 +3739,11 @@ bool ActorEvent_OverrideLimbDraw2(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f*
|
||||
var_s1 = 1.0f / 70.925f;
|
||||
}
|
||||
|
||||
Matrix_Translate(gCalcMatrix, pos->x, pos->y, pos->z, 1);
|
||||
Matrix_RotateZ(gCalcMatrix, rot->z * M_DTOR, 1);
|
||||
Matrix_RotateY(gCalcMatrix, rot->y * M_DTOR, 1);
|
||||
Matrix_RotateX(gCalcMatrix, rot->x * M_DTOR, 1);
|
||||
Matrix_Mult(gGfxMatrix, gCalcMatrix, 1);
|
||||
Matrix_Translate(gCalcMatrix, pos->x, pos->y, pos->z, MTXF_APPLY);
|
||||
Matrix_RotateZ(gCalcMatrix, rot->z * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateY(gCalcMatrix, rot->y * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateX(gCalcMatrix, rot->x * M_DTOR, MTXF_APPLY);
|
||||
Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
|
||||
if (*dList != NULL) {
|
||||
@@ -3800,9 +3803,9 @@ void ActorEvent_Draw(ActorEvent* this) {
|
||||
(this->unk_0B4 != EINFO_13) && (this->unk_0B4 != EINFO_72) && (this->unk_0B4 != EINFO_28) &&
|
||||
(this->scale > 0.5f)) {
|
||||
sp40 = SIN_DEG(this->timer_0C6 * 400.0f) * this->timer_0C6;
|
||||
Matrix_RotateY(gGfxMatrix, M_DTOR * sp40, 1);
|
||||
Matrix_RotateX(gGfxMatrix, M_DTOR * sp40, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, M_DTOR * sp40, 1);
|
||||
Matrix_RotateY(gGfxMatrix, M_DTOR * sp40, MTXF_APPLY);
|
||||
Matrix_RotateX(gGfxMatrix, M_DTOR * sp40, MTXF_APPLY);
|
||||
Matrix_RotateZ(gGfxMatrix, M_DTOR * sp40, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
}
|
||||
}
|
||||
@@ -3901,7 +3904,7 @@ void ActorEvent_Draw(ActorEvent* this) {
|
||||
break;
|
||||
|
||||
case EINFO_9:
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, -30.0f, 0.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, -30.0f, 0.0f, MTXF_APPLY);
|
||||
Animation_GetFrameData(&D_ENMY_PLANET_40001A4, this->unk_0B6, sp114);
|
||||
Animation_DrawSkeleton(1, D_ENMY_PLANET_4000270, sp114, NULL, NULL, this, &gIdentityMatrix);
|
||||
break;
|
||||
@@ -3909,8 +3912,8 @@ void ActorEvent_Draw(ActorEvent* this) {
|
||||
case EINFO_18:
|
||||
if (this->fwork[0] > 0.1f) {
|
||||
this->iwork[11] = 1;
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -30.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 2.5f, 2.5f, 2.5f, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -30.0f, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, 2.5f, 2.5f, 2.5f, MTXF_APPLY);
|
||||
func_edisplay_8005B1E8(this, 2);
|
||||
}
|
||||
break;
|
||||
@@ -3918,8 +3921,8 @@ void ActorEvent_Draw(ActorEvent* this) {
|
||||
case EINFO_19:
|
||||
if (this->fwork[0] > 0.1f) {
|
||||
this->iwork[11] = 1;
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -30.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 2.5f, 2.5f, 2.5f, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -30.0f, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, 2.5f, 2.5f, 2.5f, MTXF_APPLY);
|
||||
func_edisplay_8005B1E8(this, 2);
|
||||
}
|
||||
break;
|
||||
@@ -3933,7 +3936,7 @@ void ActorEvent_Draw(ActorEvent* this) {
|
||||
gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK);
|
||||
gSPDisplayList(gMasterDisp++, D_A6_6018BF0);
|
||||
gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -30.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -30.0f, MTXF_APPLY);
|
||||
this->iwork[11] = 1;
|
||||
func_edisplay_8005B1E8(this, 2);
|
||||
break;
|
||||
@@ -3942,7 +3945,7 @@ void ActorEvent_Draw(ActorEvent* this) {
|
||||
gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK);
|
||||
gSPDisplayList(gMasterDisp++, D_A6_6019730);
|
||||
gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -30.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -30.0f, MTXF_APPLY);
|
||||
this->iwork[11] = 1;
|
||||
func_edisplay_8005B1E8(this, 2);
|
||||
break;
|
||||
@@ -3964,15 +3967,15 @@ void ActorEvent_Draw(ActorEvent* this) {
|
||||
break;
|
||||
|
||||
case EINFO_31:
|
||||
Matrix_RotateX(gGfxMatrix, M_PI / 2, 1);
|
||||
Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_A6_600E0C0);
|
||||
break;
|
||||
|
||||
case EINFO_33:
|
||||
Animation_GetFrameData(&D_ENMY_SPACE_400A30C, this->unk_0B6, sp114);
|
||||
Matrix_RotateY(gGfxMatrix, M_PI, 1);
|
||||
Matrix_Scale(gGfxMatrix, 1.5f, 1.5f, 1.5f, 1);
|
||||
Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, 1.5f, 1.5f, 1.5f, MTXF_APPLY);
|
||||
Animation_DrawSkeleton(1, D_ENMY_SPACE_400A398, sp114, ActorEvent_OverrideLimbDraw1, NULL, this,
|
||||
&gIdentityMatrix);
|
||||
Math_SmoothStepToF(&this->fwork[16], 0.0f, 0.3f, 2.0f, 0.0001f);
|
||||
@@ -3998,22 +4001,22 @@ void ActorEvent_Draw(ActorEvent* this) {
|
||||
Animation_GetFrameData(&D_ZO_601F874, this->unk_0B6, sp114);
|
||||
sp114[2].z -= this->fwork[15];
|
||||
gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK);
|
||||
Matrix_Scale(gGfxMatrix, 2.6f, 2.6f, 2.6f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 2.6f, 2.6f, 2.6f, MTXF_APPLY);
|
||||
Animation_DrawSkeleton(1, D_ZO_601F920, sp114, NULL, NULL, this, &gIdentityMatrix);
|
||||
gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK);
|
||||
break;
|
||||
|
||||
case EINFO_64:
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_RotateX(gGfxMatrix, this->unk_0F4.x * M_DTOR, 1);
|
||||
Matrix_RotateY(gGfxMatrix, this->unk_0F4.y * M_DTOR, 1);
|
||||
Matrix_RotateX(gGfxMatrix, this->unk_0F4.x * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateY(gGfxMatrix, this->unk_0F4.y * M_DTOR, MTXF_APPLY);
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, this->fwork[15], 0.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, this->fwork[15], 0.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_ME_600CAA0);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
gSPDisplayList(gMasterDisp++, D_ME_600C130);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, -this->fwork[15], 0.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, -this->fwork[15], 0.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_ME_600C740);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
@@ -4037,14 +4040,14 @@ void ActorEvent_Draw(ActorEvent* this) {
|
||||
break;
|
||||
|
||||
case EINFO_80:
|
||||
Matrix_Scale(gGfxMatrix, 0.6f, 0.6f, 0.6f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 0.6f, 0.6f, 0.6f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_VE1_9011200);
|
||||
break;
|
||||
|
||||
case EINFO_81:
|
||||
if (this->fwork[15] > 0.001f) {
|
||||
Matrix_Scale(gGfxMatrix, this->fwork[15], this->fwork[15], this->fwork[15], 1);
|
||||
Matrix_Scale(gGfxMatrix, this->fwork[15], this->fwork[15], this->fwork[15], MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
Texture_BlendRGBA16(this->fwork[16], 16 * 11, D_VE1_9003890, D_VE1_9003DF0, D_VE1_9003330);
|
||||
gSPDisplayList(gMasterDisp++, D_VE1_9002CF0);
|
||||
@@ -4058,7 +4061,7 @@ void ActorEvent_Draw(ActorEvent* this) {
|
||||
break;
|
||||
|
||||
case EINFO_83:
|
||||
Matrix_Scale(gGfxMatrix, 3.0f, 3.0f, 3.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 3.0f, 3.0f, 3.0f, MTXF_APPLY);
|
||||
Animation_GetFrameData(&D_AQ_602201C, this->unk_0B6, sp114);
|
||||
Animation_DrawSkeleton(1, D_AQ_60220E8, sp114, NULL, NULL, this, &gIdentityMatrix);
|
||||
break;
|
||||
@@ -4211,7 +4214,7 @@ void func_enmy2_800763A4(Actor* actor) {
|
||||
sp4C.y = actor->vel.y;
|
||||
sp4C.z = actor->vel.z;
|
||||
|
||||
sp60 = func_enmy_8006351C(actor->index, &actor->obj.pos, &sp4C, 0);
|
||||
sp60 = Object_CheckCollision(actor->index, &actor->obj.pos, &sp4C, 0);
|
||||
|
||||
if ((sp60 != 0) || (actor->obj.pos.y < (gGroundLevel + 30.0f))) {
|
||||
if ((Rand_ZeroOne() < 0.5f) && (actor->timer_04C < 3) && (gLevelType == LEVELTYPE_PLANET) &&
|
||||
|
||||
@@ -15,12 +15,12 @@ void func_fade_80084488(s32 arg0) {
|
||||
|
||||
RCP_SetupDL_12();
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -150.0f, 0);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -150.0f, MTXF_NEW);
|
||||
for (var_s1 = 0; var_s1 < MIN(360, arg0 * 15); var_s1 += 15) {
|
||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, MIN((arg0 - (var_s1 / 15)) * 15, 255));
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_RotateZ(gGfxMatrix, var_s1 * M_DTOR, 1);
|
||||
Matrix_Scale(gGfxMatrix, 0.53f, 1.0f, 1.0f, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, var_s1 * M_DTOR, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, 0.53f, 1.0f, 1.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_Gfx_800D9688);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
|
||||
+10
-11
@@ -7,7 +7,7 @@ f32 D_game_80161A10;
|
||||
f32 D_game_80161A14;
|
||||
s32 gPlayerInactive[4];
|
||||
s32 D_game_80161A28;
|
||||
u8 D_game_80161A2C;
|
||||
u8 gShowHud;
|
||||
u16 gNextLevelStage;
|
||||
u16 gNextLevel;
|
||||
u16 gNextGameState;
|
||||
@@ -253,15 +253,15 @@ void Game_Draw(s32 playerNum) {
|
||||
break;
|
||||
case DRAW_TITLE:
|
||||
func_bg_8003DAF0();
|
||||
OvlMenu_CallFunction(104, NULL);
|
||||
OvlMenu_CallFunction(OVLCALL_TITLE_DRAW, NULL);
|
||||
break;
|
||||
case DRAW_OPTION:
|
||||
func_bg_8003DAF0();
|
||||
OvlMenu_CallFunction(108, NULL);
|
||||
OvlMenu_CallFunction(OVLCALL_OPTION_DRAW, NULL);
|
||||
break;
|
||||
case DRAW_MAP:
|
||||
func_bg_8003DAF0();
|
||||
OvlMenu_CallFunction(106, NULL);
|
||||
OvlMenu_CallFunction(OVLCALL_MAP_DRAW, NULL);
|
||||
break;
|
||||
case DRAW_PLAY:
|
||||
gPlayerNum = playerNum;
|
||||
@@ -269,7 +269,7 @@ void Game_Draw(s32 playerNum) {
|
||||
break;
|
||||
case DRAW_UNK_MAP:
|
||||
func_bg_8003DAF0();
|
||||
OvlMenu_CallFunction(110, NULL);
|
||||
OvlMenu_CallFunction(OVLCALL_UNKMAP_DRAW, NULL);
|
||||
break;
|
||||
case DRAW_UNK_VS:
|
||||
func_versus_800C2190();
|
||||
@@ -392,8 +392,7 @@ void Game_Update(void) {
|
||||
D_ctx_80177D20 = 0.0f;
|
||||
D_hud_8016170C = gCsFrameCount = D_ctx_80177830 = gLevelStatusScreenTimer = gLevelClearScreenTimer =
|
||||
D_versus_80178754 = gVersusMode = D_ctx_80177AE0 = D_ctx_80178410 = D_ctx_80177B40 = gPlayState =
|
||||
gOptionMenuStatus = gDrawMode = gShowBossHealth = D_game_80161A2C = gBgColor =
|
||||
gFillScreenAlpha = 0;
|
||||
gOptionMenuStatus = gDrawMode = gShowBossHealth = gShowHud = gBgColor = gFillScreenAlpha = 0;
|
||||
gNextGameState = D_ctx_80177C94 = D_ctx_80177CAC = D_ctx_80177CB4 = D_ctx_80177CBC = D_ctx_80177CC4 =
|
||||
D_ctx_80177C9C = D_ctx_80177CA4 = D_play_80161A5C = D_game_80161A34 = 0;
|
||||
for (i = 0; i < 4; i++) {
|
||||
@@ -450,10 +449,10 @@ void Game_Update(void) {
|
||||
func_8001D8A8(2, gVolumeSettings[2]);
|
||||
break;
|
||||
case GSTATE_TITLE:
|
||||
OvlMenu_CallFunction(103, NULL);
|
||||
OvlMenu_CallFunction(OVLCALL_TITLE_UPDATE, NULL);
|
||||
break;
|
||||
case GSTATE_MENU:
|
||||
OvlMenu_CallFunction(107, NULL);
|
||||
OvlMenu_CallFunction(OVLCALL_OPTION_UPDATE, NULL);
|
||||
break;
|
||||
case GSTATE_MAP:
|
||||
Map_8019E8D0();
|
||||
@@ -465,7 +464,7 @@ void Game_Update(void) {
|
||||
Play_Main();
|
||||
break;
|
||||
case GSTATE_GAME_OVER:
|
||||
OvlMenu_CallFunction(109, NULL);
|
||||
OvlMenu_CallFunction(OVLCALL_GAME_OVER_UPDATE, NULL);
|
||||
break;
|
||||
case GSTATE_ENDING:
|
||||
gDrawMode = DRAW_ENDING;
|
||||
@@ -520,7 +519,7 @@ void Game_Update(void) {
|
||||
gPlayerFillScreenGreens[0], gPlayerFillScreenBlues[0], gPlayerFillScreenAlphas[0]);
|
||||
if ((gDrawMode == DRAW_PLAY) || (gDrawMode == DRAW_ENDING)) {
|
||||
func_radio_800BB5D0();
|
||||
if (D_game_80161A2C != 0) {
|
||||
if (gShowHud != 0) {
|
||||
func_hud_8008FA84();
|
||||
func_hud_8008CA44();
|
||||
}
|
||||
|
||||
+202
-199
@@ -198,15 +198,15 @@ void func_hud_80084B94(s32 arg0) {
|
||||
RCP_SetupDL(&gMasterDisp, 0x24);
|
||||
if (arg0 == 0) {
|
||||
for (i = 1; i < 4; i++) {
|
||||
if (((gTeamShields[i] != 0) || (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_7)) && (gTeamShields[i] <= 0) &&
|
||||
(gTeamShields[i] != -2)) {
|
||||
if (((gTeamShields[i] != 0) || (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE)) &&
|
||||
(gTeamShields[i] <= 0) && (gTeamShields[i] != -2)) {
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, D_800D1A70[i - 1].x, D_800D1A70[i - 1].y, D_800D1A70[i - 1].z, 1);
|
||||
Matrix_Scale(gGfxMatrix, 0.68f, 0.68f, 1.0f, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, M_PI / 4, 1);
|
||||
Matrix_Translate(gGfxMatrix, D_800D1A70[i - 1].x, D_800D1A70[i - 1].y, D_800D1A70[i - 1].z, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, 0.68f, 0.68f, 1.0f, MTXF_APPLY);
|
||||
Matrix_RotateZ(gGfxMatrix, M_PI / 4, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_500B600);
|
||||
Matrix_RotateZ(gGfxMatrix, 3 * M_PI / 2, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, 3 * M_PI / 2, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_500B600);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
@@ -214,12 +214,12 @@ void func_hud_80084B94(s32 arg0) {
|
||||
}
|
||||
} else {
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, -234.0f, -167.0f, -600.0f, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, M_PI / 4, 1);
|
||||
Matrix_Scale(gGfxMatrix, 0.68f, 0.68f, 1.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, -234.0f, -167.0f, -600.0f, MTXF_APPLY);
|
||||
Matrix_RotateZ(gGfxMatrix, M_PI / 4, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, 0.68f, 0.68f, 1.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_500B600);
|
||||
Matrix_RotateZ(gGfxMatrix, 3 * M_PI / 2, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, 3 * M_PI / 2, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_500B600);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
@@ -366,8 +366,8 @@ void func_hud_80085944(void) {
|
||||
scale += 0.06f;
|
||||
}
|
||||
|
||||
Matrix_Translate(gGfxMatrix, x, y, -100.0f, 0);
|
||||
Matrix_Scale(gGfxMatrix, scale, scale, scale, 1);
|
||||
Matrix_Translate(gGfxMatrix, x, y, -100.0f, MTXF_NEW);
|
||||
Matrix_Scale(gGfxMatrix, scale, scale, scale, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gDPSetPrimColor(gMasterDisp++, 0, 0, 180, 180, 0, 50);
|
||||
gSPDisplayList(gMasterDisp++, D_1012110);
|
||||
@@ -387,9 +387,9 @@ void func_hud_80085944(void) {
|
||||
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255);
|
||||
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, D_800D1AC4[i + 1], D_800D1AD8[i + 1], -100.0f, 0);
|
||||
Matrix_RotateZ(gGfxMatrix, M_DTOR * D_801618B0[0], 1);
|
||||
Matrix_Scale(gGfxMatrix, D_801618B0[i + 2], D_801618B0[i + 2], D_801618B0[i + 2], 1);
|
||||
Matrix_Translate(gGfxMatrix, D_800D1AC4[i + 1], D_800D1AD8[i + 1], -100.0f, MTXF_NEW);
|
||||
Matrix_RotateZ(gGfxMatrix, M_DTOR * D_801618B0[0], MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, D_801618B0[i + 2], D_801618B0[i + 2], D_801618B0[i + 2], MTXF_APPLY);
|
||||
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_101C2E0);
|
||||
@@ -415,8 +415,8 @@ void func_hud_80085944(void) {
|
||||
scale += 0.06f;
|
||||
}
|
||||
|
||||
Matrix_Translate(gGfxMatrix, x, y, -100.0f, 0);
|
||||
Matrix_Scale(gGfxMatrix, scale, scale, scale, 1);
|
||||
Matrix_Translate(gGfxMatrix, x, y, -100.0f, MTXF_NEW);
|
||||
Matrix_Scale(gGfxMatrix, scale, scale, scale, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
|
||||
if (D_80161860[i + 1] == 2) {
|
||||
@@ -468,7 +468,7 @@ void func_hud_80086110(f32 arg0, f32 arg1, s32 arg2) {
|
||||
((gPlayState == PLAY_PAUSE) || (D_ctx_80177830 == 1) || (gLevelStatusScreenTimer != 0))) {
|
||||
RCP_SetupDL(&gMasterDisp, 0x4C);
|
||||
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255);
|
||||
if ((arg2 == 0) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7)) {
|
||||
if ((arg2 == 0) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) {
|
||||
Graphics_DisplaySmallText(arg0 + (8.0f * temp) + 4.0f, arg1 + 2.0f, 1.0f, 1.0f, " OK ");
|
||||
} else {
|
||||
Graphics_DisplaySmallText(arg0 + (8.0f * temp) + 4.0f, arg1 + 2.0f, 1.0f, 1.0f, "DOWN");
|
||||
@@ -1371,8 +1371,8 @@ void func_hud_80088784(s32 arg0) {
|
||||
RCP_SetupDL(&gMasterDisp, 0x24);
|
||||
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, D_800D1DC8[arg0]);
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, 3.9f, -3.3f, -100.0f, 0);
|
||||
Matrix_Scale(gGfxMatrix, 0.37f, 0.37f, 0.37f, 1);
|
||||
Matrix_Translate(gGfxMatrix, 3.9f, -3.3f, -100.0f, MTXF_NEW);
|
||||
Matrix_Scale(gGfxMatrix, 0.37f, 0.37f, 0.37f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
|
||||
if (gLevelType == LEVELTYPE_PLANET) {
|
||||
@@ -1448,7 +1448,7 @@ void func_hud_80088970(void) {
|
||||
break;
|
||||
|
||||
case 2:
|
||||
gPlayer[0].state_1C8 = PLAYERSTATE_1C8_0;
|
||||
gPlayer[0].state_1C8 = PLAYERSTATE_1C8_STANDBY;
|
||||
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0;
|
||||
gFillScreenAlphaTarget = 255;
|
||||
gFillScreenAlphaStep = 32;
|
||||
@@ -1567,7 +1567,7 @@ void func_hud_80088970(void) {
|
||||
gSavedHitCount = D_ctx_80177CA0 = 0;
|
||||
|
||||
func_8001CA24(0);
|
||||
gPlayer[0].state_1C8 = PLAYERSTATE_1C8_6;
|
||||
gPlayer[0].state_1C8 = PLAYERSTATE_1C8_NEXT;
|
||||
gScreenFlashTimer = 0;
|
||||
gPlayer[0].timer_1F8 = 0;
|
||||
gFillScreenAlpha = gFillScreenAlphaTarget = 255;
|
||||
@@ -1711,7 +1711,7 @@ void func_hud_80088970(void) {
|
||||
void func_hud_80089670(void) {
|
||||
RCP_SetupDL(&gMasterDisp, 0x3E);
|
||||
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255);
|
||||
Matrix_Scale(gGfxMatrix, 18.64f, 21.04f, 1.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 18.64f, 21.04f, 1.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_1024AC0);
|
||||
}
|
||||
@@ -1719,7 +1719,7 @@ void func_hud_80089670(void) {
|
||||
void func_hud_80089710(void) {
|
||||
RCP_SetupDL(&gMasterDisp, 0x3E);
|
||||
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255);
|
||||
Matrix_Scale(gGfxMatrix, 11.0f, 11.0f, 1.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 11.0f, 11.0f, 1.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_1024AC0);
|
||||
}
|
||||
@@ -1727,7 +1727,7 @@ void func_hud_80089710(void) {
|
||||
void func_hud_800897B0(void) {
|
||||
RCP_SetupDL(&gMasterDisp, 0x3E);
|
||||
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255);
|
||||
Matrix_Scale(gGfxMatrix, 130.0f, 130.0f, 1.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 130.0f, 130.0f, 1.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_1024830);
|
||||
}
|
||||
@@ -1735,7 +1735,7 @@ void func_hud_800897B0(void) {
|
||||
void func_hud_80089850(void) {
|
||||
RCP_SetupDL(&gMasterDisp, 0x3E);
|
||||
gDPSetPrimColor(gMasterDisp++, 0, 0, 0, 0, 0, 255);
|
||||
Matrix_Scale(gGfxMatrix, 125.0f, 125.0f, 1.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 125.0f, 125.0f, 1.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_102A8A0);
|
||||
}
|
||||
@@ -1743,7 +1743,7 @@ void func_hud_80089850(void) {
|
||||
void func_hud_800898F0(void) {
|
||||
RCP_SetupDL(&gMasterDisp, 1);
|
||||
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 208, 80, 255);
|
||||
Matrix_Scale(gGfxMatrix, 30.0f, 30.0f, 1.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 30.0f, 30.0f, 1.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_SZ_6004570);
|
||||
}
|
||||
@@ -1769,7 +1769,7 @@ void func_hud_80089994(s32 arg0) {
|
||||
RCP_SetupDL(&gMasterDisp, 0x3E);
|
||||
gDPSetPrimColor(gMasterDisp++, 0, 0, D_800D1E14[arg0][0], D_800D1E14[arg0][1], D_800D1E14[arg0][2],
|
||||
D_800D1E14[arg0][3]);
|
||||
Matrix_Scale(gGfxMatrix, var_fv1, var_fv2, 1.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, var_fv1, var_fv2, 1.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_1015510);
|
||||
}
|
||||
@@ -1777,7 +1777,7 @@ void func_hud_80089994(s32 arg0) {
|
||||
void func_hud_80089AF4(void) {
|
||||
RCP_SetupDL(&gMasterDisp, 0x3E);
|
||||
gDPSetPrimColor(gMasterDisp++, 0, 0, 0, 0, 0, 255);
|
||||
Matrix_Scale(gGfxMatrix, 54.0f, 54.0f, 1.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 54.0f, 54.0f, 1.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_STAR_WOLF_F014180);
|
||||
}
|
||||
@@ -1785,7 +1785,7 @@ void func_hud_80089AF4(void) {
|
||||
void func_hud_80089B94(void) {
|
||||
RCP_SetupDL(&gMasterDisp, 0x3E);
|
||||
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 92, 92, 255);
|
||||
Matrix_Scale(gGfxMatrix, 54.0f, 54.0f, 1.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 54.0f, 54.0f, 1.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_D0098B0);
|
||||
}
|
||||
@@ -1803,7 +1803,7 @@ void func_hud_80089C38(void) {
|
||||
|
||||
alpha *= 255.0f / 10.0f;
|
||||
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, alpha);
|
||||
Matrix_Scale(gGfxMatrix, 15.0f, 15.0f, 1.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 15.0f, 15.0f, 1.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_1024230);
|
||||
}
|
||||
@@ -1829,8 +1829,8 @@ void func_hud_80089D28(void) {
|
||||
}
|
||||
|
||||
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, gb, gb, 255);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, -185.92001f, 0, 1);
|
||||
Matrix_Scale(gGfxMatrix, 3.55f, 0.13f, 1.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, -185.92001f, 0, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, 3.55f, 0.13f, 1.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_1024230);
|
||||
}
|
||||
@@ -1853,7 +1853,7 @@ void RadarMark_Draw(s32 arg0) {
|
||||
var_a1 = 1;
|
||||
}
|
||||
|
||||
if (gPlayer[arg0].state_1C8 == PLAYERSTATE_1C8_13) {
|
||||
if (gPlayer[arg0].state_1C8 == PLAYERSTATE_1C8_VS_STANDBY) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1949,11 +1949,11 @@ void func_hud_8008A240(void) {
|
||||
Item* item;
|
||||
|
||||
for (i = 0; i < gCamCount; i++) {
|
||||
if (gPlayer[i].state_1C8 == PLAYERSTATE_1C8_6) {
|
||||
if (gPlayer[i].state_1C8 == PLAYERSTATE_1C8_NEXT) {
|
||||
continue;
|
||||
}
|
||||
gRadarMarks[i].unk_00 = 1;
|
||||
gRadarMarks[i].unk_02 = i;
|
||||
gRadarMarks[i].status = 1;
|
||||
gRadarMarks[i].type = i;
|
||||
gRadarMarks[i].unk_10 = gPlayer[i].unk_114 + gPlayer[i].unk_0E8;
|
||||
gRadarMarks[i].pos.z = gPlayer[i].unk_138;
|
||||
gRadarMarks[i].pos.x = gPlayer[i].pos.x;
|
||||
@@ -1966,7 +1966,7 @@ void func_hud_8008A240(void) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (gPlayer[i].state_1C8 != PLAYERSTATE_1C8_3) {
|
||||
if (gPlayer[i].state_1C8 != PLAYERSTATE_1C8_ACTIVE) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1975,15 +1975,15 @@ void func_hud_8008A240(void) {
|
||||
}
|
||||
|
||||
if ((gGameFrameCount % 64) != 0) {
|
||||
gRadarMarks[i].unk_02 = 999;
|
||||
gRadarMarks[i].type = 999;
|
||||
}
|
||||
}
|
||||
|
||||
if (gVersusMode == 1) {
|
||||
for (i = 0, item = gItems; i < 20; i++, item++) {
|
||||
if (item->obj.status >= OBJ_ACTIVE) {
|
||||
gRadarMarks[item->index + 50].unk_00 = 1;
|
||||
gRadarMarks[item->index + 50].unk_02 = 103;
|
||||
gRadarMarks[item->index + 50].status = 1;
|
||||
gRadarMarks[item->index + 50].type = 103;
|
||||
gRadarMarks[item->index + 50].pos.x = item->obj.pos.x;
|
||||
gRadarMarks[item->index + 50].pos.y = item->obj.pos.y;
|
||||
gRadarMarks[item->index + 50].pos.z = item->obj.pos.z;
|
||||
@@ -2124,7 +2124,7 @@ s32 func_hud_8008A4DC(void) {
|
||||
}
|
||||
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, x1, y1, z1, 1);
|
||||
Matrix_Translate(gGfxMatrix, x1, y1, z1, MTXF_APPLY);
|
||||
|
||||
if ((gCurrentLevel == LEVEL_SECTOR_Z) && (D_hud_80161710 != 0)) {
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
@@ -2134,26 +2134,26 @@ s32 func_hud_8008A4DC(void) {
|
||||
}
|
||||
|
||||
for (i = 64; i >= 0; i--) {
|
||||
if ((gRadarMarks[i].unk_00 == 0) || (fabsf(gRadarMarks[i].pos.x) >= (temp2 + 1000.0f)) ||
|
||||
if ((gRadarMarks[i].status == 0) || (fabsf(gRadarMarks[i].pos.x) >= (temp2 + 1000.0f)) ||
|
||||
(fabsf(gRadarMarks[i].pos.z) >= (temp2 + 1000.0f))) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, gRadarMarks[i].pos.x * 0.008f, -gRadarMarks[i].pos.z * 0.008f, 0.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, gRadarMarks[i].pos.x * 0.008f, -gRadarMarks[i].pos.z * 0.008f, 0.0f, MTXF_APPLY);
|
||||
|
||||
if (gRadarMarks[i].unk_02 == 103) {
|
||||
if (gRadarMarks[i].type == 103) {
|
||||
gRadarMarks[i].unk_10 = 45.0f;
|
||||
}
|
||||
|
||||
Matrix_RotateZ(gGfxMatrix, M_DTOR * gRadarMarks[i].unk_10, 1);
|
||||
Matrix_Scale(gGfxMatrix, scale, scale, 1.0f, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, M_DTOR * gRadarMarks[i].unk_10, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, scale, scale, 1.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
|
||||
RadarMark_Draw(gRadarMarks[i].unk_02);
|
||||
RadarMark_Draw(gRadarMarks[i].type);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
|
||||
gRadarMarks[i].unk_00 = 0;
|
||||
gRadarMarks[i].status = 0;
|
||||
}
|
||||
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
@@ -2562,8 +2562,8 @@ void func_hud_8008BAE4(void) {
|
||||
RCP_SetupDL(&gMasterDisp, 0xC);
|
||||
gDPSetPrimColor(gMasterDisp++, 0, 0, r, g, b, alpha);
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, -53.9f, -38.5f, -139.4f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 1.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, -53.9f, -38.5f, -139.4f, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 1.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_800D1A40);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
@@ -2744,22 +2744,22 @@ void func_hud_8008C6F4(s32 idx, s32 arg1) {
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
|
||||
if (gPlayer[0].cockpitView) {
|
||||
Matrix_RotateZ(gGfxMatrix, M_DTOR * gPlayer[0].unk_034, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, M_DTOR * gPlayer[0].camRoll, MTXF_APPLY);
|
||||
}
|
||||
|
||||
if (D_800D1F88[idx]) {
|
||||
Matrix_RotateZ(gGfxMatrix, M_DTOR * D_800D1F88[idx], 1);
|
||||
Matrix_RotateZ(gGfxMatrix, M_DTOR * D_800D1F88[idx], MTXF_APPLY);
|
||||
}
|
||||
|
||||
if (arg1 != 0) {
|
||||
Matrix_Translate(gGfxMatrix, D_800D1EF8[idx] + D_800D1FE8[idx], D_800D1F28[idx] + D_800D2018[idx],
|
||||
D_800D1F58[idx], 1);
|
||||
D_800D1F58[idx], MTXF_APPLY);
|
||||
} else {
|
||||
Matrix_Translate(gGfxMatrix, D_800D1EF8[idx], D_800D1F28[idx], D_800D1F58[idx], 1);
|
||||
Matrix_Translate(gGfxMatrix, D_800D1EF8[idx], D_800D1F28[idx], D_800D1F58[idx], MTXF_APPLY);
|
||||
}
|
||||
|
||||
Matrix_RotateZ(gGfxMatrix, M_DTOR * D_800D1FB8[idx], 1);
|
||||
Matrix_Scale(gGfxMatrix, 0.026f, 0.026f, 0.026f, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, M_DTOR * D_800D1FB8[idx], MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, 0.026f, 0.026f, 0.026f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
|
||||
RCP_SetupDL(&gMasterDisp, 0x3E);
|
||||
@@ -3723,13 +3723,13 @@ s32 func_hud_80090200(Boss* boss) {
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 50);
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 50);
|
||||
|
||||
player->camEye.x = boss->fwork[4] = boss->obj.pos.x;
|
||||
player->camEye.y = boss->fwork[5] = boss->obj.pos.y + 500.0f;
|
||||
player->camEye.z = boss->fwork[6] = boss->obj.pos.z + 4000.0f;
|
||||
player->cam.eye.x = boss->fwork[4] = boss->obj.pos.x;
|
||||
player->cam.eye.y = boss->fwork[5] = boss->obj.pos.y + 500.0f;
|
||||
player->cam.eye.z = boss->fwork[6] = boss->obj.pos.z + 4000.0f;
|
||||
|
||||
player->camAt.x = boss->obj.pos.x;
|
||||
player->camAt.y = boss->obj.pos.y;
|
||||
player->camAt.z = boss->obj.pos.z;
|
||||
player->cam.at.x = boss->obj.pos.x;
|
||||
player->cam.at.y = boss->obj.pos.y;
|
||||
player->cam.at.z = boss->obj.pos.z;
|
||||
|
||||
boss->fwork[7] = 0.0f;
|
||||
boss->fwork[8] = 0.0f;
|
||||
@@ -3791,21 +3791,21 @@ s32 func_hud_80090200(Boss* boss) {
|
||||
src.y = boss->fwork[5] - boss->obj.pos.y;
|
||||
src.z = boss->fwork[6] - boss->obj.pos.z;
|
||||
|
||||
Matrix_Translate(gCalcMatrix, boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, 0);
|
||||
Matrix_RotateY(gCalcMatrix, M_DTOR * boss->fwork[7], 1);
|
||||
Matrix_RotateX(gCalcMatrix, M_DTOR * boss->fwork[8], 1);
|
||||
Matrix_Translate(gCalcMatrix, boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, MTXF_NEW);
|
||||
Matrix_RotateY(gCalcMatrix, M_DTOR * boss->fwork[7], MTXF_APPLY);
|
||||
Matrix_RotateX(gCalcMatrix, M_DTOR * boss->fwork[8], MTXF_APPLY);
|
||||
Matrix_MultVec3f(gCalcMatrix, &src, &dest);
|
||||
|
||||
player->camEye.x = dest.x;
|
||||
player->camEye.y = dest.y;
|
||||
player->camEye.z = dest.z;
|
||||
player->cam.eye.x = dest.x;
|
||||
player->cam.eye.y = dest.y;
|
||||
player->cam.eye.z = dest.z;
|
||||
|
||||
player->camAt.x = boss->obj.pos.x;
|
||||
player->camAt.y = boss->obj.pos.x;
|
||||
player->camAt.z = boss->obj.pos.x;
|
||||
player->cam.at.x = boss->obj.pos.x;
|
||||
player->cam.at.y = boss->obj.pos.x;
|
||||
player->cam.at.z = boss->obj.pos.x;
|
||||
|
||||
player->camAt.x += COS_DEG(boss->timer_050 * 60.0f) * boss->fwork[9];
|
||||
player->camAt.y += SIN_DEG(boss->timer_050 * 179.0f) * boss->fwork[9];
|
||||
player->cam.at.x += COS_DEG(boss->timer_050 * 60.0f) * boss->fwork[9];
|
||||
player->cam.at.y += SIN_DEG(boss->timer_050 * 179.0f) * boss->fwork[9];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4147,7 +4147,7 @@ void func_hud_800914FC(Actor* actor) {
|
||||
actor->state = 3;
|
||||
}
|
||||
|
||||
if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7) {
|
||||
if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) {
|
||||
if ((actor->state != 2) && (actor->state != 3)) {
|
||||
actor->iwork[4] = 1;
|
||||
actor->state = 2;
|
||||
@@ -4351,7 +4351,7 @@ bool func_hud_80091F00(Actor* actor) {
|
||||
|
||||
AUDIO_PLAY_SFX(0x2903300E, actor->sfxSource, 4);
|
||||
func_effect_8007D10C(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 1.5f);
|
||||
Matrix_RotateY(gCalcMatrix, actor->unk_0F4.y * M_DTOR, 0);
|
||||
Matrix_RotateY(gCalcMatrix, actor->unk_0F4.y * M_DTOR, MTXF_NEW);
|
||||
|
||||
if (Rand_ZeroOne() < 0.5f) {
|
||||
sp40.x = -20.0f;
|
||||
@@ -4421,8 +4421,8 @@ bool func_hud_80091F00(Actor* actor) {
|
||||
}
|
||||
|
||||
void func_hud_80092244(Actor* actor) {
|
||||
gRadarMarks[actor->index].unk_00 = 1;
|
||||
gRadarMarks[actor->index].unk_02 = actor->aiType;
|
||||
gRadarMarks[actor->index].status = 1;
|
||||
gRadarMarks[actor->index].type = actor->aiType;
|
||||
gRadarMarks[actor->index].pos.x = actor->obj.pos.x;
|
||||
gRadarMarks[actor->index].pos.y = actor->obj.pos.y;
|
||||
gRadarMarks[actor->index].pos.z = actor->obj.pos.z;
|
||||
@@ -4432,7 +4432,7 @@ void func_hud_80092244(Actor* actor) {
|
||||
void func_hud_800922F4(Actor* actor) {
|
||||
s32 temp;
|
||||
|
||||
if ((gTeamShields[actor->aiType] < 64) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_7)) {
|
||||
if ((gTeamShields[actor->aiType] < 64) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE)) {
|
||||
temp = 8 - 1;
|
||||
if (gTeamShields[actor->aiType] > 16) {
|
||||
temp = 16 - 1;
|
||||
@@ -4501,8 +4501,9 @@ bool func_hud_800924E0(Actor* actor) {
|
||||
Math_SmoothStepToAngle(&actor->obj.rot.z, 0.0f, 0.1f, 5.0f, 0.0f);
|
||||
actor->obj.rot.x = actor->vwork[29].x + (360.0f - actor->fwork[19]);
|
||||
|
||||
Matrix_RotateY(gCalcMatrix, actor->unk_0F4.y * M_DTOR, 0);
|
||||
Matrix_RotateX(gCalcMatrix, -(M_DTOR * ((actor->unk_0F4.x + actor->vwork[29].x) + actor->fwork[19])), 1);
|
||||
Matrix_RotateY(gCalcMatrix, actor->unk_0F4.y * M_DTOR, MTXF_NEW);
|
||||
Matrix_RotateX(gCalcMatrix, -(M_DTOR * ((actor->unk_0F4.x + actor->vwork[29].x) + actor->fwork[19])),
|
||||
MTXF_APPLY);
|
||||
|
||||
src.z = actor->fwork[1];
|
||||
src.y = 0.0f;
|
||||
@@ -4642,7 +4643,7 @@ bool func_hud_800927A0(Actor* actor) {
|
||||
actor->obj.pos.y += actor->fwork[28];
|
||||
|
||||
Matrix_RotateY(gCalcMatrix, actor->unk_0F4.y * M_DTOR, 0U);
|
||||
Matrix_RotateX(gCalcMatrix, -(M_DTOR * (actor->unk_0F4.x + actor->vwork[29].x + actor->fwork[19])), 1);
|
||||
Matrix_RotateX(gCalcMatrix, -(M_DTOR * (actor->unk_0F4.x + actor->vwork[29].x + actor->fwork[19])), MTXF_APPLY);
|
||||
|
||||
src.z = actor->fwork[1];
|
||||
src.y = 0.0f;
|
||||
@@ -4729,14 +4730,14 @@ void ActorTeamBoss_Update(ActorTeamBoss* this) {
|
||||
}
|
||||
|
||||
if ((this->iwork[10] != 0) && (gLevelMode == LEVELMODE_ALL_RANGE) && (this->iwork[9] == 0) &&
|
||||
(gPlayer[0].state_1C8 != PLAYERSTATE_1C8_7)) {
|
||||
(gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE)) {
|
||||
this->unk_048 = 2;
|
||||
this->unk_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_7)) {
|
||||
(gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE)) {
|
||||
this->unk_048 = 2;
|
||||
this->unk_04A = 1;
|
||||
}
|
||||
@@ -4776,7 +4777,7 @@ void func_hud_80093164(Actor* actor) {
|
||||
if (actor->state == 0) {
|
||||
switch (actor->unk_0B6) {
|
||||
case 1:
|
||||
if ((player->state_1C8 != PLAYERSTATE_1C8_2) || (actor->unk_0B6 != 1)) {
|
||||
if ((player->state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO) || (actor->unk_0B6 != 1)) {
|
||||
if (gCsFrameCount > 1588) {
|
||||
actor->fwork[0] = 5.0f;
|
||||
} else {
|
||||
@@ -4799,8 +4800,8 @@ void func_hud_80093164(Actor* actor) {
|
||||
}
|
||||
}
|
||||
|
||||
Matrix_RotateY(gCalcMatrix, (actor->unk_0F4.y + 180.0f) * M_DTOR, 0);
|
||||
Matrix_RotateX(gCalcMatrix, -(actor->unk_0F4.x * M_DTOR), 1);
|
||||
Matrix_RotateY(gCalcMatrix, (actor->unk_0F4.y + 180.0f) * M_DTOR, MTXF_NEW);
|
||||
Matrix_RotateX(gCalcMatrix, -(actor->unk_0F4.x * M_DTOR), MTXF_APPLY);
|
||||
src.x = 0.0f;
|
||||
src.y = 0.0f;
|
||||
src.z = actor->fwork[0];
|
||||
@@ -4842,7 +4843,8 @@ void func_hud_800933D8(f32 x, f32 y, f32 z, f32 arg3) {
|
||||
effect->obj.pos.y = y;
|
||||
effect->obj.pos.z = z;
|
||||
|
||||
if ((player->state_1C8 == PLAYERSTATE_1C8_2) && (gCurrentLevel == LEVEL_AQUAS) && (player->unk_1D0 < 2)) {
|
||||
if ((player->state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) && (gCurrentLevel == LEVEL_AQUAS) &&
|
||||
(player->unk_1D0 < 2)) {
|
||||
effect->scale1 = 0.4f;
|
||||
effect->unk_44 = 0;
|
||||
effect->unk_46 = 24;
|
||||
@@ -4932,13 +4934,13 @@ void func_hud_800935E8(Player* player) {
|
||||
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0;
|
||||
gFillScreenAlphaTarget = 0;
|
||||
|
||||
player->camEye.x = gCsCamEyeX = -3061.2f;
|
||||
player->camEye.y = gCsCamEyeY = 1745.9f;
|
||||
player->camEye.z = gCsCamEyeZ = -5786.0f;
|
||||
player->cam.eye.x = gCsCamEyeX = -3061.2f;
|
||||
player->cam.eye.y = gCsCamEyeY = 1745.9f;
|
||||
player->cam.eye.z = gCsCamEyeZ = -5786.0f;
|
||||
|
||||
player->camAt.x = gCsCamAtX = 300.0f;
|
||||
player->camAt.y = gCsCamAtY = 2200.0f;
|
||||
player->camAt.z = gCsCamAtZ = -5700.0f;
|
||||
player->cam.at.x = gCsCamAtX = 300.0f;
|
||||
player->cam.at.y = gCsCamAtY = 2200.0f;
|
||||
player->cam.at.z = gCsCamAtZ = -5700.0f;
|
||||
|
||||
D_801616A0.x = 5.18f;
|
||||
D_801616A0.y = 124.17f;
|
||||
@@ -4962,8 +4964,8 @@ void func_hud_800935E8(Player* player) {
|
||||
src.y = D_800D2320[i].y + RAND_FLOAT(12.0f);
|
||||
src.z = D_800D2320[i].z;
|
||||
|
||||
Matrix_Translate(gCalcMatrix, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 0);
|
||||
Matrix_RotateY(gCalcMatrix, M_DTOR * 30.0f, 1);
|
||||
Matrix_Translate(gCalcMatrix, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, MTXF_NEW);
|
||||
Matrix_RotateY(gCalcMatrix, M_DTOR * 30.0f, MTXF_APPLY);
|
||||
Matrix_MultVec3f(gCalcMatrix, &src, &dest);
|
||||
|
||||
x = dest.x;
|
||||
@@ -4981,8 +4983,8 @@ void func_hud_800935E8(Player* player) {
|
||||
src.y = D_800D2320[i].y + RAND_FLOAT(12.0f);
|
||||
src.z = D_800D2320[i].z;
|
||||
|
||||
Matrix_Translate(gCalcMatrix, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 0);
|
||||
Matrix_RotateY(gCalcMatrix, M_DTOR * 30.0f, 1);
|
||||
Matrix_Translate(gCalcMatrix, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, MTXF_NEW);
|
||||
Matrix_RotateY(gCalcMatrix, M_DTOR * 30.0f, MTXF_APPLY);
|
||||
Matrix_MultVec3f(gCalcMatrix, &src, &dest);
|
||||
|
||||
x = dest.x;
|
||||
@@ -5082,7 +5084,7 @@ void func_hud_800935E8(Player* player) {
|
||||
|
||||
D_ctx_80177AB0 = 0;
|
||||
|
||||
player->unk_034 = 60.0f;
|
||||
player->camRoll = 60.0f;
|
||||
player->timer_1F8 = 1000;
|
||||
|
||||
player->unk_0E8 = 30.0f;
|
||||
@@ -5111,21 +5113,21 @@ void func_hud_800935E8(Player* player) {
|
||||
src.y = D_ctx_80177A48[3];
|
||||
src.z = D_ctx_80177A48[4];
|
||||
|
||||
Matrix_Translate(gCalcMatrix, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 0);
|
||||
Matrix_RotateY(gCalcMatrix, M_DTOR * 30.0f, 1);
|
||||
Matrix_Translate(gCalcMatrix, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, MTXF_NEW);
|
||||
Matrix_RotateY(gCalcMatrix, M_DTOR * 30.0f, MTXF_APPLY);
|
||||
Matrix_MultVec3f(gCalcMatrix, &src, &dest);
|
||||
|
||||
gCsCamEyeX = dest.x;
|
||||
gCsCamEyeY = dest.y;
|
||||
gCsCamEyeZ = dest.z;
|
||||
|
||||
player->camAt.x = gCsCamAtX = gCsCamEyeX;
|
||||
player->camAt.y = gCsCamAtY = gCsCamEyeY + 100.0f;
|
||||
player->camAt.z = gCsCamAtZ = gCsCamEyeZ + 10.0f;
|
||||
player->cam.at.x = gCsCamAtX = gCsCamEyeX;
|
||||
player->cam.at.y = gCsCamAtY = gCsCamEyeY + 100.0f;
|
||||
player->cam.at.z = gCsCamAtZ = gCsCamEyeZ + 10.0f;
|
||||
|
||||
player->camEye.x = gCsCamEyeX;
|
||||
player->camEye.y = gCsCamEyeY;
|
||||
player->camEye.z = gCsCamEyeZ;
|
||||
player->cam.eye.x = gCsCamEyeX;
|
||||
player->cam.eye.y = gCsCamEyeY;
|
||||
player->cam.eye.z = gCsCamEyeZ;
|
||||
}
|
||||
|
||||
if (player->timer_1F8 == 774) {
|
||||
@@ -5146,8 +5148,8 @@ void func_hud_800935E8(Player* player) {
|
||||
temp2 = SIN_DEG(gGameFrameCount * 70.0f) * temp;
|
||||
}
|
||||
|
||||
player->camEye.y = gCsCamEyeY + temp2;
|
||||
player->camAt.y = gCsCamEyeY + 100.0f;
|
||||
player->cam.eye.y = gCsCamEyeY + temp2;
|
||||
player->cam.at.y = gCsCamEyeY + 100.0f;
|
||||
|
||||
Math_SmoothStepToF(&player->unk_018, -1200.0f, 0.02f, 60.0f, 0.0f);
|
||||
|
||||
@@ -5155,8 +5157,8 @@ void func_hud_800935E8(Player* player) {
|
||||
src.y = 0.0f;
|
||||
src.z = player->unk_018;
|
||||
|
||||
Matrix_Translate(gCalcMatrix, player->pos.x, player->pos.y, player->pos.z, 0);
|
||||
Matrix_RotateY(gCalcMatrix, M_DTOR * 30.0f, 1);
|
||||
Matrix_Translate(gCalcMatrix, player->pos.x, player->pos.y, player->pos.z, MTXF_NEW);
|
||||
Matrix_RotateY(gCalcMatrix, M_DTOR * 30.0f, MTXF_APPLY);
|
||||
Matrix_MultVec3f(gCalcMatrix, &src, &dest);
|
||||
|
||||
player->pos.x = dest.x;
|
||||
@@ -5164,7 +5166,7 @@ void func_hud_800935E8(Player* player) {
|
||||
player->pos.z = dest.z;
|
||||
|
||||
if (((player->timer_1F8 % 8) == 0) && (player->timer_1F8 > 740)) {
|
||||
func_effect_8007D9DC(player->camEye.x, 1600.0f, player->camEye.z, 10.0f, 100.0f, 0);
|
||||
func_effect_8007D9DC(player->cam.eye.x, 1600.0f, player->cam.eye.z, 10.0f, 100.0f, 0);
|
||||
}
|
||||
|
||||
if ((player->unk_018 > -200.0f) && (D_ctx_80177A10[8] < 6)) {
|
||||
@@ -5179,9 +5181,9 @@ void func_hud_800935E8(Player* player) {
|
||||
|
||||
if (((gGameFrameCount % 3) == 0) && (player->timer_1F8 <= 740)) {
|
||||
for (i = 0; i < 8; i++) {
|
||||
Aquas_801AC8A8(player->camEye.x + RAND_FLOAT_CENTERED(D_800D22C4),
|
||||
player->camEye.y + 260.0f + RAND_FLOAT_CENTERED(D_800D22C8),
|
||||
player->camEye.z + RAND_FLOAT_CENTERED(D_800D22CC), 1.0f, 0);
|
||||
Aquas_801AC8A8(player->cam.eye.x + RAND_FLOAT_CENTERED(D_800D22C4),
|
||||
player->cam.eye.y + 260.0f + RAND_FLOAT_CENTERED(D_800D22C8),
|
||||
player->cam.eye.z + RAND_FLOAT_CENTERED(D_800D22CC), 1.0f, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5205,16 +5207,16 @@ void func_hud_800935E8(Player* player) {
|
||||
player->pos.y = 350.0f;
|
||||
player->pos.z = 0.0f;
|
||||
|
||||
player->camEye.x = player->pos.x * (600.0f / player->unk_09C);
|
||||
player->camEye.y = player->pos.y * (1040.0f / player->unk_0A0);
|
||||
player->camEye.y -= 50.0f;
|
||||
player->cam.eye.x = player->pos.x * (600.0f / player->unk_09C);
|
||||
player->cam.eye.y = player->pos.y * (1040.0f / player->unk_0A0);
|
||||
player->cam.eye.y -= 50.0f;
|
||||
|
||||
player->camAt.x = player->pos.x * (600.0f / player->unk_09C);
|
||||
player->camAt.y = player->pos.y * (1050.0f / player->unk_0A0);
|
||||
player->camAt.y += player->unk_060 * 10.0f;
|
||||
player->cam.at.x = player->pos.x * (600.0f / player->unk_09C);
|
||||
player->cam.at.y = player->pos.y * (1050.0f / player->unk_0A0);
|
||||
player->cam.at.y += player->unk_060 * 10.0f;
|
||||
|
||||
player->pos.z += 1000.0f;
|
||||
player->unk_034 = 0.0f;
|
||||
player->camRoll = 0.0f;
|
||||
|
||||
D_ctx_80177A48[0] = 0.1f;
|
||||
|
||||
@@ -5230,8 +5232,8 @@ void func_hud_800935E8(Player* player) {
|
||||
|
||||
Object_Kill(&actor->obj, actor->sfxSource);
|
||||
|
||||
player->camEye.z = gCsCamEyeZ = 800.0f;
|
||||
player->camAt.z = gCsCamAtZ = 0.0f;
|
||||
player->cam.eye.z = gCsCamEyeZ = 800.0f;
|
||||
player->cam.at.z = gCsCamAtZ = 0.0f;
|
||||
|
||||
case 6:
|
||||
player->unk_060 = SIN_DEG(player->unk_0F4 * 0.7f) * 0.5f;
|
||||
@@ -5261,11 +5263,11 @@ void func_hud_800935E8(Player* player) {
|
||||
if (player->timer_1F8 <= 900) {
|
||||
gLevelStatusScreenTimer = 50;
|
||||
|
||||
player->state_1C8 = PLAYERSTATE_1C8_3;
|
||||
player->state_1C8 = PLAYERSTATE_1C8_ACTIVE;
|
||||
player->unk_1D0 = 0;
|
||||
player->timer_1F8 = 0;
|
||||
|
||||
D_ctx_80178488 = 1;
|
||||
gLoadLevelObjects = 1;
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 50);
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 50);
|
||||
AUDIO_PLAY_BGM(SEQ_ID_AQUAS);
|
||||
@@ -5279,8 +5281,8 @@ void func_hud_800935E8(Player* player) {
|
||||
break;
|
||||
}
|
||||
|
||||
Matrix_RotateY(gCalcMatrix, M_DTOR * (player->unk_0E8 + player->unk_114 + 180.0f), 0);
|
||||
Matrix_RotateX(gCalcMatrix, -(M_DTOR * player->unk_0E4), 1);
|
||||
Matrix_RotateY(gCalcMatrix, M_DTOR * (player->unk_0E8 + player->unk_114 + 180.0f), MTXF_NEW);
|
||||
Matrix_RotateX(gCalcMatrix, -(M_DTOR * player->unk_0E4), MTXF_APPLY);
|
||||
|
||||
src.x = 0.0f;
|
||||
src.y = 0.0f;
|
||||
@@ -5298,12 +5300,12 @@ void func_hud_800935E8(Player* player) {
|
||||
|
||||
player->unk_0F8 = player->unk_0EC + player->unk_12C + player->unk_130;
|
||||
|
||||
Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, D_ctx_80177A48[0], 50000.0f, 0.0f);
|
||||
Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000.0f, 0.0f);
|
||||
Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_ctx_80177A48[0], 50000.0f, 0.0f);
|
||||
Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, D_ctx_80177A48[0], 50000.0f, 0.0f);
|
||||
Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, D_ctx_80177A48[0], 50000.0f, 0.0f);
|
||||
Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, D_ctx_80177A48[0], 50000.0f, 0.0f);
|
||||
Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, D_ctx_80177A48[0], 50000.0f, 0.0f);
|
||||
Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000.0f, 0.0f);
|
||||
Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, D_ctx_80177A48[0], 50000.0f, 0.0f);
|
||||
Math_SmoothStepToF(&player->cam.at.x, gCsCamAtX, D_ctx_80177A48[0], 50000.0f, 0.0f);
|
||||
Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, D_ctx_80177A48[0], 50000.0f, 0.0f);
|
||||
Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], 50000.0f, 0.0f);
|
||||
}
|
||||
|
||||
// unused data
|
||||
@@ -5316,7 +5318,7 @@ f32 D_800D24CC = 0.02f;
|
||||
void func_hud_80094954(Effect* effect) {
|
||||
Player* player = &gPlayer[0];
|
||||
|
||||
if ((player->state_1C8 == PLAYERSTATE_1C8_2) && (gCurrentLevel == LEVEL_AQUAS) && (player->unk_1D0 < 2)) {
|
||||
if ((player->state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) && (gCurrentLevel == LEVEL_AQUAS) && (player->unk_1D0 < 2)) {
|
||||
switch (effect->state) {
|
||||
case 0:
|
||||
effect->unk_44 += effect->unk_46;
|
||||
@@ -5347,12 +5349,12 @@ void func_hud_80094954(Effect* effect) {
|
||||
}
|
||||
effect->obj.rot.z += effect->unk_48;
|
||||
} else {
|
||||
if (player->state_1C8 == PLAYERSTATE_1C8_7) {
|
||||
effect->obj.rot.x = RAD_TO_DEG(player->unk_05C);
|
||||
effect->obj.rot.y = RAD_TO_DEG(-player->unk_058);
|
||||
if (player->state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) {
|
||||
effect->obj.rot.x = RAD_TO_DEG(player->camPitch);
|
||||
effect->obj.rot.y = RAD_TO_DEG(-player->camYaw);
|
||||
}
|
||||
|
||||
if (player->state_1C8 == PLAYERSTATE_1C8_6) {
|
||||
if (player->state_1C8 == PLAYERSTATE_1C8_NEXT) {
|
||||
effect->unk_46 = 2;
|
||||
if (player->unk_1D0 >= 4) {
|
||||
effect->vel.y -= 0.13f;
|
||||
@@ -5362,8 +5364,8 @@ void func_hud_80094954(Effect* effect) {
|
||||
effect->scale2 += 0.8f;
|
||||
effect->unk_4A -= effect->unk_46;
|
||||
|
||||
if ((effect->unk_4A < 0) ||
|
||||
((player->state_1C8 == PLAYERSTATE_1C8_2) && (gCurrentLevel == LEVEL_AQUAS) && (player->unk_1D0 == 5))) {
|
||||
if ((effect->unk_4A < 0) || ((player->state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) &&
|
||||
(gCurrentLevel == LEVEL_AQUAS) && (player->unk_1D0 == 5))) {
|
||||
Object_Kill(&effect->obj, effect->sfxSource);
|
||||
}
|
||||
effect->obj.rot.z += effect->unk_48;
|
||||
@@ -5371,7 +5373,8 @@ void func_hud_80094954(Effect* effect) {
|
||||
}
|
||||
|
||||
void func_hud_80094BBC(Effect* effect) {
|
||||
if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_2) && (gCurrentLevel == LEVEL_AQUAS) && (gPlayer[0].unk_1D0 < 2)) {
|
||||
if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) && (gCurrentLevel == LEVEL_AQUAS) &&
|
||||
(gPlayer[0].unk_1D0 < 2)) {
|
||||
RCP_SetupDL(&gMasterDisp, 0x44);
|
||||
gDPSetPrimColor(gMasterDisp++, 0, 0, 0, 21, 34, effect->unk_4A);
|
||||
gDPSetEnvColor(gMasterDisp++, 255, 255, 251, 0);
|
||||
@@ -5635,8 +5638,8 @@ void func_hud_80095604(Player* player) {
|
||||
src.y = 300.0f;
|
||||
src.z = 1000.0f;
|
||||
|
||||
Matrix_Translate(gCalcMatrix, D_ctx_80177A48[1], D_ctx_80177A48[2], D_ctx_80177A48[3], 0);
|
||||
Matrix_RotateY(gCalcMatrix, -(M_DTOR * D_ctx_80177A48[5]), 1);
|
||||
Matrix_Translate(gCalcMatrix, D_ctx_80177A48[1], D_ctx_80177A48[2], D_ctx_80177A48[3], MTXF_NEW);
|
||||
Matrix_RotateY(gCalcMatrix, -(M_DTOR * D_ctx_80177A48[5]), MTXF_APPLY);
|
||||
Matrix_MultVec3f(gCalcMatrix, &src, &dest);
|
||||
}
|
||||
|
||||
@@ -5646,14 +5649,14 @@ void func_hud_80095604(Player* player) {
|
||||
dest.z = gBosses[0].obj.pos.z + 1000.0f;
|
||||
}
|
||||
if (gCsFrameCount >= 90) {
|
||||
dest.x = player->camEye.x;
|
||||
dest.y = player->camEye.y;
|
||||
dest.z = player->camEye.z + 200.0f - D_ctx_80177D20;
|
||||
dest.x = player->cam.eye.x;
|
||||
dest.y = player->cam.eye.y;
|
||||
dest.z = player->cam.eye.z + 200.0f - D_ctx_80177D20;
|
||||
}
|
||||
|
||||
Math_SmoothStepToAngle(&player->unk_130, 0.0f, 0.05f, 1.2f, 0.0001f);
|
||||
Math_SmoothStepToAngle(&player->unk_12C, 0.0f, 0.05f, 1.2f, 0.0001f);
|
||||
Math_SmoothStepToF(&player->unk_034, 0.0f, 0.1f, 3.0f, 0.0f);
|
||||
Math_SmoothStepToF(&player->camRoll, 0.0f, 0.1f, 3.0f, 0.0f);
|
||||
Math_SmoothStepToAngle(&player->unk_4D8, 0.0f, 0.1f, 20.0f, 0.0f);
|
||||
|
||||
x = player->pos.x - dest.x;
|
||||
@@ -5684,17 +5687,17 @@ void func_hud_80095604(Player* player) {
|
||||
src.z = D_ctx_80177A48[9];
|
||||
|
||||
Matrix_Translate(gCalcMatrix, gBosses[0].obj.pos.x, gBosses[0].obj.pos.y,
|
||||
gBosses[0].obj.pos.z + D_ctx_80177D20, 0);
|
||||
Matrix_RotateY(gCalcMatrix, -(M_DTOR * D_ctx_80177A48[4]), 1);
|
||||
gBosses[0].obj.pos.z + D_ctx_80177D20, MTXF_NEW);
|
||||
Matrix_RotateY(gCalcMatrix, -(M_DTOR * D_ctx_80177A48[4]), MTXF_APPLY);
|
||||
Matrix_MultVec3f(gCalcMatrix, &src, &dest);
|
||||
|
||||
Math_SmoothStepToF(&gCsCamEyeX, dest.x, 0.02f, player->unk_0D0, 0.001f);
|
||||
Math_SmoothStepToF(&gCsCamEyeY, dest.y, 0.02f, player->unk_0D0, 0.001f);
|
||||
Math_SmoothStepToF(&gCsCamEyeZ, dest.z, 0.02f, player->unk_0D0, 0.001f);
|
||||
|
||||
player->camEye.x = gCsCamEyeX;
|
||||
player->camEye.y = gCsCamEyeY;
|
||||
player->camEye.z = gCsCamEyeZ;
|
||||
player->cam.eye.x = gCsCamEyeX;
|
||||
player->cam.eye.y = gCsCamEyeY;
|
||||
player->cam.eye.z = gCsCamEyeZ;
|
||||
|
||||
if (gCsFrameCount < 200) {
|
||||
Math_SmoothStepToF(&gCsCamAtX, gBosses[0].obj.pos.x, 0.03f, 100.0f, 0.001f);
|
||||
@@ -5711,9 +5714,9 @@ void func_hud_80095604(Player* player) {
|
||||
}
|
||||
}
|
||||
|
||||
player->camAt.x = gCsCamAtX;
|
||||
player->camAt.y = gCsCamAtY;
|
||||
player->camAt.z = gCsCamAtZ;
|
||||
player->cam.at.x = gCsCamAtX;
|
||||
player->cam.at.y = gCsCamAtY;
|
||||
player->cam.at.z = gCsCamAtZ;
|
||||
|
||||
D_ctx_80177A48[0] = 0.0f;
|
||||
break;
|
||||
@@ -5779,17 +5782,17 @@ void func_hud_80095604(Player* player) {
|
||||
src.y = actor->fwork[2];
|
||||
src.z = actor->fwork[3];
|
||||
|
||||
Matrix_Translate(gCalcMatrix, player->pos.x, player->pos.y, player->unk_138 + D_ctx_80177D20, 0);
|
||||
Matrix_RotateY(gCalcMatrix, -(M_DTOR * actor->unk_0F4.y), 1);
|
||||
Matrix_Translate(gCalcMatrix, player->pos.x, player->pos.y, player->unk_138 + D_ctx_80177D20, MTXF_NEW);
|
||||
Matrix_RotateY(gCalcMatrix, -(M_DTOR * actor->unk_0F4.y), MTXF_APPLY);
|
||||
Matrix_MultVec3f(gCalcMatrix, &src, &dest);
|
||||
|
||||
player->camAt.x = gCsCamAtX = player->pos.x;
|
||||
player->camAt.y = gCsCamAtY = player->pos.y;
|
||||
player->camAt.z = gCsCamAtZ = player->pos.z - 50.0f + D_ctx_80177D20;
|
||||
player->cam.at.x = gCsCamAtX = player->pos.x;
|
||||
player->cam.at.y = gCsCamAtY = player->pos.y;
|
||||
player->cam.at.z = gCsCamAtZ = player->pos.z - 50.0f + D_ctx_80177D20;
|
||||
|
||||
player->camEye.x = gCsCamEyeX = dest.x;
|
||||
player->camEye.y = gCsCamEyeY = dest.y;
|
||||
player->camEye.z = gCsCamEyeZ = dest.z;
|
||||
player->cam.eye.x = gCsCamEyeX = dest.x;
|
||||
player->cam.eye.y = gCsCamEyeY = dest.y;
|
||||
player->cam.eye.z = gCsCamEyeZ = dest.z;
|
||||
|
||||
D_ctx_80177A48[0] = 1.0f;
|
||||
|
||||
@@ -5845,8 +5848,8 @@ void func_hud_80095604(Player* player) {
|
||||
src.y = actor->fwork[2];
|
||||
src.z = actor->fwork[3];
|
||||
|
||||
Matrix_Translate(gCalcMatrix, actor->fwork[4], actor->fwork[5], actor->fwork[6], 0);
|
||||
Matrix_RotateY(gCalcMatrix, -(M_DTOR * actor->unk_0F4.y), 1);
|
||||
Matrix_Translate(gCalcMatrix, actor->fwork[4], actor->fwork[5], actor->fwork[6], MTXF_NEW);
|
||||
Matrix_RotateY(gCalcMatrix, -(M_DTOR * actor->unk_0F4.y), MTXF_APPLY);
|
||||
Matrix_MultVec3f(gCalcMatrix, &src, &dest);
|
||||
|
||||
gCsCamEyeX = dest.x;
|
||||
@@ -5860,7 +5863,7 @@ void func_hud_80095604(Player* player) {
|
||||
|
||||
if (gFillScreenAlpha == 255) {
|
||||
D_play_800D3180[LEVEL_AQUAS] = Play_CheckMedalStatus(150) + 1;
|
||||
player->state_1C8 = PLAYERSTATE_1C8_6;
|
||||
player->state_1C8 = PLAYERSTATE_1C8_NEXT;
|
||||
player->timer_1F8 = 0;
|
||||
Audio_FadeOutAll(10);
|
||||
D_ctx_8017837C = 4;
|
||||
@@ -5931,8 +5934,8 @@ void func_hud_80095604(Player* player) {
|
||||
break;
|
||||
}
|
||||
|
||||
Matrix_RotateY(gCalcMatrix, M_DTOR * (player->unk_0E8 + player->unk_114 + 180.0f), 0);
|
||||
Matrix_RotateX(gCalcMatrix, -(M_DTOR * player->unk_0E4), 1);
|
||||
Matrix_RotateY(gCalcMatrix, M_DTOR * (player->unk_0E8 + player->unk_114 + 180.0f), MTXF_NEW);
|
||||
Matrix_RotateX(gCalcMatrix, -(M_DTOR * player->unk_0E4), MTXF_APPLY);
|
||||
|
||||
src.x = 0.0f;
|
||||
src.y = 0.0f;
|
||||
@@ -5970,12 +5973,12 @@ void func_hud_80095604(Player* player) {
|
||||
|
||||
player->unk_178 += 20.0f;
|
||||
|
||||
Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, D_ctx_80177A48[0], 50000.0f, 0.001f);
|
||||
Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000.0f, 0.001f);
|
||||
Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_ctx_80177A48[0], 50000.0f, 0.001f);
|
||||
Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, D_ctx_80177A48[0], 50000.0f, 0.001f);
|
||||
Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, D_ctx_80177A48[0], 50000.0f, 0.001f);
|
||||
Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, D_ctx_80177A48[0], 50000.0f, 0.001f);
|
||||
Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, D_ctx_80177A48[0], 50000.0f, 0.001f);
|
||||
Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000.0f, 0.001f);
|
||||
Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, D_ctx_80177A48[0], 50000.0f, 0.001f);
|
||||
Math_SmoothStepToF(&player->cam.at.x, gCsCamAtX, D_ctx_80177A48[0], 50000.0f, 0.001f);
|
||||
Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, D_ctx_80177A48[0], 50000.0f, 0.001f);
|
||||
Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], 50000.0f, 0.001f);
|
||||
}
|
||||
|
||||
void func_hud_80096A74(Player* player) {
|
||||
@@ -5995,13 +5998,13 @@ void func_hud_80096A74(Player* player) {
|
||||
player->unk_1D0 = 1;
|
||||
gFillScreenAlpha = gFillScreenAlphaTarget = 255;
|
||||
|
||||
player->camEye.x = gCsCamEyeX = 0.0f;
|
||||
player->camEye.y = gCsCamEyeY = player->pos.y + D_ctx_80177A48[1];
|
||||
player->camEye.z = gCsCamEyeZ = 0.0f;
|
||||
player->cam.eye.x = gCsCamEyeX = 0.0f;
|
||||
player->cam.eye.y = gCsCamEyeY = player->pos.y + D_ctx_80177A48[1];
|
||||
player->cam.eye.z = gCsCamEyeZ = 0.0f;
|
||||
|
||||
player->camAt.x = gCsCamAtX = 0.0f;
|
||||
player->camAt.y = gCsCamAtY = 0.0f;
|
||||
player->camAt.z = gCsCamAtZ = 0.0f;
|
||||
player->cam.at.x = gCsCamAtX = 0.0f;
|
||||
player->cam.at.y = gCsCamAtY = 0.0f;
|
||||
player->cam.at.z = gCsCamAtZ = 0.0f;
|
||||
|
||||
D_ctx_80177A48[0] = 1.0f;
|
||||
D_ctx_80177A48[2] = 0.0f;
|
||||
@@ -6022,17 +6025,17 @@ void func_hud_80096A74(Player* player) {
|
||||
if (gCsFrameCount > 60) {
|
||||
Math_SmoothStepToF(&D_ctx_80177A48[4], 3.0f, 0.05f, 1000.0f, 0.001f);
|
||||
}
|
||||
player->unk_034 += D_ctx_80177A48[4];
|
||||
if (player->unk_034 >= 360.0f) {
|
||||
player->unk_034 -= 360.0f;
|
||||
player->camRoll += D_ctx_80177A48[4];
|
||||
if (player->camRoll >= 360.0f) {
|
||||
player->camRoll -= 360.0f;
|
||||
}
|
||||
if (player->unk_034 < 0.0f) {
|
||||
player->unk_034 += 360.0f;
|
||||
if (player->camRoll < 0.0f) {
|
||||
player->camRoll += 360.0f;
|
||||
}
|
||||
}
|
||||
|
||||
if (gCsFrameCount >= 140) {
|
||||
Math_SmoothStepToAngle(&player->unk_034, 0.0f, 0.05f, 3.0f, 0.001f);
|
||||
Math_SmoothStepToAngle(&player->camRoll, 0.0f, 0.05f, 3.0f, 0.001f);
|
||||
Math_SmoothStepToF(&D_ctx_80177A48[1], 200.0f, 0.2f, 6.0f, 0.0f);
|
||||
Math_SmoothStepToF(&D_ctx_80177A48[2], 200.0f, 0.2f, 6.0f, 0.0f);
|
||||
D_ctx_80177A48[0] = 0.2f;
|
||||
@@ -6057,7 +6060,7 @@ void func_hud_80096A74(Player* player) {
|
||||
case 2:
|
||||
D_ctx_80177A48[0] = 0.12f;
|
||||
|
||||
Math_SmoothStepToAngle(&player->unk_034, 0.0f, 0.05f, 3.0f, 0.001f);
|
||||
Math_SmoothStepToAngle(&player->camRoll, 0.0f, 0.05f, 3.0f, 0.001f);
|
||||
Math_SmoothStepToF(&D_ctx_80177A48[1], (player->pos.y * player->unk_148 + 50.0f), 0.2f, 10.0f, 0.0f);
|
||||
Math_SmoothStepToF(&D_ctx_80177A48[2], 400.0f, 0.2f, 6.0f, 0.0f);
|
||||
Math_SmoothStepToF(&player->pos.y, 350.0f, 0.1f, 40.0f, 0.0f);
|
||||
@@ -6083,14 +6086,14 @@ void func_hud_80096A74(Player* player) {
|
||||
if (gCsFrameCount == 300) {
|
||||
D_ctx_80177CE8 = 0;
|
||||
gLevelStatusScreenTimer = 50;
|
||||
player->state_1C8 = PLAYERSTATE_1C8_3;
|
||||
player->state_1C8 = PLAYERSTATE_1C8_ACTIVE;
|
||||
player->unk_0D0 = D_play_80161A54;
|
||||
player->unk_1D0 = 0;
|
||||
player->timer_1F8 = 0;
|
||||
player->unk_014 = 0.0f;
|
||||
player->unk_018 = 0.0f;
|
||||
player->unk_034 = 0.0f;
|
||||
D_ctx_80178488 = 1;
|
||||
player->camRoll = 0.0f;
|
||||
gLoadLevelObjects = 1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -6120,8 +6123,8 @@ void func_hud_80096A74(Player* player) {
|
||||
}
|
||||
}
|
||||
|
||||
Matrix_RotateY(gCalcMatrix, M_DTOR * (player->unk_0E8 + player->unk_114 + 180.0f), 0);
|
||||
Matrix_RotateX(gCalcMatrix, -(M_DTOR * (player->unk_0E4)), 1);
|
||||
Matrix_RotateY(gCalcMatrix, M_DTOR * (player->unk_0E8 + player->unk_114 + 180.0f), MTXF_NEW);
|
||||
Matrix_RotateX(gCalcMatrix, -(M_DTOR * (player->unk_0E4)), MTXF_APPLY);
|
||||
|
||||
src.x = 0.0f;
|
||||
src.y = 0.0f;
|
||||
@@ -6140,10 +6143,10 @@ void func_hud_80096A74(Player* player) {
|
||||
player->unk_0F8 = player->unk_0EC + player->unk_12C + player->unk_130;
|
||||
}
|
||||
|
||||
Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, D_ctx_80177A48[0], 50000.0f, 0.0f);
|
||||
Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000.0f, 0.0f);
|
||||
Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_ctx_80177A48[0], 50000.0f, 0.0f);
|
||||
Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, D_ctx_80177A48[0], 50000.0f, 0.0f);
|
||||
Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, D_ctx_80177A48[0], 50000.0f, 0.0f);
|
||||
Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, D_ctx_80177A48[0], 50000.0f, 0.0f);
|
||||
Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, D_ctx_80177A48[0], 50000.0f, 0.0f);
|
||||
Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000.0f, 0.0f);
|
||||
Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, D_ctx_80177A48[0], 50000.0f, 0.0f);
|
||||
Math_SmoothStepToF(&player->cam.at.x, gCsCamAtX, D_ctx_80177A48[0], 50000.0f, 0.0f);
|
||||
Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, D_ctx_80177A48[0], 50000.0f, 0.0f);
|
||||
Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], 50000.0f, 0.0f);
|
||||
}
|
||||
|
||||
+335
-335
File diff suppressed because it is too large
Load Diff
@@ -744,7 +744,7 @@ void func_radio_800BB5D0(void) {
|
||||
}
|
||||
|
||||
if ((gActors[var_v1].obj.status != OBJ_ACTIVE) && (gGameFrameCount & 4) &&
|
||||
(gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) && (D_ctx_801782A4 != 2) && (D_ctx_801782A4 != 3) &&
|
||||
(gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (D_ctx_801782A4 != 2) && (D_ctx_801782A4 != 3) &&
|
||||
(D_ctx_801782A4 != 1000)) {
|
||||
RCP_SetupDL(&gMasterDisp, 0x4C);
|
||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 0, 255);
|
||||
@@ -881,8 +881,8 @@ void func_radio_800BC040(void) {
|
||||
((s32) D_ctx_80177D68 == RCID_PEPPY)) {
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
RCP_SetupDL_36();
|
||||
Matrix_Translate(gGfxMatrix, -150.0f, -115.0f, -443.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 0.068f, 0.068f, 1.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, -150.0f, -115.0f, -443.0f, MTXF_APPLY);
|
||||
Matrix_Scale(gGfxMatrix, 0.068f, 0.068f, 1.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gPlayerNum = 0;
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
|
||||
+18
-18
@@ -168,10 +168,10 @@ void Animation_DrawLimb(s32 mode, Limb* limb, Limb** skeleton, Vec3f* jointTable
|
||||
override = overrideLimbDraw(limbIndex - 1, &dList, &trans, &rot, data);
|
||||
}
|
||||
if (!override) {
|
||||
Matrix_Translate(gCalcMatrix, trans.x, trans.y, trans.z, 1);
|
||||
Matrix_RotateZ(gCalcMatrix, rot.z * M_DTOR, 1);
|
||||
Matrix_RotateY(gCalcMatrix, rot.y * M_DTOR, 1);
|
||||
Matrix_RotateX(gCalcMatrix, rot.x * M_DTOR, 1);
|
||||
Matrix_Translate(gCalcMatrix, trans.x, trans.y, trans.z, MTXF_APPLY);
|
||||
Matrix_RotateZ(gCalcMatrix, rot.z * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateY(gCalcMatrix, rot.y * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateX(gCalcMatrix, rot.x * M_DTOR, MTXF_APPLY);
|
||||
if (dList != NULL) {
|
||||
if (mode >= 2) {
|
||||
Matrix_MultVec3f(gCalcMatrix, &origin, &pos);
|
||||
@@ -179,7 +179,7 @@ void Animation_DrawLimb(s32 mode, Limb* limb, Limb** skeleton, Vec3f* jointTable
|
||||
func_edisplay_8005F670(&pos);
|
||||
}
|
||||
}
|
||||
Matrix_Mult(gGfxMatrix, gCalcMatrix, 1);
|
||||
Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, dList);
|
||||
}
|
||||
@@ -231,12 +231,12 @@ void Animation_DrawSkeleton(s32 mode, Limb** skeletonSegment, Vec3f* jointTable,
|
||||
override = overrideLimbDraw(rootIndex - 1, &dList, &baseTrans, &baseRot, data);
|
||||
}
|
||||
if (override == 0) {
|
||||
Matrix_Translate(gCalcMatrix, baseTrans.x, baseTrans.y, baseTrans.z, 1);
|
||||
Matrix_RotateZ(gCalcMatrix, baseRot.z * M_DTOR, 1);
|
||||
Matrix_RotateY(gCalcMatrix, baseRot.y * M_DTOR, 1);
|
||||
Matrix_RotateX(gCalcMatrix, baseRot.x * M_DTOR, 1);
|
||||
Matrix_Translate(gCalcMatrix, baseTrans.x, baseTrans.y, baseTrans.z, MTXF_APPLY);
|
||||
Matrix_RotateZ(gCalcMatrix, baseRot.z * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateY(gCalcMatrix, baseRot.y * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateX(gCalcMatrix, baseRot.x * M_DTOR, MTXF_APPLY);
|
||||
if (dList != NULL) {
|
||||
Matrix_Mult(gGfxMatrix, gCalcMatrix, 1);
|
||||
Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, dList);
|
||||
}
|
||||
@@ -250,7 +250,7 @@ void Animation_DrawSkeleton(s32 mode, Limb** skeletonSegment, Vec3f* jointTable,
|
||||
}
|
||||
Matrix_Pop(&gCalcMatrix);
|
||||
if (mode >= 2) {
|
||||
Matrix_Mult(gGfxMatrix, gCalcMatrix, 1);
|
||||
Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -366,19 +366,19 @@ void Animation_GetSkeletonBoundingBox(Limb** skeletonSegment, Animation* animati
|
||||
} else {
|
||||
var_t6 = frameData[(s16) key[1].z];
|
||||
}
|
||||
Matrix_RotateZ(gGfxMatrix, (((s32) var_t6 * 360.0f) / 65536.0f) * M_DTOR, 0);
|
||||
Matrix_RotateZ(gGfxMatrix, (((s32) var_t6 * 360.0f) / 65536.0f) * M_DTOR, MTXF_NEW);
|
||||
if (frame < (s16) key[1].yLen) {
|
||||
var_t6 = frameData[(s16) key[1].y + frame];
|
||||
} else {
|
||||
var_t6 = frameData[(s16) key[1].y];
|
||||
}
|
||||
Matrix_RotateY(gGfxMatrix, (((s32) var_t6 * 360.0f) / 65536.0f) * M_DTOR, 1);
|
||||
Matrix_RotateY(gGfxMatrix, (((s32) var_t6 * 360.0f) / 65536.0f) * M_DTOR, MTXF_APPLY);
|
||||
if (frame < (s16) key[1].xLen) {
|
||||
var_t6 = frameData[(s16) key[1].x + frame];
|
||||
} else {
|
||||
var_t6 = frameData[(s16) key[1].x];
|
||||
}
|
||||
Matrix_RotateX(gGfxMatrix, (((s32) var_t6 * 360.0f) / 65536.0f) * M_DTOR, 1);
|
||||
Matrix_RotateX(gGfxMatrix, (((s32) var_t6 * 360.0f) / 65536.0f) * M_DTOR, MTXF_APPLY);
|
||||
vtxFound = false;
|
||||
if (limb->dList != NULL) {
|
||||
Animation_FindBoundingBox(limb->dList, 8192, min, max, &vtxFound, &vtxCount, &vtxList);
|
||||
@@ -522,8 +522,8 @@ s32 Math_PursueVec3f(Vec3f* pos, Vec3f* target, Vec3f* rot, f32 stepSize, f32 sc
|
||||
targetRotX = Math_RadToDeg(-Math_Atan2F(diff.y, sqrtf(SQ(diff.x) + SQ(diff.z))));
|
||||
Math_SmoothStepToAngle(&rot->y, targetRotY, scaleTurn, maxTurn, 0.0f);
|
||||
Math_SmoothStepToAngle(&rot->x, targetRotX, scaleTurn, maxTurn, 0.0f);
|
||||
Matrix_RotateY(&worldTransform, rot->y * M_DTOR, 0);
|
||||
Matrix_RotateX(&worldTransform, rot->x * M_DTOR, 1);
|
||||
Matrix_RotateY(&worldTransform, rot->y * M_DTOR, MTXF_NEW);
|
||||
Matrix_RotateX(&worldTransform, rot->x * M_DTOR, MTXF_APPLY);
|
||||
localStep.z = stepSize;
|
||||
Matrix_MultVec3fNoTranslate(&worldTransform, &localStep, &worldStep);
|
||||
|
||||
@@ -712,8 +712,8 @@ void Graphics_FillRectangle(Gfx** gfxPtr, s32 ulx, s32 uly, s32 lrx, s32 lry, u8
|
||||
void Math_Vec3fFromAngles(Vec3f* step, f32 xRot, f32 yRot, f32 stepsize) {
|
||||
Vec3f sp1C;
|
||||
|
||||
Matrix_RotateY(gCalcMatrix, yRot * M_DTOR, 0);
|
||||
Matrix_RotateX(gCalcMatrix, xRot * M_DTOR, 1);
|
||||
Matrix_RotateY(gCalcMatrix, yRot * M_DTOR, MTXF_NEW);
|
||||
Matrix_RotateX(gCalcMatrix, xRot * M_DTOR, MTXF_APPLY);
|
||||
sp1C.x = sp1C.y = 0.0f;
|
||||
sp1C.z = stepsize;
|
||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp1C, step);
|
||||
|
||||
+34
-34
@@ -37,7 +37,7 @@ void func_tank_80043280(u16* text0, u16* text1, f32 zRot) {
|
||||
Matrix_Push(&gCalcMatrix);
|
||||
text0 = SEGMENTED_TO_VIRTUAL(text0);
|
||||
text1 = SEGMENTED_TO_VIRTUAL(text1);
|
||||
Matrix_RotateZ(gCalcMatrix, M_DTOR * zRot, 0);
|
||||
Matrix_RotateZ(gCalcMatrix, M_DTOR * zRot, MTXF_NEW);
|
||||
sp74.z = 0.0f;
|
||||
for (i = 0, dy = 0.0f; i < 32; i++, dy += 1.0f) {
|
||||
for (j = 0, dx = 0.0f; j < 32; j++, dx += 1.0f) {
|
||||
@@ -65,7 +65,7 @@ void func_tank_80043468(Player* player) {
|
||||
|
||||
sp54 = ((player->pos.x - player->unk_0AC) * player->unk_148) + (player->unk_0E8 * 0.5f);
|
||||
sp48 = sp54 + (player->unk_0E8 * -5.0f);
|
||||
sp40 = player->camEye.z - 1000.0f;
|
||||
sp40 = player->cam.eye.z - 1000.0f;
|
||||
sp54 += player->unk_0AC;
|
||||
sp48 += player->unk_0AC;
|
||||
if (player->unk_1D4 != 0) {
|
||||
@@ -102,15 +102,15 @@ void func_tank_80043468(Player* player) {
|
||||
}
|
||||
}
|
||||
if (player->vel.y < -20.0f) {
|
||||
Math_SmoothStepToF(&player->camAt.y, sp4C - 100.0f, 0.2f, player->unk_014 * 20.0f, 0.00001f);
|
||||
Math_SmoothStepToF(&player->cam.at.y, sp4C - 100.0f, 0.2f, player->unk_014 * 20.0f, 0.00001f);
|
||||
}
|
||||
Math_SmoothStepToF(&player->camEye.x, sp54, 0.1f, player->unk_014 * 20.0f, 0.00001f);
|
||||
Math_SmoothStepToF(&player->camEye.y, sp50, 0.1f, player->unk_014 * 7.0f, 0.00001f);
|
||||
Math_SmoothStepToF(&player->camAt.y, sp4C, 0.1f, player->unk_014 * 7.0f, 0.00001f);
|
||||
Math_SmoothStepToF(&player->camAt.x, sp48, 0.1f, player->unk_014 * 20.0f, 0.00001f);
|
||||
Math_SmoothStepToF(&player->camEye.z, 200.0f, 0.1f, player->unk_014 * 10.0f, 0.0f);
|
||||
Math_SmoothStepToF(&player->camAt.z, sp40, 1.0f, player->unk_014 * 10.0f, 0.0f);
|
||||
Math_SmoothStepToF(&player->unk_034, player->unk_0EC * -0.4f, 0.1f, 1.0f, 0.01f);
|
||||
Math_SmoothStepToF(&player->cam.eye.x, sp54, 0.1f, player->unk_014 * 20.0f, 0.00001f);
|
||||
Math_SmoothStepToF(&player->cam.eye.y, sp50, 0.1f, player->unk_014 * 7.0f, 0.00001f);
|
||||
Math_SmoothStepToF(&player->cam.at.y, sp4C, 0.1f, player->unk_014 * 7.0f, 0.00001f);
|
||||
Math_SmoothStepToF(&player->cam.at.x, sp48, 0.1f, player->unk_014 * 20.0f, 0.00001f);
|
||||
Math_SmoothStepToF(&player->cam.eye.z, 200.0f, 0.1f, player->unk_014 * 10.0f, 0.0f);
|
||||
Math_SmoothStepToF(&player->cam.at.z, sp40, 1.0f, player->unk_014 * 10.0f, 0.0f);
|
||||
Math_SmoothStepToF(&player->camRoll, player->unk_0EC * -0.4f, 0.1f, 1.0f, 0.01f);
|
||||
Math_SmoothStepToF(&player->unk_014, 1.0f, 1.0f, 0.1f, 0.0f);
|
||||
}
|
||||
|
||||
@@ -155,13 +155,13 @@ void func_tank_80043B18(Player* player) {
|
||||
Vec3f sp3C;
|
||||
f32 sp38;
|
||||
|
||||
Matrix_Translate(gCalcMatrix, 0.0f, player->unk_18C + 30.0f, 0, 0);
|
||||
Matrix_RotateY(gCalcMatrix, player->unk_114 * M_DTOR, 1);
|
||||
Matrix_RotateX(gCalcMatrix, player->unk_0E4 * M_DTOR, 1);
|
||||
Matrix_RotateZ(gCalcMatrix, (player->unk_0EC + player->unk_0F0) * M_DTOR, 1);
|
||||
Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + 180.0f) * M_DTOR, 1);
|
||||
Matrix_RotateZ(gCalcMatrix, -player->unk_12C * M_DTOR, 1);
|
||||
Matrix_Translate(gCalcMatrix, 0.0f, -30.0f, 0, 1);
|
||||
Matrix_Translate(gCalcMatrix, 0.0f, player->unk_18C + 30.0f, 0, MTXF_NEW);
|
||||
Matrix_RotateY(gCalcMatrix, player->unk_114 * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateX(gCalcMatrix, player->unk_0E4 * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateZ(gCalcMatrix, (player->unk_0EC + player->unk_0F0) * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + 180.0f) * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateZ(gCalcMatrix, -player->unk_12C * M_DTOR, MTXF_APPLY);
|
||||
Matrix_Translate(gCalcMatrix, 0.0f, -30.0f, 0, MTXF_APPLY);
|
||||
sp48.y = 0.0f;
|
||||
sp48.z = -20.0f;
|
||||
sp38 = player->unk_114;
|
||||
@@ -247,7 +247,7 @@ void func_tank_800441C8(Player* player, f32* hitboxData, f32 xPos, f32 yPos, f32
|
||||
f32 y;
|
||||
f32 z;
|
||||
|
||||
Matrix_RotateY(gCalcMatrix, -yRot * M_DTOR, 0);
|
||||
Matrix_RotateY(gCalcMatrix, -yRot * M_DTOR, MTXF_NEW);
|
||||
count = *hitboxData++;
|
||||
if (count != 0) {
|
||||
for (i = 0; i < count; i++, hitboxData += 6) {
|
||||
@@ -490,7 +490,7 @@ void func_tank_80044868(Player* player) {
|
||||
if ((gCurrentLevel == LEVEL_TITANIA) && (gBossActive == 0)) {
|
||||
func_tank_80043280(D_landmaster_3005EA8, D_TI_6009BB8, gGameFrameCount * -55.0f);
|
||||
}
|
||||
if ((gCurrentLevel == LEVEL_MACBETH) && (player->state_1C8 == PLAYERSTATE_1C8_7)) {
|
||||
if ((gCurrentLevel == LEVEL_MACBETH) && (player->state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) {
|
||||
func_tank_80043280(D_landmaster_3005EA8, *D_Tex_800DACB8, gGameFrameCount * -55.0f);
|
||||
}
|
||||
}
|
||||
@@ -760,7 +760,7 @@ void func_tank_800460E0(Player* player, f32* hitboxData, f32 arg2, f32 arg3, f32
|
||||
s32 i;
|
||||
s32 count;
|
||||
|
||||
Matrix_RotateY(gCalcMatrix, -arg6 * M_DTOR, 0);
|
||||
Matrix_RotateY(gCalcMatrix, -arg6 * M_DTOR, MTXF_NEW);
|
||||
count = *hitboxData++;
|
||||
if (count != 0) {
|
||||
for (i = 0; i < count; i++, hitboxData += 6) {
|
||||
@@ -829,7 +829,7 @@ void func_tank_8004641C(Player* player, s32 arg1, f32 arg2, f32 arg3, f32 arg4,
|
||||
Vec3f sp58;
|
||||
Vec3f sp4C;
|
||||
|
||||
Matrix_RotateY(gCalcMatrix, -arg6 * M_DTOR, 0);
|
||||
Matrix_RotateY(gCalcMatrix, -arg6 * M_DTOR, MTXF_NEW);
|
||||
sp70.x = player->vel.x;
|
||||
sp70.y = player->vel.y;
|
||||
sp70.z = player->vel.z;
|
||||
@@ -997,26 +997,26 @@ s32 func_tank_80046E40(Player* player, f32* hitboxData, s32* index, f32 xPos, f3
|
||||
for (i = 0; i < spB4; i++, hitboxData += 6) {
|
||||
spA0 = 0;
|
||||
if (hitboxData[0] == HITBOX_ROTATED) {
|
||||
Matrix_RotateZ(gCalcMatrix, -hitboxData[3] * M_DTOR, 0);
|
||||
Matrix_RotateX(gCalcMatrix, -hitboxData[1] * M_DTOR, 1);
|
||||
Matrix_RotateY(gCalcMatrix, -hitboxData[2] * M_DTOR, 1);
|
||||
Matrix_RotateZ(gCalcMatrix, -zRot * M_DTOR, 1);
|
||||
Matrix_RotateX(gCalcMatrix, -xRot * M_DTOR, 1);
|
||||
Matrix_RotateY(gCalcMatrix, -yRot * M_DTOR, 1);
|
||||
Matrix_RotateZ(gCalcMatrix, -hitboxData[3] * M_DTOR, MTXF_NEW);
|
||||
Matrix_RotateX(gCalcMatrix, -hitboxData[1] * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateY(gCalcMatrix, -hitboxData[2] * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateZ(gCalcMatrix, -zRot * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateX(gCalcMatrix, -xRot * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateY(gCalcMatrix, -yRot * M_DTOR, MTXF_APPLY);
|
||||
hitboxData += 4;
|
||||
spA0 = 1.0f;
|
||||
} else {
|
||||
if (hitboxData[0] == HITBOX_SHADOW) {
|
||||
hitboxData++;
|
||||
}
|
||||
Matrix_RotateZ(gCalcMatrix, -zRot * M_DTOR, 0);
|
||||
Matrix_RotateX(gCalcMatrix, -xRot * M_DTOR, 1);
|
||||
Matrix_RotateY(gCalcMatrix, -yRot * M_DTOR, 1);
|
||||
Matrix_RotateZ(gCalcMatrix, -zRot * M_DTOR, MTXF_NEW);
|
||||
Matrix_RotateX(gCalcMatrix, -xRot * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateY(gCalcMatrix, -yRot * M_DTOR, MTXF_APPLY);
|
||||
}
|
||||
if ((arg9 != 0) || (argA != 0) || (argB != 0)) {
|
||||
Matrix_RotateZ(gCalcMatrix, -argB * M_DTOR, 1);
|
||||
Matrix_RotateX(gCalcMatrix, -arg9 * M_DTOR, 1);
|
||||
Matrix_RotateY(gCalcMatrix, -argA * M_DTOR, 1);
|
||||
Matrix_RotateZ(gCalcMatrix, -argB * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateX(gCalcMatrix, -arg9 * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateY(gCalcMatrix, -argA * M_DTOR, MTXF_APPLY);
|
||||
}
|
||||
if ((yRot == 0.0f) && (zRot == 0.0f) && (xRot == 0.0f) && (spA0 == 0)) {
|
||||
var_fv0 = player->hit1.x;
|
||||
@@ -1294,7 +1294,7 @@ void func_tank_80047FBC(Player* player) {
|
||||
if (!(D_800C9F08 & 1)) {
|
||||
Math_SmoothStepToF(&player->unk_0EC, -((player->vel.z / 5.0f) * 4.0f), 0.4f, 8.0f, 0.01f);
|
||||
if (player->unk_0EC >= 3.0f) {
|
||||
if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_7) {
|
||||
if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE) {
|
||||
AUDIO_PLAY_SFX(0x19000065, player->sfxSource, 0);
|
||||
}
|
||||
D_800C9F08 |= 1;
|
||||
|
||||
+14
-13
@@ -321,7 +321,7 @@ void func_versus_800BDE44(void) {
|
||||
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255);
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
if ((gPlayer[i].state_1C8 == PLAYERSTATE_1C8_3) || (gPlayer[i].state_1C8 == PLAYERSTATE_1C8_5)) {
|
||||
if ((gPlayer[i].state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (gPlayer[i].state_1C8 == PLAYERSTATE_1C8_U_TURN)) {
|
||||
if ((D_ctx_80177C30[i] != D_80178808[i]) || (D_80178810[i])) {
|
||||
D_80178810[i] += 4;
|
||||
if (D_80178810[i] > 15) {
|
||||
@@ -643,7 +643,7 @@ s32 func_versus_800BF17C(void) {
|
||||
for (i = 0, ret = 0; i < 4; i++) {
|
||||
D_80178850[i] = 1;
|
||||
|
||||
if (gPlayer[i].state_1C8 != PLAYERSTATE_1C8_13) {
|
||||
if (gPlayer[i].state_1C8 != PLAYERSTATE_1C8_VS_STANDBY) {
|
||||
D_80178850[i] = 0;
|
||||
D_801787F8[i] = 150;
|
||||
continue;
|
||||
@@ -767,7 +767,7 @@ void func_versus_800BF750(void) {
|
||||
RCP_SetupDL(&gMasterDisp, 0x4C);
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
if (gPlayer[i].state_1C8 != PLAYERSTATE_1C8_3) {
|
||||
if (gPlayer[i].state_1C8 != PLAYERSTATE_1C8_ACTIVE) {
|
||||
continue;
|
||||
}
|
||||
for (j = 0, temp = 0; j < 4; j++) {
|
||||
@@ -790,10 +790,10 @@ s32 func_versus_800BF9AC(void) {
|
||||
switch (D_ctx_801778AC) {
|
||||
case 0:
|
||||
for (i = 0, var_a3 = 0; i < 4; i++) {
|
||||
if (gPlayer[i].state_1C8 != PLAYERSTATE_1C8_13) {
|
||||
if (gPlayer[i].state_1C8 != PLAYERSTATE_1C8_VS_STANDBY) {
|
||||
D_801787A8 = i;
|
||||
}
|
||||
if (gPlayer[i].state_1C8 == PLAYERSTATE_1C8_13) {
|
||||
if (gPlayer[i].state_1C8 == PLAYERSTATE_1C8_VS_STANDBY) {
|
||||
var_a3 += 1;
|
||||
}
|
||||
}
|
||||
@@ -828,7 +828,7 @@ s32 func_versus_800BF9AC(void) {
|
||||
if (gPlayer[j].unk_288 >= 0) {
|
||||
gPlayer[j].unk_288 = i + 1;
|
||||
}
|
||||
gPlayer[j].state_1C8 = PLAYERSTATE_1C8_13;
|
||||
gPlayer[j].state_1C8 = PLAYERSTATE_1C8_VS_STANDBY;
|
||||
}
|
||||
D_ctx_80177E74 = 1;
|
||||
D_801787A8 = i;
|
||||
@@ -837,10 +837,10 @@ s32 func_versus_800BF9AC(void) {
|
||||
case 1:
|
||||
|
||||
for (i = 0, var_a3 = 0; i < 4; i++) {
|
||||
if (gPlayer[i].state_1C8 != PLAYERSTATE_1C8_13) {
|
||||
if (gPlayer[i].state_1C8 != PLAYERSTATE_1C8_VS_STANDBY) {
|
||||
D_801787A8 = i;
|
||||
}
|
||||
if (gPlayer[i].state_1C8 == PLAYERSTATE_1C8_13) {
|
||||
if (gPlayer[i].state_1C8 == PLAYERSTATE_1C8_VS_STANDBY) {
|
||||
var_a3 += 1;
|
||||
}
|
||||
}
|
||||
@@ -869,7 +869,7 @@ s32 func_versus_800BF9AC(void) {
|
||||
if (gPlayer[j].unk_288 >= 0) {
|
||||
gPlayer[j].unk_288 = i + 1;
|
||||
}
|
||||
gPlayer[j].state_1C8 = PLAYERSTATE_1C8_13;
|
||||
gPlayer[j].state_1C8 = PLAYERSTATE_1C8_VS_STANDBY;
|
||||
}
|
||||
D_ctx_80177E74 = 1;
|
||||
break;
|
||||
@@ -881,7 +881,8 @@ s32 func_versus_800BF9AC(void) {
|
||||
|
||||
if (D_ctx_801778AC == 2) {
|
||||
for (i = 0; i < 4; i++) {
|
||||
if ((gPlayer[i].state_1C8 == PLAYERSTATE_1C8_4) || (gPlayer[i].state_1C8 == PLAYERSTATE_1C8_13)) {
|
||||
if ((gPlayer[i].state_1C8 == PLAYERSTATE_1C8_DOWN) ||
|
||||
(gPlayer[i].state_1C8 == PLAYERSTATE_1C8_VS_STANDBY)) {
|
||||
D_ctx_80177C30[i] = D_80178838[i] = D_80178808[i] = D_80178810[i] = 0;
|
||||
D_80178820[i] += 1;
|
||||
}
|
||||
@@ -994,7 +995,7 @@ s32 func_versus_800BF9AC(void) {
|
||||
gPlayer[j].unk_288 = i + 1;
|
||||
}
|
||||
|
||||
gPlayer[j].state_1C8 = PLAYERSTATE_1C8_13;
|
||||
gPlayer[j].state_1C8 = PLAYERSTATE_1C8_VS_STANDBY;
|
||||
}
|
||||
D_ctx_80177E74 = 1;
|
||||
break;
|
||||
@@ -1959,7 +1960,7 @@ void func_versus_800C2244(Actor* actor) {
|
||||
actor->vel.y = 0.0f;
|
||||
}
|
||||
|
||||
func_360_8003088C(actor);
|
||||
ActorAllRange_ApplyDamage(actor);
|
||||
|
||||
if (actor->iwork[8]) {
|
||||
actor->iwork[8]--;
|
||||
@@ -1992,7 +1993,7 @@ void func_versus_800C26C8(void) {
|
||||
Actor_Initialize(actor);
|
||||
actor->obj.status = OBJ_ACTIVE;
|
||||
actor->obj.id = 197;
|
||||
Matrix_RotateY(gCalcMatrix, M_DTOR * RAND_FLOAT(360.0f), 0);
|
||||
Matrix_RotateY(gCalcMatrix, M_DTOR * RAND_FLOAT(360.0f), MTXF_NEW);
|
||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest);
|
||||
actor->obj.pos.x = dest.x;
|
||||
actor->obj.pos.y = dest.y;
|
||||
|
||||
Reference in New Issue
Block a user