summaryrefslogtreecommitdiff
path: root/src/d
diff options
context:
space:
mode:
authorLagoLunatic <LagoLunatic@users.noreply.github.com>2025-12-26 19:20:21 -0500
committerGitHub <noreply@github.com>2025-12-26 16:20:21 -0800
commit09280ae00bf6e457aa4694dbcb3f8388f702f3b9 (patch)
tree05a1146271664c2d81756eaa162f11b4823ae1d0 /src/d
parent4ebf9fac9f21ffb7a0c9f33317001e83e82a39ac (diff)
Fix optimization flag for Shield (#3004)
* Fix optimization flag for Shield * Minor debug work * Fix NULL asserts
Diffstat (limited to 'src/d')
-rw-r--r--src/d/actor/d_a_npc_ashB.cpp2
-rw-r--r--src/d/actor/d_a_obj_brakeeff.cpp2
-rw-r--r--src/d/actor/d_a_obj_shield.cpp4
-rw-r--r--src/d/actor/d_a_tag_watchge.cpp7
-rw-r--r--src/d/actor/d_a_title.cpp1
-rw-r--r--src/d/d_map_path.cpp2
-rw-r--r--src/d/d_menu_fmap.cpp2
7 files changed, 13 insertions, 7 deletions
diff --git a/src/d/actor/d_a_npc_ashB.cpp b/src/d/actor/d_a_npc_ashB.cpp
index 2073b86fa9..0a61d67882 100644
--- a/src/d/actor/d_a_npc_ashB.cpp
+++ b/src/d/actor/d_a_npc_ashB.cpp
@@ -943,7 +943,7 @@ bool daNpcAshB_c::demo(void* param_0) {
s32 staff_id = evtmgr.getMyStaffId(l_myName, NULL, 0);
if (staff_id != -1) {
mStaffID = staff_id;
- JUT_ASSERT(1523, mEvtSeqList[mOrderEvtNo] != 0);
+ JUT_ASSERT(1523, mEvtSeqList[mOrderEvtNo] != NULL);
if ((this->*(mEvtSeqList[mOrderEvtNo]))(staff_id)) {
evtmgr.cutEnd(staff_id);
}
diff --git a/src/d/actor/d_a_obj_brakeeff.cpp b/src/d/actor/d_a_obj_brakeeff.cpp
index cf8a2b06b0..d9299694f9 100644
--- a/src/d/actor/d_a_obj_brakeeff.cpp
+++ b/src/d/actor/d_a_obj_brakeeff.cpp
@@ -147,7 +147,7 @@ int useHeapInit(fopAc_ac_c* i_this) {
J3DModelData* modelData =
static_cast<J3DModelData*>(dComIfG_getObjectRes("Obj_Bef", bef_bmd[a_this->mEffectType]));
- JUT_ASSERT(339, modelData != 0);
+ JUT_ASSERT(339, modelData != NULL);
a_this->mpModel = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000084);
diff --git a/src/d/actor/d_a_obj_shield.cpp b/src/d/actor/d_a_obj_shield.cpp
index d2105d38b0..9815391dfa 100644
--- a/src/d/actor/d_a_obj_shield.cpp
+++ b/src/d/actor/d_a_obj_shield.cpp
@@ -349,11 +349,13 @@ static int daItemShield_Execute(daItemShield_c* i_this) {
}
static int daItemShield_Delete(daItemShield_c* i_this) {
+ fopAcM_RegisterDeleteID(i_this, "ObjSShield");
return i_this->_delete();
}
static int daItemShield_Create(fopAc_ac_c* i_this) {
- return static_cast<daItemShield_c*>(i_this)->create();
+ fopAcM_RegisterCreateID(daItemShield_c, i_this, "ObjSShield");
+ return a_this->create();
}
static actor_method_class l_daItemShield_Method = {
diff --git a/src/d/actor/d_a_tag_watchge.cpp b/src/d/actor/d_a_tag_watchge.cpp
index 7c1b06a5c1..15b920f211 100644
--- a/src/d/actor/d_a_tag_watchge.cpp
+++ b/src/d/actor/d_a_tag_watchge.cpp
@@ -59,17 +59,20 @@ static int daTagWatchGe_Delete(daTagWatchGe_c* i_this) {
int daTagWatchGe_c::create() {
fopAcM_ct(this, daTagWatchGe_c);
+ OS_REPORT("Tag_WatchGe PARAM %x\n", fopAcM_GetParam(this));
mGroupNo = fopAcM_GetParam(this);
if (mGroupNo == 0xFF) {
+ OS_REPORT("監視するグェーのグループが指定されてません!");
return cPhs_ERROR_e;
} else {
- field_0x568 = fopAcM_GetParam(this) >> 8;
+ field_0x568 = (fopAcM_GetParam(this) >> 8) & 0xFF;
if (field_0x568 == 0xFF) {
+ OS_REPORT("グェー監視タグのスイッチが指定されてません!");
return cPhs_ERROR_e;
}
- if (dComIfGs_isSwitch(field_0x568,fopAcM_GetRoomNo(this)) != 0) {
+ if (dComIfGs_isSwitch(field_0x568, fopAcM_GetRoomNo(this)) != 0) {
return cPhs_ERROR_e;
}
}
diff --git a/src/d/actor/d_a_title.cpp b/src/d/actor/d_a_title.cpp
index 22d39a7bbb..3072d3c24c 100644
--- a/src/d/actor/d_a_title.cpp
+++ b/src/d/actor/d_a_title.cpp
@@ -117,6 +117,7 @@ int daTitle_c::create() {
field_0x5f9 = 0;
m2DHeap = JKRExpHeap::create(0x8000, mDoExt_getGameHeap(), false);
+ JUT_ASSERT(345, m2DHeap != NULL);
loadWait_init();
g_daTitHIO.field_0x4 = -1;
diff --git a/src/d/d_map_path.cpp b/src/d/d_map_path.cpp
index afba0654ff..d34b981e89 100644
--- a/src/d/d_map_path.cpp
+++ b/src/d/d_map_path.cpp
@@ -173,7 +173,7 @@ bool dMpath_HIO_file_base_c::readBinaryFile(const char* param_1) {
if (file.open(JORFile::EFlags_READ, r26, NULL, NULL, NULL)) {
s32 r28 = file.getFileSize();
char* buf = new char[r28];
- JUT_ASSERT(855, buf != 0);
+ JUT_ASSERT(855, buf != NULL);
file.readData(buf, r28);
copyReadBufToData(buf, r28);
OSReport("write read success!::%6d\n", r28);
diff --git a/src/d/d_menu_fmap.cpp b/src/d/d_menu_fmap.cpp
index 649df3039f..1fb29a54ce 100644
--- a/src/d/d_menu_fmap.cpp
+++ b/src/d/d_menu_fmap.cpp
@@ -189,7 +189,7 @@ dMenu_Fmap_c::dMenu_Fmap_c(JKRExpHeap* i_heap, STControl* i_stick, CSTControl* i
}
mpTalkHeap = JKRCreateExpHeap(0x32000, mpHeap, false);
- JUT_ASSERT(359, mpTalkHeap != 0);
+ JUT_ASSERT(359, mpTalkHeap != NULL);
field_0x200 = 0;
mIsWarpMap = false;