From f0b9e5f8fb251bb1b3a6acd13c0550bec2c9a310 Mon Sep 17 00:00:00 2001 From: hatal175 Date: Fri, 29 Aug 2025 03:06:41 +0300 Subject: [PATCH] Align dKy_darkworld_check with debug return type --- include/d/actor/d_a_npc.h | 4 ++-- include/d/actor/d_a_passer_mng.h | 29 +++++++++++++++++++---------- include/d/d_kankyo.h | 2 +- src/d/actor/d_a_passer_mng.cpp | 2 +- src/d/d_kankyo.cpp | 6 +++--- 5 files changed, 26 insertions(+), 17 deletions(-) diff --git a/include/d/actor/d_a_npc.h b/include/d/actor/d_a_npc.h index 03ab86691ce..0d765d6e7a1 100644 --- a/include/d/actor/d_a_npc.h +++ b/include/d/actor/d_a_npc.h @@ -502,7 +502,7 @@ public: /* 0xA80 */ f32 mExpressionMorfFrame; /* 0xA84 */ f32 mMorfFrames; /* 0xA88 */ bool mCreating; - /* 0xA89 */ bool mTwilight; + /* 0xA89 */ u8 mTwilight; /* 0xA8C */ dBgS_GndChk field_0xa8c; /* 0xAE0 */ dBgS_LinChk mLinChk; /* 0xB50 */ daNpcT_MotionSeqMngr_c mFaceMotionSeqMngr; @@ -1053,7 +1053,7 @@ protected: /* 0x9F1 */ u8 field_0x9f1; /* 0x9F2 */ bool mHide; /* 0x9F3 */ u8 field_0x9f3; - /* 0x9F4 */ bool mTwilight; + /* 0x9F4 */ u8 mTwilight; /* 0x9F5 */ u8 field_0x9f5; /* 0x9F6 */ u8 field_0x9f6; /* 0x9F8 */ dMsgFlow_c mFlow; diff --git a/include/d/actor/d_a_passer_mng.h b/include/d/actor/d_a_passer_mng.h index c7f45fcd852..1d54fb96017 100644 --- a/include/d/actor/d_a_passer_mng.h +++ b/include/d/actor/d_a_passer_mng.h @@ -26,34 +26,43 @@ public: u8 getDetailLevel() { return subtype; } u8 getPathID() { return fopAcM_GetParam(this); } u8 getIntervalTime() { return fopAcM_GetParam(this) >> 24; } - int getStartTime() { return (fopAcM_GetParam(this) >> 8) & 0xff; } + u8 getStartTime() { return (fopAcM_GetParam(this) >> 8) & 0xff; } u8 getEndTime() { return (fopAcM_GetParam(this) >> 16) & 0xff; } u8 getMaxNum() { return shape_angle.x; } u8 getGroupNo() { return (shape_angle.x >> 8) & 0xff; } int getTimeHour() { + int hour; if (dKy_darkworld_check()) { - return dKy_getDarktime_hour(); - } - return dKy_getdaytime_hour(); + hour = dKy_getDarktime_hour(); + } else { + hour = dKy_getdaytime_hour(); + } + return hour; } int getTimeMinute() { + int minute; if (dKy_darkworld_check()) { - return dKy_getDarktime_minute(); - } - return dKy_getdaytime_minute(); + minute = dKy_getDarktime_minute(); + } else { + minute = dKy_getdaytime_minute(); + } + return minute; } - int getTime() { + int getTime() { return getTimeHour() * 60 + getTimeMinute(); } int getDayOfWeek() { + int dayOfWeek; if (dKy_darkworld_check()) { - return dKy_getDarktime_week(); + dayOfWeek = dKy_getDarktime_week(); + } else { + dayOfWeek = dKy_get_dayofweek(); } - return dKy_get_dayofweek(); + return dayOfWeek; } int getChildNum() { diff --git a/include/d/d_kankyo.h b/include/d/d_kankyo.h index 6adeba32c93..c99dcf4ce3d 100644 --- a/include/d/d_kankyo.h +++ b/include/d/d_kankyo.h @@ -579,7 +579,7 @@ int dKy_WolfEyeLight_set(cXyz* pos_p, f32 angle_x, f32 angle_y, f32 cutoff, GXCo BOOL dKy_TeachWind_existence_chk(); u8 dKy_darkworld_stage_check(char const* stageName, int roomNo); BOOL dKy_withwarp_capture_check(); -bool dKy_darkworld_check(); +u8 dKy_darkworld_check(); void dKy_undwater_filter_draw(); BOOL dKy_camera_water_in_status_check(); int dKy_Outdoor_check(); diff --git a/src/d/actor/d_a_passer_mng.cpp b/src/d/actor/d_a_passer_mng.cpp index afa1db6ed21..e42f4c6dbab 100644 --- a/src/d/actor/d_a_passer_mng.cpp +++ b/src/d/actor/d_a_passer_mng.cpp @@ -82,7 +82,7 @@ int daPasserMng_c::getPasserParam() { u8 groupNo = getGroupNo(); if (groupNo == 0xff || groupNo >= 4) { // The passerby group specification is invalid. - OS_REPORT("\n通行人のグループ指定が不正です! GroupNo=%d\n\n", groupNo); + OS_REPORT_ERROR("\n通行人のグループ指定が不正です! GroupNo=%d\n\n", groupNo); } bool groupOK = false; if (groupNo != 0xff && groupNo < 4) { diff --git a/src/d/d_kankyo.cpp b/src/d/d_kankyo.cpp index bca8a408dfe..a679c047eba 100644 --- a/src/d/d_kankyo.cpp +++ b/src/d/d_kankyo.cpp @@ -6566,10 +6566,10 @@ void dKy_depth_dist_set(void* process_p) { } /* 801AC57C-801AC5BC 1A6EBC 0040+00 13/13 21/21 134/134 .text dKy_darkworld_check__Fv */ -bool dKy_darkworld_check() { - bool check = false; +u8 dKy_darkworld_check() { + BOOL check = FALSE; if (dComIfGp_world_dark_get() == TRUE) { - check = true; + check = TRUE; } return check;