summaryrefslogtreecommitdiff
path: root/include/JSystem/J3DGraphBase/J3DTexture.h
diff options
context:
space:
mode:
authorLagoLunatic <LagoLunatic@users.noreply.github.com>2025-06-19 19:03:11 -0400
committerLagoLunatic <LagoLunatic@users.noreply.github.com>2025-06-19 19:03:11 -0400
commitefc33c5fc400aad29d8483411804ca8a3588997d (patch)
treeee3e250bc314d1d2364ec05f791a4a0d9227b7d2 /include/JSystem/J3DGraphBase/J3DTexture.h
parentb295d48d1d9e6219224f826684675c3fba954c0b (diff)
Various inline cleanup
Diffstat (limited to 'include/JSystem/J3DGraphBase/J3DTexture.h')
-rw-r--r--include/JSystem/J3DGraphBase/J3DTexture.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/JSystem/J3DGraphBase/J3DTexture.h b/include/JSystem/J3DGraphBase/J3DTexture.h
index 19bee0e0..451dc2a3 100644
--- a/include/JSystem/J3DGraphBase/J3DTexture.h
+++ b/include/JSystem/J3DGraphBase/J3DTexture.h
@@ -4,6 +4,7 @@
#include "JSystem/J3DGraphBase/J3DGD.h"
#include "JSystem/J3DGraphBase/J3DStruct.h"
#include "JSystem/J3DGraphBase/J3DTevs.h"
+#include "JSystem/JUtility/JUTAssert.h"
#include "JSystem/JUtility/JUTTexture.h"
#include "dolphin/mtx/mtx.h"
#include "dolphin/types.h"
@@ -42,7 +43,10 @@ public:
void addResTIMG(u16, ResTIMG const*);
u16 getNum() const { return mNum; }
- ResTIMG* getResTIMG(u16 entry) const { return &mpRes[entry]; }
+ ResTIMG* getResTIMG(u16 entry) const {
+ J3D_ASSERT(72, entry < mNum, "Error : range over.");
+ return &mpRes[entry];
+ }
void setResTIMG(u16 entry, const ResTIMG& timg) {
mpRes[entry] = timg;
mpRes[entry].imageOffset = ((mpRes[entry].imageOffset + (u32)&timg - (u32)(mpRes + entry)));