···11+#ifndef __kf_state__
22+#define __kf_state__
33+44+55+#include <keraforge/actor.h>
66+77+88+#define KF_NPCPOOL_SIZE 1024
99+1010+1111+/* Stores global variables to be saved alongside the world. Use this for save data.
1212+ Do not use pointers here! This gets transmuted into a u8 array for serialization. */
1313+struct kf_state
1414+{
1515+ /* Do not modify this and do not relocate it. See kf_world for an explanation. */
1616+ u16 revision;
1717+ /* Player data */
1818+ struct {
1919+ struct kf_vec2(f32) pos;
2020+ } player;
2121+ // struct kf_actor npc[KF_NPCPOOL_SIZE];
2222+};
2323+2424+2525+/* Save a state. */
2626+int kf_state_save(struct kf_state *state);
2727+/* Load a state. Returns 1 if the state was freshly created and 0 if an existing state was loaded. */
2828+int kf_state_load(struct kf_state **pstate);
2929+3030+3131+#endif
···991010. Core
1111 . World
1212- / Tiles
1212+ x Tiles
1313 . Actors
1414 x Compression
1515 . Compress without saving the world binary as an intermediate step.