summaryrefslogtreecommitdiff
path: root/include/global.h
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2018-01-30 17:54:25 -0500
committerPikalaxALT <pikalaxalt@gmail.com>2018-01-30 17:54:25 -0500
commitcce651aabe5d00d45ca0a11055e278f40eb774cc (patch)
treeb2b62116ec1c99ddb9df462ef95c573e47c882c7 /include/global.h
parent6237099104e25f606a5ebde108d2d41ae8646869 (diff)
match sub_8116100
Diffstat (limited to 'include/global.h')
-rw-r--r--include/global.h9
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,