Fix vertex attributes (#527)
* Use proper enum types for vertex attributes descriptions Positions, normals and texture coordinates are always given in integer or floating point formats, never as RGB. Also replace a couple of constants with sizeof(). * Use proper function names when specifying vertex attributes
This commit is contained in:
parent
3edd72d33e
commit
58925bcf5d
2 changed files with 81 additions and 75 deletions
|
|
@ -482,15 +482,15 @@ static void FaceDraw(HsfDrawObject *arg0, HsfFace *arg1) {
|
|||
vtxModeBak = var_r22;
|
||||
GXClearVtxDesc();
|
||||
GXSetVtxDesc(GX_VA_POS, GX_INDEX16);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_RGBA6, 0);
|
||||
GXSetArray(GX_VA_POS, temp_r28->data.vertex->data, 0xC);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_F32, 0);
|
||||
GXSetArray(GX_VA_POS, temp_r28->data.vertex->data, 3 * sizeof(float));
|
||||
GXSetVtxDesc(GX_VA_NRM, GX_INDEX16);
|
||||
if (temp_r29->hsfData->cenvCnt == 0) {
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_NRM, GX_NRM_XYZ, GX_RGB8, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_NRM, GX_NRM_XYZ, GX_S8, 0);
|
||||
GXSetArray(GX_VA_NRM, temp_r28->data.normal->data, 3);
|
||||
} else {
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_NRM, GX_NRM_XYZ, GX_RGBA6, 0);
|
||||
GXSetArray(GX_VA_NRM, temp_r28->data.normal->data, 0xC);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_NRM, GX_NRM_XYZ, GX_F32, 0);
|
||||
GXSetArray(GX_VA_NRM, temp_r28->data.normal->data, 3 * sizeof(float));
|
||||
}
|
||||
if (var_r22 & 4) {
|
||||
GXSetVtxDesc(GX_VA_CLR0, GX_INDEX16);
|
||||
|
|
@ -555,24 +555,24 @@ static void FaceDraw(HsfDrawObject *arg0, HsfFace *arg1) {
|
|||
vtxModeBak = var_r22;
|
||||
GXClearVtxDesc();
|
||||
GXSetVtxDesc(GX_VA_POS, GX_INDEX16);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_RGBA6, 0);
|
||||
GXSetArray(GX_VA_POS, temp_r28->data.vertex->data, 0xC);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_F32, 0);
|
||||
GXSetArray(GX_VA_POS, temp_r28->data.vertex->data, 3 * sizeof(float));
|
||||
if (var_r22 & 2) {
|
||||
GXSetVtxDesc(GX_VA_NBT, GX_DIRECT);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_NBT, GX_NRM_NBT, GX_RGBA4, 8);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_NBT, GX_NRM_NBT, GX_S16, 8);
|
||||
} else {
|
||||
GXSetVtxDesc(GX_VA_NRM, GX_INDEX16);
|
||||
if (temp_r29->hsfData->cenvCnt == 0) {
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_NRM, GX_NRM_XYZ, GX_RGB8, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_NRM, GX_NRM_XYZ, GX_S8, 0);
|
||||
GXSetArray(GX_VA_NRM, temp_r28->data.normal->data, 3);
|
||||
} else {
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_NRM, GX_NRM_XYZ, GX_RGBA6, 0);
|
||||
GXSetArray(GX_VA_NRM, temp_r28->data.normal->data, 0xC);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_NRM, GX_NRM_XYZ, GX_F32, 0);
|
||||
GXSetArray(GX_VA_NRM, temp_r28->data.normal->data, 3 * sizeof(float));
|
||||
}
|
||||
}
|
||||
GXSetVtxDesc(GX_VA_TEX0, GX_INDEX16);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_TEX_ST, GX_RGBA6, 0);
|
||||
GXSetArray(GX_VA_TEX0, temp_r28->data.st->data, 8);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_TEX_ST, GX_F32, 0);
|
||||
GXSetArray(GX_VA_TEX0, temp_r28->data.st->data, 2 * sizeof(float));
|
||||
if (var_r22 & 4) {
|
||||
GXSetVtxDesc(GX_VA_CLR0, GX_INDEX16);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_CLR0, GX_CLR_RGBA, GX_RGBA8, 0);
|
||||
|
|
@ -1643,15 +1643,15 @@ static void FaceDrawShadow(HsfDrawObject *arg0, HsfFace *arg1) {
|
|||
vtxModeBak = var_r30;
|
||||
GXClearVtxDesc();
|
||||
GXSetVtxDesc(GX_VA_POS, GX_INDEX16);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_RGBA6, 0);
|
||||
GXSetArray(GX_VA_POS, temp_r31->data.vertex->data, 0xC);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_F32, 0);
|
||||
GXSetArray(GX_VA_POS, temp_r31->data.vertex->data, 3 * sizeof(float));
|
||||
GXSetVtxDesc(GX_VA_NRM, GX_INDEX16);
|
||||
if (temp_r28->hsfData->cenvCnt == 0) {
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_NRM, GX_NRM_XYZ, GX_RGB8, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_NRM, GX_NRM_XYZ, GX_S8, 0);
|
||||
GXSetArray(GX_VA_NRM, temp_r31->data.normal->data, 3);
|
||||
} else {
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_NRM, GX_NRM_XYZ, GX_RGBA6, 0);
|
||||
GXSetArray(GX_VA_NRM, temp_r31->data.normal->data, 0xC);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_NRM, GX_NRM_XYZ, GX_F32, 0);
|
||||
GXSetArray(GX_VA_NRM, temp_r31->data.normal->data, 3 * sizeof(float));
|
||||
}
|
||||
if (var_r30 & 4) {
|
||||
GXSetVtxDesc(GX_VA_CLR0, GX_INDEX16);
|
||||
|
|
@ -1676,24 +1676,24 @@ static void FaceDrawShadow(HsfDrawObject *arg0, HsfFace *arg1) {
|
|||
vtxModeBak = var_r30;
|
||||
GXClearVtxDesc();
|
||||
GXSetVtxDesc(GX_VA_POS, GX_INDEX16);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_RGBA6, 0);
|
||||
GXSetArray(GX_VA_POS, temp_r31->data.vertex->data, 0xC);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_F32, 0);
|
||||
GXSetArray(GX_VA_POS, temp_r31->data.vertex->data, 3 * sizeof(float));
|
||||
if (var_r30 & 2) {
|
||||
GXSetVtxDesc(GX_VA_NBT, GX_DIRECT);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_NBT, GX_NRM_NBT, GX_RGBA4, 8);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_NBT, GX_NRM_NBT, GX_S16, 8);
|
||||
} else {
|
||||
GXSetVtxDesc(GX_VA_NRM, GX_INDEX16);
|
||||
if (temp_r28->hsfData->cenvCnt == 0) {
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_NRM, GX_NRM_XYZ, GX_RGB8, 0);
|
||||
GXSetArray(GX_VA_NRM, temp_r31->data.normal->data, 3);
|
||||
} else {
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_NRM, GX_NRM_XYZ, GX_RGBA6, 0);
|
||||
GXSetArray(GX_VA_NRM, temp_r31->data.normal->data, 0xC);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_NRM, GX_NRM_XYZ, GX_F32, 0);
|
||||
GXSetArray(GX_VA_NRM, temp_r31->data.normal->data, 3 * sizeof(float));
|
||||
}
|
||||
}
|
||||
GXSetVtxDesc(GX_VA_TEX0, GX_INDEX16);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_TEX_ST, GX_RGBA6, 0);
|
||||
GXSetArray(GX_VA_TEX0, temp_r31->data.st->data, 8);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_TEX_ST, GX_F32, 0);
|
||||
GXSetArray(GX_VA_TEX0, temp_r31->data.st->data, 2 * sizeof(float));
|
||||
if (var_r30 & 4) {
|
||||
GXSetVtxDesc(GX_VA_CLR0, GX_INDEX16);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_CLR0, GX_CLR_RGBA, GX_RGBA8, 0);
|
||||
|
|
@ -2523,53 +2523,53 @@ static void MDFaceDraw(HsfObject *arg0, HsfFace *arg1) {
|
|||
case 2:
|
||||
GXBegin(GX_TRIANGLES, GX_VTXFMT0, faceNumBuf[drawCnt]);
|
||||
for (var_r27 = 0; var_r27 < faceNumBuf[drawCnt] / 3; var_r27++, arg1++) {
|
||||
GXUnknownu16(arg1->indices[0][0]);
|
||||
GXPosition1x16(arg1->indices[0][0]);
|
||||
if (var_r26 == -1) {
|
||||
GXUnknownu16(arg1->indices[0][1]);
|
||||
GXNormal1x16(arg1->indices[0][1]);
|
||||
} else {
|
||||
MakeCalcNBT(arg0, arg1, 0, 1);
|
||||
}
|
||||
if (temp_r30->vtxMode == 5) {
|
||||
temp_r28 = arg1->indices[0][2];
|
||||
GXUnknownu16(temp_r28);
|
||||
GXColor1x16(temp_r28);
|
||||
if (((GXColor*) arg0->data.color->data)[temp_r28].a != 0xFF) {
|
||||
Hu3DObjInfoP->flags |= 0x4001;
|
||||
}
|
||||
}
|
||||
if (var_r25 != 0) {
|
||||
GXUnknownu16(arg1->indices[0][3]);
|
||||
GXTexCoord1x16(arg1->indices[0][3]);
|
||||
}
|
||||
GXUnknownu16(arg1->indices[2][0]);
|
||||
GXPosition1x16(arg1->indices[2][0]);
|
||||
if (var_r26 == -1) {
|
||||
GXUnknownu16(arg1->indices[2][1]);
|
||||
GXNormal1x16(arg1->indices[2][1]);
|
||||
} else {
|
||||
MakeNBT(arg0, arg1, 2, 0);
|
||||
}
|
||||
if (temp_r30->vtxMode == 5) {
|
||||
temp_r28 = arg1->indices[2][2];
|
||||
GXUnknownu16(temp_r28);
|
||||
GXColor1x16(temp_r28);
|
||||
if (((GXColor*) arg0->data.color->data)[temp_r28].a != 0xFF) {
|
||||
Hu3DObjInfoP->flags |= 0x4001;
|
||||
}
|
||||
}
|
||||
if (var_r25 != 0) {
|
||||
GXUnknownu16(arg1->indices[2][3]);
|
||||
GXTexCoord1x16(arg1->indices[2][3]);
|
||||
}
|
||||
GXUnknownu16(arg1->indices[1][0]);
|
||||
GXPosition1x16(arg1->indices[1][0]);
|
||||
if (var_r26 == -1) {
|
||||
GXUnknownu16(arg1->indices[1][1]);
|
||||
GXNormal1x16(arg1->indices[1][1]);
|
||||
} else {
|
||||
MakeNBT(arg0, arg1, 1, 2);
|
||||
}
|
||||
if (temp_r30->vtxMode == 5) {
|
||||
temp_r28 = arg1->indices[1][2];
|
||||
GXUnknownu16(temp_r28);
|
||||
GXColor1x16(temp_r28);
|
||||
if (((GXColor*) arg0->data.color->data)[temp_r28].a != 0xFF) {
|
||||
Hu3DObjInfoP->flags |= 0x4001;
|
||||
}
|
||||
}
|
||||
if (var_r25 != 0) {
|
||||
GXUnknownu16(arg1->indices[1][3]);
|
||||
GXTexCoord1x16(arg1->indices[1][3]);
|
||||
}
|
||||
}
|
||||
faceCnt = faceNumBuf[drawCnt] / 3;
|
||||
|
|
@ -2577,140 +2577,140 @@ static void MDFaceDraw(HsfObject *arg0, HsfFace *arg1) {
|
|||
case 3:
|
||||
GXBegin(GX_QUADS, GX_VTXFMT0, faceNumBuf[drawCnt]);
|
||||
for (var_r27 = 0; var_r27 < faceNumBuf[drawCnt] / 4; var_r27++, arg1++) {
|
||||
GXUnknownu16(arg1->indices[0][0]);
|
||||
GXPosition1x16(arg1->indices[0][0]);
|
||||
if (var_r26 == -1) {
|
||||
GXUnknownu16(arg1->indices[0][1]);
|
||||
GXNormal1x16(arg1->indices[0][1]);
|
||||
} else {
|
||||
MakeCalcNBT(arg0, arg1, 0, 1);
|
||||
}
|
||||
if (temp_r30->vtxMode == 5) {
|
||||
temp_r28 = arg1->indices[0][2];
|
||||
GXUnknownu16(temp_r28);
|
||||
GXColor1x16(temp_r28);
|
||||
if (((GXColor*) arg0->data.color->data)[temp_r28].a != 0xFF) {
|
||||
Hu3DObjInfoP->flags |= 0x4001;
|
||||
}
|
||||
}
|
||||
if (var_r25 != 0) {
|
||||
GXUnknownu16(arg1->indices[0][3]);
|
||||
GXTexCoord1x16(arg1->indices[0][3]);
|
||||
}
|
||||
GXUnknownu16(arg1->indices[2][0]);
|
||||
GXPosition1x16(arg1->indices[2][0]);
|
||||
if (var_r26 == -1) {
|
||||
GXUnknownu16(arg1->indices[2][1]);
|
||||
GXNormal1x16(arg1->indices[2][1]);
|
||||
} else {
|
||||
MakeNBT(arg0, arg1, 2, 0);
|
||||
}
|
||||
if (temp_r30->vtxMode == 5) {
|
||||
temp_r28 = arg1->indices[2][2];
|
||||
GXUnknownu16(temp_r28);
|
||||
GXColor1x16(temp_r28);
|
||||
if (((GXColor*) arg0->data.color->data)[temp_r28].a != 0xFF) {
|
||||
Hu3DObjInfoP->flags |= 0x4001;
|
||||
}
|
||||
}
|
||||
if (var_r25 != 0) {
|
||||
GXUnknownu16(arg1->indices[2][3]);
|
||||
GXTexCoord1x16(arg1->indices[2][3]);
|
||||
}
|
||||
GXUnknownu16(arg1->indices[3][0]);
|
||||
GXPosition1x16(arg1->indices[3][0]);
|
||||
if (var_r26 == -1) {
|
||||
GXUnknownu16(arg1->indices[3][1]);
|
||||
GXNormal1x16(arg1->indices[3][1]);
|
||||
} else {
|
||||
MakeNBT(arg0, arg1, 3, 2);
|
||||
}
|
||||
if (temp_r30->vtxMode == 5) {
|
||||
temp_r28 = arg1->indices[3][2];
|
||||
GXUnknownu16(temp_r28);
|
||||
GXColor1x16(temp_r28);
|
||||
if (((GXColor*) arg0->data.color->data)[temp_r28].a != 0xFF) {
|
||||
Hu3DObjInfoP->flags |= 0x4001;
|
||||
}
|
||||
}
|
||||
if (var_r25 != 0) {
|
||||
GXUnknownu16(arg1->indices[3][3]);
|
||||
GXTexCoord1x16(arg1->indices[3][3]);
|
||||
}
|
||||
GXUnknownu16(arg1->indices[1][0]);
|
||||
GXPosition1x16(arg1->indices[1][0]);
|
||||
if (var_r26 == -1) {
|
||||
GXUnknownu16(arg1->indices[1][1]);
|
||||
GXNormal1x16(arg1->indices[1][1]);
|
||||
} else {
|
||||
MakeNBT(arg0, arg1, 1, 3);
|
||||
}
|
||||
if (temp_r30->vtxMode == 5) {
|
||||
temp_r28 = arg1->indices[1][2];
|
||||
GXUnknownu16(temp_r28);
|
||||
GXColor1x16(temp_r28);
|
||||
if (((GXColor*) arg0->data.color->data)[temp_r28].a != 0xFF) {
|
||||
Hu3DObjInfoP->flags |= 0x4001;
|
||||
}
|
||||
}
|
||||
if (var_r25 != 0) {
|
||||
GXUnknownu16(arg1->indices[1][3]);
|
||||
GXTexCoord1x16(arg1->indices[1][3]);
|
||||
}
|
||||
}
|
||||
faceCnt = faceNumBuf[drawCnt] / 4;
|
||||
break;
|
||||
case 4:
|
||||
GXBegin(GX_TRIANGLESTRIP, GX_VTXFMT0, faceNumBuf[drawCnt]);
|
||||
GXUnknownu16(arg1->indices[0][0]);
|
||||
GXPosition1x16(arg1->indices[0][0]);
|
||||
if (var_r26 == -1) {
|
||||
GXUnknownu16(arg1->indices[0][1]);
|
||||
GXNormal1x16(arg1->indices[0][1]);
|
||||
} else {
|
||||
MakeCalcNBT(arg0, arg1, 0, 1);
|
||||
}
|
||||
if (temp_r30->vtxMode == 5) {
|
||||
temp_r28 = arg1->indices[0][2];
|
||||
GXUnknownu16(temp_r28);
|
||||
GXColor1x16(temp_r28);
|
||||
if (((GXColor*) arg0->data.color->data)[temp_r28].a != 0xFF) {
|
||||
Hu3DObjInfoP->flags |= 0x4001;
|
||||
}
|
||||
}
|
||||
if (var_r25 != 0) {
|
||||
GXUnknownu16(arg1->indices[0][3]);
|
||||
GXTexCoord1x16(arg1->indices[0][3]);
|
||||
}
|
||||
GXUnknownu16(arg1->indices[2][0]);
|
||||
GXPosition1x16(arg1->indices[2][0]);
|
||||
if (var_r26 == -1) {
|
||||
GXUnknownu16(arg1->indices[2][1]);
|
||||
GXNormal1x16(arg1->indices[2][1]);
|
||||
} else {
|
||||
MakeNBT(arg0, arg1, 2, 0);
|
||||
}
|
||||
if (temp_r30->vtxMode == 5) {
|
||||
temp_r28 = arg1->indices[2][2];
|
||||
GXUnknownu16(temp_r28);
|
||||
GXColor1x16(temp_r28);
|
||||
if (((GXColor*) arg0->data.color->data)[temp_r28].a != 0xFF) {
|
||||
Hu3DObjInfoP->flags |= 0x4001;
|
||||
}
|
||||
}
|
||||
if (var_r25 != 0) {
|
||||
GXUnknownu16(arg1->indices[2][3]);
|
||||
GXTexCoord1x16(arg1->indices[2][3]);
|
||||
}
|
||||
GXUnknownu16(arg1->indices[1][0]);
|
||||
GXPosition1x16(arg1->indices[1][0]);
|
||||
if (var_r26 == -1) {
|
||||
GXUnknownu16(arg1->indices[1][1]);
|
||||
GXNormal1x16(arg1->indices[1][1]);
|
||||
} else {
|
||||
MakeNBT(arg0, arg1, 1, 2);
|
||||
}
|
||||
if (temp_r30->vtxMode == 5) {
|
||||
temp_r28 = arg1->indices[1][2];
|
||||
GXUnknownu16(temp_r28);
|
||||
GXColor1x16(temp_r28);
|
||||
if (((GXColor*) arg0->data.color->data)[temp_r28].a != 0xFF) {
|
||||
Hu3DObjInfoP->flags |= 0x4001;
|
||||
}
|
||||
}
|
||||
if (var_r25 != 0) {
|
||||
GXUnknownu16(arg1->indices[1][3]);
|
||||
GXTexCoord1x16(arg1->indices[1][3]);
|
||||
}
|
||||
var_r24 = arg1->strip.data;
|
||||
for (var_r27 = 0; var_r27 < arg1->strip.count; var_r27++, var_r24 += 4) {
|
||||
GXUnknownu16(var_r24[0]);
|
||||
GXPosition1x16(var_r24[0]);
|
||||
if (var_r26 == -1) {
|
||||
GXUnknownu16(var_r24[1]);
|
||||
GXNormal1x16(var_r24[1]);
|
||||
} else {
|
||||
MakeCalcNBT(arg0, arg1, 0, 1);
|
||||
}
|
||||
if (temp_r30->vtxMode == 5) {
|
||||
temp_r28 = var_r24[2];
|
||||
GXUnknownu16(temp_r28);
|
||||
GXColor1x16(temp_r28);
|
||||
if (((GXColor*) arg0->data.color->data)[temp_r28].a != 0xFF) {
|
||||
Hu3DObjInfoP->flags |= 0x4001;
|
||||
}
|
||||
}
|
||||
if (var_r25 != 0) {
|
||||
GXUnknownu16(var_r24[3]);
|
||||
GXTexCoord1x16(var_r24[3]);
|
||||
}
|
||||
}
|
||||
faceCnt = arg1->strip.count + 1;
|
||||
|
|
@ -2755,9 +2755,9 @@ static s32 MakeCalcNBT(HsfObject *arg0, HsfFace *arg1, s16 arg2, s16 arg3) {
|
|||
NBTB.z = temp_r31[temp_r25].z - temp_r31[temp_r24].z;
|
||||
VECNormalize(&NBTB, &NBTB);
|
||||
VECCrossProduct(&NBTB, &sp10, &NBTT);
|
||||
GXPosition3s16(sp10.x * 256.0f, sp10.y * 256.0f, sp10.z * 256.0f);
|
||||
GXPosition3s16(NBTB.x * 256.0f, NBTB.y * 256.0f, NBTB.z * 256.0f);
|
||||
GXPosition3s16(NBTT.x * 256.0f, NBTT.y * 256.0f, NBTT.z * 256.0f);
|
||||
GXNormal3s16(sp10.x * 256.0f, sp10.y * 256.0f, sp10.z * 256.0f);
|
||||
GXNormal3s16(NBTB.x * 256.0f, NBTB.y * 256.0f, NBTB.z * 256.0f);
|
||||
GXNormal3s16(NBTT.x * 256.0f, NBTT.y * 256.0f, NBTT.z * 256.0f);
|
||||
}
|
||||
|
||||
static s32 MakeNBT(HsfObject *arg0, HsfFace *arg1, s16 arg2, s16 arg3) {
|
||||
|
|
@ -2781,9 +2781,9 @@ static s32 MakeNBT(HsfObject *arg0, HsfFace *arg1, s16 arg2, s16 arg3) {
|
|||
sp10.z = temp_r29[temp_r28][2];
|
||||
VECNormalize(&sp10, &sp10);
|
||||
}
|
||||
GXPosition3s16(sp10.x * 256.0f, sp10.y * 256.0f, sp10.z * 256.0f);
|
||||
GXPosition3s16(NBTB.x * 256.0f, NBTB.y * 256.0f, NBTB.z * 256.0f);
|
||||
GXPosition3s16(NBTT.x * 256.0f, NBTT.y * 256.0f, NBTT.z * 256.0f);
|
||||
GXNormal3s16(sp10.x * 256.0f, sp10.y * 256.0f, sp10.z * 256.0f);
|
||||
GXNormal3s16(NBTB.x * 256.0f, NBTB.y * 256.0f, NBTB.z * 256.0f);
|
||||
GXNormal3s16(NBTT.x * 256.0f, NBTT.y * 256.0f, NBTT.z * 256.0f);
|
||||
}
|
||||
|
||||
static void MDFaceCnt(HsfObject *arg0, HsfFace *arg1) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue