summaryrefslogtreecommitdiff
path: root/src/f_pc/f_pc_base.cpp
diff options
context:
space:
mode:
authorJasper St. Pierre <jstpierre@mecheye.net>2023-09-09 22:13:52 -0700
committerJasper St. Pierre <jstpierre@mecheye.net>2023-09-09 22:13:52 -0700
commit5ea54cb07106dfd0e6dcb96d4d4381409d7bf6a8 (patch)
tree3ebdc36de0578f1907a4ee8483a832e66d61a373 /src/f_pc/f_pc_base.cpp
parent33c20f5323d3a7ab609ba92a5cdc5ab9bcfa2545 (diff)
f_pc mostly matching
Diffstat (limited to 'src/f_pc/f_pc_base.cpp')
-rw-r--r--src/f_pc/f_pc_base.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/f_pc/f_pc_base.cpp b/src/f_pc/f_pc_base.cpp
index 9a5e9e1f..5d79c72f 100644
--- a/src/f_pc/f_pc_base.cpp
+++ b/src/f_pc/f_pc_base.cpp
@@ -13,9 +13,15 @@
#include "f_pc/f_pc_profile.h"
#include "dolphin/types.h"
+// hack to make functions that return comparisons as int match
+extern int __cntlzw(unsigned int);
+inline BOOL checkEqual(s32 a, s32 b) {
+ return (u32)__cntlzw(a - b) >> 5;
+}
+
/* 8003C88C-8003C89C .text fpcBs_Is_JustOfType__Fii */
-bool fpcBs_Is_JustOfType(int i_typeA, int i_typeB) {
- return i_typeB == i_typeA;
+BOOL fpcBs_Is_JustOfType(int i_typeA, int i_typeB) {
+ return checkEqual(i_typeA, i_typeB);
}
static int g_fpcBs_type;