]> Shamusworld >> Repos - warehouse-man-deluxe/blob - src/boards.h
Initial commit.
[warehouse-man-deluxe] / src / boards.h
1 #ifndef __BOARDS_H__
2 #define __BOARDS_H__
3
4 // Okay, this is ugly but works and I can't think of any better way to handle
5 // this. So what we do when we pass the anonymous structs into a function is
6 // pass them as a (void *) and then cast them as type (Board *) in order to
7 // use them. Yes, it's ugly. Come up with something better!
8
9 struct Board {
10         unsigned int width;             // Width of the board
11         unsigned int height;    // Height of the board
12 //      unsigned int x;                 // Initial X position of player
13 //      unsigned int y;                 // Initial Y position of player
14         unsigned char state[];  // Board data
15 };
16
17 #define NUMBER_OF_BOARDS        12
18 extern const void * boards[];
19
20 #endif  // __BOARDS_H__
21