diff options
author | golem galvanize <golemgalvanize@github.com> | 2018-12-13 00:31:06 -0500 |
---|---|---|
committer | golem galvanize <golemgalvanize@github.com> | 2018-12-13 00:31:06 -0500 |
commit | 6748ef72fb31e1b0af250472a34e50cb3966c5f8 (patch) | |
tree | f6dafca53a0e45e5a2a6cdb262a2766f2bde8753 /include/global.h | |
parent | 2265d49ac2e8868e0b3362f8e7a4d22355eed202 (diff) | |
parent | 170b6ef44992f4b7decb31451a3756b6bd4e2d46 (diff) |
Merge branch 'master' of https://github.com/pret/pokeemerald into decompile_party_menu
Diffstat (limited to 'include/global.h')
-rw-r--r-- | include/global.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/include/global.h b/include/global.h index cc8df049f..33a31bf4d 100644 --- a/include/global.h +++ b/include/global.h @@ -79,6 +79,14 @@ #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) +#define S16TOPOSFLOAT(val) \ +({ \ + s16 v = (val); \ + float f = (float)v; \ + if(v < 0) f += 65536.0f; \ + f; \ +}) + // Invalid Versions show as "----------" in Gen 4 and Gen 5's summary screen. // In Gens 6 and 7, invalid versions instead show "a distant land" in the summary screen. // In Gen 4 only, migrated Pokemon with Diamond, Pearl, or Platinum's ID show as "----------". @@ -881,7 +889,7 @@ struct SaveBlock1 /*0x24*/ struct WarpData warp4; /*0x2C*/ u16 savedMusic; /*0x2E*/ u8 weather; - /*0x2F*/ u8 filler_2F; + /*0x2F*/ u8 weatherCycleStage; /*0x30*/ u8 flashLevel; /*0x32*/ u16 mapLayoutId; /*0x34*/ u16 mapView[0x100]; |