diff options
author | Marcus Huderle <huderlem@gmail.com> | 2018-02-11 13:01:17 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-11 13:01:17 -0800 |
commit | 9bf6448707a36bf7d530bf932347c1adb508192e (patch) | |
tree | 81a0cd76e018625f166d67a3b6af08f5eb423cf2 /include/global.h | |
parent | b281e6f6b685045960a5deba2244d13a1963a9b6 (diff) | |
parent | f70f8a62842670eb5979ef18487a2ab25bca7922 (diff) |
Merge pull request #557 from PikalaxALT/fix_nonmatching
Fix nonmatching functions throughout the repo
Diffstat (limited to 'include/global.h')
-rw-r--r-- | include/global.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/global.h b/include/global.h index d0af4a4d1..6dd772795 100644 --- a/include/global.h +++ b/include/global.h @@ -65,6 +65,15 @@ enum #define T2_READ_32(ptr) ((ptr)[0] + ((ptr)[1] << 8) + ((ptr)[2] << 16) + ((ptr)[3] << 24)) #define T2_READ_PTR(ptr) (void*) T2_READ_32(ptr) +// Credits to Made (dolphin emoji) +#define S16TOPOSFLOAT(val) \ +({ \ + s16 v = (val); \ + float f = (float)v; \ + if(v < 0) f += 65536.0f; \ + f; \ +}) + enum { VERSION_SAPPHIRE = 1, |