Added some more patch functionality, added recomp namespace

This commit is contained in:
Mr-Wiseguy
2023-11-24 17:10:21 -05:00
parent 3b06ad52f0
commit ec23ef02fd
18 changed files with 628 additions and 230 deletions
+5 -1
View File
@@ -2,6 +2,7 @@
#define __RECOMP_HELPERS__
#include "recomp.h"
#include "../ultramodern/ultra64.h"
template<int index, typename T>
T _arg(uint8_t* rdram, recomp_context* ctx) {
@@ -13,7 +14,10 @@ T _arg(uint8_t* rdram, recomp_context* ctx) {
return ctx->f12.fl;
}
else {
return std::bit_cast<T>(raw_arg);
// static_assert in else workaround
[] <bool flag = false>() {
static_assert(flag, "Floats in a2/a3 not supported");
}();
}
}
else if constexpr (std::is_pointer_v<T>) {