aboutsummaryrefslogtreecommitdiff
path: root/dat.h
diff options
context:
space:
mode:
Diffstat (limited to 'dat.h')
-rw-r--r--dat.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/dat.h b/dat.h
index dad541d..bef3596 100644
--- a/dat.h
+++ b/dat.h
@@ -5,6 +5,9 @@ enum {
Tmiss,
NTILES,
+ TBITS = 2, /* ceil(log(NTILES)/log(2)) */
+ TMASK = (1<<TBITS) - 1,
+
Scarrier = 0,
Sbattleship,
Scruiser,
@@ -31,6 +34,7 @@ enum {
SCRH = Boardmargin+MAPH*TH+TH+MAPH*TH+Boardmargin,
KB = 1024,
+ BY2MAP = TBITS*MAPW*MAPH/8+1,
};
typedef struct Ship Ship;
@@ -41,6 +45,7 @@ typedef struct Player Player;
typedef struct Match Match;
typedef struct Msg Msg;
typedef struct Stands Stands;
+typedef struct MatchInfo MatchInfo;
struct Ship
{
@@ -106,6 +111,13 @@ struct Stands
ulong cap;
};
+struct MatchInfo
+{
+ int id;
+ char *pl[2];
+ Board *bl[2];
+};
+
typedef struct Mentry Mentry;
typedef struct Mlist Mlist;
typedef struct Menulist Menulist;