diff options
author | rodri <rgl@antares-labs.eu> | 2023-08-08 08:35:17 +0000 |
---|---|---|
committer | rodri <rgl@antares-labs.eu> | 2023-08-08 08:35:17 +0000 |
commit | 7b76e7467822316b699847cbd61a0ecb985882d3 (patch) | |
tree | d21c96e3002170600e0c11dba0e199567f364355 /dat.h | |
download | battleship-7b76e7467822316b699847cbd61a0ecb985882d3.tar.gz battleship-7b76e7467822316b699847cbd61a0ecb985882d3.tar.bz2 battleship-7b76e7467822316b699847cbd61a0ecb985882d3.zip |
initial commit.
Diffstat (limited to 'dat.h')
-rw-r--r-- | dat.h | 31 |
1 files changed, 31 insertions, 0 deletions
@@ -0,0 +1,31 @@ +enum { + Twater, + Tship, + Thit, + Tmiss, + NTILES, + + Boardmargin = 50, + TW = 16, + TH = TW, + MAPW = 17, + MAPH = MAPW, + SCRW = Boardmargin+MAPW*TW+Boardmargin, + SCRH = Boardmargin+MAPH*TH+TH+MAPH*TH+Boardmargin, +}; + +typedef struct Input Input; +typedef struct Board Board; + +struct Input +{ + Mousectl *mc; + Keyboardctl *kc; +}; + +struct Board +{ + RFrame; + char map[17][17]; + Rectangle bbox; +}; |