mirror of
https://github.com/pret/pokestadium.git
synced 2026-09-28 04:47:08 -05:00
Match func_80032BD4, func_80032D28, func_80032E00, func_80032F94`
170 function left
This commit is contained in:
140
src/334D0.c
140
src/334D0.c
@@ -21,14 +21,15 @@ typedef struct unk_D_800B2EA8 {
|
||||
u8 unk_00[0xA8];
|
||||
} unk_D_800B2EA8; // size = 0xA8
|
||||
|
||||
extern StadiumModelSlot D_800AFFC8[2][3];
|
||||
typedef struct {
|
||||
MtxF mtx[16]; // 16 (0x10) × 0x40 = 0x400
|
||||
} MtxBuffer; // size = 0x400
|
||||
|
||||
extern s32 D_80076270[16];
|
||||
extern Gfx D_800762B0[6];
|
||||
extern Gfx D_800762C8[];
|
||||
extern u32 D_800777A8[];
|
||||
extern u32 D_80077950[];
|
||||
extern MtxF D_800AF7C8[32];
|
||||
extern unk_D_800B2EA8 D_800B2EA8[1];
|
||||
|
||||
// extern Gfx D_800762C8[] = {
|
||||
// gsSPSetGeometryMode(0x00FDFFFF),
|
||||
@@ -43,6 +44,11 @@ extern unk_D_800B2EA8 D_800B2EA8[1];
|
||||
// gsSPEndDisplayList(),
|
||||
// };
|
||||
|
||||
extern s16 D_800AF7C0[4];
|
||||
extern MtxBuffer D_800AF7C8[2];
|
||||
extern StadiumModelSlot D_800AFFC8[2][3];
|
||||
extern unk_D_800B2EA8 D_800B2EA8[1];
|
||||
|
||||
void func_800328D0(s32 arg0) {
|
||||
|
||||
}
|
||||
@@ -52,15 +58,15 @@ s32 func_800328D8(UNUSED s32 arg0) {
|
||||
}
|
||||
|
||||
void func_800328E4(u8 arg0) {
|
||||
func_8000ED4C((MtxF*)((u8*)D_800AF7C8 + (arg0 << 10)), func_800123D4(0));
|
||||
func_8000ED4C((MtxF*)((u8*)(MtxF*)((u8*)D_800AF7C8 + (arg0 << 10)) + 0x40), func_800123D4(-1));
|
||||
func_8000ED4C(D_800AF7C8[arg0].mtx, func_800123D4(0));
|
||||
func_8000ED4C(D_800AF7C8[arg0].mtx[1].mf, func_800123D4(-1));
|
||||
}
|
||||
|
||||
void func_80032940(u8 index) {
|
||||
MtxF* temp_a1;
|
||||
MtxF sp1C;
|
||||
|
||||
temp_a1 = ((MtxF*)((u8*)D_800AF7C8 + (index << 10)));
|
||||
temp_a1 = &D_800AF7C8[index];
|
||||
func_80031EF4(&sp1C, &D_8006F088->unk_60.mtxf);
|
||||
guMtxCatF(sp1C.mf, temp_a1->mf, temp_a1->mf);
|
||||
}
|
||||
@@ -77,7 +83,7 @@ void func_80032990(u8 index) {
|
||||
MtxF sp38;
|
||||
Vec3f sp2C;
|
||||
|
||||
temp_a0 = ((MtxF*)((u8*)D_800AF7C8 + (index << 10)));
|
||||
temp_a0 = &D_800AF7C8[index].mtx;
|
||||
|
||||
func_80032034(temp_a0, &sp2C);
|
||||
guScaleF(sp38.mf, sp2C.x, sp2C.y, sp2C.z);
|
||||
@@ -124,7 +130,6 @@ Gfx* func_80032A7C(Gfx*);
|
||||
#pragma GLOBAL_ASM("asm/us/nonmatchings/334D0/func_80032A7C.s")
|
||||
#endif
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
void func_80032BD4(void) {
|
||||
u8 index;
|
||||
s32 mode;
|
||||
@@ -135,18 +140,15 @@ void func_80032BD4(void) {
|
||||
func_800328E4(index);
|
||||
func_80032990(index);
|
||||
func_80032940(index);
|
||||
|
||||
if (D_8006F09C->unk_01A == 0x92) {
|
||||
func_80033B2C(&D_800AFFC8[D_800AF7B0[index & 1]][index], &D_800B2EA8, &D_800AF7C8[index * 16], &D_80077950);
|
||||
func_80033B2C(&D_800AFFC8[index][D_800AF7B0[index & 1]].model, D_800B2EA8, D_800AF7C8[index].mtx, &D_80077950);
|
||||
return;
|
||||
}
|
||||
func_80033B2C(&D_800AFFC8[D_800AF7B0[index & 1]][index], &D_800B2EA8, &D_800AF7C8[index * 16], &D_800777A8);
|
||||
func_80033B2C(&D_800AFFC8[index][D_800AF7B0[index & 1]].model, D_800B2EA8, D_800AF7C8[index].mtx, &D_800777A8);
|
||||
}
|
||||
}
|
||||
#else
|
||||
#pragma GLOBAL_ASM("asm/us/nonmatchings/334D0/func_80032BD4.s")
|
||||
#endif
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
void func_80032D28(void) {
|
||||
u8 index;
|
||||
s32 mode;
|
||||
@@ -157,22 +159,21 @@ void func_80032D28(void) {
|
||||
func_800328E4(index);
|
||||
func_80032990(index);
|
||||
func_80032940(index);
|
||||
func_800361C4(&D_800AFFC8[D_800AF7B0[index & 1]][index].model, &D_800AF7C8[index << 4]);
|
||||
func_800361C4(&D_800AFFC8[index][D_800AF7B0[index & 1]].model, &D_800AF7C8[index].mtx);
|
||||
}
|
||||
}
|
||||
#else
|
||||
#pragma GLOBAL_ASM("asm/us/nonmatchings/334D0/func_80032D28.s")
|
||||
#endif
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
Gfx* func_80032E00(Gfx* gfx) {
|
||||
ModelSegment* segment;
|
||||
Mtx tempMtx; // Temporary RSP matrix
|
||||
MtxF scaleMtx; // Scale matrix
|
||||
MtxF translateMtx; // Translation matrix
|
||||
MtxF modelMtx; // Matrix for model
|
||||
MtxF tempCatMtx; // Temporary concatenated matrix
|
||||
s32 pad[1];
|
||||
MtxF modelMtx; // sp1E8
|
||||
MtxF tempCatMtx; // sp1A8
|
||||
MtxF sp168;
|
||||
MtxF scaleMtx; // sp128
|
||||
MtxF translateMtx; // spE8
|
||||
Mtx tempMtx; // spA8
|
||||
Mtx* mtxL;
|
||||
u32 pad2[16];
|
||||
Vec3f scale;
|
||||
Vec3f translate;
|
||||
|
||||
@@ -186,8 +187,8 @@ Gfx* func_80032E00(Gfx* gfx) {
|
||||
func_8000ED4C(&tempCatMtx, func_800123D4(0));
|
||||
func_80032034(&tempCatMtx, &scale);
|
||||
guScaleF(&scaleMtx.mf[0], scale.x, scale.y, scale.z);
|
||||
guMtxXFMF(&tempCatMtx.mf[0], 0.0f, 0.0f, 0.0f, &translate.x, &translate.y, &translate.z);
|
||||
guTranslateF(&translateMtx.mf[0], translate.x, translate.y, translate.z);
|
||||
guMtxXFMF(&tempCatMtx.mf[0], 0.0f, 0.0f, 0.0f, &translate.z, &translate.y, &translate.x);
|
||||
guTranslateF(&translateMtx.mf[0], translate.z, translate.y, translate.x);
|
||||
mtxL = func_80005F5C(0x40);
|
||||
guMtxCatF(&scaleMtx.mf[0], &translateMtx.mf[0], &tempCatMtx.mf[0]);
|
||||
guMtxF2L(&tempCatMtx.mf[0], mtxL);
|
||||
@@ -200,71 +201,54 @@ Gfx* func_80032E00(Gfx* gfx) {
|
||||
{ Gfx *_gfx = (Gfx *)(gfx++); _gfx->words.w0 = 0xDE000000; _gfx->words.w1 = &D_800762B0; }
|
||||
return gfx;
|
||||
}
|
||||
#else
|
||||
Gfx* func_80032E00(Gfx*);
|
||||
#pragma GLOBAL_ASM("asm/us/nonmatchings/334D0/func_80032E00.s")
|
||||
#endif
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
Gfx* func_80032F94(Gfx* gfx) {
|
||||
u8 mode;
|
||||
Vtx* vtx;
|
||||
s16 temp_v1_2;
|
||||
s16* temp_v1;
|
||||
s16* var_v1;
|
||||
s32 temp_v0;
|
||||
u8 temp_a3;
|
||||
unk_func_80032F94_a0* temp_a0;
|
||||
Gfx* gfx2;
|
||||
Gfx* gfx3;
|
||||
Gfx* gfx4;
|
||||
|
||||
temp_v0 = func_800325B4();
|
||||
temp_a3 = temp_v0 & 0xFF;
|
||||
if ((temp_v0 == 0xFF) || (temp_v0 == 0xFE)) {
|
||||
|
||||
mode = func_800325B4();
|
||||
if ((mode == 0xFF) || (mode == 0xFE)) {
|
||||
return func_80032E00(gfx);
|
||||
}
|
||||
if (temp_v0 >= 4) {
|
||||
if (mode >= 4) {
|
||||
return gfx;
|
||||
}
|
||||
if (temp_v0 >= 2) {
|
||||
if (D_800AF7C0[temp_v0 & 1] >= 2) {
|
||||
if (mode >= 2) {
|
||||
mode &= 1;
|
||||
if (D_800AF7C0[mode] >= 2) {
|
||||
func_80005F5C(0xA0);
|
||||
gfx2 = func_80032A7C(gfx);
|
||||
temp_v1 = &D_800AF7B0[temp_v0 & 1];
|
||||
temp_a0 = (unk_func_80032F94_a0*)(&D_800AFFC8[*temp_v1][temp_v0 & 1].model + 0x138);
|
||||
{ Gfx *_gfx = (Gfx *)(gfx2++); _gfx->words.w0 = 0xDB060038; _gfx->words.w1 = (s32) temp_a0->unk_18; }
|
||||
{ Gfx *_gfx = (Gfx *)(gfx2++); _gfx->words.w0 = 0xDE000000; _gfx->words.w1 = (s32) temp_a0->unk_1C; }
|
||||
{ Gfx *_gfx = (Gfx *)(gfx2++); _gfx->words.w0 = 0xDE000000; _gfx->words.w1 = &D_800762B0; }
|
||||
gfx = gfx2;
|
||||
*temp_v1 += 1;
|
||||
gfx = func_80032A7C(gfx);
|
||||
var_v1 = &D_800AF7B0[mode & 1];
|
||||
{
|
||||
ModelSegment* segment = (ModelSegment*)(&D_800AFFC8[mode][*var_v1].model.unkSegment);
|
||||
{ Gfx *_gfx = (Gfx *)(gfx++); _gfx->words.w0 = 0xDB060038; _gfx->words.w1 = (s32) segment->vertexSegment; }
|
||||
{ Gfx *_gfx = (Gfx *)(gfx++); _gfx->words.w0 = 0xDE000000; _gfx->words.w1 = (s32) segment->displayList; }
|
||||
{ Gfx *_gfx = (Gfx *)(gfx++); _gfx->words.w0 = 0xDE000000; _gfx->words.w1 = &D_800762B0; }
|
||||
}
|
||||
*var_v1 += 1;
|
||||
}
|
||||
return gfx;
|
||||
}
|
||||
temp_v1_2 = D_800AF7C0[temp_v0];
|
||||
switch (temp_v1_2) { /* irregular */
|
||||
default:
|
||||
var_v1 = &D_800AF7B0[temp_a3 & 1];
|
||||
break;
|
||||
case 1:
|
||||
func_80032BD4();
|
||||
var_v1 = &D_800AF7B0[temp_a3 & 1];
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
vtx = func_80005F5C(0xA0);
|
||||
{ Gfx *_gfx = (Gfx *)(gfx++); _gfx->words.w0 = 0xDA380002; _gfx->words.w1 = &D_80076270; }
|
||||
gfx3 = func_80032A7C(gfx);
|
||||
var_v1 = &D_800AF7B0[temp_a3 & 1];
|
||||
gfx4 = func_800366A4(gfx3, &D_800AFFC8[*var_v1][temp_a3].model, vtx);
|
||||
{ Gfx *_gfx = (Gfx *)(gfx4++); _gfx->words.w0 = 0xD8380002; _gfx->words.w1 = 0x40; }
|
||||
{ Gfx *_gfx = (Gfx *)(gfx4++); _gfx->words.w0 = 0xDE000000; _gfx->words.w1 = &D_800762B0; }
|
||||
gfx = gfx4;
|
||||
break;
|
||||
switch (D_800AF7C0[mode]) {
|
||||
default:
|
||||
var_v1 = &D_800AF7B0[mode & 1];
|
||||
break;
|
||||
case 1:
|
||||
func_80032BD4();
|
||||
var_v1 = &D_800AF7B0[mode & 1];
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
vtx = func_80005F5C(0xA0);
|
||||
{ Gfx *_gfx = (Gfx *)(gfx++); _gfx->words.w0 = 0xDA380002; _gfx->words.w1 = &D_80076270; }
|
||||
gfx = func_80032A7C(gfx);
|
||||
var_v1 = &D_800AF7B0[mode & 1];
|
||||
gfx = func_800366A4(gfx, &D_800AFFC8[mode][*var_v1].model, vtx);
|
||||
{ Gfx *_gfx = (Gfx *)(gfx++); _gfx->words.w0 = 0xD8380002; _gfx->words.w1 = 0x40; }
|
||||
{ Gfx *_gfx = (Gfx *)(gfx++); _gfx->words.w0 = 0xDE000000; _gfx->words.w1 = &D_800762B0; }
|
||||
break;
|
||||
}
|
||||
*var_v1 += 1;
|
||||
return gfx;
|
||||
}
|
||||
#else
|
||||
Gfx* func_80032F94(Gfx*);
|
||||
#pragma GLOBAL_ASM("asm/us/nonmatchings/334D0/func_80032F94.s")
|
||||
#endif
|
||||
|
||||
@@ -97,7 +97,9 @@ typedef struct StadiumModel {
|
||||
/* 0x02 */ s16 unk_02;
|
||||
/* 0x04 */ StadiumTransform transforms[5];
|
||||
/* 0x130 */ u32 modelSegment;
|
||||
/* 0x134 */ s8 pad134[0x24];
|
||||
/* 0x134 */ s8 pad134[0x4];
|
||||
/* 0x138 */ u32 unkSegment;
|
||||
/* 0x13C */ s8 pad13C[0x1C];
|
||||
/* 0x158 */ Vec3f position;
|
||||
/* 0x164 */ s8 pad164[0xC];
|
||||
/* 0x170 */ ModelVertex mvtx;
|
||||
|
||||
Reference in New Issue
Block a user