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