summaryrefslogtreecommitdiff
path: root/src/d/actor/d_a_npc_btsw2.cpp
diff options
context:
space:
mode:
authorLagoLunatic <LagoLunatic@users.noreply.github.com>2024-02-29 16:28:38 -0500
committerLagoLunatic <LagoLunatic@users.noreply.github.com>2024-02-29 16:28:38 -0500
commite47938b60dfd62c8060675ee441547becbbbb800 (patch)
treee29ed6a7b04e308f5e8d0d42cf3f095cde207bec /src/d/actor/d_a_npc_btsw2.cpp
parent533cd90a5fc209043b0b3f766b867698c1973909 (diff)
d_a_bk work
Diffstat (limited to 'src/d/actor/d_a_npc_btsw2.cpp')
-rw-r--r--src/d/actor/d_a_npc_btsw2.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/d/actor/d_a_npc_btsw2.cpp b/src/d/actor/d_a_npc_btsw2.cpp
index c9145647..51f3e3ea 100644
--- a/src/d/actor/d_a_npc_btsw2.cpp
+++ b/src/d/actor/d_a_npc_btsw2.cpp
@@ -349,18 +349,16 @@ void daNpc_Btsw2_c::anmAtr(u16) {
/* 0000097C-000009EC .text getMsg__13daNpc_Btsw2_cFv */
u32 daNpc_Btsw2_c::getMsg() {
+ u32 ret;
if (!dComIfGs_isEventBit(0x3102)) {
dComIfGs_onEventBit(0x3102);
- return 0x1AB0;
- }
-
- // Fakematch? Need to force the compiler to use a branch here, but it optimizes an if statement away.
- switch (dKy_daynight_check()) {
- default:
- return 0x1AB2;
- case FALSE:
- return 0x1AB1;
+ ret = 0x1AB0;
+ } else if (dKy_daynight_check()) {
+ ret = 0x1AB2;
+ } else {
+ ret = 0x1AB1;
}
+ return ret;
}
/* 000009EC-000009F4 .text next_msgStatus__13daNpc_Btsw2_cFPUl */