aboutsummaryrefslogtreecommitdiff
path: root/dat.h
diff options
context:
space:
mode:
authorAmavect <amavect@gmail.com>2023-09-07 02:38:36 +0000
committerrodri <rgl@antares-labs.eu>2023-09-07 02:38:36 +0000
commite29fc9d0f23c62085114cb479032e07b0fb29abb (patch)
tree2244c0208dd48d98f30eb68f85ac7e148e212167 /dat.h
parent2723bb6ff3e339f7f56a6276fa1c7c9f28d63871 (diff)
downloadbattleship-e29fc9d0f23c62085114cb479032e07b0fb29abb.tar.gz
battleship-e29fc9d0f23c62085114cb479032e07b0fb29abb.tar.bz2
battleship-e29fc9d0f23c62085114cb479032e07b0fb29abb.zip
inline spawned threads to threadmain.
Pointers to automatic variables become invalid when threadmain exits. Solution is to reuse threadmain. Use nbsend to avoid deadlock to the draw channel. Input struct is no longer needed, inline it.
Diffstat (limited to 'dat.h')
-rw-r--r--dat.h7
1 files changed, 0 insertions, 7 deletions
diff --git a/dat.h b/dat.h
index a4a5df3..a85a177 100644
--- a/dat.h
+++ b/dat.h
@@ -31,7 +31,6 @@ enum {
KB = 1024,
};
-typedef struct Input Input;
typedef struct Ship Ship;
typedef struct Map Map;
typedef struct Board Board;
@@ -40,12 +39,6 @@ typedef struct Playerq Playerq;
typedef struct Match Match;
typedef struct Chanpipe Chanpipe;
-struct Input
-{
- Mousectl *mc;
- Keyboardctl *kc;
-};
-
struct Ship
{
Point2 p; /* board cell */