summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSuperDude88 <82904174+SuperDude88@users.noreply.github.com>2026-06-19 21:27:34 -0400
committerGitHub <noreply@github.com>2026-06-19 18:27:34 -0700
commitecafc81d53cadf3c29ac01b03170cbe9bc37c686 (patch)
tree31c6abd4c85c1ddce38f193d8028951c23297315
parent8d43c80c42f1a4c3835a2124ebeaf044c90e3839 (diff)
Use J3DSysDrawBuf Enum (#3166)
- Update all the 0/1 values to use the enum Hopefully this builds properly I didn't set up everything locally
-rw-r--r--include/d/actor/d_a_obj_mirror_chain.h4
-rw-r--r--include/d/d_debug_viewer.h48
-rw-r--r--libs/JSystem/src/J3DGraphAnimator/J3DJoint.cpp4
-rw-r--r--libs/JSystem/src/J3DGraphBase/J3DSys.cpp2
-rw-r--r--src/d/actor/d_a_mant.cpp2
-rw-r--r--src/d/actor/d_a_obj_flag2.cpp2
-rw-r--r--src/d/actor/d_a_obj_flag3.cpp2
-rw-r--r--src/d/actor/d_a_obj_mirror_chain.cpp2
-rw-r--r--src/m_Do/m_Do_ext.cpp8
9 files changed, 37 insertions, 37 deletions
diff --git a/include/d/actor/d_a_obj_mirror_chain.h b/include/d/actor/d_a_obj_mirror_chain.h
index 106272f116..10f61c3026 100644
--- a/include/d/actor/d_a_obj_mirror_chain.h
+++ b/include/d/actor/d_a_obj_mirror_chain.h
@@ -12,7 +12,7 @@ public:
~dScissorBegin_packet_c() {}
cXyz* getQuad() { return mQuad; }
- void entryPacket() { j3dSys.getDrawBuffer(1)->entryImm(this, 0); }
+ void entryPacket() { j3dSys.getDrawBuffer(J3DSysDrawBuf_Xlu)->entryImm(this, 0); }
/* 0x10 */ cXyz mQuad[4];
};
@@ -22,7 +22,7 @@ public:
void draw();
~dScissorEnd_packet_c() {}
- void entryPacket() { j3dSys.getDrawBuffer(1)->entryImm(this, 0); }
+ void entryPacket() { j3dSys.getDrawBuffer(J3DSysDrawBuf_Xlu)->entryImm(this, 0); }
};
/**
diff --git a/include/d/d_debug_viewer.h b/include/d/d_debug_viewer.h
index dc72f972d8..a68ea3e4e5 100644
--- a/include/d/d_debug_viewer.h
+++ b/include/d/d_debug_viewer.h
@@ -25,99 +25,99 @@ void dDbVw_drawCylinderM(int i_bufferType, Mtx i_mtx, const GXColor& i_color, u8
void dDbVw_drawCube8pXlu(cXyz* i_points, const GXColor& i_color);
inline void dDbVw_drawCube8pOpa(cXyz* i_points, const GXColor& i_color) {
- dDbVw_drawCube8p(0, i_points, i_color);
+ dDbVw_drawCube8p(J3DSysDrawBuf_Opa, i_points, i_color);
}
inline void dDbVw_drawCube8pXlu(cXyz* i_points, const GXColor& i_color) {
- dDbVw_drawCube8p(1, i_points, i_color);
+ dDbVw_drawCube8p(J3DSysDrawBuf_Xlu, i_points, i_color);
}
inline void dDbVw_drawCubeOpa(cXyz& i_pos, cXyz& i_size, csXyz& i_angle, const GXColor& i_color) {
- dDbVw_drawCube(0, i_pos, i_size, i_angle, i_color);
+ dDbVw_drawCube(J3DSysDrawBuf_Opa, i_pos, i_size, i_angle, i_color);
}
inline void dDbVw_drawCubeXlu(cXyz& i_pos, cXyz& i_size, csXyz& i_angle, const GXColor& i_color) {
- dDbVw_drawCube(1, i_pos, i_size, i_angle, i_color);
+ dDbVw_drawCube(J3DSysDrawBuf_Xlu, i_pos, i_size, i_angle, i_color);
}
inline void dDbVw_drawTriangleOpa(cXyz* i_points, const GXColor& i_color, u8 i_clipZ) {
- dDbVw_drawTriangle(0, i_points, i_color, i_clipZ);
+ dDbVw_drawTriangle(J3DSysDrawBuf_Opa, i_points, i_color, i_clipZ);
}
inline void dDbVw_drawTriangleXlu(cXyz* i_points, const GXColor& i_color, u8 i_clipZ) {
- dDbVw_drawTriangle(1, i_points, i_color, i_clipZ);
+ dDbVw_drawTriangle(J3DSysDrawBuf_Xlu, i_points, i_color, i_clipZ);
}
inline void dDbVw_drawQuadOpa(cXyz* i_points, const GXColor& i_color, u8 i_clipZ) {
- dDbVw_drawQuad(0, i_points, i_color, i_clipZ);
+ dDbVw_drawQuad(J3DSysDrawBuf_Opa, i_points, i_color, i_clipZ);
}
inline void dDbVw_drawQuadXlu(cXyz* i_points, const GXColor& i_color, u8 i_clipZ) {
- dDbVw_drawQuad(1, i_points, i_color, i_clipZ);
+ dDbVw_drawQuad(J3DSysDrawBuf_Xlu, i_points, i_color, i_clipZ);
}
inline void dDbVw_drawQuadOpa(cXyz* param_1, cXyz* param_2, cXyz* i_pos, s16 i_rotY, const GXColor& i_color, u8 i_clipZ) {
- dDbVw_drawQuad(0, param_1, param_2, i_pos, i_rotY, i_color, i_clipZ);
+ dDbVw_drawQuad(J3DSysDrawBuf_Opa, param_1, param_2, i_pos, i_rotY, i_color, i_clipZ);
}
inline void dDbVw_drawQuadXlu(cXyz* param_1, cXyz* param_2, cXyz* i_pos, s16 i_rotY, const GXColor& i_color, u8 i_clipZ) {
- dDbVw_drawQuad(1, param_1, param_2, i_pos, i_rotY, i_color, i_clipZ);
+ dDbVw_drawQuad(J3DSysDrawBuf_Xlu, param_1, param_2, i_pos, i_rotY, i_color, i_clipZ);
}
inline void dDbVw_drawLineOpa(cXyz& i_start, cXyz& i_end, const GXColor& i_color, u8 i_clipZ, u8 i_width) {
- dDbVw_drawLine(0, i_start, i_end, i_color, i_clipZ, i_width);
+ dDbVw_drawLine(J3DSysDrawBuf_Opa, i_start, i_end, i_color, i_clipZ, i_width);
}
inline void dDbVw_drawLineXlu(cXyz& i_start, cXyz& i_end, const GXColor& i_color, u8 i_clipZ, u8 i_width) {
- dDbVw_drawLine(1, i_start, i_end, i_color, i_clipZ, i_width);
+ dDbVw_drawLine(J3DSysDrawBuf_Xlu, i_start, i_end, i_color, i_clipZ, i_width);
}
inline void dDbVw_drawArrowOpa(cXyz& i_pos, cXyz& param_2, const GXColor& i_color, u8 i_clipZ, u8 i_width) {
- dDbVw_drawArrow(0, i_pos, param_2, i_color, i_clipZ, i_width);
+ dDbVw_drawArrow(J3DSysDrawBuf_Opa, i_pos, param_2, i_color, i_clipZ, i_width);
}
inline void dDbVw_drawArrowXlu(cXyz& i_pos, cXyz& param_2, const GXColor& i_color, u8 i_clipZ, u8 i_width) {
- dDbVw_drawArrow(1, i_pos, param_2, i_color, i_clipZ, i_width);
+ dDbVw_drawArrow(J3DSysDrawBuf_Xlu, i_pos, param_2, i_color, i_clipZ, i_width);
}
inline void dDbVw_drawPointOpa(cXyz& i_pos, const GXColor& i_color, u8 i_clipZ, u8 i_width) {
- dDbVw_drawPoint(0, i_pos, i_color, i_clipZ, i_width);
+ dDbVw_drawPoint(J3DSysDrawBuf_Opa, i_pos, i_color, i_clipZ, i_width);
}
inline void dDbVw_drawPointXlu(cXyz& i_pos, const GXColor& i_color, u8 i_clipZ, u8 i_width) {
- dDbVw_drawPoint(1, i_pos, i_color, i_clipZ, i_width);
+ dDbVw_drawPoint(J3DSysDrawBuf_Xlu, i_pos, i_color, i_clipZ, i_width);
}
inline void dDbVw_drawCircleOpa(cXyz& i_pos, f32 i_radius, const GXColor& i_color, u8 i_clipZ, u8 i_width) {
- dDbVw_drawCircle(0, i_pos, i_radius, i_color, i_clipZ, i_width);
+ dDbVw_drawCircle(J3DSysDrawBuf_Opa, i_pos, i_radius, i_color, i_clipZ, i_width);
}
inline void dDbVw_drawCircleXlu(cXyz& i_pos, f32 i_radius, const GXColor& i_color, u8 i_clipZ, u8 i_width) {
- dDbVw_drawCircle(1, i_pos, i_radius, i_color, i_clipZ, i_width);
+ dDbVw_drawCircle(J3DSysDrawBuf_Xlu, i_pos, i_radius, i_color, i_clipZ, i_width);
}
inline void dDbVw_drawSphereOpa(cXyz& i_pos, f32 i_size, const GXColor& i_color, u8 i_clipZ) {
- dDbVw_drawSphere(0, i_pos, i_size, i_color, i_clipZ);
+ dDbVw_drawSphere(J3DSysDrawBuf_Opa, i_pos, i_size, i_color, i_clipZ);
}
inline void dDbVw_drawSphereXlu(cXyz& i_pos, f32 i_size, const GXColor& i_color, u8 i_clipZ) {
- dDbVw_drawSphere(1, i_pos, i_size, i_color, i_clipZ);
+ dDbVw_drawSphere(J3DSysDrawBuf_Xlu, i_pos, i_size, i_color, i_clipZ);
}
inline void dDbVw_drawCylinderOpa(cXyz& i_pos, f32 i_radius, f32 i_height, const GXColor& i_color, u8 i_clipZ) {
- dDbVw_drawCylinder(0, i_pos, i_radius, i_height, i_color, i_clipZ);
+ dDbVw_drawCylinder(J3DSysDrawBuf_Opa, i_pos, i_radius, i_height, i_color, i_clipZ);
}
inline void dDbVw_drawCylinderXlu(cXyz& i_pos, f32 i_radius, f32 i_height, const GXColor& i_color, u8 i_clipZ) {
- dDbVw_drawCylinder(1, i_pos, i_radius, i_height, i_color, i_clipZ);
+ dDbVw_drawCylinder(J3DSysDrawBuf_Xlu, i_pos, i_radius, i_height, i_color, i_clipZ);
}
inline void dDbVw_drawCylinderMOpa(Mtx i_mtx, const GXColor& i_color, u8 i_clipZ) {
- dDbVw_drawCylinderM(0, i_mtx, i_color, i_clipZ);
+ dDbVw_drawCylinderM(J3DSysDrawBuf_Opa, i_mtx, i_color, i_clipZ);
}
inline void dDbVw_drawCylinderMXlu(Mtx i_mtx, const GXColor& i_color, u8 i_clipZ) {
- dDbVw_drawCylinderM(1, i_mtx, i_color, i_clipZ);
+ dDbVw_drawCylinderM(J3DSysDrawBuf_Xlu, i_mtx, i_color, i_clipZ);
}
int dDbVw_Report(int x, int y, char const* string, ...);
diff --git a/libs/JSystem/src/J3DGraphAnimator/J3DJoint.cpp b/libs/JSystem/src/J3DGraphAnimator/J3DJoint.cpp
index 4091a3b7a1..943848cc30 100644
--- a/libs/JSystem/src/J3DGraphAnimator/J3DJoint.cpp
+++ b/libs/JSystem/src/J3DGraphAnimator/J3DJoint.cpp
@@ -159,8 +159,8 @@ J3DJoint::J3DJoint() {
void J3DJoint::entryIn() {
MtxP anmMtx = j3dSys.getModel()->getAnmMtx(mJntNo);
- j3dSys.getDrawBuffer(0)->setZMtx(anmMtx);
- j3dSys.getDrawBuffer(1)->setZMtx(anmMtx);
+ j3dSys.getDrawBuffer(J3DSysDrawBuf_Opa)->setZMtx(anmMtx);
+ j3dSys.getDrawBuffer(J3DSysDrawBuf_Xlu)->setZMtx(anmMtx);
for (J3DMaterial* mesh = mMesh; mesh != NULL;) {
if (mesh->getShape()->checkFlag(J3DShpFlag_Visible)) {
mesh = mesh->getNext();
diff --git a/libs/JSystem/src/J3DGraphBase/J3DSys.cpp b/libs/JSystem/src/J3DGraphBase/J3DSys.cpp
index 88324c30b5..aad9cf2e3d 100644
--- a/libs/JSystem/src/J3DGraphBase/J3DSys.cpp
+++ b/libs/JSystem/src/J3DGraphBase/J3DSys.cpp
@@ -48,7 +48,7 @@ J3DSys::J3DSys() {
mModel = NULL;
mShape = NULL;
- for (int i = 0; i < 2; i++)
+ for (int i = 0; i < ARRAY_SIZE(mDrawBuffer); i++)
mDrawBuffer[i] = NULL;
mTexture = NULL;
diff --git a/src/d/actor/d_a_mant.cpp b/src/d/actor/d_a_mant.cpp
index 13a7bf148b..4488322b11 100644
--- a/src/d/actor/d_a_mant.cpp
+++ b/src/d/actor/d_a_mant.cpp
@@ -343,7 +343,7 @@ static int daMant_Draw(mant_class* i_this) {
i_this->field_0x0570.setTevStr(&i_this->tevStr);
- j3dSys.getDrawBuffer(0)->entryImm(&i_this->field_0x0570, 0);
+ j3dSys.getDrawBuffer(J3DSysDrawBuf_Opa)->entryImm(&i_this->field_0x0570, 0);
return 1;
}
diff --git a/src/d/actor/d_a_obj_flag2.cpp b/src/d/actor/d_a_obj_flag2.cpp
index 3d844fc5f6..a02eddfc64 100644
--- a/src/d/actor/d_a_obj_flag2.cpp
+++ b/src/d/actor/d_a_obj_flag2.cpp
@@ -433,7 +433,7 @@ int daObjFlag2_c::draw() {
g_env_light.setLightTevColorType_MAJI(mModel, &tevStr);
mDoExt_modelUpdateDL(mModel);
if (mFlagValid) {
- j3dSys.getDrawBuffer(0)->entryImm(&mFlagCloth, 0);
+ j3dSys.getDrawBuffer(J3DSysDrawBuf_Opa)->entryImm(&mFlagCloth, 0);
}
dComIfGd_setList();
return 1;
diff --git a/src/d/actor/d_a_obj_flag3.cpp b/src/d/actor/d_a_obj_flag3.cpp
index 79860012df..ab85476aa8 100644
--- a/src/d/actor/d_a_obj_flag3.cpp
+++ b/src/d/actor/d_a_obj_flag3.cpp
@@ -330,7 +330,7 @@ inline int daObjFlag3_c::draw() {
g_env_light.setLightTevColorType_MAJI(mModel, &tevStr);
mDoExt_modelUpdateDL(mModel);
if (mFlagValid) {
- j3dSys.getDrawBuffer(0)->entryImm(&mFlagCloth, 0);
+ j3dSys.getDrawBuffer(J3DSysDrawBuf_Opa)->entryImm(&mFlagCloth, 0);
}
dComIfGd_setList();
return 1;
diff --git a/src/d/actor/d_a_obj_mirror_chain.cpp b/src/d/actor/d_a_obj_mirror_chain.cpp
index cd35f7450c..cd6f782b10 100644
--- a/src/d/actor/d_a_obj_mirror_chain.cpp
+++ b/src/d/actor/d_a_obj_mirror_chain.cpp
@@ -352,7 +352,7 @@ int daObjMirrorChain_c::draw() {
cXyz* quad = mScissorBegin.getQuad();
PSMTXMultVecArray(mpModel->getBaseTRMtx(), l_offsetScissor, quad, 4);
- j3dSys.setDrawBuffer(dComIfGd_getXluListBG(), 0);
+ j3dSys.setDrawBuffer(dComIfGd_getXluListBG(), J3DSysDrawBuf_Opa);
mScissorEnd.entryPacket();
mDoExt_modelUpdateDL(mpPortalModel);
mScissorBegin.entryPacket();
diff --git a/src/m_Do/m_Do_ext.cpp b/src/m_Do/m_Do_ext.cpp
index 735c8684e7..90a72e96ac 100644
--- a/src/m_Do/m_Do_ext.cpp
+++ b/src/m_Do/m_Do_ext.cpp
@@ -541,13 +541,13 @@ void mDoExt_invisibleModel::entryJoint(cXyz* param_0) {
}
void mDoExt_invisibleModel::entryDL(cXyz* param_0) {
- J3DDrawBuffer* buffer0 = j3dSys.getDrawBuffer(0);
- J3DDrawBuffer* buffer1 = j3dSys.getDrawBuffer(1);
+ J3DDrawBuffer* buffer0 = j3dSys.getDrawBuffer(J3DSysDrawBuf_Opa);
+ J3DDrawBuffer* buffer1 = j3dSys.getDrawBuffer(J3DSysDrawBuf_Xlu);
dComIfGd_setListZxlu();
mDoExt_modelEntryDL(mModel);
entryJoint(param_0);
- j3dSys.setDrawBuffer(buffer0, 0);
- j3dSys.setDrawBuffer(buffer1, 1);
+ j3dSys.setDrawBuffer(buffer0, J3DSysDrawBuf_Opa);
+ j3dSys.setDrawBuffer(buffer1, J3DSysDrawBuf_Xlu);
}
void mDoExt_setupShareTexture(J3DModelData* i_modelData, J3DModelData* i_shareModelData) {