mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-05-30 00:16:19 -04:00
Merge pull request #172 from TakaRikka/arrays
Update GXSetArray usages (fixes & `le` arg)
This commit is contained in:
Vendored
+1
-1
Submodule extern/aurora updated: 507fda8591...819c72914e
@@ -150,13 +150,13 @@ struct J3DSys {
|
||||
void setModelDrawMtx(Mtx* pMtxArr) {
|
||||
J3D_ASSERT_NULLPTR(230, pMtxArr);
|
||||
mModelDrawMtx = pMtxArr;
|
||||
GXSETARRAY(GX_POS_MTX_ARRAY, mModelDrawMtx, sizeof(*mModelDrawMtx), sizeof(*mModelDrawMtx));
|
||||
GXSETARRAY(GX_POS_MTX_ARRAY, mModelDrawMtx, 10 * sizeof(Mtx), sizeof(*mModelDrawMtx), true);
|
||||
}
|
||||
|
||||
void setModelNrmMtx(Mtx33* pMtxArr) {
|
||||
J3D_ASSERT_NULLPTR(241, pMtxArr);
|
||||
mModelNrmMtx = pMtxArr;
|
||||
GXSETARRAY(GX_NRM_MTX_ARRAY, mModelNrmMtx, sizeof(*mModelNrmMtx), sizeof(*mModelNrmMtx));
|
||||
GXSETARRAY(GX_NRM_MTX_ARRAY, mModelNrmMtx, 10 * sizeof(Mtx33), sizeof(*mModelNrmMtx), true);
|
||||
}
|
||||
|
||||
void* getVtxPos() { return mVtxPos; }
|
||||
|
||||
@@ -134,12 +134,13 @@ void J3DLoadCPCmd(u8 addr, u32 val) {
|
||||
}
|
||||
|
||||
#if TARGET_PC
|
||||
static void J3DLoadArrayBasePtr(GXAttr attr, void* data, u32 size) {
|
||||
static void J3DLoadArrayBasePtr(GXAttr attr, void* data, u32 size, bool le) {
|
||||
u32 idx = (attr == GX_VA_NBT) ? 1 : (attr - GX_VA_POS);
|
||||
GXCmd1u8(GX_LOAD_AURORA);
|
||||
GXCmd1u16(GX_LOAD_AURORA_ARRAYBASE | idx);
|
||||
GXCmd1u64((u64)data);
|
||||
GXCmd1u64((u64)size);
|
||||
GXCmd1u32(size);
|
||||
GXCmd1u8(le ? 1 : 0);
|
||||
}
|
||||
#else
|
||||
static void J3DLoadArrayBasePtr(GXAttr attr, void* data) {
|
||||
@@ -152,15 +153,15 @@ void J3DShape::loadVtxArray() const {
|
||||
#if TARGET_PC
|
||||
// TODO: these can very easily overcount if the data isn't in F32 format
|
||||
if (j3dSys.getVtxPos() != mVertexData->getVtxPosArray()) {
|
||||
J3DLoadArrayBasePtr(GX_VA_POS, j3dSys.getVtxPos(), j3dSys.mVtxPosNum * sizeof(Vec));
|
||||
J3DLoadArrayBasePtr(GX_VA_POS, j3dSys.getVtxPos(), j3dSys.mVtxPosNum * sizeof(Vec), true);
|
||||
}
|
||||
|
||||
if (!mHasNBT && j3dSys.getVtxNrm() != mVertexData->getVtxNrmArray()) {
|
||||
J3DLoadArrayBasePtr(GX_VA_NRM, j3dSys.getVtxNrm(), j3dSys.mVtxNrmNum * sizeof(Vec));
|
||||
J3DLoadArrayBasePtr(GX_VA_NRM, j3dSys.getVtxNrm(), j3dSys.mVtxNrmNum * sizeof(Vec), true);
|
||||
}
|
||||
|
||||
if (j3dSys.getVtxCol() != mVertexData->getVtxColorArray(0)) {
|
||||
J3DLoadArrayBasePtr(GX_VA_CLR0, j3dSys.getVtxCol(), j3dSys.mVtxColNum * sizeof(GXColor));
|
||||
J3DLoadArrayBasePtr(GX_VA_CLR0, j3dSys.getVtxCol(), j3dSys.mVtxColNum * sizeof(GXColor), true);
|
||||
}
|
||||
#else
|
||||
J3DLoadArrayBasePtr(GX_VA_POS, j3dSys.getVtxPos());
|
||||
@@ -257,9 +258,9 @@ void J3DShape::makeVtxArrayCmd() {
|
||||
for (u32 i = 0; i < 12; i++) {
|
||||
GXAttr attr = GXAttr(i + GX_VA_POS);
|
||||
if (array[i] != nullptr)
|
||||
GDSetArraySized(attr, array[i], mVertexData->getVtxArrByteSize(attr), mVertexData->getVtxArrStride(attr));
|
||||
GDSetArraySized(attr, array[i], mVertexData->getVtxArrByteSize(attr), mVertexData->getVtxArrStride(attr), true);
|
||||
else
|
||||
GDSetArraySized(attr, nullptr, 0, mVertexData->getVtxArrStride(attr));
|
||||
GDSetArraySized(attr, nullptr, 0, mVertexData->getVtxArrStride(attr), true);
|
||||
}
|
||||
#else
|
||||
for (u32 i = 0; i < 12; i++) {
|
||||
|
||||
@@ -932,8 +932,8 @@ void JPAResource::setPTev() {
|
||||
int center_offset = pEsp != NULL ? (pEsp->getScaleCenterX() + 3 * pEsp->getScaleCenterY()) * 0xC : 0x30;
|
||||
int pos_offset = center_offset + base_plane_type * 0x6C;
|
||||
int crd_offset = (pBsp->getTilingS() + 2 * pBsp->getTilingT()) * 8;
|
||||
GXSETARRAY(GX_VA_POS, jpa_pos + pos_offset, ARRAY_SIZEU(jpa_pos) - pos_offset, 3);
|
||||
GXSETARRAY(GX_VA_TEX0, jpa_crd + crd_offset, ARRAY_SIZEU(jpa_crd) - crd_offset, 2);
|
||||
GXSETARRAY(GX_VA_POS, jpa_pos + pos_offset, ARRAY_SIZEU(jpa_pos) - pos_offset, 3, true);
|
||||
GXSETARRAY(GX_VA_TEX0, jpa_crd + crd_offset, ARRAY_SIZEU(jpa_crd) - crd_offset, 2, true);
|
||||
GXSetTevOrder(GX_TEVSTAGE0, GX_TEXCOORD0, GX_TEXMAP0, GX_COLOR_NULL);
|
||||
|
||||
if (pEts != NULL) {
|
||||
@@ -978,8 +978,8 @@ void JPAResource::setCTev(JPAEmitterWorkData* work) {
|
||||
int base_plane_type = (pCsp->getType() == 3 || pCsp->getType() == 7) ?
|
||||
pCsp->getBasePlaneType() : 0;
|
||||
int pos_offset = 0x30 + base_plane_type * 0x6C;
|
||||
GXSETARRAY(GX_VA_POS, jpa_pos + pos_offset, ARRAY_SIZEU(jpa_pos) - pos_offset, 3);
|
||||
GXSETARRAY(GX_VA_TEX0, jpa_crd, ARRAY_SIZEU(jpa_crd), 2);
|
||||
GXSETARRAY(GX_VA_POS, jpa_pos + pos_offset, ARRAY_SIZEU(jpa_pos) - pos_offset, 3, true);
|
||||
GXSETARRAY(GX_VA_TEX0, jpa_crd, ARRAY_SIZEU(jpa_crd), 2, true);
|
||||
GXSetTevOrder(GX_TEVSTAGE0, GX_TEXCOORD0, GX_TEXMAP1, GX_COLOR_NULL);
|
||||
GXSetTexCoordGen(GX_TEXCOORD0, GX_TG_MTX2x4, GX_TG_TEX0, 0x3C);
|
||||
GXSetTevDirect(GX_TEVSTAGE0);
|
||||
|
||||
@@ -268,9 +268,9 @@ void daMant_packet_c::draw() {
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_NRM, GX_CLR_RGB, GX_F32, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_CLR_RGBA, GX_F32, 0);
|
||||
|
||||
GXSETARRAY(GX_VA_POS, this->getPos(), sizeof(mPos[0]), 12);
|
||||
GXSETARRAY(GX_VA_NRM, this->getNrm(), sizeof(mNrm[0]), 12);
|
||||
GXSETARRAY(GX_VA_TEX0, &l_texCoord, sizeof(l_texCoord), 8);
|
||||
GXSETARRAY(GX_VA_POS, this->getPos(), sizeof(mPos[0]), 12, true);
|
||||
GXSETARRAY(GX_VA_NRM, this->getNrm(), sizeof(mNrm[0]), 12, true);
|
||||
GXSETARRAY(GX_VA_TEX0, &l_texCoord, sizeof(l_texCoord), 8, false); // TODO: set to true when converted to float literals
|
||||
|
||||
GXSetZCompLoc(0);
|
||||
GXSetZMode(GX_ENABLE, GX_LEQUAL, GX_ENABLE);
|
||||
|
||||
@@ -274,9 +274,9 @@ void FlagCloth_c::draw() {
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_CLR_RGBA, GX_F32, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_NRM, GX_CLR_RGB, GX_F32, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_CLR_RGBA, GX_F32, 0);
|
||||
GXSETARRAY(GX_VA_POS, getPos(), sizeof(mPositions), sizeof(cXyz));
|
||||
GXSETARRAY(GX_VA_NRM, getNormal(), sizeof(mNormals), sizeof(cXyz));
|
||||
GXSETARRAY(GX_VA_TEX0, mpTexCoord, sizeof(mpTexCoord), 8);
|
||||
GXSETARRAY(GX_VA_POS, getPos(), sizeof(mPositions), sizeof(cXyz), true);
|
||||
GXSETARRAY(GX_VA_NRM, getNormal(), sizeof(mNormals), sizeof(cXyz), true);
|
||||
GXSETARRAY(GX_VA_TEX0, mpTexCoord, sizeof(l_texCoord), 8, true);
|
||||
GXSetZCompLoc(GX_FALSE);
|
||||
GXSetZMode(GX_TRUE, GX_LEQUAL, GX_TRUE);
|
||||
GXLoadTexObj(&mTexObj, GX_TEXMAP0);
|
||||
@@ -304,7 +304,7 @@ void FlagCloth_c::draw() {
|
||||
GXSetClipMode(GX_CLIP_ENABLE);
|
||||
GXSetCullMode(GX_CULL_BACK);
|
||||
GXCallDisplayList(l_pennant_flagDL, 0x80);
|
||||
GXSETARRAY(GX_VA_NRM, getNormalBack(), sizeof(mNormalBacks), sizeof(cXyz));
|
||||
GXSETARRAY(GX_VA_NRM, getNormalBack(), sizeof(mNormalBacks), sizeof(cXyz), true);
|
||||
GXSetCullMode(GX_CULL_FRONT);
|
||||
GXCallDisplayList(l_pennant_flagDL, 0x80);
|
||||
J3DShape::resetVcdVatCache();
|
||||
|
||||
@@ -233,9 +233,9 @@ inline void FlagCloth2_c::draw() {
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_CLR_RGBA, GX_F32, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_NRM, GX_CLR_RGB, GX_F32, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_CLR_RGBA, GX_F32, 0);
|
||||
GXSETARRAY(GX_VA_POS, getPos(), sizeof(mPositions), sizeof(cXyz));
|
||||
GXSETARRAY(GX_VA_NRM, getNormal(), sizeof(mNormals), sizeof(cXyz));
|
||||
GXSETARRAY(GX_VA_TEX0, mTexCoord, sizeof(mTexCoord), 8);
|
||||
GXSETARRAY(GX_VA_POS, getPos(), sizeof(mPositions), sizeof(cXyz), true);
|
||||
GXSETARRAY(GX_VA_NRM, getNormal(), sizeof(mNormals), sizeof(cXyz), true);
|
||||
GXSETARRAY(GX_VA_TEX0, mTexCoord, sizeof(mTexCoord), 8, true);
|
||||
GXSetZCompLoc(GX_FALSE);
|
||||
GXSetZMode(GX_TRUE, GX_LEQUAL, GX_TRUE);
|
||||
GXLoadTexObj(&mTexObj, GX_TEXMAP0);
|
||||
@@ -276,7 +276,7 @@ inline void FlagCloth2_c::draw() {
|
||||
GXEnd();
|
||||
}
|
||||
|
||||
GXSETARRAY(GX_VA_NRM, getNormalBack(), sizeof(mNormalBacks), sizeof(cXyz));
|
||||
GXSETARRAY(GX_VA_NRM, getNormalBack(), sizeof(mNormalBacks), sizeof(cXyz), true);
|
||||
GXSetCullMode(GX_CULL_FRONT);
|
||||
|
||||
for (int i = 0; i < 5; i++) {
|
||||
|
||||
@@ -521,32 +521,6 @@ dFlower_packet_c::dFlower_packet_c() {
|
||||
unused += 0x2000;
|
||||
}
|
||||
|
||||
#if TARGET_LITTLE_ENDIAN
|
||||
static bool initialized = false;
|
||||
if (!initialized) {
|
||||
for (int i = 0; i < (ARRAY_SIZE(l_flowerPos) / sizeof(Vec)); i++) {
|
||||
be_swap(((Vec*)l_flowerPos)[i]);
|
||||
}
|
||||
for (int i = 0; i < (ARRAY_SIZE(l_flowerTexCoord) / sizeof(Vec)); i++) {
|
||||
be_swap(((Vec*)l_flowerTexCoord)[i]);
|
||||
}
|
||||
for (int i = 0; i < (ARRAY_SIZE(l_flowerPos2) / sizeof(Vec)); i++) {
|
||||
be_swap(((Vec*)l_flowerPos2)[i]);
|
||||
}
|
||||
for (int i = 0; i < (ARRAY_SIZE(l_flowerTexCoord2) / sizeof(Vec)); i++) {
|
||||
be_swap(((Vec*)l_flowerTexCoord2)[i]);
|
||||
}
|
||||
for (int i = 0; i < (ARRAY_SIZE(l_flowerNormal) / sizeof(Vec)); i++) {
|
||||
be_swap(((Vec*)l_flowerNormal)[i]);
|
||||
}
|
||||
for (int i = 0; i < (ARRAY_SIZE(l_flowerNormal2) / sizeof(Vec)); i++) {
|
||||
be_swap(((Vec*)l_flowerNormal2)[i]);
|
||||
}
|
||||
|
||||
initialized = true;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if TARGET_PC
|
||||
GXInitTexObj(&mTexObj_l_J_Ohana00_64TEX, l_J_Ohana00_64TEX,
|
||||
l_J_Ohana00_64TEX__width, l_J_Ohana00_64TEX__height, GX_TF_CMPR, GX_MIRROR, GX_MIRROR, GX_FALSE
|
||||
@@ -579,10 +553,10 @@ void dFlower_packet_c::draw() {
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_NRM, GX_NRM_XYZ, GX_F32, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_CLR0, GX_CLR_RGBA, GX_RGBA8, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_TEX_ST, GX_F32, 0);
|
||||
GXSETARRAY(GX_VA_POS, &l_flowerPos, sizeof(l_flowerPos), 0xC);
|
||||
GXSETARRAY(GX_VA_NRM, &l_flowerNormal, sizeof(l_flowerNormal), 0xC);
|
||||
GXSETARRAY(GX_VA_CLR0, &l_flowerColor, sizeof(l_flowerColor), 4);
|
||||
GXSETARRAY(GX_VA_TEX0, &l_flowerTexCoord, sizeof(l_flowerTexCoord), 8);
|
||||
GXSETARRAY(GX_VA_POS, &l_flowerPos, sizeof(l_flowerPos), 0xC, false);
|
||||
GXSETARRAY(GX_VA_NRM, &l_flowerNormal, sizeof(l_flowerNormal), 0xC, false);
|
||||
GXSETARRAY(GX_VA_CLR0, &l_flowerColor, sizeof(l_flowerColor), 4, false);
|
||||
GXSETARRAY(GX_VA_TEX0, &l_flowerTexCoord, sizeof(l_flowerTexCoord), 8, false);
|
||||
|
||||
GXColor sp64;
|
||||
dFlower_room_c* sp5C = m_room;
|
||||
@@ -678,10 +652,10 @@ void dFlower_packet_c::draw() {
|
||||
sp5C++;
|
||||
}
|
||||
|
||||
GXSETARRAY(GX_VA_POS, mp_pos, sizeof(l_flowerPos2), 0xC);
|
||||
GXSETARRAY(GX_VA_NRM, &l_flowerNormal2, sizeof(l_flowerNormal2), 0xC);
|
||||
GXSETARRAY(GX_VA_CLR0, mp_colors, sizeof(l_flowerColor2), 4);
|
||||
GXSETARRAY(GX_VA_TEX0, mp_texCoords, sizeof(l_flowerTexCoord2), 8);
|
||||
GXSETARRAY(GX_VA_POS, mp_pos, sizeof(l_flowerPos2), 0xC, true);
|
||||
GXSETARRAY(GX_VA_NRM, &l_flowerNormal2, sizeof(l_flowerNormal2), 0xC, false);
|
||||
GXSETARRAY(GX_VA_CLR0, mp_colors, sizeof(l_flowerColor2), 4, true);
|
||||
GXSETARRAY(GX_VA_TEX0, mp_texCoords, sizeof(l_flowerTexCoord2), 8, true);
|
||||
|
||||
sp5C = m_room;
|
||||
|
||||
|
||||
@@ -536,10 +536,10 @@ void dGrass_packet_c::draw() {
|
||||
|
||||
GXSetVtxDescv(l_vtxDescList);
|
||||
GXSetVtxAttrFmtv(GX_VTXFMT0, l_vtxAttrFmtList);
|
||||
GXSETARRAY(GX_VA_POS, mp_pos, sizeof(l_pos), sizeof(Vec));
|
||||
GXSETARRAY(GX_VA_NRM, mp_normal, sizeof(l_normal), sizeof(Vec));
|
||||
GXSETARRAY(GX_VA_CLR0, mp_colors, sizeof(l_color), sizeof(GXColor));
|
||||
GXSETARRAY(GX_VA_TEX0, mp_texCoords, sizeof(l_texCoord), 8);
|
||||
GXSETARRAY(GX_VA_POS, mp_pos, sizeof(l_pos), sizeof(Vec), true);
|
||||
GXSETARRAY(GX_VA_NRM, mp_normal, sizeof(l_normal), sizeof(Vec), true);
|
||||
GXSETARRAY(GX_VA_CLR0, mp_colors, sizeof(l_color), sizeof(GXColor), true);
|
||||
GXSETARRAY(GX_VA_TEX0, mp_texCoords, sizeof(l_texCoord), 8, true);
|
||||
|
||||
GXColorS10 spA0 = {0, 0, 0, 0};
|
||||
GXColorS10 sp98 = {0, 0, 0, 0};
|
||||
|
||||
@@ -1521,7 +1521,7 @@ void dDlst_shadowControl_c::draw(Mtx param_0) {
|
||||
dKy_GxFog_set();
|
||||
|
||||
GXSetChanCtrl(GX_ALPHA0, GX_DISABLE, GX_SRC_REG, GX_SRC_REG, GX_LIGHT_NULL, GX_DF_NONE, GX_AF_NONE);
|
||||
GXSETARRAY(GX_VA_POS, l_shadowVolPos, sizeof(l_shadowVolPos), sizeof(l_shadowVolPos[0]));
|
||||
GXSETARRAY(GX_VA_POS, l_shadowVolPos, sizeof(l_shadowVolPos), sizeof(l_shadowVolPos[0]), true);
|
||||
GXSetTexCoordGen(GX_TEXCOORD0, GX_TG_MTX3x4, GX_TG_POS, GX_TEXMTX0);
|
||||
GXSetNumTevStages(1);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_F32, 0);
|
||||
@@ -1553,7 +1553,7 @@ void dDlst_shadowControl_c::draw(Mtx param_0) {
|
||||
|
||||
GXSetTevSwapModeTable(GX_TEV_SWAP0, GX_CH_RED, GX_CH_GREEN, GX_CH_BLUE, GX_CH_ALPHA);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_CLR_RGBA, GX_RGB8, 0);
|
||||
GXSETARRAY(GX_VA_POS, l_simpleShadowPos, sizeof(l_simpleShadowPos), sizeof(l_simpleShadowPos[0]));
|
||||
GXSETARRAY(GX_VA_POS, l_simpleShadowPos, sizeof(l_simpleShadowPos), sizeof(l_simpleShadowPos[0]), true);
|
||||
GXSetTexCoordGen(GX_TEXCOORD0, GX_TG_MTX2x4, GX_TG_TEX0, GX_IDENTITY);
|
||||
GXSetTevOrder(GX_TEVSTAGE0, GX_TEXCOORD0, GX_TEXMAP0, GX_COLOR_NULL);
|
||||
GXSetAlphaCompare(GX_ALWAYS, 0, GX_AOP_OR, GX_ALWAYS, 0);
|
||||
|
||||
+1
-1
@@ -375,7 +375,7 @@ void renderingAmap_c::draw() {
|
||||
dMap_HIO_prm_res_dst_s::m_res->field_0x1a7, tmp);
|
||||
setAmapPaletteColor(0x2E, temp_r31, temp_r30, temp_r29, temp_r28);
|
||||
|
||||
renderingDAmap_c::draw();
|
||||
GX_DEBUG_GROUP(renderingDAmap_c::draw);
|
||||
}
|
||||
|
||||
int renderingAmap_c::getDispType() const {
|
||||
|
||||
+13
-5
@@ -292,11 +292,22 @@ void dDrawPath_c::rendering(dDrawPath_c::floor_class const* p_floor) {
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef TARGET_PC
|
||||
static u32 getRoomPosArraySize(const dDrawPath_c::room_class* room) {
|
||||
if (room->mpFloor == NULL || room->mpFloatData == NULL || room->mFloorNum == 0) {
|
||||
return 0;
|
||||
}
|
||||
const dDrawPath_c::group_class* firstGroup = room->mpFloor[0].mpGroup;
|
||||
JUT_ASSERT(0, firstGroup != NULL);
|
||||
JUT_ASSERT(0, (const u8*)firstGroup >= (const u8*)room->mpFloatData);
|
||||
return (const u8*)firstGroup - (const u8*)room->mpFloatData;
|
||||
}
|
||||
#endif
|
||||
|
||||
void dDrawPath_c::rendering(dDrawPath_c::room_class const* room) {
|
||||
JUT_ASSERT(1043, room != NULL);
|
||||
if (room != NULL) {
|
||||
// TODO: FILL IN SIZE.
|
||||
GXSETARRAY(GX_VA_POS, room->mpFloatData, 0, 8);
|
||||
GXSetArray(GX_VA_POS, room->mpFloatData, getRoomPosArraySize(room), 8, false);
|
||||
floor_class* floor = room->mpFloor;
|
||||
|
||||
if (floor != NULL) {
|
||||
@@ -492,13 +503,10 @@ void dRenderingFDAmap_c::renderingDecoration(dDrawPath_c::line_class const* p_li
|
||||
GXSetTevAlphaOp(GX_TEVSTAGE0, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, GX_TRUE, GX_TEVPREV);
|
||||
#endif
|
||||
|
||||
// aurora doesn't support GX_POINTS yet
|
||||
#if !TARGET_PC
|
||||
GXBegin(GX_POINTS, GX_VTXFMT0, 1);
|
||||
GXPosition1x16(data_p[0]);
|
||||
GXTexCoord2f32(0, 0);
|
||||
GXEnd();
|
||||
#endif
|
||||
data_p++;
|
||||
}
|
||||
|
||||
|
||||
@@ -848,7 +848,7 @@ void renderingPlusDoor_c::drawDoorCommon(stage_tgsc_data_class const* i_doorData
|
||||
GXSetVtxDesc(GX_VA_TEX0, GX_INDEX8);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_CLR_RGBA, GX_F32, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_CLR_RGBA, GX_RGB565, 0);
|
||||
GXSETARRAY(GX_VA_TEX0, (void*)l_tex0, sizeof(l_tex0), 2);
|
||||
GXSETARRAY(GX_VA_TEX0, l_tex0, sizeof(l_tex0), 2, true);
|
||||
|
||||
setTevSettingIntensityTextureToCI();
|
||||
|
||||
@@ -1007,7 +1007,7 @@ void renderingPlusDoorAndCursor_c::drawTreasure() {
|
||||
GXSetVtxDesc(GX_VA_TEX0, GX_INDEX8);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_CLR_RGB, GX_F32, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_CLR_RGBA, GX_RGB565, 0);
|
||||
GXSETARRAY(GX_VA_TEX0, (void*)l_iconTex0, sizeof(l_iconTex0), 2);
|
||||
GXSETARRAY(GX_VA_TEX0, l_iconTex0, sizeof(l_iconTex0), 2, true);
|
||||
|
||||
setTevSettingIntensityTextureToCI();
|
||||
|
||||
@@ -1081,7 +1081,7 @@ void renderingPlusDoorAndCursor_c::drawTreasureAfterPlayer() {
|
||||
GXSetVtxDesc(GX_VA_TEX0, GX_INDEX8);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_CLR_RGB, GX_F32, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_CLR_RGBA, GX_RGB565, 0);
|
||||
GXSETARRAY(GX_VA_TEX0, (void*)l_iconTex0, sizeof(l_iconTex0), 2);
|
||||
GXSETARRAY(GX_VA_TEX0, l_iconTex0, sizeof(l_iconTex0), 2, true);
|
||||
|
||||
setTevSettingIntensityTextureToCI();
|
||||
|
||||
|
||||
@@ -2383,8 +2383,8 @@ void mDoExt_3DlineMat0_c::draw() {
|
||||
int var_r26 = (field_0x14 << 1) & 0xFFFF;
|
||||
|
||||
for (int i = 0; i < field_0x10; i++) {
|
||||
GXSETARRAY(GX_VA_POS, field_0x18->field_0x8[field_0x16], sizeof(cXyz) * var_r26, sizeof(cXyz));
|
||||
GXSETARRAY(GX_VA_NRM, field_0x18->field_0x10[field_0x16], 3 * var_r26, 3);
|
||||
GXSETARRAY(GX_VA_POS, field_0x18->field_0x8[field_0x16], sizeof(cXyz) * var_r26, sizeof(cXyz), true);
|
||||
GXSETARRAY(GX_VA_NRM, field_0x18->field_0x10[field_0x16], 3 * var_r26, 3, true);
|
||||
|
||||
GXBegin(GX_TRIANGLESTRIP, GX_VTXFMT0, var_r26);
|
||||
for (u16 j = 0; j < (u16)var_r26; j++) {
|
||||
@@ -2699,11 +2699,11 @@ void mDoExt_3DlineMat1_c::draw() {
|
||||
mDoExt_3Dline_c* lines = mpLines;
|
||||
u16 vert_num = field_0x34 << 1;
|
||||
for (s32 i = 0; i < mNumLines; i++) {
|
||||
GXSETARRAY(GX_VA_POS, lines->field_0x8[mIsDrawn], vert_num * sizeof(cXyz), sizeof(cXyz));
|
||||
GXSETARRAY(GX_VA_POS, lines->field_0x8[mIsDrawn], vert_num * sizeof(cXyz), sizeof(cXyz), true);
|
||||
GXSETARRAY(GX_VA_NRM, lines->field_0x10[mIsDrawn],
|
||||
vert_num * sizeof(mDoExt_3Dline_field_0x10_c),
|
||||
sizeof(mDoExt_3Dline_field_0x10_c));
|
||||
GXSETARRAY(GX_VA_TEX0, lines->field_0x18[mIsDrawn], vert_num * sizeof(cXy), sizeof(cXy));
|
||||
sizeof(mDoExt_3Dline_field_0x10_c), true);
|
||||
GXSETARRAY(GX_VA_TEX0, lines->field_0x18[mIsDrawn], vert_num * sizeof(cXy), sizeof(cXy), true);
|
||||
GXBegin(GX_TRIANGLESTRIP, GX_VTXFMT0, vert_num);
|
||||
|
||||
u16 j = 0;
|
||||
@@ -3036,7 +3036,7 @@ mDoExt_cube8pPacket::mDoExt_cube8pPacket(cXyz* i_points, const GXColor& i_color)
|
||||
}
|
||||
|
||||
void drawCube(MtxP mtx, cXyz* pos, const GXColor& color) {
|
||||
GXSETARRAY(GX_VA_POS, pos, sizeof(*pos), sizeof(*pos));
|
||||
GXSETARRAY(GX_VA_POS, pos, sizeof(cXyz) * 8, sizeof(cXyz), true);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_F32, 0);
|
||||
GXClearVtxDesc();
|
||||
GXSetVtxDesc(GX_VA_POS, GX_INDEX8);
|
||||
@@ -3115,7 +3115,7 @@ mDoExt_quadPacket::mDoExt_quadPacket(cXyz* i_points, const GXColor& i_color, u8
|
||||
}
|
||||
|
||||
void mDoExt_quadPacket::draw() {
|
||||
GXSETARRAY(GX_VA_POS, mPoints, sizeof(mPoints), sizeof(cXyz));
|
||||
GXSETARRAY(GX_VA_POS, mPoints, sizeof(mPoints), sizeof(cXyz), true);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_F32, 0);
|
||||
GXClearVtxDesc();
|
||||
GXSetVtxDesc(GX_VA_POS, GX_INDEX8);
|
||||
@@ -3167,7 +3167,7 @@ mDoExt_trianglePacket::mDoExt_trianglePacket(cXyz* i_points, const GXColor& i_co
|
||||
void mDoExt_trianglePacket::draw() {
|
||||
j3dSys.reinitGX();
|
||||
|
||||
GXSETARRAY(GX_VA_POS, mPoints, sizeof(mPoints), sizeof(cXyz));
|
||||
GXSETARRAY(GX_VA_POS, mPoints, sizeof(mPoints), sizeof(cXyz), true);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_F32, 0);
|
||||
GXClearVtxDesc();
|
||||
GXSetVtxDesc(GX_VA_POS, GX_INDEX8);
|
||||
|
||||
Reference in New Issue
Block a user