ref: be15c241daa91595963dd986f7cbfcbc904557ba
parent: 3b14d1fdbe9a35efba9789ac4e384a4d50d4dbeb
author: mkf <mkf@cloud9p.org>
date: Wed Dec 11 07:53:51 EST 2024
engine.h: clearify enum names a bit
--- a/engine.h
+++ b/engine.h
@@ -28,17 +28,17 @@
PRandom,
/* game states */
- Connect = 0,
- Init, /* setting up the map */
- Start,
- Playing,
- Won,
- Lost,
- Finished, /* for server */
+ STATE_CONNECT = 0,
+ STATE_INIT, /* setting up the map */
+ STATE_START,
+ STATE_PLAYING,
+ STATE_WON,
+ STATE_LOST,
+ STATE_FINISHED, /* for server */
- Prev = 100,
- Wall = 999,
- Glenda = 1000,
+ PIECE_PREV = 100, /* technically a empty block, but often avoided so glenda wont look silly */
+ PIECE_WALL = 999,
+ PIECE_GLENDA = 1000,
Err = 0,
Ok,
@@ -67,9 +67,10 @@
int debug;
int pside; /* Trapper, Glenda */
+/* engine code */
void initlevel(Game *game);
-Point movedir(int dir, Point p);
-int pointdir(Point src, Point dst);
+Point pointdir(int dir, Point p);
+int finddir(Point src, Point dst);
Point findglenda(Game *game);
int domove(Game *game, int dir);