summaryrefslogtreecommitdiff
path: root/include/JSystem/J3DGraphLoader
diff options
context:
space:
mode:
authorLagoLunatic <LagoLunatic@users.noreply.github.com>2025-12-13 00:04:03 -0500
committerGitHub <noreply@github.com>2025-12-12 21:04:03 -0800
commit1b8ea3206dbbaa6e4ebe7b4dfadffd8d85f37480 (patch)
tree334a6f146edd70f260a6d3156e1aad8221b22e42 /include/JSystem/J3DGraphLoader
parent7e514502d2e97781aa0488c08e39e505f29f36f5 (diff)
J3D debug work (#2949)
* J3D debug work * Clean up JSystem GXColor ctors, remove a couple fakematches * Update symbols.txt * Fix res include syntax * Remove fakematch that isn't necessary anymore * Fix some Shield regressions
Diffstat (limited to 'include/JSystem/J3DGraphLoader')
-rw-r--r--include/JSystem/J3DGraphLoader/J3DMaterialFactory.h8
-rw-r--r--include/JSystem/J3DGraphLoader/J3DMaterialFactory_v21.h10
-rw-r--r--include/JSystem/J3DGraphLoader/J3DModelLoader.h2
3 files changed, 10 insertions, 10 deletions
diff --git a/include/JSystem/J3DGraphLoader/J3DMaterialFactory.h b/include/JSystem/J3DGraphLoader/J3DMaterialFactory.h
index 208390a258..bed19cd693 100644
--- a/include/JSystem/J3DGraphLoader/J3DMaterialFactory.h
+++ b/include/JSystem/J3DGraphLoader/J3DMaterialFactory.h
@@ -113,7 +113,7 @@ public:
u32 calcSizePatchedMaterial(J3DMaterial*, int, u32) const;
u32 calcSizeLockedMaterial(J3DMaterial*, int, u32) const;
J3DGXColor newMatColor(int, int) const;
- u8 newColorChanNum(int) const;
+ const u8 newColorChanNum(int) const;
J3DColorChan newColorChan(int, int) const;
J3DGXColor newAmbColor(int, int) const;
u32 newTexGenNum(int) const;
@@ -124,7 +124,7 @@ public:
J3DTevOrder newTevOrder(int, int) const;
J3DGXColorS10 newTevColor(int, int) const;
J3DGXColor newTevKColor(int, int) const;
- u8 newTevStageNum(int) const;
+ const u8 newTevStageNum(int) const;
J3DTevStage newTevStage(int, int) const;
J3DTevSwapModeTable newTevSwapModeTable(int, int) const;
u8 newIndTexStageNum(int) const;
@@ -136,8 +136,8 @@ public:
J3DAlphaComp newAlphaComp(int) const;
J3DBlend newBlend(int) const;
J3DZMode newZMode(int) const;
- u8 newZCompLoc(int) const;
- u8 newDither(int) const;
+ const u8 newZCompLoc(int) const;
+ const u8 newDither(int) const;
J3DNBTScale newNBTScale(int) const;
u16 getMaterialID(int idx) const { return mpMaterialID[idx]; }
diff --git a/include/JSystem/J3DGraphLoader/J3DMaterialFactory_v21.h b/include/JSystem/J3DGraphLoader/J3DMaterialFactory_v21.h
index 5ed3539d37..e1369bbe5f 100644
--- a/include/JSystem/J3DGraphLoader/J3DMaterialFactory_v21.h
+++ b/include/JSystem/J3DGraphLoader/J3DMaterialFactory_v21.h
@@ -56,7 +56,7 @@ public:
u32 countStages(int) const;
J3DMaterial* create(J3DMaterial*, int, u32) const;
J3DGXColor newMatColor(int, int) const;
- u8 newColorChanNum(int) const;
+ const u8 newColorChanNum(int) const;
J3DColorChan newColorChan(int, int) const;
u32 newTexGenNum(int) const;
J3DTexCoord newTexCoord(int, int) const;
@@ -66,15 +66,15 @@ public:
J3DTevOrder newTevOrder(int, int) const;
J3DGXColorS10 newTevColor(int, int) const;
J3DGXColor newTevKColor(int, int) const;
- u8 newTevStageNum(int) const;
+ const u8 newTevStageNum(int) const;
J3DTevStage newTevStage(int, int) const;
J3DTevSwapModeTable newTevSwapModeTable(int, int) const;
J3DFog newFog(int) const;
J3DAlphaComp newAlphaComp(int) const;
J3DBlend newBlend(int) const;
- J3DZMode newZMode(int) const;
- u8 newZCompLoc(int) const;
- u8 newDither(int) const;
+ const J3DZMode newZMode(int) const;
+ const u8 newZCompLoc(int) const;
+ const u8 newDither(int) const;
J3DNBTScale newNBTScale(int) const;
u16 getMaterialID(u16 idx) { return mpMaterialID[idx]; }
diff --git a/include/JSystem/J3DGraphLoader/J3DModelLoader.h b/include/JSystem/J3DGraphLoader/J3DModelLoader.h
index 1e2aa2051a..a0a9709002 100644
--- a/include/JSystem/J3DGraphLoader/J3DModelLoader.h
+++ b/include/JSystem/J3DGraphLoader/J3DModelLoader.h
@@ -239,7 +239,7 @@ enum J3DModelLoaderFlagTypes {
J3DMLF_Material_Color_AmbientOn = 0x80000000
};
-static inline u32 getMdlDataFlag_TevStageNum(u32 flags) { return (flags >> 0x10) & 0x1f; }
+static inline u32 getMdlDataFlag_TevStageNum(u32 flags) { return (flags & 0x001f0000) >> 0x10; }
static inline u32 getMdlDataFlag_TexGenFlag(u32 flags) { return flags & 0x0c000000; }
static inline u32 getMdlDataFlag_ColorFlag(u32 flags) { return flags & 0xc0000000; }
static inline u32 getMdlDataFlag_PEFlag(u32 flags) { return flags & 0x30000000; }