diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/JSystem/JUtility/JUTAssert.h | 8 | ||||
| -rw-r--r-- | include/SSystem/SComponent/c_cc_d.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/include/JSystem/JUtility/JUTAssert.h b/include/JSystem/JUtility/JUTAssert.h index d1f509e7..e54d4744 100644 --- a/include/JSystem/JUtility/JUTAssert.h +++ b/include/JSystem/JUtility/JUTAssert.h @@ -10,6 +10,14 @@ OSPanic(__FILE__, LINE, "Halt"); \ } +// Some asserts on floats have the wrong codegen with JUT_ASSERT's (COND) == 0 check. +// Using !(COND) instead fixes them. +#define JUT_ASSERT_FLOAT(LINE, COND) \ + if (!(COND)) { \ + JUTAssertion::showAssert(JUTAssertion::getSDevice(), __FILE__, LINE, #COND); \ + OSPanic(__FILE__, LINE, "Halt"); \ + } + #define JUT_PANIC(LINE) \ JUTAssertion::showAssert(JUTAssertion::getSDevice(), __FILE__, LINE, "0"); \ OSPanic(__FILE__, LINE, "Halt"); diff --git a/include/SSystem/SComponent/c_cc_d.h b/include/SSystem/SComponent/c_cc_d.h index 1150df6e..ef248f18 100644 --- a/include/SSystem/SComponent/c_cc_d.h +++ b/include/SSystem/SComponent/c_cc_d.h @@ -326,6 +326,7 @@ private: /* 0x14 */ u8 mWeight; /* 0x15 */ u8 field_0x15; /* 0x16 */ u8 mDmg; + /* 0x18 */ /* vtable */ public: cCcD_Stts() {} |
