mirror of https://github.com/pret/pokeemerald.git
Updated Reuse filler save space for Variables and Flags (markdown)
parent
71e035331a
commit
4fb082c708
|
@ -67,7 +67,10 @@ define them as usual in `include/constants/flags.h` and `include/constants/vars.
|
||||||
|
|
||||||
# CAVEAT
|
# CAVEAT
|
||||||
|
|
||||||
To save on space (because I don't know what your game will need), variables and flags both **share the same data space**, so make sure they don't overlap. Variables are 16bit long (so their ID gets multiplied by 2 to get the byte offset into `gnAdditionalSaveData`), and Flags are 1bit long (ID gets divided by 8).
|
To save on space (because I don't know what your game will need), variables and flags both **share the same data space**, so make sure they don't overlap.
|
||||||
|
|
||||||
|
* **Variables** are **16**bit long (so their **ID gets multiplied by 2** to get the byte offset into `gnAdditionalSaveData`)
|
||||||
|
* **Flags** are **1**bit long (**ID gets divided by 8**).
|
||||||
|
|
||||||
so the above examples would then internally look like this:
|
so the above examples would then internally look like this:
|
||||||
```c
|
```c
|
||||||
|
|
Loading…
Reference in New Issue