diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/common.h | 6 | ||||
-rw-r--r-- | include/engine.h | 6 | ||||
-rw-r--r-- | include/idlist.h | 4 |
3 files changed, 13 insertions, 3 deletions
diff --git a/include/common.h b/include/common.h index 2273e4d..140044d 100644 --- a/include/common.h +++ b/include/common.h @@ -1,3 +1,5 @@ +struct field; + struct game { size_t level; int started; @@ -14,4 +16,8 @@ struct game { sfClock *repPushDown; // repeat latency when hold Down arrow sfClock *repKeyLeft; // repeat latency when hold Left arrow sfClock *repKeyRight; // repeat latency when hold Right arrow + + struct field *fld; + struct field *nxt; + struct idlist *texts; }; diff --git a/include/engine.h b/include/engine.h index 4e0ee33..48342e9 100644 --- a/include/engine.h +++ b/include/engine.h @@ -1,2 +1,4 @@ -void transition_init(void); -void main_loop(void); +struct game; + +void transition_init(struct game *game); +void main_loop(struct game *); diff --git a/include/idlist.h b/include/idlist.h index c006a32..6d09e16 100644 --- a/include/idlist.h +++ b/include/idlist.h @@ -18,5 +18,7 @@ struct idlist *list_new(); struct idlist *list_append(struct idlist *list); struct idlist *list_get(const struct idlist *list, size_t id); void list_rm_node(struct idlist *node); -void list_foreach(struct idlist *list, void (*job)(void *)); void list_destroy(struct idlist *list); + +#define LIST_FOREACH(head, e) \ + for (struct idlist *e = head; e; e = e->next) |