added using separate constants for tiles in EM engine caves and game logic
[rocksndiamonds.git] / src / game_em / cave.h
1 /* 2009-01-25 23:00:34
2  *
3  * intermediate cave structure
4  */
5
6 #ifndef CAVE_H
7 #define CAVE_H
8
9 enum
10 {
11   Cblank,
12   Cgrass,
13   Cdirt,
14   Cplant,
15   Cwall_1,
16   Cwall_2,
17   Cwall_3,
18   Cwall_4,
19   Croundwall_1,
20   Croundwall_2,
21   Croundwall_3,
22   Croundwall_4,
23   Csteel_1,
24   Csteel_2,
25   Csteel_3,
26   Csteel_4,
27   Candroid,
28   Ceater_n,
29   Ceater_e,
30   Ceater_s,
31   Ceater_w,
32   Calien,
33   Cbug_1_n,
34   Cbug_1_e,
35   Cbug_1_s,
36   Cbug_1_w,
37   Cbug_2_n,
38   Cbug_2_e,
39   Cbug_2_s,
40   Cbug_2_w,
41   Ctank_1_n,
42   Ctank_1_e,
43   Ctank_1_s,
44   Ctank_1_w,
45   Ctank_2_n,
46   Ctank_2_e,
47   Ctank_2_s,
48   Ctank_2_w,
49   Cemerald,
50   Cdiamond,
51   Cstone,
52   Cbomb,
53   Cnut,
54   Cspring,
55   Cpush_emerald_e,
56   Cpush_emerald_w,
57   Cpush_diamond_e,
58   Cpush_diamond_w,
59   Cpush_stone_e,
60   Cpush_stone_w,
61   Cpush_bomb_e,
62   Cpush_bomb_w,
63   Cpush_nut_e,
64   Cpush_nut_w,
65   Cpush_spring_e,
66   Cpush_spring_w,
67   Cdynamite,
68   Cdynamite_1,
69   Cdynamite_2,
70   Cdynamite_3,
71   Cdynamite_4,
72   Ckey_1,
73   Ckey_2,
74   Ckey_3,
75   Ckey_4,
76   Ckey_5,
77   Ckey_6,
78   Ckey_7,
79   Ckey_8,
80   Cdoor_1,
81   Cdoor_2,
82   Cdoor_3,
83   Cdoor_4,
84   Cdoor_5,
85   Cdoor_6,
86   Cdoor_7,
87   Cdoor_8,
88   Cfake_door_1,
89   Cfake_door_2,
90   Cfake_door_3,
91   Cfake_door_4,
92   Cfake_door_5,
93   Cfake_door_6,
94   Cfake_door_7,
95   Cfake_door_8,
96   Cballoon,
97   Cball_1,
98   Cball_2,
99   Camoeba_1,
100   Camoeba_2,
101   Camoeba_3,
102   Camoeba_4,
103   Camoeba_5,
104   Camoeba_6,
105   Camoeba_7,
106   Camoeba_8,
107   Cdrip,
108   Cwonderwall,
109   Cwheel,
110   Cswitch,
111   Cbumper,
112   Cacid_nw,
113   Cacid_ne,
114   Cacid_sw,
115   Cacid_s,
116   Cacid_se,
117   Cacid_1,
118   Cacid_2,
119   Cacid_3,
120   Cacid_4,
121   Cacid_5,
122   Cacid_6,
123   Cacid_7,
124   Cacid_8,
125   Cfake_acid_1,
126   Cfake_acid_2,
127   Cfake_acid_3,
128   Cfake_acid_4,
129   Cfake_acid_5,
130   Cfake_acid_6,
131   Cfake_acid_7,
132   Cfake_acid_8,
133   Cfake_blank,
134   Cfake_grass,
135   Cfake_amoeba,
136   Clenses,
137   Cmagnify,
138   Csand,
139   Csand_stone,
140   Cslide_ns,
141   Cslide_ew,
142   Cwind_n,
143   Cwind_e,
144   Cwind_s,
145   Cwind_w,
146   Cwind_any,
147   Cwind_stop,
148   Cexit,
149   Cexit_1,
150   Cexit_2,
151   Cexit_3,
152   Cpause,
153   Cdecor_1,
154   Cdecor_2,
155   Cdecor_3,
156   Cdecor_4,
157   Cdecor_5,
158   Cdecor_6,
159   Cdecor_7,
160   Cdecor_8,
161   Cdecor_9,
162   Cdecor_10,
163   Cdecor_11,
164   Cdecor_12,
165   Calpha_0,
166   Calpha_1,
167   Calpha_2,
168   Calpha_3,
169   Calpha_4,
170   Calpha_5,
171   Calpha_6,
172   Calpha_7,
173   Calpha_8,
174   Calpha_9,
175   Calpha_excla,
176   Calpha_apost,
177   Calpha_comma,
178   Calpha_minus,
179   Calpha_perio,
180   Calpha_colon,
181   Calpha_quest,
182   Calpha_a,
183   Calpha_b,
184   Calpha_c,
185   Calpha_d,
186   Calpha_e,
187   Calpha_f,
188   Calpha_g,
189   Calpha_h,
190   Calpha_i,
191   Calpha_j,
192   Calpha_k,
193   Calpha_l,
194   Calpha_m,
195   Calpha_n,
196   Calpha_o,
197   Calpha_p,
198   Calpha_q,
199   Calpha_r,
200   Calpha_s,
201   Calpha_t,
202   Calpha_u,
203   Calpha_v,
204   Calpha_w,
205   Calpha_x,
206   Calpha_y,
207   Calpha_z,
208   Calpha_arrow_e,
209   Calpha_arrow_w,
210   Calpha_copyr,
211
212   CAVE_TILE_MAX
213 };
214
215 struct CAVE
216 {
217   int width;                    /* cave width */
218   int height;                   /* cave height */
219
220   int player_x[MAX_PLAYERS];    /* player x pos */
221   int player_y[MAX_PLAYERS];    /* player y pos */
222
223   int time_seconds;             /* available time (seconds) */
224   int gems_needed;              /* emeralds needed */
225
226   int eater_score;              /* score for killing eater */
227   int alien_score;              /* score for killing alien */
228   int bug_score;                /* score for killing bug */
229   int tank_score;               /* score for killing tank */
230   int slurp_score;              /* score for slurping alien with spring */
231   int nut_score;                /* score for cracking nut to emerald */
232   int emerald_score;            /* score for collecting emerald */
233   int diamond_score;            /* score for collecting diamond */
234   int dynamite_score;           /* score for collecting dynamite */
235   int key_score;                /* score for colleting key */
236   int lenses_score;             /* score for collecting lenses */
237   int magnify_score;            /* score for collecting magnifier */
238   int exit_score;               /* score for entering exit */
239
240   int android_move_time;        /* android move reset time */
241   int android_clone_time;       /* android clone reset time */
242   int ball_time;                /* ball reset time */
243   int amoeba_time;              /* amoeba speed */
244   int wonderwall_time;          /* wonderwall time */
245   int wheel_time;               /* wheel reset time */
246   int wheel_x;                  /* wheel x pos */
247   int wheel_y;                  /* wheel y pos */
248   int lenses_time;              /* lenses reset time */
249   int magnify_time;             /* magnify reset time */
250   int wind_time;                /* wind reset time */
251   int wind_direction;           /* wind direction */
252
253   int ball_random;              /* ball is random flag */
254   int ball_state;               /* ball active flag */
255   int wonderwall_state;         /* wonderwall active flag */
256   int wheel_cnt;                /* wheel counter */
257   int lenses_cnt;               /* lenses counter */
258   int magnify_cnt;              /* magnify counter */
259   int wind_cnt;                 /* wind time counter */
260
261   int num_ball_arrays;          /* number of ball data arrays used */
262
263   short eater_array[8][9];              /* eater data */
264   short ball_array[8][8];               /* ball data */
265   short android_array[TILE_MAX];        /* android clone data */
266
267   short cave[CAVE_WIDTH][CAVE_HEIGHT];  /* cave data */
268 };
269
270 #endif  // CAVE_H