mirror of https://github.com/pret/pokeemerald.git
Updated Reuse filler save space for Variables and Flags (markdown)
parent
4fb082c708
commit
bc3d0d7d5c
|
@ -72,7 +72,7 @@ To save on space (because I don't know what your game will need), variables and
|
||||||
* **Variables** are **16**bit long (so their **ID gets multiplied by 2** to get the byte offset into `gnAdditionalSaveData`)
|
* **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**).
|
* **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 (do not actually put this code anywhere, it's just to show a comparison how the data would look like):
|
||||||
```c
|
```c
|
||||||
struct{
|
struct{
|
||||||
u8 FLAG_FOR_SOMETHING_SUPER_SPECIAL : 1; // flag with ID 0xF000 at bit 0 of byte 0
|
u8 FLAG_FOR_SOMETHING_SUPER_SPECIAL : 1; // flag with ID 0xF000 at bit 0 of byte 0
|
||||||
|
|
Loading…
Reference in New Issue