]> Shamusworld >> Repos - warehouse-man-deluxe/blobdiff - src/boards.h
Moved level storage to global location.
[warehouse-man-deluxe] / src / boards.h
index e14b564e950d92b478f048747615e55128a1d94d..4c01320b54f2cb6ad631cffd8326b9469bd6bde1 100644 (file)
@@ -1,6 +1,9 @@
 #ifndef __BOARDS_H__
 #define __BOARDS_H__
 
+#include <vector>
+#include <stdint.h>
+
 // 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<Level> levelStorage;
 
 #endif // __BOARDS_H__