Port m432 and m434
This commit is contained in:
parent
383feca5f5
commit
900a533d59
12 changed files with 627 additions and 560 deletions
|
|
@ -11,6 +11,7 @@
|
|||
#include "game/gamework_data.h"
|
||||
#include "game/minigame_seq.h"
|
||||
#include "math.h"
|
||||
#include "version.h"
|
||||
|
||||
|
||||
typedef struct bss_7480_struct {
|
||||
|
|
@ -246,16 +247,16 @@ void fn_1_6DBC(omObjData *object)
|
|||
temp_r31->unk34.y += (75.0f - temp_r31->unk34.y) * 0.02f;
|
||||
}
|
||||
temp_r31->unk34.x += (temp_r31->unk34.y - temp_r31->unk34.x) * 0.2f;
|
||||
temp_r31->unk1C.x += sind(temp_r31->unk34.z) * ((1.0f / 60.0f) * temp_r31->unk34.x);
|
||||
temp_r31->unk1C.z += cosd(temp_r31->unk34.z) * ((1.0f / 60.0f) * temp_r31->unk34.x);
|
||||
temp_r31->unk40.y += (1.0f / 60.0f) * temp_r31->unk34.x;
|
||||
temp_r31->unk1C.x += sind(temp_r31->unk34.z) * ((1.0f / REFRESH_RATE) * temp_r31->unk34.x);
|
||||
temp_r31->unk1C.z += cosd(temp_r31->unk34.z) * ((1.0f / REFRESH_RATE) * temp_r31->unk34.x);
|
||||
temp_r31->unk40.y += (1.0f / REFRESH_RATE) * temp_r31->unk34.x;
|
||||
temp_r31->unk18 = fn_1_8254(temp_r31->unk18, &temp_r31->unk1C);
|
||||
Hu3DModelPosSetV(temp_r31->unk2, &temp_r31->unk1C);
|
||||
Hu3DModelRotSet(temp_r31->unk2, 0, temp_r31->unk34.z, 0);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
temp_r31->unk34.z += 3.0000002f;
|
||||
temp_r31->unk34.z += 1.0f / REFRESH_RATE * 180.0f;
|
||||
Hu3DModelPosSetV(temp_r31->unk2, &temp_r31->unk1C);
|
||||
Hu3DModelRotSet(temp_r31->unk2, 0, temp_r31->unk34.z, 0);
|
||||
if (fn_1_1D54() == 4) {
|
||||
|
|
@ -274,9 +275,9 @@ void fn_1_6DBC(omObjData *object)
|
|||
}
|
||||
VECSubtract(&sp8, &temp_r31->unk1C, &sp8);
|
||||
temp_r31->unk40.x = temp_r31->unk34.z = atan2d(sp8.x, sp8.z);
|
||||
temp_r31->unk28.x = (1.0f / 60.0f) * sp8.x;
|
||||
temp_r31->unk28.y = 6.666667f;
|
||||
temp_r31->unk28.z = (1.0f / 60.0f) * sp8.z;
|
||||
temp_r31->unk28.x = (1.0f / REFRESH_RATE) * sp8.x;
|
||||
temp_r31->unk28.y = VERSION_NTSC ? 6.666667f : 8.0f;
|
||||
temp_r31->unk28.z = (1.0f / REFRESH_RATE) * sp8.z;
|
||||
temp_r31->unk8++;
|
||||
HuAudFXPlay(1734);
|
||||
}
|
||||
|
|
@ -284,7 +285,7 @@ void fn_1_6DBC(omObjData *object)
|
|||
if (temp_r31->unk1C.y <= -15.000001f) {
|
||||
temp_r29 = 1;
|
||||
}
|
||||
temp_r31->unk28.y += -0.27222225f;
|
||||
temp_r31->unk28.y += VERSION_NTSC ? -0.27222225f : -0.392f;
|
||||
VECAdd(&temp_r31->unk1C, &temp_r31->unk28, &temp_r31->unk1C);
|
||||
if (!temp_r29 && temp_r31->unk1C.y <= -15.000001f) {
|
||||
fn_1_43AC(&temp_r31->unk1C);
|
||||
|
|
@ -345,9 +346,9 @@ void fn_1_6DBC(omObjData *object)
|
|||
temp_r31->unk34.z = fn_1_6690(temp_r31->unk34.z, temp_r31->unk40.x, 0.07f);
|
||||
temp_r31->unk34.y += (50.0f - temp_r31->unk34.y) * 0.02f;
|
||||
temp_r31->unk34.x += (temp_r31->unk34.y - temp_r31->unk34.x) * 0.2f;
|
||||
temp_r31->unk1C.x += sind(temp_r31->unk34.z) * ((1.0f / 60.0f) * temp_r31->unk34.x);
|
||||
temp_r31->unk1C.z += cosd(temp_r31->unk34.z) * ((1.0f / 60.0f) * temp_r31->unk34.x);
|
||||
temp_r31->unk40.y += (1.0f / 60.0f) * temp_r31->unk34.x;
|
||||
temp_r31->unk1C.x += sind(temp_r31->unk34.z) * ((1.0f / REFRESH_RATE) * temp_r31->unk34.x);
|
||||
temp_r31->unk1C.z += cosd(temp_r31->unk34.z) * ((1.0f / REFRESH_RATE) * temp_r31->unk34.x);
|
||||
temp_r31->unk40.y += (1.0f / REFRESH_RATE) * temp_r31->unk34.x;
|
||||
Hu3DModelPosSetV(temp_r31->unk2, &temp_r31->unk1C);
|
||||
Hu3DModelRotSet(temp_r31->unk2, 0, temp_r31->unk34.z, 0);
|
||||
|
||||
|
|
@ -363,16 +364,16 @@ void fn_1_6DBC(omObjData *object)
|
|||
}
|
||||
VECSubtract(&sp8, &temp_r31->unk1C, &sp8);
|
||||
temp_r31->unk40.x = temp_r31->unk34.z = atan2d(sp8.x, sp8.z);
|
||||
temp_r31->unk28.x = (1.0f / 60.0f) * sp8.x;
|
||||
temp_r31->unk28.y = 6.666667f;
|
||||
temp_r31->unk28.z = (1.0f / 60.0f) * sp8.z;
|
||||
temp_r31->unk28.x = (1.0f / REFRESH_RATE) * sp8.x;
|
||||
temp_r31->unk28.y = VERSION_NTSC ? 6.666667f : 8.0f;
|
||||
temp_r31->unk28.z = (1.0f / REFRESH_RATE) * sp8.z;
|
||||
temp_r31->unk8++;
|
||||
}
|
||||
temp_r29 = temp_r25 = 0;
|
||||
if (temp_r31->unk1C.y <= -15.000001f) {
|
||||
temp_r29 = 1;
|
||||
}
|
||||
temp_r31->unk28.y += -0.27222225f;
|
||||
temp_r31->unk28.y += VERSION_NTSC ? -0.27222225f : -0.392f;
|
||||
VECAdd(&temp_r31->unk1C, &temp_r31->unk28, &temp_r31->unk1C);
|
||||
if (temp_r31->unk1C.y <= -15.000001f) {
|
||||
temp_r25 = 1;
|
||||
|
|
@ -689,8 +690,8 @@ void fn_1_8C14(s32 arg0, Vec *arg1, float arg2)
|
|||
temp_r31 = lbl_1_bss_7480;
|
||||
for (temp_r30 = 0; temp_r30 < 32; temp_r30++, temp_r31++) {
|
||||
if (!temp_r31->unk0) {
|
||||
temp_r31->unk4 = 30;
|
||||
temp_r31->unk0 = (60.0f * (3.0f * arg2)) + 150.0f;
|
||||
temp_r31->unk4 = 0.5 * REFRESH_RATE;
|
||||
temp_r31->unk0 = (REFRESH_RATE * (3.0f * arg2)) + 2.5f * REFRESH_RATE;
|
||||
temp_r31->unk8 = arg0;
|
||||
temp_r31->unk14 = *arg1;
|
||||
temp_r31->unkC = 0;
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
#include "game/gamework_data.h"
|
||||
#include "game/minigame_seq.h"
|
||||
#include "math.h"
|
||||
#include "version.h"
|
||||
|
||||
typedef struct camera_view {
|
||||
float zoom;
|
||||
|
|
@ -127,9 +128,9 @@ void fn_1_558(omObjData *object)
|
|||
switch (fn_1_1D54()) {
|
||||
case 0:
|
||||
lbl_1_bss_3C2 = 60;
|
||||
lbl_1_bss_3C0 = 60;
|
||||
lbl_1_bss_3C0 = REFRESH_RATE;
|
||||
fn_1_1D64(1);
|
||||
lbl_1_bss_10[1] = 60;
|
||||
lbl_1_bss_10[1] = REFRESH_RATE;
|
||||
WipeCreate(WIPE_MODE_IN, WIPE_TYPE_NORMAL, 60);
|
||||
HuAudFXPlay(1736);
|
||||
break;
|
||||
|
|
@ -160,7 +161,7 @@ void fn_1_558(omObjData *object)
|
|||
if (--lbl_1_bss_3C0 == 0) {
|
||||
lbl_1_bss_3C2--;
|
||||
MGSeqParamSet(lbl_1_bss_3B8, 1, lbl_1_bss_3C2);
|
||||
lbl_1_bss_3C0 = 60;
|
||||
lbl_1_bss_3C0 = REFRESH_RATE;
|
||||
}
|
||||
if (!lbl_1_bss_3C2 || lbl_1_bss_3A8 == 1) {
|
||||
fn_1_1D64(3);
|
||||
|
|
@ -178,7 +179,7 @@ void fn_1_558(omObjData *object)
|
|||
}
|
||||
if (MGSeqStatGet(lbl_1_bss_3BC) == 0) {
|
||||
fn_1_1D64(4);
|
||||
lbl_1_bss_10[1] = 60;
|
||||
lbl_1_bss_10[1] = REFRESH_RATE;
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
@ -215,7 +216,7 @@ void fn_1_558(omObjData *object)
|
|||
break;
|
||||
}
|
||||
fn_1_1D64(5);
|
||||
lbl_1_bss_10[1] = 210;
|
||||
lbl_1_bss_10[1] = 3.5 * REFRESH_RATE;
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
#include "game/gamework_data.h"
|
||||
#include "game/minigame_seq.h"
|
||||
#include "math.h"
|
||||
#include "version.h"
|
||||
|
||||
typedef struct bss_2468_data {
|
||||
Vec unk0;
|
||||
|
|
@ -531,8 +532,8 @@ void fn_1_3CC8(ModelData *model, Mtx mtx)
|
|||
if (temp_r31->unkC == 0) {
|
||||
continue;
|
||||
}
|
||||
temp_f31 = (0.2f + cosd((90.0f * temp_r31->unkC) / 60.0f)) * 128.0f;
|
||||
lbl_1_data_174.a = 255.0f * sind((90.0f * temp_r31->unkC) / 60.0f);
|
||||
temp_f31 = (0.2f + cosd((90.0f * temp_r31->unkC) / REFRESH_RATE)) * 128.0f;
|
||||
lbl_1_data_174.a = 255.0f * sind((90.0f * temp_r31->unkC) / REFRESH_RATE);
|
||||
GXSetChanMatColor(GX_COLOR0A0, lbl_1_data_174);
|
||||
MTXScale(sp14, 0.5f * temp_f31, 0.5f * temp_f31, 1.0f);
|
||||
mtxTransCat(sp14, (200.0f * (600.0f + temp_r31->unk0.x)) / 1200.0f, (200.0f * (600.0f + temp_r31->unk0.z)) / 1200.0f, 0);
|
||||
|
|
@ -550,7 +551,7 @@ void fn_1_43AC(Vec *arg0)
|
|||
temp_r31->unk0.x = arg0->x;
|
||||
temp_r31->unk0.y = arg0->y;
|
||||
temp_r31->unk0.z = arg0->z;
|
||||
temp_r31->unkC = 60;
|
||||
temp_r31->unkC = REFRESH_RATE;
|
||||
lbl_1_bss_2464 = (lbl_1_bss_2464 + 1) % 64;
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
#include "game/gamework_data.h"
|
||||
#include "game/minigame_seq.h"
|
||||
#include "math.h"
|
||||
#include "version.h"
|
||||
|
||||
|
||||
typedef struct data_224_struct {
|
||||
|
|
@ -54,15 +55,15 @@ Vec lbl_1_data_1E4[2] = { { -550, 0, 550 }, { 550, 0, 550 } };
|
|||
u32 lbl_1_data_1FC[10] = { 0, 2, 23, 133, 0x41000E, 0x410016, 0x41001E, 0x410026, 0x41002E, 0x410036 };
|
||||
|
||||
Data224Struct lbl_1_data_224[9] = {
|
||||
{ 0, 4, 12, 0, HU3D_MOTATTR_LOOP },
|
||||
{ 1, 6, 6, 0, HU3D_MOTATTR_LOOP },
|
||||
{ 0, 8, 6, 0, HU3D_MOTATTR_NONE },
|
||||
{ 0, 5, 6, 0, HU3D_MOTATTR_LOOP },
|
||||
{ 1, 5, 6, 0, HU3D_MOTATTR_LOOP },
|
||||
{ 0, 8, 6, 30, HU3D_MOTATTR_NONE },
|
||||
{ 0, 9, 6, 0, HU3D_MOTATTR_NONE },
|
||||
{ 2, 0, 12, 0, HU3D_MOTATTR_NONE },
|
||||
{ 3, 0, 12, 0, HU3D_MOTATTR_NONE },
|
||||
{ 0, 4, 0.2f * REFRESH_RATE, 0, HU3D_MOTATTR_LOOP },
|
||||
{ 1, 6, 0.1f * REFRESH_RATE, 0, HU3D_MOTATTR_LOOP },
|
||||
{ 0, 8, 0.1f * REFRESH_RATE, 0, HU3D_MOTATTR_NONE },
|
||||
{ 0, 5, 0.1f * REFRESH_RATE, 0, HU3D_MOTATTR_LOOP },
|
||||
{ 1, 5, 0.1f * REFRESH_RATE, 0, HU3D_MOTATTR_LOOP },
|
||||
{ 0, 8, 0.1f * REFRESH_RATE, 0.5f * REFRESH_RATE, HU3D_MOTATTR_NONE },
|
||||
{ 0, 9, 0.1f * REFRESH_RATE, 0, HU3D_MOTATTR_NONE },
|
||||
{ 2, 0, 0.2f * REFRESH_RATE, 0, HU3D_MOTATTR_NONE },
|
||||
{ 3, 0, 0.2f * REFRESH_RATE, 0, HU3D_MOTATTR_NONE },
|
||||
};
|
||||
|
||||
void fn_1_4988(omObjData *object);
|
||||
|
|
@ -254,8 +255,8 @@ void fn_1_4E50(omObjData *object)
|
|||
if (temp_r31->unk1C > spC[temp_r31->unk24]) {
|
||||
temp_r31->unk24 = 1;
|
||||
temp_r31->unk44 = temp_r31->unk20;
|
||||
temp_r31->unk94.x += 225.0f * (temp_r31->unk1C * sind(temp_r31->unk20)) * (1.0f / 60.0f);
|
||||
temp_r31->unk94.z += 225.0f * (temp_r31->unk1C * cosd(temp_r31->unk20)) * (1.0f / 60.0f);
|
||||
temp_r31->unk94.x += 225.0f * (temp_r31->unk1C * sind(temp_r31->unk20)) * (1.0f / REFRESH_RATE);
|
||||
temp_r31->unk94.z += 225.0f * (temp_r31->unk1C * cosd(temp_r31->unk20)) * (1.0f / REFRESH_RATE);
|
||||
temp_r31->unk48 = 0.2f;
|
||||
temp_r31->unk4C = 0;
|
||||
if (CharModelMotionShiftIDGet(temp_r31->unk8) < 0) {
|
||||
|
|
@ -296,7 +297,7 @@ void fn_1_4E50(omObjData *object)
|
|||
temp_r31->unk3A = 0;
|
||||
temp_r31->unk3C++;
|
||||
}
|
||||
else if (temp_r31->unk3C == 1 && temp_r31->unk3A > 30.0f) {
|
||||
else if (temp_r31->unk3C == 1 && temp_r31->unk3A > (0.5f * REFRESH_RATE)) {
|
||||
if (temp_r31->unk54 < 3) {
|
||||
temp_r28 = fn_1_8884(&temp_r31->unk88, 20, 150, temp_r31->unk40, -30, 30, 1, object->work[0]);
|
||||
if (temp_r28 >= 0) {
|
||||
|
|
@ -352,7 +353,7 @@ void fn_1_4E50(omObjData *object)
|
|||
}
|
||||
}
|
||||
else {
|
||||
if (temp_r31->unk3A > 30.0f) {
|
||||
if (temp_r31->unk3A > (0.5f * REFRESH_RATE)) {
|
||||
temp_r31->unk38 = 0;
|
||||
}
|
||||
}
|
||||
|
|
@ -376,7 +377,7 @@ void fn_1_4E50(omObjData *object)
|
|||
temp_r31->unk3C++;
|
||||
}
|
||||
if (temp_r31->unk3E) {
|
||||
if (temp_r31->unk3A > 36.0f) {
|
||||
if (temp_r31->unk3A > (VERSION_NTSC ? 36.0f : 30.000002f)) {
|
||||
for (temp_r29 = 0; temp_r29 < temp_r31->unk54; temp_r29++) {
|
||||
fn_1_8B58(temp_r31->unk58[temp_r29]);
|
||||
}
|
||||
|
|
@ -384,7 +385,7 @@ void fn_1_4E50(omObjData *object)
|
|||
temp_r31->unk3E = 0;
|
||||
}
|
||||
}
|
||||
if (temp_r31->unk3A > 60.0f) {
|
||||
if (temp_r31->unk3A > 1.0f * REFRESH_RATE) {
|
||||
temp_r31->unk38 = 0;
|
||||
}
|
||||
break;
|
||||
|
|
@ -514,7 +515,7 @@ void fn_1_5C98(omObjData *object)
|
|||
}
|
||||
else {
|
||||
temp_r31->unk80++;
|
||||
if (temp_r30 || temp_r31->unk80 > 60.0f) {
|
||||
if (temp_r30 || temp_r31->unk80 > (1.0f * REFRESH_RATE)) {
|
||||
if (temp_r30 || frandmod(1000) < 10) {
|
||||
temp_r31->unk70 = fn_1_8FA0(&temp_r31->unk88);
|
||||
fn_1_8E2C(temp_r31->unk70, &temp_r31->unk74);
|
||||
|
|
@ -532,7 +533,7 @@ void fn_1_5C98(omObjData *object)
|
|||
|
||||
case 2:
|
||||
temp_r31->unk80++;
|
||||
if (temp_r31->unk80 < 120 * temp_r31->unk64) {
|
||||
if (temp_r31->unk80 < (2 * REFRESH_RATE) * temp_r31->unk64) {
|
||||
temp_r31->unk1C = 0.4f;
|
||||
temp_r31->unk20 = temp_r31->unk40 + 10.0f;
|
||||
temp_r31->unk14 = temp_r31->unk18 = PAD_BUTTON_A;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue