e4e221d3eca2c523d1390f89c4acb2a348926a11
[rocksndiamonds.git] / src / game_em / level.h
1 #ifndef LEVEL_H
2 #define LEVEL_H
3
4 #include "main_em.h"
5 #include "tile.h"
6
7 #define WIDTH           EM_MAX_CAVE_WIDTH
8 #define HEIGHT          EM_MAX_CAVE_HEIGHT
9
10 #if 0
11
12 struct LEVEL
13 {
14   unsigned int home;     /* number of players that have to go home */
15                          /* 0 == all players home */
16
17   unsigned int width;    /* world width */
18   unsigned int height;   /* world height */
19   unsigned int time;     /* time remaining */
20   unsigned int required; /* emeralds needed */
21   unsigned int score;    /* score */
22
23   /* fill in all below /every/ time you read a level */
24   unsigned int alien_score;           /* alien popped by stone/spring score */
25   unsigned int amoeba_time;           /* amoeba speed */
26   unsigned int android_move_cnt;      /* android move time counter */
27   unsigned int android_move_time;     /* android move reset time */
28   unsigned int android_clone_cnt;     /* android clone time counter */
29   unsigned int android_clone_time;    /* android clone reset time */
30   unsigned int ball_cnt;              /* ball time counter */
31   unsigned int ball_pos;              /* ball array pos counter */
32   unsigned int ball_random;           /* ball is random flag */
33   unsigned int ball_state;            /* ball currently on flag */
34   unsigned int ball_time;             /* ball reset time */
35   unsigned int bug_score;             /* bug popped by stone/spring score */
36   unsigned int diamond_score;         /* diamond collect score */
37   unsigned int dynamite_score;        /* dynamite collect scoer*/
38   unsigned int eater_pos;             /* eater array pos */
39   unsigned int eater_score;           /* eater popped by stone/spring score */
40   unsigned int emerald_score;         /* emerald collect score */
41   unsigned int exit_score;            /* exit score */
42   unsigned int key_score;             /* key collect score */
43   unsigned int lenses_cnt;            /* lenses time counter */
44   unsigned int lenses_score;          /* lenses collect score */
45   unsigned int lenses_time;           /* lenses reset time */
46   unsigned int magnify_cnt;           /* magnify time counter */
47   unsigned int magnify_score;         /* magnify collect score */
48   unsigned int magnify_time;          /* magnify reset time */
49   unsigned int nut_score;             /* nut crack score */
50   unsigned int shine_cnt;             /* shine counter for emerald/diamond */
51   unsigned int slurp_score;           /* slurp alien score */
52   unsigned int tank_score;            /* tank popped by stone/spring */
53   unsigned int wheel_cnt;             /* wheel time counter */
54   unsigned int wheel_x;               /* wheel x pos */
55   unsigned int wheel_y;               /* wheel y pos */
56   unsigned int wheel_time;            /* wheel reset time */
57   unsigned int wind_cnt;              /* wind time counter */
58   unsigned int wind_direction;        /* wind direction */
59   unsigned int wind_time;             /* wind reset time */
60   unsigned int wonderwall_state;      /* wonderwall currently on flag */
61   unsigned int wonderwall_time;       /* wonderwall time */
62   unsigned short eater_array[8][9];   /* eater data */
63   unsigned short ball_array[8][8];    /* ball data */
64   unsigned short android_array[TILE_MAX]; /* android clone table */
65 };
66
67 struct PLAYER
68 {
69   unsigned int num;
70   unsigned int alive;
71   unsigned int dynamite;
72   unsigned int dynamite_cnt;
73   unsigned int keys;
74   unsigned int anim;
75   unsigned int x;
76   unsigned int y;
77   unsigned int oldx;
78   unsigned int oldy;
79
80   unsigned joy_n:1;
81   unsigned joy_e:1;
82   unsigned joy_s:1;
83   unsigned joy_w:1;
84   unsigned joy_snap:1;
85   unsigned joy_drop:1;
86   unsigned joy_stick:1;
87   unsigned joy_spin:1;
88 };
89
90 #endif
91
92 extern unsigned long Random;
93
94 extern struct PLAYER ply1;
95 extern struct PLAYER ply2;
96 extern struct LEVEL lev;
97
98 extern struct LevelInfo_EM native_em_level;
99 extern struct GraphicInfo_EM graphic_info_em_object[TILE_MAX][8];
100 extern struct GraphicInfo_EM graphic_info_em_player[2][SPR_MAX][8];
101
102 extern unsigned short **Boom;
103 extern unsigned short **Cave;
104 extern unsigned short **Next;
105 extern unsigned short **Draw;
106
107 #endif