diff options
author | rodri <rgl@antares-labs.eu> | 2023-03-08 20:59:10 +0000 |
---|---|---|
committer | rodri <rgl@antares-labs.eu> | 2023-03-08 20:59:10 +0000 |
commit | b545537c9a6c7d32976b863cbb14792980d31e3d (patch) | |
tree | 71cb8c74c6be18ab80dbfb0c92fccdc580788439 /dat.h | |
parent | 941d146cea7d0c2ce872e599622a5c9e01d37fe2 (diff) | |
download | musw-b545537c9a6c7d32976b863cbb14792980d31e3d.tar.gz musw-b545537c9a6c7d32976b863cbb14792980d31e3d.tar.bz2 musw-b545537c9a6c7d32976b863cbb14792980d31e3d.zip |
implemented states to represent game scene stages.
added an intro as well.
Diffstat (limited to 'dat.h')
-rw-r--r-- | dat.h | 11 |
1 files changed, 4 insertions, 7 deletions
@@ -58,7 +58,7 @@ enum { typedef struct VModel VModel; typedef struct Sprite Sprite; typedef struct Keymap Keymap; -typedef struct Scene Scene; +typedef struct State State; typedef struct Particle Particle; typedef struct Bullet Bullet; typedef struct Ship Ship; @@ -107,14 +107,11 @@ struct Keymap KeyOp op; }; -struct Scene +struct State { - char *title; - int state; + char *name; - Scene *(*δ)(Scene*); - void (*step)(Scene*); - void (*draw)(Scene*); + State *(*δ)(State*, void*); /* transition fn */ }; struct Particle |