Updated Reuse filler save space for Variables and Flags (markdown)

Kyra Zimmer 2022-04-25 15:35:57 +02:00
parent 71e035331a
commit 4fb082c708
1 changed files with 4 additions and 1 deletions

@ -67,7 +67,10 @@ define them as usual in `include/constants/flags.h` and `include/constants/vars.
# 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:
```c