mirror of
https://github.com/N64Recomp/N64ModernRuntime.git
synced 2025-10-30 08:02:29 +00:00
Add float arg1 helpers
This commit is contained in:
parent
0b18a35292
commit
ce872d7e3c
1 changed files with 15 additions and 0 deletions
|
|
@ -36,6 +36,21 @@ T _arg(uint8_t* rdram, recomp_context* ctx) {
|
|||
}
|
||||
}
|
||||
|
||||
inline float _arg_float_a1(uint8_t* rdram, recomp_context* ctx) {
|
||||
(void)rdram;
|
||||
union {
|
||||
u32 as_u32;
|
||||
float as_float;
|
||||
} ret{};
|
||||
ret.as_u32 = _arg<1, u32>(rdram, ctx);
|
||||
return ret.as_float;
|
||||
}
|
||||
|
||||
inline float _arg_float_f14(uint8_t* rdram, recomp_context* ctx) {
|
||||
(void)rdram;
|
||||
return ctx->f14.fl;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void _return(recomp_context* ctx, T val) {
|
||||
static_assert(sizeof(T) <= 4 && "Only 32-bit value returns supported currently");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue