summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLagoLunatic <LagoLunatic@users.noreply.github.com>2025-12-27 17:03:26 -0500
committerLagoLunatic <LagoLunatic@users.noreply.github.com>2025-12-27 21:32:04 -0500
commit48dcebd9e88e9b592572ed906c505ee71df6f4f2 (patch)
tree2153980fcdbf41886c95cd757aee2c612a13d80c /src
parent47ce38557bea9d6679e696bba5effe3cd98964b1 (diff)
Misc cleanup
Diffstat (limited to 'src')
-rw-r--r--src/d/actor/d_a_obj_pbco.cpp2
-rw-r--r--src/d/actor/d_a_obj_pbka.cpp2
-rw-r--r--src/d/d_save.cpp2
-rw-r--r--src/f_op/f_op_actor_mng.cpp4
-rw-r--r--src/m_Do/m_Do_MemCardRWmng.cpp22
5 files changed, 17 insertions, 15 deletions
diff --git a/src/d/actor/d_a_obj_pbco.cpp b/src/d/actor/d_a_obj_pbco.cpp
index 399a20a1..177d4b6c 100644
--- a/src/d/actor/d_a_obj_pbco.cpp
+++ b/src/d/actor/d_a_obj_pbco.cpp
@@ -111,7 +111,7 @@ static BOOL daObj_PbcoExecute(void* i_this) {
bool daObj_Pbco_c::_draw() {
dKy_tevstr_c* pTevStr;
- g_env_light.settingTevStruct(TEV_TYPE_BG0, &current.pos, pTevStr = &tevStr);
+ g_env_light.settingTevStruct(TEV_TYPE_BG0, &current.pos, pTevStr = &tevStr); // fakematch
g_env_light.setLightTevColorType(mpModel, pTevStr);
mDoExt_modelUpdateDL(mpModel);
return TRUE;
diff --git a/src/d/actor/d_a_obj_pbka.cpp b/src/d/actor/d_a_obj_pbka.cpp
index 722766be..3bffe3ec 100644
--- a/src/d/actor/d_a_obj_pbka.cpp
+++ b/src/d/actor/d_a_obj_pbka.cpp
@@ -77,7 +77,7 @@ static BOOL daObjPbka_Delete(void* i_this) {
bool daObjPbka_c::_draw() {
dKy_tevstr_c * pTevStr;
- g_env_light.settingTevStruct(TEV_TYPE_BG0, &current.pos, pTevStr = &tevStr);
+ g_env_light.settingTevStruct(TEV_TYPE_BG0, &current.pos, pTevStr = &tevStr); // fakematch
g_env_light.setLightTevColorType(mpModel, pTevStr);
dComIfGd_setListBG();
mDoExt_modelUpdateDL(mpModel);
diff --git a/src/d/d_save.cpp b/src/d/d_save.cpp
index 67725895..d01bbb15 100644
--- a/src/d/d_save.cpp
+++ b/src/d/d_save.cpp
@@ -1180,7 +1180,7 @@ u8 dSv_event_c::getEventReg(u16 i_reg) {
/* 8005CB94-8005CBB0 .text init__13dSv_reserve_cFv */
void dSv_reserve_c::init() {
- for (int i = 0; i < sizeof(dSv_reserve_c); i++) {
+ for (int i = 0; i < ARRAY_SIZE(mReserve); i++) {
mReserve[i] = 0;
}
}
diff --git a/src/f_op/f_op_actor_mng.cpp b/src/f_op/f_op_actor_mng.cpp
index f45a659e..623d80ff 100644
--- a/src/f_op/f_op_actor_mng.cpp
+++ b/src/f_op/f_op_actor_mng.cpp
@@ -276,9 +276,9 @@ s32 fopAcM_createHeap(fopAc_ac_c* i_this, u32 size, u32 align) {
align = 0x20;
i_this->heap = mDoExt_createSolidHeapFromGameToCurrent(size, align);
- if (i_this->heap == 0) {
+ if (i_this->heap == NULL) {
OSReport_Error("fopAcM_createHeap 確保失敗\n");
- JUT_CONFIRM(0x34c, i_this->heap != 0);
+ JUT_CONFIRM(0x34c, i_this->heap != NULL);
return FALSE;
}
diff --git a/src/m_Do/m_Do_MemCardRWmng.cpp b/src/m_Do/m_Do_MemCardRWmng.cpp
index c4802656..2cbad6fe 100644
--- a/src/m_Do/m_Do_MemCardRWmng.cpp
+++ b/src/m_Do/m_Do_MemCardRWmng.cpp
@@ -15,6 +15,14 @@
#include <string.h>
#include <stdio.h>
+#if VERSION <= VERSION_JPN
+#define HEADER_TITLE "ゼルダの伝説~風のタクト~"
+#define HEADER_COMMENT "%d月%d日のセーブデータです"
+#else
+#define HEADER_TITLE "Zelda: The Wind Waker"
+#define HEADER_COMMENT "%d/%d Save Data"
+#endif
+
static u8 sTmpBuf[0x2000] ALIGN_DECL(32);
static u8 sTmpBuf2[0x2000] ALIGN_DECL(32);
static u32 sSaveCount;
@@ -197,19 +205,11 @@ s32 mDoMemCdRWm_Restore2(CARDFileInfo* card) {
/* 80019F4C-8001A0A8 .text mDoMemCdRWm_BuildHeader__FP22mDoMemCdRWm_HeaderData */
void mDoMemCdRWm_BuildHeader(mDoMemCdRWm_HeaderData* header) {
-#if VERSION <= VERSION_JPN
- snprintf(header->comment, sizeof(header->comment), "ゼルダの伝説~風のタクト~");
-#else
- snprintf(header->comment, sizeof(header->comment), "Zelda: The Wind Waker");
-#endif
+ snprintf(header->comment, sizeof(header->comment), HEADER_TITLE);
OSTime time = OSGetTime();
OSCalendarTime cal;
OSTicksToCalendarTime(time, &cal);
-#if VERSION <= VERSION_JPN
- snprintf(header->info, sizeof(header->info), "%d月%d日のセーブデータです", cal.month + 1, cal.day_of_month);
-#elif VERSION == VERSION_USA
- snprintf(header->info, sizeof(header->info), "%d/%d Save Data", cal.month + 1, cal.day_of_month);
-#else
+#if VERSION == VERSION_PAL
switch (dComIfGs_getPalLanguage()) {
case 0:
snprintf(header->info, sizeof(header->info), "%d/%d Save Data", cal.month + 1, cal.day_of_month);
@@ -227,6 +227,8 @@ void mDoMemCdRWm_BuildHeader(mDoMemCdRWm_HeaderData* header) {
snprintf(header->info, sizeof(header->info), "Dati salvati: %d/%d", cal.day_of_month, cal.month + 1);
break;
}
+#else
+ snprintf(header->info, sizeof(header->info), HEADER_COMMENT, cal.month + 1, cal.day_of_month);
#endif
mDoDvdThd_mountArchive_c* cmd = mDoDvdThd_mountArchive_c::create("/res/CardIcon/cardicon.arc", 0, NULL);
while (!cmd->sync()) ;