mirror of
https://github.com/HarbourMasters/Starship.git
synced 2025-02-03 08:43:56 +03:00
matches (#123)
This commit is contained in:
parent
f88d780765
commit
c289b5d213
@ -215,7 +215,6 @@ void func_8003DE68(s32 arg0, s32 arg1) {
|
|||||||
void func_8003E1E0(void) {
|
void func_8003E1E0(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef NON_MATCHING
|
|
||||||
void func_8003E1E8(void) {
|
void func_8003E1E8(void) {
|
||||||
f32 sp13C;
|
f32 sp13C;
|
||||||
f32 sp138;
|
f32 sp138;
|
||||||
@ -252,7 +251,7 @@ void func_8003E1E8(void) {
|
|||||||
case LEVEL_VENOM_2:
|
case LEVEL_VENOM_2:
|
||||||
case LEVEL_VERSUS:
|
case LEVEL_VERSUS:
|
||||||
sp134 = (gPlayer[gPlayerNum].unk_05C * -6000.0f) - (gPlayer[gPlayerNum].camEye.y * 0.4f);
|
sp134 = (gPlayer[gPlayerNum].unk_05C * -6000.0f) - (gPlayer[gPlayerNum].camEye.y * 0.4f);
|
||||||
sp13C = Math_ModF(Math_RadToDeg(gPlayer[gPlayerNum].unk_058) * -20.222221f * 5.0f, 7280.0f);
|
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_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].unk_034 * M_DTOR, 1);
|
||||||
Matrix_Translate(gGfxMatrix, sp13C, -2000.0f + sp134, -6000.0f, 1);
|
Matrix_Translate(gGfxMatrix, sp13C, -2000.0f + sp134, -6000.0f, 1);
|
||||||
if (gCurrentLevel == LEVEL_FORTUNA) {
|
if (gCurrentLevel == LEVEL_FORTUNA) {
|
||||||
@ -307,7 +306,7 @@ void func_8003E1E8(void) {
|
|||||||
case LEVEL_CORNERIA:
|
case LEVEL_CORNERIA:
|
||||||
case LEVEL_VENOM_1:
|
case LEVEL_VENOM_1:
|
||||||
sp134 = (gPlayer[gPlayerNum].unk_05C * -6000.0f) - (gPlayer[gPlayerNum].camEye.y * 0.6f);
|
sp134 = (gPlayer[gPlayerNum].unk_05C * -6000.0f) - (gPlayer[gPlayerNum].camEye.y * 0.6f);
|
||||||
sp13C = Math_ModF(Math_RadToDeg(gPlayer[gPlayerNum].unk_058) * -20.222221f * 5.0f, 7280.0f);
|
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_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].unk_034 * M_DTOR, 1);
|
||||||
Matrix_Translate(gGfxMatrix, sp13C, -2000.0f + sp134, -6000.0f, 1);
|
Matrix_Translate(gGfxMatrix, sp13C, -2000.0f + sp134, -6000.0f, 1);
|
||||||
Matrix_SetGfxMtx(&gMasterDisp);
|
Matrix_SetGfxMtx(&gMasterDisp);
|
||||||
@ -352,7 +351,8 @@ void func_8003E1E8(void) {
|
|||||||
(s32) D_800C9C30);
|
(s32) D_800C9C30);
|
||||||
|
|
||||||
sp134 = (gPlayer[gPlayerNum].unk_05C * -6000.0f) - (gPlayer[gPlayerNum].camEye.y * 0.4f);
|
sp134 = (gPlayer[gPlayerNum].unk_05C * -6000.0f) - (gPlayer[gPlayerNum].camEye.y * 0.4f);
|
||||||
sp13C = Math_ModF(Math_RadToDeg(gPlayer[gPlayerNum].unk_058) * -20.222221f * 5.0f, 7280.0f);
|
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_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].unk_034 * M_DTOR, 1);
|
||||||
Matrix_Translate(gGfxMatrix, sp13C, -2000.0f + sp134, -6000.0f, 1);
|
Matrix_Translate(gGfxMatrix, sp13C, -2000.0f + sp134, -6000.0f, 1);
|
||||||
Matrix_Translate(gGfxMatrix, 0.0f, -2500.0f, 0.0f, 1);
|
Matrix_Translate(gGfxMatrix, 0.0f, -2500.0f, 0.0f, 1);
|
||||||
@ -362,6 +362,7 @@ void func_8003E1E8(void) {
|
|||||||
Matrix_SetGfxMtx(&gMasterDisp);
|
Matrix_SetGfxMtx(&gMasterDisp);
|
||||||
gSPDisplayList(gMasterDisp++, D_60038E0);
|
gSPDisplayList(gMasterDisp++, D_60038E0);
|
||||||
} else {
|
} else {
|
||||||
|
fake_label: // fake
|
||||||
RCP_SetupDL(&gMasterDisp, 0x3E);
|
RCP_SetupDL(&gMasterDisp, 0x3E);
|
||||||
if (D_80177AB0 == 5) {
|
if (D_80177AB0 == 5) {
|
||||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 64);
|
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 64);
|
||||||
@ -391,7 +392,7 @@ void func_8003E1E8(void) {
|
|||||||
if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_2) {
|
if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_2) {
|
||||||
sp13C = ((Math_RadToDeg(gPlayer[gPlayerNum].unk_058) - gPlayer[gPlayerNum].unk_114));
|
sp13C = ((Math_RadToDeg(gPlayer[gPlayerNum].unk_058) - gPlayer[gPlayerNum].unk_114));
|
||||||
sp134 = (gPlayer[gPlayerNum].unk_05C * -7000.0f) - (gPlayer[gPlayerNum].camEye.y * 0.6f);
|
sp134 = (gPlayer[gPlayerNum].unk_05C * -7000.0f) - (gPlayer[gPlayerNum].camEye.y * 0.6f);
|
||||||
sp13C = Math_ModF(sp13C * -40.44444f * 2.0f, 7280.0f);
|
sp13C = Math_ModF(sp13C * -40.44444f * 2.0f, 7280.0f); // close to 7280.0f / 180.0f
|
||||||
RCP_SetupDL_17();
|
RCP_SetupDL_17();
|
||||||
Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].unk_034 * M_DTOR, 1);
|
Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].unk_034 * M_DTOR, 1);
|
||||||
Matrix_Scale(gGfxMatrix, 1.5f, 1.0f, 1.0f, 1);
|
Matrix_Scale(gGfxMatrix, 1.5f, 1.0f, 1.0f, 1);
|
||||||
@ -424,9 +425,9 @@ void func_8003E1E8(void) {
|
|||||||
case LEVEL_ZONESS:
|
case LEVEL_ZONESS:
|
||||||
case LEVEL_MACBETH:
|
case LEVEL_MACBETH:
|
||||||
case LEVEL_TITANIA:
|
case LEVEL_TITANIA:
|
||||||
sp138 = Math_RadToDeg(gPlayer[gPlayerNum].unk_058) - gPlayer[gPlayerNum].unk_114;
|
sp12C = Math_RadToDeg(gPlayer[gPlayerNum].unk_058) - gPlayer[gPlayerNum].unk_114;
|
||||||
sp134 = (gPlayer[gPlayerNum].unk_05C * -7000.0f) - (gPlayer[gPlayerNum].camEye.y * 0.6f);
|
sp134 = (gPlayer[gPlayerNum].unk_05C * -7000.0f) - (gPlayer[gPlayerNum].camEye.y * 0.6f);
|
||||||
sp13C = sp138 * -40.44444f * 2.0f;
|
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_2) &&
|
||||||
(gPlayer[0].unk_1D0 < 3)) {
|
(gPlayer[0].unk_1D0 < 3)) {
|
||||||
D_8015F968 += __sinf(gPlayer[0].unk_058) * 20.0f;
|
D_8015F968 += __sinf(gPlayer[0].unk_058) * 20.0f;
|
||||||
@ -647,9 +648,6 @@ void func_8003E1E8(void) {
|
|||||||
}
|
}
|
||||||
Matrix_Pop(&gGfxMatrix);
|
Matrix_Pop(&gGfxMatrix);
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
#pragma GLOBAL_ASM("asm/us/nonmatchings/main/fox_bg/func_8003E1E8.s")
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void func_80040450(void) {
|
void func_80040450(void) {
|
||||||
f32 sp44;
|
f32 sp44;
|
||||||
|
@ -1400,14 +1400,18 @@ void func_8006566C(f32 xPos, f32 yPos, f32 zPos, s32 arg3) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef NON_EQUIVALENT
|
|
||||||
void func_800656D4(Actor* actor) {
|
void func_800656D4(Actor* actor) {
|
||||||
|
s32 i;
|
||||||
|
s32 j;
|
||||||
f32 spD4;
|
f32 spD4;
|
||||||
f32 spD0;
|
f32 spD0;
|
||||||
f32 spCC;
|
f32 spCC;
|
||||||
|
f32 var_fv0;
|
||||||
s32 spC4;
|
s32 spC4;
|
||||||
|
s32 var_ra;
|
||||||
s32 spB4[3];
|
s32 spB4[3];
|
||||||
s32 spA8[3];
|
s32 spA8[3];
|
||||||
|
s32 temp_a3_2;
|
||||||
Vec3f sp98;
|
Vec3f sp98;
|
||||||
Vec3f sp8C;
|
Vec3f sp8C;
|
||||||
f32 sp88;
|
f32 sp88;
|
||||||
@ -1415,35 +1419,25 @@ void func_800656D4(Actor* actor) {
|
|||||||
f32 sp80;
|
f32 sp80;
|
||||||
f32 sp7C;
|
f32 sp7C;
|
||||||
f32 sp78;
|
f32 sp78;
|
||||||
s32 var_ra;
|
|
||||||
f32 var_fv0;
|
|
||||||
s32 temp_a0;
|
|
||||||
s32 temp_a2;
|
|
||||||
s32 temp_t9;
|
|
||||||
s32 temp_v0;
|
|
||||||
s32 i;
|
|
||||||
s32 j;
|
|
||||||
|
|
||||||
if (gLevelMode == LEVELMODE_ALL_RANGE) {
|
var_ra = (gLevelMode == LEVELMODE_ALL_RANGE) ? 2 : 0;
|
||||||
var_ra = 2;
|
|
||||||
} else {
|
if (actor->iwork[2] == 0) {
|
||||||
var_ra = 0;
|
|
||||||
}
|
|
||||||
if (actor->unk_058 == 0) {
|
|
||||||
if (actor->obj.id == OBJ_ACTOR_190) {
|
if (actor->obj.id == OBJ_ACTOR_190) {
|
||||||
for (i = 0, j = 1; j < 4; i++, j++) {
|
for (i = 0; i < 3; i++) {
|
||||||
spA8[i] = var_ra + j;
|
spB4[i] = gTeamShields[i + 1];
|
||||||
spB4[i] = gTeamShields[j];
|
spA8[i] = var_ra + i;
|
||||||
}
|
}
|
||||||
for (i = 0, j = 1; j < 3; i++, j++) {
|
for (i = 0; i < 3; i++) {
|
||||||
temp_a0 = spB4[i];
|
for (j = i + 1; j < 3; j++) {
|
||||||
temp_a2 = spB4[j];
|
|
||||||
temp_v0 = spA8[j];
|
|
||||||
if (spB4[i] < spB4[j]) {
|
if (spB4[i] < spB4[j]) {
|
||||||
|
temp_a3_2 = spB4[j];
|
||||||
|
spB4[j] = spB4[i];
|
||||||
|
spB4[i] = temp_a3_2;
|
||||||
|
temp_a3_2 = spA8[j];
|
||||||
spA8[j] = spA8[i];
|
spA8[j] = spA8[i];
|
||||||
spB4[j] = temp_a0;
|
spA8[i] = temp_a3_2;
|
||||||
spB4[i] = temp_a2;
|
}
|
||||||
spA8[i] = temp_v0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
switch (gGameFrameCount % 6U) {
|
switch (gGameFrameCount % 6U) {
|
||||||
@ -1479,33 +1473,35 @@ void func_800656D4(Actor* actor) {
|
|||||||
}
|
}
|
||||||
actor->iwork[1] = 10000;
|
actor->iwork[1] = 10000;
|
||||||
label:
|
label:
|
||||||
actor->unk_058 = 1;
|
actor->iwork[2] = 1;
|
||||||
}
|
}
|
||||||
spC4 = actor->iwork[1];
|
spC4 = actor->iwork[1];
|
||||||
if ((spC4 == var_ra) || ((var_ra + 1) == spC4) || ((var_ra + 2) == spC4)) {
|
if ((spC4 == var_ra) || ((var_ra + 1) == spC4) || ((var_ra + 2) == spC4)) {
|
||||||
actor->unk_188 = gActors[spC4].obj.pos.z;
|
actor->fwork[29] = gActors[spC4].obj.pos.z;
|
||||||
actor->unk_184 = gActors[spC4].obj.pos.y;
|
actor->fwork[28] = gActors[spC4].obj.pos.y;
|
||||||
actor->unk_180 = gActors[spC4].obj.pos.x;
|
actor->fwork[27] = gActors[spC4].obj.pos.x;
|
||||||
if ((fabsf(actor->obj.pos.x - gActors[spC4].obj.pos.x) < 400.0f) &&
|
if ((fabsf(actor->obj.pos.x - gActors[spC4].obj.pos.x) < 400.0f) &&
|
||||||
(fabsf(actor->obj.pos.z - gActors[spC4].obj.pos.z) < 400.0f)) {
|
(fabsf(actor->obj.pos.z - gActors[spC4].obj.pos.z) < 400.0f)) {
|
||||||
if (RAND_FLOAT(spC4 - 1) < 0.6f) {
|
if (RAND_FLOAT(spC4 - 1) < 0.6f) {
|
||||||
gActors[spC4].iwork[9] = 1;
|
gActors[spC4].iwork[10] = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
actor->unk_188 = gPlayer[0].unk_138;
|
actor->fwork[29] = gPlayer[0].unk_138;
|
||||||
actor->unk_184 = gPlayer[0].pos.y;
|
actor->fwork[28] = gPlayer[0].pos.y;
|
||||||
actor->unk_180 = gPlayer[0].pos.x;
|
actor->fwork[27] = gPlayer[0].pos.x;
|
||||||
}
|
}
|
||||||
if (actor->timer_0BC != 0) {
|
if (actor->timer_0BC != 0) {
|
||||||
Math_SmoothStepToAngle(&actor->obj.rot.x, 0.0f, 0.3f, 4.0f, 0.001f);
|
Math_SmoothStepToAngle(&actor->obj.rot.x, 0.0f, 0.3f, 4.0f, 0.001f);
|
||||||
} else {
|
} else {
|
||||||
if ((actor->iwork[10] == 0) && ((fabsf(actor->unk_180 - actor->obj.pos.x) > 300.0f) ||
|
if ((actor->iwork[10] == 0) && ((fabsf(actor->fwork[27] - actor->obj.pos.x) > 300.0f) ||
|
||||||
(fabsf(actor->unk_188 - actor->obj.pos.z) > 300.0f))) {
|
(fabsf(actor->fwork[29] - actor->obj.pos.z) > 300.0f))) {
|
||||||
actor->fwork[0] += 5.0f;
|
actor->fwork[0] += 5.0f;
|
||||||
actor->fwork[1] += 8.0f;
|
actor->fwork[1] += 8.0f;
|
||||||
sp80 = sqrtf(SQ(actor->unk_180 - actor->obj.pos.x) + SQ(actor->unk_188 - actor->obj.pos.z)) * 0.2f;
|
sp88 = actor->fwork[27] - actor->obj.pos.x;
|
||||||
|
sp80 = actor->fwork[29] - actor->obj.pos.z;
|
||||||
|
sp80 = sqrtf(SQ(sp88) + SQ(sp80)) * 0.2f;
|
||||||
if (actor->unk_0B4 == 1) {
|
if (actor->unk_0B4 == 1) {
|
||||||
sp80 = 0.1f;
|
sp80 = 0.1f;
|
||||||
}
|
}
|
||||||
@ -1513,16 +1509,19 @@ void func_800656D4(Actor* actor) {
|
|||||||
sp88 = COS_DEG(actor->fwork[1]) * sp80;
|
sp88 = COS_DEG(actor->fwork[1]) * sp80;
|
||||||
spD4 = COS_DEG(actor->obj.rot.y) * sp88;
|
spD4 = COS_DEG(actor->obj.rot.y) * sp88;
|
||||||
spCC = -SIN_DEG(actor->obj.rot.y) * sp88;
|
spCC = -SIN_DEG(actor->obj.rot.y) * sp88;
|
||||||
sp88 = (actor->unk_180 + spD4) - actor->obj.pos.x;
|
|
||||||
sp84 = (actor->unk_184 + spD0) - actor->obj.pos.y;
|
sp88 = (actor->fwork[27] + spD4) - actor->obj.pos.x;
|
||||||
sp80 = (actor->unk_188 + spCC) - actor->obj.pos.z;
|
sp84 = (actor->fwork[28] + spD0) - actor->obj.pos.y;
|
||||||
|
sp80 = (actor->fwork[29] + spCC) - actor->obj.pos.z;
|
||||||
sp78 = Math_RadToDeg(Math_Atan2F(sp88, sp80));
|
sp78 = Math_RadToDeg(Math_Atan2F(sp88, sp80));
|
||||||
sp7C = Math_RadToDeg(-Math_Atan2F(sp84, sqrtf(SQ(sp88) + SQ(sp80))));
|
sp80 = sqrtf(SQ(sp88) + SQ(sp80));
|
||||||
|
sp7C = Math_RadToDeg(-Math_Atan2F(sp84, sp80));
|
||||||
sp84 = Math_SmoothStepToAngle(&actor->obj.rot.y, sp78, 0.3f, 4.0f, 0.001f);
|
sp84 = Math_SmoothStepToAngle(&actor->obj.rot.y, sp78, 0.3f, 4.0f, 0.001f);
|
||||||
Math_SmoothStepToAngle(&actor->obj.rot.x, sp7C, 0.3f, 4.0f, 0.001f);
|
Math_SmoothStepToAngle(&actor->obj.rot.x, sp7C, 0.3f, 4.0f, 0.001f);
|
||||||
}
|
}
|
||||||
if ((fabsf(actor->unk_180 - actor->obj.pos.x) < 60.0f) && (fabsf(actor->unk_184 - actor->obj.pos.y) < 60.0f) &&
|
if ((fabsf(actor->fwork[27] - actor->obj.pos.x) < 60.0f) &&
|
||||||
(fabsf(actor->unk_188 - actor->obj.pos.z) < 60.0f) && ((spC4 == 2) || (spC4 == 3) || (spC4 == 4))) {
|
(fabsf(actor->fwork[28] - actor->obj.pos.y) < 60.0f) &&
|
||||||
|
(fabsf(actor->fwork[29] - actor->obj.pos.z) < 60.0f) && ((spC4 == 2) || (spC4 == 3) || (spC4 == 4))) {
|
||||||
gActors[spC4].unk_0D0 = 1;
|
gActors[spC4].unk_0D0 = 1;
|
||||||
gActors[spC4].damage = 20;
|
gActors[spC4].damage = 20;
|
||||||
gActors[spC4].unk_0D4 = 2;
|
gActors[spC4].unk_0D4 = 2;
|
||||||
@ -1588,9 +1587,6 @@ void func_800656D4(Actor* actor) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
#pragma GLOBAL_ASM("asm/us/nonmatchings/main/fox_enmy/func_800656D4.s")
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void func_800660F0(Actor* actor) {
|
void func_800660F0(Actor* actor) {
|
||||||
Item* item = gItems;
|
Item* item = gItems;
|
||||||
|
Loading…
Reference in New Issue
Block a user