diff options
| author | LagoLunatic <LagoLunatic@users.noreply.github.com> | 2025-06-19 19:03:11 -0400 |
|---|---|---|
| committer | LagoLunatic <LagoLunatic@users.noreply.github.com> | 2025-06-19 19:03:11 -0400 |
| commit | efc33c5fc400aad29d8483411804ca8a3588997d (patch) | |
| tree | ee3e250bc314d1d2364ec05f791a4a0d9227b7d2 /include/JSystem/J3DGraphBase/J3DTexture.h | |
| parent | b295d48d1d9e6219224f826684675c3fba954c0b (diff) | |
Various inline cleanup
Diffstat (limited to 'include/JSystem/J3DGraphBase/J3DTexture.h')
| -rw-r--r-- | include/JSystem/J3DGraphBase/J3DTexture.h | 6 |
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))); |
