mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-06-05 02:37:50 -04:00
Update GXSetArray usages (fixes & le arg)
This commit is contained in:
+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++;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user