aboutsummaryrefslogtreecommitdiff
path: root/dat.h
diff options
context:
space:
mode:
Diffstat (limited to 'dat.h')
-rw-r--r--dat.h27
1 files changed, 25 insertions, 2 deletions
diff --git a/dat.h b/dat.h
index f72296c..29eb6e0 100644
--- a/dat.h
+++ b/dat.h
@@ -44,11 +44,11 @@ typedef struct Stands Stands;
struct Ship
{
- Point2 p; /* board cell */
+ Point2 p; /* board cell */
Rectangle bbox;
int orient;
int ncells;
- int *hit; /* |hit| = ncells and hitᵢ ∈ {0,1} */
+ int *hit; /* |hit| = ncells and hitᵢ ∈ {0,1} */
};
struct Map
@@ -105,3 +105,26 @@ struct Stands
ulong nused;
ulong cap;
};
+
+typedef struct Mentry Mentry;
+typedef struct Mlist Mlist;
+typedef struct Matchlist Matchlist;
+
+struct Mentry
+{
+ int id;
+ char *title;
+};
+
+struct Mlist
+{
+ Mentry *entries;
+ int nentries;
+ int filling;
+};
+
+struct Matchlist
+{
+ Mlist;
+ int selected; /* [-1,nitems) where -1 is none */
+};