Use macro for some MTX functions
This commit is contained in:
parent
6a92b96c64
commit
aad91097cd
31 changed files with 1777 additions and 1696 deletions
|
|
@ -2956,7 +2956,7 @@ void fn_1_BC18(ModelData *arg0, float (*arg1)[4])
|
|||
if (HmfInverseMtxF3X3(arg1, sp128) == 0) {
|
||||
MTXIdentity(sp128);
|
||||
}
|
||||
PSMTXReorder(sp128, sp8);
|
||||
Reorder(sp128, sp8);
|
||||
if (var_r31->unk_4C) {
|
||||
var_r18 = var_r31->unk_4C;
|
||||
var_r18(arg0, var_r31, arg1);
|
||||
|
|
@ -2964,7 +2964,7 @@ void fn_1_BC18(ModelData *arg0, float (*arg1)[4])
|
|||
var_r29 = var_r31->unk_3C;
|
||||
var_r30 = var_r31->unk_40;
|
||||
var_r28 = var_r31->unk_44;
|
||||
PSMTXROMultVecArray(sp8, lbl_1_data_8E0, &sp38[0], 4);
|
||||
ROMultVecArray(sp8, lbl_1_data_8E0, &sp38[0], 4);
|
||||
for (var_r26 = 0; var_r26 < var_r31->unk_26; var_r26++, var_r29++) {
|
||||
if (!var_r29->unk_28) {
|
||||
var_r30->x = var_r30->y = var_r30->z = 0.0f;
|
||||
|
|
@ -3169,7 +3169,7 @@ void fn_1_C86C(ModelData *arg0, Mtx arg1)
|
|||
if (HmfInverseMtxF3X3(arg1, sp9C) == 0) {
|
||||
MTXIdentity(sp9C);
|
||||
}
|
||||
PSMTXReorder(sp9C, spC);
|
||||
Reorder(sp9C, spC);
|
||||
if (var_r31->unk_4C) {
|
||||
var_r23 = var_r31->unk_4C;
|
||||
var_r23(arg0, var_r31, arg1);
|
||||
|
|
@ -3177,7 +3177,7 @@ void fn_1_C86C(ModelData *arg0, Mtx arg1)
|
|||
var_r29 = var_r31->unk_3C;
|
||||
var_r30 = var_r31->unk_40;
|
||||
sp8 = var_r31->unk_44;
|
||||
PSMTXROMultVecArray(spC, lbl_1_data_930, (Vec *)sp3C, 4);
|
||||
ROMultVecArray(spC, lbl_1_data_930, (Vec *)sp3C, 4);
|
||||
for (var_r25 = 0; var_r25 < var_r31->unk_26; var_r25++, var_r29++) {
|
||||
if (!var_r29->unk_28) {
|
||||
var_r30->x = var_r30->y = var_r30->z = 0.0f;
|
||||
|
|
|
|||
|
|
@ -1385,7 +1385,7 @@ void fn_1_602C(ModelData *arg0, f32 (*arg1)[4])
|
|||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_TEX_ST, GX_F32, 0);
|
||||
GXSetArray(GX_VA_TEX0, temp_r30->unk20, 8);
|
||||
fn_1_40A4(arg1, sp128);
|
||||
PSMTXReorder(sp128, spF8);
|
||||
Reorder(sp128, spF8);
|
||||
if (((u8)omPauseChk() == 0) && (temp_r30->unkC)) {
|
||||
var_r23 = temp_r30->unkC;
|
||||
var_r23(arg0, temp_r30, arg1);
|
||||
|
|
@ -1393,7 +1393,7 @@ void fn_1_602C(ModelData *arg0, f32 (*arg1)[4])
|
|||
var_r29 = temp_r30->unk18;
|
||||
var_r31 = temp_r30->unk1C;
|
||||
var_r26 = temp_r30->unk20;
|
||||
PSMTXROMultVecArray(spF8, &temp_r30->unk2C, &sp68[0], 4);
|
||||
ROMultVecArray(spF8, &temp_r30->unk2C, &sp68[0], 4);
|
||||
|
||||
for (var_r25 = 0; var_r25 < temp_r30->unk0; var_r25++, var_r29++, var_r26 += 4) {
|
||||
if (var_r29->unk4E == 0) {
|
||||
|
|
|
|||
|
|
@ -574,8 +574,8 @@ void fn_1_4E64(omObjData *object)
|
|||
MTXScale(spC8, var_f31, var_f31, var_f31 * var_r31->unk_28);
|
||||
MTXConcat(sp68, spC8, sp98);
|
||||
MTXInverse(sp98, spC8);
|
||||
PSMTXReorder(spC8, sp38);
|
||||
PSMTXROMultVecArray(sp38, lbl_1_bss_178.unk_2C, lbl_1_bss_178.unk_34, lbl_1_bss_178.unk_18);
|
||||
Reorder(spC8, sp38);
|
||||
ROMultVecArray(sp38, lbl_1_bss_178.unk_2C, lbl_1_bss_178.unk_34, lbl_1_bss_178.unk_18);
|
||||
sp2C.x = (0.15f * var_r31->unk_18) * (var_r31->unk_24 * sind(var_r31->unk_10));
|
||||
sp2C.y = 0.0f;
|
||||
sp2C.z = (0.15f * var_r31->unk_18) * (var_r31->unk_24 * cosd(var_r31->unk_10));
|
||||
|
|
|
|||
|
|
@ -5148,7 +5148,7 @@ void fn_1_11900(ModelData *arg0, Mtx arg1)
|
|||
if (HmfInverseMtxF3X3(arg1, sp128) == 0) {
|
||||
MTXIdentity(sp128);
|
||||
}
|
||||
PSMTXReorder(sp128, sp8);
|
||||
Reorder(sp128, sp8);
|
||||
if (temp_r31->unk4C) {
|
||||
var_r18 = temp_r31->unk4C;
|
||||
var_r18(arg0, temp_r31, arg1);
|
||||
|
|
@ -5156,7 +5156,7 @@ void fn_1_11900(ModelData *arg0, Mtx arg1)
|
|||
var_r29 = temp_r31->unk3C;
|
||||
var_r30 = temp_r31->unk40;
|
||||
var_r28 = temp_r31->unk44;
|
||||
PSMTXROMultVecArray(sp8, lbl_1_data_8C4, sp38, 4);
|
||||
ROMultVecArray(sp8, lbl_1_data_8C4, sp38, 4);
|
||||
for (i = 0; i < temp_r31->unk26; i++, var_r29++) {
|
||||
if (!var_r29->unk30) {
|
||||
var_r30->x = var_r30->y = var_r30->z = 0.0f;
|
||||
|
|
|
|||
|
|
@ -2131,7 +2131,7 @@ void fn_1_101C4(ModelData *var_r29, Mtx var_r28)
|
|||
if (HmfInverseMtxF3X3(var_r28, sp50) == 0) {
|
||||
MTXIdentity(sp50);
|
||||
}
|
||||
PSMTXReorder(sp50, sp20);
|
||||
Reorder(sp50, sp20);
|
||||
GXClearVtxDesc();
|
||||
GXSetVtxDesc(GX_VA_POS, GX_INDEX16);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_F32, 0);
|
||||
|
|
@ -2694,7 +2694,7 @@ void fn_1_11EE0(ModelData *var_r24, Mtx var_r21)
|
|||
if (HmfInverseMtxF3X3(var_r21, sp128) == 0) {
|
||||
MTXIdentity(sp128);
|
||||
}
|
||||
PSMTXReorder(sp128, &sp8[0]);
|
||||
Reorder(sp128, &sp8[0]);
|
||||
if (var_r31->unk_4C) {
|
||||
var_r18 = var_r31->unk_4C;
|
||||
var_r18(var_r24, var_r31, var_r21);
|
||||
|
|
@ -2702,7 +2702,7 @@ void fn_1_11EE0(ModelData *var_r24, Mtx var_r21)
|
|||
var_r29 = var_r31->unk_3C;
|
||||
var_r30 = var_r31->unk_40;
|
||||
var_r26 = var_r31->unk_44;
|
||||
PSMTXROMultVecArray(sp8, lbl_1_data_19C, &sp38[0], 4);
|
||||
ROMultVecArray(sp8, lbl_1_data_19C, &sp38[0], 4);
|
||||
for (var_r23 = 0; var_r23 < var_r31->unk_24; var_r23++, var_r29++) {
|
||||
if (!var_r29->unk_28) {
|
||||
var_r30->x = var_r30->y = var_r30->z = 0.0f;
|
||||
|
|
|
|||
|
|
@ -3045,7 +3045,7 @@ void fn_1_80DC(ModelData *arg0, Mtx arg1)
|
|||
if (!HmfInverseMtxF3X3(arg1, sp128)) {
|
||||
MTXIdentity(sp128);
|
||||
}
|
||||
PSMTXReorder(sp128, sp8);
|
||||
Reorder(sp128, sp8);
|
||||
if (var_r31->unk_4C) {
|
||||
var_r18 = var_r31->unk_4C;
|
||||
var_r18(arg0, var_r31, arg1);
|
||||
|
|
@ -3053,7 +3053,7 @@ void fn_1_80DC(ModelData *arg0, Mtx arg1)
|
|||
var_r29 = var_r31->unk_3C;
|
||||
var_r30 = var_r31->unk_40;
|
||||
var_r26 = var_r31->unk_44;
|
||||
PSMTXROMultVecArray(sp8, lbl_1_data_22C, &sp38[0], 4);
|
||||
ROMultVecArray(sp8, lbl_1_data_22C, &sp38[0], 4);
|
||||
for (var_r23 = 0; var_r23 < var_r31->unk_24; var_r23++, var_r29++) {
|
||||
if (!var_r29->unk_28) {
|
||||
var_r30->x = var_r30->y = var_r30->z = 0.0f;
|
||||
|
|
@ -3135,7 +3135,7 @@ void fn_1_88B4(ModelData *arg0, Mtx arg1)
|
|||
var_f27 = var_r30->pos.y - arg0->pos.y;
|
||||
var_f30 = var_r30->pos.z - arg0->pos.z;
|
||||
var_f26 = sqrtf((var_f31 * var_f31) + (var_f30 * var_f30));
|
||||
arg0->rot.x = (atan2d(var_f26, var_f27)) - 90.0;
|
||||
arg0->rot.x = (atan2d(var_f26, var_f27))-90.0;
|
||||
arg0->rot.y = atan2d(var_f31, var_f30);
|
||||
var_r29 = arg0->unk_120;
|
||||
GXLoadPosMtxImm(arg1, 0);
|
||||
|
|
|
|||
|
|
@ -3028,7 +3028,7 @@ void fn_1_DCD4(ModelData *model, Mtx matrix)
|
|||
sp128[0][3] = 0.0f;
|
||||
sp128[1][3] = 0.0f;
|
||||
sp128[2][3] = 0.0f;
|
||||
PSMTXReorder(sp128, spF8);
|
||||
Reorder(sp128, spF8);
|
||||
if ((omPauseChk() == 0) && (var_r30->unk_0C)) {
|
||||
var_r23 = var_r30->unk_0C;
|
||||
var_r23(model, var_r30, matrix);
|
||||
|
|
@ -3036,7 +3036,7 @@ void fn_1_DCD4(ModelData *model, Mtx matrix)
|
|||
var_r29 = var_r30->unk_18;
|
||||
var_r31 = var_r30->unk_1C;
|
||||
var_r26 = var_r30->unk_20;
|
||||
PSMTXROMultVecArray(spF8, &var_r30->unk_2C, sp68, 4);
|
||||
ROMultVecArray(spF8, &var_r30->unk_2C, sp68, 4);
|
||||
for (var_r25 = 0; var_r25 < var_r30->unk_00; var_r25++, var_r29++, var_r26 += 4) {
|
||||
if (var_r29->unk_62 == 0) {
|
||||
var_r31->x = var_r31->y = var_r31->z = 0.0f;
|
||||
|
|
@ -3058,9 +3058,9 @@ void fn_1_DCD4(ModelData *model, Mtx matrix)
|
|||
}
|
||||
else {
|
||||
fn_1_E420(&var_r30->unk_2C, &sp38, &var_r29->unk_48, 4);
|
||||
PSMTXRotRad(spC8, 0x5A, MTXDegToRad(var_r29->unk_44));
|
||||
PSMTXConcat(sp128, spC8, sp98);
|
||||
PSMTXMultVecArray(sp98, &sp38, &sp8, 4);
|
||||
RotRad(spC8, 0x5A, MTXDegToRad(var_r29->unk_44));
|
||||
Concat(sp128, spC8, sp98);
|
||||
MultVecArray(sp98, &sp38, &sp8, 4);
|
||||
PSVECAdd(&sp8, &var_r29->unk_54, var_r31++);
|
||||
PSVECAdd(&sp14, &var_r29->unk_54, var_r31++);
|
||||
PSVECAdd(&sp20, &var_r29->unk_54, var_r31++);
|
||||
|
|
|
|||
|
|
@ -1645,7 +1645,7 @@ void fn_1_13FBC(ModelData *model, Mtx matrix)
|
|||
var_r27 = &lbl_1_bss_578[*var_r25];
|
||||
var_r24 = lbl_1_bss_56C[*var_r25];
|
||||
GXLoadPosMtxImm(matrix, 0);
|
||||
PSMTXInvXpose(matrix, sp70);
|
||||
InvXpose(matrix, sp70);
|
||||
GXLoadNrmMtxImm(sp70, 0);
|
||||
GXSetNumTevStages(1);
|
||||
GXSetNumTexGens(1);
|
||||
|
|
|
|||
|
|
@ -3109,7 +3109,7 @@ void fn_1_134C0(ModelData *var_r23, Mtx var_r22)
|
|||
if (HmfInverseMtxF3X3(var_r22, &sp128[0]) == 0) {
|
||||
MTXIdentity(sp128);
|
||||
}
|
||||
PSMTXReorder(sp128, sp8);
|
||||
Reorder(sp128, sp8);
|
||||
if (var_r31->unk_4C) {
|
||||
var_r18 = var_r31->unk_4C;
|
||||
var_r18(var_r23, var_r31, var_r22);
|
||||
|
|
@ -3117,7 +3117,7 @@ void fn_1_134C0(ModelData *var_r23, Mtx var_r22)
|
|||
var_r29 = var_r31->unk_3C;
|
||||
var_r30 = var_r31->unk_40;
|
||||
var_r28 = var_r31->unk_44;
|
||||
PSMTXROMultVecArray(sp8, lbl_1_data_6A4, &sp38[0], 4);
|
||||
ROMultVecArray(sp8, lbl_1_data_6A4, &sp38[0], 4);
|
||||
for (var_r26 = 0; var_r26 < var_r31->unk_26; var_r26++, var_r29++) {
|
||||
if (!var_r29->unk_30) {
|
||||
var_r30->x = var_r30->y = var_r30->z = 0.0f;
|
||||
|
|
|
|||
|
|
@ -2095,7 +2095,7 @@ void fn_1_72B4(ModelData *model, Mtx mtx)
|
|||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_TEX_ST, GX_F32, 0);
|
||||
GXSetArray(GX_VA_TEX0, temp_r30->unk20, sizeof(HsfVector2f));
|
||||
fn_1_79FC(mtx, sp128);
|
||||
PSMTXReorder(sp128, spF8);
|
||||
Reorder(sp128, spF8);
|
||||
if (!omPauseChk() && temp_r30->unkC) {
|
||||
temp_r23 = temp_r30->unkC;
|
||||
temp_r23(model, temp_r30, mtx);
|
||||
|
|
@ -2103,7 +2103,7 @@ void fn_1_72B4(ModelData *model, Mtx mtx)
|
|||
temp_r29 = temp_r30->unk18;
|
||||
temp_r31 = temp_r30->unk1C;
|
||||
temp_r27 = temp_r30->unk20;
|
||||
PSMTXROMultVecArray(spF8, temp_r30->unk2C, sp68, 4);
|
||||
ROMultVecArray(spF8, temp_r30->unk2C, sp68, 4);
|
||||
for (temp_r26 = 0; temp_r26 < temp_r30->unk0; temp_r26++, temp_r29++, temp_r27 += 4) {
|
||||
if (temp_r29->unk56 == 0) {
|
||||
temp_r31->x = temp_r31->y = temp_r31->z = 0;
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -2460,7 +2460,7 @@ void fn_1_9C04(ModelData *arg0, Mtx arg1)
|
|||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_TEX_ST, GX_F32, 0);
|
||||
GXSetArray(GX_VA_TEX0, temp_r30->unk20, 8);
|
||||
fn_1_9344(arg1, sp128);
|
||||
PSMTXReorder(sp128, spF8);
|
||||
Reorder(sp128, spF8);
|
||||
if (((u8)omPauseChk() == 0) && (temp_r30->unkC)) {
|
||||
var_r23 = temp_r30->unkC;
|
||||
var_r23(arg0, temp_r30, arg1);
|
||||
|
|
@ -2468,7 +2468,7 @@ void fn_1_9C04(ModelData *arg0, Mtx arg1)
|
|||
var_r29 = temp_r30->unk18;
|
||||
var_r31 = temp_r30->unk1C;
|
||||
var_r27 = temp_r30->unk20;
|
||||
PSMTXROMultVecArray(spF8, &temp_r30->unk2C, (Vec *)&sp68[0], 4);
|
||||
ROMultVecArray(spF8, &temp_r30->unk2C, (Vec *)&sp68[0], 4);
|
||||
|
||||
for (var_r26 = 0; var_r26 < temp_r30->unk0; var_r26++, var_r29++, var_r27 += 4) {
|
||||
if (var_r29->unk62 == 0) {
|
||||
|
|
|
|||
|
|
@ -1531,8 +1531,8 @@ void fn_1_485C(ModelData *model, Mtx mtx)
|
|||
GXSetProjection(sp40, GX_PERSPECTIVE);
|
||||
MTXInverse(mtx, spA0);
|
||||
spA0[0][3] = spA0[1][3] = spA0[2][3] = 0.0f;
|
||||
PSMTXReorder(spA0, sp70);
|
||||
PSMTXROMultVecArray(sp70, &lbl_1_data_1C0[0], &sp10, 4);
|
||||
Reorder(spA0, sp70);
|
||||
ROMultVecArray(sp70, &lbl_1_data_1C0[0], &sp10, 4);
|
||||
GXLoadPosMtxImm(mtx, 0);
|
||||
var_r31 = lbl_1_bss_5C;
|
||||
for (var_r30 = 0; var_r30 < 1024; var_r30++, var_r31++) {
|
||||
|
|
|
|||
|
|
@ -1608,7 +1608,7 @@ void fn_1_56C4(ModelData *arg0, Mtx arg1)
|
|||
sp130[0][3] = 0.0f;
|
||||
sp130[1][3] = 0.0f;
|
||||
sp130[2][3] = 0.0f;
|
||||
PSMTXReorder(sp130, sp100);
|
||||
Reorder(sp130, sp100);
|
||||
if ((omPauseChk() == 0) && (var_r31->unk_00)) {
|
||||
spC = var_r31->unk_00;
|
||||
spC(arg0, var_r31, arg1);
|
||||
|
|
@ -1616,7 +1616,7 @@ void fn_1_56C4(ModelData *arg0, Mtx arg1)
|
|||
var_r29 = var_r31->unk_10;
|
||||
var_r30 = var_r31->unk_14;
|
||||
var_r27 = var_r31->unk_18;
|
||||
PSMTXROMultVecArray(sp100, &var_r31->unk_28, sp70, 4);
|
||||
ROMultVecArray(sp100, &var_r31->unk_28, sp70, 4);
|
||||
for (var_r19 = 0; var_r19 < var_r31->unk_64; var_r19++, var_r29++, var_r27 += 4) {
|
||||
if (var_r29->unk_3E < 0) {
|
||||
var_r30->x = var_r30->y = var_r30->z = 0.0f;
|
||||
|
|
@ -5048,7 +5048,7 @@ void fn_1_15BAC(Vec *arg0, Vec *arg1, float arg8, s32 arg2, float *arg3, float *
|
|||
else if (0.0f > arg8) {
|
||||
arg8 += 360.0f;
|
||||
}
|
||||
*arg3 = (atan2d(sp14.z, sp14.x)) - 90.0;
|
||||
*arg3 = (atan2d(sp14.z, sp14.x))-90.0;
|
||||
*arg4 = atan2d(sp14.y, sqrtf((sp14.x * sp14.x) + (sp14.z * sp14.z)));
|
||||
if (arg2 == 0) {
|
||||
*arg3 *= -1.0f;
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ void InitEnvelope(HsfData *arg0) {
|
|||
nObj = temp_r28->count;
|
||||
nMesh = temp_r28->base_idx;
|
||||
}
|
||||
PSMTXIdentity(sp10);
|
||||
MTXIdentity(sp10);
|
||||
SetMtx(arg0->root, sp10);
|
||||
SetRevMtx();
|
||||
}
|
||||
|
|
@ -89,19 +89,19 @@ static void SetEnvelopMtx(HsfObject *arg0, HsfObject *arg1, Mtx arg2) {
|
|||
s32 var_r29;
|
||||
s32 i;
|
||||
|
||||
PSMTXTrans(spC, arg1->data.curr.pos.x, arg1->data.curr.pos.y, arg1->data.curr.pos.z);
|
||||
PSMTXConcat(arg2, spC, sp3C);
|
||||
MTXTrans(spC, arg1->data.curr.pos.x, arg1->data.curr.pos.y, arg1->data.curr.pos.z);
|
||||
MTXConcat(arg2, spC, sp3C);
|
||||
if (arg1->data.curr.rot.z) {
|
||||
PSMTXRotRad(sp6C, 'z', MTXDegToRad(arg1->data.curr.rot.z));
|
||||
PSMTXConcat(sp3C, sp6C, sp3C);
|
||||
MTXRotRad(sp6C, 'z', MTXDegToRad(arg1->data.curr.rot.z));
|
||||
MTXConcat(sp3C, sp6C, sp3C);
|
||||
}
|
||||
if (arg1->data.curr.rot.y) {
|
||||
PSMTXRotRad(sp6C, 'y', MTXDegToRad(arg1->data.curr.rot.y));
|
||||
PSMTXConcat(sp3C, sp6C, sp3C);
|
||||
MTXRotRad(sp6C, 'y', MTXDegToRad(arg1->data.curr.rot.y));
|
||||
MTXConcat(sp3C, sp6C, sp3C);
|
||||
}
|
||||
if (arg1->data.curr.rot.x) {
|
||||
PSMTXRotRad(sp6C, 'x', MTXDegToRad(arg1->data.curr.rot.x));
|
||||
PSMTXConcat(sp3C, sp6C, sp3C);
|
||||
MTXRotRad(sp6C, 'x', MTXDegToRad(arg1->data.curr.rot.x));
|
||||
MTXConcat(sp3C, sp6C, sp3C);
|
||||
}
|
||||
if (arg1->data.curr.scale.x != 1.0f) {
|
||||
sp3C[0][0] *= arg1->data.curr.scale.x;
|
||||
|
|
@ -119,7 +119,7 @@ static void SetEnvelopMtx(HsfObject *arg0, HsfObject *arg1, Mtx arg2) {
|
|||
sp3C[2][2] *= arg1->data.curr.scale.z;
|
||||
}
|
||||
var_r29 = arg1 - arg0;
|
||||
PSMTXCopy(sp3C, MtxTop[nMesh + var_r29]);
|
||||
MTXCopy(sp3C, MtxTop[nMesh + var_r29]);
|
||||
for (i = 0; i < arg1->data.childrenCount; i++) {
|
||||
SetEnvelopMtx(arg0, arg1->data.children[i], sp3C);
|
||||
}
|
||||
|
|
@ -136,7 +136,7 @@ void EnvelopeProc(HsfData *arg0) {
|
|||
nObj = temp_r31->count;
|
||||
nMesh = temp_r31->base_idx;
|
||||
temp_r29 = arg0->root;
|
||||
PSMTXIdentity(sp8);
|
||||
MTXIdentity(sp8);
|
||||
SetEnvelopMtx(arg0->object, temp_r29, sp8);
|
||||
SetEnvelopMain(arg0);
|
||||
}
|
||||
|
|
@ -167,7 +167,7 @@ static void SetEnvelopMain(HsfData *arg0) {
|
|||
var_r31 = arg0->object;
|
||||
for (Meshno = i = 0; i < arg0->objectCnt; i++, var_r31++) {
|
||||
if (var_r31->type == 2) {
|
||||
PSMTXInverse(MtxTop[&var_r31[nMesh] - arg0->object], MtxTop[Meshno]);
|
||||
MTXInverse(MtxTop[&var_r31[nMesh] - arg0->object], MtxTop[Meshno]);
|
||||
temp_r30 = var_r31->data.vertex;
|
||||
temp_r28 = var_r31->data.normal;
|
||||
if (var_r31->data.unk120[0] != 0) {
|
||||
|
|
@ -233,37 +233,37 @@ static void SetEnvelop(HsfCenv *arg0) {
|
|||
temp_r31 = &Vertextop[temp_r21];
|
||||
temp_r22 = &normenv[temp_r18];
|
||||
temp_r26 = &normtop[temp_r18];
|
||||
PSMTXConcat(MtxTop[nMesh + var_r27->target], MtxTop[nMesh + nObj + nObj * Meshno + var_r27->target], sp140);
|
||||
PSMTXConcat(MtxTop[Meshno], sp140, sp1A0);
|
||||
MTXConcat(MtxTop[nMesh + var_r27->target], MtxTop[nMesh + nObj + nObj * Meshno + var_r27->target], sp140);
|
||||
MTXConcat(MtxTop[Meshno], sp140, sp1A0);
|
||||
Hu3DMtxScaleGet(&sp1A0[0], &sp14);
|
||||
if (sp14.x != 1.0f || sp14.y != 1.0f || sp14.z != 1.0f) {
|
||||
PSMTXScale(spE0, 1.0 / sp14.x, 1.0 / sp14.y, 1.0 / sp14.z);
|
||||
PSMTXConcat(spE0, sp1A0, sp170);
|
||||
PSMTXInvXpose(sp170, sp170);
|
||||
MTXScale(spE0, 1.0 / sp14.x, 1.0 / sp14.y, 1.0 / sp14.z);
|
||||
MTXConcat(spE0, sp1A0, sp170);
|
||||
MTXInvXpose(sp170, sp170);
|
||||
} else {
|
||||
PSMTXInvXpose(sp1A0, sp170);
|
||||
MTXInvXpose(sp1A0, sp170);
|
||||
}
|
||||
if (var_r27->posCnt == 1) {
|
||||
PSMTXMultVec(sp1A0, temp_r31, temp_r28);
|
||||
PSMTXMultVec(sp170, temp_r26, temp_r22);
|
||||
MTXMultVec(sp1A0, temp_r31, temp_r28);
|
||||
MTXMultVec(sp170, temp_r26, temp_r22);
|
||||
} else if (var_r27->posCnt <= 6) {
|
||||
PSMTXMultVecArray(sp1A0, temp_r31, temp_r28, var_r27->posCnt);
|
||||
PSMTXMultVecArray(sp170, temp_r26, temp_r22, var_r27->normalCnt);
|
||||
MTXMultVecArray(sp1A0, temp_r31, temp_r28, var_r27->posCnt);
|
||||
MTXMultVecArray(sp170, temp_r26, temp_r22, var_r27->normalCnt);
|
||||
} else {
|
||||
PSMTXReorder(sp1A0, (ROMtxPtr) sp140);
|
||||
PSMTXReorder(sp170, (ROMtxPtr) sp110);
|
||||
PSMTXROMultVecArray((ROMtxPtr) sp140, temp_r31, temp_r28, var_r27->posCnt);
|
||||
PSMTXROMultVecArray((ROMtxPtr) sp110, temp_r26, temp_r22, var_r27->normalCnt);
|
||||
MTXReorder(sp1A0, (ROMtxPtr) sp140);
|
||||
MTXReorder(sp170, (ROMtxPtr) sp110);
|
||||
MTXROMultVecArray((ROMtxPtr) sp140, temp_r31, temp_r28, var_r27->posCnt);
|
||||
MTXROMultVecArray((ROMtxPtr) sp110, temp_r26, temp_r22, var_r27->normalCnt);
|
||||
}
|
||||
}
|
||||
var_r20 = arg0->dualData;
|
||||
for (i = 0; i < arg0->dualCount; i++, var_r20++) {
|
||||
spC = var_r20->target1;
|
||||
sp8 = var_r20->target2;
|
||||
PSMTXConcat(MtxTop[nMesh + spC], MtxTop[nMesh + nObj + nObj * Meshno + spC], sp140);
|
||||
PSMTXConcat(MtxTop[Meshno], sp140, sp1A0);
|
||||
PSMTXConcat(MtxTop[nMesh + sp8], MtxTop[nMesh + nObj + nObj * Meshno + sp8], sp140);
|
||||
PSMTXConcat(MtxTop[Meshno], sp140, (float (*)[4]) &spB0[0]);
|
||||
MTXConcat(MtxTop[nMesh + spC], MtxTop[nMesh + nObj + nObj * Meshno + spC], sp140);
|
||||
MTXConcat(MtxTop[Meshno], sp140, sp1A0);
|
||||
MTXConcat(MtxTop[nMesh + sp8], MtxTop[nMesh + nObj + nObj * Meshno + sp8], sp140);
|
||||
MTXConcat(MtxTop[Meshno], sp140, (float (*)[4]) &spB0[0]);
|
||||
var_r30 = var_r20->weight;
|
||||
for (j = 0; j < var_r20->weightCnt; j++, var_r30++) {
|
||||
temp_r18 = var_r30->normal;
|
||||
|
|
@ -316,32 +316,32 @@ static void SetEnvelop(HsfCenv *arg0) {
|
|||
var_r29[2][2] = sp110[2][2] + sp140[2][2];
|
||||
var_r29[2][3] = sp110[2][3] + sp140[2][3];
|
||||
if (var_r29 == sp50) {
|
||||
PSMTXCopy(sp50, sp80);
|
||||
MTXCopy(sp50, sp80);
|
||||
}
|
||||
Hu3DMtxScaleGet(&sp80[0], &sp14);
|
||||
if (sp14.x != 1.0f || sp14.y != 1.0f || sp14.z != 1.0f) {
|
||||
PSMTXScale(spE0, 1.0 / sp14.x, 1.0 / sp14.y, 1.0 / sp14.z);
|
||||
PSMTXConcat(spE0, sp80, sp110);
|
||||
PSMTXInvXpose(sp110, sp110);
|
||||
MTXScale(spE0, 1.0 / sp14.x, 1.0 / sp14.y, 1.0 / sp14.z);
|
||||
MTXConcat(spE0, sp80, sp110);
|
||||
MTXInvXpose(sp110, sp110);
|
||||
} else {
|
||||
PSMTXInvXpose(sp80, sp110);
|
||||
MTXInvXpose(sp80, sp110);
|
||||
}
|
||||
if (var_r30->posCnt == 1) {
|
||||
PSMTXMultVec(sp80, temp_r31, temp_r28);
|
||||
MTXMultVec(sp80, temp_r31, temp_r28);
|
||||
} else if (var_r30->posCnt <= 6) {
|
||||
PSMTXMultVecArray(sp80, temp_r31, temp_r28, var_r30->posCnt);
|
||||
MTXMultVecArray(sp80, temp_r31, temp_r28, var_r30->posCnt);
|
||||
} else {
|
||||
PSMTXReorder(sp80, (ROMtxPtr) sp140);
|
||||
PSMTXROMultVecArray((ROMtxPtr) sp140, temp_r31, temp_r28, var_r30->posCnt);
|
||||
MTXReorder(sp80, (ROMtxPtr) sp140);
|
||||
MTXROMultVecArray((ROMtxPtr) sp140, temp_r31, temp_r28, var_r30->posCnt);
|
||||
}
|
||||
if (var_r30->normalCnt != 0) {
|
||||
if (var_r30->normalCnt == 1) {
|
||||
PSMTXMultVec(sp110, temp_r26, temp_r22);
|
||||
MTXMultVec(sp110, temp_r26, temp_r22);
|
||||
} else if (var_r30->normalCnt <= 6) {
|
||||
PSMTXMultVecArray(sp110, temp_r26, temp_r22, var_r30->normalCnt);
|
||||
MTXMultVecArray(sp110, temp_r26, temp_r22, var_r30->normalCnt);
|
||||
} else {
|
||||
PSMTXReorder(sp110, (ROMtxPtr) sp140);
|
||||
PSMTXROMultVecArray((ROMtxPtr) sp140, temp_r26, temp_r22, var_r30->normalCnt);
|
||||
MTXReorder(sp110, (ROMtxPtr) sp140);
|
||||
MTXROMultVecArray((ROMtxPtr) sp140, temp_r26, temp_r22, var_r30->normalCnt);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -359,11 +359,11 @@ static void SetEnvelop(HsfCenv *arg0) {
|
|||
sp20.x = sp20.y = sp20.z = 0.0f;
|
||||
sp10 = 0;
|
||||
for (j = 0; j < var_r19->weightCnt; j++, var_r25++) {
|
||||
PSMTXConcat(MtxTop[nMesh + var_r25->target], MtxTop[nMesh + nObj + nObj * Meshno + var_r25->target], sp1A0);
|
||||
PSMTXConcat(MtxTop[Meshno], sp1A0, sp1A0);
|
||||
PSMTXInvXpose(sp1A0, sp170);
|
||||
PSMTXMultVec(sp1A0, temp_r31, &sp44);
|
||||
PSMTXMultVec(sp170, temp_r26, &sp2C);
|
||||
MTXConcat(MtxTop[nMesh + var_r25->target], MtxTop[nMesh + nObj + nObj * Meshno + var_r25->target], sp1A0);
|
||||
MTXConcat(MtxTop[Meshno], sp1A0, sp1A0);
|
||||
MTXInvXpose(sp1A0, sp170);
|
||||
MTXMultVec(sp1A0, temp_r31, &sp44);
|
||||
MTXMultVec(sp170, temp_r26, &sp2C);
|
||||
sp44.x = var_r25->value * (sp44.x - temp_r31->x);
|
||||
sp44.y = var_r25->value * (sp44.y - temp_r31->y);
|
||||
sp44.z = var_r25->value * (sp44.z - temp_r31->z);
|
||||
|
|
@ -410,18 +410,18 @@ static void SetMtx(HsfObject *arg0, Mtx arg1) {
|
|||
arg0->data.base.scale.y = temp_r3->transform.scale.y;
|
||||
arg0->data.base.scale.z = temp_r3->transform.scale.z;
|
||||
}
|
||||
PSMTXTrans(spFC, arg0->data.base.pos.x, arg0->data.base.pos.y, arg0->data.base.pos.z);
|
||||
PSMTXScale(spCC, arg0->data.base.scale.x, arg0->data.base.scale.y, arg0->data.base.scale.z);
|
||||
PSMTXConcat(arg1, spFC, spFC);
|
||||
PSMTXRotRad(sp9C, 'z', MTXDegToRad(arg0->data.base.rot.z));
|
||||
PSMTXConcat(spFC, sp9C, spFC);
|
||||
PSMTXRotRad(sp9C, 'y', MTXDegToRad(arg0->data.base.rot.y));
|
||||
PSMTXConcat(spFC, sp9C, spFC);
|
||||
PSMTXRotRad(sp9C, 'x', MTXDegToRad(arg0->data.base.rot.x));
|
||||
PSMTXConcat(spFC, sp9C, spFC);
|
||||
PSMTXConcat(spFC, spCC, spFC);
|
||||
MTXTrans(spFC, arg0->data.base.pos.x, arg0->data.base.pos.y, arg0->data.base.pos.z);
|
||||
MTXScale(spCC, arg0->data.base.scale.x, arg0->data.base.scale.y, arg0->data.base.scale.z);
|
||||
MTXConcat(arg1, spFC, spFC);
|
||||
MTXRotRad(sp9C, 'z', MTXDegToRad(arg0->data.base.rot.z));
|
||||
MTXConcat(spFC, sp9C, spFC);
|
||||
MTXRotRad(sp9C, 'y', MTXDegToRad(arg0->data.base.rot.y));
|
||||
MTXConcat(spFC, sp9C, spFC);
|
||||
MTXRotRad(sp9C, 'x', MTXDegToRad(arg0->data.base.rot.x));
|
||||
MTXConcat(spFC, sp9C, spFC);
|
||||
MTXConcat(spFC, spCC, spFC);
|
||||
temp_r25 = arg0 - objtop;
|
||||
PSMTXCopy(spFC, MtxTop[nMesh + temp_r25]);
|
||||
MTXCopy(spFC, MtxTop[nMesh + temp_r25]);
|
||||
for (i = 0; i < arg0->data.childrenCount; i++) {
|
||||
SetMtx(arg0->data.children[i], spFC);
|
||||
}
|
||||
|
|
@ -438,12 +438,12 @@ static void SetRevMtx(void) {
|
|||
var_r29 = CurHsf->object;
|
||||
for (var_r28 = i = 0; i < CurHsf->objectCnt; i++, var_r29++) {
|
||||
if (var_r29->type == 2) {
|
||||
PSMTXCopy(MtxTop[nMesh + i], sp8);
|
||||
MTXCopy(MtxTop[nMesh + i], sp8);
|
||||
for (var_r30 = 0; var_r30 < CurHsf->objectCnt; var_r30++) {
|
||||
PSMTXInverse(MtxTop[nMesh + var_r30], sp38);
|
||||
PSMTXConcat(sp38, sp8, MtxTop[nMesh + nObj + nObj * var_r28 + var_r30]);
|
||||
MTXInverse(MtxTop[nMesh + var_r30], sp38);
|
||||
MTXConcat(sp38, sp8, MtxTop[nMesh + nObj + nObj * var_r28 + var_r30]);
|
||||
}
|
||||
PSMTXInverse(MtxTop[nMesh + i], sp8);
|
||||
MTXInverse(MtxTop[nMesh + i], sp8);
|
||||
var_r28++;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -478,7 +478,7 @@ static void UpdateExplode(omObjData *arg0) {
|
|||
break;
|
||||
case 2:
|
||||
BoardCameraRotGet(&sp8);
|
||||
PSMTXRotRad(sp20, 'x', MTXDegToRad(sp8.x + 10.0f));
|
||||
MTXRotRad(sp20, 'x', MTXDegToRad(sp8.x + 10.0f));
|
||||
BoardModelMtxSet(temp_r30->unk02, &sp20);
|
||||
BoardModelRotSet(temp_r30->unk02, 0.0f, 0.0f, 0.0f);
|
||||
sp14.x = arg0->scale.x;
|
||||
|
|
|
|||
|
|
@ -1035,7 +1035,7 @@ static void ExecItemSwap(void)
|
|||
}
|
||||
BoardModelRotGet(suitMdl, &sp3C);
|
||||
Hu3DCameraSet(0, sp108);
|
||||
PSMTXInverse(sp108, spD8);
|
||||
Inverse(sp108, spD8);
|
||||
Hu3DMtxRotGet(spD8, &sp48);
|
||||
sp3C.x = sp48.x;
|
||||
for (var_r31 = 0; var_r31 < var_r28 / 2; var_r31++) {
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -1,5 +1,11 @@
|
|||
#include "game/board/pause.h"
|
||||
#include "game/audio.h"
|
||||
#include "game/board/main.h"
|
||||
#include "game/board/model.h"
|
||||
#include "game/board/player.h"
|
||||
#include "game/board/roll.h"
|
||||
#include "game/board/star.h"
|
||||
#include "game/board/ui.h"
|
||||
#include "game/data.h"
|
||||
#include "game/flag.h"
|
||||
#include "game/gamework_data.h"
|
||||
|
|
@ -11,12 +17,7 @@
|
|||
#include "game/sprite.h"
|
||||
#include "game/window.h"
|
||||
#include "game/wipe.h"
|
||||
#include "game/board/main.h"
|
||||
#include "game/board/model.h"
|
||||
#include "game/board/player.h"
|
||||
#include "game/board/roll.h"
|
||||
#include "game/board/star.h"
|
||||
#include "game/board/ui.h"
|
||||
|
||||
|
||||
typedef struct {
|
||||
struct {
|
||||
|
|
@ -39,7 +40,6 @@ typedef struct {
|
|||
u32 unk0C;
|
||||
} ConfigWork;
|
||||
|
||||
|
||||
static void PauseExit(void);
|
||||
static void PauseProcess(void);
|
||||
static void CreatePauseScreen(void);
|
||||
|
|
@ -91,56 +91,25 @@ static s16 controlWin = -1;
|
|||
static s16 quitWin = -1;
|
||||
static s16 settingsWin = -1;
|
||||
|
||||
static s16 boxModelID[8] = {
|
||||
-1, -1, -1, -1, -1, -1, -1, -1
|
||||
};
|
||||
static s16 boxModelID[8] = { -1, -1, -1, -1, -1, -1, -1, -1 };
|
||||
|
||||
static float boxPosTbl[8][2] = {
|
||||
{ 120.0f, 120.0f },
|
||||
{ 232.0f, 120.0f },
|
||||
{ 344.0f, 120.0f },
|
||||
{ 456.0f, 120.0f },
|
||||
{ 120.0f, 232.0f },
|
||||
{ 232.0f, 232.0f },
|
||||
{ 344.0f, 232.0f },
|
||||
{ 456.0f, 232.0f }
|
||||
};
|
||||
static float boxPosTbl[8][2] = { { 120.0f, 120.0f }, { 232.0f, 120.0f }, { 344.0f, 120.0f }, { 456.0f, 120.0f }, { 120.0f, 232.0f },
|
||||
{ 232.0f, 232.0f }, { 344.0f, 232.0f }, { 456.0f, 232.0f } };
|
||||
|
||||
static float padConfigPosTbl[4][2] = {
|
||||
{ 170.0f, 160.0f },
|
||||
{ 266.0f, 160.0f },
|
||||
{ 362.0f, 160.0f },
|
||||
{ 458.0f, 160.0f }
|
||||
};
|
||||
static float padConfigPosTbl[4][2] = { { 170.0f, 160.0f }, { 266.0f, 160.0f }, { 362.0f, 160.0f }, { 458.0f, 160.0f } };
|
||||
|
||||
static s32 boardLogoTbl[] = {
|
||||
DATA_MAKE_NUM(DATADIR_BOARD, 87),
|
||||
DATA_MAKE_NUM(DATADIR_BOARD, 88),
|
||||
DATA_MAKE_NUM(DATADIR_BOARD, 89),
|
||||
DATA_MAKE_NUM(DATADIR_BOARD, 90),
|
||||
DATA_MAKE_NUM(DATADIR_BOARD, 91),
|
||||
DATA_MAKE_NUM(DATADIR_BOARD, 92),
|
||||
DATA_MAKE_NUM(DATADIR_BOARD, 87),
|
||||
DATA_MAKE_NUM(DATADIR_BOARD, 93),
|
||||
DATA_MAKE_NUM(DATADIR_BOARD, 94)
|
||||
};
|
||||
static s32 boardLogoTbl[] = { DATA_MAKE_NUM(DATADIR_BOARD, 87), DATA_MAKE_NUM(DATADIR_BOARD, 88), DATA_MAKE_NUM(DATADIR_BOARD, 89),
|
||||
DATA_MAKE_NUM(DATADIR_BOARD, 90), DATA_MAKE_NUM(DATADIR_BOARD, 91), DATA_MAKE_NUM(DATADIR_BOARD, 92), DATA_MAKE_NUM(DATADIR_BOARD, 87),
|
||||
DATA_MAKE_NUM(DATADIR_BOARD, 93), DATA_MAKE_NUM(DATADIR_BOARD, 94) };
|
||||
|
||||
static float turnDigitPosTbl[] = {
|
||||
145.0f, 188.0f, 285.0f, 328.0f
|
||||
};
|
||||
static float turnDigitPosTbl[] = { 145.0f, 188.0f, 285.0f, 328.0f };
|
||||
|
||||
static s32 boxMdlTbl[] = {
|
||||
DATA_MAKE_NUM(DATADIR_BPAUSE, 8),
|
||||
DATA_MAKE_NUM(DATADIR_BPAUSE, 9),
|
||||
DATA_MAKE_NUM(DATADIR_BPAUSE, 10),
|
||||
DATA_MAKE_NUM(DATADIR_BPAUSE, 11),
|
||||
DATA_MAKE_NUM(DATADIR_BPAUSE, 12),
|
||||
DATA_MAKE_NUM(DATADIR_BPAUSE, 13),
|
||||
DATA_MAKE_NUM(DATADIR_BPAUSE, 14),
|
||||
DATA_MAKE_NUM(DATADIR_BPAUSE, 15)
|
||||
};
|
||||
static s32 boxMdlTbl[] = { DATA_MAKE_NUM(DATADIR_BPAUSE, 8), DATA_MAKE_NUM(DATADIR_BPAUSE, 9), DATA_MAKE_NUM(DATADIR_BPAUSE, 10),
|
||||
DATA_MAKE_NUM(DATADIR_BPAUSE, 11), DATA_MAKE_NUM(DATADIR_BPAUSE, 12), DATA_MAKE_NUM(DATADIR_BPAUSE, 13), DATA_MAKE_NUM(DATADIR_BPAUSE, 14),
|
||||
DATA_MAKE_NUM(DATADIR_BPAUSE, 15) };
|
||||
|
||||
void BoardPauseStart(void) {
|
||||
void BoardPauseStart(void)
|
||||
{
|
||||
mainProcess = HuPrcChildCreate(PauseProcess, 0x2001, 0x3800, 0, boardMainProc);
|
||||
hostMdl = BoardStarHostMdlGet();
|
||||
BoardModelMotionStart(hostMdl, 1, 0x40000001);
|
||||
|
|
@ -151,7 +120,8 @@ void BoardPauseStart(void) {
|
|||
HuPrcDestructorSet2(mainProcess, PauseExit);
|
||||
}
|
||||
|
||||
static void PauseExit(void) {
|
||||
static void PauseExit(void)
|
||||
{
|
||||
if (pauseQuitF == 0) {
|
||||
BoardRollWinDispSet(1);
|
||||
BoardRollDispSet(1);
|
||||
|
|
@ -160,7 +130,8 @@ static void PauseExit(void) {
|
|||
BoardLast5GfxShowSet(1);
|
||||
HuAudFXPauseAll(0);
|
||||
HuAudSeqPauseAll(0);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
BoardConfettiKill();
|
||||
BoardAudSeqFadeOutAll();
|
||||
HuAudAllStop();
|
||||
|
|
@ -173,7 +144,8 @@ static void PauseExit(void) {
|
|||
omSysPauseCtrl(0);
|
||||
if (GWMGExplainGet()) {
|
||||
_SetFlag(FLAG_ID_MAKE(0, 11));
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
_ClearFlag(FLAG_ID_MAKE(0, 11));
|
||||
}
|
||||
if (GWPartyGet() == 0) {
|
||||
|
|
@ -182,7 +154,8 @@ static void PauseExit(void) {
|
|||
GWGameStat.story_pause.mg_list = GWMGListGet();
|
||||
GWGameStat.story_pause.mess_speed = GWMessSpeedGet();
|
||||
GWGameStat.story_pause.save_mode = GWSaveModeGet();
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
GWGameStat.party_pause.explain_mg = GWMGExplainGet();
|
||||
GWGameStat.party_pause.show_com_mg = GWMGShowComGet();
|
||||
GWGameStat.party_pause.mg_list = GWMGListGet();
|
||||
|
|
@ -192,7 +165,8 @@ static void PauseExit(void) {
|
|||
mainProcess = NULL;
|
||||
}
|
||||
|
||||
static void PauseProcess(void) {
|
||||
static void PauseProcess(void)
|
||||
{
|
||||
s32 temp_r31;
|
||||
|
||||
pauseQuitF = 0;
|
||||
|
|
@ -222,14 +196,16 @@ static void PauseProcess(void) {
|
|||
HuPrcSleep(20);
|
||||
WipeColorSet(0, 0, 0);
|
||||
BoardKill();
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
BoardFilterFadeOut(30);
|
||||
HuPrcSleep(30);
|
||||
}
|
||||
HuPrcEnd();
|
||||
}
|
||||
|
||||
void CreatePauseScreen(void) {
|
||||
void CreatePauseScreen(void)
|
||||
{
|
||||
Mtx sp30;
|
||||
Vec sp24;
|
||||
Vec sp18;
|
||||
|
|
@ -294,10 +270,12 @@ void CreatePauseScreen(void) {
|
|||
if (GWPartyGet() == 1) {
|
||||
if (GWTeamGet()) {
|
||||
HuSprBankSet(pauseSprGrp, 2, 2);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
HuSprBankSet(pauseSprGrp, 2, 0);
|
||||
}
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
HuSprBankSet(pauseSprGrp, 2, 1);
|
||||
}
|
||||
for (i = 0; i < 4; i++) {
|
||||
|
|
@ -334,7 +312,8 @@ void CreatePauseScreen(void) {
|
|||
sp24.x = 68.0f;
|
||||
if (GWBoardGet() == 3) {
|
||||
sp24.y = 464.0f;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
sp24.y = 434.0f;
|
||||
}
|
||||
sp24.z = 1100.0f;
|
||||
|
|
@ -436,7 +415,8 @@ void CreatePauseScreen(void) {
|
|||
SetBoxVisible(0);
|
||||
}
|
||||
|
||||
static void DeletePauseScreen(void) {
|
||||
static void DeletePauseScreen(void)
|
||||
{
|
||||
ConfigWork *temp_r30;
|
||||
Mtx sp8;
|
||||
s32 i;
|
||||
|
|
@ -461,7 +441,7 @@ static void DeletePauseScreen(void) {
|
|||
HuSprGrpKill(pauseCursorPos);
|
||||
pauseCursorPos = -1;
|
||||
}
|
||||
PSMTXIdentity(sp8);
|
||||
Identity(sp8);
|
||||
BoardModelLayerSet(hostMdl, hostOldLayer);
|
||||
BoardModelVisibilitySet(hostMdl, 1);
|
||||
BoardModelMtxSet(hostMdl, &sp8);
|
||||
|
|
@ -471,7 +451,8 @@ static void DeletePauseScreen(void) {
|
|||
}
|
||||
}
|
||||
|
||||
static void SetBoxVisible(s32 arg0) {
|
||||
static void SetBoxVisible(s32 arg0)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < 8; i++) {
|
||||
|
|
@ -479,7 +460,8 @@ static void SetBoxVisible(s32 arg0) {
|
|||
}
|
||||
}
|
||||
|
||||
static void PauseConfigObjFunc(omObjData *arg0) {
|
||||
static void PauseConfigObjFunc(omObjData *arg0)
|
||||
{
|
||||
ConfigWork *temp_r31;
|
||||
s16 temp_r28;
|
||||
s32 var_r29;
|
||||
|
|
@ -578,7 +560,8 @@ static void PauseConfigObjFunc(omObjData *arg0) {
|
|||
InitPauseQuit(arg0, temp_r31);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
cursorPos = ExecPauseConfig(arg0, temp_r31);
|
||||
if (temp_r28 != cursorPos) {
|
||||
arg0->trans.x = -40.0f + boxPosTbl[cursorPos][0];
|
||||
|
|
@ -590,7 +573,8 @@ static void PauseConfigObjFunc(omObjData *arg0) {
|
|||
}
|
||||
}
|
||||
|
||||
static void UpdatePauseText(s32 arg0) {
|
||||
static void UpdatePauseText(s32 arg0)
|
||||
{
|
||||
s32 var_r28;
|
||||
s32 j;
|
||||
s32 i;
|
||||
|
|
@ -603,7 +587,8 @@ static void UpdatePauseText(s32 arg0) {
|
|||
if (i == GWPlayer[j].port) {
|
||||
if (GWPlayer[j].com) {
|
||||
var_r28 = MAKE_MESSID(16, 30);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
var_r28 = MAKE_MESSID(16, 29);
|
||||
}
|
||||
HuWinInsertMesSet(settingsWin, var_r28, i);
|
||||
|
|
@ -615,14 +600,16 @@ static void UpdatePauseText(s32 arg0) {
|
|||
case 1:
|
||||
if (boxState[arg0] != 0) {
|
||||
HuWinMesSet(settingsWin, MAKE_MESSID(16, 33));
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
HuWinMesSet(settingsWin, MAKE_MESSID(16, 34));
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (boxState[arg0] != 0) {
|
||||
HuWinMesSet(settingsWin, MAKE_MESSID(16, 35));
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
HuWinMesSet(settingsWin, MAKE_MESSID(16, 36));
|
||||
}
|
||||
break;
|
||||
|
|
@ -642,7 +629,8 @@ static void UpdatePauseText(s32 arg0) {
|
|||
case 4:
|
||||
if (boxState[arg0] != 0) {
|
||||
HuWinMesSet(settingsWin, MAKE_MESSID(16, 40));
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
HuWinMesSet(settingsWin, MAKE_MESSID(16, 41));
|
||||
}
|
||||
break;
|
||||
|
|
@ -678,7 +666,8 @@ static void UpdatePauseText(s32 arg0) {
|
|||
}
|
||||
}
|
||||
|
||||
static void InitPauseQuit(omObjData *arg0, ConfigWork *arg1) {
|
||||
static void InitPauseQuit(omObjData *arg0, ConfigWork *arg1)
|
||||
{
|
||||
float var_f31;
|
||||
|
||||
switch (arg1->unk01) {
|
||||
|
|
@ -696,7 +685,8 @@ static void InitPauseQuit(omObjData *arg0, ConfigWork *arg1) {
|
|||
if (quitWin != -1 && HuWinStatGet(quitWin) == 3) {
|
||||
if (HuWinChoiceNowGet(quitWin) != 0) {
|
||||
HuWinMesSet(settingsWin, MAKE_MESSID(16, 51));
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
HuWinMesSet(settingsWin, MAKE_MESSID(16, 50));
|
||||
}
|
||||
}
|
||||
|
|
@ -725,7 +715,8 @@ static void InitPauseQuit(omObjData *arg0, ConfigWork *arg1) {
|
|||
}
|
||||
}
|
||||
|
||||
static void PauseQuitProcess(void) {
|
||||
static void PauseQuitProcess(void)
|
||||
{
|
||||
WindowData *temp_r31;
|
||||
float sp10[2];
|
||||
float sp8[2];
|
||||
|
|
@ -748,7 +739,8 @@ static void PauseQuitProcess(void) {
|
|||
HuPrcEnd();
|
||||
}
|
||||
|
||||
static void DeletePauseQuit(void) {
|
||||
static void DeletePauseQuit(void)
|
||||
{
|
||||
if (quitWin != -1) {
|
||||
HuWinExCleanup(quitWin);
|
||||
quitWin = -1;
|
||||
|
|
@ -757,7 +749,8 @@ static void DeletePauseQuit(void) {
|
|||
quitProcess = NULL;
|
||||
}
|
||||
|
||||
static s32 UpdatePadConfig(omObjData *arg0, ConfigWork *arg1) {
|
||||
static s32 UpdatePadConfig(omObjData *arg0, ConfigWork *arg1)
|
||||
{
|
||||
switch (arg1->unk01) {
|
||||
case 0:
|
||||
CreatePadConfig(arg0, arg1);
|
||||
|
|
@ -777,12 +770,14 @@ static s32 UpdatePadConfig(omObjData *arg0, ConfigWork *arg1) {
|
|||
}
|
||||
if (arg1->unk00_field1 != 0) {
|
||||
return 0;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
static void CreatePadConfig(omObjData *arg0, ConfigWork *arg1) {
|
||||
static void CreatePadConfig(omObjData *arg0, ConfigWork *arg1)
|
||||
{
|
||||
Vec sp14;
|
||||
Vec sp8;
|
||||
s32 i;
|
||||
|
|
@ -817,7 +812,8 @@ static void CreatePadConfig(omObjData *arg0, ConfigWork *arg1) {
|
|||
arg1->unk01 = 1;
|
||||
}
|
||||
|
||||
static void ScrollInPadConfig(omObjData *arg0, ConfigWork *arg1) {
|
||||
static void ScrollInPadConfig(omObjData *arg0, ConfigWork *arg1)
|
||||
{
|
||||
Vec sp8;
|
||||
s32 i;
|
||||
|
||||
|
|
@ -834,7 +830,8 @@ static void ScrollInPadConfig(omObjData *arg0, ConfigWork *arg1) {
|
|||
arg1->unk04 = 0;
|
||||
arg1->unk05 = 0;
|
||||
arg1->unk01 = 0;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
arg1->unk01 = 2;
|
||||
}
|
||||
return;
|
||||
|
|
@ -848,7 +845,8 @@ static void ScrollInPadConfig(omObjData *arg0, ConfigWork *arg1) {
|
|||
arg1->unk07--;
|
||||
}
|
||||
|
||||
static void CursorMovePadConfig(omObjData *arg0, ConfigWork *arg1) {
|
||||
static void CursorMovePadConfig(omObjData *arg0, ConfigWork *arg1)
|
||||
{
|
||||
float sp8[4];
|
||||
s32 temp_r29;
|
||||
u32 temp_r30;
|
||||
|
|
@ -861,16 +859,19 @@ static void CursorMovePadConfig(omObjData *arg0, ConfigWork *arg1) {
|
|||
if (GWPlayer[temp_r29].com) {
|
||||
arg1->unk00_field3 = GWPlayer[temp_r29].diff + 1;
|
||||
arg1->unk05 = GWPlayer[temp_r29].diff + 1;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
arg1->unk00_field3 = 0;
|
||||
arg1->unk05 = 0;
|
||||
}
|
||||
HuSprBankSet(padConfigSprGrp, arg1->unk04 + 8, 1);
|
||||
HuAudFXPlay(2);
|
||||
} else if (temp_r30 == 0x200) {
|
||||
}
|
||||
else if (temp_r30 == 0x200) {
|
||||
HuAudFXPlay(3);
|
||||
arg1->unk01 = 4;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
if (temp_r30 == 1) {
|
||||
arg1->unk04--;
|
||||
}
|
||||
|
|
@ -879,9 +880,11 @@ static void CursorMovePadConfig(omObjData *arg0, ConfigWork *arg1) {
|
|||
}
|
||||
if (arg1->unk04 < 0) {
|
||||
arg1->unk04 = 0;
|
||||
} else if (arg1->unk04 >= 4) {
|
||||
}
|
||||
else if (arg1->unk04 >= 4) {
|
||||
arg1->unk04 = 3;
|
||||
} else if (temp_r30 == 1 || temp_r30 == 2) {
|
||||
}
|
||||
else if (temp_r30 == 1 || temp_r30 == 2) {
|
||||
HuAudFXPlay(0);
|
||||
arg1->unk06 = 4;
|
||||
}
|
||||
|
|
@ -891,7 +894,8 @@ static void CursorMovePadConfig(omObjData *arg0, ConfigWork *arg1) {
|
|||
}
|
||||
}
|
||||
|
||||
static void ChangeDiffPadConfig(omObjData *arg0, ConfigWork *arg1) {
|
||||
static void ChangeDiffPadConfig(omObjData *arg0, ConfigWork *arg1)
|
||||
{
|
||||
s32 temp_r29;
|
||||
s32 var_r28;
|
||||
s32 var_r26;
|
||||
|
|
@ -901,13 +905,15 @@ static void ChangeDiffPadConfig(omObjData *arg0, ConfigWork *arg1) {
|
|||
var_r30 = 0;
|
||||
if (HuPadStkX[pausePad] < -20) {
|
||||
var_r30 |= 1;
|
||||
} else if (HuPadStkX[pausePad] > 20) {
|
||||
}
|
||||
else if (HuPadStkX[pausePad] > 20) {
|
||||
var_r30 |= 2;
|
||||
}
|
||||
temp_r29 = CheckPort(arg1->unk04);
|
||||
if (GWGameStat.veryHardUnlock != 0) {
|
||||
var_r27 = 4;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
var_r27 = 3;
|
||||
}
|
||||
HuWinMesSet(settingsWin, MAKE_MESSID(16, 32));
|
||||
|
|
@ -916,13 +922,15 @@ static void ChangeDiffPadConfig(omObjData *arg0, ConfigWork *arg1) {
|
|||
if (arg1->unk09++ < 10) {
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
if (arg1->unk09++ < 2) {
|
||||
return;
|
||||
}
|
||||
arg1->unk0C = var_r30;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
arg1->unk0C = 0;
|
||||
}
|
||||
arg1->unk09 = 0;
|
||||
|
|
@ -936,7 +944,8 @@ static void ChangeDiffPadConfig(omObjData *arg0, ConfigWork *arg1) {
|
|||
if (var_r28 != 0) {
|
||||
HuAudFXPlay(0);
|
||||
arg1->unk06 = 4;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
if (HuPadBtnDown[pausePad] == 0x100) {
|
||||
arg1->unk01 = 2;
|
||||
if (arg1->unk05 != 0) {
|
||||
|
|
@ -944,7 +953,8 @@ static void ChangeDiffPadConfig(omObjData *arg0, ConfigWork *arg1) {
|
|||
GWPlayerCfg[temp_r29].iscom = 1;
|
||||
GWPlayer[temp_r29].diff = arg1->unk05 - 1;
|
||||
GWPlayerCfg[temp_r29].diff = arg1->unk05 - 1;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
GWPlayer[temp_r29].com = 0;
|
||||
GWPlayerCfg[temp_r29].iscom = 0;
|
||||
}
|
||||
|
|
@ -967,18 +977,21 @@ static void ChangeDiffPadConfig(omObjData *arg0, ConfigWork *arg1) {
|
|||
}
|
||||
if (arg1->unk05 > var_r27) {
|
||||
arg1->unk05 = 0;
|
||||
} else if (arg1->unk05 < 0) {
|
||||
}
|
||||
else if (arg1->unk05 < 0) {
|
||||
arg1->unk05 = var_r27;
|
||||
}
|
||||
if (arg1->unk05 != 0) {
|
||||
var_r26 = arg1->unk05 + 3;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
var_r26 = arg1->unk04;
|
||||
}
|
||||
HuSprBankSet(padConfigSprGrp, arg1->unk04 + 4, var_r26);
|
||||
}
|
||||
|
||||
static void ScrollOutPadConfig(omObjData *arg0, ConfigWork *arg1) {
|
||||
static void ScrollOutPadConfig(omObjData *arg0, ConfigWork *arg1)
|
||||
{
|
||||
Vec sp14;
|
||||
Vec sp8;
|
||||
|
||||
|
|
@ -1003,7 +1016,8 @@ static void ScrollOutPadConfig(omObjData *arg0, ConfigWork *arg1) {
|
|||
arg1->unk00_field2 = 1;
|
||||
}
|
||||
|
||||
static s32 UpdatePauseBox(omObjData *arg0, ConfigWork *arg1, s32 arg2) {
|
||||
static s32 UpdatePauseBox(omObjData *arg0, ConfigWork *arg1, s32 arg2)
|
||||
{
|
||||
float var_f31;
|
||||
float var_f30;
|
||||
float var_f29;
|
||||
|
|
@ -1031,21 +1045,26 @@ static s32 UpdatePauseBox(omObjData *arg0, ConfigWork *arg1, s32 arg2) {
|
|||
}
|
||||
if (arg1->unk04 < 0) {
|
||||
arg1->unk04 = 0;
|
||||
} else if (arg1->unk04 > 1) {
|
||||
}
|
||||
else if (arg1->unk04 > 1) {
|
||||
arg1->unk04 = 1;
|
||||
} else if (temp_r28 == 1 || temp_r28 == 2) {
|
||||
}
|
||||
else if (temp_r28 == 1 || temp_r28 == 2) {
|
||||
HuAudFXPlay(0);
|
||||
}
|
||||
if (temp_r28 == 0x100) {
|
||||
arg1->unk01 = 3;
|
||||
HuAudFXPlay(2);
|
||||
} else if (temp_r28 == 0x200) {
|
||||
}
|
||||
else if (temp_r28 == 0x200) {
|
||||
arg1->unk01 = 4;
|
||||
HuAudFXPlay(3);
|
||||
} else if (temp_r27 != arg1->unk04) {
|
||||
}
|
||||
else if (temp_r27 != arg1->unk04) {
|
||||
if (arg1->unk04 != 0) {
|
||||
var_f30 = 0.0f;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
var_f30 = -90.0f;
|
||||
}
|
||||
var_f29 = arg0->rot.x;
|
||||
|
|
@ -1058,7 +1077,8 @@ static s32 UpdatePauseBox(omObjData *arg0, ConfigWork *arg1, s32 arg2) {
|
|||
if (arg1->unk07 != 0) {
|
||||
arg0->rot.x += arg0->rot.y;
|
||||
arg1->unk07--;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
arg1->unk01 = 1;
|
||||
}
|
||||
break;
|
||||
|
|
@ -1091,7 +1111,8 @@ static s32 UpdatePauseBox(omObjData *arg0, ConfigWork *arg1, s32 arg2) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
static s32 UpdatePauseBoxExt(omObjData *arg0, ConfigWork *arg1, s32 arg2) {
|
||||
static s32 UpdatePauseBoxExt(omObjData *arg0, ConfigWork *arg1, s32 arg2)
|
||||
{
|
||||
float var_f31;
|
||||
float var_f30;
|
||||
float var_f29;
|
||||
|
|
@ -1102,7 +1123,8 @@ static s32 UpdatePauseBoxExt(omObjData *arg0, ConfigWork *arg1, s32 arg2) {
|
|||
|
||||
if (arg2 == 3 && GWGameStat.customPackEnable == 0) {
|
||||
var_r27 = 1;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
var_r27 = 2;
|
||||
}
|
||||
switch (arg1->unk01) {
|
||||
|
|
@ -1125,18 +1147,22 @@ static s32 UpdatePauseBoxExt(omObjData *arg0, ConfigWork *arg1, s32 arg2) {
|
|||
}
|
||||
if (arg1->unk04 < 0) {
|
||||
arg1->unk04 = 0;
|
||||
} else if (arg1->unk04 > var_r27) {
|
||||
}
|
||||
else if (arg1->unk04 > var_r27) {
|
||||
arg1->unk04 = var_r27;
|
||||
} else if (temp_r28 == 1 || temp_r28 == 2) {
|
||||
}
|
||||
else if (temp_r28 == 1 || temp_r28 == 2) {
|
||||
HuAudFXPlay(0);
|
||||
}
|
||||
if (temp_r28 == 0x100) {
|
||||
arg1->unk01 = 3;
|
||||
HuAudFXPlay(2);
|
||||
} else if (temp_r28 == 0x200) {
|
||||
}
|
||||
else if (temp_r28 == 0x200) {
|
||||
arg1->unk01 = 4;
|
||||
HuAudFXPlay(3);
|
||||
} else if (temp_r26 != arg1->unk04) {
|
||||
}
|
||||
else if (temp_r26 != arg1->unk04) {
|
||||
switch (arg1->unk04) {
|
||||
case 0:
|
||||
var_f30 = 90.0f;
|
||||
|
|
@ -1158,7 +1184,8 @@ static s32 UpdatePauseBoxExt(omObjData *arg0, ConfigWork *arg1, s32 arg2) {
|
|||
if (arg1->unk07 != 0) {
|
||||
arg0->rot.x += arg0->rot.y;
|
||||
arg1->unk07--;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
arg1->unk01 = 1;
|
||||
}
|
||||
break;
|
||||
|
|
@ -1191,7 +1218,8 @@ static s32 UpdatePauseBoxExt(omObjData *arg0, ConfigWork *arg1, s32 arg2) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
static s32 ExecPauseConfig(omObjData *arg0, ConfigWork *arg1) {
|
||||
static s32 ExecPauseConfig(omObjData *arg0, ConfigWork *arg1)
|
||||
{
|
||||
s32 var_r27;
|
||||
s32 var_r26;
|
||||
s32 var_r29;
|
||||
|
|
@ -1218,17 +1246,21 @@ static s32 ExecPauseConfig(omObjData *arg0, ConfigWork *arg1) {
|
|||
arg1->unk03 += var_r28;
|
||||
if (arg1->unk03 < 0) {
|
||||
arg1->unk03 = 0;
|
||||
} else if (arg1->unk03 >= 2) {
|
||||
}
|
||||
else if (arg1->unk03 >= 2) {
|
||||
arg1->unk03 = 1;
|
||||
} else if (var_r28 != 0) {
|
||||
}
|
||||
else if (var_r28 != 0) {
|
||||
HuAudFXPlay(0);
|
||||
arg1->unk06 = 4;
|
||||
}
|
||||
if (arg1->unk02 < 0) {
|
||||
arg1->unk02 = 0;
|
||||
} else if (arg1->unk02 >= 4) {
|
||||
}
|
||||
else if (arg1->unk02 >= 4) {
|
||||
arg1->unk02 = 3;
|
||||
} else if (var_r29 != 0) {
|
||||
}
|
||||
else if (var_r29 != 0) {
|
||||
HuAudFXPlay(0);
|
||||
arg1->unk06 = 4;
|
||||
}
|
||||
|
|
@ -1251,7 +1283,8 @@ static s32 ExecPauseConfig(omObjData *arg0, ConfigWork *arg1) {
|
|||
}
|
||||
if (var_r26 != 0) {
|
||||
HuAudFXPlay(4);
|
||||
} else if (var_r27 != 0) {
|
||||
}
|
||||
else if (var_r27 != 0) {
|
||||
HuAudFXPlay(2);
|
||||
arg1->unk00_field1 = 1;
|
||||
}
|
||||
|
|
@ -1263,7 +1296,8 @@ static s32 ExecPauseConfig(omObjData *arg0, ConfigWork *arg1) {
|
|||
return arg1->unk02 + arg1->unk03 * 4;
|
||||
}
|
||||
|
||||
static void CreatePauseControlWin(void) {
|
||||
static void CreatePauseControlWin(void)
|
||||
{
|
||||
float sp8[2];
|
||||
float var_f31;
|
||||
float var_f30;
|
||||
|
|
@ -1280,7 +1314,8 @@ static void CreatePauseControlWin(void) {
|
|||
HuWinDispOff(settingsControlWin);
|
||||
if (GWBoardGet() == 7 || GWBoardGet() == 8) {
|
||||
var_r31 = MAKE_MESSID(16, 73);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
var_r31 = MAKE_MESSID(16, 52);
|
||||
}
|
||||
HuWinMesMaxSizeGet(1, sp8, var_r31);
|
||||
|
|
@ -1304,7 +1339,8 @@ static void CreatePauseControlWin(void) {
|
|||
sp8[1] = 128.0f;
|
||||
}
|
||||
|
||||
static void DeletePauseControlWin(void) {
|
||||
static void DeletePauseControlWin(void)
|
||||
{
|
||||
if (settingsControlWin != -1) {
|
||||
HuWinKill(settingsControlWin);
|
||||
settingsControlWin = -1;
|
||||
|
|
@ -1319,7 +1355,8 @@ static void DeletePauseControlWin(void) {
|
|||
}
|
||||
}
|
||||
|
||||
static s32 WaitPauseInput(void) {
|
||||
static s32 WaitPauseInput(void)
|
||||
{
|
||||
s32 var_r28;
|
||||
s32 var_r31;
|
||||
u32 temp_r30;
|
||||
|
|
@ -1327,7 +1364,8 @@ static s32 WaitPauseInput(void) {
|
|||
mainScreenF = 1;
|
||||
if (GWBoardGet() == 7 || GWBoardGet() == 8) {
|
||||
var_r28 = 1;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
var_r28 = 0;
|
||||
}
|
||||
HuWinDispOn(controlWin);
|
||||
|
|
@ -1344,13 +1382,15 @@ static s32 WaitPauseInput(void) {
|
|||
var_r31 = 0;
|
||||
HuAudFXPlay(0x1C);
|
||||
break;
|
||||
} else if (var_r28 == 0) {
|
||||
}
|
||||
else if (var_r28 == 0) {
|
||||
if (temp_r30 == 0x100) {
|
||||
var_r31 = 1;
|
||||
HuAudFXPlay(1);
|
||||
break;
|
||||
}
|
||||
} else if (temp_r30 == 0x10) {
|
||||
}
|
||||
else if (temp_r30 == 0x10) {
|
||||
pauseQuitF = 1;
|
||||
var_r31 = 2;
|
||||
mgQuitExtraF = 1;
|
||||
|
|
@ -1368,7 +1408,8 @@ static s32 WaitPauseInput(void) {
|
|||
return var_r31;
|
||||
}
|
||||
|
||||
static void ShowPauseConfig(void) {
|
||||
static void ShowPauseConfig(void)
|
||||
{
|
||||
float var_f31;
|
||||
float var_f30;
|
||||
|
||||
|
|
@ -1383,7 +1424,8 @@ static void ShowPauseConfig(void) {
|
|||
var_f30 = boxPosTbl[0][1];
|
||||
HuSprPosSet(pauseCursorPos, 1, var_f31, var_f30);
|
||||
HuSprAttrReset(pauseCursorPos, 1, HUSPR_ATTR_DISPOFF);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
HuSprAttrSet(pauseCursorPos, 1, HUSPR_ATTR_DISPOFF);
|
||||
}
|
||||
while (configObj) {
|
||||
|
|
@ -1391,7 +1433,8 @@ static void ShowPauseConfig(void) {
|
|||
}
|
||||
}
|
||||
|
||||
static void CreatePadConfigSprite(void) {
|
||||
static void CreatePadConfigSprite(void)
|
||||
{
|
||||
float temp_f31;
|
||||
float temp_f30;
|
||||
s32 var_r29;
|
||||
|
|
@ -1415,7 +1458,8 @@ static void CreatePadConfigSprite(void) {
|
|||
HuSprBankSet(padConfigSprGrp, i, temp_r28);
|
||||
if (temp_r26 != 0) {
|
||||
var_r29 = temp_r27 + 4;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
var_r29 = i;
|
||||
}
|
||||
HuSprBankSet(padConfigSprGrp, i + 4, var_r29);
|
||||
|
|
@ -1427,7 +1471,8 @@ static void CreatePadConfigSprite(void) {
|
|||
HuSprGrpPosSet(padConfigSprGrp, 0.0f, 0.0f);
|
||||
}
|
||||
|
||||
static void ShowPadConfigSprite(s32 arg0) {
|
||||
static void ShowPadConfigSprite(s32 arg0)
|
||||
{
|
||||
s32 temp_r31;
|
||||
s32 i;
|
||||
|
||||
|
|
@ -1437,7 +1482,8 @@ static void ShowPadConfigSprite(s32 arg0) {
|
|||
HuSprAttrReset(padConfigSprGrp, temp_r31, HUSPR_ATTR_DISPOFF);
|
||||
HuSprAttrReset(padConfigSprGrp, temp_r31 + 4, HUSPR_ATTR_DISPOFF);
|
||||
HuSprAttrReset(padConfigSprGrp, temp_r31 + 8, HUSPR_ATTR_DISPOFF);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
HuSprAttrSet(padConfigSprGrp, temp_r31, HUSPR_ATTR_DISPOFF);
|
||||
HuSprAttrSet(padConfigSprGrp, temp_r31 + 4, HUSPR_ATTR_DISPOFF);
|
||||
HuSprAttrSet(padConfigSprGrp, temp_r31 + 8, HUSPR_ATTR_DISPOFF);
|
||||
|
|
@ -1445,12 +1491,14 @@ static void ShowPadConfigSprite(s32 arg0) {
|
|||
}
|
||||
if (arg0 != 0) {
|
||||
HuSprAttrReset(padConfigSprGrp, 12, HUSPR_ATTR_DISPOFF);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
HuSprAttrSet(padConfigSprGrp, 12, HUSPR_ATTR_DISPOFF);
|
||||
}
|
||||
}
|
||||
|
||||
static void PauseCreateNumber(s32 arg0, s8 arg1) {
|
||||
static void PauseCreateNumber(s32 arg0, s8 arg1)
|
||||
{
|
||||
s32 var_r31;
|
||||
s32 temp_r30;
|
||||
s32 temp_r29;
|
||||
|
|
@ -1459,22 +1507,26 @@ static void PauseCreateNumber(s32 arg0, s8 arg1) {
|
|||
temp_r30 = arg1 / 10;
|
||||
if (arg0 == 0) {
|
||||
var_r31 = 3;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
var_r31 = 5;
|
||||
}
|
||||
if (temp_r30 != 0) {
|
||||
HuSprBankSet(pauseSprGrp, var_r31, temp_r30);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
HuSprAttrSet(pauseSprGrp, var_r31, 4);
|
||||
}
|
||||
HuSprBankSet(pauseSprGrp, var_r31 + 1, temp_r29);
|
||||
}
|
||||
|
||||
BOOL BoardPauseActiveCheck(void) {
|
||||
BOOL BoardPauseActiveCheck(void)
|
||||
{
|
||||
return (mainProcess != NULL) ? TRUE : FALSE;
|
||||
}
|
||||
|
||||
BOOL BoardPauseReqCheck(void) {
|
||||
BOOL BoardPauseReqCheck(void)
|
||||
{
|
||||
s32 temp_r30;
|
||||
s32 i;
|
||||
|
||||
|
|
@ -1495,7 +1547,8 @@ BOOL BoardPauseReqCheck(void) {
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
static s32 CheckPort(s32 arg0) {
|
||||
static s32 CheckPort(s32 arg0)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
|
|
@ -1506,7 +1559,8 @@ static s32 CheckPort(s32 arg0) {
|
|||
return i;
|
||||
}
|
||||
|
||||
static void RotateBox(float arg0, float arg1, Mtx arg2) {
|
||||
static void RotateBox(float arg0, float arg1, Mtx arg2)
|
||||
{
|
||||
Vec sp14;
|
||||
Mtx spB0;
|
||||
Mtx sp80;
|
||||
|
|
@ -1514,11 +1568,11 @@ static void RotateBox(float arg0, float arg1, Mtx arg2) {
|
|||
Mtx sp20;
|
||||
|
||||
BoardCameraRotGet(&sp14);
|
||||
PSMTXRotRad(spB0, 'x', MTXDegToRad(sp14.x));
|
||||
PSMTXRotRad(sp80, 'y', MTXDegToRad(sp14.y));
|
||||
PSMTXRotRad(sp50, 'x', MTXDegToRad(arg0));
|
||||
PSMTXRotRad(sp20, 'y', MTXDegToRad(arg1));
|
||||
PSMTXConcat(sp80, spB0, sp80);
|
||||
PSMTXConcat(sp50, sp20, sp20);
|
||||
PSMTXConcat(sp80, sp20, arg2);
|
||||
RotRad(spB0, 'x', MTXDegToRad(sp14.x));
|
||||
RotRad(sp80, 'y', MTXDegToRad(sp14.y));
|
||||
RotRad(sp50, 'x', MTXDegToRad(arg0));
|
||||
RotRad(sp20, 'y', MTXDegToRad(arg1));
|
||||
Concat(sp80, spB0, sp80);
|
||||
Concat(sp50, sp20, sp20);
|
||||
Concat(sp80, sp20, arg2);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,13 +1,5 @@
|
|||
#include "game/board/shop.h"
|
||||
#include "game/audio.h"
|
||||
#include "game/gamework.h"
|
||||
#include "game/gamework_data.h"
|
||||
#include "game/object.h"
|
||||
#include "game/objsub.h"
|
||||
#include "game/disp.h"
|
||||
#include "game/pad.h"
|
||||
#include "game/process.h"
|
||||
#include "game/sprite.h"
|
||||
#include "game/board/audio.h"
|
||||
#include "game/board/com.h"
|
||||
#include "game/board/com_path.h"
|
||||
|
|
@ -20,6 +12,15 @@
|
|||
#include "game/board/ui.h"
|
||||
#include "game/board/view.h"
|
||||
#include "game/board/window.h"
|
||||
#include "game/disp.h"
|
||||
#include "game/gamework.h"
|
||||
#include "game/gamework_data.h"
|
||||
#include "game/object.h"
|
||||
#include "game/objsub.h"
|
||||
#include "game/pad.h"
|
||||
#include "game/process.h"
|
||||
#include "game/sprite.h"
|
||||
|
||||
|
||||
#include "dolphin.h"
|
||||
#include "ext_math.h"
|
||||
|
|
@ -103,39 +104,20 @@ static Process *shopProc;
|
|||
static s16 itemMdl = -1;
|
||||
static s8 itemChoice = -1;
|
||||
|
||||
static BoardModelParam shopMdlParam[1] = {
|
||||
{ 0x00070094, { 0, 1, 0, 0, 0 }, -1 }
|
||||
};
|
||||
static BoardModelParam shopMdlParam[1] = { { 0x00070094, { 0, 1, 0, 0, 0 }, -1 } };
|
||||
|
||||
static s16 hostMdl = -1;
|
||||
static s16 shopMot[3] = { -1, -1, -1 };
|
||||
static s8 itemCurChoice = -1;
|
||||
|
||||
static s8 defaultItemTbl[5] = {
|
||||
0x05, 0x07, 0x02, 0x03, 0x00
|
||||
};
|
||||
static s8 defaultItemTbl[5] = { 0x05, 0x07, 0x02, 0x03, 0x00 };
|
||||
|
||||
static s32 hostMessTbl[] = {
|
||||
MAKE_MESSID(0x0F, 0x04),
|
||||
MAKE_MESSID(0x0F, 0x07),
|
||||
MAKE_MESSID(0x0F, 0x0A),
|
||||
MAKE_MESSID(0x0F, 0x0D),
|
||||
MAKE_MESSID(0x0F, 0x10),
|
||||
MAKE_MESSID(0x0F, 0x13),
|
||||
MAKE_MESSID(0x0F, 0x04),
|
||||
MAKE_MESSID(0x0F, 0x24),
|
||||
MAKE_MESSID(0x0F, 0x24)
|
||||
};
|
||||
static s32 hostMessTbl[] = { MAKE_MESSID(0x0F, 0x04), MAKE_MESSID(0x0F, 0x07), MAKE_MESSID(0x0F, 0x0A), MAKE_MESSID(0x0F, 0x0D),
|
||||
MAKE_MESSID(0x0F, 0x10), MAKE_MESSID(0x0F, 0x13), MAKE_MESSID(0x0F, 0x04), MAKE_MESSID(0x0F, 0x24), MAKE_MESSID(0x0F, 0x24) };
|
||||
|
||||
static s8 itemPriceTbl[] = {
|
||||
5, 5, 15, 15,
|
||||
10, 10, 15, 15,
|
||||
15, 15, 0, 25,
|
||||
30, 30, 0, 0
|
||||
};
|
||||
static s8 itemPriceTbl[] = { 5, 5, 15, 15, 10, 10, 15, 15, 15, 15, 0, 25, 30, 30, 0, 0 };
|
||||
|
||||
static s32 shopMotTbl[9][3] = {
|
||||
{ DATA_MAKE_NUM(DATADIR_BGUEST, 0x01), DATA_MAKE_NUM(DATADIR_BGUEST, 0x03), DATA_MAKE_NUM(DATADIR_BGUEST, 0x04) },
|
||||
static s32 shopMotTbl[9][3] = { { DATA_MAKE_NUM(DATADIR_BGUEST, 0x01), DATA_MAKE_NUM(DATADIR_BGUEST, 0x03), DATA_MAKE_NUM(DATADIR_BGUEST, 0x04) },
|
||||
{ DATA_MAKE_NUM(DATADIR_BGUEST, 0x09), DATA_MAKE_NUM(DATADIR_BGUEST, 0x0B), DATA_MAKE_NUM(DATADIR_BGUEST, 0x0C) },
|
||||
{ DATA_MAKE_NUM(DATADIR_BGUEST, 0x0E), DATA_MAKE_NUM(DATADIR_BGUEST, 0x10), DATA_MAKE_NUM(DATADIR_BGUEST, 0x11) },
|
||||
{ DATA_MAKE_NUM(DATADIR_BGUEST, 0x18), DATA_MAKE_NUM(DATADIR_BGUEST, 0x1A), DATA_MAKE_NUM(DATADIR_BGUEST, 0x1B) },
|
||||
|
|
@ -143,27 +125,26 @@ static s32 shopMotTbl[9][3] = {
|
|||
{ DATA_MAKE_NUM(DATADIR_BGUEST, 0x22), DATA_MAKE_NUM(DATADIR_BGUEST, 0x24), DATA_MAKE_NUM(DATADIR_BGUEST, 0x25) },
|
||||
{ DATA_MAKE_NUM(DATADIR_BGUEST, 0x09), DATA_MAKE_NUM(DATADIR_BGUEST, 0x0B), DATA_MAKE_NUM(DATADIR_BGUEST, 0x0C) },
|
||||
{ DATA_MAKE_NUM(DATADIR_BGUEST, 0x2A), DATA_MAKE_NUM(DATADIR_BGUEST, 0x2C), DATA_MAKE_NUM(DATADIR_BGUEST, 0x2D) },
|
||||
{ DATA_MAKE_NUM(DATADIR_BGUEST, 0x2A), DATA_MAKE_NUM(DATADIR_BGUEST, 0x2C), DATA_MAKE_NUM(DATADIR_BGUEST, 0x2D) }
|
||||
};
|
||||
{ DATA_MAKE_NUM(DATADIR_BGUEST, 0x2A), DATA_MAKE_NUM(DATADIR_BGUEST, 0x2C), DATA_MAKE_NUM(DATADIR_BGUEST, 0x2D) } };
|
||||
|
||||
void BoardShopHostSet(s16 arg0) {
|
||||
void BoardShopHostSet(s16 arg0)
|
||||
{
|
||||
hostMdl = arg0;
|
||||
}
|
||||
|
||||
s16 BoardShopHostGet(void) {
|
||||
s16 BoardShopHostGet(void)
|
||||
{
|
||||
return hostMdl;
|
||||
}
|
||||
|
||||
void BoardShopInit(void) {
|
||||
void BoardShopInit(void)
|
||||
{
|
||||
BoardModelParam *var_r29;
|
||||
Vec sp1C;
|
||||
Vec sp10;
|
||||
s32 j;
|
||||
s32 i;
|
||||
s32 sp8[2] = {
|
||||
0x00080000,
|
||||
0x00100000
|
||||
};
|
||||
s32 sp8[2] = { 0x00080000, 0x00100000 };
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
BoardSpaceLinkTransformGet(sp8[i], &sp1C, &sp10, 0);
|
||||
|
|
@ -176,7 +157,8 @@ void BoardShopInit(void) {
|
|||
BoardModelVisibilitySet(hostMdl, 0);
|
||||
}
|
||||
|
||||
void BoardShopKill(void) {
|
||||
void BoardShopKill(void)
|
||||
{
|
||||
s32 i;
|
||||
s32 j;
|
||||
|
||||
|
|
@ -190,7 +172,8 @@ void BoardShopKill(void) {
|
|||
}
|
||||
}
|
||||
|
||||
void BoardShopExec(s32 player, s32 space) {
|
||||
void BoardShopExec(s32 player, s32 space)
|
||||
{
|
||||
if (BoardPlayerSizeGet(GWSystem.player_curr) == 2) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -204,7 +187,8 @@ void BoardShopExec(s32 player, s32 space) {
|
|||
BoardRollDispSet(1);
|
||||
}
|
||||
|
||||
static void ExecShop(void) {
|
||||
static void ExecShop(void)
|
||||
{
|
||||
Vec sp38;
|
||||
Vec sp2C;
|
||||
Vec sp20;
|
||||
|
|
@ -229,7 +213,8 @@ static void ExecShop(void) {
|
|||
temp_r28 = GWPlayer[shopPlayer].space_curr;
|
||||
if (BoardSpaceFlagGet(0, temp_r28) & 0x80000) {
|
||||
shopMdlPtr = shopMdlIdx[0];
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
shopMdlPtr = shopMdlIdx[1];
|
||||
}
|
||||
BoardPlayerIdleSet(shopPlayer);
|
||||
|
|
@ -315,7 +300,8 @@ static void ExecShop(void) {
|
|||
if (var_r29 > BoardPlayerCoinsGet(shopPlayer)) {
|
||||
BoardWinChoiceDisable(i);
|
||||
choiceEnableTbl[i] = 0;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
choiceEnableTbl[i] = 1;
|
||||
}
|
||||
}
|
||||
|
|
@ -332,7 +318,8 @@ static void ExecShop(void) {
|
|||
HuPrcSleep(0xF);
|
||||
if (itemCurChoice == -1 || itemCurChoice == 5 || itemCurChoice == 0x7F) {
|
||||
PauseShopWin();
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
PauseShopWin();
|
||||
while (!BoardStatusStopCheck(shopPlayer)) {
|
||||
HuPrcVSleep();
|
||||
|
|
@ -346,7 +333,8 @@ static void ExecShop(void) {
|
|||
temp_r24 = itemPriceTbl[activeItemTbl[itemCurChoice]];
|
||||
if (temp_r24 >= 20) {
|
||||
var_r23 = 3;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
var_r23 = 6;
|
||||
}
|
||||
var_f30 = BoardDAngleCalc(180.0f + BoardPlayerRotYGet(shopPlayer));
|
||||
|
|
@ -391,7 +379,8 @@ static void ExecShop(void) {
|
|||
HuPrcEnd();
|
||||
}
|
||||
|
||||
static void DestroyShop(void) {
|
||||
static void DestroyShop(void)
|
||||
{
|
||||
s16 temp_r30;
|
||||
s32 i;
|
||||
|
||||
|
|
@ -413,7 +402,8 @@ static void DestroyShop(void) {
|
|||
shopProc = NULL;
|
||||
}
|
||||
|
||||
static void PopupShop(void) {
|
||||
static void PopupShop(void)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
|
|
@ -443,7 +433,8 @@ static void PopupShop(void) {
|
|||
}
|
||||
}
|
||||
|
||||
static void CloseShop(void) {
|
||||
static void CloseShop(void)
|
||||
{
|
||||
BoardModelMotionStart(shopMdlPtr[0], 0, 0x40000004);
|
||||
while (BoardModelMotionTimeGet(shopMdlPtr[0]) > 28.0f) {
|
||||
HuPrcVSleep();
|
||||
|
|
@ -458,7 +449,8 @@ static void CloseShop(void) {
|
|||
BoardModelVisibilitySet(BoardShopHostGet(), 0);
|
||||
}
|
||||
|
||||
static void CreateShopWin(void) {
|
||||
static void CreateShopWin(void)
|
||||
{
|
||||
Vec sp8;
|
||||
omObjData *var_r31;
|
||||
ShopWinWork *var_r30;
|
||||
|
|
@ -473,12 +465,12 @@ static void CreateShopWin(void) {
|
|||
var_r30->unk01 = 0xC;
|
||||
var_r30->unk04 = 0;
|
||||
shopWinObj = var_r31;
|
||||
var_r30->unk06 = HuWinCreate(36.0f, HU_DISP_HEIGHT-136, 0x1F8, 0x60, 0);
|
||||
var_r30->unk06 = HuWinCreate(36.0f, HU_DISP_HEIGHT - 136, 0x1F8, 0x60, 0);
|
||||
HuWinMesSpeedSet(var_r30->unk06, 0);
|
||||
HuWinDrawNoSet(var_r30->unk06, 0x40);
|
||||
HuWinExAnimIn(var_r30->unk06);
|
||||
sp8.x = 84.0f;
|
||||
sp8.y = HU_DISP_HEIGHT-88;
|
||||
sp8.y = HU_DISP_HEIGHT - 88;
|
||||
sp8.z = 400.0f;
|
||||
var_r31->scale.x = var_r31->scale.y = var_r31->scale.z = 0.25f;
|
||||
Hu3D2Dto3D(&sp8, 1, &sp8);
|
||||
|
|
@ -488,7 +480,8 @@ static void CreateShopWin(void) {
|
|||
var_r31->scale.x = var_r31->scale.y = var_r31->scale.z = 1.0f;
|
||||
}
|
||||
|
||||
static void UpdateShopWin(omObjData *arg0) {
|
||||
static void UpdateShopWin(omObjData *arg0)
|
||||
{
|
||||
Vec spC;
|
||||
float var_f29;
|
||||
float var_f28;
|
||||
|
|
@ -517,7 +510,8 @@ static void UpdateShopWin(omObjData *arg0) {
|
|||
if (temp_r28->unk00_field0 == 0) {
|
||||
BoardModelVisibilitySet(itemMdl, 0);
|
||||
}
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
HuWinDispOn(temp_r28->unk06);
|
||||
SetShopWinItem(temp_r28, arg0);
|
||||
BoardModelVisibilitySet(itemMdl, 1);
|
||||
|
|
@ -543,9 +537,9 @@ static void UpdateShopWin(omObjData *arg0) {
|
|||
}
|
||||
arg0->rot.y = BoardDAngleCalc(arg0->rot.y + 2.0f);
|
||||
BoardCameraRotGet(&spC);
|
||||
PSMTXRotRad(sp48, 'y', MTXDegToRad(arg0->rot.y));
|
||||
PSMTXRotRad(sp18, 'x', MTXDegToRad(spC.x + 10.0f));
|
||||
PSMTXConcat(sp18, sp48, sp48);
|
||||
RotRad(sp48, 'y', MTXDegToRad(arg0->rot.y));
|
||||
RotRad(sp18, 'x', MTXDegToRad(spC.x + 10.0f));
|
||||
Concat(sp18, sp48, sp48);
|
||||
BoardModelMtxSet(itemMdl, &sp48);
|
||||
BoardModelRotSet(itemMdl, 0.0f, 0.0f, 0.0f);
|
||||
BoardModelPosSet(itemMdl, arg0->trans.x, arg0->trans.y + var_f29, arg0->trans.z);
|
||||
|
|
@ -554,7 +548,8 @@ static void UpdateShopWin(omObjData *arg0) {
|
|||
}
|
||||
}
|
||||
|
||||
static void SetShopWinItem(ShopWinWork *arg0, omObjData *arg1) {
|
||||
static void SetShopWinItem(ShopWinWork *arg0, omObjData *arg1)
|
||||
{
|
||||
Vec spC;
|
||||
s32 var_r26;
|
||||
s8 temp_r28;
|
||||
|
|
@ -581,14 +576,16 @@ static void SetShopWinItem(ShopWinWork *arg0, omObjData *arg1) {
|
|||
}
|
||||
}
|
||||
|
||||
static void PauseShopWin(void) {
|
||||
static void PauseShopWin(void)
|
||||
{
|
||||
if (shopWinObj) {
|
||||
OM_GET_WORK_PTR(shopWinObj, ShopWinWork)->unk00_field0 = 1;
|
||||
shopWinObj = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void StartItemGive(void) {
|
||||
void StartItemGive(void)
|
||||
{
|
||||
Vec sp14;
|
||||
Vec sp8;
|
||||
omObjData *temp_r30;
|
||||
|
|
@ -605,7 +602,7 @@ void StartItemGive(void) {
|
|||
BoardModelMotionStart(itemMdl, 0, 0);
|
||||
BoardModelMotionSpeedSet(itemMdl, 0.0f);
|
||||
BoardModelPosGet(itemMdl, &sp14);
|
||||
PSMTXIdentity(sp20);
|
||||
Identity(sp20);
|
||||
BoardModelMtxSet(itemMdl, &sp20);
|
||||
OSs16tof32(&angleVal, &temp_r30->scale.z);
|
||||
temp_r30->scale.z = -temp_r30->scale.z / 40.0f;
|
||||
|
|
@ -621,7 +618,8 @@ void StartItemGive(void) {
|
|||
itemGiveObj = temp_r30;
|
||||
}
|
||||
|
||||
static void ExecItemGive(omObjData *arg0) {
|
||||
static void ExecItemGive(omObjData *arg0)
|
||||
{
|
||||
ItemGiveWork *temp_r29;
|
||||
float var_f30;
|
||||
|
||||
|
|
@ -653,7 +651,8 @@ static void ExecItemGive(omObjData *arg0) {
|
|||
BoardModelRotYSet(itemMdl, var_f30);
|
||||
}
|
||||
|
||||
static void MoveItemGive(omObjData *arg0, ItemGiveWork *arg1) {
|
||||
static void MoveItemGive(omObjData *arg0, ItemGiveWork *arg1)
|
||||
{
|
||||
Vec sp1C;
|
||||
Vec sp10;
|
||||
float temp_f27;
|
||||
|
|
@ -665,13 +664,15 @@ static void MoveItemGive(omObjData *arg0, ItemGiveWork *arg1) {
|
|||
arg1->unk00_field1 = 2;
|
||||
BoardMakeRandomItem();
|
||||
BoardItemStart(GWSystem.player_curr, 0xD);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
arg1->unk00_field1 = 1;
|
||||
arg1->unk04 = 0xF;
|
||||
BoardPlayerPosGet(shopPlayer, &sp1C);
|
||||
if (BoardPlayerSizeGet(shopPlayer) == 1) {
|
||||
arg0->rot.x = (sp1C.y + 30.0f - arg0->trans.y) / 22.5f;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
arg0->rot.x = (sp1C.y + 70.0f - arg0->trans.y) / 22.5f;
|
||||
}
|
||||
arg0->trans.y = arg0->rot.y;
|
||||
|
|
@ -692,7 +693,8 @@ static void MoveItemGive(omObjData *arg0, ItemGiveWork *arg1) {
|
|||
BoardCameraDirGet(&sp10);
|
||||
var_f26 = BoardDAngleCalc(atan2d(-sp10.x, -sp10.z));
|
||||
OSf32tos16(&var_f26, &angleVal);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
arg0->scale.x += arg0->scale.y;
|
||||
arg0->trans.x += arg0->rot.x;
|
||||
arg0->trans.z += arg0->rot.z;
|
||||
|
|
@ -706,7 +708,8 @@ static void MoveItemGive(omObjData *arg0, ItemGiveWork *arg1) {
|
|||
arg1->unk02++;
|
||||
}
|
||||
|
||||
static void ShrinkItemGive(omObjData *arg0, ItemGiveWork *arg1) {
|
||||
static void ShrinkItemGive(omObjData *arg0, ItemGiveWork *arg1)
|
||||
{
|
||||
float var_f30;
|
||||
|
||||
if (arg1->unk02 == 0) {
|
||||
|
|
@ -733,10 +736,12 @@ static void ShrinkItemGive(omObjData *arg0, ItemGiveWork *arg1) {
|
|||
arg1->unk02 += 4;
|
||||
}
|
||||
|
||||
static void WaitItemGive(omObjData *arg0, ItemGiveWork *arg1) {
|
||||
static void WaitItemGive(omObjData *arg0, ItemGiveWork *arg1)
|
||||
{
|
||||
if (arg1->unk02 > 20) {
|
||||
BoardModelVisibilitySet(itemMdl, 0);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
arg1->unk02++;
|
||||
}
|
||||
if (BoardItemDoneCheck()) {
|
||||
|
|
@ -744,44 +749,25 @@ static void WaitItemGive(omObjData *arg0, ItemGiveWork *arg1) {
|
|||
}
|
||||
}
|
||||
|
||||
static s8 itemPrioTbl[2][5][14] = {
|
||||
{
|
||||
{ 0x14, 0x14, 0x0F, 0x0F, 0x05, 0x07, 0x05, 0x05, 0x00, 0x05, 0x00, 0x03, 0x00, 0x00 },
|
||||
{ 0x0F, 0x0F, 0x0D, 0x0A, 0x0A, 0x0A, 0x0A, 0x05, 0x00, 0x07, 0x00, 0x05, 0x00, 0x00 },
|
||||
{ 0x07, 0x07, 0x0E, 0x0C, 0x0A, 0x0A, 0x0A, 0x08, 0x05, 0x09, 0x00, 0x08, 0x00, 0x00 },
|
||||
{ 0x0A, 0x0A, 0x0D, 0x0C, 0x0A, 0x0A, 0x07, 0x0A, 0x05, 0x05, 0x00, 0x08, 0x00, 0x00 },
|
||||
{ 0x07, 0x07, 0x0D, 0x0A, 0x0D, 0x07, 0x0A, 0x0A, 0x07, 0x08, 0x00, 0x08, 0x00, 0x00 }
|
||||
},
|
||||
{
|
||||
{ 0x0F, 0x0F, 0x12, 0x0F, 0x05, 0x05, 0x05, 0x05, 0x00, 0x05, 0x00, 0x02, 0x05, 0x05 },
|
||||
static s8 itemPrioTbl[2][5][14] = { { { 0x14, 0x14, 0x0F, 0x0F, 0x05, 0x07, 0x05, 0x05, 0x00, 0x05, 0x00, 0x03, 0x00, 0x00 },
|
||||
{ 0x0F, 0x0F, 0x0D, 0x0A, 0x0A, 0x0A, 0x0A, 0x05, 0x00, 0x07, 0x00, 0x05, 0x00, 0x00 },
|
||||
{ 0x07, 0x07, 0x0E, 0x0C, 0x0A, 0x0A, 0x0A, 0x08, 0x05, 0x09, 0x00, 0x08, 0x00, 0x00 },
|
||||
{ 0x0A, 0x0A, 0x0D, 0x0C, 0x0A, 0x0A, 0x07, 0x0A, 0x05, 0x05, 0x00, 0x08, 0x00, 0x00 },
|
||||
{ 0x07, 0x07, 0x0D, 0x0A, 0x0D, 0x07, 0x0A, 0x0A, 0x07, 0x08, 0x00, 0x08, 0x00, 0x00 } },
|
||||
{ { 0x0F, 0x0F, 0x12, 0x0F, 0x05, 0x05, 0x05, 0x05, 0x00, 0x05, 0x00, 0x02, 0x05, 0x05 },
|
||||
{ 0x0F, 0x0F, 0x0D, 0x0A, 0x07, 0x0A, 0x07, 0x03, 0x00, 0x07, 0x00, 0x00, 0x05, 0x08 },
|
||||
{ 0x05, 0x04, 0x0D, 0x0C, 0x0A, 0x05, 0x0A, 0x08, 0x05, 0x05, 0x00, 0x05, 0x08, 0x0A },
|
||||
{ 0x07, 0x04, 0x0D, 0x0C, 0x08, 0x08, 0x07, 0x0A, 0x05, 0x05, 0x00, 0x05, 0x08, 0x08 },
|
||||
{ 0x03, 0x02, 0x0D, 0x0A, 0x0D, 0x03, 0x08, 0x08, 0x07, 0x07, 0x00, 0x08, 0x08, 0x0A }
|
||||
}
|
||||
};
|
||||
{ 0x03, 0x02, 0x0D, 0x0A, 0x0D, 0x03, 0x08, 0x08, 0x07, 0x07, 0x00, 0x08, 0x08, 0x0A } } };
|
||||
|
||||
static s8 rankItemGroupTbl[2][4][3] = {
|
||||
{
|
||||
{ 0x00, 0x01, 0x03 }, { 0x00, 0x02, 0x04 },
|
||||
{ 0x00, 0x02, 0x04 }, { 0x00, 0x02, 0x04 }
|
||||
},
|
||||
{
|
||||
{ 0x00, 0x01, 0x03 }, { 0x00, 0x02, 0x04 },
|
||||
{ 0x00, 0x02, 0x04 }, { 0x00, 0x02, 0x04 }
|
||||
}
|
||||
};
|
||||
static s8 rankItemGroupTbl[2][4][3] = { { { 0x00, 0x01, 0x03 }, { 0x00, 0x02, 0x04 }, { 0x00, 0x02, 0x04 }, { 0x00, 0x02, 0x04 } },
|
||||
{ { 0x00, 0x01, 0x03 }, { 0x00, 0x02, 0x04 }, { 0x00, 0x02, 0x04 }, { 0x00, 0x02, 0x04 } } };
|
||||
|
||||
static float cursorPosTbl[6][2] = {
|
||||
{ 190.0f, 182.0f },
|
||||
{ 190.0f, 208.0f },
|
||||
{ 190.0f, 234.0f },
|
||||
{ 190.0f, 260.0f },
|
||||
{ 190.0f, 286.0f },
|
||||
{ 190.0f, 312.0f }
|
||||
};
|
||||
static float cursorPosTbl[6][2]
|
||||
= { { 190.0f, 182.0f }, { 190.0f, 208.0f }, { 190.0f, 234.0f }, { 190.0f, 260.0f }, { 190.0f, 286.0f }, { 190.0f, 312.0f } };
|
||||
|
||||
static void GetShopItems(s32 arg0) {
|
||||
static void GetShopItems(s32 arg0)
|
||||
{
|
||||
s32 temp_r25;
|
||||
s32 temp_r20;
|
||||
s32 temp_r19;
|
||||
|
|
@ -795,10 +781,11 @@ static void GetShopItems(s32 arg0) {
|
|||
s32 var_r29;
|
||||
s32 var_r30;
|
||||
|
||||
temp_r22 = 3.0f * ((float) GWSystem.turn / GWSystem.max_turn);
|
||||
temp_r22 = 3.0f * ((float)GWSystem.turn / GWSystem.max_turn);
|
||||
if (BoardPlayerCoinsGet(arg0) < 30) {
|
||||
var_r27 = 0;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
var_r27 = 1;
|
||||
}
|
||||
temp_r19 = rankItemGroupTbl[var_r27][GWPlayer[arg0].rank][temp_r22];
|
||||
|
|
@ -839,7 +826,8 @@ static void GetShopItems(s32 arg0) {
|
|||
}
|
||||
}
|
||||
|
||||
static void GetDefaultShopItems(s32 arg0) {
|
||||
static void GetDefaultShopItems(s32 arg0)
|
||||
{
|
||||
s32 temp_r29;
|
||||
s32 var_r31;
|
||||
s32 var_r30;
|
||||
|
|
@ -847,9 +835,11 @@ static void GetDefaultShopItems(s32 arg0) {
|
|||
temp_r29 = BoardRandMod(100);
|
||||
if (temp_r29 > 90) {
|
||||
var_r30 = 3;
|
||||
} else if (temp_r29 > 40) {
|
||||
}
|
||||
else if (temp_r29 > 40) {
|
||||
var_r30 = BoardRandMod(2) + 1;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
var_r30 = 0;
|
||||
}
|
||||
for (var_r31 = 0; var_r31 < 5; var_r31++) {
|
||||
|
|
@ -857,7 +847,8 @@ static void GetDefaultShopItems(s32 arg0) {
|
|||
}
|
||||
}
|
||||
|
||||
static void SortShopItems(void) {
|
||||
static void SortShopItems(void)
|
||||
{
|
||||
s32 sp8[5];
|
||||
s32 var_r29;
|
||||
s32 i;
|
||||
|
|
@ -880,7 +871,8 @@ static void SortShopItems(void) {
|
|||
}
|
||||
}
|
||||
|
||||
static void DecideComEnter(s32 arg0) {
|
||||
static void DecideComEnter(s32 arg0)
|
||||
{
|
||||
s32 temp_r27;
|
||||
s32 temp_r30;
|
||||
s32 temp_r29;
|
||||
|
|
@ -910,14 +902,13 @@ static void DecideComEnter(s32 arg0) {
|
|||
BoardComKeySetRight();
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
temp_r27 = GWPlayer[arg0].space_curr;
|
||||
temp_r30 = BoardComPathShortcutLenGet(temp_r27, 8, 0);
|
||||
temp_r29 = BoardComPathShortcutLenGet(temp_r27, 8, 1);
|
||||
if ((temp_r30 != 0 || temp_r29 != 0)
|
||||
&& (BoardPlayerCoinsGet(arg0) >= 17 || (temp_r29 >= temp_r26 && temp_r30 >= temp_r26))
|
||||
&& BoardPlayerCoinsGet(arg0) < 40
|
||||
&& ((temp_r30 < 20 && temp_r30 > 0) || (temp_r29 < 10 && temp_r29 > 0))
|
||||
if ((temp_r30 != 0 || temp_r29 != 0) && (BoardPlayerCoinsGet(arg0) >= 17 || (temp_r29 >= temp_r26 && temp_r30 >= temp_r26))
|
||||
&& BoardPlayerCoinsGet(arg0) < 40 && ((temp_r30 < 20 && temp_r30 > 0) || (temp_r29 < 10 && temp_r29 > 0))
|
||||
&& BoardRandMod(100) > var_r28) {
|
||||
BoardComKeySetRight();
|
||||
return;
|
||||
|
|
@ -926,18 +917,21 @@ static void DecideComEnter(s32 arg0) {
|
|||
BoardComKeySetLeft();
|
||||
}
|
||||
|
||||
static void DecideComBuy(s32 arg0) {
|
||||
static void DecideComBuy(s32 arg0)
|
||||
{
|
||||
if (!GWPlayer[arg0].com) {
|
||||
return;
|
||||
}
|
||||
if (comF != 0) {
|
||||
BoardComKeySetDown();
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
BoardComKeySetUp();
|
||||
}
|
||||
}
|
||||
|
||||
static s32 GetComItemChoice(s32 arg0) {
|
||||
static s32 GetComItemChoice(s32 arg0)
|
||||
{
|
||||
s16 sp8;
|
||||
s32 temp_r26;
|
||||
s32 var_r28 = 0;
|
||||
|
|
@ -954,7 +948,8 @@ static s32 GetComItemChoice(s32 arg0) {
|
|||
for (var_r27 = i = 0; i < 5; i++) {
|
||||
if (temp_r26 >= itemPriceTbl[activeItemTbl[i]]) {
|
||||
var_r30 = BoardComItemWeightGet(arg0, activeItemTbl[i]);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
var_r30 = 0;
|
||||
}
|
||||
if (BoardPlayerItemFind(arg0, activeItemTbl[i]) != -1) {
|
||||
|
|
@ -968,28 +963,31 @@ static s32 GetComItemChoice(s32 arg0) {
|
|||
if (var_r27 == 0) {
|
||||
comF = 1;
|
||||
var_r28 = 5;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
var_r28 = var_r25;
|
||||
}
|
||||
return var_r28;
|
||||
}
|
||||
|
||||
static void WaitItemChoice(void) {
|
||||
static void WaitItemChoice(void)
|
||||
{
|
||||
while (itemChoiceObj) {
|
||||
HuPrcVSleep();
|
||||
}
|
||||
}
|
||||
|
||||
static void CreateShopItemChoice(s32 arg0, s32 arg1) {
|
||||
static void CreateShopItemChoice(s32 arg0, s32 arg1)
|
||||
{
|
||||
omObjData *temp_r30;
|
||||
ItemChoiceWork *var_r31;
|
||||
s16 spC;
|
||||
s16 i;
|
||||
#if VERSION_PAL
|
||||
for(i=0; i<6; i++) {
|
||||
#if VERSION_PAL
|
||||
for (i = 0; i < 6; i++) {
|
||||
cursorPosTbl[i][0] = 190;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
temp_r30 = omAddObjEx(boardObjMan, 0x7E01, 0, 0, -1, UpdateShopItemChoice);
|
||||
itemChoiceObj = temp_r30;
|
||||
itemChoice = -1;
|
||||
|
|
@ -1001,29 +999,30 @@ static void CreateShopItemChoice(s32 arg0, s32 arg1) {
|
|||
var_r31->unk02 = 0;
|
||||
var_r31->unk03 = arg1;
|
||||
var_r31->unk06 = HuSprGrpCreate(1);
|
||||
#if VERSION_PAL
|
||||
#if VERSION_PAL
|
||||
if (GWLanguageGet() != 0) {
|
||||
s16 winId = BoardWinIDGet();
|
||||
if(winId != -1) {
|
||||
if (winId != -1) {
|
||||
WindowData *winP = &winData[winId];
|
||||
for(i=0; i<6; i++) {
|
||||
cursorPosTbl[i][0] = winP->pos_x+96;
|
||||
for (i = 0; i < 6; i++) {
|
||||
cursorPosTbl[i][0] = winP->pos_x + 96;
|
||||
}
|
||||
} else {
|
||||
for(i=0; i<6; i++) {
|
||||
}
|
||||
else {
|
||||
for (i = 0; i < 6; i++) {
|
||||
cursorPosTbl[i][0] = 166;
|
||||
}
|
||||
}
|
||||
}
|
||||
temp_r30->trans.x = cursorPosTbl[0][0];
|
||||
temp_r30->trans.y = cursorPosTbl[0][1];
|
||||
#else
|
||||
#else
|
||||
temp_r30->trans.x = cursorPosTbl[0][0];
|
||||
temp_r30->trans.y = cursorPosTbl[0][1];
|
||||
if (GWLanguageGet() != 0) {
|
||||
temp_r30->trans.x -= 24.0f;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
if (GWPlayer[arg0].com) {
|
||||
var_r31->unk01 = GWMessDelayGet();
|
||||
}
|
||||
|
|
@ -1033,11 +1032,13 @@ static void CreateShopItemChoice(s32 arg0, s32 arg1) {
|
|||
HuSprPosSet(var_r31->unk06, 0, temp_r30->trans.x, temp_r30->trans.y);
|
||||
}
|
||||
|
||||
static s32 GetShopItemChoice(void) {
|
||||
static s32 GetShopItemChoice(void)
|
||||
{
|
||||
return itemChoice;
|
||||
}
|
||||
|
||||
static s32 GetShopItemWinChoice(void) {
|
||||
static s32 GetShopItemWinChoice(void)
|
||||
{
|
||||
ItemChoiceWork *var_r31;
|
||||
|
||||
if (!itemChoiceObj) {
|
||||
|
|
@ -1047,7 +1048,8 @@ static s32 GetShopItemWinChoice(void) {
|
|||
return var_r31->unk02;
|
||||
}
|
||||
|
||||
static void MoveShopItemChoice(omObjData *arg0, ItemChoiceWork *arg1) {
|
||||
static void MoveShopItemChoice(omObjData *arg0, ItemChoiceWork *arg1)
|
||||
{
|
||||
u32 sp8;
|
||||
s32 temp_r28;
|
||||
s32 temp_r29;
|
||||
|
|
@ -1055,14 +1057,15 @@ static void MoveShopItemChoice(omObjData *arg0, ItemChoiceWork *arg1) {
|
|||
temp_r28 = arg1->unk02;
|
||||
arg0->trans.x = cursorPosTbl[arg1->unk02][0];
|
||||
arg0->trans.y = cursorPosTbl[arg1->unk02][1];
|
||||
#if VERSION_NTSC
|
||||
#if VERSION_NTSC
|
||||
if (GWLanguageGet() != 0) {
|
||||
arg0->trans.x -= 24.0f;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
if (GWPlayer[arg1->unk00_field1].com) {
|
||||
GetShopItemChoiceInput(arg1, arg0, &sp8);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
temp_r29 = GWPlayer[arg1->unk00_field1].port;
|
||||
sp8 = HuPadDStkRep[temp_r29] | HuPadBtnDown[temp_r29];
|
||||
}
|
||||
|
|
@ -1077,7 +1080,8 @@ static void MoveShopItemChoice(omObjData *arg0, ItemChoiceWork *arg1) {
|
|||
HuAudFXPlay(2);
|
||||
if (GWPlayer[arg1->unk00_field1].com) {
|
||||
arg1->unk05 = 0x32;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
arg1->unk05 = 5;
|
||||
}
|
||||
return;
|
||||
|
|
@ -1105,7 +1109,8 @@ static void MoveShopItemChoice(omObjData *arg0, ItemChoiceWork *arg1) {
|
|||
}
|
||||
}
|
||||
|
||||
static void UpdateShopItemChoice(omObjData *arg0) {
|
||||
static void UpdateShopItemChoice(omObjData *arg0)
|
||||
{
|
||||
ItemChoiceWork *temp_r31;
|
||||
|
||||
temp_r31 = OM_GET_WORK_PTR(arg0, ItemChoiceWork);
|
||||
|
|
@ -1120,25 +1125,31 @@ static void UpdateShopItemChoice(omObjData *arg0) {
|
|||
if (temp_r31->unk05 == 0) {
|
||||
temp_r31->unk00_field0 = 1;
|
||||
}
|
||||
} else if (temp_r31->unk01 != 0) {
|
||||
}
|
||||
else if (temp_r31->unk01 != 0) {
|
||||
temp_r31->unk01--;
|
||||
} else if (temp_r31->unk04 != 0) {
|
||||
}
|
||||
else if (temp_r31->unk04 != 0) {
|
||||
temp_r31->unk04--;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
MoveShopItemChoice(arg0, temp_r31);
|
||||
}
|
||||
HuSprPosSet(temp_r31->unk06, 0, arg0->trans.x, arg0->trans.y);
|
||||
}
|
||||
|
||||
static void GetShopItemChoiceInput(ItemChoiceWork *arg0, omObjData *arg1, u32 *arg2) {
|
||||
static void GetShopItemChoiceInput(ItemChoiceWork *arg0, omObjData *arg1, u32 *arg2)
|
||||
{
|
||||
if (arg0->unk02 == arg0->unk03) {
|
||||
*arg2 = 0x100;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
*arg2 = 4;
|
||||
}
|
||||
}
|
||||
|
||||
void BoardShopTutorialExec(s32 arg0) {
|
||||
void BoardShopTutorialExec(s32 arg0)
|
||||
{
|
||||
Vec sp48;
|
||||
Vec sp3C;
|
||||
Vec sp30;
|
||||
|
|
@ -1155,7 +1166,8 @@ void BoardShopTutorialExec(s32 arg0) {
|
|||
sp10 = BoardWinPortraitGet();
|
||||
if (BoardSpaceFlagGet(0, arg0) & 0x80000) {
|
||||
shopMdlPtr = shopMdlIdx[0];
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
shopMdlPtr = shopMdlIdx[1];
|
||||
}
|
||||
temp_r27 = BoardSpaceLinkFlagSearch(0, arg0, 0x02000000);
|
||||
|
|
|
|||
|
|
@ -3,15 +3,6 @@
|
|||
#include "game/data.h"
|
||||
#include "game/disp.h"
|
||||
|
||||
#include "game/flag.h"
|
||||
#include "game/gamework.h"
|
||||
#include "game/gamework_data.h"
|
||||
#include "game/hsfanim.h"
|
||||
#include "game/hsfman.h"
|
||||
#include "game/msm.h"
|
||||
#include "game/objsub.h"
|
||||
#include "game/window.h"
|
||||
#include "game/wipe.h"
|
||||
#include "game/board/audio.h"
|
||||
#include "game/board/com.h"
|
||||
#include "game/board/main.h"
|
||||
|
|
@ -21,6 +12,16 @@
|
|||
#include "game/board/tutorial.h"
|
||||
#include "game/board/ui.h"
|
||||
#include "game/board/window.h"
|
||||
#include "game/flag.h"
|
||||
#include "game/gamework.h"
|
||||
#include "game/gamework_data.h"
|
||||
#include "game/hsfanim.h"
|
||||
#include "game/hsfman.h"
|
||||
#include "game/msm.h"
|
||||
#include "game/objsub.h"
|
||||
#include "game/window.h"
|
||||
#include "game/wipe.h"
|
||||
|
||||
|
||||
#include "ext_math.h"
|
||||
|
||||
|
|
@ -74,77 +75,28 @@ static Process *starProc;
|
|||
static s16 starParman = -1;
|
||||
static s16 hostMdl = -1;
|
||||
|
||||
static const s32 starMesTbl1[9] = {
|
||||
MAKE_MESSID(12, 0),
|
||||
MAKE_MESSID(12, 9),
|
||||
MAKE_MESSID(12, 18),
|
||||
MAKE_MESSID(12, 27),
|
||||
MAKE_MESSID(12, 36),
|
||||
MAKE_MESSID(12, 45),
|
||||
MAKE_MESSID(12, 0),
|
||||
MAKE_MESSID(12, 0),
|
||||
MAKE_MESSID(12, 0)
|
||||
};
|
||||
static const s32 starMesTbl1[9] = { MAKE_MESSID(12, 0), MAKE_MESSID(12, 9), MAKE_MESSID(12, 18), MAKE_MESSID(12, 27), MAKE_MESSID(12, 36),
|
||||
MAKE_MESSID(12, 45), MAKE_MESSID(12, 0), MAKE_MESSID(12, 0), MAKE_MESSID(12, 0) };
|
||||
|
||||
static const s32 starMesTbl2[9][2] = {
|
||||
{ MAKE_MESSID(21, 34), MAKE_MESSID(21, 40) },
|
||||
{ MAKE_MESSID(21, 35), MAKE_MESSID(21, 41) },
|
||||
{ MAKE_MESSID(21, 36), MAKE_MESSID(21, 42) },
|
||||
{ MAKE_MESSID(21, 37), MAKE_MESSID(21, 43) },
|
||||
{ MAKE_MESSID(21, 38), MAKE_MESSID(21, 44) },
|
||||
{ MAKE_MESSID(21, 39), MAKE_MESSID(21, 45) },
|
||||
{ MAKE_MESSID(21, 34), MAKE_MESSID(21, 40) },
|
||||
{ MAKE_MESSID(21, 34), MAKE_MESSID(21, 40) },
|
||||
{ MAKE_MESSID(21, 34), MAKE_MESSID(21, 40) }
|
||||
};
|
||||
static const s32 starMesTbl2[9][2]
|
||||
= { { MAKE_MESSID(21, 34), MAKE_MESSID(21, 40) }, { MAKE_MESSID(21, 35), MAKE_MESSID(21, 41) }, { MAKE_MESSID(21, 36), MAKE_MESSID(21, 42) },
|
||||
{ MAKE_MESSID(21, 37), MAKE_MESSID(21, 43) }, { MAKE_MESSID(21, 38), MAKE_MESSID(21, 44) }, { MAKE_MESSID(21, 39), MAKE_MESSID(21, 45) },
|
||||
{ MAKE_MESSID(21, 34), MAKE_MESSID(21, 40) }, { MAKE_MESSID(21, 34), MAKE_MESSID(21, 40) }, { MAKE_MESSID(21, 34), MAKE_MESSID(21, 40) } };
|
||||
|
||||
s32 boardStarSndTbl[] = {
|
||||
0x00000120,
|
||||
0x00000160,
|
||||
0x000001A0,
|
||||
0x000001E0,
|
||||
0x00000220,
|
||||
0x00000260,
|
||||
0x000002A0,
|
||||
0x000002E0
|
||||
};
|
||||
s32 boardStarSndTbl[] = { 0x00000120, 0x00000160, 0x000001A0, 0x000001E0, 0x00000220, 0x00000260, 0x000002A0, 0x000002E0 };
|
||||
|
||||
static s32 hostMotTbl[9][2] = {
|
||||
{ DATA_MAKE_NUM(DATADIR_W01, 33), DATA_MAKE_NUM(DATADIR_BOARD, 157) },
|
||||
{ DATA_MAKE_NUM(DATADIR_W02, 7), DATA_MAKE_NUM(DATADIR_BOARD, 158) },
|
||||
{ DATA_MAKE_NUM(DATADIR_W03, 31), DATA_MAKE_NUM(DATADIR_BOARD, 159) },
|
||||
{ DATA_MAKE_NUM(DATADIR_W04, 11), DATA_MAKE_NUM(DATADIR_BOARD, 160) },
|
||||
{ DATA_MAKE_NUM(DATADIR_W05, 9), DATA_MAKE_NUM(DATADIR_BOARD, 161) },
|
||||
{ DATA_MAKE_NUM(DATADIR_W06, 21), DATA_MAKE_NUM(DATADIR_BOARD, 162) }
|
||||
};
|
||||
static s32 hostMotTbl[9][2] = { { DATA_MAKE_NUM(DATADIR_W01, 33), DATA_MAKE_NUM(DATADIR_BOARD, 157) },
|
||||
{ DATA_MAKE_NUM(DATADIR_W02, 7), DATA_MAKE_NUM(DATADIR_BOARD, 158) }, { DATA_MAKE_NUM(DATADIR_W03, 31), DATA_MAKE_NUM(DATADIR_BOARD, 159) },
|
||||
{ DATA_MAKE_NUM(DATADIR_W04, 11), DATA_MAKE_NUM(DATADIR_BOARD, 160) }, { DATA_MAKE_NUM(DATADIR_W05, 9), DATA_MAKE_NUM(DATADIR_BOARD, 161) },
|
||||
{ DATA_MAKE_NUM(DATADIR_W06, 21), DATA_MAKE_NUM(DATADIR_BOARD, 162) } };
|
||||
|
||||
static HsfanimStruct00 starEffParam = {
|
||||
0x001E,
|
||||
{ 0x00, 0x00 }, // padding?
|
||||
3.3f,
|
||||
70.0f,
|
||||
7.0f,
|
||||
{ 0.0f, -0.05f, 0.0f },
|
||||
2.0f,
|
||||
1.0f,
|
||||
20.0f,
|
||||
0.98f,
|
||||
0x0002,
|
||||
{
|
||||
0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0x40, 0xFF,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00
|
||||
},
|
||||
{
|
||||
0xFF, 0x80, 0x80, 0x00,
|
||||
0xFF, 0x40, 0x20, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00
|
||||
}
|
||||
};
|
||||
static HsfanimStruct00 starEffParam = { 0x001E, { 0x00, 0x00 }, // padding?
|
||||
3.3f, 70.0f, 7.0f, { 0.0f, -0.05f, 0.0f }, 2.0f, 1.0f, 20.0f, 0.98f, 0x0002,
|
||||
{ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x40, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
|
||||
{ 0xFF, 0x80, 0x80, 0x00, 0xFF, 0x40, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } };
|
||||
|
||||
void BoardStarHostSet(s16 arg0) {
|
||||
void BoardStarHostSet(s16 arg0)
|
||||
{
|
||||
hostMdl = arg0;
|
||||
if (GWBoardGet() == BOARD_ID_EXTRA1 || GWBoardGet() == BOARD_ID_EXTRA2) {
|
||||
return;
|
||||
|
|
@ -154,11 +106,13 @@ void BoardStarHostSet(s16 arg0) {
|
|||
}
|
||||
}
|
||||
|
||||
s16 BoardStarHostMdlGet(void) {
|
||||
s16 BoardStarHostMdlGet(void)
|
||||
{
|
||||
return hostMdl;
|
||||
}
|
||||
|
||||
void BoardStarExec(s32 arg0, s32 arg1) {
|
||||
void BoardStarExec(s32 arg0, s32 arg1)
|
||||
{
|
||||
if (GWBoardGet() == BOARD_ID_EXTRA1 || GWBoardGet() == BOARD_ID_EXTRA2) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -173,7 +127,8 @@ void BoardStarExec(s32 arg0, s32 arg1) {
|
|||
}
|
||||
}
|
||||
|
||||
static void ExecStar(void) {
|
||||
static void ExecStar(void)
|
||||
{
|
||||
Vec sp24;
|
||||
Vec sp18;
|
||||
Vec spC;
|
||||
|
|
@ -215,22 +170,23 @@ static void ExecStar(void) {
|
|||
BoardPlayerIdleSet(temp_r31);
|
||||
if (BoardDAngleCalc(temp_f30 - temp_f29) < 0.0f) {
|
||||
var_f28 = -BoardDAngleCalc(temp_f30 - temp_f29);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
var_f28 = BoardDAngleCalc(temp_f30 - temp_f29);
|
||||
}
|
||||
if (var_f28 > 90.0f) {
|
||||
var_r25 = 30;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
var_r25 = 15;
|
||||
}
|
||||
BoardPlayerMotBlendSet(temp_r31, temp_f30, var_r25);
|
||||
temp_f27 = BoardModelRotYGet(temp_r30);
|
||||
var_f31 = BoardDAngleCalc(temp_f30 + 180.0f) - temp_f27;
|
||||
if ((var_f31 <= 4.0f && var_f31 >= 0.0f)
|
||||
|| (var_f31 <= 360.0f && var_f31 >= 355.0f)
|
||||
|| (var_f31 <= 0.0f && var_f31 >= -4.0f)) {
|
||||
if ((var_f31 <= 4.0f && var_f31 >= 0.0f) || (var_f31 <= 360.0f && var_f31 >= 355.0f) || (var_f31 <= 0.0f && var_f31 >= -4.0f)) {
|
||||
var_r26 = 0;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
var_r26 = 1;
|
||||
}
|
||||
if (var_r26 != 0) {
|
||||
|
|
@ -253,12 +209,14 @@ static void ExecStar(void) {
|
|||
BoardWinCreate(0, temp_r29, BoardWinPortraitGetStar());
|
||||
BoardWinWait();
|
||||
BoardWinKill();
|
||||
} else if (BoardPlayerCoinsGet(temp_r31) < 20 && GWSystem.last5_effect != 4) {
|
||||
}
|
||||
else if (BoardPlayerCoinsGet(temp_r31) < 20 && GWSystem.last5_effect != 4) {
|
||||
temp_r29 = starMesTbl1[temp_r27] + 2;
|
||||
BoardWinCreate(2, temp_r29, BoardWinPortraitGetStar());
|
||||
BoardWinWait();
|
||||
BoardWinKill();
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
BoardStatusShowSetAll(0);
|
||||
while (!BoardStatusStopCheck(0) || !BoardStatusStopCheck(1) || !BoardStatusStopCheck(2) || !BoardStatusStopCheck(3)) {
|
||||
HuPrcVSleep();
|
||||
|
|
@ -286,7 +244,8 @@ static void ExecStar(void) {
|
|||
if (GWPlayer[temp_r31].com) {
|
||||
if (BoardPlayerCoinsGet(temp_r31) >= 20) {
|
||||
BoardComKeySetUp();
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
BoardComKeySetDown();
|
||||
}
|
||||
}
|
||||
|
|
@ -325,7 +284,7 @@ static void ExecStar(void) {
|
|||
break;
|
||||
}
|
||||
}
|
||||
block_A:
|
||||
block_A:
|
||||
temp_r29 = starMesTbl1[temp_r27] + 3;
|
||||
BoardWinCreate(2, temp_r29, BoardWinPortraitGetStar());
|
||||
BoardWinWait();
|
||||
|
|
@ -381,7 +340,8 @@ block_B:
|
|||
HuPrcEnd();
|
||||
}
|
||||
|
||||
static void DestroyStar(void) {
|
||||
static void DestroyStar(void)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
_ClearFlag(0x10017);
|
||||
|
|
@ -394,7 +354,8 @@ static void DestroyStar(void) {
|
|||
starProc = NULL;
|
||||
}
|
||||
|
||||
static void GiveStarMain(omObjData *arg0) {
|
||||
static void GiveStarMain(omObjData *arg0)
|
||||
{
|
||||
GiveStarWork *temp_r30;
|
||||
|
||||
temp_r30 = OM_GET_WORK_PTR(arg0, GiveStarWork);
|
||||
|
|
@ -407,7 +368,8 @@ static void GiveStarMain(omObjData *arg0) {
|
|||
}
|
||||
if (temp_r30->unk04 != 0) {
|
||||
temp_r30->unk04--;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
switch (temp_r30->unk01) {
|
||||
case 4:
|
||||
break;
|
||||
|
|
@ -431,7 +393,8 @@ static void GiveStarMain(omObjData *arg0) {
|
|||
}
|
||||
}
|
||||
|
||||
static void UpdateStarAngle(GiveStarWork *arg0, omObjData *arg1) {
|
||||
static void UpdateStarAngle(GiveStarWork *arg0, omObjData *arg1)
|
||||
{
|
||||
float var_f31;
|
||||
|
||||
if (arg0->unk00_field1 != 0) {
|
||||
|
|
@ -446,7 +409,8 @@ static void UpdateStarAngle(GiveStarWork *arg0, omObjData *arg1) {
|
|||
}
|
||||
}
|
||||
|
||||
static void InitGiveStar(GiveStarWork *arg0, omObjData *arg1) {
|
||||
static void InitGiveStar(GiveStarWork *arg0, omObjData *arg1)
|
||||
{
|
||||
Vec sp8;
|
||||
|
||||
BoardPlayerPosGet(arg0->unk00_field3, &sp8);
|
||||
|
|
@ -465,7 +429,8 @@ static void InitGiveStar(GiveStarWork *arg0, omObjData *arg1) {
|
|||
InitGiveStarEffect();
|
||||
}
|
||||
|
||||
static void MoveGiveStar(GiveStarWork *arg0, omObjData *arg1) {
|
||||
static void MoveGiveStar(GiveStarWork *arg0, omObjData *arg1)
|
||||
{
|
||||
Vec sp8;
|
||||
float temp_f31;
|
||||
|
||||
|
|
@ -482,7 +447,8 @@ static void MoveGiveStar(GiveStarWork *arg0, omObjData *arg1) {
|
|||
arg1->trans.z += arg1->rot.z;
|
||||
arg1->trans.y += -0.08166667f * temp_f31 * temp_f31 * 0.97f + 50.0f;
|
||||
arg0->unk0A++;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
arg1->trans.y += -4.0f;
|
||||
if (arg1->trans.y <= sp8.y + 300.0f) {
|
||||
arg1->trans.y = sp8.y + 300.0f;
|
||||
|
|
@ -491,7 +457,8 @@ static void MoveGiveStar(GiveStarWork *arg0, omObjData *arg1) {
|
|||
}
|
||||
}
|
||||
|
||||
static void ShrinkGiveStar(GiveStarWork *arg0, omObjData *arg1) {
|
||||
static void ShrinkGiveStar(GiveStarWork *arg0, omObjData *arg1)
|
||||
{
|
||||
Vec sp8;
|
||||
float var_f30;
|
||||
|
||||
|
|
@ -505,7 +472,8 @@ static void ShrinkGiveStar(GiveStarWork *arg0, omObjData *arg1) {
|
|||
if (arg0->unk08 < 90) {
|
||||
if (BoardPlayerSizeGet(arg0->unk00_field3) != 1) {
|
||||
arg0->unk08 += 2;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
arg0->unk08 += 1.4f;
|
||||
}
|
||||
if (arg0->unk08 > 90) {
|
||||
|
|
@ -519,7 +487,8 @@ static void ShrinkGiveStar(GiveStarWork *arg0, omObjData *arg1) {
|
|||
}
|
||||
arg1->scale.y = arg1->scale.x;
|
||||
arg1->scale.z = arg1->scale.x;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
omVibrate(arg0->unk00_field3, 12, 0xC, 0);
|
||||
arg0->unk00_field0 = 1;
|
||||
arg0->unk01 = 4;
|
||||
|
|
@ -529,7 +498,8 @@ static void ShrinkGiveStar(GiveStarWork *arg0, omObjData *arg1) {
|
|||
}
|
||||
}
|
||||
|
||||
static void StopGiveStar(void) {
|
||||
static void StopGiveStar(void)
|
||||
{
|
||||
GiveStarWork *temp_r31;
|
||||
|
||||
if (giveStarObj) {
|
||||
|
|
@ -538,7 +508,8 @@ static void StopGiveStar(void) {
|
|||
}
|
||||
}
|
||||
|
||||
static void InitGiveStarEffect(void) {
|
||||
static void InitGiveStarEffect(void)
|
||||
{
|
||||
s16 temp_r3;
|
||||
void *var_r30;
|
||||
|
||||
|
|
@ -553,7 +524,8 @@ static void InitGiveStarEffect(void) {
|
|||
HuDataDirClose(DATADIR_EFFECT);
|
||||
}
|
||||
|
||||
static void KillGiveStarEffect(void) {
|
||||
static void KillGiveStarEffect(void)
|
||||
{
|
||||
if (starParman != -1) {
|
||||
Hu3DParManKill(starParman);
|
||||
starParman = -1;
|
||||
|
|
@ -561,13 +533,15 @@ static void KillGiveStarEffect(void) {
|
|||
}
|
||||
}
|
||||
|
||||
static inline void StarInlineFunc00(void) {
|
||||
static inline void StarInlineFunc00(void)
|
||||
{
|
||||
GiveStarWork *temp_r28 = OM_GET_WORK_PTR(giveStarObj, GiveStarWork);
|
||||
|
||||
temp_r28->unk01 = 0;
|
||||
}
|
||||
|
||||
static inline void StarInlineFunc01(void) {
|
||||
static inline void StarInlineFunc01(void)
|
||||
{
|
||||
GiveStarWork *temp_r27 = OM_GET_WORK_PTR(giveStarObj, GiveStarWork);
|
||||
|
||||
while (temp_r27->unk01 != 4) {
|
||||
|
|
@ -575,7 +549,8 @@ static inline void StarInlineFunc01(void) {
|
|||
}
|
||||
}
|
||||
|
||||
static inline void StarInlineFunc02(void) {
|
||||
static inline void StarInlineFunc02(void)
|
||||
{
|
||||
GiveStarWork *temp_r29 = OM_GET_WORK_PTR(giveStarObj, GiveStarWork);
|
||||
|
||||
temp_r29->unk00_field1 = 1;
|
||||
|
|
@ -584,7 +559,8 @@ static inline void StarInlineFunc02(void) {
|
|||
temp_r29->unk01 = 2;
|
||||
}
|
||||
|
||||
void BoardStarGive(s32 arg0, Vec *arg1) {
|
||||
void BoardStarGive(s32 arg0, Vec *arg1)
|
||||
{
|
||||
Vec sp8;
|
||||
s32 temp_r25;
|
||||
GiveStarWork *temp_r31;
|
||||
|
|
@ -631,7 +607,8 @@ void BoardStarGive(s32 arg0, Vec *arg1) {
|
|||
HuPrcSleep(10);
|
||||
if (_CheckFlag(FLAG_ID_MAKE(1, 11))) {
|
||||
BoardPlayerMotionEndWait(arg0);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
temp_r25 = HuAudSStreamPlay(6);
|
||||
BoardPlayerMotionEndWait(arg0);
|
||||
while (msmStreamGetStatus(temp_r25) != 0) {
|
||||
|
|
@ -641,7 +618,8 @@ void BoardStarGive(s32 arg0, Vec *arg1) {
|
|||
BoardPlayerVoiceEnableSet(arg0, 7, 1);
|
||||
}
|
||||
|
||||
void BoardStarShowNext(s32 arg0) {
|
||||
void BoardStarShowNext(s32 arg0)
|
||||
{
|
||||
Mtx spBC;
|
||||
Mtx sp8C;
|
||||
Mtx sp5C;
|
||||
|
|
@ -669,7 +647,8 @@ void BoardStarShowNext(s32 arg0) {
|
|||
while (WipeStatGet() != 0) {
|
||||
HuPrcVSleep();
|
||||
}
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
HuPrcSleep(18);
|
||||
}
|
||||
BoardStatusItemSet(0);
|
||||
|
|
@ -703,14 +682,16 @@ void BoardStarShowNext(s32 arg0) {
|
|||
temp_f31 = VECMag(&sp20);
|
||||
if (temp_f31 > 3000.0f) {
|
||||
var_r27 = 0xF0;
|
||||
} else if (temp_f31 > 1500.0f) {
|
||||
}
|
||||
else if (temp_f31 > 1500.0f) {
|
||||
var_r27 = 0x78;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
var_r27 = 0x78;
|
||||
}
|
||||
BoardViewMoveStart(&sp38, &sp50, var_r27);
|
||||
showNextObj->trans.x = 68.0f;
|
||||
showNextObj->trans.y = HU_DISP_HEIGHT-50;
|
||||
showNextObj->trans.y = HU_DISP_HEIGHT - 50;
|
||||
showNextObj->trans.z = 100.0f;
|
||||
sp44.x = showNextObj->trans.x;
|
||||
sp44.y = showNextObj->trans.y;
|
||||
|
|
@ -718,9 +699,9 @@ void BoardStarShowNext(s32 arg0) {
|
|||
Hu3D2Dto3D(&sp44, 1, &sp44);
|
||||
BoardModelPosSetV(BoardStarHostMdlGet(), &sp44);
|
||||
BoardCameraRotGet(&sp2C);
|
||||
PSMTXRotRad(sp5C, 'y', MTXDegToRad(10.0f));
|
||||
PSMTXRotRad(sp8C, 'x', MTXDegToRad(sp2C.x));
|
||||
PSMTXConcat(sp8C, sp5C, spBC);
|
||||
RotRad(sp5C, 'y', MTXDegToRad(10.0f));
|
||||
RotRad(sp8C, 'x', MTXDegToRad(sp2C.x));
|
||||
Concat(sp8C, sp5C, spBC);
|
||||
BoardModelMtxSet(BoardStarHostMdlGet(), &spBC);
|
||||
BoardModelRotSet(BoardStarHostMdlGet(), 0.0f, 0.0f, 0.0f);
|
||||
BoardModelScaleSet(BoardStarHostMdlGet(), 0.09f, 0.09f, 0.09f);
|
||||
|
|
@ -735,7 +716,8 @@ void BoardStarShowNext(s32 arg0) {
|
|||
}
|
||||
if (var_r28 == 0) {
|
||||
var_r30 = starMesTbl1[GWBoardGet()] + 6;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
var_r30 = starMesTbl2[GWBoardGet()][0];
|
||||
}
|
||||
BoardWinCreate(3, var_r30, -1);
|
||||
|
|
@ -749,7 +731,8 @@ void BoardStarShowNext(s32 arg0) {
|
|||
HuPrcSleep(3);
|
||||
if (var_r28 == 0) {
|
||||
var_r30 = starMesTbl1[GWBoardGet()] + 7;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
var_r30 = starMesTbl2[GWBoardGet()][1];
|
||||
}
|
||||
BoardWinCreate(3, var_r30, -1);
|
||||
|
|
@ -765,7 +748,7 @@ void BoardStarShowNext(s32 arg0) {
|
|||
HuPrcVSleep();
|
||||
}
|
||||
BoardViewWait();
|
||||
PSMTXIdentity(spBC);
|
||||
Identity(spBC);
|
||||
BoardModelMtxSet(BoardStarHostMdlGet(), &spBC);
|
||||
HideNextHost(1);
|
||||
while (showNextObj) {
|
||||
|
|
@ -786,7 +769,8 @@ void BoardStarShowNext(s32 arg0) {
|
|||
_ClearFlag(FLAG_ID_MAKE(1, 28));
|
||||
}
|
||||
|
||||
static void ShowNextUpdate(omObjData *arg0) {
|
||||
static void ShowNextUpdate(omObjData *arg0)
|
||||
{
|
||||
ShowNextWork *temp_r30 = OM_GET_WORK_PTR(arg0, ShowNextWork);
|
||||
Vec sp8;
|
||||
|
||||
|
|
@ -815,7 +799,8 @@ static void ShowNextUpdate(omObjData *arg0) {
|
|||
BoardModelPosSetV(BoardStarHostMdlGet(), &sp8);
|
||||
}
|
||||
|
||||
static void HideNextHost(s32 arg0) {
|
||||
static void HideNextHost(s32 arg0)
|
||||
{
|
||||
ShowNextWork *temp_r31 = OM_GET_WORK_PTR(showNextObj, ShowNextWork);
|
||||
|
||||
temp_r31->unk01 = arg0;
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -1,5 +1,6 @@
|
|||
#include "game/board/view.h"
|
||||
#include "game/audio.h"
|
||||
#include "game/disp.h"
|
||||
#include "game/gamework.h"
|
||||
#include "game/gamework_data.h"
|
||||
#include "game/hsfex.h"
|
||||
|
|
@ -7,7 +8,7 @@
|
|||
#include "game/pad.h"
|
||||
#include "game/sprite.h"
|
||||
#include "game/wipe.h"
|
||||
#include "game/disp.h"
|
||||
|
||||
|
||||
#include "game/board/main.h"
|
||||
#include "game/board/model.h"
|
||||
|
|
@ -54,55 +55,28 @@ static Process *viewProc;
|
|||
static s16 buttonWin = -1;
|
||||
static s16 focusMdl = -1;
|
||||
|
||||
static float overhead2DPos[][2] = {
|
||||
{ 48.0f, 72.0f },
|
||||
{ HU_DISP_WIDTH-48, 72.0f },
|
||||
{ 48.0f, HU_DISP_HEIGHT-72 },
|
||||
{ HU_DISP_WIDTH-48, HU_DISP_HEIGHT-72 },
|
||||
{ HU_DISP_CENTERX, 72.0f }
|
||||
};
|
||||
static float overhead2DPos[][2] = { { 48.0f, 72.0f }, { HU_DISP_WIDTH - 48, 72.0f }, { 48.0f, HU_DISP_HEIGHT - 72 },
|
||||
{ HU_DISP_WIDTH - 48, HU_DISP_HEIGHT - 72 }, { HU_DISP_CENTERX, 72.0f } };
|
||||
|
||||
static float mapViewMinZ[] = {
|
||||
-2000.0f, -1500.0f, -2200.0f,
|
||||
-1800.0f, -2100.0f, -3000.0f,
|
||||
-3000.0f, -1800.0f, -1800.0f
|
||||
};
|
||||
static float mapViewMinZ[] = { -2000.0f, -1500.0f, -2200.0f, -1800.0f, -2100.0f, -3000.0f, -3000.0f, -1800.0f, -1800.0f };
|
||||
|
||||
static float mapViewMaxZ[] = {
|
||||
2300.0f, 2500.0f, 2600.0f,
|
||||
2000.0f, 2300.0f, 2500.0f,
|
||||
2500.0f, 2000.0f, 2000.0f
|
||||
};
|
||||
static float mapViewMaxZ[] = { 2300.0f, 2500.0f, 2600.0f, 2000.0f, 2300.0f, 2500.0f, 2500.0f, 2000.0f, 2000.0f };
|
||||
|
||||
static float mapViewMinX[] = {
|
||||
-3000.0f, -3000.0f, -3000.0f,
|
||||
-3000.0f, -3000.0f, -3000.0f,
|
||||
-3000.0f, -2000.0f, -2000.0f
|
||||
};
|
||||
static float mapViewMinX[] = { -3000.0f, -3000.0f, -3000.0f, -3000.0f, -3000.0f, -3000.0f, -3000.0f, -2000.0f, -2000.0f };
|
||||
|
||||
static float mapViewMaxX[] = {
|
||||
3000.0f, 3000.0f, 3000.0f,
|
||||
3000.0f, 3000.0f, 3000.0f,
|
||||
3000.0f, 1600.0f, 2000.0f
|
||||
};
|
||||
static float mapViewMaxX[] = { 3000.0f, 3000.0f, 3000.0f, 3000.0f, 3000.0f, 3000.0f, 3000.0f, 1600.0f, 2000.0f };
|
||||
|
||||
static float overheadCamZoom[] = {
|
||||
14370.0f, 14500.0f, 15000.0f,
|
||||
15000.0f, 13000.0f, 15000.0f,
|
||||
100.0f, 10000.0f, 10000.0f
|
||||
};
|
||||
static float overheadCamZoom[] = { 14370.0f, 14500.0f, 15000.0f, 15000.0f, 13000.0f, 15000.0f, 100.0f, 10000.0f, 10000.0f };
|
||||
|
||||
static float overheadCamPosZ[] = {
|
||||
0.0f, 0.0f, 0.0f,
|
||||
0.0f, 0.0f, 0.0f,
|
||||
0.0f, -160.0f, 0.0f
|
||||
};
|
||||
static float overheadCamPosZ[] = { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, -160.0f, 0.0f };
|
||||
|
||||
void BoardViewOverheadExec(s32 arg0) {
|
||||
void BoardViewOverheadExec(s32 arg0)
|
||||
{
|
||||
if (BoardPauseDisableGet() == 0) {
|
||||
BoardPauseDisableSet(1);
|
||||
pauseDisableF = 1;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
pauseDisableF = 0;
|
||||
}
|
||||
_SetFlag(0x1001C);
|
||||
|
|
@ -128,13 +102,15 @@ void BoardViewOverheadExec(s32 arg0) {
|
|||
_ClearFlag(0x1001C);
|
||||
}
|
||||
|
||||
void BoardViewFocusGetPos(Vec *arg0) {
|
||||
void BoardViewFocusGetPos(Vec *arg0)
|
||||
{
|
||||
if (arg0) {
|
||||
BoardModelPosGet(focusMdl, arg0);
|
||||
}
|
||||
}
|
||||
|
||||
static inline void BoardViewInlineFunc00(Vec *arg0, Vec *arg1, u16 arg2) {
|
||||
static inline void BoardViewInlineFunc00(Vec *arg0, Vec *arg1, u16 arg2)
|
||||
{
|
||||
if (arg2 == 0) {
|
||||
arg2 = 1;
|
||||
}
|
||||
|
|
@ -150,13 +126,15 @@ static inline void BoardViewInlineFunc00(Vec *arg0, Vec *arg1, u16 arg2) {
|
|||
}
|
||||
}
|
||||
|
||||
void BoardViewFocusSet(Vec *arg0, u16 arg1) {
|
||||
void BoardViewFocusSet(Vec *arg0, u16 arg1)
|
||||
{
|
||||
u16 var_r31;
|
||||
|
||||
if (BoardPauseDisableGet() == 0) {
|
||||
BoardPauseDisableSet(1);
|
||||
pauseDisableF = 1;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
pauseDisableF = 0;
|
||||
}
|
||||
focusDestroyF = 1;
|
||||
|
|
@ -164,13 +142,15 @@ void BoardViewFocusSet(Vec *arg0, u16 arg1) {
|
|||
HuPrcSleep(2);
|
||||
}
|
||||
|
||||
void BoardViewMoveStart(Vec *arg0, Vec *arg1, u16 arg2) {
|
||||
void BoardViewMoveStart(Vec *arg0, Vec *arg1, u16 arg2)
|
||||
{
|
||||
u16 var_r31;
|
||||
|
||||
if (BoardPauseDisableGet() == 0) {
|
||||
BoardPauseDisableSet(1);
|
||||
pauseDisableF = 1;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
pauseDisableF = 0;
|
||||
}
|
||||
viewProc = HuPrcChildCreate(ExecStarView, 0x200A, 0x3800, 0, boardMainProc);
|
||||
|
|
@ -180,26 +160,31 @@ void BoardViewMoveStart(Vec *arg0, Vec *arg1, u16 arg2) {
|
|||
HuPrcSleep(2);
|
||||
}
|
||||
|
||||
BOOL BoardViewMoveCheck(void) {
|
||||
BOOL BoardViewMoveCheck(void)
|
||||
{
|
||||
return (viewMoveF != 0) ? TRUE : FALSE;
|
||||
}
|
||||
|
||||
void BoardViewMoveEnd(void) {
|
||||
void BoardViewMoveEnd(void)
|
||||
{
|
||||
viewMoveF = 0;
|
||||
}
|
||||
|
||||
void BoardViewWait(void) {
|
||||
void BoardViewWait(void)
|
||||
{
|
||||
viewMoveF = 0;
|
||||
while (viewProc != NULL) {
|
||||
HuPrcVSleep();
|
||||
}
|
||||
}
|
||||
|
||||
void BoardViewMapExec(s32 arg0) {
|
||||
void BoardViewMapExec(s32 arg0)
|
||||
{
|
||||
if (BoardPauseDisableGet() == 0) {
|
||||
BoardPauseDisableSet(1);
|
||||
pauseDisableF = 1;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
pauseDisableF = 0;
|
||||
}
|
||||
viewProc = HuPrcChildCreate(ExecMapView, 0x200A, 0x3800, 0, boardMainProc);
|
||||
|
|
@ -214,7 +199,8 @@ void BoardViewMapExec(s32 arg0) {
|
|||
}
|
||||
}
|
||||
|
||||
static void ExecMapView(void) {
|
||||
static void ExecMapView(void)
|
||||
{
|
||||
Vec spC;
|
||||
float var_f29;
|
||||
float temp_f28;
|
||||
|
|
@ -240,7 +226,8 @@ static void ExecMapView(void) {
|
|||
}
|
||||
if (HuPadBtn[GWPlayer[viewPlayer].port] & 0x100) {
|
||||
var_f29 = 40.0f;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
var_f29 = 20.0f;
|
||||
}
|
||||
spC.x = spC.y = spC.z = 0.0f;
|
||||
|
|
@ -274,7 +261,8 @@ static void ExecMapView(void) {
|
|||
HuPrcEnd();
|
||||
}
|
||||
|
||||
static void ExecStarView(void) {
|
||||
static void ExecStarView(void)
|
||||
{
|
||||
Vec sp8;
|
||||
float temp_f30;
|
||||
|
||||
|
|
@ -307,7 +295,8 @@ static void ExecStarView(void) {
|
|||
HuPrcEnd();
|
||||
}
|
||||
|
||||
static void ExecOverheadView(void) {
|
||||
static void ExecOverheadView(void)
|
||||
{
|
||||
u32 var_r31;
|
||||
|
||||
if ((GWBoardGet() == BOARD_ID_MAIN3 || GWBoardGet() == BOARD_ID_MAIN6) && boardLightResetHook) {
|
||||
|
|
@ -338,7 +327,8 @@ static void ExecOverheadView(void) {
|
|||
HuPrcEnd();
|
||||
}
|
||||
|
||||
static void DestroyView(void) {
|
||||
static void DestroyView(void)
|
||||
{
|
||||
if (focusMdl != -1) {
|
||||
BoardModelKill(focusMdl);
|
||||
focusMdl = -1;
|
||||
|
|
@ -355,7 +345,8 @@ static void DestroyView(void) {
|
|||
viewProc = NULL;
|
||||
}
|
||||
|
||||
static void SetTargetView(void) {
|
||||
static void SetTargetView(void)
|
||||
{
|
||||
Vec sp14;
|
||||
Vec sp8;
|
||||
|
||||
|
|
@ -370,7 +361,8 @@ static void SetTargetView(void) {
|
|||
sp8.z = 0.0f;
|
||||
BoardCameraMotionStartEx(focusMdl, &sp8, NULL, 3000.0f, -1.0f, 21);
|
||||
BoardCameraMotionWait();
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
BoardModelPosSet(focusMdl, 0.0f, 0.0f, 0.0f);
|
||||
sp14.x = 0.0f;
|
||||
sp14.y = 0.0f;
|
||||
|
|
@ -386,7 +378,8 @@ static void SetTargetView(void) {
|
|||
}
|
||||
}
|
||||
|
||||
static void DestroyFocus(void) {
|
||||
static void DestroyFocus(void)
|
||||
{
|
||||
if (focusMdl != -1) {
|
||||
BoardModelKill(focusMdl);
|
||||
focusMdl = -1;
|
||||
|
|
@ -396,7 +389,8 @@ static void DestroyFocus(void) {
|
|||
BoardCameraMoveSet(1);
|
||||
}
|
||||
|
||||
static void CreateButtonWin(void) {
|
||||
static void CreateButtonWin(void)
|
||||
{
|
||||
float sp8[2];
|
||||
float posX;
|
||||
float posY;
|
||||
|
|
@ -404,39 +398,41 @@ static void CreateButtonWin(void) {
|
|||
|
||||
if (viewControls != 2) {
|
||||
var_r31 = MAKE_MESSID(0x09, 0x05);
|
||||
#if VERSION_PAL
|
||||
#if VERSION_PAL
|
||||
HuWinMesMaxSizeGet(1, sp8, var_r31);
|
||||
posX = 288-((sp8[0]/2)-32);
|
||||
#endif
|
||||
posX = 288 - ((sp8[0] / 2) - 32);
|
||||
#endif
|
||||
posY = 286.0f;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
var_r31 = MAKE_MESSID(0x10, 0x4D);
|
||||
#if VERSION_PAL
|
||||
#if VERSION_PAL
|
||||
posX = -10000.0f;
|
||||
posY = 324.0f;
|
||||
#else
|
||||
#else
|
||||
posY = 328.0f;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
}
|
||||
HuWinMesMaxSizeGet(1, sp8, var_r31);
|
||||
#if VERSION_NTSC
|
||||
#if VERSION_NTSC
|
||||
posX = -10000.0f;
|
||||
#endif
|
||||
#endif
|
||||
buttonWin = HuWinCreate(posX, posY, sp8[0], sp8[1], 0);
|
||||
HuWinBGTPLvlSet(buttonWin, 0.0f);
|
||||
HuWinMesSpeedSet(buttonWin, 0);
|
||||
HuWinMesSet(buttonWin, var_r31);
|
||||
}
|
||||
|
||||
static void DestroyButtonWin(void) {
|
||||
static void DestroyButtonWin(void)
|
||||
{
|
||||
if (buttonWin != -1) {
|
||||
HuWinKill(buttonWin);
|
||||
buttonWin = -1;
|
||||
}
|
||||
}
|
||||
|
||||
static void InitOverheadView(void) {
|
||||
static void InitOverheadView(void)
|
||||
{
|
||||
Vec sp10;
|
||||
GXColor spA;
|
||||
s16 sp8;
|
||||
|
|
@ -444,16 +440,9 @@ static void InitOverheadView(void) {
|
|||
OverheadWork *temp_r31;
|
||||
float *temp_r30;
|
||||
s32 i;
|
||||
s32 sp1C[8] = {
|
||||
DATA_MAKE_NUM(DATADIR_BOARD, 0x2E),
|
||||
DATA_MAKE_NUM(DATADIR_BOARD, 0x2F),
|
||||
DATA_MAKE_NUM(DATADIR_BOARD, 0x30),
|
||||
DATA_MAKE_NUM(DATADIR_BOARD, 0x31),
|
||||
DATA_MAKE_NUM(DATADIR_BOARD, 0x32),
|
||||
DATA_MAKE_NUM(DATADIR_BOARD, 0x33),
|
||||
DATA_MAKE_NUM(DATADIR_BOARD, 0x34),
|
||||
DATA_MAKE_NUM(DATADIR_BOARD, 0x35)
|
||||
};
|
||||
s32 sp1C[8] = { DATA_MAKE_NUM(DATADIR_BOARD, 0x2E), DATA_MAKE_NUM(DATADIR_BOARD, 0x2F), DATA_MAKE_NUM(DATADIR_BOARD, 0x30),
|
||||
DATA_MAKE_NUM(DATADIR_BOARD, 0x31), DATA_MAKE_NUM(DATADIR_BOARD, 0x32), DATA_MAKE_NUM(DATADIR_BOARD, 0x33),
|
||||
DATA_MAKE_NUM(DATADIR_BOARD, 0x34), DATA_MAKE_NUM(DATADIR_BOARD, 0x35) };
|
||||
|
||||
temp_r26 = omAddObjEx(boardObjMan, 0x1000, 0, 0, -1, UpdateOverheadView);
|
||||
overheadObj = temp_r26;
|
||||
|
|
@ -472,7 +461,8 @@ static void InitOverheadView(void) {
|
|||
spA.r = 0x50;
|
||||
spA.g = 0x50;
|
||||
spA.b = 0x50;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
GWCharColorGet(GWPlayer[i].character, &spA);
|
||||
}
|
||||
BoardSpriteCreate(DATA_MAKE_NUM(DATADIR_BOARD, 0x6C), 0x1770, 0, &sp8);
|
||||
|
|
@ -505,13 +495,15 @@ static void InitOverheadView(void) {
|
|||
}
|
||||
}
|
||||
|
||||
static void DestroyOverheadView(void) {
|
||||
static void DestroyOverheadView(void)
|
||||
{
|
||||
if (overheadObj) {
|
||||
OM_GET_WORK_PTR(overheadObj, OverheadWork)->unk00_field0 = 1;
|
||||
}
|
||||
}
|
||||
|
||||
static void UpdateOverheadView(omObjData *arg0) {
|
||||
static void UpdateOverheadView(omObjData *arg0)
|
||||
{
|
||||
Vec sp20;
|
||||
Vec sp14;
|
||||
Vec sp8;
|
||||
|
|
@ -545,7 +537,8 @@ static void UpdateOverheadView(omObjData *arg0) {
|
|||
}
|
||||
if (GWBoardGet() == BOARD_ID_EXTRA1 || GWBoardGet() == BOARD_ID_EXTRA2) {
|
||||
var_r27 = 1;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
var_r27 = 0;
|
||||
}
|
||||
for (i = 0; i < 5; i++) {
|
||||
|
|
@ -555,9 +548,11 @@ static void UpdateOverheadView(omObjData *arg0) {
|
|||
sp20.z = 1000.0f;
|
||||
if (i != 4) {
|
||||
BoardSpacePosGet(0, GWPlayer[i].space_curr, &sp14);
|
||||
} else if (var_r27 != 0) {
|
||||
}
|
||||
else if (var_r27 != 0) {
|
||||
sp14.x = sp14.y = sp14.z = 0.0f;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
BoardSpacePosGet(0, BoardSpaceStarGetCurr(), &sp14);
|
||||
}
|
||||
Hu3D3Dto2D(&sp14, 1, &sp14);
|
||||
|
|
@ -569,7 +564,8 @@ static void UpdateOverheadView(omObjData *arg0) {
|
|||
temp_f31 = VECMag(&sp8) / 32;
|
||||
if (i != 4) {
|
||||
var_r28 = i + 4;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
var_r28 = 8;
|
||||
}
|
||||
HuSprZRotSet(temp_r31->unk02, var_r28, temp_f30);
|
||||
|
|
@ -577,13 +573,15 @@ static void UpdateOverheadView(omObjData *arg0) {
|
|||
HuSprPosSet(temp_r31->unk02, var_r28, var_r29[0], var_r29[1]);
|
||||
if (i == 4 && (GWBoardGet() == BOARD_ID_EXTRA1 || GWBoardGet() == BOARD_ID_EXTRA2)) {
|
||||
BoardModelVisibilitySet(temp_r31->unk04, 0);
|
||||
} else if (temp_r31->unk01 != 0) {
|
||||
}
|
||||
else if (temp_r31->unk01 != 0) {
|
||||
if (i != 4) {
|
||||
HuSprAttrReset(temp_r31->unk02, i, HUSPR_ATTR_DISPOFF);
|
||||
}
|
||||
HuSprAttrReset(temp_r31->unk02, var_r28, HUSPR_ATTR_DISPOFF);
|
||||
BoardModelVisibilitySet(temp_r31->unk04, 1);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
if (i != 4) {
|
||||
HuSprAttrSet(temp_r31->unk02, i, HUSPR_ATTR_DISPOFF);
|
||||
}
|
||||
|
|
@ -595,15 +593,16 @@ static void UpdateOverheadView(omObjData *arg0) {
|
|||
sp20.y = var_r29[1];
|
||||
sp20.z = 1000.0f;
|
||||
BoardCameraRotGet(&sp8);
|
||||
PSMTXRotRad(sp5C, 'x', MTXDegToRad(sp8.x));
|
||||
PSMTXRotRad(sp2C, 'y', MTXDegToRad(sp8.y));
|
||||
PSMTXConcat(sp2C, sp5C, sp2C);
|
||||
RotRad(sp5C, 'x', MTXDegToRad(sp8.x));
|
||||
RotRad(sp2C, 'y', MTXDegToRad(sp8.y));
|
||||
Concat(sp2C, sp5C, sp2C);
|
||||
BoardModelMtxSet(temp_r31->unk04, &sp2C);
|
||||
Hu3D2Dto3D(&sp20, 1, &sp20);
|
||||
BoardModelPosSetV(temp_r31->unk04, &sp20);
|
||||
}
|
||||
|
||||
static void WaitOverheadView(void) {
|
||||
static void WaitOverheadView(void)
|
||||
{
|
||||
while (overheadObj) {
|
||||
HuPrcVSleep();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1421,7 +1421,7 @@ static void UpdateItemHook(void)
|
|||
effectDustParam.unk0C.z = frandmod(10) - 5;
|
||||
CreateEffectDust(temp_r31->unk02, sp8.x, sp8.y, sp8.z, 20.0f, &effectDustParam);
|
||||
}
|
||||
PSMTXIdentity(temp_r30->unk_F0);
|
||||
MTXIdentity(temp_r30->unk_F0);
|
||||
temp_r25 = HuPrcCurrentGet();
|
||||
for (var_r28 = 0; var_r28 < 32; var_r28++) {
|
||||
if (itemHookProcess[var_r28] == temp_r25) {
|
||||
|
|
|
|||
|
|
@ -316,7 +316,7 @@ void Hu3DAnimExec(void) {
|
|||
for (i = 0; i < HU3D_TEXSCROLL_MAX; i++, var_r31++) {
|
||||
if (var_r31->unk02 != -1) {
|
||||
if (Hu3DPauseF != 0 && !(var_r31->unk00 & 8)) {
|
||||
PSMTXRotRad(var_r31->unk3C, 'Z', MTXDegToRad(var_r31->unk34));
|
||||
MTXRotRad(var_r31->unk3C, 'Z', MTXDegToRad(var_r31->unk34));
|
||||
mtxTransCat(var_r31->unk3C, var_r31->unk04.x, var_r31->unk04.y, var_r31->unk04.z);
|
||||
} else {
|
||||
if (var_r31->unk00 & 1) {
|
||||
|
|
@ -349,7 +349,7 @@ void Hu3DAnimExec(void) {
|
|||
var_r31->unk34 += 360.0f;
|
||||
}
|
||||
}
|
||||
PSMTXRotRad(var_r31->unk3C, 'Z', MTXDegToRad(var_r31->unk34));
|
||||
MTXRotRad(var_r31->unk3C, 'Z', MTXDegToRad(var_r31->unk34));
|
||||
mtxTransCat(var_r31->unk3C, var_r31->unk04.x, var_r31->unk04.y, var_r31->unk04.z);
|
||||
}
|
||||
}
|
||||
|
|
@ -401,7 +401,7 @@ s16 Hu3DTexScrollCreate(s16 arg0, char *arg1) {
|
|||
var_r31->unk00 = 0;
|
||||
var_r31->unk04.x = var_r31->unk04.y = var_r31->unk04.z = 0.0f;
|
||||
var_r31->unk34 = 0.0f;
|
||||
PSMTXIdentity(var_r31->unk3C);
|
||||
MTXIdentity(var_r31->unk3C);
|
||||
return var_r28;
|
||||
}
|
||||
|
||||
|
|
@ -687,16 +687,16 @@ static void particleFunc(ModelData *arg0, Mtx arg1) {
|
|||
temp_r31 = arg0->unk_120;
|
||||
temp_r22 = temp_r31->unk_44;
|
||||
if (HmfInverseMtxF3X3(arg1, sp128) == 0) {
|
||||
PSMTXIdentity(sp128);
|
||||
MTXIdentity(sp128);
|
||||
}
|
||||
PSMTXReorder(sp128, sp8);
|
||||
MTXReorder(sp128, sp8);
|
||||
if ((Hu3DPauseF == 0 || (arg0->attr & HU3D_ATTR_NOPAUSE)) && temp_r31->unk_54 && temp_r31->unk_38 != GlobalCounter) {
|
||||
var_r17 = temp_r31->unk_54;
|
||||
var_r17(arg0, temp_r31, arg1);
|
||||
}
|
||||
var_r29 = temp_r31->unk_48;
|
||||
var_r30 = temp_r31->unk_4C;
|
||||
PSMTXROMultVecArray(sp8, &basePos[0], sp38, 4);
|
||||
MTXROMultVecArray(sp8, &basePos[0], sp38, 4);
|
||||
for (i = 0, var_r19 = 0; i < temp_r31->unk_30; i++, var_r29++) {
|
||||
if (var_r29->unk2C && (var_r29->unk06 & Hu3DCameraBit)) {
|
||||
if (!var_r29->unk30) {
|
||||
|
|
@ -722,9 +722,9 @@ static void particleFunc(ModelData *arg0, Mtx arg1) {
|
|||
VECScale(&basePos[1], &sp98[1], var_r29->unk2C);
|
||||
VECScale(&basePos[2], &sp98[2], var_r29->unk2C);
|
||||
VECScale(&basePos[3], &sp98[3], var_r29->unk2C);
|
||||
PSMTXRotRad(spC8, 'Z', var_r29->unk30);
|
||||
PSMTXConcat(sp128, spC8, spF8);
|
||||
PSMTXMultVecArray(spF8, sp98, sp68, 4);
|
||||
MTXRotRad(spC8, 'Z', var_r29->unk30);
|
||||
MTXConcat(sp128, spC8, spF8);
|
||||
MTXMultVecArray(spF8, sp98, sp68, 4);
|
||||
VECAdd(&sp68[0], &var_r29->unk34, var_r30++);
|
||||
VECAdd(&sp68[1], &var_r29->unk34, var_r30++);
|
||||
VECAdd(&sp68[2], &var_r29->unk34, var_r30++);
|
||||
|
|
@ -800,7 +800,7 @@ static void particleFunc(ModelData *arg0, Mtx arg1) {
|
|||
temp_r24 = &temp_r22->bmp[temp_r27->bmpNo];
|
||||
temp_f29 = (float) temp_r27->sizeX / temp_r24->sizeX;
|
||||
temp_f30 = (float) temp_r27->sizeY / temp_r24->sizeY;
|
||||
PSMTXScale(sp128, temp_f29, temp_f30, 1.0f);
|
||||
MTXScale(sp128, temp_f29, temp_f30, 1.0f);
|
||||
temp_f29 = (float) temp_r27->startX / temp_r24->sizeX;
|
||||
temp_f30 = (float) temp_r27->startY / temp_r24->sizeY;
|
||||
mtxTransCat(sp128, temp_f29, temp_f30, 0.0f);
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ void Hu3DDraw(ModelData *arg0, Mtx arg1, Vec *arg2) {
|
|||
temp_r28 = arg0->hsfData;
|
||||
if (arg0->attr & HU3D_ATTR_HOOKFUNC) {
|
||||
temp_r31 = &DrawObjData[DrawObjIdx];
|
||||
PSMTXCopy(arg1, temp_r31->matrix);
|
||||
MTXCopy(arg1, temp_r31->matrix);
|
||||
sp8.x = temp_r31->matrix[0][3];
|
||||
sp8.y = temp_r31->matrix[1][3];
|
||||
sp8.z = temp_r31->matrix[2][3];
|
||||
|
|
@ -139,7 +139,7 @@ void Hu3DDraw(ModelData *arg0, Mtx arg1, Vec *arg2) {
|
|||
for (i = 0; i < 8; i++) {
|
||||
BmpPtrBak[i] = (HsfAttribute*) -1;
|
||||
}
|
||||
PSMTXCopy(arg1, MTXBuf[0]);
|
||||
MTXCopy(arg1, MTXBuf[0]);
|
||||
scaleBuf[0] = *arg2;
|
||||
MTXIdx = 1;
|
||||
CancelTRXF = 0;
|
||||
|
|
@ -220,12 +220,12 @@ static void objMesh(ModelData *arg0, HsfObject *arg1) {
|
|||
if (CancelTRXF == 0) {
|
||||
if (arg1->data.cenvCnt != 0 && hookIdx == -1) {
|
||||
temp_r21 = arg1 - temp_r20->object;
|
||||
PSMTXConcat(MTXBuf[0], temp_r20->matrix->data[temp_r21 + temp_r20->matrix->base_idx], MTXBuf[MTXIdx]);
|
||||
MTXConcat(MTXBuf[0], temp_r20->matrix->data[temp_r21 + temp_r20->matrix->base_idx], MTXBuf[MTXIdx]);
|
||||
} else {
|
||||
PSMTXScale(sp1C, var_r30->scale.x, var_r30->scale.y, var_r30->scale.z);
|
||||
MTXScale(sp1C, var_r30->scale.x, var_r30->scale.y, var_r30->scale.z);
|
||||
mtxRotCat(sp1C, var_r30->rot.x, var_r30->rot.y, var_r30->rot.z);
|
||||
mtxTransCat(sp1C, var_r30->pos.x, var_r30->pos.y, var_r30->pos.z);
|
||||
PSMTXConcat(MTXBuf[MTXIdx - 1], sp1C, MTXBuf[MTXIdx]);
|
||||
MTXConcat(MTXBuf[MTXIdx - 1], sp1C, MTXBuf[MTXIdx]);
|
||||
}
|
||||
temp_r28 = &scaleBuf[MTXIdx];
|
||||
temp_r24 = temp_r28 - 1;
|
||||
|
|
@ -234,29 +234,29 @@ static void objMesh(ModelData *arg0, HsfObject *arg1) {
|
|||
temp_r28->z = temp_r24->z * var_r30->scale.z;
|
||||
temp_r29->scale = *temp_r28;
|
||||
if (arg1->flags & 1) {
|
||||
PSMTXInverse(MTXBuf[MTXIdx], sp1C);
|
||||
MTXInverse(MTXBuf[MTXIdx], sp1C);
|
||||
sp1C[0][3] = sp1C[1][3] = sp1C[2][3] = 0.0f;
|
||||
PSMTXConcat(MTXBuf[MTXIdx], sp1C, temp_r29->matrix);
|
||||
MTXConcat(MTXBuf[MTXIdx], sp1C, temp_r29->matrix);
|
||||
mtxScaleCat(temp_r29->matrix, temp_r28->x, temp_r28->y, temp_r28->z);
|
||||
} else {
|
||||
PSMTXCopy(MTXBuf[MTXIdx], temp_r29->matrix);
|
||||
MTXCopy(MTXBuf[MTXIdx], temp_r29->matrix);
|
||||
}
|
||||
MTXIdx++;
|
||||
var_r18 = 1;
|
||||
} else {
|
||||
if (arg1->flags & 1) {
|
||||
PSMTXInverse(MTXBuf[MTXIdx - 1], sp1C);
|
||||
MTXInverse(MTXBuf[MTXIdx - 1], sp1C);
|
||||
sp1C[0][3] = sp1C[1][3] = sp1C[2][3] = 0.0f;
|
||||
PSMTXConcat(MTXBuf[MTXIdx - 1], sp1C, temp_r29->matrix);
|
||||
MTXConcat(MTXBuf[MTXIdx - 1], sp1C, temp_r29->matrix);
|
||||
mtxScaleCat(temp_r29->matrix, scaleBuf[MTXIdx - 1].x, scaleBuf[MTXIdx - 1].y, scaleBuf[MTXIdx - 1].z);
|
||||
} else {
|
||||
PSMTXCopy(MTXBuf[MTXIdx - 1], temp_r29->matrix);
|
||||
MTXCopy(MTXBuf[MTXIdx - 1], temp_r29->matrix);
|
||||
}
|
||||
temp_r29->scale = scaleBuf[MTXIdx - 1];
|
||||
CancelTRXF = 0;
|
||||
var_r18 = 0;
|
||||
}
|
||||
PSMTXCopy(temp_r29->matrix, temp_r25->matrix);
|
||||
MTXCopy(temp_r29->matrix, temp_r25->matrix);
|
||||
if (temp_r25->hook != -1) {
|
||||
temp_r31 = &Hu3DData[temp_r25->hook];
|
||||
if (!(temp_r31->attr & HU3D_ATTR_DISPOFF)) {
|
||||
|
|
@ -268,11 +268,11 @@ static void objMesh(ModelData *arg0, HsfObject *arg1) {
|
|||
}
|
||||
sp8 = hookIdx;
|
||||
hookIdx = temp_r25->hook;
|
||||
PSMTXScale(sp1C, temp_r31->scale.x, temp_r31->scale.y, temp_r31->scale.z);
|
||||
MTXScale(sp1C, temp_r31->scale.x, temp_r31->scale.y, temp_r31->scale.z);
|
||||
mtxRotCat(sp1C, temp_r31->rot.x, temp_r31->rot.y, temp_r31->rot.z);
|
||||
mtxTransCat(sp1C, temp_r31->pos.x, temp_r31->pos.y, temp_r31->pos.z);
|
||||
PSMTXConcat(sp1C, temp_r31->unk_F0, sp1C);
|
||||
PSMTXConcat(temp_r29->matrix, sp1C, MTXBuf[MTXIdx]);
|
||||
MTXConcat(sp1C, temp_r31->unk_F0, sp1C);
|
||||
MTXConcat(temp_r29->matrix, sp1C, MTXBuf[MTXIdx]);
|
||||
temp_r28 = &scaleBuf[MTXIdx];
|
||||
temp_r24 = temp_r28 - 1;
|
||||
temp_r28->x = temp_r24->x * temp_r31->scale.x;
|
||||
|
|
@ -377,8 +377,8 @@ s32 ObjCullCheck(HsfData *arg0, HsfObject *arg1, Mtx arg2) {
|
|||
temp_f31 = (temp_r29->x - temp_r31->x) * 0.5;
|
||||
temp_f30 = (temp_r29->y - temp_r31->y) * 0.5;
|
||||
temp_f29 = (temp_r29->z - temp_r31->z) * 0.5;
|
||||
PSMTXTrans(sp28, temp_f31 + temp_r31->x, temp_f30 + temp_r31->y, temp_f29 + temp_r31->z);
|
||||
PSMTXConcat(arg2, sp28, sp28);
|
||||
MTXTrans(sp28, temp_f31 + temp_r31->x, temp_f30 + temp_r31->y, temp_f29 + temp_r31->z);
|
||||
MTXConcat(arg2, sp28, sp28);
|
||||
temp_f21 = var_f26 * sqrtf(temp_f31 * temp_f31 + temp_f30 * temp_f30 + temp_f29 * temp_f29);
|
||||
temp_f20 = sp28[0][3];
|
||||
temp_f19 = sp28[1][3];
|
||||
|
|
@ -795,7 +795,7 @@ static s32 SetTevStageNoTex(HsfDrawObject *arg0, HsfMaterial *arg1) {
|
|||
if (var_f31 < 0.1) {
|
||||
var_f31 = 0.1f;
|
||||
}
|
||||
PSMTXCopy(hiliteMtx, sp20);
|
||||
MTXCopy(hiliteMtx, sp20);
|
||||
mtxScaleCat(sp20, var_f31, var_f31, var_f31);
|
||||
GXLoadTexMtxImm(sp20, GX_TEXMTX7, GX_MTX2x4);
|
||||
var_r30++;
|
||||
|
|
@ -935,12 +935,12 @@ static void SetTevStageTex(HsfDrawObject *arg0, HsfMaterial *arg1) {
|
|||
var_r30 = var_r31 = 1;
|
||||
temp_r29 = &temp_r19->data.attribute[arg1->attrs[0]];
|
||||
if (temp_r29->unk28 != 1.0f || temp_r29->unk2C != 1.0f) {
|
||||
PSMTXScale(sp54, 1.0f / temp_r29->unk28, 1.0f / temp_r29->unk2C, 1.0f);
|
||||
MTXScale(sp54, 1.0f / temp_r29->unk28, 1.0f / temp_r29->unk2C, 1.0f);
|
||||
mtxTransCat(sp54, -temp_r29->unk30, -temp_r29->unk34, 0.0f);
|
||||
GXLoadTexMtxImm(sp54, texMtxTbl[var_r30], GX_MTX2x4);
|
||||
GXSetTexCoordGen(GX_TEXCOORD0, GX_TG_MTX2x4, GX_TG_TEX0, texMtxTbl[var_r30]);
|
||||
} else if (temp_r29->unk30 != 0.0f || temp_r29->unk34 != 0.0f) {
|
||||
PSMTXTrans(sp54, -temp_r29->unk30, -temp_r29->unk34, 0.0f);
|
||||
MTXTrans(sp54, -temp_r29->unk30, -temp_r29->unk34, 0.0f);
|
||||
GXLoadTexMtxImm(sp54, texMtxTbl[var_r30], GX_MTX2x4);
|
||||
GXSetTexCoordGen(GX_TEXCOORD0, GX_TG_MTX2x4, GX_TG_TEX0, texMtxTbl[var_r30]);
|
||||
} else {
|
||||
|
|
@ -953,13 +953,13 @@ static void SetTevStageTex(HsfDrawObject *arg0, HsfMaterial *arg1) {
|
|||
GXLoadTexMtxImm(Hu3DTexScrData[temp_r28->unk04].unk3C, GX_TEXMTX0, GX_MTX2x4);
|
||||
GXSetTexCoordGen2(GX_TEXCOORD0, GX_TG_MTX2x4, GX_TG_TEX0, GX_TEXMTX0, GX_FALSE, GX_PTIDENTITY);
|
||||
} else if (temp_r28->unk00 & 4) {
|
||||
PSMTXScale(sp54, 1.0f / temp_r28->unk20, 1.0f / temp_r28->unk24, 1.0f / temp_r28->unk28);
|
||||
MTXScale(sp54, 1.0f / temp_r28->unk20, 1.0f / temp_r28->unk24, 1.0f / temp_r28->unk28);
|
||||
mtxRotCat(sp54, temp_r28->unk14, temp_r28->unk18, temp_r28->unk1C);
|
||||
mtxTransCat(sp54, -temp_r28->unk08, -temp_r28->unk0C, -temp_r28->unk10);
|
||||
GXLoadTexMtxImm(sp54, GX_TEXMTX0, GX_MTX2x4);
|
||||
GXSetTexCoordGen2(GX_TEXCOORD0, GX_TG_MTX2x4, GX_TG_TEX0, GX_TEXMTX0, GX_FALSE, GX_PTIDENTITY);
|
||||
} else if (temp_r28->unk00 & 1) {
|
||||
PSMTXScale(sp54, temp_r28->unk2C, temp_r28->unk30, 1.0f);
|
||||
MTXScale(sp54, temp_r28->unk2C, temp_r28->unk30, 1.0f);
|
||||
mtxTransCat(sp54, temp_r28->unk34, temp_r28->unk38, 0.0f);
|
||||
GXLoadTexMtxImm(sp54, GX_TEXMTX0, GX_MTX2x4);
|
||||
GXSetTexCoordGen2(GX_TEXCOORD0, GX_TG_MTX2x4, GX_TG_TEX0, GX_TEXMTX0, GX_FALSE, GX_PTIDENTITY);
|
||||
|
|
@ -1056,7 +1056,7 @@ static void SetTevStageTex(HsfDrawObject *arg0, HsfMaterial *arg1) {
|
|||
if (var_f31 < 0.1) {
|
||||
var_f31 = 0.1f;
|
||||
}
|
||||
PSMTXCopy(hiliteMtx, sp54);
|
||||
MTXCopy(hiliteMtx, sp54);
|
||||
mtxScaleCat(sp54, var_f31, var_f31, var_f31);
|
||||
GXLoadTexMtxImm(sp54, GX_TEXMTX7, GX_MTX2x4);
|
||||
var_r31++;
|
||||
|
|
@ -1131,7 +1131,7 @@ static void SetTevStageTex(HsfDrawObject *arg0, HsfMaterial *arg1) {
|
|||
temp_r23 = (u16) var_r30;
|
||||
var_r30++;
|
||||
} else if (temp_r28->unk00 & 4) {
|
||||
PSMTXScale(sp54, 1.0f / temp_r28->unk20, 1.0f / temp_r28->unk24, 1.0f / temp_r28->unk28);
|
||||
MTXScale(sp54, 1.0f / temp_r28->unk20, 1.0f / temp_r28->unk24, 1.0f / temp_r28->unk28);
|
||||
mtxRotCat(sp54, temp_r28->unk14, temp_r28->unk18, temp_r28->unk1C);
|
||||
mtxTransCat(sp54, -temp_r28->unk08, -temp_r28->unk0C, -temp_r28->unk10);
|
||||
GXLoadTexMtxImm(sp54, texMtxTbl[var_r30], GX_MTX2x4);
|
||||
|
|
@ -1139,7 +1139,7 @@ static void SetTevStageTex(HsfDrawObject *arg0, HsfMaterial *arg1) {
|
|||
temp_r23 = (u16) var_r30;
|
||||
var_r30++;
|
||||
} else if (temp_r28->unk00 & 1) {
|
||||
PSMTXScale(sp54, temp_r28->unk2C, temp_r28->unk30, 1.0f);
|
||||
MTXScale(sp54, temp_r28->unk2C, temp_r28->unk30, 1.0f);
|
||||
mtxTransCat(sp54, temp_r28->unk34, temp_r28->unk38, 0.0f);
|
||||
GXLoadTexMtxImm(sp54, texMtxTbl[var_r30], GX_MTX2x4);
|
||||
GXSetTexCoordGen(var_r30, GX_TG_MTX2x4, GX_TG_TEX0, texMtxTbl[var_r30]);
|
||||
|
|
@ -1152,12 +1152,12 @@ static void SetTevStageTex(HsfDrawObject *arg0, HsfMaterial *arg1) {
|
|||
}
|
||||
} else {
|
||||
if (temp_r29->unk28 != 1.0f || temp_r29->unk2C != 1.0f) {
|
||||
PSMTXScale(sp54, 1.0f / temp_r29->unk28, 1.0f / temp_r29->unk2C, 1.0f);
|
||||
MTXScale(sp54, 1.0f / temp_r29->unk28, 1.0f / temp_r29->unk2C, 1.0f);
|
||||
mtxTransCat(sp54, -temp_r29->unk30, -temp_r29->unk34, 0.0f);
|
||||
GXLoadTexMtxImm(sp54, texMtxTbl[var_r30], GX_MTX2x4);
|
||||
GXSetTexCoordGen(var_r30, GX_TG_MTX2x4, GX_TG_TEX0, texMtxTbl[var_r30]);
|
||||
} else if (temp_r29->unk30 != 0.0f || temp_r29->unk34 != 0.0f) {
|
||||
PSMTXTrans(sp54, -temp_r29->unk30, -temp_r29->unk34, 0.0f);
|
||||
MTXTrans(sp54, -temp_r29->unk30, -temp_r29->unk34, 0.0f);
|
||||
GXLoadTexMtxImm(sp54, texMtxTbl[var_r30], GX_MTX2x4);
|
||||
GXSetTexCoordGen(var_r30, GX_TG_MTX2x4, GX_TG_TEX0, texMtxTbl[var_r30]);
|
||||
} else {
|
||||
|
|
@ -1298,11 +1298,11 @@ static void SetTevStageTex(HsfDrawObject *arg0, HsfMaterial *arg1) {
|
|||
GXSetTevAlphaIn(var_r31, GX_CA_ZERO, GX_CA_ZERO, GX_CA_ZERO, GX_CA_APREV);
|
||||
GXSetTevAlphaOp(var_r31, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, GX_FALSE, GX_TEVPREV);
|
||||
}
|
||||
PSMTXScale(sp54, 1.0f / arg0->scale.x, 1.0f / arg0->scale.y, 1.0f / arg0->scale.z);
|
||||
PSMTXConcat(arg0->matrix, sp54, sp54);
|
||||
MTXScale(sp54, 1.0f / arg0->scale.x, 1.0f / arg0->scale.y, 1.0f / arg0->scale.z);
|
||||
MTXConcat(arg0->matrix, sp54, sp54);
|
||||
sp54[0][3] = sp54[1][3] = sp54[2][3] = 0.0f;
|
||||
PSMTXConcat(sp54, Hu3DCameraMtxXPose, sp54);
|
||||
PSMTXConcat(refMtx, sp54, sp54);
|
||||
MTXConcat(sp54, Hu3DCameraMtxXPose, sp54);
|
||||
MTXConcat(refMtx, sp54, sp54);
|
||||
GXLoadTexMtxImm(sp54, 0x36, GX_MTX2x4);
|
||||
var_r31++;
|
||||
var_r30++;
|
||||
|
|
@ -1320,7 +1320,7 @@ static void SetTevStageTex(HsfDrawObject *arg0, HsfMaterial *arg1) {
|
|||
if (var_f31 < 0.1) {
|
||||
var_f31 = 0.1f;
|
||||
}
|
||||
PSMTXCopy(hiliteMtx, sp54);
|
||||
MTXCopy(hiliteMtx, sp54);
|
||||
mtxScaleCat(sp54, var_f31, var_f31, var_f31);
|
||||
GXLoadTexMtxImm(sp54, 0x33, GX_MTX2x4);
|
||||
if (var_r20 == -1) {
|
||||
|
|
@ -1551,11 +1551,11 @@ static void SetReflect(HsfDrawObject *arg0, s16 arg1, s16 arg2, u8 arg3) {
|
|||
GXSetTevColorOp(arg1, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, GX_TRUE, GX_TEVPREV);
|
||||
GXSetTevAlphaIn(arg1, GX_CA_ZERO, GX_CA_ZERO, GX_CA_ZERO, GX_CA_APREV);
|
||||
GXSetTevAlphaOp(arg1, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, GX_FALSE, GX_TEVPREV);
|
||||
PSMTXScale(sp3C, 1.0f / arg0->scale.x, 1.0f / arg0->scale.y, 1.0f / arg0->scale.z);
|
||||
PSMTXConcat(arg0->matrix, sp3C, spC);
|
||||
MTXScale(sp3C, 1.0f / arg0->scale.x, 1.0f / arg0->scale.y, 1.0f / arg0->scale.z);
|
||||
MTXConcat(arg0->matrix, sp3C, spC);
|
||||
spC[0][3] = spC[1][3] = spC[2][3] = 0.0f;
|
||||
PSMTXConcat(spC, Hu3DCameraMtxXPose, sp3C);
|
||||
PSMTXConcat(refMtx, sp3C, spC);
|
||||
MTXConcat(spC, Hu3DCameraMtxXPose, sp3C);
|
||||
MTXConcat(refMtx, sp3C, spC);
|
||||
GXLoadTexMtxImm(spC, GX_TEXMTX8, GX_MTX2x4);
|
||||
}
|
||||
|
||||
|
|
@ -1854,10 +1854,10 @@ static void objNull(ModelData *arg0, HsfObject *arg1) {
|
|||
var_r31 = &arg1->data.curr;
|
||||
}
|
||||
if (arg0->hsfData->cenvCnt == 0 || hookIdx != -1) {
|
||||
PSMTXScale(sp8, var_r31->scale.x, var_r31->scale.y, var_r31->scale.z);
|
||||
MTXScale(sp8, var_r31->scale.x, var_r31->scale.y, var_r31->scale.z);
|
||||
mtxRotCat(sp8, var_r31->rot.x, var_r31->rot.y, var_r31->rot.z);
|
||||
mtxTransCat(sp8, var_r31->pos.x, var_r31->pos.y, var_r31->pos.z);
|
||||
PSMTXConcat(MTXBuf[MTXIdx - 1], sp8, MTXBuf[MTXIdx]);
|
||||
MTXConcat(MTXBuf[MTXIdx - 1], sp8, MTXBuf[MTXIdx]);
|
||||
}
|
||||
temp_r28 = &scaleBuf[MTXIdx];
|
||||
temp_r27 = temp_r28 - 1;
|
||||
|
|
@ -1893,10 +1893,10 @@ static void objRoot(ModelData *arg0, HsfObject *arg1) {
|
|||
var_r31 = &arg1->data.curr;
|
||||
}
|
||||
if (arg0->hsfData->cenvCnt == 0 || hookIdx != -1) {
|
||||
PSMTXScale(sp8, var_r31->scale.x, var_r31->scale.y, var_r31->scale.z);
|
||||
MTXScale(sp8, var_r31->scale.x, var_r31->scale.y, var_r31->scale.z);
|
||||
mtxRotCat(sp8, var_r31->rot.x, var_r31->rot.y, var_r31->rot.z);
|
||||
mtxTransCat(sp8, var_r31->pos.x, var_r31->pos.y, var_r31->pos.z);
|
||||
PSMTXConcat(MTXBuf[MTXIdx - 1], sp8, MTXBuf[MTXIdx]);
|
||||
MTXConcat(MTXBuf[MTXIdx - 1], sp8, MTXBuf[MTXIdx]);
|
||||
}
|
||||
temp_r30 = &scaleBuf[MTXIdx];
|
||||
temp_r29 = temp_r30 - 1;
|
||||
|
|
@ -1932,10 +1932,10 @@ static void objJoint(ModelData *arg0, HsfObject *arg1) {
|
|||
var_r31 = &arg1->data.curr;
|
||||
}
|
||||
if (arg0->hsfData->cenvCnt == 0 || hookIdx != -1) {
|
||||
PSMTXScale(sp8, var_r31->scale.x, var_r31->scale.y, var_r31->scale.z);
|
||||
MTXScale(sp8, var_r31->scale.x, var_r31->scale.y, var_r31->scale.z);
|
||||
mtxRotCat(sp8, var_r31->rot.x, var_r31->rot.y, var_r31->rot.z);
|
||||
mtxTransCat(sp8, var_r31->pos.x, var_r31->pos.y, var_r31->pos.z);
|
||||
PSMTXConcat(MTXBuf[MTXIdx - 1], sp8, MTXBuf[MTXIdx]);
|
||||
MTXConcat(MTXBuf[MTXIdx - 1], sp8, MTXBuf[MTXIdx]);
|
||||
}
|
||||
temp_r28 = &scaleBuf[MTXIdx];
|
||||
temp_r27 = temp_r28 - 1;
|
||||
|
|
@ -1970,10 +1970,10 @@ static void objMap(ModelData *arg0, HsfObject *arg1) {
|
|||
} else {
|
||||
var_r31 = &arg1->data.curr;
|
||||
}
|
||||
PSMTXScale(spC, var_r31->scale.x, var_r31->scale.y, var_r31->scale.z);
|
||||
MTXScale(spC, var_r31->scale.x, var_r31->scale.y, var_r31->scale.z);
|
||||
mtxRotCat(spC, var_r31->rot.x, var_r31->rot.y, var_r31->rot.z);
|
||||
mtxTransCat(spC, var_r31->pos.x, var_r31->pos.y, var_r31->pos.z);
|
||||
PSMTXConcat(MTXBuf[MTXIdx - 1], spC, MTXBuf[MTXIdx]);
|
||||
MTXConcat(MTXBuf[MTXIdx - 1], spC, MTXBuf[MTXIdx]);
|
||||
temp_r30 = &scaleBuf[MTXIdx];
|
||||
temp_r29 = temp_r30 - 1;
|
||||
temp_r30->x = temp_r29->x * var_r31->scale.x;
|
||||
|
|
@ -2004,10 +2004,10 @@ static void objReplica(ModelData *arg0, HsfObject *arg1) {
|
|||
var_r31 = &arg1->data.curr;
|
||||
}
|
||||
mtxRot(spC, var_r31->rot.x, var_r31->rot.y, var_r31->rot.z);
|
||||
PSMTXScale(sp3C, var_r31->scale.x, var_r31->scale.y, var_r31->scale.z);
|
||||
PSMTXConcat(spC, sp3C, sp3C);
|
||||
MTXScale(sp3C, var_r31->scale.x, var_r31->scale.y, var_r31->scale.z);
|
||||
MTXConcat(spC, sp3C, sp3C);
|
||||
mtxTransCat(sp3C, var_r31->pos.x, var_r31->pos.y, var_r31->pos.z);
|
||||
PSMTXConcat(MTXBuf[MTXIdx - 1], sp3C, MTXBuf[MTXIdx]);
|
||||
MTXConcat(MTXBuf[MTXIdx - 1], sp3C, MTXBuf[MTXIdx]);
|
||||
scaleBuf[MTXIdx].x = var_r31->scale.x * scaleBuf[MTXIdx - 1].x;
|
||||
scaleBuf[MTXIdx].y = var_r31->scale.y * scaleBuf[MTXIdx - 1].y;
|
||||
scaleBuf[MTXIdx].z = var_r31->scale.z * scaleBuf[MTXIdx - 1].z;
|
||||
|
|
@ -2112,13 +2112,13 @@ void Hu3DDrawPost(void) {
|
|||
DLBufStartP = Hu3DObjInfoP->dlBuf;
|
||||
DrawData = Hu3DObjInfoP->drawData;
|
||||
GXLoadPosMtxImm(temp_r28->matrix, GX_PNMTX0);
|
||||
PSMTXInvXpose(temp_r28->matrix, sp120);
|
||||
MTXInvXpose(temp_r28->matrix, sp120);
|
||||
GXLoadNrmMtxImm(sp120, 0);
|
||||
if (Hu3DShadowF != 0 && Hu3DShadowCamBit != 0 && (Hu3DObjInfoP->flags & 8)) {
|
||||
PSMTXInverse(Hu3DCameraMtx, spF0);
|
||||
PSMTXConcat(spF0, temp_r28->matrix, sp120);
|
||||
PSMTXConcat(Hu3DShadowData.unk_68, Hu3DShadowData.unk_38, sp150);
|
||||
PSMTXConcat(sp150, sp120, sp120);
|
||||
MTXInverse(Hu3DCameraMtx, spF0);
|
||||
MTXConcat(spF0, temp_r28->matrix, sp120);
|
||||
MTXConcat(Hu3DShadowData.unk_68, Hu3DShadowData.unk_38, sp150);
|
||||
MTXConcat(sp150, sp120, sp120);
|
||||
GXLoadTexMtxImm(sp120, GX_TEXMTX9, GX_MTX3x4);
|
||||
var_r19 = 1;
|
||||
} else {
|
||||
|
|
@ -2126,13 +2126,13 @@ void Hu3DDrawPost(void) {
|
|||
}
|
||||
if (temp_r28->model->unk_02 != 0) {
|
||||
if (var_r19 == 0) {
|
||||
PSMTXInverse(Hu3DCameraMtx, spF0);
|
||||
MTXInverse(Hu3DCameraMtx, spF0);
|
||||
}
|
||||
for (i = 0, var_r21 = 1; i < 4; i++, var_r21 <<= 1) {
|
||||
if (var_r21 & temp_r28->model->unk_02) {
|
||||
PSMTXConcat(spF0, temp_r28->matrix, sp120);
|
||||
PSMTXConcat(Hu3DProjection[i].unk_68, Hu3DProjection[i].unk_38, sp150);
|
||||
PSMTXConcat(sp150, sp120, sp120);
|
||||
MTXConcat(spF0, temp_r28->matrix, sp120);
|
||||
MTXConcat(Hu3DProjection[i].unk_68, Hu3DProjection[i].unk_38, sp150);
|
||||
MTXConcat(sp150, sp120, sp120);
|
||||
GXLoadTexMtxImm(sp120, texMtxTbl[i + 3], GX_MTX3x4);
|
||||
}
|
||||
}
|
||||
|
|
@ -2142,32 +2142,32 @@ void Hu3DDrawPost(void) {
|
|||
temp_r22 = &Hu3DGlobalLight[temp_r28->model->unk_03];
|
||||
sp30 = temp_r22->unk_28;
|
||||
if (temp_r22->unk_00 & 0x8000) {
|
||||
PSMTXMultVecSR(Hu3DCameraMtx, &sp30, &sp30);
|
||||
MTXMultVecSR(Hu3DCameraMtx, &sp30, &sp30);
|
||||
}
|
||||
temp_f30 = VECDotProduct(&sp30, &sp54);
|
||||
temp_f30 *= 10000.0f;
|
||||
OSf32tos16(&temp_f30, &sp8);
|
||||
if (sp8 == -10000) {
|
||||
PSMTXScale(hiliteMtx, 0.0f, 0.0f, 0.0f);
|
||||
MTXScale(hiliteMtx, 0.0f, 0.0f, 0.0f);
|
||||
} else {
|
||||
C_VECHalfAngle(&sp30, &sp54, &sp3C);
|
||||
sp3C.x = -sp3C.x;
|
||||
sp3C.y = -sp3C.y;
|
||||
sp3C.z = -sp3C.z;
|
||||
PSMTXScale(sp60, 1.0f / temp_r28->scale.x, 1.0f / temp_r28->scale.y, 1.0f / temp_r28->scale.z);
|
||||
PSMTXConcat(temp_r28->matrix, sp60, spC0);
|
||||
MTXScale(sp60, 1.0f / temp_r28->scale.x, 1.0f / temp_r28->scale.y, 1.0f / temp_r28->scale.z);
|
||||
MTXConcat(temp_r28->matrix, sp60, spC0);
|
||||
spC0[0][3] = spC0[1][3] = spC0[2][3] = 0.0f;
|
||||
PSMTXInvXpose(spC0, sp90);
|
||||
MTXInvXpose(spC0, sp90);
|
||||
if (sp8 == 10000) {
|
||||
PSMTXIdentity(spC0);
|
||||
MTXIdentity(spC0);
|
||||
} else {
|
||||
VECCrossProduct(&sp3C, &sp54, &sp48);
|
||||
temp_f28 = acosf(VECDotProduct(&sp54, &sp3C));
|
||||
PSMTXRotAxisRad(spC0, &sp48, temp_f28);
|
||||
MTXRotAxisRad(spC0, &sp48, temp_f28);
|
||||
}
|
||||
PSMTXConcat(spC0, sp90, sp60);
|
||||
PSMTXTrans(spC0, 0.5f, 0.5f, 0.0f);
|
||||
PSMTXConcat(spC0, sp60, hiliteMtx);
|
||||
MTXConcat(spC0, sp90, sp60);
|
||||
MTXTrans(spC0, 0.5f, 0.5f, 0.0f);
|
||||
MTXConcat(spC0, sp60, hiliteMtx);
|
||||
}
|
||||
}
|
||||
temp_r24 = temp_r28->object->data.face;
|
||||
|
|
@ -2250,14 +2250,14 @@ static void ObjDraw(HsfDrawObject *arg0) {
|
|||
DLBufStartP = Hu3DObjInfoP->dlBuf;
|
||||
DrawData = Hu3DObjInfoP->drawData;
|
||||
GXLoadPosMtxImm(arg0->matrix, GX_PNMTX0);
|
||||
PSMTXInvXpose(arg0->matrix, sp110);
|
||||
MTXInvXpose(arg0->matrix, sp110);
|
||||
GXLoadNrmMtxImm(sp110, 0);
|
||||
GXInvalidateVtxCache();
|
||||
if (Hu3DShadowF != 0 && Hu3DShadowCamBit != 0 && (Hu3DObjInfoP->flags & 8)) {
|
||||
PSMTXInverse(Hu3DCameraMtx, spE0);
|
||||
PSMTXConcat(spE0, arg0->matrix, sp110);
|
||||
PSMTXConcat(Hu3DShadowData.unk_68, Hu3DShadowData.unk_38, sp140);
|
||||
PSMTXConcat(sp140, sp110, sp110);
|
||||
MTXInverse(Hu3DCameraMtx, spE0);
|
||||
MTXConcat(spE0, arg0->matrix, sp110);
|
||||
MTXConcat(Hu3DShadowData.unk_68, Hu3DShadowData.unk_38, sp140);
|
||||
MTXConcat(sp140, sp110, sp110);
|
||||
GXLoadTexMtxImm(sp110, GX_TEXMTX9, GX_MTX3x4);
|
||||
var_r22 = 1;
|
||||
} else {
|
||||
|
|
@ -2265,13 +2265,13 @@ static void ObjDraw(HsfDrawObject *arg0) {
|
|||
}
|
||||
if (arg0->model->unk_02 != 0) {
|
||||
if (var_r22 == 0) {
|
||||
PSMTXInverse(Hu3DCameraMtx, spE0);
|
||||
MTXInverse(Hu3DCameraMtx, spE0);
|
||||
}
|
||||
for (i = 0, var_r23 = 1; i < 4; i++, var_r23 <<= 1) {
|
||||
if (var_r23 & arg0->model->unk_02) {
|
||||
PSMTXConcat(spE0, arg0->matrix, sp110);
|
||||
PSMTXConcat(Hu3DProjection[i].unk_68, Hu3DProjection[i].unk_38, sp140);
|
||||
PSMTXConcat(sp140, sp110, sp110);
|
||||
MTXConcat(spE0, arg0->matrix, sp110);
|
||||
MTXConcat(Hu3DProjection[i].unk_68, Hu3DProjection[i].unk_38, sp140);
|
||||
MTXConcat(sp140, sp110, sp110);
|
||||
GXLoadTexMtxImm(sp110, texMtxTbl[i + 3], GX_MTX3x4);
|
||||
}
|
||||
}
|
||||
|
|
@ -2281,32 +2281,32 @@ static void ObjDraw(HsfDrawObject *arg0) {
|
|||
temp_r24 = &Hu3DGlobalLight[arg0->model->unk_03];
|
||||
sp20 = temp_r24->unk_28;
|
||||
if (temp_r24->unk_00 & 0x8000) {
|
||||
PSMTXMultVecSR(Hu3DCameraMtx, &sp20, &sp20);
|
||||
MTXMultVecSR(Hu3DCameraMtx, &sp20, &sp20);
|
||||
}
|
||||
temp_f30 = VECDotProduct(&sp20, &sp44);
|
||||
temp_f30 *= 10000.0f;
|
||||
OSf32tos16(&temp_f30, &var_r21);
|
||||
if (var_r21 == -10000) {
|
||||
PSMTXScale(hiliteMtx, 0.0f, 0.0f, 0.0f);
|
||||
MTXScale(hiliteMtx, 0.0f, 0.0f, 0.0f);
|
||||
} else {
|
||||
C_VECHalfAngle(&sp20, &sp44, &sp2C);
|
||||
sp2C.x = -sp2C.x;
|
||||
sp2C.y = -sp2C.y;
|
||||
sp2C.z = -sp2C.z;
|
||||
PSMTXScale(sp50, 1.0f / arg0->scale.x, 1.0f / arg0->scale.y, 1.0f / arg0->scale.z);
|
||||
PSMTXConcat(arg0->matrix, sp50, spB0);
|
||||
MTXScale(sp50, 1.0f / arg0->scale.x, 1.0f / arg0->scale.y, 1.0f / arg0->scale.z);
|
||||
MTXConcat(arg0->matrix, sp50, spB0);
|
||||
spB0[0][3] = spB0[1][3] = spB0[2][3] = 0.0f;
|
||||
PSMTXInvXpose(spB0, sp80);
|
||||
MTXInvXpose(spB0, sp80);
|
||||
if (var_r21 == 10000) {
|
||||
PSMTXIdentity(spB0);
|
||||
MTXIdentity(spB0);
|
||||
} else {
|
||||
VECCrossProduct(&sp2C, &sp44, &sp38);
|
||||
temp_f29 = acosf(VECDotProduct(&sp44, &sp2C));
|
||||
PSMTXRotAxisRad(spB0, &sp38, temp_f29);
|
||||
MTXRotAxisRad(spB0, &sp38, temp_f29);
|
||||
}
|
||||
PSMTXConcat(spB0, sp80, sp50);
|
||||
PSMTXTrans(spB0, 0.5f, 0.5f, 0.0f);
|
||||
PSMTXConcat(spB0, sp50, hiliteMtx);
|
||||
MTXConcat(spB0, sp80, sp50);
|
||||
MTXTrans(spB0, 0.5f, 0.5f, 0.0f);
|
||||
MTXConcat(spB0, sp50, hiliteMtx);
|
||||
}
|
||||
}
|
||||
temp_r26 = arg0->object->data.face;
|
||||
|
|
@ -2857,16 +2857,16 @@ void mtxRotCat(Mtx arg0, float arg1, float arg2, float arg3) {
|
|||
Mtx sp8;
|
||||
|
||||
if (arg1 != 0.0f) {
|
||||
PSMTXRotRad(sp8, 'X', MTXDegToRad(arg1));
|
||||
PSMTXConcat(sp8, arg0, arg0);
|
||||
MTXRotRad(sp8, 'X', MTXDegToRad(arg1));
|
||||
MTXConcat(sp8, arg0, arg0);
|
||||
}
|
||||
if (arg2 != 0.0f) {
|
||||
PSMTXRotRad(sp8, 'Y', MTXDegToRad(arg2));
|
||||
PSMTXConcat(sp8, arg0, arg0);
|
||||
MTXRotRad(sp8, 'Y', MTXDegToRad(arg2));
|
||||
MTXConcat(sp8, arg0, arg0);
|
||||
}
|
||||
if (arg3 != 0.0f) {
|
||||
PSMTXRotRad(sp8, 'Z', MTXDegToRad(arg3));
|
||||
PSMTXConcat(sp8, arg0, arg0);
|
||||
MTXRotRad(sp8, 'Z', MTXDegToRad(arg3));
|
||||
MTXConcat(sp8, arg0, arg0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2875,17 +2875,17 @@ void mtxRot(Mtx arg0, float arg1, float arg2, float arg3) {
|
|||
Mtx sp8;
|
||||
|
||||
if (arg1 != 0.0f) {
|
||||
PSMTXRotRad(arg0, 'X', MTXDegToRad(arg1));
|
||||
MTXRotRad(arg0, 'X', MTXDegToRad(arg1));
|
||||
} else {
|
||||
PSMTXIdentity(arg0);
|
||||
MTXIdentity(arg0);
|
||||
}
|
||||
if (arg2 != 0.0f) {
|
||||
PSMTXRotRad(sp38, 'Y', MTXDegToRad(arg2));
|
||||
PSMTXConcat(sp38, arg0, arg0);
|
||||
MTXRotRad(sp38, 'Y', MTXDegToRad(arg2));
|
||||
MTXConcat(sp38, arg0, arg0);
|
||||
}
|
||||
if (arg3 != 0.0f) {
|
||||
PSMTXRotRad(sp8, 'Z', MTXDegToRad(arg3));
|
||||
PSMTXConcat(sp8, arg0, arg0);
|
||||
MTXRotRad(sp8, 'Z', MTXDegToRad(arg3));
|
||||
MTXConcat(sp8, arg0, arg0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2980,8 +2980,8 @@ void Hu3DModelObjMtxGet(s16 arg0, char *arg1, Mtx arg2) {
|
|||
temp_r31 = &Hu3DData[arg0];
|
||||
temp_r30 = temp_r31->hsfData;
|
||||
mtxRot(sp70, temp_r31->rot.x, temp_r31->rot.y, temp_r31->rot.z);
|
||||
PSMTXScale(spA0, temp_r31->scale.x, temp_r31->scale.y, temp_r31->scale.z);
|
||||
PSMTXConcat(sp70, spA0, MTXBuf[0]);
|
||||
MTXScale(spA0, temp_r31->scale.x, temp_r31->scale.y, temp_r31->scale.z);
|
||||
MTXConcat(sp70, spA0, MTXBuf[0]);
|
||||
mtxTransCat(MTXBuf[0], temp_r31->pos.x, temp_r31->pos.y, temp_r31->pos.z);
|
||||
PGMaxPos.x = PGMaxPos.y = PGMaxPos.z = -1000000.0f;
|
||||
PGMinPos.x = PGMinPos.y = PGMinPos.z = 1000000.0f;
|
||||
|
|
@ -2997,10 +2997,10 @@ void Hu3DModelObjMtxGet(s16 arg0, char *arg1, Mtx arg2) {
|
|||
attachMotionF = 0;
|
||||
}
|
||||
PGObjCall(temp_r31, temp_r30->root);
|
||||
PSMTXCopy(MTXBuf[MTXIdx - 1], arg2);
|
||||
MTXCopy(MTXBuf[MTXIdx - 1], arg2);
|
||||
if (PGFinishF == 0 && *PGName != 0) {
|
||||
OSReport("Error: Not Found %s for ObjPosGet\n", arg1);
|
||||
PSMTXIdentity(MTXBuf[MTXIdx]);
|
||||
MTXIdentity(MTXBuf[MTXIdx]);
|
||||
}
|
||||
HuMemDirectFree(PGName);
|
||||
}
|
||||
|
|
@ -3042,10 +3042,10 @@ void PGObjCalc(ModelData *arg0, HsfObject *arg1) {
|
|||
var_r30 = &arg1->data.curr;
|
||||
}
|
||||
mtxRot(spA4, var_r30->rot.x, var_r30->rot.y, var_r30->rot.z);
|
||||
PSMTXScale(spD4, var_r30->scale.x, var_r30->scale.y, var_r30->scale.z);
|
||||
PSMTXConcat(spA4, spD4, spD4);
|
||||
MTXScale(spD4, var_r30->scale.x, var_r30->scale.y, var_r30->scale.z);
|
||||
MTXConcat(spA4, spD4, spD4);
|
||||
mtxTransCat(spD4, var_r30->pos.x, var_r30->pos.y, var_r30->pos.z);
|
||||
PSMTXConcat(MTXBuf[MTXIdx - 1], spD4, MTXBuf[MTXIdx]);
|
||||
MTXConcat(MTXBuf[MTXIdx - 1], spD4, MTXBuf[MTXIdx]);
|
||||
MTXIdx++;
|
||||
var_r24 = 1;
|
||||
} else {
|
||||
|
|
@ -3068,11 +3068,11 @@ void PGObjCalc(ModelData *arg0, HsfObject *arg1) {
|
|||
}
|
||||
temp_r22 = hookIdx;
|
||||
hookIdx = temp_r28->hook;
|
||||
PSMTXScale(spD4, temp_r31->scale.x, temp_r31->scale.y, temp_r31->scale.z);
|
||||
MTXScale(spD4, temp_r31->scale.x, temp_r31->scale.y, temp_r31->scale.z);
|
||||
mtxRotCat(spD4, temp_r31->rot.x, temp_r31->rot.y, temp_r31->rot.z);
|
||||
mtxTransCat(spD4, temp_r31->pos.x, temp_r31->pos.y, temp_r31->pos.z);
|
||||
PSMTXConcat(spD4, temp_r31->unk_F0, spD4);
|
||||
PSMTXConcat(MTXBuf[MTXIdx - 1], spD4, MTXBuf[MTXIdx]);
|
||||
MTXConcat(spD4, temp_r31->unk_F0, spD4);
|
||||
MTXConcat(MTXBuf[MTXIdx - 1], spD4, MTXBuf[MTXIdx]);
|
||||
MTXIdx++;
|
||||
PGObjCall(temp_r31, temp_r31->hsfData->root);
|
||||
MTXIdx--;
|
||||
|
|
@ -3082,7 +3082,7 @@ void PGObjCalc(ModelData *arg0, HsfObject *arg1) {
|
|||
}
|
||||
if (*PGName == 0 && arg1->type == 2) {
|
||||
var_r23 = arg1;
|
||||
PSMTXMultVec(MTXBuf[MTXIdx - 1], (Vec*) &var_r23->data.mesh.min, &sp8);
|
||||
MTXMultVec(MTXBuf[MTXIdx - 1], (Vec*) &var_r23->data.mesh.min, &sp8);
|
||||
if (sp8.x < PGMinPos.x) {
|
||||
PGMinPos.x = sp8.x;
|
||||
}
|
||||
|
|
@ -3101,7 +3101,7 @@ void PGObjCalc(ModelData *arg0, HsfObject *arg1) {
|
|||
if (sp8.z > PGMaxPos.z) {
|
||||
PGMaxPos.z = sp8.z;
|
||||
}
|
||||
PSMTXMultVec(MTXBuf[MTXIdx - 1], (Vec*) &var_r23->data.mesh.max, &sp8);
|
||||
MTXMultVec(MTXBuf[MTXIdx - 1], (Vec*) &var_r23->data.mesh.max, &sp8);
|
||||
if (sp8.x < PGMinPos.x) {
|
||||
PGMinPos.x = sp8.x;
|
||||
}
|
||||
|
|
@ -3143,10 +3143,10 @@ void PGObjReplica(ModelData *arg0, HsfObject *arg1) {
|
|||
var_r31 = &arg1->data.curr;
|
||||
}
|
||||
mtxRot(sp188, var_r31->rot.x, var_r31->rot.y, var_r31->rot.z);
|
||||
PSMTXScale(sp1B8, var_r31->scale.x, var_r31->scale.y, var_r31->scale.z);
|
||||
PSMTXConcat(sp188, sp1B8, sp1B8);
|
||||
MTXScale(sp1B8, var_r31->scale.x, var_r31->scale.y, var_r31->scale.z);
|
||||
MTXConcat(sp188, sp1B8, sp1B8);
|
||||
mtxTransCat(sp1B8, var_r31->pos.x, var_r31->pos.y, var_r31->pos.z);
|
||||
PSMTXConcat(MTXBuf[MTXIdx - 1], sp1B8, MTXBuf[MTXIdx]);
|
||||
MTXConcat(MTXBuf[MTXIdx - 1], sp1B8, MTXBuf[MTXIdx]);
|
||||
MTXIdx++;
|
||||
CancelTRXF = 1;
|
||||
PGObjCall(arg0, arg1->data.replica);
|
||||
|
|
@ -3208,7 +3208,7 @@ void Hu3DModelObjDraw(s16 arg0, char *arg1, Mtx arg2) {
|
|||
sp14.model = &Hu3DData[arg0];
|
||||
sp14.object = temp_r3 = Hu3DModelObjPtrGet(arg0, arg1);
|
||||
sp10 = temp_r3->constData;
|
||||
PSMTXCopy(arg2, sp14.matrix);
|
||||
MTXCopy(arg2, sp14.matrix);
|
||||
sp14.scale.x = sp14.scale.y = sp14.scale.z = 1.0f;
|
||||
ObjDraw(&sp14);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -441,8 +441,8 @@ void Hu3D2Dto3D(Vec *arg0, s16 arg1, Vec *arg2) {
|
|||
arg2->y = -(temp_f27 - 0.5) * temp_f31;
|
||||
arg2->z = -arg0->z;
|
||||
C_MTXLookAt(spC, &temp_r31->pos, &temp_r31->up, &temp_r31->target);
|
||||
PSMTXInverse(spC, spC);
|
||||
PSMTXMultVec(spC, arg2, arg2);
|
||||
MTXInverse(spC, spC);
|
||||
MTXMultVec(spC, arg2, arg2);
|
||||
}
|
||||
|
||||
void Hu3D3Dto2D(Vec *arg0, s16 arg1, Vec *arg2) {
|
||||
|
|
@ -460,7 +460,7 @@ void Hu3D3Dto2D(Vec *arg0, s16 arg1, Vec *arg2) {
|
|||
}
|
||||
temp_r31 = &Hu3DCamera[i];
|
||||
C_MTXLookAt(sp1C, &temp_r31->pos, &temp_r31->up, &temp_r31->target);
|
||||
PSMTXMultVec(sp1C, arg0, &sp10);
|
||||
MTXMultVec(sp1C, arg0, &sp10);
|
||||
temp_f31 = (sind(temp_r31->fov / 2) / cosd(temp_r31->fov / 2)) * sp10.z * HU_DISP_ASPECT;
|
||||
temp_f30 = (sind(temp_r31->fov / 2) / cosd(temp_r31->fov / 2)) * sp10.z;
|
||||
arg2->x = DISP_HALF_W + sp10.x * (DISP_HALF_W / -temp_f31);
|
||||
|
|
|
|||
|
|
@ -181,14 +181,14 @@ void Hu3DExec(void) {
|
|||
for (j = 0; j < 8; j++) {
|
||||
if (layerHook[j] != 0) {
|
||||
Hu3DCameraSet(Hu3DCameraNo, Hu3DCameraMtx);
|
||||
PSMTXInvXpose(Hu3DCameraMtx, Hu3DCameraMtxXPose);
|
||||
MTXInvXpose(Hu3DCameraMtx, Hu3DCameraMtxXPose);
|
||||
temp = layerHook[j];
|
||||
temp(j);
|
||||
}
|
||||
if (layerNum[j] != 0) {
|
||||
Hu3DDrawPreInit();
|
||||
Hu3DCameraSet(Hu3DCameraNo, Hu3DCameraMtx);
|
||||
PSMTXInvXpose(Hu3DCameraMtx, Hu3DCameraMtxXPose);
|
||||
MTXInvXpose(Hu3DCameraMtx, Hu3DCameraMtxXPose);
|
||||
data = Hu3DData;
|
||||
for (i = 0, var_r23 = i; i < HU3D_MODEL_MAX; i++, data++) {
|
||||
if (data->hsfData != 0) {
|
||||
|
|
@ -250,8 +250,8 @@ void Hu3DExec(void) {
|
|||
mtxRot(sp40, data->rot.x, data->rot.y, data->rot.z);
|
||||
mtxScaleCat(sp40, data->scale.x, data->scale.y, data->scale.z);
|
||||
mtxTransCat(sp40, data->pos.x, data->pos.y, data->pos.z);
|
||||
PSMTXConcat(Hu3DCameraMtx, sp40, sp10);
|
||||
PSMTXConcat(sp10, data->unk_F0, sp10);
|
||||
MTXConcat(Hu3DCameraMtx, sp40, sp10);
|
||||
MTXConcat(sp10, data->unk_F0, sp10);
|
||||
Hu3DDraw(data, sp10, &data->scale);
|
||||
}
|
||||
data->unk_00++;
|
||||
|
|
@ -396,7 +396,7 @@ s16 Hu3DModelCreate(void *arg0) {
|
|||
}
|
||||
var_r31->unk_01 = 0;
|
||||
var_r31->unk_00 = (u8) var_r30;
|
||||
PSMTXIdentity(var_r31->unk_F0);
|
||||
MTXIdentity(var_r31->unk_F0);
|
||||
layerNum[0] += 1;
|
||||
HuMemDCFlush(HEAP_DATA);
|
||||
if ((var_r31->hsfData->sceneCnt != 0) && ((var_r31->hsfData->scene->start) || (var_r31->hsfData->scene->end))) {
|
||||
|
|
@ -471,7 +471,7 @@ s16 Hu3DModelLink(s16 arg0) {
|
|||
var_r31->unk_38[i] = -1;
|
||||
}
|
||||
var_r31->unk_01 = 0;
|
||||
PSMTXIdentity(var_r31->unk_F0);
|
||||
MTXIdentity(var_r31->unk_F0);
|
||||
layerNum[0] += 1;
|
||||
return var_r28;
|
||||
}
|
||||
|
|
@ -519,7 +519,7 @@ s16 Hu3DHookFuncCreate(ModelHookFunc hook) {
|
|||
var_r31->unk_38[i] = -1;
|
||||
}
|
||||
var_r31->unk_01 = 0;
|
||||
PSMTXIdentity(var_r31->unk_F0);
|
||||
MTXIdentity(var_r31->unk_F0);
|
||||
layerNum[0] += 1;
|
||||
return var_r29;
|
||||
}
|
||||
|
|
@ -1828,8 +1828,8 @@ void lightSet(LightData* arg0, s16 arg1, Mtx *arg2, Mtx *arg3, f32 arg8) {
|
|||
break;
|
||||
}
|
||||
if ((arg0->unk_00 & 0x8000) != 0) {
|
||||
PSMTXMultVec(*arg2, &arg0->unk_28, &sp24);
|
||||
PSMTXMultVec(*arg3, &arg0->unk_1C, &sp18);
|
||||
MTXMultVec(*arg2, &arg0->unk_28, &sp24);
|
||||
MTXMultVec(*arg3, &arg0->unk_1C, &sp18);
|
||||
GXInitLightPos(&sp30, sp18.x, sp18.y, sp18.z);
|
||||
} else {
|
||||
GXInitLightPos(&sp30, arg0->unk_1C.x, arg0->unk_1C.y, arg0->unk_1C.z);
|
||||
|
|
@ -1937,7 +1937,7 @@ void Hu3DShadowExec(void) {
|
|||
test = Hu3DShadowData.unk_02 * Hu3DShadowData.unk_02;
|
||||
}
|
||||
C_MTXLookAt(Hu3DCameraMtx, &Hu3DShadowData.unk_14, &Hu3DShadowData.unk_2C, &Hu3DShadowData.unk_20);
|
||||
PSMTXCopy(Hu3DCameraMtx, Hu3DShadowData.unk_38);
|
||||
MTXCopy(Hu3DCameraMtx, Hu3DShadowData.unk_38);
|
||||
var_r31 = Hu3DData;
|
||||
shadowModelDrawF = 1;
|
||||
GXInvalidateTexAll();
|
||||
|
|
@ -1984,11 +1984,11 @@ void Hu3DShadowExec(void) {
|
|||
var_r31->attr |= HU3D_ATTR_MOT_EXEC;
|
||||
}
|
||||
mtxRot(sp58, var_r31->rot.x, var_r31->rot.y, var_r31->rot.z);
|
||||
PSMTXScale(spB8, var_r31->scale.x, var_r31->scale.y, var_r31->scale.z);
|
||||
PSMTXConcat(sp58, spB8, spB8);
|
||||
MTXScale(spB8, var_r31->scale.x, var_r31->scale.y, var_r31->scale.z);
|
||||
MTXConcat(sp58, spB8, spB8);
|
||||
mtxTransCat(spB8, var_r31->pos.x, var_r31->pos.y, var_r31->pos.z);
|
||||
PSMTXConcat(Hu3DCameraMtx, spB8, sp88);
|
||||
PSMTXConcat(sp88, var_r31->unk_F0, sp88);
|
||||
MTXConcat(Hu3DCameraMtx, spB8, sp88);
|
||||
MTXConcat(sp88, var_r31->unk_F0, sp88);
|
||||
Hu3DDraw(var_r31, sp88, &var_r31->scale);
|
||||
}
|
||||
}
|
||||
|
|
@ -2018,7 +2018,7 @@ void Hu3DShadowExec(void) {
|
|||
GXSetTevAlphaIn(GX_TEVSTAGE0, GX_CA_ZERO, GX_CA_ZERO, GX_CA_ZERO, GX_CA_KONST);
|
||||
GXSetTevAlphaOp(GX_TEVSTAGE0, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, 1U, GX_TEVPREV);
|
||||
GXSetNumChans(0);
|
||||
PSMTXIdentity(sp88);
|
||||
MTXIdentity(sp88);
|
||||
GXLoadPosMtxImm(sp88, 0);
|
||||
GXSetZMode(0, GX_ALWAYS, 1);
|
||||
GXSetNumChans(1);
|
||||
|
|
|
|||
|
|
@ -843,7 +843,11 @@ void Hu3DSubMotionExec(s16 arg0) {
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef __MWERKS__
|
||||
__declspec(weak) float *GetObjTRXPtr(HsfObject *arg0, u16 arg1) {
|
||||
#else
|
||||
float *GetObjTRXPtr(HsfObject *arg0, u16 arg1) {
|
||||
#endif
|
||||
HsfConstData *temp_r31 = arg0->constData;
|
||||
|
||||
switch (arg1) {
|
||||
|
|
@ -1234,7 +1238,11 @@ float GetLinear(s32 arg0, float arg1[][2], float arg2) {
|
|||
return arg1[arg0 - 1][1];
|
||||
}
|
||||
|
||||
#ifdef __MWERKS__
|
||||
__declspec(weak) float GetBezier(s32 arg0, HsfTrack *arg1, float arg2) {
|
||||
#else
|
||||
float GetBezier(s32 arg0, HsfTrack *arg1, float arg2) {
|
||||
#endif
|
||||
float temp_f24;
|
||||
float temp_f29;
|
||||
float temp_f28;
|
||||
|
|
|
|||
|
|
@ -94,8 +94,8 @@ void MapWallCheck(float *arg0, float *arg1, HsfMapAttr *arg2) {
|
|||
MTRAdd.x = AddX;
|
||||
MTRAdd.z = AddZ;
|
||||
MTRAdd.y = 0.0f;
|
||||
PSMTXInvXpose(MapMT, sp10);
|
||||
PSMTXMultVec(sp10, &MTRAdd, &MTRAdd);
|
||||
MTXInvXpose(MapMT, sp10);
|
||||
MTXMultVec(sp10, &MTRAdd, &MTRAdd);
|
||||
for (var_r30 = 0; var_r30 < arg2->dataLen;) {
|
||||
temp_r29 = *var_r31;
|
||||
if (temp_r29 & 0x8000) {
|
||||
|
|
@ -142,7 +142,7 @@ float MapPos(float arg0, float arg1, float arg2, float arg3, Vec *arg4) {
|
|||
sp14.x = var_f29;
|
||||
sp14.y = sp10;
|
||||
sp14.z = var_f28;
|
||||
PSMTXMultVec(MapMT, &sp14, &sp14);
|
||||
MTXMultVec(MapMT, &sp14, &sp14);
|
||||
sp10 = sp14.y;
|
||||
if (sp10 > arg1 + arg3 || fabs(arg1 - sp10) > fabs(arg1 - var_f31)) {
|
||||
continue;
|
||||
|
|
@ -151,8 +151,8 @@ float MapPos(float arg0, float arg1, float arg2, float arg3, Vec *arg4) {
|
|||
arg4->x = FieldVec.x;
|
||||
arg4->y = FieldVec.y;
|
||||
arg4->z = FieldVec.z;
|
||||
PSMTXInvXpose(MapMT, sp20);
|
||||
PSMTXMultVec(sp20, arg4, arg4);
|
||||
MTXInvXpose(MapMT, sp20);
|
||||
MTXMultVec(sp20, arg4, arg4);
|
||||
var_f31 = sp14.y;
|
||||
}
|
||||
}
|
||||
|
|
@ -205,7 +205,7 @@ BOOL PolygonRangeCheck(HsfMapAttr *arg0, float arg1, float arg2, float *arg3, fl
|
|||
sp20.x = arg1;
|
||||
sp20.y = temp_f29;
|
||||
sp20.z = arg2;
|
||||
PSMTXMultVec(MapMT, &sp20, &sp20);
|
||||
MTXMultVec(MapMT, &sp20, &sp20);
|
||||
if (arg4 > sp20.y && var_f27 > fabs(arg4 - sp20.y)) {
|
||||
var_f27 = fabs(arg4 - sp20.y);
|
||||
*arg3 = temp_f29;
|
||||
|
|
@ -224,7 +224,7 @@ BOOL PolygonRangeCheck(HsfMapAttr *arg0, float arg1, float arg2, float *arg3, fl
|
|||
sp20.x = arg1;
|
||||
sp20.y = temp_f29;
|
||||
sp20.z = arg2;
|
||||
PSMTXMultVec(MapMT, &sp20, &sp20);
|
||||
MTXMultVec(MapMT, &sp20, &sp20);
|
||||
if (arg4 > sp20.y) {
|
||||
if (var_f27 > fabs(arg4 - sp20.y)) {
|
||||
var_f27 = fabs(arg4 - sp20.y);
|
||||
|
|
@ -711,7 +711,7 @@ static BOOL GetPolygonCircleMtx(s16 *arg0, Vec *arg1, float *arg2, float *arg3)
|
|||
spD0[0] = arg2[0] + AddX;
|
||||
spD0[1] = arg2[1];
|
||||
spD0[2] = arg2[2] + AddZ;
|
||||
PSMTXMultVec(MapMT, &spC4, &spC4);
|
||||
MTXMultVec(MapMT, &spC4, &spC4);
|
||||
DefSetHitFace(spC4.x, spC4.y, spC4.z);
|
||||
temp_r29 = &HitFaceVec[HitFaceCount];
|
||||
MapspaceInlineFunc01(temp_r29, &arg1[arg0[0]], &arg1[arg0[1]], &arg1[arg0[2]]);
|
||||
|
|
@ -724,7 +724,7 @@ static BOOL GetPolygonCircleMtx(s16 *arg0, Vec *arg1, float *arg2, float *arg3)
|
|||
spE0[0] = OldXYZ.x;
|
||||
spE0[1] = OldXYZ.y;
|
||||
spE0[2] = OldXYZ.z;
|
||||
PSMTXMultVec(MapMTR, (Vec*) &spE0, (Vec*) &spE0);
|
||||
MTXMultVec(MapMTR, (Vec*) &spE0, (Vec*) &spE0);
|
||||
if (MapspaceInlineFunc03(spE0, temp_r31, arg1) < 0) {
|
||||
spB8.x = spE0[0] - spD0[0];
|
||||
spB8.y = spE0[1] - spD0[1];
|
||||
|
|
@ -742,8 +742,8 @@ static BOOL GetPolygonCircleMtx(s16 *arg0, Vec *arg1, float *arg2, float *arg3)
|
|||
MTRAdd.x = AddX;
|
||||
MTRAdd.z = AddZ;
|
||||
MTRAdd.y = 0.0f;
|
||||
PSMTXInvXpose(MapMT, spF0);
|
||||
PSMTXMultVec(spF0, &MTRAdd, &MTRAdd);
|
||||
MTXInvXpose(MapMT, spF0);
|
||||
MTXMultVec(spF0, &MTRAdd, &MTRAdd);
|
||||
}
|
||||
}
|
||||
return var_r17;
|
||||
|
|
@ -893,19 +893,19 @@ void AppendAddXZ(float arg0, float arg1, float arg2) {
|
|||
void CharRotInv(Mtx arg0, Mtx arg1, Vec *arg2, omObjData *arg3) {
|
||||
Mtx sp8;
|
||||
|
||||
PSMTXTrans(arg0, arg3->trans.x, arg3->trans.y, arg3->trans.z);
|
||||
MTXTrans(arg0, arg3->trans.x, arg3->trans.y, arg3->trans.z);
|
||||
if (arg3->rot.z) {
|
||||
PSMTXRotRad(sp8, 'z', MTXDegToRad(arg3->rot.z));
|
||||
PSMTXConcat(arg0, sp8, arg0);
|
||||
MTXRotRad(sp8, 'z', MTXDegToRad(arg3->rot.z));
|
||||
MTXConcat(arg0, sp8, arg0);
|
||||
}
|
||||
if (arg3->rot.y) {
|
||||
PSMTXRotRad(sp8, 'y', MTXDegToRad(arg3->rot.y));
|
||||
PSMTXConcat(arg0, sp8, arg0);
|
||||
MTXRotRad(sp8, 'y', MTXDegToRad(arg3->rot.y));
|
||||
MTXConcat(arg0, sp8, arg0);
|
||||
}
|
||||
if (arg3->rot.x) {
|
||||
PSMTXRotRad(sp8, 'x', MTXDegToRad(arg3->rot.x));
|
||||
PSMTXConcat(arg0, sp8, arg0);
|
||||
MTXRotRad(sp8, 'x', MTXDegToRad(arg3->rot.x));
|
||||
MTXConcat(arg0, sp8, arg0);
|
||||
}
|
||||
PSMTXInverse(arg0, arg1);
|
||||
PSMTXMultVec(arg1, arg2, arg2);
|
||||
MTXInverse(arg0, arg1);
|
||||
MTXMultVec(arg1, arg2, arg2);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -241,15 +241,15 @@ static void THPViewSprFunc(HuSprite *arg0)
|
|||
sp8.b = arg0->b;
|
||||
sp8.a = arg0->a;
|
||||
if (arg0->z_rot != 0.0f) {
|
||||
PSMTXRotAxisRad(sp18, &spC, MTXDegToRad(arg0->z_rot));
|
||||
PSMTXScale(sp48, arg0->scale_x, arg0->scale_y, 1.0f);
|
||||
PSMTXConcat(sp18, sp48, sp48);
|
||||
MTXRotAxisRad(sp18, &spC, MTXDegToRad(arg0->z_rot));
|
||||
MTXScale(sp48, arg0->scale_x, arg0->scale_y, 1.0f);
|
||||
MTXConcat(sp18, sp48, sp48);
|
||||
}
|
||||
else {
|
||||
PSMTXScale(sp48, arg0->scale_x, arg0->scale_y, 1.0f);
|
||||
MTXScale(sp48, arg0->scale_x, arg0->scale_y, 1.0f);
|
||||
}
|
||||
mtxTransCat(sp48, arg0->x, arg0->y, 0.0f);
|
||||
PSMTXConcat(*arg0->group_mtx, sp48, sp48);
|
||||
MTXConcat(*arg0->group_mtx, sp48, sp48);
|
||||
temp_r30 = -((s32)audioTrack.unk00 / 2);
|
||||
temp_r29 = -((s32)audioTrack.unk04 / 2);
|
||||
GXSetZMode(GX_FALSE, GX_ALWAYS, GX_FALSE);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue