X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fboards.h;fp=src%2Fboards.h;h=4c01320b54f2cb6ad631cffd8326b9469bd6bde1;hb=6f13016fe0742df2abfbf4ee08b3a0f27211a993;hp=e14b564e950d92b478f048747615e55128a1d94d;hpb=98faaadc703b743d2f4e1540e827e19e3c31eeb4;p=warehouse-man-deluxe diff --git a/src/boards.h b/src/boards.h index e14b564..4c01320 100644 --- a/src/boards.h +++ b/src/boards.h @@ -1,6 +1,9 @@ #ifndef __BOARDS_H__ #define __BOARDS_H__ +#include +#include + // Okay, this is ugly but works and I can't think of any better way to handle // this. So what we do when we pass the anonymous structs into a function is // pass them as a (void *) and then cast them as type (Board *) in order to @@ -12,8 +15,25 @@ struct Board { unsigned char state[]; // Board data }; +#define BOARDSIZE 128 + +struct Point +{ + Point(int xx = 0, int yy = 0) { x = xx; y = yy; } + int x, y; +}; + +struct Level +{ + uint8_t board[BOARDSIZE][BOARDSIZE]; + char name[41]; + Point corner; // Corner dimensions on screen + Point cursor; // Cursor location +}; + #define NUMBER_OF_BOARDS 42 extern const void * boards[]; +extern std::vector levelStorage; #endif // __BOARDS_H__