changed order of some structures in EM engine
[rocksndiamonds.git] / src / game_em / emerald.h
index 581d8b8d1aa0d63ff4c4ff4c8e2323bb7696f1e3..50038d4d2135a3ed5cba9a795d4a0514b6370f1f 100644 (file)
@@ -543,7 +543,7 @@ enum
   Ygrass_blank,
   Ydirt_blank,
 
-  TILE_MAX
+  GAME_TILE_MAX
 };
 
 /* other definitions */
@@ -572,7 +572,7 @@ enum
 
 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 */
@@ -616,6 +616,37 @@ enum
 // data structure definitions
 // ----------------------------------------------------------------------------
 
+/* structure used by logic() for gameplay */
+
+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;
+};
+
 struct LOGIC
 {
   int width;                   /* cave width */
@@ -678,13 +709,14 @@ struct LOGIC
   int home;                    /* number of players not yet at home */
                                /* 0 == all players at home */
 
+  boolean testmode;            /* test mode */
   boolean killed_out_of_time;  /* kill player due to time out */
 
   int exit_x, exit_y;          /* kludge for playing player exit sound */
 
   short eater_array[8][9];             /* eater data */
   short ball_array[8][8];              /* ball data */
-  short android_array[TILE_MAX];       /* android clone data */
+  short android_array[GAME_TILE_MAX];  /* android clone data */
 
   short cavebuf[CAVE_BUFFER_WIDTH][CAVE_BUFFER_HEIGHT];
   short nextbuf[CAVE_BUFFER_WIDTH][CAVE_BUFFER_HEIGHT];
@@ -702,33 +734,4 @@ struct LOGIC
   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