From a87c70990eeb115631b07c06a88202ad45217102 Mon Sep 17 00:00:00 2001 From: LagoLunatic Date: Wed, 18 Jun 2025 20:58:29 -0400 Subject: [PATCH] Add another (void)0 assert, fixing regalloc in daPy_lk_c::initTextureScroll and J3DMaterialAttach --- configure.py | 2 +- include/JSystem/J3DGraphAnimator/J3DAnimation.h | 5 ++++- src/JSystem/J3DGraphAnimator/J3DMaterialAttach.cpp | 2 -- src/d/actor/d_a_player_main.cpp | 1 - 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/configure.py b/configure.py index ab9b32333..3e4685066 100755 --- a/configure.py +++ b/configure.py @@ -1004,7 +1004,7 @@ config.libs = [ Object(NonMatching, "JSystem/J3DGraphAnimator/J3DCluster.cpp"), Object(NonMatching, "JSystem/J3DGraphAnimator/J3DJoint.cpp"), Object(Matching, "JSystem/J3DGraphAnimator/J3DNode.cpp"), - Object(NonMatching, "JSystem/J3DGraphAnimator/J3DMaterialAttach.cpp"), + Object(Matching, "JSystem/J3DGraphAnimator/J3DMaterialAttach.cpp"), ], ), JSystemLib( diff --git a/include/JSystem/J3DGraphAnimator/J3DAnimation.h b/include/JSystem/J3DGraphAnimator/J3DAnimation.h index 4f1b6f6f1..4cef4cbb1 100644 --- a/include/JSystem/J3DGraphAnimator/J3DAnimation.h +++ b/include/JSystem/J3DGraphAnimator/J3DAnimation.h @@ -427,7 +427,10 @@ public: u16 getUpdateMaterialID(u16 idx) const { return mUpdateMaterialID[idx]; } u16 getUpdateMaterialNum() const { return mTrackNum / 3; } JUTNameTab * getUpdateMaterialName() { return &mUpdateMaterialName; } - u16 getUpdateTexMtxID(u16 idx) const { return mUpdateTexMtxID[idx]; } + u16 getUpdateTexMtxID(u16 idx) const { + J3D_ASSERT(1017, idx > (mTrackNum / 3), "Error : range over."); + return mUpdateTexMtxID[idx]; + } u16 getPostUpdateMaterialID(u16 idx) const { return mPostUpdateMaterialID[idx]; } u16 getPostUpdateMaterialNum() const { return mPostTrackNum / 3; } diff --git a/src/JSystem/J3DGraphAnimator/J3DMaterialAttach.cpp b/src/JSystem/J3DGraphAnimator/J3DMaterialAttach.cpp index dcb493ffa..6474eaf7d 100644 --- a/src/JSystem/J3DGraphAnimator/J3DMaterialAttach.cpp +++ b/src/JSystem/J3DGraphAnimator/J3DMaterialAttach.cpp @@ -53,7 +53,6 @@ s32 J3DMaterialTable::entryMatColorAnimator(J3DAnmColor* pAnm) { /* 802F5DC8-802F6058 .text entryTexMtxAnimator__16J3DMaterialTableFP19J3DAnmTextureSRTKey */ s32 J3DMaterialTable::entryTexMtxAnimator(J3DAnmTextureSRTKey* pAnm) { - /* Nonmatching */ s32 ret = 0; u16 materialNum = pAnm->getUpdateMaterialNum(); @@ -277,7 +276,6 @@ s32 J3DMaterialTable::setTexNoAnimator(J3DAnmTexPattern* pAnm, J3DTexNoAnm* pAnm /* 802F6600-802F6798 .text setTexMtxAnimator__16J3DMaterialTableFP19J3DAnmTextureSRTKeyP12J3DTexMtxAnmP12J3DTexMtxAnm */ s32 J3DMaterialTable::setTexMtxAnimator(J3DAnmTextureSRTKey* pAnm, J3DTexMtxAnm* pTexAnm, J3DTexMtxAnm* pDualAnmR) { - /* Nonmatching - regalloc */ s32 ret = 0; u16 materialNum = pAnm->getUpdateMaterialNum(); diff --git a/src/d/actor/d_a_player_main.cpp b/src/d/actor/d_a_player_main.cpp index 3e06472f8..2b78524a4 100644 --- a/src/d/actor/d_a_player_main.cpp +++ b/src/d/actor/d_a_player_main.cpp @@ -11841,7 +11841,6 @@ void daPy_lk_c::initTextureAnime() { /* 80123360-80123830 .text initTextureScroll__9daPy_lk_cFv */ void daPy_lk_c::initTextureScroll() { - /* Nonmatching - retail-only regalloc */ m_tex_scroll_heap.m_buffer = new(0x20) u8[0x800]; JUT_ASSERT(VERSION_SELECT(20757, 20944, 20944, 20944), m_tex_scroll_heap.m_buffer != NULL);