daPy_lk_c::draw and linkDraw matched on retail with (void)0 assert, d_a_figure OK

This commit is contained in:
LagoLunatic
2025-06-18 20:14:26 -04:00
parent 264ee5d6e1
commit ede01ca07b
9 changed files with 30 additions and 16 deletions
+1 -1
View File
@@ -1656,7 +1656,7 @@ config.libs = [
ActorRel(NonMatching, "d_a_obj_ekskz"),
ActorRel(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d_a_obj_eskban", extra_cflags=['-pragma "nosyminline on"']),
ActorRel(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d_a_obj_ferris", extra_cflags=['-pragma "nosyminline on"']),
ActorRel(NonMatching, "d_a_obj_figure", extra_cflags=['-pragma "nosyminline on"']),
ActorRel(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d_a_obj_figure", extra_cflags=['-pragma "nosyminline on"']),
ActorRel(NonMatching, "d_a_obj_firewall"),
ActorRel(NonMatching, "d_a_obj_flame"),
ActorRel(NonMatching, "d_a_obj_ftree"),
@@ -620,7 +620,10 @@ public:
u16 getUpdateMaterialNum() const { return mUpdateMaterialNum; }
bool isValidUpdateMaterialID(u16 id) const { return mUpdateMaterialID[id] != 0xFFFF; }
u16 getUpdateMaterialID(u16 idx) const { return mUpdateMaterialID[idx]; }
u16 getUpdateMaterialID(u16 idx) const {
J3D_ASSERT(1578, idx < mUpdateMaterialNum, "Error : range over.");
return mUpdateMaterialID[idx];
}
JUTNameTab * getUpdateMaterialName() { return &mUpdateMaterialName; }
protected:
@@ -3,6 +3,7 @@
#include "JSystem/J3DGraphAnimator/J3DCluster.h"
#include "JSystem/J3DGraphBase/J3DTransform.h"
#include "JSystem/JUtility/JUTAssert.h"
#include "dolphin/types.h"
#include "global.h"
@@ -21,7 +22,10 @@ public:
u16 getClusterNum() const { return mClusterNum; }
u16 getClusterKeyNum() const { return mClusterKeyNum; }
J3DCluster* getClusterPointer(u16 i) { return &mClusterPointer[i]; }
J3DCluster* getClusterPointer(u16 index) {
J3D_ASSERT(186, (index < mClusterNum),"Error : range over.");
return &mClusterPointer[index];
}
J3DClusterKey* getClusterKeyPointer(u16 i) { return &mClusterKeyPointer[i]; }
f32* getVtxPos() { return mVtxPos; }
f32* getVtxNrm() { return mVtxNrm; }
+16 -8
View File
@@ -1,6 +1,7 @@
#ifndef J3DSYS_H
#define J3DSYS_H
#include "JSystem/JUtility/JUTAssert.h"
#include "dolphin/gx/GX.h"
#include "dolphin/types.h"
@@ -53,13 +54,13 @@ public:
void setDrawModeXlu() { mDrawMode = XLU; }
void* getVtxPos() const { return mVtxPos; }
void* getVtxPos() { return mVtxPos; }
void setVtxPos(void* pVtxPos) { mVtxPos = pVtxPos; }
void* getVtxNrm() const { return mVtxNrm; }
void* getVtxNrm() { return mVtxNrm; }
void setVtxNrm(void* pVtxNrm) { mVtxNrm = pVtxNrm; }
void* getVtxCol() const { return mVtxCol; }
void* getVtxCol() { return mVtxCol; }
void setVtxCol(GXColor* pVtxCol) { mVtxCol = pVtxCol; }
void setModel(J3DModel* pModel) { mModel = pModel; }
@@ -69,7 +70,7 @@ public:
void setMaterialMode(u32 mode) { mMaterialMode = mode; }
void setCurrentMtxCalc(J3DMtxCalc * pCalc) { mCurrentMtxCalc = pCalc; }
J3DMtxCalc * getCurrentMtxCalc() const { return mCurrentMtxCalc; }
J3DMtxCalc * getCurrentMtxCalc() { return mCurrentMtxCalc; }
void setTexture(J3DTexture* pTex) { mTexture = pTex; }
J3DTexture* getTexture() { return mTexture; }
@@ -92,14 +93,21 @@ public:
// Type 0: Opa Buffer
// Type 1: Xlu Buffer
void setDrawBuffer(J3DDrawBuffer* buffer, int type) { mDrawBuffer[type] = buffer; }
void setDrawBuffer(J3DDrawBuffer* buffer, int type) {
J3D_ASSERT(114, type >= 0 && type < 2, "Error : range over.");
J3D_ASSERT(115, buffer, "Error : null pointer.");
mDrawBuffer[type] = buffer;
}
// Type 0: Opa Buffer
// Type 1: Xlu Buffer
J3DDrawBuffer* getDrawBuffer(int type) { return mDrawBuffer[type]; }
J3DDrawBuffer* getDrawBuffer(int type) {
J3D_ASSERT(121, type >= 0 && type < 2, "Error : range over.");
return mDrawBuffer[type];
}
Mtx& getModelDrawMtx(u16 no) const { return mModelDrawMtx[no]; }
J3DShapePacket* getShapePacket() const { return mShapePacket; }
Mtx& getModelDrawMtx(u16 no) { return mModelDrawMtx[no]; }
J3DShapePacket* getShapePacket() { return mShapePacket; }
J3DModel* getModel() { return mModel; }
Vec* getNBTScale() { return mNBTScale; }
+2
View File
@@ -18,6 +18,8 @@
} \
}
#define J3D_ASSERT(LINE, COND, MSG) (void)0
#define JUT_WARN(LINE, ...) \
JUTAssertion::setWarningMessage_f(JUTAssertion::getSDevice(), __FILE__, LINE, __VA_ARGS__); \
+1 -1
View File
@@ -106,7 +106,7 @@ JAInter::SeParameter::SeParameter() {}
void JAInter::SeMgr::startSeSequence() {
seHandle = NULL;
JAIBasic::msBasic->startSoundActor(0x80000800, &seHandle, NULL, 1, 4);
JUT_ASSERT_MSG(149, JAISeMgr::seHandle, "SEシーケンスの再生に失敗しました。\n")
JUT_ASSERT_MSG(149, JAISeMgr::seHandle, "SEシーケンスの再生に失敗しました。\n");
}
/* 80293508-80293530 .text processGFrameSe__Q27JAInter5SeMgrFv */
+1 -1
View File
@@ -42,7 +42,7 @@ SoundInfo* JAInter::SoundTable::getInfoPointer(u32 param_1) {
switch (param_1 & JAISoundID_TypeMask) {
case JAISoundID_Type_Se:
_category = param_1 >> 12 & 0xff;
JUT_ASSERT_MSG(61, (_category<JAIGlobalParameter::getParamSeCategoryMax()), "getInfoPointer 登録されていないSEカテゴリーナンバーが指定されました。\n")
JUT_ASSERT_MSG(61, (_category<JAIGlobalParameter::getParamSeCategoryMax()), "getInfoPointer 登録されていないSEカテゴリーナンバーが指定されました。\n");
break;
case JAISoundID_Type_Sequence:
_category = 16;
-2
View File
@@ -1049,8 +1049,6 @@ static BOOL daSampleIsDelete(void*) {
/* 00001B08-00002148 .text linkDraw__FP14mDoExt_McaMorf */
void linkDraw(mDoExt_McaMorf* pMorf) {
/* Nonmatching - retail-only regalloc (maybe the same issue as daPy_lk_c::draw?) */
pMorf->calc();
#if VERSION > VERSION_DEMO
J3DModel* model = pMorf->getModel();
-1
View File
@@ -1671,7 +1671,6 @@ void daPy_lk_c::onBodyEffect() {
/* 80107308-80108204 .text draw__9daPy_lk_cFv */
BOOL daPy_lk_c::draw() {
/* Nonmatching - retail-only regalloc (maybe the same issue as linkDraw in d_a_obj_figure.cpp?) */
if (mSightPacket.getDrawFlg()) {
mSightPacket.setSight();
}