1 /*
2     XorGramana Copyright 2009 James W. Morris, james@jwm-art.net
3 
4     This file is part of XorGramana.
5 
6     XorGramana is free software: you can redistribute it and/or modify
7     it under the terms of the GNU General Public License as published by
8     the Free Software Foundation, either version 3 of the License, or
9     (at your option) any later version.
10 
11     XorGramana is distributed in the hope that it will be useful,
12     but WITHOUT ANY WARRANTY; without even the implied warranty of
13     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14     GNU General Public License for more details.
15 
16     You should have received a copy of the GNU General Public License
17     along with XorGramana.  If not, see <http://www.gnu.org/licenses/>.
18 */
19 #ifndef _DEFS_H
20 #define _DEFS_H
21 
22 /*  this file #defines constants which may      *
23  *  change during XorGramana development.  not  *
24  *  all #defines should be placed here. icons.h *
25  *  for example contains #defines which may     *
26  *  only relate to icon.c, or may not,          *
27  *  distinction too subtle for words...         *
28  *  generally, if a #define might be easier to  *
29  *  locate by placing it in this file, or more  *
30  *  importantly, is required in several include *
31  *  files, then place it here by all means.     */
32 
33 
34 /* DEBUGGING */
35 #ifdef MAP_DEBUG
36 #define PLAYER_XY_DEBUG
37 #endif
38 
39 #ifdef DEBUG
40 #define MAP_DEBUG
41 #define GFX_DEBUG
42 #define ICON_DEBUG
43 #define MOVE_DEBUG
44 #define MISC_DEBUG
45 #define PLAYER_XY_DEBUG
46 #endif
47 
48 
49 
50 
51 
52 
53 /*  icon dimensions                             */
54 #define ICON_WIDTH 64
55 #define ICON_HEIGHT 64
56 #define ICON_EXT ".png"
57 
58 /*  map related stuf                            */
59 #define MAPNAME_MAXCHARS 24
60 #define MIN_LEVEL 1
61 /* bit ambitious I know: */
62 #define MAX_LEVEL 25
63 /* maps may be any size up to: */
64 #define MAP_MAX_W 64
65 #define MAP_MAX_H 64
66 
67 #define MAX_WORDS_TO_SOLVE 20
68 
69 
70 /*  max number of moves to complete a level     *
71  *  note: may become map/level specific         */
72 #define MAX_MOVES 2000
73 
74 /* misc */
75 #define MAX_PRINTLEN 256
76 #define MAX_BUF_LEN 256
77 #define TICK_COUNT 16
78 
79 /* Xor icons - translate from xor map char to xorgramana map    *
80  * char. the values of these should be checked against the      *
81  * values of the mapchars in icons.c and cross-checked with the *
82  * behaviours defined in actions.c - so just trust me.          */
83 #define XOR_PLAYER2 '0'
84 #define XOR_FISH 'v'
85 #define XOR_CHICKEN 'k'
86 #define XOR_HBOMB 'h'
87 #define XOR_DOLL 'g'
88 #define XOR_SWITCH 'y'
89 
90 #endif
91