diff options
author | ProjectRevoTPP <projectrevotpp@hotmail.com> | 2018-02-11 16:01:59 -0500 |
---|---|---|
committer | ProjectRevoTPP <projectrevotpp@hotmail.com> | 2018-02-11 16:01:59 -0500 |
commit | 8b8ccbbc41141637297cfe847f1ce62e6139d965 (patch) | |
tree | 9aaded6bb8e02ca4d264fccbac307c4cb6efc074 /include/global.h | |
parent | 3a70fa1ae461cab27443ac53faec35db1d6b89d3 (diff) | |
parent | 9bf6448707a36bf7d530bf932347c1adb508192e (diff) |
Merge branch 'master' of https://github.com/pret/pokeruby into visual_studio
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, |