Finish instdll/main.c
This commit is contained in:
parent
811466d79f
commit
a0b77a412f
6 changed files with 559 additions and 152 deletions
|
|
@ -746,28 +746,433 @@ static void fn_1_2804(void)
|
|||
}
|
||||
}
|
||||
|
||||
static float lbl_1_data_124[] = {
|
||||
420,
|
||||
70,
|
||||
488,
|
||||
186,
|
||||
476,
|
||||
242,
|
||||
400,
|
||||
292
|
||||
};
|
||||
|
||||
s32 fn_1_5EA4(SeqWork *work, char *mess, s16 jp_flag);
|
||||
|
||||
static void fn_1_2FA0(void)
|
||||
{
|
||||
float temp_f31;
|
||||
float temp_f30;
|
||||
float temp_f29;
|
||||
float temp_f28;
|
||||
float temp_f27;
|
||||
s16 temp_r31;
|
||||
s16 temp_r30;
|
||||
char *temp_r29;
|
||||
AnimData *temp_r28;
|
||||
s16 temp_r27;
|
||||
s16 temp_r26;
|
||||
s16 temp_r25;
|
||||
s16 temp_r24;
|
||||
s16 temp_r23;
|
||||
s16 temp_r22;
|
||||
u16 temp_r21;
|
||||
char *temp_r20;
|
||||
s16 temp_r17;
|
||||
s16 spA;
|
||||
s16 sp8;
|
||||
|
||||
s16 spC[2];
|
||||
s16 sp10[4];
|
||||
SeqWork work;
|
||||
temp_r21 = 0;
|
||||
for(temp_r31=0; temp_r31<16; temp_r31++) {
|
||||
work.sprite[temp_r31] = work.spr_grp[temp_r31] = -1;
|
||||
}
|
||||
temp_r20 = MessData_MesPtrGet(messDataPtr, mgInfoTbl[lbl_1_bss_14].name_mess);
|
||||
temp_r29 = temp_r20;
|
||||
temp_r31 = 0;
|
||||
temp_r26 = 0;
|
||||
while(1) {
|
||||
if(*temp_r29 == 0 || *temp_r29 == 10) {
|
||||
if(*temp_r29 == 0) {
|
||||
temp_r31 = 1;
|
||||
}
|
||||
*temp_r29 = 0;
|
||||
fn_1_5EA4(&work, temp_r20, (lbl_1_bss_8 == 0) ? 1 : 0);
|
||||
HuSprGrpPosSet(work.spr_grp[temp_r26], 288.0f, 240.0f);
|
||||
spC[temp_r26] = work.alt_word_len;
|
||||
temp_r26++;
|
||||
if(temp_r31) {
|
||||
break;
|
||||
}
|
||||
temp_r20 = temp_r29+1;
|
||||
}
|
||||
|
||||
temp_r29++;
|
||||
}
|
||||
if(temp_r26 == 1) {
|
||||
temp_r22 = spC[0];
|
||||
temp_r28 = HuSprAnimReadFile(DATA_MAKE_NUM(DATADIR_INST, 18));
|
||||
temp_f29 = ((576.0f-temp_r22)-24.0f)-16.0f+227.0f;
|
||||
temp_f28 = 78;
|
||||
temp_f27 = 0.5f;
|
||||
} else {
|
||||
temp_r22 = (spC[0] > spC[1]) ? spC[0] : spC[1];
|
||||
temp_r28 = HuSprAnimReadFile(DATA_MAKE_NUM(DATADIR_INST, 15));
|
||||
temp_f29 = ((576.0f-temp_r22)-24.0f)-16.0f+172.0f;
|
||||
temp_f28 = 84;
|
||||
temp_f27 = 1.0f;
|
||||
}
|
||||
temp_r25 = HuSprGrpCreate(1);
|
||||
temp_r17 = HuSprCreate(temp_r28, 0, 0);
|
||||
HuSprGrpMemberSet(temp_r25, 0, temp_r17);
|
||||
HuSprPriSet(temp_r25, 0, 100);
|
||||
HuSprGrpPosSet(temp_r25, 10000, 70);
|
||||
HuSprScaleSet(temp_r25, 0, 1.0f, temp_f27);
|
||||
for(temp_r31=0; temp_r31<temp_r26; temp_r31++) {
|
||||
HuSprGrpPosSet(work.spr_grp[temp_r31], 1000, 70);
|
||||
}
|
||||
temp_r28 = HuSprAnimReadFile(DATA_MAKE_NUM(DATADIR_INST, 16));
|
||||
temp_r24 = HuSprGrpCreate(1);
|
||||
spA = HuSprCreate(temp_r28, 0, 0);
|
||||
HuSprGrpMemberSet(temp_r24, 0, spA);
|
||||
HuSprGrpPosSet(temp_r24, 1000, 186);
|
||||
HuSprPriSet(temp_r24, 0, 1000);
|
||||
sp10[0] = HuWinCreate(1000, 186, 456, 42, 0);
|
||||
HuWinMesSet(sp10[0], 0x240000+lbl_1_bss_10);
|
||||
HuWinBGTPLvlSet(sp10[0], 0.0f);
|
||||
temp_r28 = HuSprAnimReadFile(DATA_MAKE_NUM(DATADIR_INST, 17));
|
||||
temp_r23 = HuSprGrpCreate(1);
|
||||
sp8 = HuSprCreate(temp_r28, 0, 0);
|
||||
HuSprGrpMemberSet(temp_r23, 0, sp8);
|
||||
HuSprGrpPosSet(temp_r23, 1000, 242);
|
||||
HuSprPriSet(temp_r23, 0, 1000);
|
||||
sp10[1] = HuWinCreate(1000, 242, 456, 42, 0);
|
||||
HuWinMesSet(sp10[1], lbl_1_bss_10+0x240001);
|
||||
HuWinBGTPLvlSet(sp10[1], 0.0f);
|
||||
temp_r28 = HuSprAnimReadFile(DATA_MAKE_NUM(DATADIR_INST, 18));
|
||||
sp10[2] = HuWinCreate(1000, 292, 456, 42, 0);
|
||||
HuWinMesSet(sp10[2], lbl_1_bss_10+0x240002);
|
||||
HuWinBGTPLvlSet(sp10[2], 0.0f);
|
||||
HuWinMesSpeedSet(sp10[2], 0);
|
||||
temp_r31 = HuWinAnimSet(sp10[2], temp_r28, 0, 201, 18);
|
||||
HuWinSprPriSet(sp10[2], temp_r31, 1000);
|
||||
temp_r27 = HuWinCreate(1000, 292, 456, 42, 0);
|
||||
HuWinBGTPLvlSet(temp_r27, 0.0f);
|
||||
HuWinMesSpeedSet(temp_r27, 0);
|
||||
HuWinMesSet(temp_r27, lbl_1_bss_10+0x240002);
|
||||
temp_r31 = HuWinAnimSet(temp_r27, temp_r28, 0, 201, 18);
|
||||
HuWinPriSet(temp_r27, 10);
|
||||
HuWinSprPriSet(temp_r27, temp_r31, 11);
|
||||
while(lbl_1_data_0 != 0) {
|
||||
HuPrcVSleep();
|
||||
}
|
||||
for(temp_r31=0; temp_r31<36; temp_r31++) {
|
||||
temp_f30 = temp_r31;
|
||||
if(temp_f30 <= 20.0f) {
|
||||
temp_f31 = 300.0*cos(M_PI*(4.5f*temp_f30)/180.0)+temp_f29;
|
||||
HuSprGrpPosSet(temp_r25, temp_f31, temp_f28);
|
||||
temp_f31 = 300.0*cos(M_PI*(4.5f*temp_f30)/180.0)+(576.0f-(temp_r22/2)-24.0f);
|
||||
for(temp_r30=0; temp_r30<temp_r26; temp_r30++) {
|
||||
HuSprGrpPosSet(work.spr_grp[temp_r30], temp_f31, (temp_r30*28)+70);
|
||||
}
|
||||
}
|
||||
temp_f30 = temp_r31-3;
|
||||
if(temp_f30 > 0.0f) {
|
||||
if(temp_f30 <= 20.0f) {
|
||||
temp_f31 = 300.0*cos(M_PI*(4.5f*temp_f30)/180.0)+lbl_1_data_124[2];
|
||||
HuSprGrpPosSet(temp_r24, temp_f31, 186.0f);
|
||||
temp_f31 = 300.0*cos(M_PI*(4.5f*temp_f30)/180.0)+(lbl_1_data_124[2]-88.0f);
|
||||
HuWinPosSet(sp10[0], 16.0f+temp_f31, 168.0f);
|
||||
}
|
||||
}
|
||||
temp_f30 = temp_r31-6;
|
||||
if(temp_f30 > 0.0f) {
|
||||
if(temp_f30 <= 20.0f) {
|
||||
temp_f31 = 300.0*cos(M_PI*(4.5f*temp_f30)/180.0)+lbl_1_data_124[4];
|
||||
HuSprGrpPosSet(temp_r23, temp_f31, 242.0f);
|
||||
temp_f31 = 300.0*cos(M_PI*(4.5f*temp_f30)/180.0)+(lbl_1_data_124[4]-100.0f);
|
||||
HuWinPosSet(sp10[1], 16.0f+temp_f31, 224.0f);
|
||||
}
|
||||
}
|
||||
temp_f30 = temp_r31-9;
|
||||
if(temp_f30 > 0.0f) {
|
||||
if(temp_f30 <= 20.0f) {
|
||||
temp_f31 = 300.0*cos(M_PI*(4.5f*temp_f30)/180.0)+(lbl_1_data_124[6]-217.0f);
|
||||
HuWinPosSet(sp10[2], 16.0f+temp_f31, 274.0f);
|
||||
}
|
||||
}
|
||||
HuPrcVSleep();
|
||||
}
|
||||
while(lbl_1_data_0 != 3) {
|
||||
if(temp_r21 != lbl_1_bss_6) {
|
||||
temp_f31 = 16.0f+(lbl_1_data_124[6]-217.0f);
|
||||
HuWinMesSet(temp_r27, 0x240002+lbl_1_bss_10+temp_r21);
|
||||
temp_r21 = lbl_1_bss_6;
|
||||
if(lbl_1_bss_6 == 1) {
|
||||
if(mgInfoTbl[lbl_1_bss_14].inst_mess[2]) {
|
||||
HuWinMesSet(sp10[2], 0x240002+lbl_1_bss_10+lbl_1_bss_6);
|
||||
} else {
|
||||
HuWinMesSet(sp10[2], 0x240006+lbl_1_bss_10);
|
||||
}
|
||||
} else {
|
||||
HuWinMesSet(sp10[2], 0x240002+lbl_1_bss_10+lbl_1_bss_6);
|
||||
}
|
||||
for(temp_r31=0; temp_r31<=10; temp_r31++) {
|
||||
HuWinPosSet(temp_r27, 30.0*sin(M_PI*(temp_r31*9.0f)/180.0)+temp_f31, 200.0*(1.0-cos(M_PI*(temp_r31*9.0f)/180.0))+274.0);
|
||||
HuPrcVSleep();
|
||||
}
|
||||
}
|
||||
HuPrcVSleep();
|
||||
}
|
||||
for(temp_r31=0; temp_r31<20; temp_r31++) {
|
||||
temp_f30 = 1.0-cos(M_PI*(temp_r31*4.5f)/180.0);
|
||||
temp_f31 = temp_f29+(500.0f*temp_f30);
|
||||
HuSprGrpPosSet(temp_r25, temp_f31, temp_f28);
|
||||
temp_f31 = ((576.0f-(work.alt_word_len/2))-24.0f)+(500.0f*temp_f30);
|
||||
for(temp_r30=0; temp_r30<temp_r26; temp_r30++) {
|
||||
HuSprGrpPosSet(work.spr_grp[temp_r30], temp_f31, (temp_r30*28)+70);
|
||||
}
|
||||
temp_f31 = lbl_1_data_124[2]+(300.0f*temp_f30);
|
||||
HuSprGrpPosSet(temp_r24, temp_f31, 186.0f);
|
||||
temp_f31 = (lbl_1_data_124[2]-88.0f)+(300.0f*temp_f30);
|
||||
HuWinPosSet(sp10[0], 16.0f+temp_f31, 168);
|
||||
temp_f31 = lbl_1_data_124[4]+(300.0f*temp_f30);
|
||||
HuSprGrpPosSet(temp_r23, temp_f31, 242.0f);
|
||||
temp_f31 = (lbl_1_data_124[4]-100.0f)+(300.0f*temp_f30);
|
||||
HuWinPosSet(sp10[1], 16.0f+temp_f31, 224);
|
||||
temp_f31 = (lbl_1_data_124[6]-184.0f)+(400.0f*temp_f30);
|
||||
HuWinPosSet(sp10[2], 16.0f+temp_f31, 274);
|
||||
HuPrcVSleep();
|
||||
}
|
||||
MGSeqSprKill(&work);
|
||||
HuPrcEnd();
|
||||
while(1) {
|
||||
HuPrcVSleep();
|
||||
}
|
||||
}
|
||||
|
||||
static u16 lbl_1_data_144[2] = {
|
||||
1,
|
||||
2
|
||||
};
|
||||
|
||||
static void fn_1_4174(omObjData *object)
|
||||
{
|
||||
|
||||
s16 i;
|
||||
for(i=0; i<2; i++) {
|
||||
Vec pos, target, up;
|
||||
float x, y, z;
|
||||
|
||||
x = lbl_1_bss_40[i].x;
|
||||
y = lbl_1_bss_40[i].y;
|
||||
z = lbl_1_bss_40[i].z;
|
||||
|
||||
pos.x = (((sin((M_PI*y)/180.0)*cos((M_PI*x)/180.0))*lbl_1_bss_20[i])+lbl_1_bss_28[i].x);
|
||||
pos.y = (-sin((M_PI*x)/180.0)*lbl_1_bss_20[i])+lbl_1_bss_28[i].y;
|
||||
pos.z = ((cos((M_PI*y)/180.0)*cos((M_PI*x)/180.0))*lbl_1_bss_20[i])+lbl_1_bss_28[i].z;
|
||||
target.x = lbl_1_bss_28[i].x;
|
||||
target.y = lbl_1_bss_28[i].y;
|
||||
target.z = lbl_1_bss_28[i].z;
|
||||
up.x = sin((M_PI*y)/180.0)*sin((M_PI*x)/180.0);
|
||||
up.y = cos((M_PI*x)/180.0);
|
||||
up.z = cos((M_PI*y)/180.0)*sin((M_PI*x)/180.0);
|
||||
Hu3DCameraPosSet(lbl_1_data_144[i], pos.x, pos.y, pos.z, up.x, up.y, up.z, target.x, target.y, target.z);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void fn_1_4528(omObjData *object)
|
||||
{
|
||||
|
||||
Vec pos;
|
||||
Vec offset;
|
||||
Vec dir;
|
||||
Vec y_offset;
|
||||
|
||||
f32 z_rot;
|
||||
s8 stick_pos;
|
||||
|
||||
if (lbl_1_bss_0 != 0) {
|
||||
lbl_1_bss_40[0].y += 0.1f * HuPadStkX[0];
|
||||
lbl_1_bss_40[0].x += 0.1f * HuPadStkY[0];
|
||||
lbl_1_bss_20[0] += HuPadTrigL[0] / 2;
|
||||
lbl_1_bss_20[0] -= HuPadTrigR[0] / 2;
|
||||
if (lbl_1_bss_20[0] < 100.0f) {
|
||||
lbl_1_bss_20[0] = 100.0f;
|
||||
}
|
||||
pos.x = lbl_1_bss_28[0].x + (lbl_1_bss_20[0] * (sin((M_PI * lbl_1_bss_40[0].y) / 180.0) * cos((M_PI * lbl_1_bss_40[0].x) / 180.0)));
|
||||
pos.y = (lbl_1_bss_28[0].y + (lbl_1_bss_20[0] * -sin((M_PI * lbl_1_bss_40[0].x) / 180.0)));
|
||||
pos.z = (lbl_1_bss_28[0].z + (lbl_1_bss_20[0] * (cos((M_PI * lbl_1_bss_40[0].y) / 180.0) * cos((M_PI * lbl_1_bss_40[0].x) / 180.0))));
|
||||
offset.x = lbl_1_bss_28[0].x - pos.x;
|
||||
offset.y = lbl_1_bss_28[0].y - pos.y;
|
||||
offset.z = lbl_1_bss_28[0].z - pos.z;
|
||||
dir.x = (sin((M_PI * lbl_1_bss_40[0].y) / 180.0) * sin((M_PI * lbl_1_bss_40[0].x) / 180.0));
|
||||
dir.y = cos((M_PI * lbl_1_bss_40[0].x) / 180.0);
|
||||
dir.z = (cos((M_PI * lbl_1_bss_40[0].y) / 180.0) * sin((M_PI * lbl_1_bss_40[0].x) / 180.0));
|
||||
z_rot = lbl_1_bss_40[0].z;
|
||||
y_offset.x = dir.x * (offset.x * offset.x + (1.0f - offset.x * offset.x) * cos((M_PI * z_rot) / 180.0))
|
||||
+ dir.y * (offset.x * offset.y * (1.0f - cos((M_PI * z_rot) / 180.0)) - offset.z * sin((M_PI * z_rot) / 180.0))
|
||||
+ dir.z * (offset.x * offset.z * (1.0f - cos((M_PI * z_rot) / 180.0)) + offset.y * sin((M_PI * z_rot) / 180.0));
|
||||
|
||||
y_offset.y = dir.y * (offset.y * offset.y + (1.0f - offset.y * offset.y) * cos((M_PI * z_rot) / 180.0))
|
||||
+ dir.x * (offset.x * offset.y * (1.0f - cos((M_PI * z_rot) / 180.0)) + offset.z * sin((M_PI * z_rot) / 180.0))
|
||||
+ dir.z * (offset.y * offset.z * (1.0f - cos((M_PI * z_rot) / 180.0)) - offset.x * sin((M_PI * z_rot) / 180.0));
|
||||
|
||||
y_offset.z = dir.z * (offset.z * offset.z + (1.0f - offset.z * offset.z) * cos((M_PI * z_rot) / 180.0))
|
||||
+ (dir.x * (offset.x * offset.z * (1.0 - cos((M_PI * z_rot) / 180.0)) - offset.y * sin((M_PI * z_rot) / 180.0))
|
||||
+ dir.y * (offset.y * offset.z * (1.0 - cos((M_PI * z_rot) / 180.0)) + offset.x * sin((M_PI * z_rot) / 180.0)));
|
||||
|
||||
PSVECCrossProduct(&dir, &offset, &offset);
|
||||
PSVECNormalize(&offset, &offset);
|
||||
stick_pos = (HuPadSubStkX[0] & 0xF8);
|
||||
if (stick_pos != 0) {
|
||||
lbl_1_bss_28[0].x += 0.05f * (offset.x * stick_pos);
|
||||
lbl_1_bss_28[0].y += 0.05f * (offset.y * stick_pos);
|
||||
lbl_1_bss_28[0].z += 0.05f * (offset.z * stick_pos);
|
||||
}
|
||||
PSVECNormalize(&y_offset, &offset);
|
||||
stick_pos = -(HuPadSubStkY[0] & 0xF8);
|
||||
if (stick_pos != 0) {
|
||||
lbl_1_bss_28[0].x += 0.05f * (offset.x * stick_pos);
|
||||
lbl_1_bss_28[0].y += 0.05f * (offset.y * stick_pos);
|
||||
lbl_1_bss_28[0].z += 0.05f * (offset.z * stick_pos);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static float lbl_1_data_148 = 842;
|
||||
static float lbl_1_data_14C = 34;
|
||||
|
||||
static void fn_1_50B0(ModelData *model, Mtx mtx)
|
||||
{
|
||||
Mtx final;
|
||||
Mtx inv_camera;
|
||||
Mtx lookatlight;
|
||||
Mtx light;
|
||||
Mtx lookat;
|
||||
Vec pos;
|
||||
Vec up;
|
||||
Vec target;
|
||||
|
||||
s32 x;
|
||||
s32 y;
|
||||
u8 r;
|
||||
u8 g;
|
||||
u8 b;
|
||||
s16 row;
|
||||
|
||||
s32 sp8 = 0;
|
||||
GXClearVtxDesc();
|
||||
GXSetVtxDesc(GX_VA_POS, GX_DIRECT);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_F32, 0);
|
||||
GXSetVtxDesc(GX_VA_CLR0, GX_DIRECT);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_CLR0, GX_CLR_RGB, GX_RGB8, 0);
|
||||
GXSetVtxDesc(GX_VA_NRM, GX_DIRECT);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_NRM, GX_NRM_XYZ, GX_F32, 0);
|
||||
target.x = target.z = 0.0f;
|
||||
target.x = lbl_1_data_14C*sin(M_PI*lbl_1_bss_40[0].y/180.0);
|
||||
target.z = lbl_1_data_14C*cos(M_PI*lbl_1_bss_40[0].y/180.0);
|
||||
target.y = 415.0f;
|
||||
pos.x = (sin(M_PI*lbl_1_bss_40[0].y/180.0)*cos(M_PI*lbl_1_bss_40[0].x/180.0)*lbl_1_bss_20[0])+lbl_1_bss_28[0].x;
|
||||
pos.y = (-sin(M_PI*lbl_1_bss_40[0].x/180.0)*lbl_1_bss_20[0])+lbl_1_bss_28[0].y;
|
||||
pos.z = (cos(M_PI*lbl_1_bss_40[0].y/180.0)*cos(M_PI*lbl_1_bss_40[0].x/180.0)*lbl_1_bss_20[0])+lbl_1_bss_28[0].z;
|
||||
up.x = -sin(M_PI*lbl_1_bss_40[0].y/180.0);
|
||||
up.z = -cos(M_PI*lbl_1_bss_40[0].y/180.0);
|
||||
up.y = 0;
|
||||
MTXLookAt(lookat, &pos, &up, &target);
|
||||
MTXLightPerspective(light, lbl_1_bss_C, 1.2f, 0.5f, -0.5f, 0.5f, 0.5f);
|
||||
HuSprTexLoad(lbl_1_bss_18, 0, 0, GX_CLAMP, GX_CLAMP, GX_NEAR);
|
||||
MTXInverse(Hu3DCameraMtx, inv_camera);
|
||||
MTXConcat(inv_camera, mtx, final);
|
||||
MTXConcat(light, lookat, lookatlight);
|
||||
MTXConcat(lookatlight, final, final);
|
||||
GXLoadTexMtxImm(final, GX_TEXMTX0, GX_MTX3x4);
|
||||
GXSetTexCoordGen(GX_TEXCOORD0, GX_TG_MTX3x4, GX_TG_POS, GX_TEXMTX0);
|
||||
GXSetTevOrder(GX_TEVSTAGE0, GX_TEXCOORD0, GX_TEXMAP0, GX_COLOR0A0);
|
||||
GXSetTevColorIn(GX_TEVSTAGE0, GX_CC_TEXC, GX_CC_ZERO, GX_CC_ZERO, GX_CC_ZERO);
|
||||
GXSetTevColorOp(GX_TEVSTAGE0, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, GX_TRUE, GX_TEVPREV);
|
||||
GXSetTevAlphaIn(GX_TEVSTAGE0, GX_CA_KONST, GX_CA_ZERO, GX_CA_ZERO, GX_CA_ZERO);
|
||||
GXSetTevAlphaOp(GX_TEVSTAGE0, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, GX_FALSE, GX_TEVPREV);
|
||||
GXSetNumTexGens(1);
|
||||
GXSetNumTevStages(1);
|
||||
GXSetNumChans(1);
|
||||
GXSetChanCtrl(GX_COLOR0, GX_TRUE, GX_SRC_REG, GX_SRC_VTX, GX_LIGHT0, GX_DF_CLAMP, GX_AF_NONE);
|
||||
GXSetBlendMode(GX_BM_BLEND, GX_BL_SRCALPHA, GX_BL_INVSRCALPHA, GX_LO_NOOP);
|
||||
GXSetZMode(GX_TRUE, GX_LEQUAL, GX_FALSE);
|
||||
GXLoadPosMtxImm(mtx, GX_PNMTX0);
|
||||
MTXInvXpose(mtx, final);
|
||||
GXLoadNrmMtxImm(final, GX_PNMTX0);
|
||||
GXBegin(GX_TRIANGLES, GX_VTXFMT0, 2400);
|
||||
row = 0;
|
||||
for(y=-310; y<310; y += 31) {
|
||||
for(x=-310; x<310; x += 31) {
|
||||
if(row++ & 0x1) {
|
||||
r = g = 0;
|
||||
b = 255;
|
||||
} else {
|
||||
r = 255;
|
||||
g = b = 0;
|
||||
}
|
||||
GXPosition3f32(x, 0.0f, y);
|
||||
GXPosition3f32(0.0f, 1.0f, 0.0f);
|
||||
GXColor3u8(r, g, b);
|
||||
GXPosition3f32(x+31, 0.0f, y);
|
||||
GXPosition3f32(0.0f, 1.0f, 0.0f);
|
||||
GXColor3u8(r, g, b);
|
||||
GXPosition3f32(x+31, 0.0f, y+31);
|
||||
GXPosition3f32(0.0f, 1.0f, 0.0f);
|
||||
GXColor3u8(r, g, b);
|
||||
GXPosition3f32(x, 0.0f, y);
|
||||
GXPosition3f32(0.0f, 1.0f, 0.0f);
|
||||
GXColor3u8(r, g, b);
|
||||
GXPosition3f32(x+31, 0.0f, y+31);
|
||||
GXPosition3f32(0.0f, 1.0f, 0.0f);
|
||||
GXColor3u8(r, g, b);
|
||||
GXPosition3f32(x, 0.0f, y+31);
|
||||
GXPosition3f32(0.0f, 1.0f, 0.0f);
|
||||
GXColor3u8(r, g, b);
|
||||
}
|
||||
row++;
|
||||
}
|
||||
GXEnd();
|
||||
}
|
||||
|
||||
static void fn_1_5B64(ModelData *model, Mtx mtx)
|
||||
{
|
||||
|
||||
s32 sp8 = 0;
|
||||
GXTexObj tex;
|
||||
Mtx final;
|
||||
Mtx inv_camera;
|
||||
Mtx shadow;
|
||||
GXClearVtxDesc();
|
||||
GXSetVtxDesc(GX_VA_POS, GX_DIRECT);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_F32, 0);
|
||||
GXInitTexObj(&tex, Hu3DShadowData.unk_04, Hu3DShadowData.unk_02, Hu3DShadowData.unk_02, GX_TF_I8, GX_CLAMP, GX_CLAMP, GX_FALSE);
|
||||
GXInitTexObjLOD(&tex, GX_LINEAR, GX_LINEAR, 0.0f, 0.0f, 0.0f, GX_FALSE, GX_FALSE, GX_ANISO_1);
|
||||
GXLoadTexObj(&tex, 0);
|
||||
MTXInverse(Hu3DCameraMtx, inv_camera);
|
||||
MTXConcat(inv_camera, mtx, final);
|
||||
MTXConcat(Hu3DShadowData.unk_68, Hu3DShadowData.unk_38, shadow);
|
||||
MTXConcat(shadow, final, final);
|
||||
GXLoadTexMtxImm(final, GX_TEXMTX9, GX_MTX3x4);
|
||||
GXSetTexCoordGen(GX_TEXCOORD0, GX_TG_MTX3x4, GX_TG_POS, GX_TEXMTX9);
|
||||
GXSetTevOrder(GX_TEVSTAGE0, GX_TEXCOORD0, GX_TEXMAP0, GX_COLOR0A0);
|
||||
GXSetTevColorIn(GX_TEVSTAGE0, GX_CC_TEXC, GX_CC_ZERO, GX_CC_ZERO, GX_CC_ZERO);
|
||||
GXSetTevColorOp(GX_TEVSTAGE0, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, GX_TRUE, GX_TEVPREV);
|
||||
GXSetTevAlphaIn(GX_TEVSTAGE0, GX_CA_KONST, GX_CA_ZERO, GX_CA_ZERO, GX_CA_ZERO);
|
||||
GXSetTevAlphaOp(GX_TEVSTAGE0, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, GX_FALSE, GX_TEVPREV);
|
||||
GXSetNumTexGens(1);
|
||||
GXSetNumTevStages(1);
|
||||
GXSetNumChans(1);
|
||||
GXSetChanCtrl(GX_COLOR0, GX_TRUE, GX_SRC_REG, GX_SRC_VTX, GX_LIGHT0, GX_DF_CLAMP, GX_AF_NONE);
|
||||
GXSetBlendMode(GX_BM_BLEND, GX_BL_ZERO, GX_BL_INVDSTCLR, GX_LO_NOOP);
|
||||
GXSetZMode(GX_TRUE, GX_LEQUAL, GX_FALSE);
|
||||
GXLoadPosMtxImm(mtx, GX_PNMTX0);
|
||||
GXBegin(GX_QUADS, GX_VTXFMT0, 4);
|
||||
GXPosition3f32(-2000.0f, 0, -2000.0f);
|
||||
GXPosition3f32(2000.0f, 0, -2000.0f);
|
||||
GXPosition3f32(2000.0f, 0, 2000.0f);
|
||||
GXPosition3f32(-2000.0f, 0, 2000.0f);
|
||||
GXEnd();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue