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