aboutsummaryrefslogtreecommitdiff
path: root/dat.h
diff options
context:
space:
mode:
authorrodri <rgl@antares-labs.eu>2023-03-08 20:59:10 +0000
committerrodri <rgl@antares-labs.eu>2023-03-08 20:59:10 +0000
commitb545537c9a6c7d32976b863cbb14792980d31e3d (patch)
tree71cb8c74c6be18ab80dbfb0c92fccdc580788439 /dat.h
parent941d146cea7d0c2ce872e599622a5c9e01d37fe2 (diff)
downloadmusw-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.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/dat.h b/dat.h
index 67fcf3b..2b3929d 100644
--- a/dat.h
+++ b/dat.h
@@ -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