X-Git-Url: https://jxself.org/git/?p=super-star-trek.git;a=blobdiff_plain;f=src%2Fsst.h;h=a9bf781e546a588bcd558fdde1a99ff2441fb253;hp=a397ed25633ad63db6a05fad108280b8c47ae0b6;hb=4207ce95e80fe7e2d5114079fa4255e0ad506618;hpb=f5a89916bc70a66b6fa6a3abc4c36023503cd380 diff --git a/src/sst.h b/src/sst.h index a397ed2..a9bf781 100644 --- a/src/sst.h +++ b/src/sst.h @@ -45,6 +45,8 @@ typedef struct {int x; int y;} coord; #define square(i) ((i)*(i)) #define same(c1, c2) ((c1.x == c2.x) && (c1.y == c2.y)) #define distance(c1, c2) sqrt(square(c1.x - c2.x) + square(c1.y - c2.y)) +#define invalidate(w) w.x = w.y = 0 +#define is_valid(w) (w.x == 0 || w.y == 0) typedef struct { coord w;