···667788/* Number of frames since the game opened.
99- You should only use this for animations!
1010- It's not consistent enough for precise timing use deltatime (kf_dts/kf_dtms) for that. */
99+ Not consistent enough for precise timing! Use deltatime (kf_dts/kf_dtms) instead. */
1110extern u64 kf_frame;
1111+/* Number of seconds since the game opened. */
1212+extern f64 kf_s;
1213/* Deltatime in milliseconds */
1314extern f32 kf_dtms;
1415/* Deltatime in seconds. */
+1
include/keraforge/world.h
···2828/* Represents a singular tile in the world. */
2929struct kf_tile
3030{
3131+ kf_tileid_t subid;
3132 kf_tileid_t id;
3233 kf_tiledatum_t data;
3334};
+1-1
src/actor.c
···140140 if (actor->vel.x != 0 || actor->vel.y != 0)
141141 x += 7; /* walk sprites */
142142143143- x += (kf_frame / 15) % 4;
143143+ x += (int)(kf_s * 5) % 4;
144144145145 /* todo: run and jump */
146146