rnd-20100608-1-src
[rocksndiamonds.git] / src / game_em / tile.h
1 #ifndef TILE_H
2 #define TILE_H
3
4 #include "main_em.h"
5
6 #ifdef EM_ENGINE_BAD_ROLL
7 #define BAD_ROLL
8 #endif
9
10 #ifdef EM_ENGINE_BAD_SPRING
11 #define BAD_SPRING
12 #endif
13
14
15 #if 0
16
17 /* 2000-07-30T11:06:03Z
18  */
19
20 /* define these for backwards compatibility */
21 #define BAD_ROLL
22 #define BAD_SPRING
23
24 enum
25 {
26   Xblank = 0, /* still */
27   Yacid_splash_eB, /* hmm */
28   Yacid_splash_wB, /* hmm */
29
30 #ifdef BAD_ROLL
31   Xstone_force_e, /* only use these in eater */
32   Xstone_force_w,
33   Xnut_force_e,
34   Xnut_force_w,
35   Xspring_force_e,
36   Xspring_force_w,
37   Xemerald_force_e,
38   Xemerald_force_w,
39   Xdiamond_force_e,
40   Xdiamond_force_w,
41   Xbomb_force_e,
42   Xbomb_force_w,
43 #endif
44
45   Xstone,
46   Xstone_pause,
47   Xstone_fall,
48   Ystone_s,
49   Ystone_sB,
50   Ystone_e,
51   Ystone_eB,
52   Ystone_w,
53   Ystone_wB,
54   Xnut,
55   Xnut_pause,
56   Xnut_fall,
57   Ynut_s,
58   Ynut_sB,
59   Ynut_e,
60   Ynut_eB,
61   Ynut_w,
62   Ynut_wB,
63   Xbug_n,
64   Xbug_e,
65   Xbug_s,
66   Xbug_w,
67   Xbug_gon,
68   Xbug_goe,
69   Xbug_gos,
70   Xbug_gow,
71   Ybug_n,
72   Ybug_nB,
73   Ybug_e,
74   Ybug_eB,
75   Ybug_s,
76   Ybug_sB,
77   Ybug_w,
78   Ybug_wB,
79   Ybug_w_n,
80   Ybug_n_e,
81   Ybug_e_s,
82   Ybug_s_w,
83   Ybug_e_n,
84   Ybug_s_e,
85   Ybug_w_s,
86   Ybug_n_w,
87   Ybug_stone,
88   Ybug_spring,
89   Xtank_n,
90   Xtank_e,
91   Xtank_s,
92   Xtank_w,
93   Xtank_gon,
94   Xtank_goe,
95   Xtank_gos,
96   Xtank_gow,
97   Ytank_n,
98   Ytank_nB,
99   Ytank_e,
100   Ytank_eB,
101   Ytank_s,
102   Ytank_sB,
103   Ytank_w,
104   Ytank_wB,
105   Ytank_w_n,
106   Ytank_n_e,
107   Ytank_e_s,
108   Ytank_s_w,
109   Ytank_e_n,
110   Ytank_s_e,
111   Ytank_w_s,
112   Ytank_n_w,
113   Ytank_stone,
114   Ytank_spring,
115   Xandroid,
116   Xandroid_1_n,
117   Xandroid_2_n,
118   Xandroid_1_e,
119   Xandroid_2_e,
120   Xandroid_1_w,
121   Xandroid_2_w,
122   Xandroid_1_s,
123   Xandroid_2_s,
124   Yandroid_n,
125   Yandroid_nB,
126   Yandroid_ne,
127   Yandroid_neB,
128   Yandroid_e,
129   Yandroid_eB,
130   Yandroid_se,
131   Yandroid_seB,
132   Yandroid_s,
133   Yandroid_sB,
134   Yandroid_sw,
135   Yandroid_swB,
136   Yandroid_w,
137   Yandroid_wB,
138   Yandroid_nw,
139   Yandroid_nwB,
140   Xspring,
141   Xspring_pause,
142   Xspring_e,
143   Xspring_w,
144   Xspring_fall,
145   Yspring_s,
146   Yspring_sB,
147   Yspring_e,
148   Yspring_eB,
149   Yspring_w,
150   Yspring_wB,
151   Yspring_kill_e,
152   Yspring_kill_eB,
153   Yspring_kill_w,
154   Yspring_kill_wB,
155   Xeater_n,
156   Xeater_e,
157   Xeater_w,
158   Xeater_s,
159   Yeater_n,
160   Yeater_nB,
161   Yeater_e,
162   Yeater_eB,
163   Yeater_s,
164   Yeater_sB,
165   Yeater_w,
166   Yeater_wB,
167   Yeater_stone,
168   Yeater_spring,
169   Xalien,
170   Xalien_pause,
171   Yalien_n,
172   Yalien_nB,
173   Yalien_e,
174   Yalien_eB,
175   Yalien_s,
176   Yalien_sB,
177   Yalien_w,
178   Yalien_wB,
179   Yalien_stone,
180   Yalien_spring,
181   Xemerald,
182   Xemerald_pause,
183   Xemerald_fall,
184   Xemerald_shine,
185   Yemerald_s,
186   Yemerald_sB,
187   Yemerald_e,
188   Yemerald_eB,
189   Yemerald_w,
190   Yemerald_wB,
191   Yemerald_eat,
192   Yemerald_stone,
193   Xdiamond,
194   Xdiamond_pause,
195   Xdiamond_fall,
196   Xdiamond_shine,
197   Ydiamond_s,
198   Ydiamond_sB,
199   Ydiamond_e,
200   Ydiamond_eB,
201   Ydiamond_w,
202   Ydiamond_wB,
203   Ydiamond_eat,
204   Ydiamond_stone,
205   Xdrip_fall,
206   Xdrip_stretch,
207   Xdrip_stretchB,
208   Xdrip_eat,
209   Ydrip_s1,
210   Ydrip_s1B,
211   Ydrip_s2,
212   Ydrip_s2B,
213   Xbomb,
214   Xbomb_pause,
215   Xbomb_fall,
216   Ybomb_s,
217   Ybomb_sB,
218   Ybomb_e,
219   Ybomb_eB,
220   Ybomb_w,
221   Ybomb_wB,
222   Ybomb_eat,
223   Xballoon,
224   Yballoon_n,
225   Yballoon_nB,
226   Yballoon_e,
227   Yballoon_eB,
228   Yballoon_s,
229   Yballoon_sB,
230   Yballoon_w,
231   Yballoon_wB,
232   Xgrass,
233   Ygrass_nB,
234   Ygrass_eB,
235   Ygrass_sB,
236   Ygrass_wB,
237   Xdirt,
238   Ydirt_nB,
239   Ydirt_eB,
240   Ydirt_sB,
241   Ydirt_wB,
242   Xacid_ne,
243   Xacid_se,
244   Xacid_s,
245   Xacid_sw,
246   Xacid_nw,
247   Xacid_1,
248   Xacid_2,
249   Xacid_3,
250   Xacid_4,
251   Xacid_5,
252   Xacid_6,
253   Xacid_7,
254   Xacid_8,
255   Xball_1,
256   Xball_1B,
257   Xball_2,
258   Xball_2B,
259   Yball_eat,
260   Xgrow_ns,
261   Ygrow_ns_eat,
262   Xgrow_ew,
263   Ygrow_ew_eat,
264   Xwonderwall,
265   XwonderwallB,
266   Xamoeba_1,
267   Xamoeba_2,
268   Xamoeba_3,
269   Xamoeba_4,
270   Xamoeba_5,
271   Xamoeba_6,
272   Xamoeba_7,
273   Xamoeba_8,
274   Xdoor_1,
275   Xdoor_2,
276   Xdoor_3,
277   Xdoor_4,
278   Xdoor_5,
279   Xdoor_6,
280   Xdoor_7,
281   Xdoor_8,
282   Xkey_1,
283   Xkey_2,
284   Xkey_3,
285   Xkey_4,
286   Xkey_5,
287   Xkey_6,
288   Xkey_7,
289   Xkey_8,
290   Xwind_n,
291   Xwind_e,
292   Xwind_s,
293   Xwind_w,
294   Xwind_nesw,
295   Xwind_stop,
296   Xexit,
297   Xexit_1,
298   Xexit_2,
299   Xexit_3,
300   Xdynamite,
301   Ydynamite_eat,
302   Xdynamite_1,
303   Xdynamite_2,
304   Xdynamite_3,
305   Xdynamite_4,
306   Xbumper,
307   XbumperB,
308   Xwheel,
309   XwheelB,
310   Xswitch,
311   XswitchB,
312   Xsand,
313   Xsand_stone,
314   Xsand_stonein_1,
315   Xsand_stonein_2,
316   Xsand_stonein_3,
317   Xsand_stonein_4,
318   Xsand_stonesand_1,
319   Xsand_stonesand_2,
320   Xsand_stonesand_3,
321   Xsand_stonesand_4,
322   Xsand_stoneout_1,
323   Xsand_stoneout_2,
324   Xsand_sandstone_1,
325   Xsand_sandstone_2,
326   Xsand_sandstone_3,
327   Xsand_sandstone_4,
328   Xplant,
329   Yplant,
330   Xlenses,
331   Xmagnify,
332   Xdripper,
333   XdripperB,
334   Xfake_blank,
335   Xfake_blankB,
336   Xfake_grass,
337   Xfake_grassB,
338   Xfake_door_1,
339   Xfake_door_2,
340   Xfake_door_3,
341   Xfake_door_4,
342   Xfake_door_5,
343   Xfake_door_6,
344   Xfake_door_7,
345   Xfake_door_8,
346   Xsteel_1,
347   Xsteel_2,
348   Xsteel_3,
349   Xsteel_4,
350   Xwall_1,
351   Xwall_2,
352   Xwall_3,
353   Xwall_4,
354   Xround_wall_1,
355   Xround_wall_2,
356   Xround_wall_3,
357   Xround_wall_4,
358   Xdecor_1,
359   Xdecor_2,
360   Xdecor_3,
361   Xdecor_4,
362   Xdecor_5,
363   Xdecor_6,
364   Xdecor_7,
365   Xdecor_8,
366   Xdecor_9,
367   Xdecor_10,
368   Xdecor_11,
369   Xdecor_12,
370   Xalpha_0,
371   Xalpha_1,
372   Xalpha_2,
373   Xalpha_3,
374   Xalpha_4,
375   Xalpha_5,
376   Xalpha_6,
377   Xalpha_7,
378   Xalpha_8,
379   Xalpha_9,
380   Xalpha_excla,
381   Xalpha_quote,
382   Xalpha_comma,
383   Xalpha_minus,
384   Xalpha_perio,
385   Xalpha_colon,
386   Xalpha_quest,
387   Xalpha_a,
388   Xalpha_b,
389   Xalpha_c,
390   Xalpha_d,
391   Xalpha_e,
392   Xalpha_f,
393   Xalpha_g,
394   Xalpha_h,
395   Xalpha_i,
396   Xalpha_j,
397   Xalpha_k,
398   Xalpha_l,
399   Xalpha_m,
400   Xalpha_n,
401   Xalpha_o,
402   Xalpha_p,
403   Xalpha_q,
404   Xalpha_r,
405   Xalpha_s,
406   Xalpha_t,
407   Xalpha_u,
408   Xalpha_v,
409   Xalpha_w,
410   Xalpha_x,
411   Xalpha_y,
412   Xalpha_z,
413   Xalpha_arrow_e,
414   Xalpha_arrow_w,
415   Xalpha_copyr,
416
417   Xboom_bug, /* passed from explode to synchro (linked explosion); transition to explode_normal */
418   Xboom_bomb, /* passed from explode to synchro (linked explosion); transition to explode_normal */
419   Xboom_android, /* passed from explode to synchro; transition to boom_2 */
420   Xboom_1, /* passed from explode to synchro; transition to boom_2 */
421   Xboom_2, /* transition to boom[] */
422
423   Znormal, /* no picture */ /* this tile is passed from synchro to explode, only in next[] */
424   Zdynamite, /* no picture */ /* this tile is passed from synchro to explode, only in next[] */
425   Zplayer, /* no picture */ /* special code to indicate player */
426   ZBORDER, /* no picture */ /* special code to indicate border */
427
428   TILE_MAX
429 };
430
431 enum
432 {
433   SPR_still = 0,
434   SPR_walk  = 1,
435   SPR_push  = 5,
436   SPR_spray = 9,
437
438   SPR_MAX   = 13
439 };
440
441 #endif
442
443 extern unsigned char tab_blank[TILE_MAX];
444 extern unsigned char tab_acid[TILE_MAX];
445 extern unsigned char tab_amoeba[TILE_MAX];
446 extern unsigned char tab_android_move[TILE_MAX];
447 extern unsigned short tab_explode_normal[TILE_MAX];
448 extern unsigned short tab_explode_dynamite[TILE_MAX];
449
450 extern unsigned short map_obj[8][TILE_MAX];
451 extern unsigned short map_spr[2][8][SPR_MAX];
452 extern unsigned short map_ttl[128];
453
454 #endif