enum
{
- SOUND_blank = 0, /* player walks on blank */
+ SOUND_blank, /* player walks on blank */
SOUND_roll, /* player pushes stone/bomb/nut/spring */
SOUND_stone, /* stone hits ground */
SOUND_nut, /* nut hits ground */
// data structure definitions
// ----------------------------------------------------------------------------
+/* structure used by logic() for gameplay */
+
+struct PLAYER
+{
+ int anim;
+ int x;
+ int y;
+ int prev_x;
+ int prev_y;
+
+ int num; /* player number */
+
+ boolean exists; /* flag if player exists in cave */
+ boolean alive; /* flag if player is alive */
+
+ int dynamite; /* number of pieces of collected dynamite */
+ int dynamite_cnt; /* how long the player has held down fire */
+ int keys; /* keys the player has collected */
+
+ int last_move_dir;
+
+ int joy_n:1;
+ int joy_e:1;
+ int joy_s:1;
+ int joy_w:1;
+ int joy_snap:1;
+ int joy_drop:1;
+ int joy_stick:1;
+};
+
struct LOGIC
{
int width; /* cave width */
short **boom;
};
-struct PLAYER
-{
- int num;
- int exists;
- int alive_initial;
- int alive;
-
- int dynamite;
- int dynamite_cnt;
- int keys;
- int anim;
-
- int x;
- int y;
- int oldx;
- int oldy;
-
- int last_move_dir;
-
- int joy_n:1;
- int joy_e:1;
- int joy_s:1;
- int joy_w:1;
- int joy_snap:1;
- int joy_drop:1;
- int joy_stick:1;
- int joy_spin:1;
-};
-
#endif // EMERALD_H