rnd-20040821-5-src
authorHolger Schemel <info@artsoft.org>
Sat, 21 Aug 2004 20:14:09 +0000 (22:14 +0200)
committerHolger Schemel <info@artsoft.org>
Sat, 30 Aug 2014 08:47:49 +0000 (10:47 +0200)
src/conftime.h
src/game_em/file.h
src/game_em/global.h
src/game_em/level.h
src/game_em/sample.h
src/game_em/synchro_2.c
src/game_em/synchro_3.c
src/game_em/tile.h

index 3aa61130ddc697e6ce6d7bedfa62f34295dd66f7..5271831554c075b7e794bdd1db3842b2b326f58c 100644 (file)
@@ -1 +1 @@
-#define COMPILE_DATE_STRING "[2004-08-21 19:09]"
+#define COMPILE_DATE_STRING "[2004-08-21 22:13]"
index 678bbb4abdf2fca7bc9be970f501fee8cb9d8b73..adf69a58dd1934b0dd62d6d1f30ab5f8fcf64916 100644 (file)
@@ -1,15 +1,15 @@
 #ifndef FILE_H
 #define FILE_H
 
-/* 2000-09-28T09:07:50Z
- */
+/* 2000-09-28T09:07:50Z */
 
 #include "global.h"
 
-struct cave_node {
-       struct cave_node *next;
-       char path[MAXNAME+2];
-       char name[32];
+struct cave_node
+{
+  struct cave_node *next;
+  char path[MAXNAME+2];
+  char name[32];
 };
 
 extern struct cave_node *cave_list;
index c225dac4275ee30d4ece2eb14e93308896fb5bab..f86171a4d1f850e13188d6664cd1436412ad3a0c 100644 (file)
@@ -7,7 +7,9 @@
 #define EM_SND_DIR     "sounds.EM"
 #define EM_LVL_DIR     "levels.EM"
 
-#define MAXNAME 1024 /* arbitrary maximum length of filenames (cos i am lazy) */
+/* arbitrary maximum length of filenames (cos i am lazy) */
+#define MAXNAME 1024
+
 extern void snprintf_overflow(char *);
 
 extern int debug;
@@ -44,7 +46,8 @@ void title_initscreen(void);
 void title_blitscore(void);
 void title_animscreen(void);
 void title_blitants(unsigned int y);
-void title_string(unsigned int y, unsigned int left, unsigned int right, char *string);
+void title_string(unsigned int y, unsigned int left, unsigned int right,
+                 char *string);
 
 void sound_play(void);
 
index d7ca5a529d9f2fa327ad93b7582363c5b5f82db4..82cd93bf2159d3742f129f6217815bbd885d6172 100644 (file)
@@ -3,79 +3,83 @@
 
 #include "tile.h"
 
-#define WIDTH 102
+#define WIDTH  102
 #define HEIGHT 102
 
-struct LEVEL {
-       unsigned int home;     /* number of players that have to go home 0=all players home */
-       unsigned int width;    /* world width */
-       unsigned int height;   /* world height */
-       unsigned int time;     /* time remaining */
-       unsigned int required; /* emeralds needed */
-       unsigned int score;    /* score */
+struct LEVEL
+{
+  unsigned int home;     /* number of players that have to go home */
+                         /* 0 == all players home */
 
-/* fill in all below /every/ time you read a level */
-       unsigned int alien_score;           /* alien popped by stone/spring score */
-       unsigned int ameuba_time;           /* ameuba speed */
-       unsigned int android_move_cnt;      /* android move time counter */
-       unsigned int android_move_time;     /* android move reset time */
-       unsigned int android_clone_cnt;     /* android clone time counter */
-       unsigned int android_clone_time;    /* android clone reset time */
-       unsigned int ball_cnt;              /* ball time counter */
-       unsigned int ball_pos;              /* ball array pos counter */
-       unsigned int ball_random;           /* ball is random flag */
-       unsigned int ball_state;            /* ball currently on flag */
-       unsigned int ball_time;             /* ball reset time */
-       unsigned int bug_score;             /* bug popped by stone/spring score */
-       unsigned int diamond_score;         /* diamond collect score */
-       unsigned int dynamite_score;        /* dynamite collect scoer*/
-       unsigned int eater_pos;             /* eater array pos */
-       unsigned int eater_score;           /* eater popped by stone/spring score */
-       unsigned int emerald_score;         /* emerald collect score */
-       unsigned int exit_score;            /* exit score */
-       unsigned int key_score;             /* key collect score */
-       unsigned int lenses_cnt;            /* lenses time counter */
-       unsigned int lenses_score;          /* lenses collect score */
-       unsigned int lenses_time;           /* lenses reset time */
-       unsigned int magnify_cnt;           /* magnify time counter */
-       unsigned int magnify_score;         /* magnify collect score */
-       unsigned int magnify_time;          /* magnify reset time */
-       unsigned int nut_score;             /* nut crack score */
-       unsigned int shine_cnt;             /* shine counter for emerald/diamond */
-       unsigned int slurp_score;           /* slurp alien score */
-       unsigned int tank_score;            /* tank popped by stone/spring */
-       unsigned int wheel_cnt;             /* wheel time counter */
-       unsigned int wheel_x;               /* wheel x pos */
-       unsigned int wheel_y;               /* wheel y pos */
-       unsigned int wheel_time;            /* wheel reset time */
-       unsigned int wind_cnt;              /* wind time counter */
-       unsigned int wind_direction;        /* wind direction */
-       unsigned int wind_time;             /* wind reset time */
-       unsigned int wonderwall_state;      /* wonderwall currently on flag */
-       unsigned int wonderwall_time;       /* wonderwall time */
-       unsigned short eater_array[8][9];   /* eater data */
-       unsigned short ball_array[8][8];    /* ball data */
-       unsigned short android_array[TILE_MAX]; /* android clone table */
+  unsigned int width;    /* world width */
+  unsigned int height;   /* world height */
+  unsigned int time;     /* time remaining */
+  unsigned int required; /* emeralds needed */
+  unsigned int score;    /* score */
+
+  /* fill in all below /every/ time you read a level */
+  unsigned int alien_score;           /* alien popped by stone/spring score */
+  unsigned int ameuba_time;           /* ameuba speed */
+  unsigned int android_move_cnt;      /* android move time counter */
+  unsigned int android_move_time;     /* android move reset time */
+  unsigned int android_clone_cnt;     /* android clone time counter */
+  unsigned int android_clone_time;    /* android clone reset time */
+  unsigned int ball_cnt;              /* ball time counter */
+  unsigned int ball_pos;              /* ball array pos counter */
+  unsigned int ball_random;           /* ball is random flag */
+  unsigned int ball_state;            /* ball currently on flag */
+  unsigned int ball_time;             /* ball reset time */
+  unsigned int bug_score;             /* bug popped by stone/spring score */
+  unsigned int diamond_score;         /* diamond collect score */
+  unsigned int dynamite_score;        /* dynamite collect scoer*/
+  unsigned int eater_pos;             /* eater array pos */
+  unsigned int eater_score;           /* eater popped by stone/spring score */
+  unsigned int emerald_score;         /* emerald collect score */
+  unsigned int exit_score;            /* exit score */
+  unsigned int key_score;             /* key collect score */
+  unsigned int lenses_cnt;            /* lenses time counter */
+  unsigned int lenses_score;          /* lenses collect score */
+  unsigned int lenses_time;           /* lenses reset time */
+  unsigned int magnify_cnt;           /* magnify time counter */
+  unsigned int magnify_score;         /* magnify collect score */
+  unsigned int magnify_time;          /* magnify reset time */
+  unsigned int nut_score;             /* nut crack score */
+  unsigned int shine_cnt;             /* shine counter for emerald/diamond */
+  unsigned int slurp_score;           /* slurp alien score */
+  unsigned int tank_score;            /* tank popped by stone/spring */
+  unsigned int wheel_cnt;             /* wheel time counter */
+  unsigned int wheel_x;               /* wheel x pos */
+  unsigned int wheel_y;               /* wheel y pos */
+  unsigned int wheel_time;            /* wheel reset time */
+  unsigned int wind_cnt;              /* wind time counter */
+  unsigned int wind_direction;        /* wind direction */
+  unsigned int wind_time;             /* wind reset time */
+  unsigned int wonderwall_state;      /* wonderwall currently on flag */
+  unsigned int wonderwall_time;       /* wonderwall time */
+  unsigned short eater_array[8][9];   /* eater data */
+  unsigned short ball_array[8][8];    /* ball data */
+  unsigned short android_array[TILE_MAX]; /* android clone table */
 };
 
-struct PLAYER {
-       unsigned int num;
-       unsigned int alive;
-       unsigned int dynamite;
-       unsigned int dynamite_cnt;
-       unsigned int keys;
-       unsigned int anim;
-       unsigned int x;
-       unsigned int y;
-       unsigned int oldx;
-       unsigned int oldy;
-       unsigned joy_n:1;
-       unsigned joy_e:1;
-       unsigned joy_s:1;
-       unsigned joy_w:1;
-       unsigned joy_fire:1;
-       unsigned joy_stick:1;
-       unsigned joy_spin:1;
+struct PLAYER
+{
+  unsigned int num;
+  unsigned int alive;
+  unsigned int dynamite;
+  unsigned int dynamite_cnt;
+  unsigned int keys;
+  unsigned int anim;
+  unsigned int x;
+  unsigned int y;
+  unsigned int oldx;
+  unsigned int oldy;
+  unsigned joy_n:1;
+  unsigned joy_e:1;
+  unsigned joy_s:1;
+  unsigned joy_w:1;
+  unsigned joy_fire:1;
+  unsigned joy_stick:1;
+  unsigned joy_spin:1;
 };
 
 extern unsigned long Random;
@@ -83,6 +87,7 @@ extern unsigned long Random;
 extern struct PLAYER ply1;
 extern struct PLAYER ply2;
 extern struct LEVEL lev;
+
 extern unsigned short **Boom;
 extern unsigned short **Cave;
 extern unsigned short **Next;
index 680aff05765be16c22a9b34e0617d563b6265d1e..e35d7e5f02cd0f7b169c4be7f9a239b70b1f48e4 100644 (file)
@@ -1,39 +1,40 @@
 #ifndef SAMPLE_H
 #define SAMPLE_H
 
-enum {
-       SAMPLE_blank = 0, /* player walks on blank */
-       SAMPLE_roll, /* player pushes stone/bomb/nut */
-       SAMPLE_stone, /* stone hits ground */
-       SAMPLE_nut, /* nut hits ground */
-       SAMPLE_crack, /* stone hits nut */
-       SAMPLE_bug, /* bug moves */
-       SAMPLE_tank, /* tank moves */
-       SAMPLE_android, /* android places something */
-       SAMPLE_spring, /* spring hits ground/wall/bumper, stone hits spring */
-       SAMPLE_slurp, /* spring kills alien */
-       SAMPLE_eater, /* eater sits/eats diamond */
-       SAMPLE_alien, /* alien moves */
-       SAMPLE_collect, /* player collects diamond/emerald/dynamite/key/lenses/magnify */
-       SAMPLE_diamond, /* diamond/emerald hits ground */
-       SAMPLE_squash, /* stone squashes diamond, stone/emerald/diamond thru wonderwall */
-       SAMPLE_drip, /* drip hits ground */
-       SAMPLE_push, /* player pushes spring/balloon/android */
-       SAMPLE_dirt, /* player walks on dirt */
-       SAMPLE_acid, /* acid splashes */
-       SAMPLE_ball, /* ball places something */
-       SAMPLE_grow, /* growing wall grows */
-       SAMPLE_wonder, /* wonderwall moves */
-       SAMPLE_door, /* player goes thru door */
-       SAMPLE_exit, /* player goes in exit */
-       SAMPLE_dynamite, /* player places dynamite */
-       SAMPLE_tick, /* dynamite ticks */
-       SAMPLE_press, /* player presses wheel/wind/switch */
-       SAMPLE_wheel, /* wheel moves */
-       SAMPLE_boom, /* explosion */
-       SAMPLE_time, /* time runs out */
-       SAMPLE_die, /* player dies */
-       SAMPLE_MAX
+enum
+{
+  SAMPLE_blank = 0, /* player walks on blank */
+  SAMPLE_roll,      /* player pushes stone/bomb/nut */
+  SAMPLE_stone,     /* stone hits ground */
+  SAMPLE_nut,       /* nut hits ground */
+  SAMPLE_crack,     /* stone hits nut */
+  SAMPLE_bug,       /* bug moves */
+  SAMPLE_tank,      /* tank moves */
+  SAMPLE_android,   /* android places something */
+  SAMPLE_spring,    /* spring hits ground/wall/bumper, stone hits spring */
+  SAMPLE_slurp,     /* spring kills alien */
+  SAMPLE_eater,     /* eater sits/eats diamond */
+  SAMPLE_alien,     /* alien moves */
+  SAMPLE_collect,   /* player collects diamond/emerald/dynamite/key/lenses/magnify */
+  SAMPLE_diamond,   /* diamond/emerald hits ground */
+  SAMPLE_squash,    /* stone squashes diamond, stone/emerald/diamond thru wonderwall */
+  SAMPLE_drip,      /* drip hits ground */
+  SAMPLE_push,      /* player pushes spring/balloon/android */
+  SAMPLE_dirt,      /* player walks on dirt */
+  SAMPLE_acid,      /* acid splashes */
+  SAMPLE_ball,      /* ball places something */
+  SAMPLE_grow,      /* growing wall grows */
+  SAMPLE_wonder,    /* wonderwall moves */
+  SAMPLE_door,      /* player goes thru door */
+  SAMPLE_exit,      /* player goes in exit */
+  SAMPLE_dynamite,  /* player places dynamite */
+  SAMPLE_tick,      /* dynamite ticks */
+  SAMPLE_press,     /* player presses wheel/wind/switch */
+  SAMPLE_wheel,     /* wheel moves */
+  SAMPLE_boom,      /* explosion */
+  SAMPLE_time,      /* time runs out */
+  SAMPLE_die,       /* player dies */
+  SAMPLE_MAX
 };
 
 extern char play[SAMPLE_MAX];
@@ -43,6 +44,10 @@ extern long sound_length[SAMPLE_MAX];
 
 #define MIXER_MAX 4 /* maximum number of samples we can play at once */
 
-enum { AUDIO_ULAW = 0, AUDIO_U8 };
+enum
+{
+  AUDIO_ULAW = 0,
+  AUDIO_U8
+};
 
 #endif
index 6c9cf8f0a00defc731b111b454c3d20a68664c03..4fbf2d9f182a56ac443bb2bc9310455fd3a0c416 100644 (file)
@@ -4,7 +4,8 @@
  *
  * one giant switch statement to process everything.
  *
- * this whole thing is a major bottleneck. the compiler must use registers. compilers suck.
+ * this whole thing is a major bottleneck. the compiler must use registers.
+ * compilers suck.
  */
 
 #include "display.h"
 
 #if defined(TARGET_X11)
 
+#define RANDOM (random = random << 31 | random >> 1)
+#define PLAY(sample) { if ((unsigned int)(y - top) <= 12 && (unsigned int)(x - left) <= 20) play[sample] = 1; }
+
 extern unsigned int screen_x;
 extern unsigned int screen_y;
 
 void synchro_2(void)
 {
-       register unsigned int x = 0;
-       register unsigned int y = 1;
-       register unsigned long random = Random;
-       register unsigned short *cave_cache = Cave[y]; /* might be a win */
-       unsigned long score = 0;
-
-       unsigned int temp = 0;  /* initialized to make compilers happy */
-       unsigned int left = screen_x / TILEX; /* only needed for sounds */
-       unsigned int top = screen_y / TILEY;
-       unsigned int dx; /* only needed to find closest player */
-       unsigned int dy;
+  register unsigned int x = 0;
+  register unsigned int y = 1;
+  register unsigned long random = Random;
+  register unsigned short *cave_cache = Cave[y]; /* might be a win */
+  unsigned long score = 0;
 
-#define RANDOM (random = random << 31 | random >> 1)
-#define PLAY(sample) { if((unsigned int)(y - top) <= 12 && (unsigned int)(x - left) <= 20) play[sample] = 1; }
+  unsigned int temp = 0;       /* initialized to make compilers happy */
+  unsigned int left = screen_x / TILEX; /* only needed for sounds */
+  unsigned int top = screen_y / TILEY;
+  unsigned int dx; /* only needed to find closest player */
+  unsigned int dy;
+
+ loop:
+
+  switch (cave_cache[++x])
+  {
+    default:
+      goto loop;
+
+    /* --------------------------------------------------------------------- */
 
-loop:
-       switch(cave_cache[++x]) {
-       default:
-               goto loop;
-/* ---------------------------------------------------------------------- */
 #ifdef BAD_ROLL
-       case Xstone_force_e:
-               switch(Cave[y][x+1]) {
-               case ZBORDER:
-               case Znormal:
-               case Zdynamite:
-               case Xboom_bug:
-               case Xboom_bomb:
-               case Xboom_android:
-               case Xboom_1:
-               case Zplayer:
-                       Cave[y][x] = Xstone;
-                       Next[y][x] = Xstone;
-                       goto loop;
-               default:
-                       Cave[y][x] = Ystone_eB;
-                       Cave[y][x+1] = Ystone_e;
-                       Next[y][x] = Xblank;
-                       Next[y][x+1] = Xstone_pause;
-                       goto loop;
-               }
-       case Xstone_force_w:
-               switch(Cave[y][x-1]) {
-               case ZBORDER:
-               case Znormal:
-               case Zdynamite:
-               case Xboom_bug:
-               case Xboom_bomb:
-               case Xboom_android:
-               case Xboom_1:
-               case Zplayer:
-                       Cave[y][x] = Xstone;
-                       Next[y][x] = Xstone;
-                       goto loop;
-               default:
-                       Cave[y][x] = Ystone_wB;
-                       Cave[y][x-1] = Ystone_w;
-                       Next[y][x] = Xblank;
-                       Next[y][x-1] = Xstone_pause;
-                       goto loop;
-               }
-       case Xnut_force_e:
-               switch(Cave[y][x+1]) {
-               case ZBORDER:
-               case Znormal:
-               case Zdynamite:
-               case Xboom_bug:
-               case Xboom_bomb:
-               case Xboom_android:
-               case Xboom_1:
-               case Zplayer:
-                       Cave[y][x] = Xnut;
-                       Next[y][x] = Xnut;
-                       goto loop;
-               default:
-                       Cave[y][x] = Ynut_eB;
-                       Cave[y][x+1] = Ynut_e;
-                       Next[y][x] = Xblank;
-                       Next[y][x+1] = Xnut_pause;
-                       goto loop;
-               }
-       case Xnut_force_w:
-               switch(Cave[y][x-1]) {
-               case ZBORDER:
-               case Znormal:
-               case Zdynamite:
-               case Xboom_bug:
-               case Xboom_bomb:
-               case Xboom_android:
-               case Xboom_1:
-               case Zplayer:
-                       Cave[y][x] = Xnut;
-                       Next[y][x] = Xnut;
-                       goto loop;
-               default:
-                       Cave[y][x] = Ynut_wB;
-                       Cave[y][x-1] = Ynut_w;
-                       Next[y][x] = Xblank;
-                       Next[y][x-1] = Xnut_pause;
-                       goto loop;
-               }
-       case Xspring_force_e:
-               switch(Cave[y][x+1]) {
-               case ZBORDER:
-               case Znormal:
-               case Zdynamite:
-               case Xboom_bug:
-               case Xboom_bomb:
-               case Xboom_android:
-               case Xboom_1:
-               case Zplayer:
-                       Cave[y][x] = Xspring;
-                       Next[y][x] = Xspring;
-                       goto loop;
-               default:
-                       Cave[y][x] = Yspring_eB;
-                       Cave[y][x+1] = Yspring_e;
-                       Next[y][x] = Xblank;
-#ifdef BAD_SPRING
-                       Next[y][x+1] = Xspring_e;
-#else
-                       Next[y][x+1] = Xspring_pause;
-#endif
-                       goto loop;
-               }
-       case Xspring_force_w:
-               switch(Cave[y][x-1]) {
-               case ZBORDER:
-               case Znormal:
-               case Zdynamite:
-               case Xboom_bug:
-               case Xboom_bomb:
-               case Xboom_android:
-               case Xboom_1:
-               case Zplayer:
-                       Cave[y][x] = Xspring;
-                       Next[y][x] = Xspring;
-                       goto loop;
-               default:
-                       Cave[y][x] = Yspring_wB;
-                       Cave[y][x-1] = Yspring_w;
-                       Next[y][x] = Xblank;
-#ifdef BAD_SPRING
-                       Next[y][x-1] = Xspring_w;
-#else
-                       Next[y][x-1] = Xspring_pause;
-#endif
-                       goto loop;
-               }
-       case Xemerald_force_e:
-               switch(Cave[y][x+1]) {
-               case ZBORDER:
-               case Znormal:
-               case Zdynamite:
-               case Xboom_bug:
-               case Xboom_bomb:
-               case Xboom_android:
-               case Xboom_1:
-               case Zplayer:
-                       Cave[y][x] = Xemerald;
-                       Next[y][x] = Xemerald;
-                       goto loop;
-               default:
-                       Cave[y][x] = Yemerald_eB;
-                       Cave[y][x+1] = Yemerald_e;
-                       Next[y][x] = Xblank;
-                       Next[y][x+1] = Xemerald_pause;
-                       goto loop;
-               }
-       case Xemerald_force_w:
-               switch(Cave[y][x-1]) {
-               case ZBORDER:
-               case Znormal:
-               case Zdynamite:
-               case Xboom_bug:
-               case Xboom_bomb:
-               case Xboom_android:
-               case Xboom_1:
-               case Zplayer:
-                       Cave[y][x] = Xemerald;
-                       Next[y][x] = Xemerald;
-                       goto loop;
-               default:
-                       Cave[y][x] = Yemerald_wB;
-                       Cave[y][x-1] = Yemerald_w;
-                       Next[y][x] = Xblank;
-                       Next[y][x-1] = Xemerald_pause;
-                       goto loop;
-               }
-       case Xdiamond_force_e:
-               switch(Cave[y][x+1]) {
-               case ZBORDER:
-               case Znormal:
-               case Zdynamite:
-               case Xboom_bug:
-               case Xboom_bomb:
-               case Xboom_android:
-               case Xboom_1:
-               case Zplayer:
-                       Cave[y][x] = Xdiamond;
-                       Next[y][x] = Xdiamond;
-                       goto loop;
-               default:
-                       Cave[y][x] = Ydiamond_eB;
-                       Cave[y][x+1] = Ydiamond_e;
-                       Next[y][x] = Xblank;
-                       Next[y][x+1] = Xdiamond_pause;
-                       goto loop;
-               }
-       case Xdiamond_force_w:
-               switch(Cave[y][x-1]) {
-               case ZBORDER:
-               case Znormal:
-               case Zdynamite:
-               case Xboom_bug:
-               case Xboom_bomb:
-               case Xboom_android:
-               case Xboom_1:
-               case Zplayer:
-                       Cave[y][x] = Xdiamond;
-                       Next[y][x] = Xdiamond;
-                       goto loop;
-               default:
-                       Cave[y][x] = Ydiamond_wB;
-                       Cave[y][x-1] = Ydiamond_w;
-                       Next[y][x] = Xblank;
-                       Next[y][x-1] = Xdiamond_pause;
-                       goto loop;
-               }
-       case Xbomb_force_e:
-               switch(Cave[y][x+1]) {
-               case ZBORDER:
-               case Znormal:
-               case Zdynamite:
-               case Xboom_bug:
-               case Xboom_bomb:
-               case Xboom_android:
-               case Xboom_1:
-               case Zplayer:
-                       Cave[y][x] = Xbomb;
-                       Next[y][x] = Xbomb;
-                       goto loop;
-               default:
-                       Cave[y][x] = Ybomb_eB;
-                       Cave[y][x+1] = Ybomb_e;
-                       Next[y][x] = Xblank;
-                       Next[y][x+1] = Xbomb_pause;
-                       goto loop;
-               }
-       case Xbomb_force_w:
-               switch(Cave[y][x-1]) {
-               case ZBORDER:
-               case Znormal:
-               case Zdynamite:
-               case Xboom_bug:
-               case Xboom_bomb:
-               case Xboom_android:
-               case Xboom_1:
-               case Zplayer:
-                       Cave[y][x] = Xbomb;
-                       Next[y][x] = Xbomb;
-                       goto loop;
-               default:
-                       Cave[y][x] = Ybomb_wB;
-                       Cave[y][x-1] = Ybomb_w;
-                       Next[y][x] = Xblank;
-                       Next[y][x-1] = Xbomb_pause;
-                       goto loop;
-               }
-#endif
-/* ---------------------------------------------------------------------- */
-       case Xstone:
-               switch(Cave[y+1][x]) {
-               case Xacid_1:
-               case Xacid_2:
-               case Xacid_3:
-               case Xacid_4:
-               case Xacid_5:
-               case Xacid_6:
-               case Xacid_7:
-               case Xacid_8:
-                       Cave[y][x] = Ystone_sB;
-                       if(Cave[y][x+1] == Xblank) Cave[y][x+1] = Yacid_splash_eB;
-                       if(Cave[y][x-1] == Xblank) Cave[y][x-1] = Yacid_splash_wB;
-                       Next[y][x] = Xblank;
-                       PLAY(SAMPLE_acid);
-                       goto loop;
-               case Xblank:
-               case Yacid_splash_eB:
-               case Yacid_splash_wB:
-               case Xplant:
-               case Yplant:
-                       Cave[y][x] = Ystone_sB;
-                       Cave[y+1][x] = Ystone_s;
-                       Next[y][x] = Xblank;
-                       Next[y+1][x] = Xstone_fall;
-                       goto loop;
-               case Xsand:
-                       Cave[y][x] = Xsand_stonein_1;
-                       Cave[y+1][x] = Xsand_sandstone_1;
-                       Next[y][x] = Xsand_stonein_2;
-                       Next[y+1][x] = Xsand_sandstone_2;
-                       goto loop;
-               case Xspring:
-               case Xspring_pause:
-               case Xspring_e:
-               case Xspring_w:
-               case Xandroid:
-               case Xandroid_1_n:
-               case Xandroid_2_n:
-               case Xandroid_1_e:
-               case Xandroid_2_e:
-               case Xandroid_1_s:
-               case Xandroid_2_s:
-               case Xandroid_1_w:
-               case Xandroid_2_w:
-               case Xstone:
-               case Xstone_pause:
-               case Xemerald:
-               case Xemerald_pause:
-               case Xdiamond:
-               case Xdiamond_pause:
-               case Xbomb:
-               case Xbomb_pause:
-               case Xballoon:
-               case Xacid_ne:
-               case Xacid_nw:
-               case Xball_1:
-               case Xball_2:
-               case Xnut:
-               case Xnut_pause:
-               case Xgrow_ns:
-               case Xgrow_ew:
-               case Xkey_1:
-               case Xkey_2:
-               case Xkey_3:
-               case Xkey_4:
-               case Xkey_5:
-               case Xkey_6:
-               case Xkey_7:
-               case Xkey_8:
-               case Xbumper:
-               case Xswitch:
-               case Xlenses:
-               case Xmagnify:
-               case Xround_wall_1:
-               case Xround_wall_2:
-               case Xround_wall_3:
-               case Xround_wall_4:
-                       if(RANDOM & 1) {
-                               if(tab_blank[Cave[y][x+1]] && tab_acid[Cave[y+1][x+1]]) {
-                                       Cave[y][x] = Ystone_eB;
-                                       Cave[y][x+1] = Ystone_e;
-                                       Next[y][x] = Xblank;
-                                       Next[y][x+1] = Xstone_pause;
-                                       goto loop;
-                               }
-                               if(tab_blank[Cave[y][x-1]] && tab_acid[Cave[y+1][x-1]]) {
-                                       Cave[y][x] = Ystone_wB;
-                                       Cave[y][x-1] = Ystone_w;
-                                       Next[y][x] = Xblank;
-                                       Next[y][x-1] = Xstone_pause;
-                                       goto loop;
-                               }
-                       } else {
-                               if(tab_blank[Cave[y][x-1]] && tab_acid[Cave[y+1][x-1]]) {
-                                       Cave[y][x] = Ystone_wB;
-                                       Cave[y][x-1] = Ystone_w;
-                                       Next[y][x] = Xblank;
-                                       Next[y][x-1] = Xstone_pause;
-                                       goto loop;
-                               }
-                               if(tab_blank[Cave[y][x+1]] && tab_acid[Cave[y+1][x+1]]) {
-                                       Cave[y][x] = Ystone_eB;
-                                       Cave[y][x+1] = Ystone_e;
-                                       Next[y][x] = Xblank;
-                                       Next[y][x+1] = Xstone_pause;
-                                       goto loop;
-                               }
-                       }
-               default:
-                       goto loop;
-               }
-/* ---------------------------------------------------------------------- */
-       case Xstone_pause:
-               switch(Cave[y+1][x]) {
-               case Xacid_1:
-               case Xacid_2:
-               case Xacid_3:
-               case Xacid_4:
-               case Xacid_5:
-               case Xacid_6:
-               case Xacid_7:
-               case Xacid_8:
-                       Cave[y][x] = Ystone_sB;
-                       if(Cave[y][x+1] == Xblank) Cave[y][x+1] = Yacid_splash_eB;
-                       if(Cave[y][x-1] == Xblank) Cave[y][x-1] = Yacid_splash_wB;
-                       Next[y][x] = Xblank;
-                       PLAY(SAMPLE_acid);
-                       goto loop;
-               case Xblank:
-               case Yacid_splash_eB:
-               case Yacid_splash_wB:
-                       Cave[y][x] = Ystone_sB;
-                       Cave[y+1][x] = Ystone_s;
-                       Next[y][x] = Xblank;
-                       Next[y+1][x] = Xstone_fall;
-                       goto loop;
-               default:
-                       Cave[y][x] = Xstone;
-                       Next[y][x] = Xstone;
-                       goto loop;
-               }
-/* ---------------------------------------------------------------------- */
-       case Xstone_fall:
-               switch(Cave[y+1][x]) {
-               case Xacid_1:
-               case Xacid_2:
-               case Xacid_3:
-               case Xacid_4:
-               case Xacid_5:
-               case Xacid_6:
-               case Xacid_7:
-               case Xacid_8:
-                       Cave[y][x] = Ystone_sB;
-                       if(Cave[y][x+1] == Xblank) Cave[y][x+1] = Yacid_splash_eB;
-                       if(Cave[y][x-1] == Xblank) Cave[y][x-1] = Yacid_splash_wB;
-                       Next[y][x] = Xblank;
-                       PLAY(SAMPLE_acid);
-                       goto loop;
-               case Xblank:
-               case Yacid_splash_eB:
-               case Yacid_splash_wB:
-               case Zplayer:
-                       Cave[y][x] = Ystone_sB;
-                       Cave[y+1][x] = Ystone_s;
-                       Next[y][x] = Xblank;
-                       Next[y+1][x] = Xstone_fall;
-                       goto loop;
-               case Xnut:
-               case Xnut_pause:
-                       Cave[y+1][x] = Yemerald_stone;
-                       Next[y][x] = Xstone;
-                       Next[y+1][x] = Xemerald;
-                       play[SAMPLE_crack] = 1;
-                       score += lev.nut_score;
-                       goto loop;
-               case Xbug_n:
-               case Xbug_e:
-               case Xbug_s:
-               case Xbug_w:
-               case Xbug_gon:
-               case Xbug_goe:
-               case Xbug_gos:
-               case Xbug_gow:
-                       Cave[y][x] = Ystone_sB;
-                       Cave[y+1][x] = Ybug_stone;
-                       Next[y+1][x] = Znormal;
-                       Boom[y][x-1] = Xemerald;
-                       Boom[y][x] = Xemerald;
-                       Boom[y][x+1] = Xemerald;
-                       Boom[y+1][x-1] = Xemerald;
-                       Boom[y+1][x] = Xdiamond;
-                       Boom[y+1][x+1] = Xemerald;
-                       Boom[y+2][x-1] = Xemerald;
-                       Boom[y+2][x] = Xemerald;
-                       Boom[y+2][x+1] = Xemerald;
-                       score += lev.bug_score;
-                       goto loop;
-               case Xtank_n:
-               case Xtank_e:
-               case Xtank_s:
-               case Xtank_w:
-               case Xtank_gon:
-               case Xtank_goe:
-               case Xtank_gos:
-               case Xtank_gow:
-                       Cave[y][x] = Ystone_sB;
-                       Cave[y+1][x] = Ytank_stone;
-                       Next[y+1][x] = Znormal;
-                       Boom[y][x-1] = Xblank;
-                       Boom[y][x] = Xblank;
-                       Boom[y][x+1] = Xblank;
-                       Boom[y+1][x-1] = Xblank;
-                       Boom[y+1][x] = Xblank;
-                       Boom[y+1][x+1] = Xblank;
-                       Boom[y+2][x-1] = Xblank;
-                       Boom[y+2][x] = Xblank;
-                       Boom[y+2][x+1] = Xblank;
-                       score += lev.tank_score;
-                       goto loop;
-               case Xspring:
-                       if(RANDOM & 1) {
-                               switch(Cave[y+1][x+1]) {
-                               case Xblank:
-                               case Yacid_splash_eB:
-                               case Yacid_splash_wB:
-                               case Xalien:
-                               case Xalien_pause:
-                                       Cave[y+1][x] = Xspring_e; break;
-                               default:
-                                       Cave[y+1][x] = Xspring_w; break;
-                               }
-                       } else {
-                               switch(Cave[y+1][x-1]) {
-                               case Xblank:
-                               case Yacid_splash_eB:
-                               case Yacid_splash_wB:
-                               case Xalien:
-                               case Xalien_pause:
-                                       Cave[y+1][x] = Xspring_w; break;
-                               default:
-                                       Cave[y+1][x] = Xspring_e; break;
-                               }
-                       }
-                       Next[y][x] = Xstone;
-                       goto loop;
-               case Xeater_n:
-               case Xeater_e:
-               case Xeater_s:
-               case Xeater_w:
-                       Cave[y][x] = Ystone_sB;
-                       Cave[y+1][x] = Yeater_stone;
-                       Next[y+1][x] = Znormal;
-                       Boom[y][x-1] = lev.eater_array[lev.eater_pos][0];
-                       Boom[y][x] = lev.eater_array[lev.eater_pos][1];
-                       Boom[y][x+1] = lev.eater_array[lev.eater_pos][2];
-                       Boom[y+1][x-1] = lev.eater_array[lev.eater_pos][3];
-                       Boom[y+1][x] = lev.eater_array[lev.eater_pos][4];
-                       Boom[y+1][x+1] = lev.eater_array[lev.eater_pos][5];
-                       Boom[y+2][x-1] = lev.eater_array[lev.eater_pos][6];
-                       Boom[y+2][x] = lev.eater_array[lev.eater_pos][7];
-                       Boom[y+2][x+1] = lev.eater_array[lev.eater_pos][8];
-                       lev.eater_pos = (lev.eater_pos + 1) & 7;
-                       score += lev.eater_score;
-                       goto loop;
-               case Xalien:
-               case Xalien_pause:
-                       Cave[y][x] = Ystone_sB;
-                       Cave[y+1][x] = Yalien_stone;
-                       Next[y+1][x] = Znormal;
-                       Boom[y][x-1] = Xblank;
-                       Boom[y][x] = Xblank;
-                       Boom[y][x+1] = Xblank;
-                       Boom[y+1][x-1] = Xblank;
-                       Boom[y+1][x] = Xblank;
-                       Boom[y+1][x+1] = Xblank;
-                       Boom[y+2][x-1] = Xblank;
-                       Boom[y+2][x] = Xblank;
-                       Boom[y+2][x+1] = Xblank;
-                       score += lev.alien_score;
-                       goto loop;
-               case Xdiamond:
-               case Xdiamond_pause:
-                       switch(Cave[y+2][x]) {
-                       case Xblank:
-                       case Yacid_splash_eB:
-                       case Yacid_splash_wB:
-                       case Zplayer:
-                       case Xbug_n:
-                       case Xbug_e:
-                       case Xbug_s:
-                       case Xbug_w:
-                       case Xbug_gon:
-                       case Xbug_goe:
-                       case Xbug_gos:
-                       case Xbug_gow:
-                       case Xtank_n:
-                       case Xtank_e:
-                       case Xtank_s:
-                       case Xtank_w:
-                       case Xtank_gon:
-                       case Xtank_goe:
-                       case Xtank_gos:
-                       case Xtank_gow:
-                       case Xspring_fall:
-                       case Xandroid:
-                       case Xandroid_1_n:
-                       case Xandroid_2_n:
-                       case Xandroid_1_e:
-                       case Xandroid_2_e:
-                       case Xandroid_1_s:
-                       case Xandroid_2_s:
-                       case Xandroid_1_w:
-                       case Xandroid_2_w:
-                       case Xstone_fall:
-                       case Xemerald_fall:
-                       case Xdiamond_fall:
-                       case Xbomb_fall:
-                       case Xacid_s:
-                       case Xacid_1:
-                       case Xacid_2:
-                       case Xacid_3:
-                       case Xacid_4:
-                       case Xacid_5:
-                       case Xacid_6:
-                       case Xacid_7:
-                       case Xacid_8:
-                       case Xnut_fall:
-                       case Xplant:
-                       case Yplant:
-                               Next[y][x] = Xstone;
-                               PLAY(SAMPLE_stone);
-                               goto loop;
-                       }
-                       Cave[y][x] = Ystone_sB;
-                       Cave[y+1][x] = Ydiamond_stone;
-                       Next[y][x] = Xblank;
-                       Next[y+1][x] = Xstone_pause;
-                       play[SAMPLE_squash] = 1;
-                       goto loop;
-               case Xbomb:
-               case Xbomb_pause:
-                       Cave[y+1][x] = Ybomb_eat;
-                       Next[y+1][x] = Znormal;
-                       Boom[y][x-1] = Xblank;
-                       Boom[y][x] = Xblank;
-                       Boom[y][x+1] = Xblank;
-                       Boom[y+1][x-1] = Xblank;
-                       Boom[y+1][x] = Xblank;
-                       Boom[y+1][x+1] = Xblank;
-                       Boom[y+2][x-1] = Xblank;
-                       Boom[y+2][x] = Xblank;
-                       Boom[y+2][x+1] = Xblank;
-                       goto loop;
-               case Xwonderwall:
-                       if(lev.wonderwall_time) {
-                               lev.wonderwall_state = 1;
-                               Cave[y][x] = Ystone_sB;
-                               if(tab_blank[Cave[y+2][x]]) {
-                                       Cave[y+2][x] = Yemerald_s;
-                                       Next[y+2][x] = Xemerald_fall;
-                               }
-                               Next[y][x] = Xblank;
-                               play[SAMPLE_squash] = 1;
-                               goto loop;
-                       }
-               default:
-                       Cave[y][x] = Xstone;
-                       Next[y][x] = Xstone;
-                       PLAY(SAMPLE_stone);
-                       goto loop;
-               }
-/* ---------------------------------------------------------------------- */
-       case Xnut:
-               switch(Cave[y+1][x]) {
-               case Xacid_1:
-               case Xacid_2:
-               case Xacid_3:
-               case Xacid_4:
-               case Xacid_5:
-               case Xacid_6:
-               case Xacid_7:
-               case Xacid_8:
-                       Cave[y][x] = Ynut_sB;
-                       if(Cave[y][x+1] == Xblank) Cave[y][x+1] = Yacid_splash_eB;
-                       if(Cave[y][x-1] == Xblank) Cave[y][x-1] = Yacid_splash_wB;
-                       Next[y][x] = Xblank;
-                       PLAY(SAMPLE_acid);
-                       goto loop;
-               case Xblank:
-               case Yacid_splash_eB:
-               case Yacid_splash_wB:
-                       Cave[y][x] = Ynut_sB;
-                       Cave[y+1][x] = Ynut_s;
-                       Next[y][x] = Xblank;
-                       Next[y+1][x] = Xnut_fall;
-                       goto loop;
-               case Xspring:
-               case Xspring_pause:
-               case Xspring_e:
-               case Xspring_w:
-               case Xandroid:
-               case Xandroid_1_n:
-               case Xandroid_2_n:
-               case Xandroid_1_e:
-               case Xandroid_2_e:
-               case Xandroid_1_s:
-               case Xandroid_2_s:
-               case Xandroid_1_w:
-               case Xandroid_2_w:
-               case Xstone:
-               case Xstone_pause:
-               case Xemerald:
-               case Xemerald_pause:
-               case Xdiamond:
-               case Xdiamond_pause:
-               case Xbomb:
-               case Xbomb_pause:
-               case Xballoon:
-               case Xacid_ne:
-               case Xacid_nw:
-               case Xball_1:
-               case Xball_2:
-               case Xnut:
-               case Xnut_pause:
-               case Xgrow_ns:
-               case Xgrow_ew:
-               case Xkey_1:
-               case Xkey_2:
-               case Xkey_3:
-               case Xkey_4:
-               case Xkey_5:
-               case Xkey_6:
-               case Xkey_7:
-               case Xkey_8:
-               case Xbumper:
-               case Xswitch:
-               case Xround_wall_1:
-               case Xround_wall_2:
-               case Xround_wall_3:
-               case Xround_wall_4:
-                       if(RANDOM & 1) {
-                               if(tab_blank[Cave[y][x+1]] && tab_acid[Cave[y+1][x+1]]) {
-                                       Cave[y][x] = Ynut_eB;
-                                       Cave[y][x+1] = Ynut_e;
-                                       Next[y][x] = Xblank;
-                                       Next[y][x+1] = Xnut_pause;
-                                       goto loop;
-                               }
-                               if(tab_blank[Cave[y][x-1]] && tab_acid[Cave[y+1][x-1]]) {
-                                       Cave[y][x] = Ynut_wB;
-                                       Cave[y][x-1] = Ynut_w;
-                                       Next[y][x] = Xblank;
-                                       Next[y][x-1] = Xnut_pause;
-                                       goto loop;
-                               }
-                       } else {
-                               if(tab_blank[Cave[y][x-1]] && tab_acid[Cave[y+1][x-1]]) {
-                                       Cave[y][x] = Ynut_wB;
-                                       Cave[y][x-1] = Ynut_w;
-                                       Next[y][x] = Xblank;
-                                       Next[y][x-1] = Xnut_pause;
-                                       goto loop;
-                               }
-                               if(tab_blank[Cave[y][x+1]] && tab_acid[Cave[y+1][x+1]]) {
-                                       Cave[y][x] = Ynut_eB;
-                                       Cave[y][x+1] = Ynut_e;
-                                       Next[y][x] = Xblank;
-                                       Next[y][x+1] = Xnut_pause;
-                                       goto loop;
-                               }
-                       }
-               default:
-                       goto loop;
-               }
-/* ---------------------------------------------------------------------- */
-       case Xnut_pause:
-               switch(Cave[y+1][x]) {
-               case Xacid_1:
-               case Xacid_2:
-               case Xacid_3:
-               case Xacid_4:
-               case Xacid_5:
-               case Xacid_6:
-               case Xacid_7:
-               case Xacid_8:
-                       Cave[y][x] = Ynut_sB;
-                       if(Cave[y][x+1] == Xblank) Cave[y][x+1] = Yacid_splash_eB;
-                       if(Cave[y][x-1] == Xblank) Cave[y][x-1] = Yacid_splash_wB;
-                       Next[y][x] = Xblank;
-                       PLAY(SAMPLE_acid);
-                       goto loop;
-               case Xblank:
-               case Yacid_splash_eB:
-               case Yacid_splash_wB:
-                       Cave[y][x] = Ynut_sB;
-                       Cave[y+1][x] = Ynut_s;
-                       Next[y][x] = Xblank;
-                       Next[y+1][x] = Xnut_fall;
-                       goto loop;
-               default:
-                       Cave[y][x] = Xnut;
-                       Next[y][x] = Xnut;
-                       goto loop;
-               }
-/* ---------------------------------------------------------------------- */
-       case Xnut_fall:
-               switch(Cave[y+1][x]) {
-               case Xacid_1:
-               case Xacid_2:
-               case Xacid_3:
-               case Xacid_4:
-               case Xacid_5:
-               case Xacid_6:
-               case Xacid_7:
-               case Xacid_8:
-                       Cave[y][x] = Ynut_sB;
-                       if(Cave[y][x+1] == Xblank) Cave[y][x+1] = Yacid_splash_eB;
-                       if(Cave[y][x-1] == Xblank) Cave[y][x-1] = Yacid_splash_wB;
-                       Next[y][x] = Xblank;
-                       PLAY(SAMPLE_acid);
-                       goto loop;
-               case Xblank:
-               case Yacid_splash_eB:
-               case Yacid_splash_wB:
-               case Zplayer:
-                       Cave[y][x] = Ynut_sB;
-                       Cave[y+1][x] = Ynut_s;
-                       Next[y][x] = Xblank;
-                       Next[y+1][x] = Xnut_fall;
-                       goto loop;
-               default:
-                       Cave[y][x] = Xnut;
-                       Next[y][x] = Xnut;
-                       PLAY(SAMPLE_nut);
-                       goto loop;
-               }
-/* ---------------------------------------------------------------------- */
-       case Xbug_n:
-               if(tab_ameuba[Cave[y-1][x]] || tab_ameuba[Cave[y][x+1]] || tab_ameuba[Cave[y+1][x]] || tab_ameuba[Cave[y][x-1]]) goto bug_boom;
-               switch(Cave[y][x+1]) {
-               case Xblank:
-               case Yacid_splash_eB:
-               case Yacid_splash_wB:
-               case Xplant:
-               case Yplant:
-               case Xacid_1:
-               case Xacid_2:
-               case Xacid_3:
-               case Xacid_4:
-               case Xacid_5:
-               case Xacid_6:
-               case Xacid_7:
-               case Xacid_8:
-               case Zplayer:
-                       Cave[y][x] = Ybug_n_e;
-                       Next[y][x] = Xbug_goe;
-                       PLAY(SAMPLE_bug);
-                       goto loop;
-               default:
-                       goto bug_gon;
-               }
-       case Xbug_gon:
-               if(tab_ameuba[Cave[y-1][x]] || tab_ameuba[Cave[y][x+1]] || tab_ameuba[Cave[y+1][x]] || tab_ameuba[Cave[y][x-1]]) goto bug_boom;
-       bug_gon:
-               switch(Cave[y-1][x]) {
-               case Xacid_1:
-               case Xacid_2:
-               case Xacid_3:
-               case Xacid_4:
-               case Xacid_5:
-               case Xacid_6:
-               case Xacid_7:
-               case Xacid_8:
-                       Cave[y][x] = Ybug_nB;
-                       if(Cave[y-2][x+1] == Xblank) Cave[y-2][x+1] = Yacid_splash_eB;
-                       if(Cave[y-2][x-1] == Xblank) Cave[y-2][x-1] = Yacid_splash_wB;
-                       Next[y][x] = Xblank;
-                       PLAY(SAMPLE_acid);
-                       goto loop;
-               case Xblank:
-               case Yacid_splash_eB:
-               case Yacid_splash_wB:
-               case Xplant:
-               case Yplant:
-               case Zplayer:
-                       Cave[y][x] = Ybug_nB;
-                       Cave[y-1][x] = Ybug_n;
-                       Next[y][x] = Xblank;
-                       Next[y-1][x] = Xbug_n;
-                       PLAY(SAMPLE_bug);
-                       goto loop;
-               default:
-                       Cave[y][x] = Ybug_n_w;
-                       Next[y][x] = Xbug_gow;
-                       PLAY(SAMPLE_bug);
-                       goto loop;
-               }
-/* ---------------------------------------------------------------------- */
-       case Xbug_e:
-               if(tab_ameuba[Cave[y-1][x]] || tab_ameuba[Cave[y][x+1]] || tab_ameuba[Cave[y+1][x]] || tab_ameuba[Cave[y][x-1]]) goto bug_boom;
-               switch(Cave[y+1][x]) {
-               case Xblank:
-               case Yacid_splash_eB:
-               case Yacid_splash_wB:
-               case Xplant:
-               case Yplant:
-               case Xacid_1:
-               case Xacid_2:
-               case Xacid_3:
-               case Xacid_4:
-               case Xacid_5:
-               case Xacid_6:
-               case Xacid_7:
-               case Xacid_8:
-               case Zplayer:
-                       Cave[y][x] = Ybug_e_s;
-                       Next[y][x] = Xbug_gos;
-                       PLAY(SAMPLE_bug);
-                       goto loop;
-               default:
-                       goto bug_goe;
-               }
-       case Xbug_goe:
-               if(tab_ameuba[Cave[y-1][x]] || tab_ameuba[Cave[y][x+1]] || tab_ameuba[Cave[y+1][x]] || tab_ameuba[Cave[y][x-1]]) goto bug_boom;
-       bug_goe:
-               switch(Cave[y][x+1]) {
-               case Xacid_1:
-               case Xacid_2:
-               case Xacid_3:
-               case Xacid_4:
-               case Xacid_5:
-               case Xacid_6:
-               case Xacid_7:
-               case Xacid_8:
-                       Cave[y][x] = Ybug_eB;
-                       if(Cave[y-1][x+2] == Xblank) Cave[y-1][x+2] = Yacid_splash_eB;
-                       if(Cave[y-1][x] == Xblank) Cave[y-1][x] = Yacid_splash_wB;
-                       Next[y][x] = Xblank;
-                       PLAY(SAMPLE_acid);
-                       goto loop;
-               case Xblank:
-               case Yacid_splash_eB:
-               case Yacid_splash_wB:
-               case Xplant:
-               case Yplant:
-               case Zplayer:
-                       Cave[y][x] = Ybug_eB;
-                       Cave[y][x+1] = Ybug_e;
-                       Next[y][x] = Xblank;
-                       Next[y][x+1] = Xbug_e;
-                       PLAY(SAMPLE_bug);
-                       goto loop;
-               default:
-                       Cave[y][x] = Ybug_e_n;
-                       Next[y][x] = Xbug_gon;
-                       PLAY(SAMPLE_bug);
-                       goto loop;
-               }
-/* ---------------------------------------------------------------------- */
-       case Xbug_s:
-               if(tab_ameuba[Cave[y-1][x]] || tab_ameuba[Cave[y][x+1]] || tab_ameuba[Cave[y+1][x]] || tab_ameuba[Cave[y][x-1]]) goto bug_boom;
-               switch(Cave[y][x-1]) {
-               case Xblank:
-               case Yacid_splash_eB:
-               case Yacid_splash_wB:
-               case Xplant:
-               case Yplant:
-               case Xacid_1:
-               case Xacid_2:
-               case Xacid_3:
-               case Xacid_4:
-               case Xacid_5:
-               case Xacid_6:
-               case Xacid_7:
-               case Xacid_8:
-               case Zplayer:
-                       Cave[y][x] = Ybug_s_w;
-                       Next[y][x] = Xbug_gow;
-                       PLAY(SAMPLE_bug);
-                       goto loop;
-               default:
-                       goto bug_gos;
-               }
-       case Xbug_gos:
-               if(tab_ameuba[Cave[y-1][x]] || tab_ameuba[Cave[y][x+1]] || tab_ameuba[Cave[y+1][x]] || tab_ameuba[Cave[y][x-1]]) goto bug_boom;
-       bug_gos:
-               switch(Cave[y+1][x]) {
-               case Xacid_1:
-               case Xacid_2:
-               case Xacid_3:
-               case Xacid_4:
-               case Xacid_5:
-               case Xacid_6:
-               case Xacid_7:
-               case Xacid_8:
-                       Cave[y][x] = Ybug_sB;
-                       if(Cave[y][x+1] == Xblank) Cave[y][x+1] = Yacid_splash_eB;
-                       if(Cave[y][x-1] == Xblank) Cave[y][x-1] = Yacid_splash_wB;
-                       Next[y][x] = Xblank;
-                       PLAY(SAMPLE_acid);
-                       goto loop;
-               case Xblank:
-               case Yacid_splash_eB:
-               case Yacid_splash_wB:
-               case Xplant:
-               case Yplant:
-               case Zplayer:
-                       Cave[y][x] = Ybug_sB;
-                       Cave[y+1][x] = Ybug_s;
-                       Next[y][x] = Xblank;
-                       Next[y+1][x] = Xbug_s;
-                       PLAY(SAMPLE_bug);
-                       goto loop;
-               default:
-                       Cave[y][x] = Ybug_s_e;
-                       Next[y][x] = Xbug_goe;
-                       PLAY(SAMPLE_bug);
-                       goto loop;
-               }
-/* ---------------------------------------------------------------------- */
-       case Xbug_w:
-               if(tab_ameuba[Cave[y-1][x]] || tab_ameuba[Cave[y][x+1]] || tab_ameuba[Cave[y+1][x]] || tab_ameuba[Cave[y][x-1]]) goto bug_boom;
-               switch(Cave[y-1][x]) {
-               case Xblank:
-               case Yacid_splash_eB:
-               case Yacid_splash_wB:
-               case Xplant:
-               case Yplant:
-               case Xacid_1:
-               case Xacid_2:
-               case Xacid_3:
-               case Xacid_4:
-               case Xacid_5:
-               case Xacid_6:
-               case Xacid_7:
-               case Xacid_8:
-               case Zplayer:
-                       Cave[y][x] = Ybug_w_n;
-                       Next[y][x] = Xbug_gon;
-                       PLAY(SAMPLE_bug);
-                       goto loop;
-               default:
-                       goto bug_gow;
-               }
-       case Xbug_gow:
-               if(tab_ameuba[Cave[y-1][x]] || tab_ameuba[Cave[y][x+1]] || tab_ameuba[Cave[y+1][x]] || tab_ameuba[Cave[y][x-1]]) goto bug_boom;
-       bug_gow:
-               switch(Cave[y][x-1]) {
-               case Xacid_1:
-               case Xacid_2:
-               case Xacid_3:
-               case Xacid_4:
-               case Xacid_5:
-               case Xacid_6:
-               case Xacid_7:
-               case Xacid_8:
-                       Cave[y][x] = Ybug_wB;
-                       if(Cave[y-1][x] == Xblank) Cave[y-1][x] = Yacid_splash_eB;
-                       if(Cave[y-1][x-2] == Xblank) Cave[y-1][x-2] = Yacid_splash_wB;
-                       Next[y][x] = Xblank;
-                       PLAY(SAMPLE_acid);
-                       goto loop;
-               case Xblank:
-               case Yacid_splash_eB:
-               case Yacid_splash_wB:
-               case Xplant:
-               case Yplant:
-               case Zplayer:
-                       Cave[y][x] = Ybug_wB;
-                       Cave[y][x-1] = Ybug_w;
-                       Next[y][x] = Xblank;
-                       Next[y][x-1] = Xbug_w;
-                       PLAY(SAMPLE_bug);
-                       goto loop;
-               default:
-                       Cave[y][x] = Ybug_w_s;
-                       Next[y][x] = Xbug_gos;
-                       PLAY(SAMPLE_bug);
-                       goto loop;
-               }
-/* ---------------------------------------------------------------------- */
-       case Xtank_n:
-               if(tab_ameuba[Cave[y-1][x]] || tab_ameuba[Cave[y][x+1]] || tab_ameuba[Cave[y+1][x]] || tab_ameuba[Cave[y][x-1]]) goto tank_boom;
-               switch(Cave[y][x-1]) {
-               case Xblank:
-               case Yacid_splash_eB:
-               case Yacid_splash_wB:
-               case Xplant:
-               case Yplant:
-               case Xacid_1:
-               case Xacid_2:
-               case Xacid_3:
-               case Xacid_4:
-               case Xacid_5:
-               case Xacid_6:
-               case Xacid_7:
-               case Xacid_8:
-               case Zplayer:
-                       Cave[y][x] = Ytank_n_w;
-                       Next[y][x] = Xtank_gow;
-                       PLAY(SAMPLE_tank);
-                       goto loop;
-               default:
-                       goto tank_gon;
-               }
-       case Xtank_gon:
-               if(tab_ameuba[Cave[y-1][x]] || tab_ameuba[Cave[y][x+1]] || tab_ameuba[Cave[y+1][x]] || tab_ameuba[Cave[y][x-1]]) goto tank_boom;
-       tank_gon:
-               switch(Cave[y-1][x]) {
-               case Xacid_1:
-               case Xacid_2:
-               case Xacid_3:
-               case Xacid_4:
-               case Xacid_5:
-               case Xacid_6:
-               case Xacid_7:
-               case Xacid_8:
-                       Cave[y][x] = Ytank_nB;
-                       if(Cave[y-2][x+1] == Xblank) Cave[y-2][x+1] = Yacid_splash_eB;
-                       if(Cave[y-2][x-1] == Xblank) Cave[y-2][x-1] = Yacid_splash_wB;
-                       Next[y][x] = Xblank;
-                       PLAY(SAMPLE_acid);
-                       goto loop;
-               case Xblank:
-               case Yacid_splash_eB:
-               case Yacid_splash_wB:
-               case Xplant:
-               case Yplant:
-               case Zplayer:
-                       Cave[y][x] = Ytank_nB;
-                       Cave[y-1][x] = Ytank_n;
-                       Next[y][x] = Xblank;
-                       Next[y-1][x] = Xtank_n;
-                       PLAY(SAMPLE_tank);
-                       goto loop;
-               default:
-                       Cave[y][x] = Ytank_n_e;
-                       Next[y][x] = Xtank_goe;
-                       PLAY(SAMPLE_tank);
-                       goto loop;
-               }
-/* ---------------------------------------------------------------------- */
-       case Xtank_e:
-               if(tab_ameuba[Cave[y-1][x]] || tab_ameuba[Cave[y][x+1]] || tab_ameuba[Cave[y+1][x]] || tab_ameuba[Cave[y][x-1]]) goto tank_boom;
-               switch(Cave[y-1][x]) {
-               case Xblank:
-               case Yacid_splash_eB:
-               case Yacid_splash_wB:
-               case Xplant:
-               case Yplant:
-               case Xacid_1:
-               case Xacid_2:
-               case Xacid_3:
-               case Xacid_4:
-               case Xacid_5:
-               case Xacid_6:
-               case Xacid_7:
-               case Xacid_8:
-               case Zplayer:
-                       Cave[y][x] = Ytank_e_n;
-                       Next[y][x] = Xtank_gon;
-                       PLAY(SAMPLE_tank);
-                       goto loop;
-               default:
-                       goto tank_goe;
-               }
-       case Xtank_goe:
-               if(tab_ameuba[Cave[y-1][x]] || tab_ameuba[Cave[y][x+1]] || tab_ameuba[Cave[y+1][x]] || tab_ameuba[Cave[y][x-1]]) goto tank_boom;
-       tank_goe:
-               switch(Cave[y][x+1]) {
-               case Xacid_1:
-               case Xacid_2:
-               case Xacid_3:
-               case Xacid_4:
-               case Xacid_5:
-               case Xacid_6:
-               case Xacid_7:
-               case Xacid_8:
-                       Cave[y][x] = Ytank_eB;
-                       if(Cave[y-1][x+2] == Xblank) Cave[y-1][x+2] = Yacid_splash_eB;
-                       if(Cave[y-1][x] == Xblank) Cave[y-1][x] = Yacid_splash_wB;
-                       Next[y][x] = Xblank;
-                       PLAY(SAMPLE_acid);
-                       goto loop;
-               case Xblank:
-               case Yacid_splash_eB:
-               case Yacid_splash_wB:
-               case Xplant:
-               case Yplant:
-               case Zplayer:
-                       Cave[y][x] = Ytank_eB;
-                       Cave[y][x+1] = Ytank_e;
-                       Next[y][x] = Xblank;
-                       Next[y][x+1] = Xtank_e;
-                       PLAY(SAMPLE_tank);
-                       goto loop;
-               default:
-                       Cave[y][x] = Ytank_e_s;
-                       Next[y][x] = Xtank_gos;
-                       PLAY(SAMPLE_tank);
-                       goto loop;
-               }
-/* ---------------------------------------------------------------------- */
-       case Xtank_s:
-               if(tab_ameuba[Cave[y-1][x]] || tab_ameuba[Cave[y][x+1]] || tab_ameuba[Cave[y+1][x]] || tab_ameuba[Cave[y][x-1]]) goto tank_boom;
-               switch(Cave[y][x+1]) {
-               case Xblank:
-               case Yacid_splash_eB:
-               case Yacid_splash_wB:
-               case Xplant:
-               case Yplant:
-               case Xacid_1:
-               case Xacid_2:
-               case Xacid_3:
-               case Xacid_4:
-               case Xacid_5:
-               case Xacid_6:
-               case Xacid_7:
-               case Xacid_8:
-               case Zplayer:
-                       Cave[y][x] = Ytank_s_e;
-                       Next[y][x] = Xtank_goe;
-                       PLAY(SAMPLE_tank);
-                       goto loop;
-               default:
-                       goto tank_gos;
-               }
-       case Xtank_gos:
-               if(tab_ameuba[Cave[y-1][x]] || tab_ameuba[Cave[y][x+1]] || tab_ameuba[Cave[y+1][x]] || tab_ameuba[Cave[y][x-1]]) goto tank_boom;
-       tank_gos:
-               switch(Cave[y+1][x]) {
-               case Xacid_1:
-               case Xacid_2:
-               case Xacid_3:
-               case Xacid_4:
-               case Xacid_5:
-               case Xacid_6:
-               case Xacid_7:
-               case Xacid_8:
-                       Cave[y][x] = Ytank_sB;
-                       if(Cave[y][x+1] == Xblank) Cave[y][x+1] = Yacid_splash_eB;
-                       if(Cave[y][x-1] == Xblank) Cave[y][x-1] = Yacid_splash_wB;
-                       Next[y][x] = Xblank;
-                       PLAY(SAMPLE_acid);
-                       goto loop;
-               case Xblank:
-               case Yacid_splash_eB:
-               case Yacid_splash_wB:
-               case Xplant:
-               case Yplant:
-               case Zplayer:
-                       Cave[y][x] = Ytank_sB;
-                       Cave[y+1][x] = Ytank_s;
-                       Next[y][x] = Xblank;
-                       Next[y+1][x] = Xtank_s;
-                       PLAY(SAMPLE_tank);
-                       goto loop;
-               default:
-                       Cave[y][x] = Ytank_s_w;
-                       Next[y][x] = Xtank_gow;
-                       PLAY(SAMPLE_tank);
-                       goto loop;
-               }
-/* ---------------------------------------------------------------------- */
-       case Xtank_w:
-               if(tab_ameuba[Cave[y-1][x]] || tab_ameuba[Cave[y][x+1]] || tab_ameuba[Cave[y+1][x]] || tab_ameuba[Cave[y][x-1]]) goto tank_boom;
-               switch(Cave[y+1][x]) {
-               case Xblank:
-               case Yacid_splash_eB:
-               case Yacid_splash_wB:
-               case Xplant:
-               case Yplant:
-               case Xacid_1:
-               case Xacid_2:
-               case Xacid_3:
-               case Xacid_4:
-               case Xacid_5:
-               case Xacid_6:
-               case Xacid_7:
-               case Xacid_8:
-               case Zplayer:
-                       Cave[y][x] = Ytank_w_s;
-                       Next[y][x] = Xtank_gos;
-                       PLAY(SAMPLE_tank);
-                       goto loop;
-               default:
-                       goto tank_gow;
-               }
-       case Xtank_gow:
-               if(tab_ameuba[Cave[y-1][x]] || tab_ameuba[Cave[y][x+1]] || tab_ameuba[Cave[y+1][x]] || tab_ameuba[Cave[y][x-1]]) goto tank_boom;
-       tank_gow:
-               switch(Cave[y][x-1]) {
-               case Xacid_1:
-               case Xacid_2:
-               case Xacid_3:
-               case Xacid_4:
-               case Xacid_5:
-               case Xacid_6:
-               case Xacid_7:
-               case Xacid_8:
-                       Cave[y][x] = Ytank_wB;
-                       if(Cave[y-1][x] == Xblank) Cave[y-1][x] = Yacid_splash_eB;
-                       if(Cave[y-1][x-2] == Xblank) Cave[y-1][x-2] = Yacid_splash_wB;
-                       Next[y][x] = Xblank;
-                       PLAY(SAMPLE_acid);
-                       goto loop;
-               case Xblank:
-               case Yacid_splash_eB:
-               case Yacid_splash_wB:
-               case Xplant:
-               case Yplant:
-               case Zplayer:
-                       Cave[y][x] = Ytank_wB;
-                       Cave[y][x-1] = Ytank_w;
-                       Next[y][x] = Xblank;
-                       Next[y][x-1] = Xtank_w;
-                       PLAY(SAMPLE_tank);
-                       goto loop;
-               default:
-                       Cave[y][x] = Ytank_w_n;
-                       Next[y][x] = Xtank_gon;
-                       PLAY(SAMPLE_tank);
-                       goto loop;
-               }
-/* ---------------------------------------------------------------------- */
-       case Xandroid:
-       android:
-               if(lev.android_clone_cnt == 0) {
-                       if(Cave[y-1][x-1] != Xblank && Cave[y-1][x] != Xblank &&
-                          Cave[y-1][x+1] != Xblank && Cave[y][x-1] != Xblank &&
-                          Cave[y][x+1] != Xblank && Cave[y+1][x-1] != Xblank &&
-                          Cave[y+1][x] != Xblank && Cave[y+1][x+1] != Xblank) goto android_move;
-
-                       switch(RANDOM & 7) { /* randomly find an object to clone */
-                       case 0: /* S,NE,W,NW,SE,E,SW,N */
-                               temp = lev.android_array[Cave[y+1][x]]; if(temp != Xblank) break;
-                               temp = lev.android_array[Cave[y-1][x+1]]; if(temp != Xblank) break;
-                               temp = lev.android_array[Cave[y][x-1]]; if(temp != Xblank) break;
-                               temp = lev.android_array[Cave[y-1][x-1]]; if(temp != Xblank) break;
-                               temp = lev.android_array[Cave[y+1][x+1]]; if(temp != Xblank) break;
-                               temp = lev.android_array[Cave[y][x+1]]; if(temp != Xblank) break;
-                               temp = lev.android_array[Cave[y+1][x-1]]; if(temp != Xblank) break;
-                               temp = lev.android_array[Cave[y-1][x]]; if(temp != Xblank) break;
-                               goto android_move;
-                       case 1: /* NW,SE,N,S,NE,SW,E,W */
-                               temp = lev.android_array[Cave[y-1][x-1]]; if(temp != Xblank) break;
-                               temp = lev.android_array[Cave[y+1][x+1]]; if(temp != Xblank) break;
-                               temp = lev.android_array[Cave[y-1][x]]; if(temp != Xblank) break;
-                               temp = lev.android_array[Cave[y+1][x]]; if(temp != Xblank) break;
-                               temp = lev.android_array[Cave[y-1][x+1]]; if(temp != Xblank) break;
-                               temp = lev.android_array[Cave[y+1][x-1]]; if(temp != Xblank) break;
-                               temp = lev.android_array[Cave[y][x+1]]; if(temp != Xblank) break;
-                               temp = lev.android_array[Cave[y][x-1]]; if(temp != Xblank) break;
-                               goto android_move;
-                       case 2: /* SW,E,S,W,N,NW,SE,NE */
-                               temp = lev.android_array[Cave[y+1][x-1]]; if(temp != Xblank) break;
-                               temp = lev.android_array[Cave[y][x+1]]; if(temp != Xblank) break;
-                               temp = lev.android_array[Cave[y+1][x]]; if(temp != Xblank) break;
-                               temp = lev.android_array[Cave[y][x-1]]; if(temp != Xblank) break;
-                               temp = lev.android_array[Cave[y-1][x]]; if(temp != Xblank) break;
-                               temp = lev.android_array[Cave[y-1][x-1]]; if(temp != Xblank) break;
-                               temp = lev.android_array[Cave[y+1][x+1]]; if(temp != Xblank) break;
-                               temp = lev.android_array[Cave[y-1][x+1]]; if(temp != Xblank) break;
-                               goto android_move;
-                       case 3: /* N,SE,NE,E,W,S,NW,SW */
-                               temp = lev.android_array[Cave[y-1][x]]; if(temp != Xblank) break;
-                               temp = lev.android_array[Cave[y+1][x+1]]; if(temp != Xblank) break;
-                               temp = lev.android_array[Cave[y-1][x+1]]; if(temp != Xblank) break;
-                               temp = lev.android_array[Cave[y][x+1]]; if(temp != Xblank) break;
-                               temp = lev.android_array[Cave[y][x-1]]; if(temp != Xblank) break;
-                               temp = lev.android_array[Cave[y+1][x]]; if(temp != Xblank) break;
-                               temp = lev.android_array[Cave[y-1][x-1]]; if(temp != Xblank) break;
-                               temp = lev.android_array[Cave[y+1][x-1]]; if(temp != Xblank) break;
-                               goto android_move;
-                       case 4: /* SE,NW,E,NE,SW,W,N,S */
-                               temp = lev.android_array[Cave[y+1][x+1]]; if(temp != Xblank) break;
-                               temp = lev.android_array[Cave[y-1][x-1]]; if(temp != Xblank) break;
-                               temp = lev.android_array[Cave[y][x+1]]; if(temp != Xblank) break;
-                               temp = lev.android_array[Cave[y-1][x+1]]; if(temp != Xblank) break;
-                               temp = lev.android_array[Cave[y+1][x-1]]; if(temp != Xblank) break;
-                               temp = lev.android_array[Cave[y][x-1]]; if(temp != Xblank) break;
-                               temp = lev.android_array[Cave[y-1][x]]; if(temp != Xblank) break;
-                               temp = lev.android_array[Cave[y+1][x]]; if(temp != Xblank) break;
-                               goto android_move;
-                       case 5: /* NE,W,SE,SW,S,N,E,NW */
-                               temp = lev.android_array[Cave[y-1][x+1]]; if(temp != Xblank) break;
-                               temp = lev.android_array[Cave[y][x-1]]; if(temp != Xblank) break;
-                               temp = lev.android_array[Cave[y+1][x+1]]; if(temp != Xblank) break;
-                               temp = lev.android_array[Cave[y+1][x-1]]; if(temp != Xblank) break;
-                               temp = lev.android_array[Cave[y+1][x]]; if(temp != Xblank) break;
-                               temp = lev.android_array[Cave[y-1][x]]; if(temp != Xblank) break;
-                               temp = lev.android_array[Cave[y][x+1]]; if(temp != Xblank) break;
-                               temp = lev.android_array[Cave[y-1][x-1]]; if(temp != Xblank) break;
-                               goto android_move;
-                       case 6: /* E,N,SW,S,NW,NE,SE,W */
-                               temp = lev.android_array[Cave[y][x+1]]; if(temp != Xblank) break;
-                               temp = lev.android_array[Cave[y-1][x]]; if(temp != Xblank) break;
-                               temp = lev.android_array[Cave[y+1][x-1]]; if(temp != Xblank) break;
-                               temp = lev.android_array[Cave[y+1][x]]; if(temp != Xblank) break;
-                               temp = lev.android_array[Cave[y-1][x-1]]; if(temp != Xblank) break;
-                               temp = lev.android_array[Cave[y-1][x+1]]; if(temp != Xblank) break;
-                               temp = lev.android_array[Cave[y+1][x+1]]; if(temp != Xblank) break;
-                               temp = lev.android_array[Cave[y][x-1]]; if(temp != Xblank) break;
-                               goto android_move;
-                       case 7: /* W,SW,NW,N,E,SE,NE,S */
-                               temp = lev.android_array[Cave[y][x-1]]; if(temp != Xblank) break;
-                               temp = lev.android_array[Cave[y+1][x-1]]; if(temp != Xblank) break;
-                               temp = lev.android_array[Cave[y-1][x-1]]; if(temp != Xblank) break;
-                               temp = lev.android_array[Cave[y-1][x]]; if(temp != Xblank) break;
-                               temp = lev.android_array[Cave[y][x+1]]; if(temp != Xblank) break;
-                               temp = lev.android_array[Cave[y+1][x+1]]; if(temp != Xblank) break;
-                               temp = lev.android_array[Cave[y-1][x+1]]; if(temp != Xblank) break;
-                               temp = lev.android_array[Cave[y+1][x]]; if(temp != Xblank) break;
-                               goto android_move;
-                       }
-                       Next[y][x] = temp; /* the item we chose to clone */
-                       play[SAMPLE_android] = 1;
-                       switch(RANDOM & 7) { /* randomly find a direction to move */
-                       case 0: /* S,NE,W,NW,SE,E,SW,N */
-                               if(Cave[y+1][x] == Xblank) goto android_s;
-                               if(Cave[y-1][x+1] == Xblank) goto android_ne;
-                               if(Cave[y][x-1] == Xblank) goto android_w;
-                               if(Cave[y-1][x-1] == Xblank) goto android_nw;
-                               if(Cave[y+1][x+1] == Xblank) goto android_se;
-                               if(Cave[y][x+1] == Xblank) goto android_e;
-                               if(Cave[y+1][x-1] == Xblank) goto android_sw;
-                               if(Cave[y-1][x] == Xblank) goto android_n;
-                               goto android_move;
-                       case 1: /* NW,SE,N,S,NE,SW,E,W */
-                               if(Cave[y-1][x-1] == Xblank) goto android_nw;
-                               if(Cave[y+1][x+1] == Xblank) goto android_se;
-                               if(Cave[y-1][x] == Xblank) goto android_n;
-                               if(Cave[y+1][x] == Xblank) goto android_s;
-                               if(Cave[y-1][x+1] == Xblank) goto android_ne;
-                               if(Cave[y+1][x-1] == Xblank) goto android_sw;
-                               if(Cave[y][x+1] == Xblank) goto android_e;
-                               if(Cave[y][x-1] == Xblank) goto android_w;
-                               goto android_move;
-                       case 2: /* SW,E,S,W,N,NW,SE,NE */
-                               if(Cave[y+1][x-1] == Xblank) goto android_sw;
-                               if(Cave[y][x+1] == Xblank) goto android_e;
-                               if(Cave[y+1][x] == Xblank) goto android_s;
-                               if(Cave[y][x-1] == Xblank) goto android_w;
-                               if(Cave[y-1][x] == Xblank) goto android_n;
-                               if(Cave[y-1][x-1] == Xblank) goto android_nw;
-                               if(Cave[y+1][x+1] == Xblank) goto android_se;
-                               if(Cave[y-1][x+1] == Xblank) goto android_ne;
-                               goto android_move;
-                       case 3: /* N,SE,NE,E,W,S,NW,SW */
-                               if(Cave[y-1][x] == Xblank) goto android_n;
-                               if(Cave[y+1][x+1] == Xblank) goto android_se;
-                               if(Cave[y-1][x+1] == Xblank) goto android_ne;
-                               if(Cave[y][x+1] == Xblank) goto android_e;
-                               if(Cave[y][x-1] == Xblank) goto android_w;
-                               if(Cave[y+1][x] == Xblank) goto android_s;
-                               if(Cave[y-1][x-1] == Xblank) goto android_nw;
-                               if(Cave[y+1][x-1] == Xblank) goto android_sw;
-                               goto android_move;
-                       case 4: /* SE,NW,E,NE,SW,W,N,S */
-                               if(Cave[y+1][x+1] == Xblank) goto android_se;
-                               if(Cave[y-1][x-1] == Xblank) goto android_nw;
-                               if(Cave[y][x+1] == Xblank) goto android_e;
-                               if(Cave[y-1][x+1] == Xblank) goto android_ne;
-                               if(Cave[y+1][x-1] == Xblank) goto android_sw;
-                               if(Cave[y][x-1] == Xblank) goto android_w;
-                               if(Cave[y-1][x] == Xblank) goto android_n;
-                               if(Cave[y+1][x] == Xblank) goto android_s;
-                               goto android_move;
-                       case 5: /* NE,W,SE,SW,S,N,E,NW */
-                               if(Cave[y-1][x+1] == Xblank) goto android_ne;
-                               if(Cave[y][x-1] == Xblank) goto android_w;
-                               if(Cave[y+1][x+1] == Xblank) goto android_se;
-                               if(Cave[y+1][x-1] == Xblank) goto android_sw;
-                               if(Cave[y+1][x] == Xblank) goto android_s;
-                               if(Cave[y-1][x] == Xblank) goto android_n;
-                               if(Cave[y][x+1] == Xblank) goto android_e;
-                               if(Cave[y-1][x-1] == Xblank) goto android_nw;
-                               goto android_move;
-                       case 6: /* E,N,SW,S,NW,NE,SE,W */
-                               if(Cave[y][x+1] == Xblank) goto android_e;
-                               if(Cave[y-1][x] == Xblank) goto android_n;
-                               if(Cave[y+1][x-1] == Xblank) goto android_sw;
-                               if(Cave[y+1][x] == Xblank) goto android_s;
-                               if(Cave[y-1][x-1] == Xblank) goto android_nw;
-                               if(Cave[y-1][x+1] == Xblank) goto android_ne;
-                               if(Cave[y+1][x+1] == Xblank) goto android_se;
-                               if(Cave[y][x-1] == Xblank) goto android_w;
-                               goto android_move;
-                       case 7: /* W,SW,NW,N,E,SE,NE,S */
-                               if(Cave[y][x-1] == Xblank) goto android_w;
-                               if(Cave[y+1][x-1] == Xblank) goto android_sw;
-                               if(Cave[y-1][x-1] == Xblank) goto android_nw;
-                               if(Cave[y-1][x] == Xblank) goto android_n;
-                               if(Cave[y][x+1] == Xblank) goto android_e;
-                               if(Cave[y+1][x+1] == Xblank) goto android_se;
-                               if(Cave[y-1][x+1] == Xblank) goto android_ne;
-                               if(Cave[y+1][x] == Xblank) goto android_s;
-                               goto android_move;
-                       }
-               }
-       android_move:
-               if(lev.android_move_cnt == 0) {
-                       if(Cave[y-1][x-1] == Zplayer || Cave[y-1][x] == Zplayer ||
-                          Cave[y-1][x+1] == Zplayer || Cave[y][x-1] == Zplayer ||
-                          Cave[y][x+1] == Zplayer || Cave[y+1][x-1] == Zplayer ||
-                          Cave[y+1][x] == Zplayer || Cave[y+1][x+1] == Zplayer) goto android_still;
-
-                       if(ply1.alive && ply2.alive) {
-                               if( (ply1.x > x ? ply1.x - x : x - ply1.x) + (ply1.y > y ? ply1.y - y : y - ply1.y) < (ply2.x > x ? ply2.x - x : x - ply2.x) + (ply2.y > y ? ply2.y - y : y - ply2.y) ) {
-                                       dx = ply1.x;
-                                       dy = ply1.y;
-                               } else {
-                                       dx = ply2.x;
-                                       dy = ply2.y;
-                               }
-                       } else if(ply1.alive) {
-                               dx = ply1.x;
-                               dy = ply1.y;
-                       } else if(ply2.alive) {
-                               dx = ply2.x;
-                               dy = ply2.y;
-                       } else {
-                               dx = 0;
-                               dy = 0;
-                       }
-                       Next[y][x] = Xblank; /* assume we will move */
-                       temp = ((x < dx) + 1 - (x > dx)) + ((y < dy) + 1 - (y > dy)) * 3;
-                       if(RANDOM & 1) {
-                               switch(temp) { /* attempt clockwise move first if direct path is blocked */
-                               case 0: /* north west */
-                                       if(tab_android_move[Cave[y-1][x-1]]) goto android_nw;
-                                       if(tab_android_move[Cave[y-1][x]]) goto android_n;
-                                       if(tab_android_move[Cave[y][x-1]]) goto android_w;
-                                       break;
-                               case 1: /* north */
-                                       if(tab_android_move[Cave[y-1][x]]) goto android_n;
-                                       if(tab_android_move[Cave[y-1][x+1]]) goto android_ne;
-                                       if(tab_android_move[Cave[y-1][x-1]]) goto android_nw;
-                                       break;
-                               case 2: /* north east */
-                                       if(tab_android_move[Cave[y-1][x+1]]) goto android_ne;
-                                       if(tab_android_move[Cave[y][x+1]]) goto android_e;
-                                       if(tab_android_move[Cave[y-1][x]]) goto android_n;
-                                       break;
-                               case 3: /* west */
-                                       if(tab_android_move[Cave[y][x-1]]) goto android_w;
-                                       if(tab_android_move[Cave[y-1][x-1]]) goto android_nw;
-                                       if(tab_android_move[Cave[y+1][x-1]]) goto android_sw;
-                                       break;
-                               case 4: /* nowhere */
-                                       break;
-                               case 5: /* east */
-                                       if(tab_android_move[Cave[y][x+1]]) goto android_e;
-                                       if(tab_android_move[Cave[y+1][x+1]]) goto android_se;
-                                       if(tab_android_move[Cave[y-1][x+1]]) goto android_ne;
-                                       break;
-                               case 6: /* south west */
-                                       if(tab_android_move[Cave[y+1][x-1]]) goto android_sw;
-                                       if(tab_android_move[Cave[y][x-1]]) goto android_w;
-                                       if(tab_android_move[Cave[y+1][x]]) goto android_s;
-                                       break;
-                               case 7: /* south */
-                                       if(tab_android_move[Cave[y+1][x]]) goto android_s;
-                                       if(tab_android_move[Cave[y+1][x-1]]) goto android_sw;
-                                       if(tab_android_move[Cave[y+1][x+1]]) goto android_se;
-                                       break;
-                               case 8: /* south east */
-                                       if(tab_android_move[Cave[y+1][x+1]]) goto android_se;
-                                       if(tab_android_move[Cave[y+1][x]]) goto android_s;
-                                       if(tab_android_move[Cave[y][x+1]]) goto android_e;
-                                       break;
-                               }
-                       } else {
-                               switch(temp) { /* attempt counter clockwise move first if direct path is blocked */
-                               case 0: /* north west */
-                                       if(tab_android_move[Cave[y-1][x-1]]) goto android_nw;
-                                       if(tab_android_move[Cave[y][x-1]]) goto android_w;
-                                       if(tab_android_move[Cave[y-1][x]]) goto android_n;
-                                       break;
-                               case 1: /* north */
-                                       if(tab_android_move[Cave[y-1][x]]) goto android_n;
-                                       if(tab_android_move[Cave[y-1][x-1]]) goto android_nw;
-                                       if(tab_android_move[Cave[y-1][x+1]]) goto android_ne;
-                                       break;
-                               case 2: /* north east */
-                                       if(tab_android_move[Cave[y-1][x+1]]) goto android_ne;
-                                       if(tab_android_move[Cave[y-1][x]]) goto android_n;
-                                       if(tab_android_move[Cave[y][x+1]]) goto android_e;
-                                       break;
-                               case 3: /* west */
-                                       if(tab_android_move[Cave[y][x-1]]) goto android_w;
-                                       if(tab_android_move[Cave[y+1][x-1]]) goto android_sw;
-                                       if(tab_android_move[Cave[y-1][x-1]]) goto android_nw;
-                                       break;
-                               case 4: /* nowhere */
-                                       break;
-                               case 5: /* east */
-                                       if(tab_android_move[Cave[y][x+1]]) goto android_e;
-                                       if(tab_android_move[Cave[y-1][x+1]]) goto android_ne;
-                                       if(tab_android_move[Cave[y+1][x+1]]) goto android_se;
-                                       break;
-                               case 6: /* south west */
-                                       if(tab_android_move[Cave[y+1][x-1]]) goto android_sw;
-                                       if(tab_android_move[Cave[y+1][x]]) goto android_s;
-                                       if(tab_android_move[Cave[y][x-1]]) goto android_w;
-                                       break;
-                               case 7: /* south */
-                                       if(tab_android_move[Cave[y+1][x]]) goto android_s;
-                                       if(tab_android_move[Cave[y+1][x+1]]) goto android_se;
-                                       if(tab_android_move[Cave[y+1][x-1]]) goto android_sw;
-                                       break;
-                               case 8: /* south east */
-                                       if(tab_android_move[Cave[y+1][x+1]]) goto android_se;
-                                       if(tab_android_move[Cave[y][x+1]]) goto android_e;
-                                       if(tab_android_move[Cave[y+1][x]]) goto android_s;
-                                       break;
-                               }
-                       }
-               }
-       android_still:
-               Next[y][x] = Xandroid;
-               goto loop;
-       android_n:
-               Cave[y][x] = Yandroid_nB;
-               Cave[y-1][x] = Yandroid_n;
-               Next[y-1][x] = Xandroid;
-               PLAY(SAMPLE_tank);
-               goto loop;
-       android_ne:
-               Cave[y][x] = Yandroid_neB;
-               Cave[y-1][x+1] = Yandroid_ne;
-               Next[y-1][x+1] = Xandroid;
-               PLAY(SAMPLE_tank);
-               goto loop;
-       android_e:
-               Cave[y][x] = Yandroid_eB;
-               Cave[y][x+1] = Yandroid_e;
-               Next[y][x+1] = Xandroid;
-               PLAY(SAMPLE_tank);
-               goto loop;
-       android_se:
-               Cave[y][x] = Yandroid_seB;
-               Cave[y+1][x+1] = Yandroid_se;
-               Next[y+1][x+1] = Xandroid;
-               PLAY(SAMPLE_tank);
-               goto loop;
-       android_s:
-               Cave[y][x] = Yandroid_sB;
-               Cave[y+1][x] = Yandroid_s;
-               Next[y+1][x] = Xandroid;
-               PLAY(SAMPLE_tank);
-               goto loop;
-       android_sw:
-               Cave[y][x] = Yandroid_swB;
-               Cave[y+1][x-1] = Yandroid_sw;
-               Next[y+1][x-1] = Xandroid;
-               PLAY(SAMPLE_tank);
-               goto loop;
-       android_w:
-               Cave[y][x] = Yandroid_wB;
-               Cave[y][x-1] = Yandroid_w;
-               Next[y][x-1] = Xandroid;
-               PLAY(SAMPLE_tank);
-               goto loop;
-       android_nw:
-               Cave[y][x] = Yandroid_nwB;
-               Cave[y-1][x-1] = Yandroid_nw;
-               Next[y-1][x-1] = Xandroid;
-               PLAY(SAMPLE_tank);
-               goto loop;
-/* ---------------------------------------------------------------------- */
-       case Xandroid_1_n:
-               switch(Cave[y-1][x]) {
-               case Xacid_1:
-               case Xacid_2:
-               case Xacid_3:
-               case Xacid_4:
-               case Xacid_5:
-               case Xacid_6:
-               case Xacid_7:
-               case Xacid_8:
-                       Cave[y][x] = Yandroid_nB;
-                       if(Cave[y-2][x+1] == Xblank) Cave[y-2][x+1] = Yacid_splash_eB;
-                       if(Cave[y-2][x-1] == Xblank) Cave[y-2][x-1] = Yacid_splash_wB;
-                       Next[y][x] = Xblank;
-                       PLAY(SAMPLE_acid);
-                       goto loop;
-               case Xblank:
-               case Yacid_splash_eB:
-               case Yacid_splash_wB:
-                       Cave[y][x] = Yandroid_nB;
-                       Cave[y-1][x] = Yandroid_n;
-                       Next[y][x] = Xblank;
-                       Next[y-1][x] = Xandroid;
-                       PLAY(SAMPLE_tank);
-                       goto loop;
-               default:
-                       goto android;
-               }
-       case Xandroid_2_n:
-               switch(Cave[y-1][x]) {
-               case Xacid_1:
-               case Xacid_2:
-               case Xacid_3:
-               case Xacid_4:
-               case Xacid_5:
-               case Xacid_6:
-               case Xacid_7:
-               case Xacid_8:
-                       Cave[y][x] = Yandroid_nB;
-                       if(Cave[y-2][x+1] == Xblank) Cave[y-2][x+1] = Yacid_splash_eB;
-                       if(Cave[y-2][x-1] == Xblank) Cave[y-2][x-1] = Yacid_splash_wB;
-                       Next[y][x] = Xblank;
-                       PLAY(SAMPLE_acid);
-                       goto loop;
-               case Xblank:
-               case Yacid_splash_eB:
-               case Yacid_splash_wB:
-                       Cave[y][x] = Yandroid_nB;
-                       Cave[y-1][x] = Yandroid_n;
-                       Next[y][x] = Xblank;
-                       Next[y-1][x] = Xandroid_1_n;
-                       PLAY(SAMPLE_tank);
-                       goto loop;
-               default:
-                       goto android;
-               }
-/* ---------------------------------------------------------------------- */
-       case Xandroid_1_e:
-               switch(Cave[y][x+1]) {
-               case Xacid_1:
-               case Xacid_2:
-               case Xacid_3:
-               case Xacid_4:
-               case Xacid_5:
-               case Xacid_6:
-               case Xacid_7:
-               case Xacid_8:
-                       Cave[y][x] = Yandroid_eB;
-                       if(Cave[y-1][x+2] == Xblank) Cave[y-1][x+2] = Yacid_splash_eB;
-                       if(Cave[y-1][x] == Xblank) Cave[y-1][x] = Yacid_splash_wB;
-                       Next[y][x] = Xblank;
-                       PLAY(SAMPLE_acid);
-                       goto loop;
-               case Xblank:
-               case Yacid_splash_eB:
-               case Yacid_splash_wB:
-                       Cave[y][x] = Yandroid_eB;
-                       Cave[y][x+1] = Yandroid_e;
-                       Next[y][x] = Xblank;
-                       Next[y][x+1] = Xandroid;
-                       PLAY(SAMPLE_tank);
-                       goto loop;
-               default:
-                       goto android;
-               }
-       case Xandroid_2_e:
-               switch(Cave[y][x+1]) {
-               case Xacid_1:
-               case Xacid_2:
-               case Xacid_3:
-               case Xacid_4:
-               case Xacid_5:
-               case Xacid_6:
-               case Xacid_7:
-               case Xacid_8:
-                       Cave[y][x] = Yandroid_eB;
-                       if(Cave[y-1][x+2] == Xblank) Cave[y-1][x+2] = Yacid_splash_eB;
-                       if(Cave[y-1][x] == Xblank) Cave[y-1][x] = Yacid_splash_wB;
-                       Next[y][x] = Xblank;
-                       PLAY(SAMPLE_acid);
-                       goto loop;
-               case Xblank:
-               case Yacid_splash_eB:
-               case Yacid_splash_wB:
-                       Cave[y][x] = Yandroid_eB;
-                       Cave[y][x+1] = Yandroid_e;
-                       Next[y][x] = Xblank;
-                       Next[y][x+1] = Xandroid_1_e;
-                       PLAY(SAMPLE_tank);
-                       goto loop;
-               default:
-                       goto android;
-               }
-/* ---------------------------------------------------------------------- */
-       case Xandroid_1_s:
-               switch(Cave[y+1][x]) {
-               case Xacid_1:
-               case Xacid_2:
-               case Xacid_3:
-               case Xacid_4:
-               case Xacid_5:
-               case Xacid_6:
-               case Xacid_7:
-               case Xacid_8:
-                       Cave[y][x] = Yandroid_sB;
-                       if(Cave[y][x+1] == Xblank) Cave[y][x+1] = Yacid_splash_eB;
-                       if(Cave[y][x-1] == Xblank) Cave[y][x-1] = Yacid_splash_wB;
-                       Next[y][x] = Xblank;
-                       PLAY(SAMPLE_acid);
-                       goto loop;
-               case Xblank:
-               case Yacid_splash_eB:
-               case Yacid_splash_wB:
-                       Cave[y][x] = Yandroid_sB;
-                       Cave[y+1][x] = Yandroid_s;
-                       Next[y][x] = Xblank;
-                       Next[y+1][x] = Xandroid;
-                       PLAY(SAMPLE_tank);
-                       goto loop;
-               default:
-                       goto android;
-               }
-       case Xandroid_2_s:
-               switch(Cave[y+1][x]) {
-               case Xacid_1:
-               case Xacid_2:
-               case Xacid_3:
-               case Xacid_4:
-               case Xacid_5:
-               case Xacid_6:
-               case Xacid_7:
-               case Xacid_8:
-                       Cave[y][x] = Yandroid_sB;
-                       if(Cave[y][x+1] == Xblank) Cave[y][x+1] = Yacid_splash_eB;
-                       if(Cave[y][x-1] == Xblank) Cave[y][x-1] = Yacid_splash_wB;
-                       Next[y][x] = Xblank;
-                       PLAY(SAMPLE_acid);
-                       goto loop;
-               case Xblank:
-               case Yacid_splash_eB:
-               case Yacid_splash_wB:
-                       Cave[y][x] = Yandroid_sB;
-                       Cave[y+1][x] = Yandroid_s;
-                       Next[y][x] = Xblank;
-                       Next[y+1][x] = Xandroid_1_s;
-                       PLAY(SAMPLE_tank);
-                       goto loop;
-               default:
-                       goto android;
-               }
-/* ---------------------------------------------------------------------- */
-       case Xandroid_1_w:
-               switch(Cave[y][x-1]) {
-               case Xacid_1:
-               case Xacid_2:
-               case Xacid_3:
-               case Xacid_4:
-               case Xacid_5:
-               case Xacid_6:
-               case Xacid_7:
-               case Xacid_8:
-                       Cave[y][x] = Yandroid_wB;
-                       if(Cave[y-1][x] == Xblank) Cave[y-1][x] = Yacid_splash_eB;
-                       if(Cave[y-1][x-2] == Xblank) Cave[y-1][x-2] = Yacid_splash_wB;
-                       Next[y][x] = Xblank;
-                       PLAY(SAMPLE_acid);
-                       goto loop;
-               case Xblank:
-               case Yacid_splash_eB:
-               case Yacid_splash_wB:
-                       Cave[y][x] = Yandroid_wB;
-                       Cave[y][x-1] = Yandroid_w;
-                       Next[y][x] = Xblank;
-                       Next[y][x-1] = Xandroid;
-                       PLAY(SAMPLE_tank);
-                       goto loop;
-               default:
-                       goto android;
-               }
-       case Xandroid_2_w:
-               switch(Cave[y][x-1]) {
-               case Xacid_1:
-               case Xacid_2:
-               case Xacid_3:
-               case Xacid_4:
-               case Xacid_5:
-               case Xacid_6:
-               case Xacid_7:
-               case Xacid_8:
-                       Cave[y][x] = Yandroid_wB;
-                       if(Cave[y-1][x] == Xblank) Cave[y-1][x] = Yacid_splash_eB;
-                       if(Cave[y-1][x-2] == Xblank) Cave[y-1][x-2] = Yacid_splash_wB;
-                       Next[y][x] = Xblank;
-                       PLAY(SAMPLE_acid);
-                       goto loop;
-               case Xblank:
-               case Yacid_splash_eB:
-               case Yacid_splash_wB:
-                       Cave[y][x] = Yandroid_wB;
-                       Cave[y][x-1] = Yandroid_w;
-                       Next[y][x] = Xblank;
-                       Next[y][x-1] = Xandroid_1_w;
-                       PLAY(SAMPLE_tank);
-                       goto loop;
-               default:
-                       goto android;
-               }
-/* ---------------------------------------------------------------------- */
-       case Xspring:
-               switch(Cave[y+1][x]) {
-               case Xacid_1:
-               case Xacid_2:
-               case Xacid_3:
-               case Xacid_4:
-               case Xacid_5:
-               case Xacid_6:
-               case Xacid_7:
-               case Xacid_8:
-                       Cave[y][x] = Yspring_sB;
-                       if(Cave[y][x+1] == Xblank) Cave[y][x+1] = Yacid_splash_eB;
-                       if(Cave[y][x-1] == Xblank) Cave[y][x-1] = Yacid_splash_wB;
-                       Next[y][x] = Xblank;
-                       PLAY(SAMPLE_acid);
-                       goto loop;
-               case Xblank:
-               case Yacid_splash_eB:
-               case Yacid_splash_wB:
-               case Xplant:
-               case Yplant:
-                       Cave[y][x] = Yspring_sB;
-                       Cave[y+1][x] = Yspring_s;
-                       Next[y][x] = Xblank;
-                       Next[y+1][x] = Xspring_fall;
-                       goto loop;
-               case Xspring:
-               case Xspring_pause:
-               case Xspring_e:
-               case Xspring_w:
-               case Xandroid:
-               case Xandroid_1_n:
-               case Xandroid_2_n:
-               case Xandroid_1_e:
-               case Xandroid_2_e:
-               case Xandroid_1_s:
-               case Xandroid_2_s:
-               case Xandroid_1_w:
-               case Xandroid_2_w:
-               case Xstone:
-               case Xstone_pause:
-               case Xemerald:
-               case Xemerald_pause:
-               case Xdiamond:
-               case Xdiamond_pause:
-               case Xbomb:
-               case Xbomb_pause:
-               case Xballoon:
-               case Xacid_ne:
-               case Xacid_nw:
-               case Xball_1:
-               case Xball_2:
-               case Xnut:
-               case Xnut_pause:
-               case Xgrow_ns:
-               case Xgrow_ew:
-               case Xkey_1:
-               case Xkey_2:
-               case Xkey_3:
-               case Xkey_4:
-               case Xkey_5:
-               case Xkey_6:
-               case Xkey_7:
-               case Xkey_8:
-               case Xbumper:
-               case Xswitch:
-               case Xround_wall_1:
-               case Xround_wall_2:
-               case Xround_wall_3:
-               case Xround_wall_4:
-                       if(RANDOM & 1) {
-                               if(tab_blank[Cave[y][x+1]] && tab_acid[Cave[y+1][x+1]]) {
-                                       Cave[y][x] = Yspring_eB;
-                                       Cave[y][x+1] = Yspring_e;
-                                       if(Cave[y+1][x] == Xbumper) Cave[y+1][x] = XbumperB;
-                                       Next[y][x] = Xblank;
-#ifdef BAD_SPRING
-                                       Next[y][x+1] = Xspring_e;
-#else
-                                       Next[y][x+1] = Xspring_pause;
-#endif
-                                       goto loop;
-                               }
-                               if(tab_blank[Cave[y][x-1]] && tab_acid[Cave[y+1][x-1]]) {
-                                       Cave[y][x] = Yspring_wB;
-                                       Cave[y][x-1] = Yspring_w;
-                                       if(Cave[y+1][x] == Xbumper) Cave[y+1][x] = XbumperB;
-                                       Next[y][x] = Xblank;
-#ifdef BAD_SPRING
-                                       Next[y][x-1] = Xspring_w;
-#else
-                                       Next[y][x-1] = Xspring_pause;
-#endif
-                                       goto loop;
-                               }
-                       } else {
-                               if(tab_blank[Cave[y][x-1]] && tab_acid[Cave[y+1][x-1]]) {
-                                       Cave[y][x] = Yspring_wB;
-                                       Cave[y][x-1] = Yspring_w;
-                                       if(Cave[y+1][x] == Xbumper) Cave[y+1][x] = XbumperB;
-                                       Next[y][x] = Xblank;
+    case Xstone_force_e:
+      switch (Cave[y][x+1])
+      {
+       case ZBORDER:
+       case Znormal:
+       case Zdynamite:
+       case Xboom_bug:
+       case Xboom_bomb:
+       case Xboom_android:
+       case Xboom_1:
+       case Zplayer:
+         Cave[y][x] = Xstone;
+         Next[y][x] = Xstone;
+         goto loop;
+
+       default:
+         Cave[y][x] = Ystone_eB;
+         Cave[y][x+1] = Ystone_e;
+         Next[y][x] = Xblank;
+         Next[y][x+1] = Xstone_pause;
+         goto loop;
+      }
+
+    case Xstone_force_w:
+      switch (Cave[y][x-1])
+      {
+       case ZBORDER:
+       case Znormal:
+       case Zdynamite:
+       case Xboom_bug:
+       case Xboom_bomb:
+       case Xboom_android:
+       case Xboom_1:
+       case Zplayer:
+         Cave[y][x] = Xstone;
+         Next[y][x] = Xstone;
+         goto loop;
+
+       default:
+         Cave[y][x] = Ystone_wB;
+         Cave[y][x-1] = Ystone_w;
+         Next[y][x] = Xblank;
+         Next[y][x-1] = Xstone_pause;
+         goto loop;
+      }
+
+    case Xnut_force_e:
+      switch (Cave[y][x+1])
+      {
+       case ZBORDER:
+       case Znormal:
+       case Zdynamite:
+       case Xboom_bug:
+       case Xboom_bomb:
+       case Xboom_android:
+       case Xboom_1:
+       case Zplayer:
+         Cave[y][x] = Xnut;
+         Next[y][x] = Xnut;
+         goto loop;
+
+       default:
+         Cave[y][x] = Ynut_eB;
+         Cave[y][x+1] = Ynut_e;
+         Next[y][x] = Xblank;
+         Next[y][x+1] = Xnut_pause;
+         goto loop;
+      }
+
+    case Xnut_force_w:
+      switch (Cave[y][x-1])
+      {
+       case ZBORDER:
+       case Znormal:
+       case Zdynamite:
+       case Xboom_bug:
+       case Xboom_bomb:
+       case Xboom_android:
+       case Xboom_1:
+       case Zplayer:
+         Cave[y][x] = Xnut;
+         Next[y][x] = Xnut;
+         goto loop;
+
+       default:
+         Cave[y][x] = Ynut_wB;
+         Cave[y][x-1] = Ynut_w;
+         Next[y][x] = Xblank;
+         Next[y][x-1] = Xnut_pause;
+         goto loop;
+       }
+
+    case Xspring_force_e:
+      switch (Cave[y][x+1])
+      {
+        case ZBORDER:
+       case Znormal:
+       case Zdynamite:
+       case Xboom_bug:
+       case Xboom_bomb:
+       case Xboom_android:
+       case Xboom_1:
+       case Zplayer:
+         Cave[y][x] = Xspring;
+         Next[y][x] = Xspring;
+         goto loop;
+
+       default:
+         Cave[y][x] = Yspring_eB;
+         Cave[y][x+1] = Yspring_e;
+         Next[y][x] = Xblank;
+
 #ifdef BAD_SPRING
-                                       Next[y][x-1] = Xspring_w;
+         Next[y][x+1] = Xspring_e;
 #else
-                                       Next[y][x-1] = Xspring_pause;
+         Next[y][x+1] = Xspring_pause;
 #endif
-                                       goto loop;
-                               }
-                               if(tab_blank[Cave[y][x+1]] && tab_acid[Cave[y+1][x+1]]) {
-                                       Cave[y][x] = Yspring_eB;
-                                       Cave[y][x+1] = Yspring_e;
-                                       if(Cave[y+1][x] == Xbumper) Cave[y+1][x] = XbumperB;
-                                       Next[y][x] = Xblank;
+
+         goto loop;
+      }
+
+    case Xspring_force_w:
+      switch (Cave[y][x-1])
+      {
+       case ZBORDER:
+       case Znormal:
+       case Zdynamite:
+       case Xboom_bug:
+       case Xboom_bomb:
+       case Xboom_android:
+       case Xboom_1:
+       case Zplayer:
+         Cave[y][x] = Xspring;
+         Next[y][x] = Xspring;
+         goto loop;
+
+       default:
+         Cave[y][x] = Yspring_wB;
+         Cave[y][x-1] = Yspring_w;
+         Next[y][x] = Xblank;
+
 #ifdef BAD_SPRING
-                                       Next[y][x+1] = Xspring_e;
-#else
-                                       Next[y][x+1] = Xspring_pause;
-#endif
-                                       goto loop;
-                               }
-                       }
-               default:
-                       goto loop;
-               }
-/* ---------------------------------------------------------------------- */
-       case Xspring_pause:
-               switch(Cave[y+1][x]) {
-               case Xacid_1:
-               case Xacid_2:
-               case Xacid_3:
-               case Xacid_4:
-               case Xacid_5:
-               case Xacid_6:
-               case Xacid_7:
-               case Xacid_8:
-                       Cave[y][x] = Yspring_sB;
-                       if(Cave[y][x+1] == Xblank) Cave[y][x+1] = Yacid_splash_eB;
-                       if(Cave[y][x-1] == Xblank) Cave[y][x-1] = Yacid_splash_wB;
-                       Next[y][x] = Xblank;
-                       PLAY(SAMPLE_acid);
-                       goto loop;
-               case Xblank:
-               case Yacid_splash_eB:
-               case Yacid_splash_wB:
-                       Cave[y][x] = Yspring_sB;
-                       Cave[y+1][x] = Yspring_s;
-                       Next[y][x] = Xblank;
-                       Next[y+1][x] = Xspring_fall;
-                       goto loop;
-               default:
-                       Cave[y][x] = Xspring;
-                       Next[y][x] = Xspring;
-                       goto loop;
-               }
-/* ---------------------------------------------------------------------- */
-       case Xspring_e:
-               switch(Cave[y+1][x]) {
-               case Xacid_1:
-               case Xacid_2:
-               case Xacid_3:
-               case Xacid_4:
-               case Xacid_5:
-               case Xacid_6:
-               case Xacid_7:
-               case Xacid_8:
-                       Cave[y][x] = Yspring_sB;
-                       if(Cave[y][x+1] == Xblank) Cave[y][x+1] = Yacid_splash_eB;
-                       if(Cave[y][x-1] == Xblank) Cave[y][x-1] = Yacid_splash_wB;
-                       Next[y][x] = Xblank;
-                       PLAY(SAMPLE_acid);
-                       goto loop;
-               case Xblank:
-               case Yacid_splash_eB:
-               case Yacid_splash_wB:
-                       Cave[y][x] = Yspring_sB;
-                       Cave[y+1][x] = Yspring_s;
-                       Next[y][x] = Xblank;
-                       Next[y+1][x] = Xspring_fall;
-                       goto loop;
-               case Xbumper:
-                       Cave[y+1][x] = XbumperB;
-               }
-               switch(Cave[y][x+1]) {
-               case Xacid_1:
-               case Xacid_2:
-               case Xacid_3:
-               case Xacid_4:
-               case Xacid_5:
-               case Xacid_6:
-               case Xacid_7:
-               case Xacid_8:
-                       Cave[y][x] = Yspring_eB;
-                       if(Cave[y-1][x+2] == Xblank) Cave[y-1][x+2] = Yacid_splash_eB;
-                       if(Cave[y-1][x] == Xblank) Cave[y-1][x] = Yacid_splash_wB;
-                       Next[y][x] = Xblank;
-                       PLAY(SAMPLE_acid);
-                       goto loop;
-               case Xblank:
-               case Yacid_splash_eB:
-               case Yacid_splash_wB:
-               case Yalien_nB:
-               case Yalien_eB:
-               case Yalien_sB:
-               case Yalien_wB:
-                       Cave[y][x] = Yspring_eB;
-                       Cave[y][x+1] = Yspring_e;
-                       Next[y][x] = Xblank;
-                       Next[y][x+1] = Xspring_e;
-                       goto loop;
-               case Xalien:
-               case Xalien_pause:
-               case Yalien_n:
-               case Yalien_e:
-               case Yalien_s:
-               case Yalien_w:
-                       Cave[y][x] = Yspring_kill_eB;
-                       Cave[y][x+1] = Yspring_kill_e;
-                       Next[y][x] = Xblank;
-                       Next[y][x+1] = Xspring_e;
-                       play[SAMPLE_slurp] = 1;
-                       score += lev.slurp_score;
-                       goto loop;
-               case Xbumper:
-               case XbumperB:
-                       Cave[y][x+1] = XbumperB;
-                       Next[y][x] = Xspring_w;
-                       PLAY(SAMPLE_spring);
-                       goto loop;
-               default:
-                       Cave[y][x] = Xspring;
-                       Next[y][x] = Xspring;
-                       PLAY(SAMPLE_spring);
-                       goto loop;
-               }
-/* ---------------------------------------------------------------------- */
-       case Xspring_w:
-               switch(Cave[y+1][x]) {
-               case Xacid_1:
-               case Xacid_2:
-               case Xacid_3:
-               case Xacid_4:
-               case Xacid_5:
-               case Xacid_6:
-               case Xacid_7:
-               case Xacid_8:
-                       Cave[y][x] = Yspring_sB;
-                       if(Cave[y][x+1] == Xblank) Cave[y][x+1] = Yacid_splash_eB;
-                       if(Cave[y][x-1] == Xblank) Cave[y][x-1] = Yacid_splash_wB;
-                       Next[y][x] = Xblank;
-                       PLAY(SAMPLE_acid);
-                       goto loop;
-               case Xblank:
-               case Yacid_splash_eB:
-               case Yacid_splash_wB:
-                       Cave[y][x] = Yspring_sB;
-                       Cave[y+1][x] = Yspring_s;
-                       Next[y][x] = Xblank;
-                       Next[y+1][x] = Xspring_fall;
-                       goto loop;
-               case Xbumper:
-                       Cave[y+1][x] = XbumperB;
-               }
-               switch(Cave[y][x-1]) {
-               case Xacid_1:
-               case Xacid_2:
-               case Xacid_3:
-               case Xacid_4:
-               case Xacid_5:
-               case Xacid_6:
-               case Xacid_7:
-               case Xacid_8:
-                       Cave[y][x] = Yspring_wB;
-                       if(Cave[y-1][x] == Xblank) Cave[y-1][x] = Yacid_splash_eB;
-                       if(Cave[y-1][x-2] == Xblank) Cave[y-1][x-2] = Yacid_splash_wB;
-                       Next[y][x] = Xblank;
-                       PLAY(SAMPLE_acid);
-                       goto loop;
-               case Xblank:
-               case Yacid_splash_eB:
-               case Yacid_splash_wB:
-               case Yalien_nB:
-               case Yalien_eB:
-               case Yalien_sB:
-               case Yalien_wB:
-                       Cave[y][x] = Yspring_wB;
-                       Cave[y][x-1] = Yspring_w;
-                       Next[y][x] = Xblank;
-                       Next[y][x-1] = Xspring_w;
-                       goto loop;
-               case Xalien:
-               case Xalien_pause:
-               case Yalien_n:
-               case Yalien_e:
-               case Yalien_s:
-               case Yalien_w:
-                       Cave[y][x] = Yspring_kill_wB;
-                       Cave[y][x-1] = Yspring_kill_w;
-                       Next[y][x] = Xblank;
-                       Next[y][x-1] = Xspring_w;
-                       play[SAMPLE_slurp] = 1;
-                       score += lev.slurp_score;
-                       goto loop;
-               case Xbumper:
-               case XbumperB:
-                       Cave[y][x-1] = XbumperB;
-                       Next[y][x] = Xspring_e;
-                       PLAY(SAMPLE_spring);
-                       goto loop;
-               default:
-                       Cave[y][x] = Xspring;
-                       Next[y][x] = Xspring;
-                       PLAY(SAMPLE_spring);
-                       goto loop;
-               }
-/* ---------------------------------------------------------------------- */
-       case Xspring_fall:
-               switch(Cave[y+1][x]) {
-               case Xacid_1:
-               case Xacid_2:
-               case Xacid_3:
-               case Xacid_4:
-               case Xacid_5:
-               case Xacid_6:
-               case Xacid_7:
-               case Xacid_8:
-                       Cave[y][x] = Yspring_sB;
-                       if(Cave[y][x+1] == Xblank) Cave[y][x+1] = Yacid_splash_eB;
-                       if(Cave[y][x-1] == Xblank) Cave[y][x-1] = Yacid_splash_wB;
-                       Next[y][x] = Xblank;
-                       PLAY(SAMPLE_acid);
-                       goto loop;
-               case Xblank:
-               case Yacid_splash_eB:
-               case Yacid_splash_wB:
-               case Zplayer:
-                       Cave[y][x] = Yspring_sB;
-                       Cave[y+1][x] = Yspring_s;
-                       Next[y][x] = Xblank;
-                       Next[y+1][x] = Xspring_fall;
-                       goto loop;
-               case Xbomb:
-               case Xbomb_pause:
-                       Cave[y+1][x] = Ybomb_eat;
-                       Next[y+1][x] = Znormal;
-                       Boom[y][x-1] = Xblank;
-                       Boom[y][x] = Xblank;
-                       Boom[y][x+1] = Xblank;
-                       Boom[y+1][x-1] = Xblank;
-                       Boom[y+1][x] = Xblank;
-                       Boom[y+1][x+1] = Xblank;
-                       Boom[y+2][x-1] = Xblank;
-                       Boom[y+2][x] = Xblank;
-                       Boom[y+2][x+1] = Xblank;
-                       goto loop;
-               case Xbug_n:
-               case Xbug_e:
-               case Xbug_s:
-               case Xbug_w:
-               case Xbug_gon:
-               case Xbug_goe:
-               case Xbug_gos:
-               case Xbug_gow:
-                       Cave[y][x] = Yspring_sB;
-                       Cave[y+1][x] = Ybug_spring;
-                       Next[y+1][x] = Znormal;
-                       Boom[y][x-1] = Xemerald;
-                       Boom[y][x] = Xemerald;
-                       Boom[y][x+1] = Xemerald;
-                       Boom[y+1][x-1] = Xemerald;
-                       Boom[y+1][x] = Xdiamond;
-                       Boom[y+1][x+1] = Xemerald;
-                       Boom[y+2][x-1] = Xemerald;
-                       Boom[y+2][x] = Xemerald;
-                       Boom[y+2][x+1] = Xemerald;
-                       score += lev.bug_score;
-                       goto loop;
-               case Xtank_n:
-               case Xtank_e:
-               case Xtank_s:
-               case Xtank_w:
-               case Xtank_gon:
-               case Xtank_goe:
-               case Xtank_gos:
-               case Xtank_gow:
-                       Cave[y][x] = Yspring_sB;
-                       Cave[y+1][x] = Ytank_spring;
-                       Next[y+1][x] = Znormal;
-                       Boom[y][x-1] = Xblank;
-                       Boom[y][x] = Xblank;
-                       Boom[y][x+1] = Xblank;
-                       Boom[y+1][x-1] = Xblank;
-                       Boom[y+1][x] = Xblank;
-                       Boom[y+1][x+1] = Xblank;
-                       Boom[y+2][x-1] = Xblank;
-                       Boom[y+2][x] = Xblank;
-                       Boom[y+2][x+1] = Xblank;
-                       score += lev.tank_score;
-                       goto loop;
-               case Xeater_n:
-               case Xeater_e:
-               case Xeater_s:
-               case Xeater_w:
-                       Cave[y][x] = Yspring_sB;
-                       Cave[y+1][x] = Yeater_spring;
-                       Next[y+1][x] = Znormal;
-                       Boom[y][x-1] = lev.eater_array[lev.eater_pos][0];
-                       Boom[y][x] = lev.eater_array[lev.eater_pos][1];
-                       Boom[y][x+1] = lev.eater_array[lev.eater_pos][2];
-                       Boom[y+1][x-1] = lev.eater_array[lev.eater_pos][3];
-                       Boom[y+1][x] = lev.eater_array[lev.eater_pos][4];
-                       Boom[y+1][x+1] = lev.eater_array[lev.eater_pos][5];
-                       Boom[y+2][x-1] = lev.eater_array[lev.eater_pos][6];
-                       Boom[y+2][x] = lev.eater_array[lev.eater_pos][7];
-                       Boom[y+2][x+1] = lev.eater_array[lev.eater_pos][8];
-                       lev.eater_pos = (lev.eater_pos + 1) & 7;
-                       score += lev.eater_score;
-                       goto loop;
-               case Xalien:
-               case Xalien_pause:
-                       Cave[y][x] = Yspring_sB;
-                       Cave[y+1][x] = Yalien_spring;
-                       Next[y+1][x] = Znormal;
-                       Boom[y][x-1] = Xblank;
-                       Boom[y][x] = Xblank;
-                       Boom[y][x+1] = Xblank;
-                       Boom[y+1][x-1] = Xblank;
-                       Boom[y+1][x] = Xblank;
-                       Boom[y+1][x+1] = Xblank;
-                       Boom[y+2][x-1] = Xblank;
-                       Boom[y+2][x] = Xblank;
-                       Boom[y+2][x+1] = Xblank;
-                       score += lev.alien_score;
-                       goto loop;
-               default:
-                       Cave[y][x] = Xspring;
-                       Next[y][x] = Xspring;
-                       PLAY(SAMPLE_spring);
-                       goto loop;
-               }
-/* ---------------------------------------------------------------------- */
-       case Xeater_n:
-               if(Cave[y][x+1] == Xdiamond) {
-                       Cave[y][x+1] = Ydiamond_eat;
-                       Next[y][x+1] = Xblank;
-                       play[SAMPLE_eater] = 1;
-                       goto loop;
-               }
-               if(Cave[y+1][x] == Xdiamond) {
-                       Cave[y+1][x] = Ydiamond_eat;
-                       Next[y+1][x] = Xblank;
-                       play[SAMPLE_eater] = 1;
-                       goto loop;
-               }
-               if(Cave[y][x-1] == Xdiamond) {
-                       Cave[y][x-1] = Ydiamond_eat;
-                       Next[y][x-1] = Xblank;
-                       play[SAMPLE_eater] = 1;
-                       goto loop;
-               }
-               if(Cave[y-1][x] == Xdiamond) {
-                       Cave[y-1][x] = Ydiamond_eat;
-                       Next[y-1][x] = Xblank;
-                       play[SAMPLE_eater] = 1;
-                       goto loop;
-               }
-               switch(Cave[y-1][x]) {
-               case Xacid_1:
-               case Xacid_2:
-               case Xacid_3:
-               case Xacid_4:
-               case Xacid_5:
-               case Xacid_6:
-               case Xacid_7:
-               case Xacid_8:
-                       Cave[y][x] = Yeater_nB;
-                       if(Cave[y-2][x+1] == Xblank) Cave[y-2][x+1] = Yacid_splash_eB;
-                       if(Cave[y-2][x-1] == Xblank) Cave[y-2][x-1] = Yacid_splash_wB;
-                       Next[y][x] = Xblank;
-                       PLAY(SAMPLE_acid);
-                       goto loop;
-               case Xblank:
-               case Yacid_splash_eB:
-               case Yacid_splash_wB:
-               case Xplant:
-               case Yplant:
-               case Zplayer:
-                       Cave[y][x] = Yeater_nB;
-                       Cave[y-1][x] = Yeater_n;
-                       Next[y][x] = Xblank;
-                       Next[y-1][x] = Xeater_n;
-                       goto loop;
-               default:
-                       Next[y][x] = RANDOM & 1 ? Xeater_e : Xeater_w;
-                       PLAY(SAMPLE_eater);
-                       goto loop;
-               }
-/* ---------------------------------------------------------------------- */
-       case Xeater_e:
-               if(Cave[y+1][x] == Xdiamond) {
-                       Cave[y+1][x] = Ydiamond_eat;
-                       Next[y+1][x] = Xblank;
-                       play[SAMPLE_eater] = 1;
-                       goto loop;
-               }
-               if(Cave[y][x-1] == Xdiamond) {
-                       Cave[y][x-1] = Ydiamond_eat;
-                       Next[y][x-1] = Xblank;
-                       play[SAMPLE_eater] = 1;
-                       goto loop;
-               }
-               if(Cave[y-1][x] == Xdiamond) {
-                       Cave[y-1][x] = Ydiamond_eat;
-                       Next[y-1][x] = Xblank;
-                       play[SAMPLE_eater] = 1;
-                       goto loop;
-               }
-               if(Cave[y][x+1] == Xdiamond) {
-                       Cave[y][x+1] = Ydiamond_eat;
-                       Next[y][x+1] = Xblank;
-                       play[SAMPLE_eater] = 1;
-                       goto loop;
-               }
-               switch(Cave[y][x+1]) {
-               case Xacid_1:
-               case Xacid_2:
-               case Xacid_3:
-               case Xacid_4:
-               case Xacid_5:
-               case Xacid_6:
-               case Xacid_7:
-               case Xacid_8:
-                       Cave[y][x] = Yeater_eB;
-                       if(Cave[y-1][x+2] == Xblank) Cave[y-1][x+2] = Yacid_splash_eB;
-                       if(Cave[y-1][x] == Xblank) Cave[y-1][x] = Yacid_splash_wB;
-                       Next[y][x] = Xblank;
-                       PLAY(SAMPLE_acid);
-                       goto loop;
-               case Xblank:
-               case Yacid_splash_eB:
-               case Yacid_splash_wB:
-               case Xplant:
-               case Yplant:
-               case Zplayer:
-                       Cave[y][x] = Yeater_eB;
-                       Cave[y][x+1] = Yeater_e;
-                       Next[y][x] = Xblank;
-                       Next[y][x+1] = Xeater_e;
-                       goto loop;
-               default:
-                       Next[y][x] = RANDOM & 1 ? Xeater_n : Xeater_s;
-                       PLAY(SAMPLE_eater);
-                       goto loop;
-               }
-/* ---------------------------------------------------------------------- */
-       case Xeater_s:
-               if(Cave[y][x-1] == Xdiamond) {
-                       Cave[y][x-1] = Ydiamond_eat;
-                       Next[y][x-1] = Xblank;
-                       play[SAMPLE_eater] = 1;
-                       goto loop;
-               }
-               if(Cave[y-1][x] == Xdiamond) {
-                       Cave[y-1][x] = Ydiamond_eat;
-                       Next[y-1][x] = Xblank;
-                       play[SAMPLE_eater] = 1;
-                       goto loop;
-               }
-               if(Cave[y][x+1] == Xdiamond) {
-                       Cave[y][x+1] = Ydiamond_eat;
-                       Next[y][x+1] = Xblank;
-                       play[SAMPLE_eater] = 1;
-                       goto loop;
-               }
-               if(Cave[y+1][x] == Xdiamond) {
-                       Cave[y+1][x] = Ydiamond_eat;
-                       Next[y+1][x] = Xblank;
-                       play[SAMPLE_eater] = 1;
-                       goto loop;
-               }
-               switch(Cave[y+1][x]) {
-               case Xacid_1:
-               case Xacid_2:
-               case Xacid_3:
-               case Xacid_4:
-               case Xacid_5:
-               case Xacid_6:
-               case Xacid_7:
-               case Xacid_8:
-                       Cave[y][x] = Yeater_sB;
-                       if(Cave[y][x+1] == Xblank) Cave[y][x+1] = Yacid_splash_eB;
-                       if(Cave[y][x-1] == Xblank) Cave[y][x-1] = Yacid_splash_wB;
-                       Next[y][x] = Xblank;
-                       PLAY(SAMPLE_acid);
-                       goto loop;
-               case Xblank:
-               case Yacid_splash_eB:
-               case Yacid_splash_wB:
-               case Xplant:
-               case Yplant:
-               case Zplayer:
-                       Cave[y][x] = Yeater_sB;
-                       Cave[y+1][x] = Yeater_s;
-                       Next[y][x] = Xblank;
-                       Next[y+1][x] = Xeater_s;
-                       goto loop;
-               default:
-                       Next[y][x] = RANDOM & 1 ? Xeater_e : Xeater_w;
-                       PLAY(SAMPLE_eater);
-                       goto loop;
-               }
-/* ---------------------------------------------------------------------- */
-       case Xeater_w:
-               if(Cave[y-1][x] == Xdiamond) {
-                       Cave[y-1][x] = Ydiamond_eat;
-                       Next[y-1][x] = Xblank;
-                       play[SAMPLE_eater] = 1;
-                       goto loop;
-               }
-               if(Cave[y][x+1] == Xdiamond) {
-                       Cave[y][x+1] = Ydiamond_eat;
-                       Next[y][x+1] = Xblank;
-                       play[SAMPLE_eater] = 1;
-                       goto loop;
-               }
-               if(Cave[y+1][x] == Xdiamond) {
-                       Cave[y+1][x] = Ydiamond_eat;
-                       Next[y+1][x] = Xblank;
-                       play[SAMPLE_eater] = 1;
-                       goto loop;
-               }
-               if(Cave[y][x-1] == Xdiamond) {
-                       Cave[y][x-1] = Ydiamond_eat;
-                       Next[y][x-1] = Xblank;
-                       play[SAMPLE_eater] = 1;
-                       goto loop;
-               }
-               switch(Cave[y][x-1]) {
-               case Xacid_1:
-               case Xacid_2:
-               case Xacid_3:
-               case Xacid_4:
-               case Xacid_5:
-               case Xacid_6:
-               case Xacid_7:
-               case Xacid_8:
-                       Cave[y][x] = Yeater_wB;
-                       if(Cave[y-1][x] == Xblank) Cave[y-1][x] = Yacid_splash_eB;
-                       if(Cave[y-1][x-2] == Xblank) Cave[y-1][x-2] = Yacid_splash_wB;
-                       Next[y][x] = Xblank;
-                       PLAY(SAMPLE_acid);
-                       goto loop;
-               case Xblank:
-               case Yacid_splash_eB:
-               case Yacid_splash_wB:
-               case Xplant:
-               case Yplant:
-               case Zplayer:
-                       Cave[y][x] = Yeater_wB;
-                       Cave[y][x-1] = Yeater_w;
-                       Next[y][x] = Xblank;
-                       Next[y][x-1] = Xeater_w;
-                       goto loop;
-               default:
-                       Next[y][x] = RANDOM & 1 ? Xeater_n : Xeater_s;
-                       PLAY(SAMPLE_eater);
-                       goto loop;
-               }
-/* ---------------------------------------------------------------------- */
-       case Xalien:
-               if(lev.wheel_cnt) {
-                       dx = lev.wheel_x;
-                       dy = lev.wheel_y;
-               } else if(ply1.alive && ply2.alive) {
-                       if( (ply1.x > x ? ply1.x - x : x - ply1.x) + (ply1.y > y ? ply1.y - y : y - ply1.y) < (ply2.x > x ? ply2.x - x : x - ply2.x) + (ply2.y > y ? ply2.y - y : y - ply2.y) ) {
-                               dx = ply1.x;
-                               dy = ply1.y;
-                       } else {
-                               dx = ply2.x;
-                               dy = ply2.y;
-                       }
-               } else if(ply1.alive) {
-                       dx = ply1.x;
-                       dy = ply1.y;
-               } else if(ply2.alive) {
-                       dx = ply2.x;
-                       dy = ply2.y;
-               } else {
-                       dx = 0;
-                       dy = 0;
-               }
-               if(RANDOM & 1) {
-                       if(y > dy) {
-                               switch(Cave[y-1][x]) {
-                               case Xacid_1:
-                               case Xacid_2:
-                               case Xacid_3:
-                               case Xacid_4:
-                               case Xacid_5:
-                               case Xacid_6:
-                               case Xacid_7:
-                               case Xacid_8:
-                                       Cave[y][x] = Yalien_nB;
-                                       if(Cave[y-2][x+1] == Xblank) Cave[y-2][x+1] = Yacid_splash_eB;
-                                       if(Cave[y-2][x-1] == Xblank) Cave[y-2][x-1] = Yacid_splash_wB;
-                                       Next[y][x] = Xblank;
-                                       PLAY(SAMPLE_acid);
-                                       goto loop;
-                               case Xblank:
-                               case Yacid_splash_eB:
-                               case Yacid_splash_wB:
-                               case Xplant:
-                               case Yplant:
-                               case Zplayer:
-                                       Cave[y][x] = Yalien_nB;
-                                       Cave[y-1][x] = Yalien_n;
-                                       Next[y][x] = Xblank;
-                                       Next[y-1][x] = Xalien_pause;
-                                       PLAY(SAMPLE_alien);
-                                       goto loop;
-                               }
-                       } else if(y < dy) {
-                               switch(Cave[y+1][x]) {
-                               case Xacid_1:
-                               case Xacid_2:
-                               case Xacid_3:
-                               case Xacid_4:
-                               case Xacid_5:
-                               case Xacid_6:
-                               case Xacid_7:
-                               case Xacid_8:
-                                       Cave[y][x] = Yalien_sB;
-                                       Next[y][x] = Xblank;
-                                       if(Cave[y][x+1] == Xblank) Cave[y][x+1] = Yacid_splash_eB;
-                                       if(Cave[y][x-1] == Xblank) Cave[y][x-1] = Yacid_splash_wB;
-                                       PLAY(SAMPLE_acid);
-                                       goto loop;
-                               case Xblank:
-                               case Yacid_splash_eB:
-                               case Yacid_splash_wB:
-                               case Xplant:
-                               case Yplant:
-                               case Zplayer:
-                                       Cave[y][x] = Yalien_sB;
-                                       Cave[y+1][x] = Yalien_s;
-                                       Next[y][x] = Xblank;
-                                       Next[y+1][x] = Xalien_pause;
-                                       PLAY(SAMPLE_alien);
-                                       goto loop;
-                               }
-                       }
-               } else {
-                       if(x < dx) {
-                               switch(Cave[y][x+1]) {
-                               case Xacid_1:
-                               case Xacid_2:
-                               case Xacid_3:
-                               case Xacid_4:
-                               case Xacid_5:
-                               case Xacid_6:
-                               case Xacid_7:
-                               case Xacid_8:
-                                       Cave[y][x] = Yalien_eB;
-                                       if(Cave[y-1][x+2] == Xblank) Cave[y-1][x+2] = Yacid_splash_eB;
-                                       if(Cave[y-1][x] == Xblank) Cave[y-1][x] = Yacid_splash_wB;
-                                       Next[y][x] = Xblank;
-                                       PLAY(SAMPLE_acid);
-                                       goto loop;
-                               case Xblank:
-                               case Yacid_splash_eB:
-                               case Yacid_splash_wB:
-                               case Xplant:
-                               case Yplant:
-                               case Zplayer:
-                                       Cave[y][x] = Yalien_eB;
-                                       Cave[y][x+1] = Yalien_e;
-                                       Next[y][x] = Xblank;
-                                       Next[y][x+1] = Xalien_pause;
-                                       PLAY(SAMPLE_alien);
-                                       goto loop;
-                               }
-                       } else if(x > dx) {
-                               switch(Cave[y][x-1]) {
-                               case Xacid_1:
-                               case Xacid_2:
-                               case Xacid_3:
-                               case Xacid_4:
-                               case Xacid_5:
-                               case Xacid_6:
-                               case Xacid_7:
-                               case Xacid_8:
-                                       Cave[y][x] = Yalien_wB;
-                                       if(Cave[y-1][x] == Xblank) Cave[y-1][x] = Yacid_splash_eB;
-                                       if(Cave[y-1][x-2] == Xblank) Cave[y-1][x-2] = Yacid_splash_wB;
-                                       Next[y][x] = Xblank;
-                                       PLAY(SAMPLE_acid);
-                                       goto loop;
-                               case Xblank:
-                               case Yacid_splash_eB:
-                               case Yacid_splash_wB:
-                               case Xplant:
-                               case Yplant:
-                               case Zplayer:
-                                       Cave[y][x] = Yalien_wB;
-                                       Cave[y][x-1] = Yalien_w;
-                                       Next[y][x] = Xblank;
-                                       Next[y][x-1] = Xalien_pause;
-                                       PLAY(SAMPLE_alien);
-                                       goto loop;
-                               }
-                       }
-               }
-               goto loop;
-       case Xalien_pause:
-               Next[y][x] = Xalien;
-               goto loop;
-/* ---------------------------------------------------------------------- */
-       case Xemerald:
-               switch(Cave[y+1][x]) {
-               case Xacid_1:
-               case Xacid_2:
-               case Xacid_3:
-               case Xacid_4:
-               case Xacid_5:
-               case Xacid_6:
-               case Xacid_7:
-               case Xacid_8:
-                       Cave[y][x] = Yemerald_sB;
-                       if(Cave[y][x+1] == Xblank) Cave[y][x+1] = Yacid_splash_eB;
-                       if(Cave[y][x-1] == Xblank) Cave[y][x-1] = Yacid_splash_wB;
-                       Next[y][x] = Xblank;
-                       PLAY(SAMPLE_acid);
-                       goto loop;
-               case Xblank:
-               case Yacid_splash_eB:
-               case Yacid_splash_wB:
-                       Cave[y][x] = Yemerald_sB;
-                       Cave[y+1][x] = Yemerald_s;
-                       Next[y][x] = Xblank;
-                       Next[y+1][x] = Xemerald_fall;
-                       goto loop;
-               case Xspring:
-               case Xspring_pause:
-               case Xspring_e:
-               case Xspring_w:
-               case Xandroid:
-               case Xandroid_1_n:
-               case Xandroid_2_n:
-               case Xandroid_1_e:
-               case Xandroid_2_e:
-               case Xandroid_1_s:
-               case Xandroid_2_s:
-               case Xandroid_1_w:
-               case Xandroid_2_w:
-               case Xstone:
-               case Xstone_pause:
-               case Xemerald:
-               case Xemerald_pause:
-               case Xdiamond:
-               case Xdiamond_pause:
-               case Xbomb:
-               case Xbomb_pause:
-               case Xballoon:
-               case Xacid_ne:
-               case Xacid_nw:
-               case Xball_1:
-               case Xball_2:
-               case Xnut:
-               case Xnut_pause:
-               case Xgrow_ns:
-               case Xgrow_ew:
-               case Xwonderwall:
-               case Xkey_1:
-               case Xkey_2:
-               case Xkey_3:
-               case Xkey_4:
-               case Xkey_5:
-               case Xkey_6:
-               case Xkey_7:
-               case Xkey_8:
-               case Xbumper:
-               case Xswitch:
-               case Xsteel_1:
-               case Xsteel_2:
-               case Xsteel_3:
-               case Xsteel_4:
-               case Xwall_1:
-               case Xwall_2:
-               case Xwall_3:
-               case Xwall_4:
-               case Xround_wall_1:
-               case Xround_wall_2:
-               case Xround_wall_3:
-               case Xround_wall_4:
-                       if(RANDOM & 1) {
-                               if(tab_blank[Cave[y][x+1]] && tab_acid[Cave[y+1][x+1]]) {
-                                       Cave[y][x] = Yemerald_eB;
-                                       Cave[y][x+1] = Yemerald_e;
-                                       Next[y][x] = Xblank;
-                                       Next[y][x+1] = Xemerald_pause;
-                                       goto loop;
-                               }
-                               if(tab_blank[Cave[y][x-1]] && tab_acid[Cave[y+1][x-1]]) {
-                                       Cave[y][x] = Yemerald_wB;
-                                       Cave[y][x-1] = Yemerald_w;
-                                       Next[y][x] = Xblank;
-                                       Next[y][x-1] = Xemerald_pause;
-                                       goto loop;
-                               }
-                       } else {
-                               if(tab_blank[Cave[y][x-1]] && tab_acid[Cave[y+1][x-1]]) {
-                                       Cave[y][x] = Yemerald_wB;
-                                       Cave[y][x-1] = Yemerald_w;
-                                       Next[y][x] = Xblank;
-                                       Next[y][x-1] = Xemerald_pause;
-                                       goto loop;
-                               }
-                               if(tab_blank[Cave[y][x+1]] && tab_acid[Cave[y+1][x+1]]) {
-                                       Cave[y][x] = Yemerald_eB;
-                                       Cave[y][x+1] = Yemerald_e;
-                                       Next[y][x] = Xblank;
-                                       Next[y][x+1] = Xemerald_pause;
-                                       goto loop;
-                               }
-                       }
-               default:
-                       if(++lev.shine_cnt > 50) {
-                               lev.shine_cnt = RANDOM & 7;
-                               Cave[y][x] = Xemerald_shine;
-                       }
-                       goto loop;
-               }
-/* ---------------------------------------------------------------------- */
-       case Xemerald_pause:
-               switch(Cave[y+1][x]) {
-               case Xacid_1:
-               case Xacid_2:
-               case Xacid_3:
-               case Xacid_4:
-               case Xacid_5:
-               case Xacid_6:
-               case Xacid_7:
-               case Xacid_8:
-                       Cave[y][x] = Yemerald_sB;
-                       if(Cave[y][x+1] == Xblank) Cave[y][x+1] = Yacid_splash_eB;
-                       if(Cave[y][x-1] == Xblank) Cave[y][x-1] = Yacid_splash_wB;
-                       Next[y][x] = Xblank;
-                       PLAY(SAMPLE_acid);
-                       goto loop;
-               case Xblank:
-               case Yacid_splash_eB:
-               case Yacid_splash_wB:
-                       Cave[y][x] = Yemerald_sB;
-                       Cave[y+1][x] = Yemerald_s;
-                       Next[y][x] = Xblank;
-                       Next[y+1][x] = Xemerald_fall;
-                       goto loop;
-               default:
-                       Cave[y][x] = Xemerald;
-                       Next[y][x] = Xemerald;
-                       goto loop;
-               }
-/* ---------------------------------------------------------------------- */
-       case Xemerald_fall:
-               switch(Cave[y+1][x]) {
-               case Xacid_1:
-               case Xacid_2:
-               case Xacid_3:
-               case Xacid_4:
-               case Xacid_5:
-               case Xacid_6:
-               case Xacid_7:
-               case Xacid_8:
-                       Cave[y][x] = Yemerald_sB;
-                       if(Cave[y][x+1] == Xblank) Cave[y][x+1] = Yacid_splash_eB;
-                       if(Cave[y][x-1] == Xblank) Cave[y][x-1] = Yacid_splash_wB;
-                       Next[y][x] = Xblank;
-                       PLAY(SAMPLE_acid);
-                       goto loop;
-               case Xblank:
-               case Yacid_splash_eB:
-               case Yacid_splash_wB:
-               case Zplayer:
-                       Cave[y][x] = Yemerald_sB;
-                       Cave[y+1][x] = Yemerald_s;
-                       Next[y][x] = Xblank;
-                       Next[y+1][x] = Xemerald_fall;
-                       goto loop;
-               case Xwonderwall:
-                       if(lev.wonderwall_time) {
-                               lev.wonderwall_state = 1;
-                               Cave[y][x] = Yemerald_sB;
-                               if(tab_blank[Cave[y+2][x]]) {
-                                       Cave[y+2][x] = Ydiamond_s;
-                                       Next[y+2][x] = Xdiamond_fall;
-                               }
-                               Next[y][x] = Xblank;
-                               play[SAMPLE_squash] = 1;
-                               goto loop;
-                       }
-               default:
-                       Cave[y][x] = Xemerald;
-                       Next[y][x] = Xemerald;
-                       PLAY(SAMPLE_diamond);
-                       goto loop;
-               }
-/* ---------------------------------------------------------------------- */
-       case Xdiamond:
-               switch(Cave[y+1][x]) {
-               case Xacid_1:
-               case Xacid_2:
-               case Xacid_3:
-               case Xacid_4:
-               case Xacid_5:
-               case Xacid_6:
-               case Xacid_7:
-               case Xacid_8:
-                       Cave[y][x] = Ydiamond_sB;
-                       if(Cave[y][x+1] == Xblank) Cave[y][x+1] = Yacid_splash_eB;
-                       if(Cave[y][x-1] == Xblank) Cave[y][x-1] = Yacid_splash_wB;
-                       Next[y][x] = Xblank;
-                       PLAY(SAMPLE_acid);
-                       goto loop;
-               case Xblank:
-               case Yacid_splash_eB:
-               case Yacid_splash_wB:
-                       Cave[y][x] = Ydiamond_sB;
-                       Cave[y+1][x] = Ydiamond_s;
-                       Next[y][x] = Xblank;
-                       Next[y+1][x] = Xdiamond_fall;
-                       goto loop;
-               case Xspring:
-               case Xspring_pause:
-               case Xspring_e:
-               case Xspring_w:
-               case Xandroid:
-               case Xandroid_1_n:
-               case Xandroid_2_n:
-               case Xandroid_1_e:
-               case Xandroid_2_e:
-               case Xandroid_1_s:
-               case Xandroid_2_s:
-               case Xandroid_1_w:
-               case Xandroid_2_w:
-               case Xstone:
-               case Xstone_pause:
-               case Xemerald:
-               case Xemerald_pause:
-               case Xdiamond:
-               case Xdiamond_pause:
-               case Xbomb:
-               case Xbomb_pause:
-               case Xballoon:
-               case Xacid_ne:
-               case Xacid_nw:
-               case Xball_1:
-               case Xball_2:
-               case Xnut:
-               case Xnut_pause:
-               case Xgrow_ns:
-               case Xgrow_ew:
-               case Xwonderwall:
-               case Xkey_1:
-               case Xkey_2:
-               case Xkey_3:
-               case Xkey_4:
-               case Xkey_5:
-               case Xkey_6:
-               case Xkey_7:
-               case Xkey_8:
-               case Xbumper:
-               case Xswitch:
-               case Xsteel_1:
-               case Xsteel_2:
-               case Xsteel_3:
-               case Xsteel_4:
-               case Xwall_1:
-               case Xwall_2:
-               case Xwall_3:
-               case Xwall_4:
-               case Xround_wall_1:
-               case Xround_wall_2:
-               case Xround_wall_3:
-               case Xround_wall_4:
-                       if(RANDOM & 1) {
-                               if(tab_blank[Cave[y][x+1]] && tab_acid[Cave[y+1][x+1]]) {
-                                       Cave[y][x] = Ydiamond_eB;
-                                       Cave[y][x+1] = Ydiamond_e;
-                                       Next[y][x] = Xblank;
-                                       Next[y][x+1] = Xdiamond_pause;
-                                       goto loop;
-                               }
-                               if(tab_blank[Cave[y][x-1]] && tab_acid[Cave[y+1][x-1]]) {
-                                       Cave[y][x] = Ydiamond_wB;
-                                       Cave[y][x-1] = Ydiamond_w;
-                                       Next[y][x] = Xblank;
-                                       Next[y][x-1] = Xdiamond_pause;
-                                       goto loop;
-                               }
-                       } else {
-                               if(tab_blank[Cave[y][x-1]] && tab_acid[Cave[y+1][x-1]]) {
-                                       Cave[y][x] = Ydiamond_wB;
-                                       Cave[y][x-1] = Ydiamond_w;
-                                       Next[y][x] = Xblank;
-                                       Next[y][x-1] = Xdiamond_pause;
-                                       goto loop;
-                               }
-                               if(tab_blank[Cave[y][x+1]] && tab_acid[Cave[y+1][x+1]]) {
-                                       Cave[y][x] = Ydiamond_eB;
-                                       Cave[y][x+1] = Ydiamond_e;
-                                       Next[y][x] = Xblank;
-                                       Next[y][x+1] = Xdiamond_pause;
-                                       goto loop;
-                               }
-                       }
-               default:
-                       if(++lev.shine_cnt > 50) {
-                               lev.shine_cnt = RANDOM & 7;
-                               Cave[y][x] = Xdiamond_shine;
-                       }
-                       goto loop;
-               }
-/* ---------------------------------------------------------------------- */
-       case Xdiamond_pause:
-               switch(Cave[y+1][x]) {
-               case Xacid_1:
-               case Xacid_2:
-               case Xacid_3:
-               case Xacid_4:
-               case Xacid_5:
-               case Xacid_6:
-               case Xacid_7:
-               case Xacid_8:
-                       Cave[y][x] = Ydiamond_sB;
-                       if(Cave[y][x+1] == Xblank) Cave[y][x+1] = Yacid_splash_eB;
-                       if(Cave[y][x-1] == Xblank) Cave[y][x-1] = Yacid_splash_wB;
-                       Next[y][x] = Xblank;
-                       PLAY(SAMPLE_acid);
-                       goto loop;
-               case Xblank:
-               case Yacid_splash_eB:
-               case Yacid_splash_wB:
-                       Cave[y][x] = Ydiamond_sB;
-                       Cave[y+1][x] = Ydiamond_s;
-                       Next[y][x] = Xblank;
-                       Next[y+1][x] = Xdiamond_fall;
-                       goto loop;
-               default:
-                       Cave[y][x] = Xdiamond;
-                       Next[y][x] = Xdiamond;
-                       goto loop;
-               }
-/* ---------------------------------------------------------------------- */
-       case Xdiamond_fall:
-               switch(Cave[y+1][x]) {
-               case Xacid_1:
-               case Xacid_2:
-               case Xacid_3:
-               case Xacid_4:
-               case Xacid_5:
-               case Xacid_6:
-               case Xacid_7:
-               case Xacid_8:
-                       Cave[y][x] = Ydiamond_sB;
-                       if(Cave[y][x+1] == Xblank) Cave[y][x+1] = Yacid_splash_eB;
-                       if(Cave[y][x-1] == Xblank) Cave[y][x-1] = Yacid_splash_wB;
-                       Next[y][x] = Xblank;
-                       PLAY(SAMPLE_acid);
-                       goto loop;
-               case Xblank:
-               case Yacid_splash_eB:
-               case Yacid_splash_wB:
-               case Zplayer:
-                       Cave[y][x] = Ydiamond_sB;
-                       Cave[y+1][x] = Ydiamond_s;
-                       Next[y][x] = Xblank;
-                       Next[y+1][x] = Xdiamond_fall;
-                       goto loop;
-               case Xwonderwall:
-                       if(lev.wonderwall_time) {
-                               lev.wonderwall_state = 1;
-                               Cave[y][x] = Ydiamond_sB;
-                               if(tab_blank[Cave[y+2][x]]) {
-                                       Cave[y+2][x] = Ystone_s;
-                                       Next[y+2][x] = Xstone_fall;
-                               }
-                               Next[y][x] = Xblank;
-                               play[SAMPLE_squash] = 1;
-                               goto loop;
-                       }
-               default:
-                       Cave[y][x] = Xdiamond;
-                       Next[y][x] = Xdiamond;
-                       PLAY(SAMPLE_diamond);
-                       goto loop;
-               }
-/* ---------------------------------------------------------------------- */
-       case Xdrip_fall:
-               switch(Cave[y+1][x]) {
-               case Xacid_1:
-               case Xacid_2:
-               case Xacid_3:
-               case Xacid_4:
-               case Xacid_5:
-               case Xacid_6:
-               case Xacid_7:
-               case Xacid_8:
-                       Cave[y][x] = Ydrip_s1B;
-                       if(Cave[y][x+1] == Xblank) Cave[y][x+1] = Yacid_splash_eB;
-                       if(Cave[y][x-1] == Xblank) Cave[y][x-1] = Yacid_splash_wB;
-                       Next[y][x] = Xdrip_stretchB;
-                       PLAY(SAMPLE_acid);
-                       goto loop;
-               case Xblank:
-               case Yacid_splash_eB:
-               case Yacid_splash_wB:
-               case Xplant:
-               case Yplant:
-               case Zplayer:
-                       Cave[y][x] = Ydrip_s1B;
-                       Cave[y+1][x] = Ydrip_s1;
-                       Next[y][x] = Xdrip_stretchB;
-                       Next[y+1][x] = Xdrip_stretch;
-                       goto loop;
-               default:
-                       switch(RANDOM & 7) {
-                       case 0: temp = Xameuba_1; break;
-                       case 1: temp = Xameuba_2; break;
-                       case 2: temp = Xameuba_3; break;
-                       case 3: temp = Xameuba_4; break;
-                       case 4: temp = Xameuba_5; break;
-                       case 5: temp = Xameuba_6; break;
-                       case 6: temp = Xameuba_7; break;
-                       case 7: temp = Xameuba_8; break;
-                       }
-                       Cave[y][x] = temp;
-                       Next[y][x] = temp;
-                       play[SAMPLE_drip] = 1;
-                       goto loop;
-               }
-/* ---------------------------------------------------------------------- */
-       case Xdrip_stretch:
-               Cave[y][x] = Ydrip_s2;
-               Next[y][x] = Xdrip_fall;
-               goto loop;
-       case Xdrip_stretchB:
-               Cave[y][x] = Ydrip_s2B;
-               Next[y][x] = Xblank;
-               goto loop;
-       case Xdrip_eat:
-               Next[y][x] = Xdrip_fall;
-               goto loop;
-/* ---------------------------------------------------------------------- */
-       case Xbomb:
-               switch(Cave[y+1][x]) {
-               case Xacid_1:
-               case Xacid_2:
-               case Xacid_3:
-               case Xacid_4:
-               case Xacid_5:
-               case Xacid_6:
-               case Xacid_7:
-               case Xacid_8:
-                       Cave[y][x] = Ybomb_sB;
-                       if(Cave[y][x+1] == Xblank) Cave[y][x+1] = Yacid_splash_eB;
-                       if(Cave[y][x-1] == Xblank) Cave[y][x-1] = Yacid_splash_wB;
-                       Next[y][x] = Xblank;
-                       PLAY(SAMPLE_acid);
-                       goto loop;
-               case Xblank:
-               case Yacid_splash_eB:
-               case Yacid_splash_wB:
-                       Cave[y][x] = Ybomb_sB;
-                       Cave[y+1][x] = Ybomb_s;
-                       Next[y][x] = Xblank;
-                       Next[y+1][x] = Xbomb_fall;
-                       goto loop;
-               case Xspring:
-               case Xspring_pause:
-               case Xspring_e:
-               case Xspring_w:
-               case Xandroid:
-               case Xandroid_1_n:
-               case Xandroid_2_n:
-               case Xandroid_1_e:
-               case Xandroid_2_e:
-               case Xandroid_1_s:
-               case Xandroid_2_s:
-               case Xandroid_1_w:
-               case Xandroid_2_w:
-               case Xstone:
-               case Xstone_pause:
-               case Xemerald:
-               case Xemerald_pause:
-               case Xdiamond:
-               case Xdiamond_pause:
-               case Xbomb:
-               case Xbomb_pause:
-               case Xballoon:
-               case Xacid_ne:
-               case Xacid_nw:
-               case Xball_1:
-               case Xball_2:
-               case Xnut:
-               case Xnut_pause:
-               case Xgrow_ns:
-               case Xgrow_ew:
-               case Xkey_1:
-               case Xkey_2:
-               case Xkey_3:
-               case Xkey_4:
-               case Xkey_5:
-               case Xkey_6:
-               case Xkey_7:
-               case Xkey_8:
-               case Xbumper:
-               case Xswitch:
-               case Xround_wall_1:
-               case Xround_wall_2:
-               case Xround_wall_3:
-               case Xround_wall_4:
-                       if(RANDOM & 1) {
-                               if(tab_blank[Cave[y][x+1]] && tab_acid[Cave[y+1][x+1]]) {
-                                       Cave[y][x] = Ybomb_eB;
-                                       Cave[y][x+1] = Ybomb_e;
-                                       Next[y][x] = Xblank;
-                                       Next[y][x+1] = Xbomb_pause;
-                                       goto loop;
-                               }
-                               if(tab_blank[Cave[y][x-1]] && tab_acid[Cave[y+1][x-1]]) {
-                                       Cave[y][x] = Ybomb_wB;
-                                       Cave[y][x-1] = Ybomb_w;
-                                       Next[y][x] = Xblank;
-                                       Next[y][x-1] = Xbomb_pause;
-                                       goto loop;
-                               }
-                       } else {
-                               if(tab_blank[Cave[y][x-1]] && tab_acid[Cave[y+1][x-1]]) {
-                                       Cave[y][x] = Ybomb_wB;
-                                       Cave[y][x-1] = Ybomb_w;
-                                       Next[y][x] = Xblank;
-                                       Next[y][x-1] = Xbomb_pause;
-                                       goto loop;
-                               }
-                               if(tab_blank[Cave[y][x+1]] && tab_acid[Cave[y+1][x+1]]) {
-                                       Cave[y][x] = Ybomb_eB;
-                                       Cave[y][x+1] = Ybomb_e;
-                                       Next[y][x] = Xblank;
-                                       Next[y][x+1] = Xbomb_pause;
-                                       goto loop;
-                               }
-                       }
-               default:
-                       goto loop;
-               }
-/* ---------------------------------------------------------------------- */
-       case Xbomb_pause:
-               switch(Cave[y+1][x]) {
-               case Xacid_1:
-               case Xacid_2:
-               case Xacid_3:
-               case Xacid_4:
-               case Xacid_5:
-               case Xacid_6:
-               case Xacid_7:
-               case Xacid_8:
-                       Cave[y][x] = Ybomb_sB;
-                       if(Cave[y][x+1] == Xblank) Cave[y][x+1] = Yacid_splash_eB;
-                       if(Cave[y][x-1] == Xblank) Cave[y][x-1] = Yacid_splash_wB;
-                       Next[y][x] = Xblank;
-                       PLAY(SAMPLE_acid);
-                       goto loop;
-               case Xblank:
-               case Yacid_splash_eB:
-               case Yacid_splash_wB:
-                       Cave[y][x] = Ybomb_sB;
-                       Cave[y+1][x] = Ybomb_s;
-                       Next[y][x] = Xblank;
-                       Next[y+1][x] = Xbomb_fall;
-                       goto loop;
-               default:
-                       Cave[y][x] = Xbomb;
-                       Next[y][x] = Xbomb;
-                       goto loop;
-               }
-/* ---------------------------------------------------------------------- */
-       case Xbomb_fall:
-               switch(Cave[y+1][x]) {
-               case Xacid_1:
-               case Xacid_2:
-               case Xacid_3:
-               case Xacid_4:
-               case Xacid_5:
-               case Xacid_6:
-               case Xacid_7:
-               case Xacid_8:
-                       Cave[y][x] = Ybomb_sB;
-                       if(Cave[y][x+1] == Xblank) Cave[y][x+1] = Yacid_splash_eB;
-                       if(Cave[y][x-1] == Xblank) Cave[y][x-1] = Yacid_splash_wB;
-                       Next[y][x] = Xblank;
-                       PLAY(SAMPLE_acid);
-                       goto loop;
-               case Xblank:
-               case Yacid_splash_eB:
-               case Yacid_splash_wB:
-                       Cave[y][x] = Ybomb_sB;
-                       Cave[y+1][x] = Ybomb_s;
-                       Next[y][x] = Xblank;
-                       Next[y+1][x] = Xbomb_fall;
-                       goto loop;
-               default:
-                       Cave[y][x] = Ybomb_eat;
-                       Next[y][x] = Znormal;
-                       Boom[y-1][x-1] = Xblank;
-                       Boom[y-1][x] = Xblank;
-                       Boom[y-1][x+1] = Xblank;
-                       Boom[y][x-1] = Xblank;
-                       Boom[y][x] = Xblank;
-                       Boom[y][x+1] = Xblank;
-                       Boom[y+1][x-1] = Xblank;
-                       Boom[y+1][x] = Xblank;
-                       Boom[y+1][x+1] = Xblank;
-                       goto loop;
-               }
-/* ---------------------------------------------------------------------- */
-       case Xballoon:
-               if(lev.wind_cnt == 0) goto loop;
-               switch(lev.wind_direction) {
-               case 0: /* north */
-                       switch(Cave[y-1][x]) {
-                       case Xacid_1:
-                       case Xacid_2:
-                       case Xacid_3:
-                       case Xacid_4:
-                       case Xacid_5:
-                       case Xacid_6:
-                       case Xacid_7:
-                       case Xacid_8:
-                               Cave[y][x] = Yballoon_nB;
-                               if(Cave[y-2][x+1] == Xblank) Cave[y-2][x+1] = Yacid_splash_eB;
-                               if(Cave[y-2][x-1] == Xblank) Cave[y-2][x-1] = Yacid_splash_wB;
-                               Next[y][x] = Xblank;
-                               PLAY(SAMPLE_acid);
-                               goto loop;
-                       case Xblank:
-                       case Yacid_splash_eB:
-                       case Yacid_splash_wB:
-                               Cave[y][x] = Yballoon_nB;
-                               Cave[y-1][x] = Yballoon_n;
-                               Next[y][x] = Xblank;
-                               Next[y-1][x] = Xballoon;
-                               goto loop;
-                       default:
-                               goto loop;
-                       }
-               case 1: /* east */
-                       switch(Cave[y][x+1]) {
-                       case Xacid_1:
-                       case Xacid_2:
-                       case Xacid_3:
-                       case Xacid_4:
-                       case Xacid_5:
-                       case Xacid_6:
-                       case Xacid_7:
-                       case Xacid_8:
-                               Cave[y][x] = Yballoon_eB;
-                               if(Cave[y-1][x+2] == Xblank) Cave[y-1][x+2] = Yacid_splash_eB;
-                               if(Cave[y-1][x] == Xblank) Cave[y-1][x] = Yacid_splash_wB;
-                               Next[y][x] = Xblank;
-                               PLAY(SAMPLE_acid);
-                               goto loop;
-                       case Xblank:
-                       case Yacid_splash_eB:
-                       case Yacid_splash_wB:
-                               Cave[y][x] = Yballoon_eB;
-                               Cave[y][x+1] = Yballoon_e;
-                               Next[y][x] = Xblank;
-                               Next[y][x+1] = Xballoon;
-                               goto loop;
-                       default:
-                               goto loop;
-                       }
-               case 2: /* south */
-                       switch(Cave[y+1][x]) {
-                       case Xacid_1:
-                       case Xacid_2:
-                       case Xacid_3:
-                       case Xacid_4:
-                       case Xacid_5:
-                       case Xacid_6:
-                       case Xacid_7:
-                       case Xacid_8:
-                               Cave[y][x] = Yballoon_sB;
-                               if(Cave[y][x+1] == Xblank) Cave[y][x+1] = Yacid_splash_eB;
-                               if(Cave[y][x-1] == Xblank) Cave[y][x-1] = Yacid_splash_wB;
-                               Next[y][x] = Xblank;
-                               PLAY(SAMPLE_acid);
-                               goto loop;
-                       case Xblank:
-                       case Yacid_splash_eB:
-                       case Yacid_splash_wB:
-                               Cave[y][x] = Yballoon_sB;
-                               Cave[y+1][x] = Yballoon_s;
-                               Next[y][x] = Xblank;
-                               Next[y+1][x] = Xballoon;
-                               goto loop;
-                       default:
-                               goto loop;
-                       }
-               case 3: /* west */
-                       switch(Cave[y][x-1]) {
-                       case Xacid_1:
-                       case Xacid_2:
-                       case Xacid_3:
-                       case Xacid_4:
-                       case Xacid_5:
-                       case Xacid_6:
-                       case Xacid_7:
-                       case Xacid_8:
-                               Cave[y][x] = Yballoon_wB;
-                               if(Cave[y-1][x] == Xblank) Cave[y-1][x] = Yacid_splash_eB;
-                               if(Cave[y-1][x-2] == Xblank) Cave[y-1][x-2] = Yacid_splash_wB;
-                               Next[y][x] = Xblank;
-                               PLAY(SAMPLE_acid);
-                               goto loop;
-                       case Xblank:
-                       case Yacid_splash_eB:
-                       case Yacid_splash_wB:
-                               Cave[y][x] = Yballoon_wB;
-                               Cave[y][x-1] = Yballoon_w;
-                               Next[y][x] = Xblank;
-                               Next[y][x-1] = Xballoon;
-                               goto loop;
-                       default:
-                               goto loop;
-                       }
-               }
-/* ---------------------------------------------------------------------- */
-       case Xacid_1:
-               Next[y][x] = Xacid_2;
-               goto loop;
-       case Xacid_2:
-               Next[y][x] = Xacid_3;
-               goto loop;
-       case Xacid_3:
-               Next[y][x] = Xacid_4;
-               goto loop;
-       case Xacid_4:
-               Next[y][x] = Xacid_5;
-               goto loop;
-       case Xacid_5:
-               Next[y][x] = Xacid_6;
-               goto loop;
-       case Xacid_6:
-               Next[y][x] = Xacid_7;
-               goto loop;
-       case Xacid_7:
-               Next[y][x] = Xacid_8;
-               goto loop;
-       case Xacid_8:
-               Next[y][x] = Xacid_1;
-               goto loop;
-/* ---------------------------------------------------------------------- */
-       case Xball_1:
-               if(lev.ball_state == 0) goto loop;
-               Cave[y][x] = Xball_1B;
-               Next[y][x] = Xball_2;
-               if(lev.ball_cnt) goto loop;
-               goto ball_common;
-       case Xball_2:
-               if(lev.ball_state == 0) goto loop;
-               Cave[y][x] = Xball_2B;
-               Next[y][x] = Xball_1;
-               if(lev.ball_cnt) goto loop;
-               goto ball_common;
-       ball_common:
-               play[SAMPLE_ball] = 1;
-               if(lev.ball_random) {
-                       switch(RANDOM & 7) {
-                       case 0:
-                               if(lev.ball_array[lev.ball_pos][0] != Xblank && tab_blank[Cave[y-1][x-1]]) {
-                                       Cave[y-1][x-1] = Yball_eat;
-                                       Next[y-1][x-1] = lev.ball_array[lev.ball_pos][0];
-                               }
-                               break;
-                       case 1:
-                               if(lev.ball_array[lev.ball_pos][1] != Xblank && tab_blank[Cave[y-1][x]]) {
-                                       Cave[y-1][x] = Yball_eat;
-                                       Next[y-1][x] = lev.ball_array[lev.ball_pos][1];
-                               }
-                               break;
-                       case 2:
-                               if(lev.ball_array[lev.ball_pos][2] != Xblank && tab_blank[Cave[y-1][x+1]]) {
-                                       Cave[y-1][x+1] = Yball_eat;
-                                       Next[y-1][x+1] = lev.ball_array[lev.ball_pos][2];
-                               }
-                               break;
-                       case 3:
-                               if(lev.ball_array[lev.ball_pos][3] != Xblank && tab_blank[Cave[y][x-1]]) {
-                                       Cave[y][x-1] = Yball_eat;
-                                       Next[y][x-1] = lev.ball_array[lev.ball_pos][3];
-                               }
-                               break;
-                       case 4:
-                               if(lev.ball_array[lev.ball_pos][4] != Xblank && tab_blank[Cave[y][x+1]]) {
-                                       Cave[y][x+1] = Yball_eat;
-                                       Next[y][x+1] = lev.ball_array[lev.ball_pos][4];
-                               }
-                               break;
-                       case 5:
-                               if(lev.ball_array[lev.ball_pos][5] != Xblank && tab_blank[Cave[y+1][x-1]]) {
-                                       Cave[y+1][x-1] = Yball_eat;
-                                       Next[y+1][x-1] = lev.ball_array[lev.ball_pos][5];
-                               }
-                               break;
-                       case 6:
-                               if(lev.ball_array[lev.ball_pos][6] != Xblank && tab_blank[Cave[y+1][x]]) {
-                                       Cave[y+1][x] = Yball_eat;
-                                       Next[y+1][x] = lev.ball_array[lev.ball_pos][6];
-                               }
-                               break;
-                       case 7:
-                               if(lev.ball_array[lev.ball_pos][7] != Xblank && tab_blank[Cave[y+1][x+1]]) {
-                                       Cave[y+1][x+1] = Yball_eat;
-                                       Next[y+1][x+1] = lev.ball_array[lev.ball_pos][7];
-                               }
-                               break;
-                       }
-               } else {
-                       if(lev.ball_array[lev.ball_pos][0] != Xblank && tab_blank[Cave[y-1][x-1]]) {
-                               Cave[y-1][x-1] = Yball_eat;
-                               Next[y-1][x-1] = lev.ball_array[lev.ball_pos][0];
-                       }
-                       if(lev.ball_array[lev.ball_pos][1] != Xblank && tab_blank[Cave[y-1][x]]) {
-                               Cave[y-1][x] = Yball_eat;
-                               Next[y-1][x] = lev.ball_array[lev.ball_pos][1];
-                       }
-                       if(lev.ball_array[lev.ball_pos][2] != Xblank && tab_blank[Cave[y-1][x+1]]) {
-                               Cave[y-1][x+1] = Yball_eat;
-                               Next[y-1][x+1] = lev.ball_array[lev.ball_pos][2];
-                       }
-                       if(lev.ball_array[lev.ball_pos][3] != Xblank && tab_blank[Cave[y][x-1]]) {
-                               Cave[y][x-1] = Yball_eat;
-                               Next[y][x-1] = lev.ball_array[lev.ball_pos][3];
-                       }
-                       if(lev.ball_array[lev.ball_pos][4] != Xblank && tab_blank[Cave[y][x+1]]) {
-                               Cave[y][x+1] = Yball_eat;
-                               Next[y][x+1] = lev.ball_array[lev.ball_pos][4];
-                       }
-                       if(lev.ball_array[lev.ball_pos][5] != Xblank && tab_blank[Cave[y+1][x-1]]) {
-                               Cave[y+1][x-1] = Yball_eat;
-                               Next[y+1][x-1] = lev.ball_array[lev.ball_pos][5];
-                       }
-                       if(lev.ball_array[lev.ball_pos][6] != Xblank && tab_blank[Cave[y+1][x]]) {
-                               Cave[y+1][x] = Yball_eat;
-                               Next[y+1][x] = lev.ball_array[lev.ball_pos][6];
-                       }
-                       if(lev.ball_array[lev.ball_pos][7] != Xblank && tab_blank[Cave[y+1][x+1]]) {
-                               Cave[y+1][x+1] = Yball_eat;
-                               Next[y+1][x+1] = lev.ball_array[lev.ball_pos][7];
-                       }
-               }
-               lev.ball_pos = (lev.ball_pos + 1) & 7;
-               goto loop;
-/* ---------------------------------------------------------------------- */
-       case Xgrow_ns:
-               if(tab_blank[Cave[y-1][x]]) {
-                       Cave[y-1][x] = Ygrow_ns_eat;
-                       Next[y-1][x] = Xgrow_ns;
-                       play[SAMPLE_grow] = 1;
-               }
-               if(tab_blank[Cave[y+1][x]]) {
-                       Cave[y+1][x] = Ygrow_ns_eat;
-                       Next[y+1][x] = Xgrow_ns;
-                       play[SAMPLE_grow] = 1;
-               }
-               goto loop;
-       case Xgrow_ew:
-               if(tab_blank[Cave[y][x+1]]) {
-                       Cave[y][x+1] = Ygrow_ew_eat;
-                       Next[y][x+1] = Xgrow_ew;
-                       play[SAMPLE_grow] = 1;
-               }
-               if(tab_blank[Cave[y][x-1]]) {
-                       Cave[y][x-1] = Ygrow_ew_eat;
-                       Next[y][x-1] = Xgrow_ew;
-                       play[SAMPLE_grow] = 1;
-               }
-               goto loop;
-/* ---------------------------------------------------------------------- */
-       case Xwonderwall:
-               if(lev.wonderwall_time && lev.wonderwall_state) {
-                       Cave[y][x] = XwonderwallB;
-                       play[SAMPLE_wonder] = 1;
-               }
-               goto loop;
-/* ---------------------------------------------------------------------- */
-       case Xexit:
-               if(lev.required > 0) goto loop;
-               temp = RANDOM & 63;
-               if(temp < 21) {
-                       Cave[y][x] = Xexit_1;
-                       Next[y][x] = Xexit_2;
-               } else if(temp < 42) {
-                       Cave[y][x] = Xexit_2;
-                       Next[y][x] = Xexit_3;
-               } else {
-                       Cave[y][x] = Xexit_3;
-                       Next[y][x] = Xexit_1;
-               }
-               goto loop;
-       case Xexit_1:
-               Next[y][x] = Xexit_2;
-               goto loop;
-       case Xexit_2:
-               Next[y][x] = Xexit_3;
-               goto loop;
-       case Xexit_3:
-               Next[y][x] = Xexit_1;
-               goto loop;
-/* ---------------------------------------------------------------------- */
-       case Xdynamite_1:
-               play[SAMPLE_tick] = 1;
-               Next[y][x] = Xdynamite_2;
-               goto loop;
-       case Xdynamite_2:
-               play[SAMPLE_tick] = 1;
-               Next[y][x] = Xdynamite_3;
-               goto loop;
-       case Xdynamite_3:
-               play[SAMPLE_tick] = 1;
-               Next[y][x] = Xdynamite_4;
-               goto loop;
-       case Xdynamite_4:
-               play[SAMPLE_tick] = 1;
-               Next[y][x] = Zdynamite;
-               Boom[y-1][x-1] = Xblank;
-               Boom[y-1][x] = Xblank;
-               Boom[y-1][x+1] = Xblank;
-               Boom[y][x-1] = Xblank;
-               Boom[y][x] = Xblank;
-               Boom[y][x+1] = Xblank;
-               Boom[y+1][x-1] = Xblank;
-               Boom[y+1][x] = Xblank;
-               Boom[y+1][x+1] = Xblank;
-               goto loop;
-/* ---------------------------------------------------------------------- */
-       case Xwheel:
-               if(lev.wheel_cnt && x == lev.wheel_x && y == lev.wheel_y) Cave[y][x] = XwheelB;
-               goto loop;
-/* ---------------------------------------------------------------------- */
-       case Xswitch:
-               if(lev.ball_state) Cave[y][x] = XswitchB;
-               goto loop;
-/* ---------------------------------------------------------------------- */
-       case Xsand_stone:
-               switch(Cave[y+1][x]) {
-               case Xacid_1:
-               case Xacid_2:
-               case Xacid_3:
-               case Xacid_4:
-               case Xacid_5:
-               case Xacid_6:
-               case Xacid_7:
-               case Xacid_8:
-                       Cave[y][x] = Xsand_stonesand_3;
-                       if(Cave[y][x+1] == Xblank) Cave[y][x+1] = Yacid_splash_eB;
-                       if(Cave[y][x-1] == Xblank) Cave[y][x-1] = Yacid_splash_wB;
-                       Next[y][x] = Xsand_stonesand_4;
-                       PLAY(SAMPLE_acid);
-                       goto loop;
-               case Xblank:
-               case Yacid_splash_eB:
-               case Yacid_splash_wB:
-                       Cave[y][x] = Xsand_stonesand_3;
-                       Cave[y+1][x] = Xsand_stoneout_1;
-                       Next[y][x] = Xsand_stonesand_4;
-                       Next[y+1][x] = Xsand_stoneout_2;
-                       goto loop;
-               case Xsand:
-                       Cave[y][x] = Xsand_stonesand_1;
-                       Cave[y+1][x] = Xsand_sandstone_1;
-                       Next[y][x] = Xsand_stonesand_2;
-                       Next[y+1][x] = Xsand_sandstone_2;
-                       goto loop;
-               default:
-                       goto loop;
-               }
-       case Xsand_stonein_1:
-               Next[y][x] = Xsand_stonein_2;
-               goto loop;
-       case Xsand_stonein_2:
-               Next[y][x] = Xsand_stonein_3;
-               goto loop;
-       case Xsand_stonein_3:
-               Next[y][x] = Xsand_stonein_4;
-               goto loop;
-       case Xsand_stonein_4:
-               Next[y][x] = Xblank;
-               goto loop;
-       case Xsand_stonesand_1:
-               Next[y][x] = Xsand_stonesand_2;
-               goto loop;
-       case Xsand_stonesand_2:
-               Next[y][x] = Xsand_stonesand_3;
-               goto loop;
-       case Xsand_stonesand_3:
-               Next[y][x] = Xsand_stonesand_4;
-               goto loop;
-       case Xsand_stonesand_4:
-               Next[y][x] = Xsand;
-               goto loop;
-       case Xsand_stoneout_1:
-               Next[y][x] = Xsand_stoneout_2;
-               goto loop;
-       case Xsand_stoneout_2:
-               Next[y][x] = Xstone_fall;
-               goto loop;
-       case Xsand_sandstone_1:
-               Next[y][x] = Xsand_sandstone_2;
-               goto loop;
-       case Xsand_sandstone_2:
-               Next[y][x] = Xsand_sandstone_3;
-               goto loop;
-       case Xsand_sandstone_3:
-               Next[y][x] = Xsand_sandstone_4;
-               goto loop;
-       case Xsand_sandstone_4:
-               Next[y][x] = Xsand_stone;
-               goto loop;
-/* ---------------------------------------------------------------------- */
-       case Xdripper:
-               if(lev.lenses_cnt) Cave[y][x] = XdripperB;
-               goto loop;
-/* ---------------------------------------------------------------------- */
-       case Xfake_blank:
-               if(lev.lenses_cnt) Cave[y][x] = Xfake_blankB;
-               goto loop;
-/* ---------------------------------------------------------------------- */
-       case Xfake_grass:
-               if(lev.magnify_cnt) Cave[y][x] = Xfake_grassB;
-               goto loop;
-/* ---------------------------------------------------------------------- */
-       case Xfake_door_1:
-               if(lev.magnify_cnt) Cave[y][x] = Xdoor_1;
-               goto loop;
-       case Xfake_door_2:
-               if(lev.magnify_cnt) Cave[y][x] = Xdoor_2;
-               goto loop;
-       case Xfake_door_3:
-               if(lev.magnify_cnt) Cave[y][x] = Xdoor_3;
-               goto loop;
-       case Xfake_door_4:
-               if(lev.magnify_cnt) Cave[y][x] = Xdoor_4;
-               goto loop;
-       case Xfake_door_5:
-               if(lev.magnify_cnt) Cave[y][x] = Xdoor_5;
-               goto loop;
-       case Xfake_door_6:
-               if(lev.magnify_cnt) Cave[y][x] = Xdoor_6;
-               goto loop;
-       case Xfake_door_7:
-               if(lev.magnify_cnt) Cave[y][x] = Xdoor_7;
-               goto loop;
-       case Xfake_door_8:
-               if(lev.magnify_cnt) Cave[y][x] = Xdoor_8;
-               goto loop;
-/* ---------------------------------------------------------------------- */
-       case Xboom_bug:
-       bug_boom:
-               Next[y][x] = Znormal;
-               Boom[y-1][x-1] = Xemerald;
-               Boom[y-1][x] = Xemerald;
-               Boom[y-1][x+1] = Xemerald;
-               Boom[y][x-1] = Xemerald;
-               Boom[y][x] = Xdiamond;
-               Boom[y][x+1] = Xemerald;
-               Boom[y+1][x-1] = Xemerald;
-               Boom[y+1][x] = Xemerald;
-               Boom[y+1][x+1] = Xemerald;
-               goto loop;
-       case Xboom_bomb:
-       tank_boom:
-               Next[y][x] = Znormal;
-               Boom[y-1][x-1] = Xblank;
-               Boom[y-1][x] = Xblank;
-               Boom[y-1][x+1] = Xblank;
-               Boom[y][x-1] = Xblank;
-               Boom[y][x] = Xblank;
-               Boom[y][x+1] = Xblank;
-               Boom[y+1][x-1] = Xblank;
-               Boom[y+1][x] = Xblank;
-               Boom[y+1][x+1] = Xblank;
-               goto loop;
-       case Xboom_android:
-       case Xboom_1:
-               Next[y][x] = Xboom_2;
-               play[SAMPLE_boom] = 1;
-               goto loop;
-       case Xboom_2:
-               Next[y][x] = Boom[y][x];
-               goto loop;
-/* ---------------------------------------------------------------------- */
-       case ZBORDER:
-               if(++y < HEIGHT - 1) {
-                       x = 0;
-                       cave_cache = Cave[y];
-                       goto loop;
-               }
-               goto done;
-       }
+         Next[y][x-1] = Xspring_w;
+#else  
+         Next[y][x-1] = Xspring_pause;
+#endif 
+         goto loop;
+       }
 
-#undef RANDOM
-#undef PLAY
-#undef PLAY_FORCE
+    case Xemerald_force_e:
+      switch (Cave[y][x+1])
+      {
+       case ZBORDER:
+       case Znormal:
+       case Zdynamite:
+       case Xboom_bug:
+       case Xboom_bomb:
+       case Xboom_android:
+       case Xboom_1:
+       case Zplayer:
+         Cave[y][x] = Xemerald;
+         Next[y][x] = Xemerald;
+         goto loop;
+
+       default:
+         Cave[y][x] = Yemerald_eB;
+         Cave[y][x+1] = Yemerald_e;
+         Next[y][x] = Xblank;
+         Next[y][x+1] = Xemerald_pause;
+         goto loop;
+       }
+
+    case Xemerald_force_w:
+      switch (Cave[y][x-1])
+      {
+       case ZBORDER:
+       case Znormal:
+       case Zdynamite:
+       case Xboom_bug:
+       case Xboom_bomb:
+       case Xboom_android:
+       case Xboom_1:
+       case Zplayer:
+         Cave[y][x] = Xemerald;
+         Next[y][x] = Xemerald;
+         goto loop;
+
+       default:
+         Cave[y][x] = Yemerald_wB;
+         Cave[y][x-1] = Yemerald_w;
+         Next[y][x] = Xblank;
+         Next[y][x-1] = Xemerald_pause;
+         goto loop;
+       }
+
+    case Xdiamond_force_e:
+      switch (Cave[y][x+1])
+      {
+       case ZBORDER:
+       case Znormal:
+       case Zdynamite:
+       case Xboom_bug:
+       case Xboom_bomb:
+       case Xboom_android:
+       case Xboom_1:
+       case Zplayer:
+         Cave[y][x] = Xdiamond;
+         Next[y][x] = Xdiamond;
+         goto loop;
+
+       default:
+         Cave[y][x] = Ydiamond_eB;
+         Cave[y][x+1] = Ydiamond_e;
+         Next[y][x] = Xblank;
+         Next[y][x+1] = Xdiamond_pause;
+         goto loop;
+       }
+
+    case Xdiamond_force_w:
+      switch (Cave[y][x-1])
+      {
+       case ZBORDER:
+       case Znormal:
+       case Zdynamite:
+       case Xboom_bug:
+       case Xboom_bomb:
+       case Xboom_android:
+       case Xboom_1:
+       case Zplayer:
+         Cave[y][x] = Xdiamond;
+         Next[y][x] = Xdiamond;
+         goto loop;
+
+       default:
+         Cave[y][x] = Ydiamond_wB;
+         Cave[y][x-1] = Ydiamond_w;
+         Next[y][x] = Xblank;
+         Next[y][x-1] = Xdiamond_pause;
+         goto loop;
+       }
+
+    case Xbomb_force_e:
+      switch (Cave[y][x+1])
+      {
+       case ZBORDER:
+       case Znormal:
+       case Zdynamite:
+       case Xboom_bug:
+       case Xboom_bomb:
+       case Xboom_android:
+       case Xboom_1:
+       case Zplayer:
+         Cave[y][x] = Xbomb;
+         Next[y][x] = Xbomb;
+         goto loop;
+
+       default:
+         Cave[y][x] = Ybomb_eB;
+         Cave[y][x+1] = Ybomb_e;
+         Next[y][x] = Xblank;
+         Next[y][x+1] = Xbomb_pause;
+         goto loop;
+       }
+
+    case Xbomb_force_w:
+      switch (Cave[y][x-1])
+      {
+       case ZBORDER:
+       case Znormal:
+       case Zdynamite:
+       case Xboom_bug:
+       case Xboom_bomb:
+       case Xboom_android:
+       case Xboom_1:
+       case Zplayer:
+         Cave[y][x] = Xbomb;
+         Next[y][x] = Xbomb;
+         goto loop;
+
+       default:
+         Cave[y][x] = Ybomb_wB;
+         Cave[y][x-1] = Ybomb_w;
+         Next[y][x] = Xblank;
+         Next[y][x-1] = Xbomb_pause;
+         goto loop;
+       }
+#endif /* BAD_ROLL */
+
+    /* --------------------------------------------------------------------- */
+
+    case Xstone:
+      switch (Cave[y+1][x])
+      {
+       case Xacid_1:
+       case Xacid_2:
+       case Xacid_3:
+       case Xacid_4:
+       case Xacid_5:
+       case Xacid_6:
+       case Xacid_7:
+       case Xacid_8:
+         Cave[y][x] = Ystone_sB;
+         if (Cave[y][x+1] == Xblank)
+           Cave[y][x+1] = Yacid_splash_eB;
+         if (Cave[y][x-1] == Xblank)
+           Cave[y][x-1] = Yacid_splash_wB;
+         Next[y][x] = Xblank;
+         PLAY(SAMPLE_acid);
+         goto loop;
+
+       case Xblank:
+       case Yacid_splash_eB:
+       case Yacid_splash_wB:
+       case Xplant:
+       case Yplant:
+         Cave[y][x] = Ystone_sB;
+         Cave[y+1][x] = Ystone_s;
+         Next[y][x] = Xblank;
+         Next[y+1][x] = Xstone_fall;
+         goto loop;
+
+       case Xsand:
+         Cave[y][x] = Xsand_stonein_1;
+         Cave[y+1][x] = Xsand_sandstone_1;
+         Next[y][x] = Xsand_stonein_2;
+         Next[y+1][x] = Xsand_sandstone_2;
+         goto loop;
+
+        case Xspring:
+       case Xspring_pause:
+       case Xspring_e:
+       case Xspring_w:
+       case Xandroid:
+       case Xandroid_1_n:
+       case Xandroid_2_n:
+       case Xandroid_1_e:
+       case Xandroid_2_e:
+       case Xandroid_1_s:
+       case Xandroid_2_s:
+       case Xandroid_1_w:
+       case Xandroid_2_w:
+       case Xstone:
+       case Xstone_pause:
+       case Xemerald:
+       case Xemerald_pause:
+       case Xdiamond:
+       case Xdiamond_pause:
+       case Xbomb:
+       case Xbomb_pause:
+       case Xballoon:
+       case Xacid_ne:
+       case Xacid_nw:
+       case Xball_1:
+       case Xball_2:
+       case Xnut:
+       case Xnut_pause:
+       case Xgrow_ns:
+       case Xgrow_ew:
+       case Xkey_1:
+       case Xkey_2:
+       case Xkey_3:
+       case Xkey_4:
+       case Xkey_5:
+       case Xkey_6:
+       case Xkey_7:
+       case Xkey_8:
+       case Xbumper:
+       case Xswitch:
+       case Xlenses:
+       case Xmagnify:
+       case Xround_wall_1:
+       case Xround_wall_2:
+       case Xround_wall_3:
+       case Xround_wall_4:
+         if (RANDOM & 1)
+         {
+           if (tab_blank[Cave[y][x+1]] && tab_acid[Cave[y+1][x+1]])
+           {
+             Cave[y][x] = Ystone_eB;
+             Cave[y][x+1] = Ystone_e;
+             Next[y][x] = Xblank;
+             Next[y][x+1] = Xstone_pause;
+             goto loop;
+           }
+
+           if (tab_blank[Cave[y][x-1]] && tab_acid[Cave[y+1][x-1]])
+           {
+             Cave[y][x] = Ystone_wB;
+             Cave[y][x-1] = Ystone_w;
+             Next[y][x] = Xblank;
+             Next[y][x-1] = Xstone_pause;
+             goto loop;
+           }
+         }
+         else
+         {
+           if (tab_blank[Cave[y][x-1]] && tab_acid[Cave[y+1][x-1]])
+           {
+             Cave[y][x] = Ystone_wB;
+             Cave[y][x-1] = Ystone_w;
+             Next[y][x] = Xblank;
+             Next[y][x-1] = Xstone_pause;
+             goto loop;
+           }
+
+           if (tab_blank[Cave[y][x+1]] && tab_acid[Cave[y+1][x+1]])
+           {
+             Cave[y][x] = Ystone_eB;
+             Cave[y][x+1] = Ystone_e;
+             Next[y][x] = Xblank;
+             Next[y][x+1] = Xstone_pause;
+             goto loop;
+           }
+         }
+
+        default:
+         goto loop;
+      }
+
+    /* --------------------------------------------------------------------- */
+
+    case Xstone_pause:
+      switch (Cave[y+1][x])
+      {
+       case Xacid_1:
+       case Xacid_2:
+       case Xacid_3:
+       case Xacid_4:
+       case Xacid_5:
+       case Xacid_6:
+       case Xacid_7:
+       case Xacid_8:
+         Cave[y][x] = Ystone_sB;
+         if (Cave[y][x+1] == Xblank)
+           Cave[y][x+1] = Yacid_splash_eB;
+         if (Cave[y][x-1] == Xblank)
+           Cave[y][x-1] = Yacid_splash_wB;
+         Next[y][x] = Xblank;
+         PLAY(SAMPLE_acid);
+         goto loop;
+
+       case Xblank:
+       case Yacid_splash_eB:
+       case Yacid_splash_wB:
+         Cave[y][x] = Ystone_sB;
+         Cave[y+1][x] = Ystone_s;
+         Next[y][x] = Xblank;
+         Next[y+1][x] = Xstone_fall;
+         goto loop;
+
+       default:
+         Cave[y][x] = Xstone;
+         Next[y][x] = Xstone;
+         goto loop;
+       }
+
+    /* --------------------------------------------------------------------- */
+
+    case Xstone_fall:
+      switch (Cave[y+1][x])
+      {
+       case Xacid_1:
+       case Xacid_2:
+       case Xacid_3:
+       case Xacid_4:
+       case Xacid_5:
+       case Xacid_6:
+       case Xacid_7:
+       case Xacid_8:
+         Cave[y][x] = Ystone_sB;
+         if (Cave[y][x+1] == Xblank)
+           Cave[y][x+1] = Yacid_splash_eB;
+         if (Cave[y][x-1] == Xblank)
+           Cave[y][x-1] = Yacid_splash_wB;
+         Next[y][x] = Xblank;
+         PLAY(SAMPLE_acid);
+         goto loop;
+
+       case Xblank:
+       case Yacid_splash_eB:
+       case Yacid_splash_wB:
+       case Zplayer:
+         Cave[y][x] = Ystone_sB;
+         Cave[y+1][x] = Ystone_s;
+         Next[y][x] = Xblank;
+         Next[y+1][x] = Xstone_fall;
+         goto loop;
+
+       case Xnut:
+       case Xnut_pause:
+         Cave[y+1][x] = Yemerald_stone;
+         Next[y][x] = Xstone;
+         Next[y+1][x] = Xemerald;
+         play[SAMPLE_crack] = 1;
+         score += lev.nut_score;
+         goto loop;
+
+       case Xbug_n:
+       case Xbug_e:
+       case Xbug_s:
+       case Xbug_w:
+       case Xbug_gon:
+       case Xbug_goe:
+       case Xbug_gos:
+       case Xbug_gow:
+         Cave[y][x] = Ystone_sB;
+         Cave[y+1][x] = Ybug_stone;
+         Next[y+1][x] = Znormal;
+         Boom[y][x-1] = Xemerald;
+         Boom[y][x] = Xemerald;
+         Boom[y][x+1] = Xemerald;
+         Boom[y+1][x-1] = Xemerald;
+         Boom[y+1][x] = Xdiamond;
+         Boom[y+1][x+1] = Xemerald;
+         Boom[y+2][x-1] = Xemerald;
+         Boom[y+2][x] = Xemerald;
+         Boom[y+2][x+1] = Xemerald;
+         score += lev.bug_score;
+         goto loop;
+
+       case Xtank_n:
+       case Xtank_e:
+       case Xtank_s:
+       case Xtank_w:
+       case Xtank_gon:
+       case Xtank_goe:
+       case Xtank_gos:
+       case Xtank_gow:
+         Cave[y][x] = Ystone_sB;
+         Cave[y+1][x] = Ytank_stone;
+         Next[y+1][x] = Znormal;
+         Boom[y][x-1] = Xblank;
+         Boom[y][x] = Xblank;
+         Boom[y][x+1] = Xblank;
+         Boom[y+1][x-1] = Xblank;
+         Boom[y+1][x] = Xblank;
+         Boom[y+1][x+1] = Xblank;
+         Boom[y+2][x-1] = Xblank;
+         Boom[y+2][x] = Xblank;
+         Boom[y+2][x+1] = Xblank;
+         score += lev.tank_score;
+         goto loop;
+
+       case Xspring:
+         if (RANDOM & 1)
+         {
+           switch (Cave[y+1][x+1])
+           {
+             case Xblank:
+             case Yacid_splash_eB:
+             case Yacid_splash_wB:
+             case Xalien:
+             case Xalien_pause:
+               Cave[y+1][x] = Xspring_e;
+               break;
+
+             default:
+               Cave[y+1][x] = Xspring_w;
+               break;
+           }
+         }
+         else
+         {
+           switch (Cave[y+1][x-1])
+           {
+             case Xblank:
+             case Yacid_splash_eB:
+             case Yacid_splash_wB:
+             case Xalien:
+             case Xalien_pause:
+               Cave[y+1][x] = Xspring_w;
+               break;
+             default:
+               Cave[y+1][x] = Xspring_e;
+               break;
+           }
+         }
+
+         Next[y][x] = Xstone;
+         goto loop;
+
+       case Xeater_n:
+       case Xeater_e:
+       case Xeater_s:
+       case Xeater_w:
+         Cave[y][x] = Ystone_sB;
+         Cave[y+1][x] = Yeater_stone;
+         Next[y+1][x] = Znormal;
+         Boom[y][x-1] = lev.eater_array[lev.eater_pos][0];
+         Boom[y][x] = lev.eater_array[lev.eater_pos][1];
+         Boom[y][x+1] = lev.eater_array[lev.eater_pos][2];
+         Boom[y+1][x-1] = lev.eater_array[lev.eater_pos][3];
+         Boom[y+1][x] = lev.eater_array[lev.eater_pos][4];
+         Boom[y+1][x+1] = lev.eater_array[lev.eater_pos][5];
+         Boom[y+2][x-1] = lev.eater_array[lev.eater_pos][6];
+         Boom[y+2][x] = lev.eater_array[lev.eater_pos][7];
+         Boom[y+2][x+1] = lev.eater_array[lev.eater_pos][8];
+         lev.eater_pos = (lev.eater_pos + 1) & 7;
+         score += lev.eater_score;
+         goto loop;
+
+       case Xalien:
+       case Xalien_pause:
+         Cave[y][x] = Ystone_sB;
+         Cave[y+1][x] = Yalien_stone;
+         Next[y+1][x] = Znormal;
+         Boom[y][x-1] = Xblank;
+         Boom[y][x] = Xblank;
+         Boom[y][x+1] = Xblank;
+         Boom[y+1][x-1] = Xblank;
+         Boom[y+1][x] = Xblank;
+         Boom[y+1][x+1] = Xblank;
+         Boom[y+2][x-1] = Xblank;
+         Boom[y+2][x] = Xblank;
+         Boom[y+2][x+1] = Xblank;
+         score += lev.alien_score;
+         goto loop;
+
+       case Xdiamond:
+       case Xdiamond_pause:
+         switch (Cave[y+2][x])
+         {
+           case Xblank:
+           case Yacid_splash_eB:
+           case Yacid_splash_wB:
+           case Zplayer:
+           case Xbug_n:
+           case Xbug_e:
+           case Xbug_s:
+           case Xbug_w:
+           case Xbug_gon:
+           case Xbug_goe:
+           case Xbug_gos:
+           case Xbug_gow:
+           case Xtank_n:
+           case Xtank_e:
+           case Xtank_s:
+           case Xtank_w:
+           case Xtank_gon:
+           case Xtank_goe:
+           case Xtank_gos:
+           case Xtank_gow:
+           case Xspring_fall:
+           case Xandroid:
+           case Xandroid_1_n:
+           case Xandroid_2_n:
+           case Xandroid_1_e:
+           case Xandroid_2_e:
+           case Xandroid_1_s:
+           case Xandroid_2_s:
+           case Xandroid_1_w:
+           case Xandroid_2_w:
+           case Xstone_fall:
+           case Xemerald_fall:
+           case Xdiamond_fall:
+           case Xbomb_fall:
+           case Xacid_s:
+           case Xacid_1:
+           case Xacid_2:
+           case Xacid_3:
+           case Xacid_4:
+           case Xacid_5:
+           case Xacid_6:
+           case Xacid_7:
+           case Xacid_8:
+           case Xnut_fall:
+           case Xplant:
+           case Yplant:
+             Next[y][x] = Xstone;
+             PLAY(SAMPLE_stone);
+             goto loop;
+         }
+
+         Cave[y][x] = Ystone_sB;
+         Cave[y+1][x] = Ydiamond_stone;
+         Next[y][x] = Xblank;
+         Next[y+1][x] = Xstone_pause;
+         play[SAMPLE_squash] = 1;
+         goto loop;
+
+       case Xbomb:
+       case Xbomb_pause:
+         Cave[y+1][x] = Ybomb_eat;
+         Next[y+1][x] = Znormal;
+         Boom[y][x-1] = Xblank;
+         Boom[y][x] = Xblank;
+         Boom[y][x+1] = Xblank;
+         Boom[y+1][x-1] = Xblank;
+         Boom[y+1][x] = Xblank;
+         Boom[y+1][x+1] = Xblank;
+         Boom[y+2][x-1] = Xblank;
+         Boom[y+2][x] = Xblank;
+         Boom[y+2][x+1] = Xblank;
+         goto loop;
+
+       case Xwonderwall:
+         if (lev.wonderwall_time)
+         {
+           lev.wonderwall_state = 1;
+           Cave[y][x] = Ystone_sB;
+
+           if (tab_blank[Cave[y+2][x]])
+           {
+             Cave[y+2][x] = Yemerald_s;
+             Next[y+2][x] = Xemerald_fall;
+           }
+
+           Next[y][x] = Xblank;
+           play[SAMPLE_squash] = 1;
+           goto loop;
+         }
+
+       default:
+         Cave[y][x] = Xstone;
+         Next[y][x] = Xstone;
+         PLAY(SAMPLE_stone);
+         goto loop;
+      }
+
+    /* --------------------------------------------------------------------- */
+
+    case Xnut:
+      switch (Cave[y+1][x])
+      {
+       case Xacid_1:
+       case Xacid_2:
+       case Xacid_3:
+       case Xacid_4:
+       case Xacid_5:
+       case Xacid_6:
+       case Xacid_7:
+       case Xacid_8:
+         Cave[y][x] = Ynut_sB;
+         if (Cave[y][x+1] == Xblank)
+           Cave[y][x+1] = Yacid_splash_eB;
+         if (Cave[y][x-1] == Xblank)
+           Cave[y][x-1] = Yacid_splash_wB;
+         Next[y][x] = Xblank;
+         PLAY(SAMPLE_acid);
+         goto loop;
+
+       case Xblank:
+       case Yacid_splash_eB:
+       case Yacid_splash_wB:
+         Cave[y][x] = Ynut_sB;
+         Cave[y+1][x] = Ynut_s;
+         Next[y][x] = Xblank;
+         Next[y+1][x] = Xnut_fall;
+         goto loop;
+
+       case Xspring:
+       case Xspring_pause:
+       case Xspring_e:
+       case Xspring_w:
+       case Xandroid:
+       case Xandroid_1_n:
+       case Xandroid_2_n:
+       case Xandroid_1_e:
+       case Xandroid_2_e:
+       case Xandroid_1_s:
+       case Xandroid_2_s:
+       case Xandroid_1_w:
+       case Xandroid_2_w:
+       case Xstone:
+       case Xstone_pause:
+       case Xemerald:
+       case Xemerald_pause:
+       case Xdiamond:
+       case Xdiamond_pause:
+       case Xbomb:
+       case Xbomb_pause:
+       case Xballoon:
+       case Xacid_ne:
+       case Xacid_nw:
+       case Xball_1:
+       case Xball_2:
+       case Xnut:
+       case Xnut_pause:
+       case Xgrow_ns:
+       case Xgrow_ew:
+       case Xkey_1:
+       case Xkey_2:
+       case Xkey_3:
+       case Xkey_4:
+       case Xkey_5:
+       case Xkey_6:
+       case Xkey_7:
+       case Xkey_8:
+       case Xbumper:
+       case Xswitch:
+       case Xround_wall_1:
+       case Xround_wall_2:
+       case Xround_wall_3:
+       case Xround_wall_4:
+         if (RANDOM & 1)
+         {
+           if (tab_blank[Cave[y][x+1]] && tab_acid[Cave[y+1][x+1]])
+           {
+             Cave[y][x] = Ynut_eB;
+             Cave[y][x+1] = Ynut_e;
+             Next[y][x] = Xblank;
+             Next[y][x+1] = Xnut_pause;
+             goto loop;
+           }
+
+           if (tab_blank[Cave[y][x-1]] && tab_acid[Cave[y+1][x-1]])
+           {
+             Cave[y][x] = Ynut_wB;
+             Cave[y][x-1] = Ynut_w;
+             Next[y][x] = Xblank;
+             Next[y][x-1] = Xnut_pause;
+             goto loop;
+           }
+         }
+         else
+         {
+           if (tab_blank[Cave[y][x-1]] && tab_acid[Cave[y+1][x-1]])
+           {
+             Cave[y][x] = Ynut_wB;
+             Cave[y][x-1] = Ynut_w;
+             Next[y][x] = Xblank;
+             Next[y][x-1] = Xnut_pause;
+             goto loop;
+           }
+
+           if (tab_blank[Cave[y][x+1]] && tab_acid[Cave[y+1][x+1]])
+           {
+             Cave[y][x] = Ynut_eB;
+             Cave[y][x+1] = Ynut_e;
+             Next[y][x] = Xblank;
+             Next[y][x+1] = Xnut_pause;
+             goto loop;
+           }
+         }
+
+        default:
+         goto loop;
+      }
+
+    /* --------------------------------------------------------------------- */
+
+
+    case Xnut_pause:
+      switch (Cave[y+1][x])
+      {
+       case Xacid_1:
+       case Xacid_2:
+       case Xacid_3:
+       case Xacid_4:
+       case Xacid_5:
+       case Xacid_6:
+       case Xacid_7:
+       case Xacid_8:
+         Cave[y][x] = Ynut_sB;
+         if (Cave[y][x+1] == Xblank)
+           Cave[y][x+1] = Yacid_splash_eB;
+         if (Cave[y][x-1] == Xblank)
+           Cave[y][x-1] = Yacid_splash_wB;
+         Next[y][x] = Xblank;
+         PLAY(SAMPLE_acid);
+         goto loop;
+
+       case Xblank:
+       case Yacid_splash_eB:
+       case Yacid_splash_wB:
+         Cave[y][x] = Ynut_sB;
+         Cave[y+1][x] = Ynut_s;
+         Next[y][x] = Xblank;
+         Next[y+1][x] = Xnut_fall;
+         goto loop;
+
+       default:
+         Cave[y][x] = Xnut;
+         Next[y][x] = Xnut;
+         goto loop;
+      }
+
+    /* --------------------------------------------------------------------- */
+
+    case Xnut_fall:
+      switch (Cave[y+1][x])
+      {
+       case Xacid_1:
+       case Xacid_2:
+       case Xacid_3:
+       case Xacid_4:
+       case Xacid_5:
+       case Xacid_6:
+       case Xacid_7:
+       case Xacid_8:
+         Cave[y][x] = Ynut_sB;
+         if (Cave[y][x+1] == Xblank)
+           Cave[y][x+1] = Yacid_splash_eB;
+         if (Cave[y][x-1] == Xblank)
+           Cave[y][x-1] = Yacid_splash_wB;
+         Next[y][x] = Xblank;
+         PLAY(SAMPLE_acid);
+         goto loop;
+
+       case Xblank:
+       case Yacid_splash_eB:
+       case Yacid_splash_wB:
+       case Zplayer:
+         Cave[y][x] = Ynut_sB;
+         Cave[y+1][x] = Ynut_s;
+         Next[y][x] = Xblank;
+         Next[y+1][x] = Xnut_fall;
+         goto loop;
+
+       default:
+         Cave[y][x] = Xnut;
+         Next[y][x] = Xnut;
+         PLAY(SAMPLE_nut);
+         goto loop;
+      }
+
+    /* --------------------------------------------------------------------- */
+
+    case Xbug_n:
+      if (tab_ameuba[Cave[y-1][x]] ||
+         tab_ameuba[Cave[y][x+1]] ||
+         tab_ameuba[Cave[y+1][x]] ||
+         tab_ameuba[Cave[y][x-1]])
+       goto bug_boom;
+
+      switch (Cave[y][x+1])
+      {
+       case Xblank:
+       case Yacid_splash_eB:
+       case Yacid_splash_wB:
+       case Xplant:
+       case Yplant:
+       case Xacid_1:
+       case Xacid_2:
+       case Xacid_3:
+       case Xacid_4:
+       case Xacid_5:
+       case Xacid_6:
+       case Xacid_7:
+       case Xacid_8:
+       case Zplayer:
+         Cave[y][x] = Ybug_n_e;
+         Next[y][x] = Xbug_goe;
+         PLAY(SAMPLE_bug);
+         goto loop;
+
+       default:
+         goto bug_gon;
+       }
+
+    case Xbug_gon:
+      if (tab_ameuba[Cave[y-1][x]] ||
+         tab_ameuba[Cave[y][x+1]] ||
+         tab_ameuba[Cave[y+1][x]] ||
+         tab_ameuba[Cave[y][x-1]])
+       goto bug_boom;
+
+    bug_gon:
+
+      switch (Cave[y-1][x])
+      {
+       case Xacid_1:
+       case Xacid_2:
+       case Xacid_3:
+       case Xacid_4:
+       case Xacid_5:
+       case Xacid_6:
+       case Xacid_7:
+       case Xacid_8:
+         Cave[y][x] = Ybug_nB;
+         if (Cave[y-2][x+1] == Xblank)
+           Cave[y-2][x+1] = Yacid_splash_eB;
+         if (Cave[y-2][x-1] == Xblank)
+           Cave[y-2][x-1] = Yacid_splash_wB;
+         Next[y][x] = Xblank;
+         PLAY(SAMPLE_acid);
+         goto loop;
+
+       case Xblank:
+       case Yacid_splash_eB:
+       case Yacid_splash_wB:
+       case Xplant:
+       case Yplant:
+       case Zplayer:
+         Cave[y][x] = Ybug_nB;
+         Cave[y-1][x] = Ybug_n;
+         Next[y][x] = Xblank;
+         Next[y-1][x] = Xbug_n;
+         PLAY(SAMPLE_bug);
+         goto loop;
+
+       default:
+         Cave[y][x] = Ybug_n_w;
+         Next[y][x] = Xbug_gow;
+         PLAY(SAMPLE_bug);
+         goto loop;
+      }
+
+    /* --------------------------------------------------------------------- */
+
+    case Xbug_e:
+      if (tab_ameuba[Cave[y-1][x]] ||
+         tab_ameuba[Cave[y][x+1]] ||
+         tab_ameuba[Cave[y+1][x]] ||
+         tab_ameuba[Cave[y][x-1]])
+       goto bug_boom;
+
+      switch (Cave[y+1][x])
+      {
+       case Xblank:
+       case Yacid_splash_eB:
+       case Yacid_splash_wB:
+       case Xplant:
+       case Yplant:
+       case Xacid_1:
+       case Xacid_2:
+       case Xacid_3:
+       case Xacid_4:
+       case Xacid_5:
+       case Xacid_6:
+       case Xacid_7:
+       case Xacid_8:
+       case Zplayer:
+         Cave[y][x] = Ybug_e_s;
+         Next[y][x] = Xbug_gos;
+         PLAY(SAMPLE_bug);
+         goto loop;
+
+       default:
+         goto bug_goe;
+      }
+
+    case Xbug_goe:
+      if (tab_ameuba[Cave[y-1][x]] ||
+         tab_ameuba[Cave[y][x+1]] ||
+         tab_ameuba[Cave[y+1][x]] ||
+         tab_ameuba[Cave[y][x-1]])
+       goto bug_boom;
+
+    bug_goe:
+
+      switch (Cave[y][x+1])
+      {
+       case Xacid_1:
+       case Xacid_2:
+       case Xacid_3:
+       case Xacid_4:
+       case Xacid_5:
+       case Xacid_6:
+       case Xacid_7:
+       case Xacid_8:
+         Cave[y][x] = Ybug_eB;
+         if (Cave[y-1][x+2] == Xblank)
+           Cave[y-1][x+2] = Yacid_splash_eB;
+         if (Cave[y-1][x] == Xblank)
+           Cave[y-1][x] = Yacid_splash_wB;
+         Next[y][x] = Xblank;
+         PLAY(SAMPLE_acid);
+         goto loop;
+
+       case Xblank:
+       case Yacid_splash_eB:
+       case Yacid_splash_wB:
+       case Xplant:
+       case Yplant:
+       case Zplayer:
+         Cave[y][x] = Ybug_eB;
+         Cave[y][x+1] = Ybug_e;
+         Next[y][x] = Xblank;
+         Next[y][x+1] = Xbug_e;
+         PLAY(SAMPLE_bug);
+         goto loop;
+
+       default:
+         Cave[y][x] = Ybug_e_n;
+         Next[y][x] = Xbug_gon;
+         PLAY(SAMPLE_bug);
+         goto loop;
+      }
+
+    /* --------------------------------------------------------------------- */
+
+    case Xbug_s:
+      if (tab_ameuba[Cave[y-1][x]] ||
+         tab_ameuba[Cave[y][x+1]] ||
+         tab_ameuba[Cave[y+1][x]] ||
+         tab_ameuba[Cave[y][x-1]])
+       goto bug_boom;
+
+      switch (Cave[y][x-1])
+      {
+       case Xblank:
+       case Yacid_splash_eB:
+       case Yacid_splash_wB:
+       case Xplant:
+       case Yplant:
+       case Xacid_1:
+       case Xacid_2:
+       case Xacid_3:
+       case Xacid_4:
+       case Xacid_5:
+       case Xacid_6:
+       case Xacid_7:
+       case Xacid_8:
+       case Zplayer:
+         Cave[y][x] = Ybug_s_w;
+         Next[y][x] = Xbug_gow;
+         PLAY(SAMPLE_bug);
+         goto loop;
+
+       default:
+         goto bug_gos;
+      }
+
+    case Xbug_gos:
+      if (tab_ameuba[Cave[y-1][x]] ||
+         tab_ameuba[Cave[y][x+1]] ||
+         tab_ameuba[Cave[y+1][x]] ||
+         tab_ameuba[Cave[y][x-1]])
+       goto bug_boom;
+
+    bug_gos:
+
+      switch (Cave[y+1][x])
+      {
+       case Xacid_1:
+       case Xacid_2:
+       case Xacid_3:
+       case Xacid_4:
+       case Xacid_5:
+       case Xacid_6:
+       case Xacid_7:
+       case Xacid_8:
+         Cave[y][x] = Ybug_sB;
+         if (Cave[y][x+1] == Xblank)
+           Cave[y][x+1] = Yacid_splash_eB;
+         if (Cave[y][x-1] == Xblank)
+           Cave[y][x-1] = Yacid_splash_wB;
+         Next[y][x] = Xblank;
+         PLAY(SAMPLE_acid);
+         goto loop;
+
+       case Xblank:
+       case Yacid_splash_eB:
+       case Yacid_splash_wB:
+       case Xplant:
+       case Yplant:
+       case Zplayer:
+         Cave[y][x] = Ybug_sB;
+         Cave[y+1][x] = Ybug_s;
+         Next[y][x] = Xblank;
+         Next[y+1][x] = Xbug_s;
+         PLAY(SAMPLE_bug);
+         goto loop;
+
+       default:
+         Cave[y][x] = Ybug_s_e;
+         Next[y][x] = Xbug_goe;
+         PLAY(SAMPLE_bug);
+         goto loop;
+      }
+
+    /* --------------------------------------------------------------------- */
+
+    case Xbug_w:
+      if (tab_ameuba[Cave[y-1][x]] ||
+         tab_ameuba[Cave[y][x+1]] ||
+         tab_ameuba[Cave[y+1][x]] ||
+         tab_ameuba[Cave[y][x-1]])
+       goto bug_boom;
+
+      switch (Cave[y-1][x])
+      {
+       case Xblank:
+       case Yacid_splash_eB:
+       case Yacid_splash_wB:
+       case Xplant:
+       case Yplant:
+       case Xacid_1:
+       case Xacid_2:
+       case Xacid_3:
+       case Xacid_4:
+       case Xacid_5:
+       case Xacid_6:
+       case Xacid_7:
+       case Xacid_8:
+       case Zplayer:
+         Cave[y][x] = Ybug_w_n;
+         Next[y][x] = Xbug_gon;
+         PLAY(SAMPLE_bug);
+         goto loop;
 
-done:
-       if(ply1.alive || ply2.alive) lev.score += score; /* only get a score if someone is alive */
-       Random = random;
+       default:
+         goto bug_gow;
+      }
+
+    case Xbug_gow:
+      if (tab_ameuba[Cave[y-1][x]] ||
+         tab_ameuba[Cave[y][x+1]] ||
+         tab_ameuba[Cave[y+1][x]] ||
+         tab_ameuba[Cave[y][x-1]])
+       goto bug_boom;
+
+    bug_gow:
+
+      switch (Cave[y][x-1])
+      {
+       case Xacid_1:
+       case Xacid_2:
+       case Xacid_3:
+       case Xacid_4:
+       case Xacid_5:
+       case Xacid_6:
+       case Xacid_7:
+       case Xacid_8:
+         Cave[y][x] = Ybug_wB;
+         if (Cave[y-1][x] == Xblank)
+           Cave[y-1][x] = Yacid_splash_eB;
+         if (Cave[y-1][x-2] == Xblank)
+           Cave[y-1][x-2] = Yacid_splash_wB;
+         Next[y][x] = Xblank;
+         PLAY(SAMPLE_acid);
+         goto loop;
+
+       case Xblank:
+       case Yacid_splash_eB:
+       case Yacid_splash_wB:
+       case Xplant:
+       case Yplant:
+       case Zplayer:
+         Cave[y][x] = Ybug_wB;
+         Cave[y][x-1] = Ybug_w;
+         Next[y][x] = Xblank;
+         Next[y][x-1] = Xbug_w;
+         PLAY(SAMPLE_bug);
+         goto loop;
+
+       default:
+         Cave[y][x] = Ybug_w_s;
+         Next[y][x] = Xbug_gos;
+         PLAY(SAMPLE_bug);
+         goto loop;
+      }
+
+    /* --------------------------------------------------------------------- */
+
+    case Xtank_n:
+      if (tab_ameuba[Cave[y-1][x]] ||
+         tab_ameuba[Cave[y][x+1]] ||
+         tab_ameuba[Cave[y+1][x]] ||
+         tab_ameuba[Cave[y][x-1]])
+       goto tank_boom;
+
+      switch (Cave[y][x-1])
+      {
+       case Xblank:
+       case Yacid_splash_eB:
+       case Yacid_splash_wB:
+       case Xplant:
+       case Yplant:
+       case Xacid_1:
+       case Xacid_2:
+       case Xacid_3:
+       case Xacid_4:
+       case Xacid_5:
+       case Xacid_6:
+       case Xacid_7:
+       case Xacid_8:
+       case Zplayer:
+         Cave[y][x] = Ytank_n_w;
+         Next[y][x] = Xtank_gow;
+         PLAY(SAMPLE_tank);
+         goto loop;
+
+       default:
+         goto tank_gon;
+      }
+
+    case Xtank_gon:
+      if (tab_ameuba[Cave[y-1][x]] ||
+         tab_ameuba[Cave[y][x+1]] ||
+         tab_ameuba[Cave[y+1][x]] ||
+         tab_ameuba[Cave[y][x-1]])
+       goto tank_boom;
+
+    tank_gon:
+
+      switch (Cave[y-1][x])
+      {
+       case Xacid_1:
+       case Xacid_2:
+       case Xacid_3:
+       case Xacid_4:
+       case Xacid_5:
+       case Xacid_6:
+       case Xacid_7:
+       case Xacid_8:
+         Cave[y][x] = Ytank_nB;
+         if (Cave[y-2][x+1] == Xblank)
+           Cave[y-2][x+1] = Yacid_splash_eB;
+         if (Cave[y-2][x-1] == Xblank)
+           Cave[y-2][x-1] = Yacid_splash_wB;
+         Next[y][x] = Xblank;
+         PLAY(SAMPLE_acid);
+         goto loop;
+
+       case Xblank:
+       case Yacid_splash_eB:
+       case Yacid_splash_wB:
+       case Xplant:
+       case Yplant:
+       case Zplayer:
+         Cave[y][x] = Ytank_nB;
+         Cave[y-1][x] = Ytank_n;
+         Next[y][x] = Xblank;
+         Next[y-1][x] = Xtank_n;
+         PLAY(SAMPLE_tank);
+         goto loop;
+
+       default:
+         Cave[y][x] = Ytank_n_e;
+         Next[y][x] = Xtank_goe;
+         PLAY(SAMPLE_tank);
+         goto loop;
+      }
+
+    /* --------------------------------------------------------------------- */
+
+    case Xtank_e:
+      if (tab_ameuba[Cave[y-1][x]] ||
+         tab_ameuba[Cave[y][x+1]] ||
+         tab_ameuba[Cave[y+1][x]] ||
+         tab_ameuba[Cave[y][x-1]])
+       goto tank_boom;
+
+      switch (Cave[y-1][x])
+      {
+       case Xblank:
+       case Yacid_splash_eB:
+       case Yacid_splash_wB:
+       case Xplant:
+       case Yplant:
+       case Xacid_1:
+       case Xacid_2:
+       case Xacid_3:
+       case Xacid_4:
+       case Xacid_5:
+       case Xacid_6:
+       case Xacid_7:
+       case Xacid_8:
+       case Zplayer:
+         Cave[y][x] = Ytank_e_n;
+         Next[y][x] = Xtank_gon;
+         PLAY(SAMPLE_tank);
+         goto loop;
+
+       default:
+         goto tank_goe;
+      }
+
+    case Xtank_goe:
+      if (tab_ameuba[Cave[y-1][x]] ||
+         tab_ameuba[Cave[y][x+1]] ||
+         tab_ameuba[Cave[y+1][x]] ||
+         tab_ameuba[Cave[y][x-1]])
+       goto tank_boom;
+
+    tank_goe:
+
+      switch (Cave[y][x+1])
+      {
+       case Xacid_1:
+       case Xacid_2:
+       case Xacid_3:
+       case Xacid_4:
+       case Xacid_5:
+       case Xacid_6:
+       case Xacid_7:
+       case Xacid_8:
+         Cave[y][x] = Ytank_eB;
+         if (Cave[y-1][x+2] == Xblank)
+           Cave[y-1][x+2] = Yacid_splash_eB;
+         if (Cave[y-1][x] == Xblank)
+           Cave[y-1][x] = Yacid_splash_wB;
+         Next[y][x] = Xblank;
+         PLAY(SAMPLE_acid);
+         goto loop;
+
+       case Xblank:
+       case Yacid_splash_eB:
+       case Yacid_splash_wB:
+       case Xplant:
+       case Yplant:
+       case Zplayer:
+         Cave[y][x] = Ytank_eB;
+         Cave[y][x+1] = Ytank_e;
+         Next[y][x] = Xblank;
+         Next[y][x+1] = Xtank_e;
+         PLAY(SAMPLE_tank);
+         goto loop;
+
+       default:
+         Cave[y][x] = Ytank_e_s;
+         Next[y][x] = Xtank_gos;
+         PLAY(SAMPLE_tank);
+         goto loop;
+      }
+
+    /* --------------------------------------------------------------------- */
+
+    case Xtank_s:
+      if (tab_ameuba[Cave[y-1][x]] ||
+         tab_ameuba[Cave[y][x+1]] ||
+         tab_ameuba[Cave[y+1][x]] ||
+         tab_ameuba[Cave[y][x-1]])
+       goto tank_boom;
+
+      switch (Cave[y][x+1])
+      {
+       case Xblank:
+       case Yacid_splash_eB:
+       case Yacid_splash_wB:
+       case Xplant:
+       case Yplant:
+       case Xacid_1:
+       case Xacid_2:
+       case Xacid_3:
+       case Xacid_4:
+       case Xacid_5:
+       case Xacid_6:
+       case Xacid_7:
+       case Xacid_8:
+       case Zplayer:
+         Cave[y][x] = Ytank_s_e;
+         Next[y][x] = Xtank_goe;
+         PLAY(SAMPLE_tank);
+         goto loop;
+
+       default:
+         goto tank_gos;
+      }
+
+    case Xtank_gos:
+      if (tab_ameuba[Cave[y-1][x]] ||
+         tab_ameuba[Cave[y][x+1]] ||
+         tab_ameuba[Cave[y+1][x]] ||
+         tab_ameuba[Cave[y][x-1]])
+       goto tank_boom;
+
+    tank_gos:
+
+      switch (Cave[y+1][x])
+      {
+       case Xacid_1:
+       case Xacid_2:
+       case Xacid_3:
+       case Xacid_4:
+       case Xacid_5:
+       case Xacid_6:
+       case Xacid_7:
+       case Xacid_8:
+         Cave[y][x] = Ytank_sB;
+         if (Cave[y][x+1] == Xblank)
+           Cave[y][x+1] = Yacid_splash_eB;
+         if (Cave[y][x-1] == Xblank)
+           Cave[y][x-1] = Yacid_splash_wB;
+         Next[y][x] = Xblank;
+         PLAY(SAMPLE_acid);
+         goto loop;
+
+       case Xblank:
+       case Yacid_splash_eB:
+       case Yacid_splash_wB:
+       case Xplant:
+       case Yplant:
+       case Zplayer:
+         Cave[y][x] = Ytank_sB;
+         Cave[y+1][x] = Ytank_s;
+         Next[y][x] = Xblank;
+         Next[y+1][x] = Xtank_s;
+         PLAY(SAMPLE_tank);
+         goto loop;
+
+       default:
+         Cave[y][x] = Ytank_s_w;
+         Next[y][x] = Xtank_gow;
+         PLAY(SAMPLE_tank);
+         goto loop;
+      }
+
+    /* --------------------------------------------------------------------- */
+
+    case Xtank_w:
+      if (tab_ameuba[Cave[y-1][x]] ||
+         tab_ameuba[Cave[y][x+1]] ||
+         tab_ameuba[Cave[y+1][x]] ||
+         tab_ameuba[Cave[y][x-1]])
+       goto tank_boom;
+
+      switch (Cave[y+1][x])
+      {
+       case Xblank:
+       case Yacid_splash_eB:
+       case Yacid_splash_wB:
+       case Xplant:
+       case Yplant:
+       case Xacid_1:
+       case Xacid_2:
+       case Xacid_3:
+       case Xacid_4:
+       case Xacid_5:
+       case Xacid_6:
+       case Xacid_7:
+       case Xacid_8:
+       case Zplayer:
+         Cave[y][x] = Ytank_w_s;
+         Next[y][x] = Xtank_gos;
+         PLAY(SAMPLE_tank);
+         goto loop;
+
+       default:
+         goto tank_gow;
+      }
+
+    case Xtank_gow:
+      if (tab_ameuba[Cave[y-1][x]] ||
+         tab_ameuba[Cave[y][x+1]] ||
+         tab_ameuba[Cave[y+1][x]] ||
+         tab_ameuba[Cave[y][x-1]])
+       goto tank_boom;
+
+    tank_gow:
+
+      switch (Cave[y][x-1])
+      {
+       case Xacid_1:
+       case Xacid_2:
+       case Xacid_3:
+       case Xacid_4:
+       case Xacid_5:
+       case Xacid_6:
+       case Xacid_7:
+       case Xacid_8:
+         Cave[y][x] = Ytank_wB;
+         if (Cave[y-1][x] == Xblank)
+           Cave[y-1][x] = Yacid_splash_eB;
+         if (Cave[y-1][x-2] == Xblank)
+           Cave[y-1][x-2] = Yacid_splash_wB;
+         Next[y][x] = Xblank;
+         PLAY(SAMPLE_acid);
+         goto loop;
+
+       case Xblank:
+       case Yacid_splash_eB:
+       case Yacid_splash_wB:
+       case Xplant:
+       case Yplant:
+       case Zplayer:
+         Cave[y][x] = Ytank_wB;
+         Cave[y][x-1] = Ytank_w;
+         Next[y][x] = Xblank;
+         Next[y][x-1] = Xtank_w;
+         PLAY(SAMPLE_tank);
+         goto loop;
+
+       default:
+         Cave[y][x] = Ytank_w_n;
+         Next[y][x] = Xtank_gon;
+         PLAY(SAMPLE_tank);
+         goto loop;
+      }
+
+    /* --------------------------------------------------------------------- */
+
+    case Xandroid:
+
+    android:
+
+      if (lev.android_clone_cnt == 0)
+      {
+       if (Cave[y-1][x-1] != Xblank &&
+           Cave[y-1][x]   != Xblank &&
+           Cave[y-1][x+1] != Xblank &&
+           Cave[y][x-1]   != Xblank &&
+           Cave[y][x+1]   != Xblank &&
+           Cave[y+1][x-1] != Xblank &&
+           Cave[y+1][x]   != Xblank &&
+           Cave[y+1][x+1] != Xblank)
+         goto android_move;
+
+       switch (RANDOM & 7)
+       {
+         /* randomly find an object to clone */
+
+         case 0: /* S,NE,W,NW,SE,E,SW,N */
+           temp= lev.android_array[Cave[y+1][x]];   if (temp != Xblank) break;
+           temp= lev.android_array[Cave[y-1][x+1]]; if (temp != Xblank) break;
+           temp= lev.android_array[Cave[y][x-1]];   if (temp != Xblank) break;
+           temp= lev.android_array[Cave[y-1][x-1]]; if (temp != Xblank) break;
+           temp= lev.android_array[Cave[y+1][x+1]]; if (temp != Xblank) break;
+           temp= lev.android_array[Cave[y][x+1]];   if (temp != Xblank) break;
+           temp= lev.android_array[Cave[y+1][x-1]]; if (temp != Xblank) break;
+           temp= lev.android_array[Cave[y-1][x]];   if (temp != Xblank) break;
+           goto android_move;
+
+         case 1: /* NW,SE,N,S,NE,SW,E,W */
+           temp= lev.android_array[Cave[y-1][x-1]]; if (temp != Xblank) break;
+           temp= lev.android_array[Cave[y+1][x+1]]; if (temp != Xblank) break;
+           temp= lev.android_array[Cave[y-1][x]];   if (temp != Xblank) break;
+           temp= lev.android_array[Cave[y+1][x]];   if (temp != Xblank) break;
+           temp= lev.android_array[Cave[y-1][x+1]]; if (temp != Xblank) break;
+           temp= lev.android_array[Cave[y+1][x-1]]; if (temp != Xblank) break;
+           temp= lev.android_array[Cave[y][x+1]];   if (temp != Xblank) break;
+           temp= lev.android_array[Cave[y][x-1]];   if (temp != Xblank) break;
+           goto android_move;
+
+         case 2: /* SW,E,S,W,N,NW,SE,NE */
+           temp= lev.android_array[Cave[y+1][x-1]]; if (temp != Xblank) break;
+           temp= lev.android_array[Cave[y][x+1]];   if (temp != Xblank) break;
+           temp= lev.android_array[Cave[y+1][x]];   if (temp != Xblank) break;
+           temp= lev.android_array[Cave[y][x-1]];   if (temp != Xblank) break;
+           temp= lev.android_array[Cave[y-1][x]];   if (temp != Xblank) break;
+           temp= lev.android_array[Cave[y-1][x-1]]; if (temp != Xblank) break;
+           temp= lev.android_array[Cave[y+1][x+1]]; if (temp != Xblank) break;
+           temp= lev.android_array[Cave[y-1][x+1]]; if (temp != Xblank) break;
+           goto android_move;
+
+         case 3: /* N,SE,NE,E,W,S,NW,SW */
+           temp= lev.android_array[Cave[y-1][x]];   if (temp != Xblank) break;
+           temp= lev.android_array[Cave[y+1][x+1]]; if (temp != Xblank) break;
+           temp= lev.android_array[Cave[y-1][x+1]]; if (temp != Xblank) break;
+           temp= lev.android_array[Cave[y][x+1]];   if (temp != Xblank) break;
+           temp= lev.android_array[Cave[y][x-1]];   if (temp != Xblank) break;
+           temp= lev.android_array[Cave[y+1][x]];   if (temp != Xblank) break;
+           temp= lev.android_array[Cave[y-1][x-1]]; if (temp != Xblank) break;
+           temp= lev.android_array[Cave[y+1][x-1]]; if (temp != Xblank) break;
+           goto android_move;
+
+         case 4: /* SE,NW,E,NE,SW,W,N,S */
+           temp= lev.android_array[Cave[y+1][x+1]]; if (temp != Xblank) break;
+           temp= lev.android_array[Cave[y-1][x-1]]; if (temp != Xblank) break;
+           temp= lev.android_array[Cave[y][x+1]];   if (temp != Xblank) break;
+           temp= lev.android_array[Cave[y-1][x+1]]; if (temp != Xblank) break;
+           temp= lev.android_array[Cave[y+1][x-1]]; if (temp != Xblank) break;
+           temp= lev.android_array[Cave[y][x-1]];   if (temp != Xblank) break;
+           temp= lev.android_array[Cave[y-1][x]];   if (temp != Xblank) break;
+           temp= lev.android_array[Cave[y+1][x]];   if (temp != Xblank) break;
+           goto android_move;
+
+         case 5: /* NE,W,SE,SW,S,N,E,NW */
+           temp= lev.android_array[Cave[y-1][x+1]]; if (temp != Xblank) break;
+           temp= lev.android_array[Cave[y][x-1]];   if (temp != Xblank) break;
+           temp= lev.android_array[Cave[y+1][x+1]]; if (temp != Xblank) break;
+           temp= lev.android_array[Cave[y+1][x-1]]; if (temp != Xblank) break;
+           temp= lev.android_array[Cave[y+1][x]];   if (temp != Xblank) break;
+           temp= lev.android_array[Cave[y-1][x]];   if (temp != Xblank) break;
+           temp= lev.android_array[Cave[y][x+1]];   if (temp != Xblank) break;
+           temp= lev.android_array[Cave[y-1][x-1]]; if (temp != Xblank) break;
+           goto android_move;
+
+         case 6: /* E,N,SW,S,NW,NE,SE,W */
+           temp= lev.android_array[Cave[y][x+1]];   if (temp != Xblank) break;
+           temp= lev.android_array[Cave[y-1][x]];   if (temp != Xblank) break;
+           temp= lev.android_array[Cave[y+1][x-1]]; if (temp != Xblank) break;
+           temp= lev.android_array[Cave[y+1][x]];   if (temp != Xblank) break;
+           temp= lev.android_array[Cave[y-1][x-1]]; if (temp != Xblank) break;
+           temp= lev.android_array[Cave[y-1][x+1]]; if (temp != Xblank) break;
+           temp= lev.android_array[Cave[y+1][x+1]]; if (temp != Xblank) break;
+           temp= lev.android_array[Cave[y][x-1]];   if (temp != Xblank) break;
+           goto android_move;
+
+         case 7: /* W,SW,NW,N,E,SE,NE,S */
+           temp= lev.android_array[Cave[y][x-1]];   if (temp != Xblank) break;
+           temp= lev.android_array[Cave[y+1][x-1]]; if (temp != Xblank) break;
+           temp= lev.android_array[Cave[y-1][x-1]]; if (temp != Xblank) break;
+           temp= lev.android_array[Cave[y-1][x]];   if (temp != Xblank) break;
+           temp= lev.android_array[Cave[y][x+1]];   if (temp != Xblank) break;
+           temp= lev.android_array[Cave[y+1][x+1]]; if (temp != Xblank) break;
+           temp= lev.android_array[Cave[y-1][x+1]]; if (temp != Xblank) break;
+           temp= lev.android_array[Cave[y+1][x]];   if (temp != Xblank) break;
+           goto android_move;
+       }
+
+       Next[y][x] = temp; /* the item we chose to clone */
+       play[SAMPLE_android] = 1;
+
+       switch (RANDOM & 7)
+       {
+         /* randomly find a direction to move */
+
+         case 0: /* S,NE,W,NW,SE,E,SW,N */
+           if (Cave[y+1][x] == Xblank)   goto android_s;
+           if (Cave[y-1][x+1] == Xblank) goto android_ne;
+           if (Cave[y][x-1] == Xblank)   goto android_w;
+           if (Cave[y-1][x-1] == Xblank) goto android_nw;
+           if (Cave[y+1][x+1] == Xblank) goto android_se;
+           if (Cave[y][x+1] == Xblank)   goto android_e;
+           if (Cave[y+1][x-1] == Xblank) goto android_sw;
+           if (Cave[y-1][x] == Xblank)   goto android_n;
+           goto android_move;
+
+         case 1: /* NW,SE,N,S,NE,SW,E,W */
+           if (Cave[y-1][x-1] == Xblank) goto android_nw;
+           if (Cave[y+1][x+1] == Xblank) goto android_se;
+           if (Cave[y-1][x] == Xblank)   goto android_n;
+           if (Cave[y+1][x] == Xblank)   goto android_s;
+           if (Cave[y-1][x+1] == Xblank) goto android_ne;
+           if (Cave[y+1][x-1] == Xblank) goto android_sw;
+           if (Cave[y][x+1] == Xblank)   goto android_e;
+           if (Cave[y][x-1] == Xblank)   goto android_w;
+           goto android_move;
+
+         case 2: /* SW,E,S,W,N,NW,SE,NE */
+           if (Cave[y+1][x-1] == Xblank) goto android_sw;
+           if (Cave[y][x+1] == Xblank)   goto android_e;
+           if (Cave[y+1][x] == Xblank)   goto android_s;
+           if (Cave[y][x-1] == Xblank)   goto android_w;
+           if (Cave[y-1][x] == Xblank)   goto android_n;
+           if (Cave[y-1][x-1] == Xblank) goto android_nw;
+           if (Cave[y+1][x+1] == Xblank) goto android_se;
+           if (Cave[y-1][x+1] == Xblank) goto android_ne;
+           goto android_move;
+
+         case 3: /* N,SE,NE,E,W,S,NW,SW */
+           if (Cave[y-1][x] == Xblank)   goto android_n;
+           if (Cave[y+1][x+1] == Xblank) goto android_se;
+           if (Cave[y-1][x+1] == Xblank) goto android_ne;
+           if (Cave[y][x+1] == Xblank)   goto android_e;
+           if (Cave[y][x-1] == Xblank)   goto android_w;
+           if (Cave[y+1][x] == Xblank)   goto android_s;
+           if (Cave[y-1][x-1] == Xblank) goto android_nw;
+           if (Cave[y+1][x-1] == Xblank) goto android_sw;
+           goto android_move;
+
+         case 4: /* SE,NW,E,NE,SW,W,N,S */
+           if (Cave[y+1][x+1] == Xblank) goto android_se;
+           if (Cave[y-1][x-1] == Xblank) goto android_nw;
+           if (Cave[y][x+1] == Xblank)   goto android_e;
+           if (Cave[y-1][x+1] == Xblank) goto android_ne;
+           if (Cave[y+1][x-1] == Xblank) goto android_sw;
+           if (Cave[y][x-1] == Xblank)   goto android_w;
+           if (Cave[y-1][x] == Xblank)   goto android_n;
+           if (Cave[y+1][x] == Xblank)   goto android_s;
+           goto android_move;
+
+         case 5: /* NE,W,SE,SW,S,N,E,NW */
+           if (Cave[y-1][x+1] == Xblank) goto android_ne;
+           if (Cave[y][x-1] == Xblank)   goto android_w;
+           if (Cave[y+1][x+1] == Xblank) goto android_se;
+           if (Cave[y+1][x-1] == Xblank) goto android_sw;
+           if (Cave[y+1][x] == Xblank)   goto android_s;
+           if (Cave[y-1][x] == Xblank)   goto android_n;
+           if (Cave[y][x+1] == Xblank)   goto android_e;
+           if (Cave[y-1][x-1] == Xblank) goto android_nw;
+           goto android_move;
+
+         case 6: /* E,N,SW,S,NW,NE,SE,W */
+           if (Cave[y][x+1] == Xblank)   goto android_e;
+           if (Cave[y-1][x] == Xblank)   goto android_n;
+           if (Cave[y+1][x-1] == Xblank) goto android_sw;
+           if (Cave[y+1][x] == Xblank)   goto android_s;
+           if (Cave[y-1][x-1] == Xblank) goto android_nw;
+           if (Cave[y-1][x+1] == Xblank) goto android_ne;
+           if (Cave[y+1][x+1] == Xblank) goto android_se;
+           if (Cave[y][x-1] == Xblank)   goto android_w;
+           goto android_move;
+
+         case 7: /* W,SW,NW,N,E,SE,NE,S */
+           if (Cave[y][x-1] == Xblank)   goto android_w;
+           if (Cave[y+1][x-1] == Xblank) goto android_sw;
+           if (Cave[y-1][x-1] == Xblank) goto android_nw;
+           if (Cave[y-1][x] == Xblank)   goto android_n;
+           if (Cave[y][x+1] == Xblank)   goto android_e;
+           if (Cave[y+1][x+1] == Xblank) goto android_se;
+           if (Cave[y-1][x+1] == Xblank) goto android_ne;
+           if (Cave[y+1][x] == Xblank)   goto android_s;
+           goto android_move;
+       }
+      }
+
+    android_move:
+      if (lev.android_move_cnt == 0)
+      {
+       if (Cave[y-1][x-1] == Zplayer ||
+           Cave[y-1][x]   == Zplayer ||
+           Cave[y-1][x+1] == Zplayer ||
+           Cave[y][x-1]   == Zplayer ||
+           Cave[y][x+1]   == Zplayer ||
+           Cave[y+1][x-1] == Zplayer ||
+           Cave[y+1][x]   == Zplayer ||
+           Cave[y+1][x+1] == Zplayer)
+         goto android_still;
+
+       if (ply1.alive && ply2.alive)
+       {
+         if ((ply1.x > x ? ply1.x - x : x - ply1.x) +
+             (ply1.y > y ? ply1.y - y : y - ply1.y) <
+             (ply2.x > x ? ply2.x - x : x - ply2.x) +
+             (ply2.y > y ? ply2.y - y : y - ply2.y))
+         {
+           dx = ply1.x;
+           dy = ply1.y;
+         }
+         else
+         {
+           dx = ply2.x;
+           dy = ply2.y;
+         }
+       }
+       else if (ply1.alive)
+       {
+         dx = ply1.x;
+         dy = ply1.y;
+       }
+       else if (ply2.alive)
+       {
+         dx = ply2.x;
+         dy = ply2.y;
+       }
+       else
+       {
+         dx = 0;
+         dy = 0;
+       }
+
+       Next[y][x] = Xblank; /* assume we will move */
+       temp = ((x < dx) + 1 - (x > dx)) + ((y < dy) + 1 - (y > dy)) * 3;
+
+       if (RANDOM & 1)
+       {
+         switch (temp)
+         {
+           /* attempt clockwise move first if direct path is blocked */
+
+           case 0: /* north west */
+             if (tab_android_move[Cave[y-1][x-1]]) goto android_nw;
+             if (tab_android_move[Cave[y-1][x]])   goto android_n;
+             if (tab_android_move[Cave[y][x-1]])   goto android_w;
+             break;
+
+           case 1: /* north */
+             if (tab_android_move[Cave[y-1][x]])   goto android_n;
+             if (tab_android_move[Cave[y-1][x+1]]) goto android_ne;
+             if (tab_android_move[Cave[y-1][x-1]]) goto android_nw;
+             break;
+
+           case 2: /* north east */
+             if (tab_android_move[Cave[y-1][x+1]]) goto android_ne;
+             if (tab_android_move[Cave[y][x+1]])   goto android_e;
+             if (tab_android_move[Cave[y-1][x]])   goto android_n;
+             break;
+
+           case 3: /* west */
+             if (tab_android_move[Cave[y][x-1]])   goto android_w;
+             if (tab_android_move[Cave[y-1][x-1]]) goto android_nw;
+             if (tab_android_move[Cave[y+1][x-1]]) goto android_sw;
+             break;
+
+           case 4: /* nowhere */
+             break;
+
+           case 5: /* east */
+             if (tab_android_move[Cave[y][x+1]])   goto android_e;
+             if (tab_android_move[Cave[y+1][x+1]]) goto android_se;
+             if (tab_android_move[Cave[y-1][x+1]]) goto android_ne;
+             break;
+
+           case 6: /* south west */
+             if (tab_android_move[Cave[y+1][x-1]]) goto android_sw;
+             if (tab_android_move[Cave[y][x-1]])   goto android_w;
+             if (tab_android_move[Cave[y+1][x]])   goto android_s;
+             break;
+
+           case 7: /* south */
+             if (tab_android_move[Cave[y+1][x]])   goto android_s;
+             if (tab_android_move[Cave[y+1][x-1]]) goto android_sw;
+             if (tab_android_move[Cave[y+1][x+1]]) goto android_se;
+             break;
+
+           case 8: /* south east */
+             if (tab_android_move[Cave[y+1][x+1]]) goto android_se;
+             if (tab_android_move[Cave[y+1][x]])   goto android_s;
+             if (tab_android_move[Cave[y][x+1]])   goto android_e;
+             break;
+         }
+       }
+       else
        {
-               void *temp = Cave; Cave = Next; Next = Draw; Draw = temp; /* triple buffering */
+         switch (temp)
+         {
+           /* attempt counterclockwise move first if direct path is blocked */
+
+           case 0: /* north west */
+             if (tab_android_move[Cave[y-1][x-1]]) goto android_nw;
+             if (tab_android_move[Cave[y][x-1]])   goto android_w;
+             if (tab_android_move[Cave[y-1][x]])   goto android_n;
+             break;
+
+           case 1: /* north */
+             if (tab_android_move[Cave[y-1][x]])   goto android_n;
+             if (tab_android_move[Cave[y-1][x-1]]) goto android_nw;
+             if (tab_android_move[Cave[y-1][x+1]]) goto android_ne;
+             break;
+
+           case 2: /* north east */
+             if (tab_android_move[Cave[y-1][x+1]]) goto android_ne;
+             if (tab_android_move[Cave[y-1][x]])   goto android_n;
+             if (tab_android_move[Cave[y][x+1]])   goto android_e;
+             break;
+
+           case 3: /* west */
+             if (tab_android_move[Cave[y][x-1]])   goto android_w;
+             if (tab_android_move[Cave[y+1][x-1]]) goto android_sw;
+             if (tab_android_move[Cave[y-1][x-1]]) goto android_nw;
+             break;
+
+           case 4: /* nowhere */
+             break;
+
+           case 5: /* east */
+             if (tab_android_move[Cave[y][x+1]])   goto android_e;
+             if (tab_android_move[Cave[y-1][x+1]]) goto android_ne;
+             if (tab_android_move[Cave[y+1][x+1]]) goto android_se;
+             break;
+
+           case 6: /* south west */
+             if (tab_android_move[Cave[y+1][x-1]]) goto android_sw;
+             if (tab_android_move[Cave[y+1][x]])   goto android_s;
+             if (tab_android_move[Cave[y][x-1]])   goto android_w;
+             break;
+
+           case 7: /* south */
+             if (tab_android_move[Cave[y+1][x]])   goto android_s;
+             if (tab_android_move[Cave[y+1][x+1]]) goto android_se;
+             if (tab_android_move[Cave[y+1][x-1]]) goto android_sw;
+             break;
+
+           case 8: /* south east */
+             if (tab_android_move[Cave[y+1][x+1]]) goto android_se;
+             if (tab_android_move[Cave[y][x+1]])   goto android_e;
+             if (tab_android_move[Cave[y+1][x]])   goto android_s;
+             break;
+         }
        }
+      }
+
+    android_still:
+
+      Next[y][x] = Xandroid;
+      goto loop;
+
+    android_n:
+
+      Cave[y][x] = Yandroid_nB;
+      Cave[y-1][x] = Yandroid_n;
+      Next[y-1][x] = Xandroid;
+      PLAY(SAMPLE_tank);
+      goto loop;
+
+    android_ne:
+
+      Cave[y][x] = Yandroid_neB;
+      Cave[y-1][x+1] = Yandroid_ne;
+      Next[y-1][x+1] = Xandroid;
+      PLAY(SAMPLE_tank);
+      goto loop;
+
+    android_e:
+
+      Cave[y][x] = Yandroid_eB;
+      Cave[y][x+1] = Yandroid_e;
+      Next[y][x+1] = Xandroid;
+      PLAY(SAMPLE_tank);
+      goto loop;
+
+    android_se:
+
+      Cave[y][x] = Yandroid_seB;
+      Cave[y+1][x+1] = Yandroid_se;
+      Next[y+1][x+1] = Xandroid;
+      PLAY(SAMPLE_tank);
+      goto loop;
+
+    android_s:
+
+      Cave[y][x] = Yandroid_sB;
+      Cave[y+1][x] = Yandroid_s;
+      Next[y+1][x] = Xandroid;
+      PLAY(SAMPLE_tank);
+      goto loop;
+
+    android_sw:
+
+      Cave[y][x] = Yandroid_swB;
+      Cave[y+1][x-1] = Yandroid_sw;
+      Next[y+1][x-1] = Xandroid;
+      PLAY(SAMPLE_tank);
+      goto loop;
+
+    android_w:
+
+      Cave[y][x] = Yandroid_wB;
+      Cave[y][x-1] = Yandroid_w;
+      Next[y][x-1] = Xandroid;
+      PLAY(SAMPLE_tank);
+      goto loop;
+
+    android_nw:
+
+      Cave[y][x] = Yandroid_nwB;
+      Cave[y-1][x-1] = Yandroid_nw;
+      Next[y-1][x-1] = Xandroid;
+      PLAY(SAMPLE_tank);
+      goto loop;
+
+    /* --------------------------------------------------------------------- */
+
+    case Xandroid_1_n:
+      switch (Cave[y-1][x])
+      {
+       case Xacid_1:
+       case Xacid_2:
+       case Xacid_3:
+       case Xacid_4:
+       case Xacid_5:
+       case Xacid_6:
+       case Xacid_7:
+       case Xacid_8:
+         Cave[y][x] = Yandroid_nB;
+         if (Cave[y-2][x+1] == Xblank)
+           Cave[y-2][x+1] = Yacid_splash_eB;
+         if (Cave[y-2][x-1] == Xblank)
+           Cave[y-2][x-1] = Yacid_splash_wB;
+         Next[y][x] = Xblank;
+         PLAY(SAMPLE_acid);
+         goto loop;
+
+       case Xblank:
+       case Yacid_splash_eB:
+       case Yacid_splash_wB:
+         Cave[y][x] = Yandroid_nB;
+         Cave[y-1][x] = Yandroid_n;
+         Next[y][x] = Xblank;
+         Next[y-1][x] = Xandroid;
+         PLAY(SAMPLE_tank);
+         goto loop;
+
+       default:
+         goto android;
+      }
+
+    case Xandroid_2_n:
+      switch (Cave[y-1][x])
+      {
+       case Xacid_1:
+       case Xacid_2:
+       case Xacid_3:
+       case Xacid_4:
+       case Xacid_5:
+       case Xacid_6:
+       case Xacid_7:
+       case Xacid_8:
+         Cave[y][x] = Yandroid_nB;
+         if (Cave[y-2][x+1] == Xblank)
+           Cave[y-2][x+1] = Yacid_splash_eB;
+         if (Cave[y-2][x-1] == Xblank)
+           Cave[y-2][x-1] = Yacid_splash_wB;
+         Next[y][x] = Xblank;
+         PLAY(SAMPLE_acid);
+         goto loop;
+
+       case Xblank:
+       case Yacid_splash_eB:
+       case Yacid_splash_wB:
+         Cave[y][x] = Yandroid_nB;
+         Cave[y-1][x] = Yandroid_n;
+         Next[y][x] = Xblank;
+         Next[y-1][x] = Xandroid_1_n;
+         PLAY(SAMPLE_tank);
+         goto loop;
+
+       default:
+         goto android;
+      }
+
+    /* --------------------------------------------------------------------- */
+
+    case Xandroid_1_e:
+      switch (Cave[y][x+1])
+      {
+       case Xacid_1:
+       case Xacid_2:
+       case Xacid_3:
+       case Xacid_4:
+       case Xacid_5:
+       case Xacid_6:
+       case Xacid_7:
+       case Xacid_8:
+         Cave[y][x] = Yandroid_eB;
+         if (Cave[y-1][x+2] == Xblank)
+           Cave[y-1][x+2] = Yacid_splash_eB;
+         if (Cave[y-1][x] == Xblank)
+           Cave[y-1][x] = Yacid_splash_wB;
+         Next[y][x] = Xblank;
+         PLAY(SAMPLE_acid);
+         goto loop;
+
+       case Xblank:
+       case Yacid_splash_eB:
+       case Yacid_splash_wB:
+         Cave[y][x] = Yandroid_eB;
+         Cave[y][x+1] = Yandroid_e;
+         Next[y][x] = Xblank;
+         Next[y][x+1] = Xandroid;
+         PLAY(SAMPLE_tank);
+         goto loop;
+
+       default:
+         goto android;
+      }
+
+    case Xandroid_2_e:
+      switch (Cave[y][x+1])
+      {
+       case Xacid_1:
+       case Xacid_2:
+       case Xacid_3:
+       case Xacid_4:
+       case Xacid_5:
+       case Xacid_6:
+       case Xacid_7:
+       case Xacid_8:
+         Cave[y][x] = Yandroid_eB;
+         if (Cave[y-1][x+2] == Xblank)
+           Cave[y-1][x+2] = Yacid_splash_eB;
+         if (Cave[y-1][x] == Xblank)
+           Cave[y-1][x] = Yacid_splash_wB;
+         Next[y][x] = Xblank;
+         PLAY(SAMPLE_acid);
+         goto loop;
+
+       case Xblank:
+       case Yacid_splash_eB:
+       case Yacid_splash_wB:
+         Cave[y][x] = Yandroid_eB;
+         Cave[y][x+1] = Yandroid_e;
+         Next[y][x] = Xblank;
+         Next[y][x+1] = Xandroid_1_e;
+         PLAY(SAMPLE_tank);
+         goto loop;
+
+       default:
+         goto android;
+      }
+
+    /* --------------------------------------------------------------------- */
+
+    case Xandroid_1_s:
+      switch (Cave[y+1][x])
+      {
+       case Xacid_1:
+       case Xacid_2:
+       case Xacid_3:
+       case Xacid_4:
+       case Xacid_5:
+       case Xacid_6:
+       case Xacid_7:
+       case Xacid_8:
+         Cave[y][x] = Yandroid_sB;
+         if (Cave[y][x+1] == Xblank)
+           Cave[y][x+1] = Yacid_splash_eB;
+         if (Cave[y][x-1] == Xblank)
+           Cave[y][x-1] = Yacid_splash_wB;
+         Next[y][x] = Xblank;
+         PLAY(SAMPLE_acid);
+         goto loop;
+
+       case Xblank:
+       case Yacid_splash_eB:
+       case Yacid_splash_wB:
+         Cave[y][x] = Yandroid_sB;
+         Cave[y+1][x] = Yandroid_s;
+         Next[y][x] = Xblank;
+         Next[y+1][x] = Xandroid;
+         PLAY(SAMPLE_tank);
+         goto loop;
+
+       default:
+         goto android;
+      }
+
+    case Xandroid_2_s:
+      switch (Cave[y+1][x])
+      {
+       case Xacid_1:
+       case Xacid_2:
+       case Xacid_3:
+       case Xacid_4:
+       case Xacid_5:
+       case Xacid_6:
+       case Xacid_7:
+       case Xacid_8:
+         Cave[y][x] = Yandroid_sB;
+         if (Cave[y][x+1] == Xblank)
+           Cave[y][x+1] = Yacid_splash_eB;
+         if (Cave[y][x-1] == Xblank)
+           Cave[y][x-1] = Yacid_splash_wB;
+         Next[y][x] = Xblank;
+         PLAY(SAMPLE_acid);
+         goto loop;
+
+       case Xblank:
+       case Yacid_splash_eB:
+       case Yacid_splash_wB:
+         Cave[y][x] = Yandroid_sB;
+         Cave[y+1][x] = Yandroid_s;
+         Next[y][x] = Xblank;
+         Next[y+1][x] = Xandroid_1_s;
+         PLAY(SAMPLE_tank);
+         goto loop;
+
+       default:
+         goto android;
+      }
+
+    /* --------------------------------------------------------------------- */
+
+    case Xandroid_1_w:
+      switch (Cave[y][x-1])
+      {
+       case Xacid_1:
+       case Xacid_2:
+       case Xacid_3:
+       case Xacid_4:
+       case Xacid_5:
+       case Xacid_6:
+       case Xacid_7:
+       case Xacid_8:
+         Cave[y][x] = Yandroid_wB;
+         if (Cave[y-1][x] == Xblank)
+           Cave[y-1][x] = Yacid_splash_eB;
+         if (Cave[y-1][x-2] == Xblank)
+           Cave[y-1][x-2] = Yacid_splash_wB;
+         Next[y][x] = Xblank;
+         PLAY(SAMPLE_acid);
+         goto loop;
+
+       case Xblank:
+       case Yacid_splash_eB:
+       case Yacid_splash_wB:
+         Cave[y][x] = Yandroid_wB;
+         Cave[y][x-1] = Yandroid_w;
+         Next[y][x] = Xblank;
+         Next[y][x-1] = Xandroid;
+         PLAY(SAMPLE_tank);
+         goto loop;
+
+       default:
+         goto android;
+      }
+
+    case Xandroid_2_w:
+      switch (Cave[y][x-1])
+      {
+       case Xacid_1:
+       case Xacid_2:
+       case Xacid_3:
+       case Xacid_4:
+       case Xacid_5:
+       case Xacid_6:
+       case Xacid_7:
+       case Xacid_8:
+         Cave[y][x] = Yandroid_wB;
+         if (Cave[y-1][x] == Xblank)
+           Cave[y-1][x] = Yacid_splash_eB;
+         if (Cave[y-1][x-2] == Xblank)
+           Cave[y-1][x-2] = Yacid_splash_wB;
+         Next[y][x] = Xblank;
+         PLAY(SAMPLE_acid);
+         goto loop;
+
+       case Xblank:
+       case Yacid_splash_eB:
+       case Yacid_splash_wB:
+         Cave[y][x] = Yandroid_wB;
+         Cave[y][x-1] = Yandroid_w;
+         Next[y][x] = Xblank;
+         Next[y][x-1] = Xandroid_1_w;
+         PLAY(SAMPLE_tank);
+         goto loop;
+
+       default:
+         goto android;
+      }
+
+    /* --------------------------------------------------------------------- */
+
+    case Xspring:
+      switch (Cave[y+1][x])
+      {
+       case Xacid_1:
+       case Xacid_2:
+       case Xacid_3:
+       case Xacid_4:
+       case Xacid_5:
+       case Xacid_6:
+       case Xacid_7:
+       case Xacid_8:
+         Cave[y][x] = Yspring_sB;
+         if (Cave[y][x+1] == Xblank)
+           Cave[y][x+1] = Yacid_splash_eB;
+         if (Cave[y][x-1] == Xblank)
+           Cave[y][x-1] = Yacid_splash_wB;
+         Next[y][x] = Xblank;
+         PLAY(SAMPLE_acid);
+         goto loop;
+
+       case Xblank:
+       case Yacid_splash_eB:
+       case Yacid_splash_wB:
+       case Xplant:
+       case Yplant:
+         Cave[y][x] = Yspring_sB;
+         Cave[y+1][x] = Yspring_s;
+         Next[y][x] = Xblank;
+         Next[y+1][x] = Xspring_fall;
+         goto loop;
+
+       case Xspring:
+       case Xspring_pause:
+       case Xspring_e:
+       case Xspring_w:
+       case Xandroid:
+       case Xandroid_1_n:
+       case Xandroid_2_n:
+       case Xandroid_1_e:
+       case Xandroid_2_e:
+       case Xandroid_1_s:
+       case Xandroid_2_s:
+       case Xandroid_1_w:
+       case Xandroid_2_w:
+       case Xstone:
+       case Xstone_pause:
+       case Xemerald:
+       case Xemerald_pause:
+       case Xdiamond:
+       case Xdiamond_pause:
+       case Xbomb:
+       case Xbomb_pause:
+       case Xballoon:
+       case Xacid_ne:
+       case Xacid_nw:
+       case Xball_1:
+       case Xball_2:
+       case Xnut:
+       case Xnut_pause:
+       case Xgrow_ns:
+       case Xgrow_ew:
+       case Xkey_1:
+       case Xkey_2:
+       case Xkey_3:
+       case Xkey_4:
+       case Xkey_5:
+       case Xkey_6:
+       case Xkey_7:
+       case Xkey_8:
+       case Xbumper:
+       case Xswitch:
+       case Xround_wall_1:
+       case Xround_wall_2:
+       case Xround_wall_3:
+       case Xround_wall_4:
+         if (RANDOM & 1)
+         {
+           if (tab_blank[Cave[y][x+1]] && tab_acid[Cave[y+1][x+1]])
+           {
+             Cave[y][x] = Yspring_eB;
+             Cave[y][x+1] = Yspring_e;
+             if (Cave[y+1][x] == Xbumper)
+               Cave[y+1][x] = XbumperB;
+             Next[y][x] = Xblank;
+
+#ifdef BAD_SPRING
+             Next[y][x+1] = Xspring_e;
+#else  
+             Next[y][x+1] = Xspring_pause;
+#endif
+
+             goto loop;
+           }
+
+           if (tab_blank[Cave[y][x-1]] && tab_acid[Cave[y+1][x-1]])
+           {
+             Cave[y][x] = Yspring_wB;
+             Cave[y][x-1] = Yspring_w;
+             if (Cave[y+1][x] == Xbumper)
+               Cave[y+1][x] = XbumperB;
+             Next[y][x] = Xblank;
+
+#ifdef BAD_SPRING
+             Next[y][x-1] = Xspring_w;
+#else
+             Next[y][x-1] = Xspring_pause;
+#endif
+
+             goto loop;
+           }
+         }
+         else
+         {
+           if (tab_blank[Cave[y][x-1]] && tab_acid[Cave[y+1][x-1]])
+           {
+             Cave[y][x] = Yspring_wB;
+             Cave[y][x-1] = Yspring_w;
+             if (Cave[y+1][x] == Xbumper)
+               Cave[y+1][x] = XbumperB;
+             Next[y][x] = Xblank;
+
+#ifdef BAD_SPRING
+             Next[y][x-1] = Xspring_w;
+#else
+             Next[y][x-1] = Xspring_pause;
+#endif
+
+             goto loop;
+           }
+
+           if (tab_blank[Cave[y][x+1]] && tab_acid[Cave[y+1][x+1]])
+           {
+             Cave[y][x] = Yspring_eB;
+             Cave[y][x+1] = Yspring_e;
+             if (Cave[y+1][x] == Xbumper)
+               Cave[y+1][x] = XbumperB;
+             Next[y][x] = Xblank;
+
+#ifdef BAD_SPRING
+             Next[y][x+1] = Xspring_e;
+#else
+             Next[y][x+1] = Xspring_pause;
+#endif
+
+             goto loop;
+           }
+         }
+
+       default:
+         goto loop;
+      }
+
+    /* --------------------------------------------------------------------- */
+
+    case Xspring_pause:
+      switch (Cave[y+1][x])
+      {
+       case Xacid_1:
+       case Xacid_2:
+       case Xacid_3:
+       case Xacid_4:
+       case Xacid_5:
+       case Xacid_6:
+       case Xacid_7:
+       case Xacid_8:
+         Cave[y][x] = Yspring_sB;
+         if (Cave[y][x+1] == Xblank)
+           Cave[y][x+1] = Yacid_splash_eB;
+         if (Cave[y][x-1] == Xblank)
+           Cave[y][x-1] = Yacid_splash_wB;
+         Next[y][x] = Xblank;
+         PLAY(SAMPLE_acid);
+         goto loop;
+
+       case Xblank:
+       case Yacid_splash_eB:
+       case Yacid_splash_wB:
+         Cave[y][x] = Yspring_sB;
+         Cave[y+1][x] = Yspring_s;
+         Next[y][x] = Xblank;
+         Next[y+1][x] = Xspring_fall;
+         goto loop;
+
+       default:
+         Cave[y][x] = Xspring;
+         Next[y][x] = Xspring;
+         goto loop;
+      }
+
+    /* --------------------------------------------------------------------- */
+
+    case Xspring_e:
+      switch (Cave[y+1][x])
+      {
+       case Xacid_1:
+       case Xacid_2:
+       case Xacid_3:
+       case Xacid_4:
+       case Xacid_5:
+       case Xacid_6:
+       case Xacid_7:
+       case Xacid_8:
+         Cave[y][x] = Yspring_sB;
+         if (Cave[y][x+1] == Xblank)
+           Cave[y][x+1] = Yacid_splash_eB;
+         if (Cave[y][x-1] == Xblank)
+           Cave[y][x-1] = Yacid_splash_wB;
+         Next[y][x] = Xblank;
+         PLAY(SAMPLE_acid);
+         goto loop;
+
+       case Xblank:
+       case Yacid_splash_eB:
+       case Yacid_splash_wB:
+         Cave[y][x] = Yspring_sB;
+         Cave[y+1][x] = Yspring_s;
+         Next[y][x] = Xblank;
+         Next[y+1][x] = Xspring_fall;
+         goto loop;
+
+       case Xbumper:
+         Cave[y+1][x] = XbumperB;
+      }
+
+      switch (Cave[y][x+1])
+      {
+       case Xacid_1:
+       case Xacid_2:
+       case Xacid_3:
+       case Xacid_4:
+       case Xacid_5:
+       case Xacid_6:
+       case Xacid_7:
+       case Xacid_8:
+         Cave[y][x] = Yspring_eB;
+         if (Cave[y-1][x+2] == Xblank)
+           Cave[y-1][x+2] = Yacid_splash_eB;
+         if (Cave[y-1][x] == Xblank)
+           Cave[y-1][x] = Yacid_splash_wB;
+         Next[y][x] = Xblank;
+         PLAY(SAMPLE_acid);
+         goto loop;
+
+       case Xblank:
+       case Yacid_splash_eB:
+       case Yacid_splash_wB:
+       case Yalien_nB:
+       case Yalien_eB:
+       case Yalien_sB:
+       case Yalien_wB:
+         Cave[y][x] = Yspring_eB;
+         Cave[y][x+1] = Yspring_e;
+         Next[y][x] = Xblank;
+         Next[y][x+1] = Xspring_e;
+         goto loop;
+
+       case Xalien:
+       case Xalien_pause:
+       case Yalien_n:
+       case Yalien_e:
+       case Yalien_s:
+       case Yalien_w:
+         Cave[y][x] = Yspring_kill_eB;
+         Cave[y][x+1] = Yspring_kill_e;
+         Next[y][x] = Xblank;
+         Next[y][x+1] = Xspring_e;
+         play[SAMPLE_slurp] = 1;
+         score += lev.slurp_score;
+         goto loop;
+
+       case Xbumper:
+       case XbumperB:
+         Cave[y][x+1] = XbumperB;
+         Next[y][x] = Xspring_w;
+         PLAY(SAMPLE_spring);
+         goto loop;
+
+       default:
+         Cave[y][x] = Xspring;
+         Next[y][x] = Xspring;
+         PLAY(SAMPLE_spring);
+         goto loop;
+      }
+
+    /* --------------------------------------------------------------------- */
+
+    case Xspring_w:
+      switch (Cave[y+1][x])
+      {
+       case Xacid_1:
+       case Xacid_2:
+       case Xacid_3:
+       case Xacid_4:
+       case Xacid_5:
+       case Xacid_6:
+       case Xacid_7:
+       case Xacid_8:
+         Cave[y][x] = Yspring_sB;
+         if (Cave[y][x+1] == Xblank)
+           Cave[y][x+1] = Yacid_splash_eB;
+         if (Cave[y][x-1] == Xblank)
+           Cave[y][x-1] = Yacid_splash_wB;
+         Next[y][x] = Xblank;
+         PLAY(SAMPLE_acid);
+         goto loop;
+
+       case Xblank:
+       case Yacid_splash_eB:
+       case Yacid_splash_wB:
+         Cave[y][x] = Yspring_sB;
+         Cave[y+1][x] = Yspring_s;
+         Next[y][x] = Xblank;
+         Next[y+1][x] = Xspring_fall;
+         goto loop;
+
+       case Xbumper:
+         Cave[y+1][x] = XbumperB;
+      }
+
+      switch (Cave[y][x-1])
+      {
+       case Xacid_1:
+       case Xacid_2:
+       case Xacid_3:
+       case Xacid_4:
+       case Xacid_5:
+       case Xacid_6:
+       case Xacid_7:
+       case Xacid_8:
+         Cave[y][x] = Yspring_wB;
+         if (Cave[y-1][x] == Xblank)
+           Cave[y-1][x] = Yacid_splash_eB;
+         if (Cave[y-1][x-2] == Xblank)
+           Cave[y-1][x-2] = Yacid_splash_wB;
+         Next[y][x] = Xblank;
+         PLAY(SAMPLE_acid);
+         goto loop;
+
+       case Xblank:
+       case Yacid_splash_eB:
+       case Yacid_splash_wB:
+       case Yalien_nB:
+       case Yalien_eB:
+       case Yalien_sB:
+       case Yalien_wB:
+         Cave[y][x] = Yspring_wB;
+         Cave[y][x-1] = Yspring_w;
+         Next[y][x] = Xblank;
+         Next[y][x-1] = Xspring_w;
+         goto loop;
+
+       case Xalien:
+       case Xalien_pause:
+       case Yalien_n:
+       case Yalien_e:
+       case Yalien_s:
+       case Yalien_w:
+         Cave[y][x] = Yspring_kill_wB;
+         Cave[y][x-1] = Yspring_kill_w;
+         Next[y][x] = Xblank;
+         Next[y][x-1] = Xspring_w;
+         play[SAMPLE_slurp] = 1;
+         score += lev.slurp_score;
+         goto loop;
+
+       case Xbumper:
+       case XbumperB:
+         Cave[y][x-1] = XbumperB;
+         Next[y][x] = Xspring_e;
+         PLAY(SAMPLE_spring);
+         goto loop;
+
+       default:
+         Cave[y][x] = Xspring;
+         Next[y][x] = Xspring;
+         PLAY(SAMPLE_spring);
+         goto loop;
+      }
+
+    /* --------------------------------------------------------------------- */
+
+    case Xspring_fall:
+      switch (Cave[y+1][x])
+      {
+       case Xacid_1:
+       case Xacid_2:
+       case Xacid_3:
+       case Xacid_4:
+       case Xacid_5:
+       case Xacid_6:
+       case Xacid_7:
+       case Xacid_8:
+         Cave[y][x] = Yspring_sB;
+         if (Cave[y][x+1] == Xblank)
+           Cave[y][x+1] = Yacid_splash_eB;
+         if (Cave[y][x-1] == Xblank)
+           Cave[y][x-1] = Yacid_splash_wB;
+         Next[y][x] = Xblank;
+         PLAY(SAMPLE_acid);
+         goto loop;
+
+       case Xblank:
+       case Yacid_splash_eB:
+       case Yacid_splash_wB:
+       case Zplayer:
+         Cave[y][x] = Yspring_sB;
+         Cave[y+1][x] = Yspring_s;
+         Next[y][x] = Xblank;
+         Next[y+1][x] = Xspring_fall;
+         goto loop;
+
+       case Xbomb:
+       case Xbomb_pause:
+         Cave[y+1][x] = Ybomb_eat;
+         Next[y+1][x] = Znormal;
+         Boom[y][x-1] = Xblank;
+         Boom[y][x] = Xblank;
+         Boom[y][x+1] = Xblank;
+         Boom[y+1][x-1] = Xblank;
+         Boom[y+1][x] = Xblank;
+         Boom[y+1][x+1] = Xblank;
+         Boom[y+2][x-1] = Xblank;
+         Boom[y+2][x] = Xblank;
+         Boom[y+2][x+1] = Xblank;
+         goto loop;
+
+       case Xbug_n:
+       case Xbug_e:
+       case Xbug_s:
+       case Xbug_w:
+       case Xbug_gon:
+       case Xbug_goe:
+       case Xbug_gos:
+       case Xbug_gow:
+         Cave[y][x] = Yspring_sB;
+         Cave[y+1][x] = Ybug_spring;
+         Next[y+1][x] = Znormal;
+         Boom[y][x-1] = Xemerald;
+         Boom[y][x] = Xemerald;
+         Boom[y][x+1] = Xemerald;
+         Boom[y+1][x-1] = Xemerald;
+         Boom[y+1][x] = Xdiamond;
+         Boom[y+1][x+1] = Xemerald;
+         Boom[y+2][x-1] = Xemerald;
+         Boom[y+2][x] = Xemerald;
+         Boom[y+2][x+1] = Xemerald;
+         score += lev.bug_score;
+         goto loop;
+
+       case Xtank_n:
+       case Xtank_e:
+       case Xtank_s:
+       case Xtank_w:
+       case Xtank_gon:
+       case Xtank_goe:
+       case Xtank_gos:
+       case Xtank_gow:
+         Cave[y][x] = Yspring_sB;
+         Cave[y+1][x] = Ytank_spring;
+         Next[y+1][x] = Znormal;
+         Boom[y][x-1] = Xblank;
+         Boom[y][x] = Xblank;
+         Boom[y][x+1] = Xblank;
+         Boom[y+1][x-1] = Xblank;
+         Boom[y+1][x] = Xblank;
+         Boom[y+1][x+1] = Xblank;
+         Boom[y+2][x-1] = Xblank;
+         Boom[y+2][x] = Xblank;
+         Boom[y+2][x+1] = Xblank;
+         score += lev.tank_score;
+         goto loop;
+
+       case Xeater_n:
+       case Xeater_e:
+       case Xeater_s:
+       case Xeater_w:
+         Cave[y][x] = Yspring_sB;
+         Cave[y+1][x] = Yeater_spring;
+         Next[y+1][x] = Znormal;
+         Boom[y][x-1] = lev.eater_array[lev.eater_pos][0];
+         Boom[y][x] = lev.eater_array[lev.eater_pos][1];
+         Boom[y][x+1] = lev.eater_array[lev.eater_pos][2];
+         Boom[y+1][x-1] = lev.eater_array[lev.eater_pos][3];
+         Boom[y+1][x] = lev.eater_array[lev.eater_pos][4];
+         Boom[y+1][x+1] = lev.eater_array[lev.eater_pos][5];
+         Boom[y+2][x-1] = lev.eater_array[lev.eater_pos][6];
+         Boom[y+2][x] = lev.eater_array[lev.eater_pos][7];
+         Boom[y+2][x+1] = lev.eater_array[lev.eater_pos][8];
+         lev.eater_pos = (lev.eater_pos + 1) & 7;
+         score += lev.eater_score;
+         goto loop;
+
+       case Xalien:
+       case Xalien_pause:
+         Cave[y][x] = Yspring_sB;
+         Cave[y+1][x] = Yalien_spring;
+         Next[y+1][x] = Znormal;
+         Boom[y][x-1] = Xblank;
+         Boom[y][x] = Xblank;
+         Boom[y][x+1] = Xblank;
+         Boom[y+1][x-1] = Xblank;
+         Boom[y+1][x] = Xblank;
+         Boom[y+1][x+1] = Xblank;
+         Boom[y+2][x-1] = Xblank;
+         Boom[y+2][x] = Xblank;
+         Boom[y+2][x+1] = Xblank;
+         score += lev.alien_score;
+         goto loop;
+
+       default:
+         Cave[y][x] = Xspring;
+         Next[y][x] = Xspring;
+         PLAY(SAMPLE_spring);
+         goto loop;
+      }
+
+    /* --------------------------------------------------------------------- */
+
+    case Xeater_n:
+      if (Cave[y][x+1] == Xdiamond)
+      {
+       Cave[y][x+1] = Ydiamond_eat;
+       Next[y][x+1] = Xblank;
+       play[SAMPLE_eater] = 1;
+       goto loop;
+      }
+
+      if (Cave[y+1][x] == Xdiamond)
+      {
+       Cave[y+1][x] = Ydiamond_eat;
+       Next[y+1][x] = Xblank;
+       play[SAMPLE_eater] = 1;
+       goto loop;
+      }
+
+      if (Cave[y][x-1] == Xdiamond)
+      {
+       Cave[y][x-1] = Ydiamond_eat;
+       Next[y][x-1] = Xblank;
+       play[SAMPLE_eater] = 1;
+       goto loop;
+      }
+
+      if (Cave[y-1][x] == Xdiamond)
+      {
+       Cave[y-1][x] = Ydiamond_eat;
+       Next[y-1][x] = Xblank;
+       play[SAMPLE_eater] = 1;
+       goto loop;
+      }
+
+      switch (Cave[y-1][x])
+      {
+       case Xacid_1:
+       case Xacid_2:
+       case Xacid_3:
+       case Xacid_4:
+       case Xacid_5:
+       case Xacid_6:
+       case Xacid_7:
+       case Xacid_8:
+         Cave[y][x] = Yeater_nB;
+         if (Cave[y-2][x+1] == Xblank)
+           Cave[y-2][x+1] = Yacid_splash_eB;
+         if (Cave[y-2][x-1] == Xblank)
+           Cave[y-2][x-1] = Yacid_splash_wB;
+         Next[y][x] = Xblank;
+         PLAY(SAMPLE_acid);
+         goto loop;
+
+       case Xblank:
+       case Yacid_splash_eB:
+       case Yacid_splash_wB:
+       case Xplant:
+       case Yplant:
+       case Zplayer:
+         Cave[y][x] = Yeater_nB;
+         Cave[y-1][x] = Yeater_n;
+         Next[y][x] = Xblank;
+         Next[y-1][x] = Xeater_n;
+         goto loop;
+
+       default:
+         Next[y][x] = RANDOM & 1 ? Xeater_e : Xeater_w;
+         PLAY(SAMPLE_eater);
+         goto loop;
+      }
+
+    /* --------------------------------------------------------------------- */
+
+    case Xeater_e:
+      if (Cave[y+1][x] == Xdiamond)
+      {
+       Cave[y+1][x] = Ydiamond_eat;
+       Next[y+1][x] = Xblank;
+       play[SAMPLE_eater] = 1;
+       goto loop;
+      }
+
+      if (Cave[y][x-1] == Xdiamond)
+      {
+       Cave[y][x-1] = Ydiamond_eat;
+       Next[y][x-1] = Xblank;
+       play[SAMPLE_eater] = 1;
+       goto loop;
+      }
+
+      if (Cave[y-1][x] == Xdiamond)
+      {
+       Cave[y-1][x] = Ydiamond_eat;
+       Next[y-1][x] = Xblank;
+       play[SAMPLE_eater] = 1;
+       goto loop;
+      }
+
+      if (Cave[y][x+1] == Xdiamond)
+      {
+       Cave[y][x+1] = Ydiamond_eat;
+       Next[y][x+1] = Xblank;
+       play[SAMPLE_eater] = 1;
+       goto loop;
+      }
+
+      switch (Cave[y][x+1])
+      {
+       case Xacid_1:
+       case Xacid_2:
+       case Xacid_3:
+       case Xacid_4:
+       case Xacid_5:
+       case Xacid_6:
+       case Xacid_7:
+       case Xacid_8:
+         Cave[y][x] = Yeater_eB;
+         if (Cave[y-1][x+2] == Xblank)
+           Cave[y-1][x+2] = Yacid_splash_eB;
+         if (Cave[y-1][x] == Xblank)
+           Cave[y-1][x] = Yacid_splash_wB;
+         Next[y][x] = Xblank;
+         PLAY(SAMPLE_acid);
+         goto loop;
+
+       case Xblank:
+       case Yacid_splash_eB:
+       case Yacid_splash_wB:
+       case Xplant:
+       case Yplant:
+       case Zplayer:
+         Cave[y][x] = Yeater_eB;
+         Cave[y][x+1] = Yeater_e;
+         Next[y][x] = Xblank;
+         Next[y][x+1] = Xeater_e;
+         goto loop;
+
+       default:
+         Next[y][x] = RANDOM & 1 ? Xeater_n : Xeater_s;
+         PLAY(SAMPLE_eater);
+         goto loop;
+      }
+
+    /* --------------------------------------------------------------------- */
+
+    case Xeater_s:
+      if (Cave[y][x-1] == Xdiamond)
+      {
+       Cave[y][x-1] = Ydiamond_eat;
+       Next[y][x-1] = Xblank;
+       play[SAMPLE_eater] = 1;
+       goto loop;
+      }
+
+      if (Cave[y-1][x] == Xdiamond)
+      {
+       Cave[y-1][x] = Ydiamond_eat;
+       Next[y-1][x] = Xblank;
+       play[SAMPLE_eater] = 1;
+       goto loop;
+      }
+
+      if (Cave[y][x+1] == Xdiamond)
+      {
+       Cave[y][x+1] = Ydiamond_eat;
+       Next[y][x+1] = Xblank;
+       play[SAMPLE_eater] = 1;
+       goto loop;
+      }
+
+      if (Cave[y+1][x] == Xdiamond)
+      {
+       Cave[y+1][x] = Ydiamond_eat;
+       Next[y+1][x] = Xblank;
+       play[SAMPLE_eater] = 1;
+       goto loop;
+      }
+
+      switch (Cave[y+1][x])
+      {
+       case Xacid_1:
+       case Xacid_2:
+       case Xacid_3:
+       case Xacid_4:
+       case Xacid_5:
+       case Xacid_6:
+       case Xacid_7:
+       case Xacid_8:
+         Cave[y][x] = Yeater_sB;
+         if (Cave[y][x+1] == Xblank)
+           Cave[y][x+1] = Yacid_splash_eB;
+         if (Cave[y][x-1] == Xblank)
+           Cave[y][x-1] = Yacid_splash_wB;
+         Next[y][x] = Xblank;
+         PLAY(SAMPLE_acid);
+         goto loop;
+
+       case Xblank:
+       case Yacid_splash_eB:
+       case Yacid_splash_wB:
+       case Xplant:
+       case Yplant:
+       case Zplayer:
+         Cave[y][x] = Yeater_sB;
+         Cave[y+1][x] = Yeater_s;
+         Next[y][x] = Xblank;
+         Next[y+1][x] = Xeater_s;
+         goto loop;
+
+       default:
+         Next[y][x] = RANDOM & 1 ? Xeater_e : Xeater_w;
+         PLAY(SAMPLE_eater);
+         goto loop;
+      }
+
+    /* --------------------------------------------------------------------- */
+
+    case Xeater_w:
+      if (Cave[y-1][x] == Xdiamond)
+      {
+       Cave[y-1][x] = Ydiamond_eat;
+       Next[y-1][x] = Xblank;
+       play[SAMPLE_eater] = 1;
+       goto loop;
+      }
+
+      if (Cave[y][x+1] == Xdiamond)
+      {
+       Cave[y][x+1] = Ydiamond_eat;
+       Next[y][x+1] = Xblank;
+       play[SAMPLE_eater] = 1;
+       goto loop;
+      }
+
+      if (Cave[y+1][x] == Xdiamond)
+      {
+       Cave[y+1][x] = Ydiamond_eat;
+       Next[y+1][x] = Xblank;
+       play[SAMPLE_eater] = 1;
+       goto loop;
+      }
+
+      if (Cave[y][x-1] == Xdiamond)
+      {
+       Cave[y][x-1] = Ydiamond_eat;
+       Next[y][x-1] = Xblank;
+       play[SAMPLE_eater] = 1;
+       goto loop;
+      }
+
+      switch (Cave[y][x-1])
+      {
+       case Xacid_1:
+       case Xacid_2:
+       case Xacid_3:
+       case Xacid_4:
+       case Xacid_5:
+       case Xacid_6:
+       case Xacid_7:
+       case Xacid_8:
+         Cave[y][x] = Yeater_wB;
+         if (Cave[y-1][x] == Xblank)
+           Cave[y-1][x] = Yacid_splash_eB;
+         if (Cave[y-1][x-2] == Xblank)
+           Cave[y-1][x-2] = Yacid_splash_wB;
+         Next[y][x] = Xblank;
+         PLAY(SAMPLE_acid);
+         goto loop;
+
+       case Xblank:
+       case Yacid_splash_eB:
+       case Yacid_splash_wB:
+       case Xplant:
+       case Yplant:
+       case Zplayer:
+         Cave[y][x] = Yeater_wB;
+         Cave[y][x-1] = Yeater_w;
+         Next[y][x] = Xblank;
+         Next[y][x-1] = Xeater_w;
+         goto loop;
+
+       default:
+         Next[y][x] = RANDOM & 1 ? Xeater_n : Xeater_s;
+         PLAY(SAMPLE_eater);
+         goto loop;
+      }
+
+    /* --------------------------------------------------------------------- */
+
+    case Xalien:
+      if (lev.wheel_cnt)
+      {
+       dx = lev.wheel_x;
+       dy = lev.wheel_y;
+      }
+      else if (ply1.alive && ply2.alive)
+      {
+       if ((ply1.x > x ? ply1.x - x : x - ply1.x) +
+           (ply1.y > y ? ply1.y - y : y - ply1.y) <
+           (ply2.x > x ? ply2.x - x : x - ply2.x) +
+           (ply2.y > y ? ply2.y - y : y - ply2.y))
+       {
+         dx = ply1.x;
+         dy = ply1.y;
+       }
+       else
+       {
+         dx = ply2.x;
+         dy = ply2.y;
+       }
+      }
+      else if (ply1.alive)
+      {
+       dx = ply1.x;
+       dy = ply1.y;
+      }
+      else if (ply2.alive)
+      {
+       dx = ply2.x;
+       dy = ply2.y;
+      }
+      else
+      {
+       dx = 0;
+       dy = 0;
+      }
+
+      if (RANDOM & 1)
+      {
+       if (y > dy)
+       {
+         switch (Cave[y-1][x])
+         {
+           case Xacid_1:
+           case Xacid_2:
+           case Xacid_3:
+           case Xacid_4:
+           case Xacid_5:
+           case Xacid_6:
+           case Xacid_7:
+           case Xacid_8:
+             Cave[y][x] = Yalien_nB;
+             if (Cave[y-2][x+1] == Xblank)
+               Cave[y-2][x+1] = Yacid_splash_eB;
+             if (Cave[y-2][x-1] == Xblank)
+               Cave[y-2][x-1] = Yacid_splash_wB;
+             Next[y][x] = Xblank;
+             PLAY(SAMPLE_acid);
+             goto loop;
+
+           case Xblank:
+           case Yacid_splash_eB:
+           case Yacid_splash_wB:
+           case Xplant:
+           case Yplant:
+           case Zplayer:
+             Cave[y][x] = Yalien_nB;
+             Cave[y-1][x] = Yalien_n;
+             Next[y][x] = Xblank;
+             Next[y-1][x] = Xalien_pause;
+             PLAY(SAMPLE_alien);
+             goto loop;
+         }
+       }
+       else if (y < dy)
+       {
+         switch (Cave[y+1][x])
+         {
+           case Xacid_1:
+           case Xacid_2:
+           case Xacid_3:
+           case Xacid_4:
+           case Xacid_5:
+           case Xacid_6:
+           case Xacid_7:
+           case Xacid_8:
+             Cave[y][x] = Yalien_sB;
+             Next[y][x] = Xblank;
+             if (Cave[y][x+1] == Xblank)
+               Cave[y][x+1] = Yacid_splash_eB;
+             if (Cave[y][x-1] == Xblank)
+               Cave[y][x-1] = Yacid_splash_wB;
+             PLAY(SAMPLE_acid);
+             goto loop;
+
+           case Xblank:
+           case Yacid_splash_eB:
+           case Yacid_splash_wB:
+           case Xplant:
+           case Yplant:
+           case Zplayer:
+             Cave[y][x] = Yalien_sB;
+             Cave[y+1][x] = Yalien_s;
+             Next[y][x] = Xblank;
+             Next[y+1][x] = Xalien_pause;
+             PLAY(SAMPLE_alien);
+             goto loop;
+         }
+       }
+      }
+      else
+      {
+       if (x < dx)
+       {
+         switch (Cave[y][x+1])
+         {
+           case Xacid_1:
+           case Xacid_2:
+           case Xacid_3:
+           case Xacid_4:
+           case Xacid_5:
+           case Xacid_6:
+           case Xacid_7:
+           case Xacid_8:
+             Cave[y][x] = Yalien_eB;
+             if (Cave[y-1][x+2] == Xblank)
+               Cave[y-1][x+2] = Yacid_splash_eB;
+             if (Cave[y-1][x] == Xblank)
+               Cave[y-1][x] = Yacid_splash_wB;
+             Next[y][x] = Xblank;
+             PLAY(SAMPLE_acid);
+             goto loop;
+
+           case Xblank:
+           case Yacid_splash_eB:
+           case Yacid_splash_wB:
+           case Xplant:
+           case Yplant:
+           case Zplayer:
+             Cave[y][x] = Yalien_eB;
+             Cave[y][x+1] = Yalien_e;
+             Next[y][x] = Xblank;
+             Next[y][x+1] = Xalien_pause;
+             PLAY(SAMPLE_alien);
+             goto loop;
+         }
+       }
+       else if (x > dx)
+       {
+         switch (Cave[y][x-1])
+         {
+           case Xacid_1:
+           case Xacid_2:
+           case Xacid_3:
+           case Xacid_4:
+           case Xacid_5:
+           case Xacid_6:
+           case Xacid_7:
+           case Xacid_8:
+             Cave[y][x] = Yalien_wB;
+             if (Cave[y-1][x] == Xblank)
+               Cave[y-1][x] = Yacid_splash_eB;
+             if (Cave[y-1][x-2] == Xblank)
+               Cave[y-1][x-2] = Yacid_splash_wB;
+             Next[y][x] = Xblank;
+             PLAY(SAMPLE_acid);
+             goto loop;
+
+           case Xblank:
+           case Yacid_splash_eB:
+           case Yacid_splash_wB:
+           case Xplant:
+           case Yplant:
+           case Zplayer:
+             Cave[y][x] = Yalien_wB;
+             Cave[y][x-1] = Yalien_w;
+             Next[y][x] = Xblank;
+             Next[y][x-1] = Xalien_pause;
+             PLAY(SAMPLE_alien);
+             goto loop;
+         }
+       }
+      }
+
+      goto loop;
+
+    case Xalien_pause:
+      Next[y][x] = Xalien;
+      goto loop;
+
+    /* --------------------------------------------------------------------- */
+
+    case Xemerald:
+      switch (Cave[y+1][x])
+      {
+       case Xacid_1:
+       case Xacid_2:
+       case Xacid_3:
+       case Xacid_4:
+       case Xacid_5:
+       case Xacid_6:
+       case Xacid_7:
+       case Xacid_8:
+         Cave[y][x] = Yemerald_sB;
+         if (Cave[y][x+1] == Xblank)
+           Cave[y][x+1] = Yacid_splash_eB;
+         if (Cave[y][x-1] == Xblank)
+           Cave[y][x-1] = Yacid_splash_wB;
+         Next[y][x] = Xblank;
+         PLAY(SAMPLE_acid);
+         goto loop;
+
+       case Xblank:
+       case Yacid_splash_eB:
+       case Yacid_splash_wB:
+         Cave[y][x] = Yemerald_sB;
+         Cave[y+1][x] = Yemerald_s;
+         Next[y][x] = Xblank;
+         Next[y+1][x] = Xemerald_fall;
+         goto loop;
+
+       case Xspring:
+       case Xspring_pause:
+       case Xspring_e:
+       case Xspring_w:
+       case Xandroid:
+       case Xandroid_1_n:
+       case Xandroid_2_n:
+       case Xandroid_1_e:
+       case Xandroid_2_e:
+       case Xandroid_1_s:
+       case Xandroid_2_s:
+       case Xandroid_1_w:
+       case Xandroid_2_w:
+       case Xstone:
+       case Xstone_pause:
+       case Xemerald:
+       case Xemerald_pause:
+       case Xdiamond:
+       case Xdiamond_pause:
+       case Xbomb:
+       case Xbomb_pause:
+       case Xballoon:
+       case Xacid_ne:
+       case Xacid_nw:
+       case Xball_1:
+       case Xball_2:
+       case Xnut:
+       case Xnut_pause:
+       case Xgrow_ns:
+       case Xgrow_ew:
+       case Xwonderwall:
+       case Xkey_1:
+       case Xkey_2:
+       case Xkey_3:
+       case Xkey_4:
+       case Xkey_5:
+       case Xkey_6:
+       case Xkey_7:
+       case Xkey_8:
+       case Xbumper:
+       case Xswitch:
+       case Xsteel_1:
+       case Xsteel_2:
+       case Xsteel_3:
+       case Xsteel_4:
+       case Xwall_1:
+       case Xwall_2:
+       case Xwall_3:
+       case Xwall_4:
+       case Xround_wall_1:
+       case Xround_wall_2:
+       case Xround_wall_3:
+       case Xround_wall_4:
+         if (RANDOM & 1)
+         {
+           if (tab_blank[Cave[y][x+1]] && tab_acid[Cave[y+1][x+1]])
+           {
+             Cave[y][x] = Yemerald_eB;
+             Cave[y][x+1] = Yemerald_e;
+             Next[y][x] = Xblank;
+             Next[y][x+1] = Xemerald_pause;
+             goto loop;
+           }
+
+           if (tab_blank[Cave[y][x-1]] && tab_acid[Cave[y+1][x-1]])
+           {
+             Cave[y][x] = Yemerald_wB;
+             Cave[y][x-1] = Yemerald_w;
+             Next[y][x] = Xblank;
+             Next[y][x-1] = Xemerald_pause;
+             goto loop;
+           }
+         }
+         else
+         {
+           if (tab_blank[Cave[y][x-1]] && tab_acid[Cave[y+1][x-1]])
+           {
+             Cave[y][x] = Yemerald_wB;
+             Cave[y][x-1] = Yemerald_w;
+             Next[y][x] = Xblank;
+             Next[y][x-1] = Xemerald_pause;
+             goto loop;
+           }
+
+           if (tab_blank[Cave[y][x+1]] && tab_acid[Cave[y+1][x+1]])
+           {
+             Cave[y][x] = Yemerald_eB;
+             Cave[y][x+1] = Yemerald_e;
+             Next[y][x] = Xblank;
+             Next[y][x+1] = Xemerald_pause;
+             goto loop;
+           }
+         }
+
+        default:
+         if (++lev.shine_cnt > 50)
+         {
+           lev.shine_cnt = RANDOM & 7;
+           Cave[y][x] = Xemerald_shine;
+         }
+
+         goto loop;
+      }
+
+    /* --------------------------------------------------------------------- */
+
+    case Xemerald_pause:
+      switch (Cave[y+1][x])
+      {
+       case Xacid_1:
+       case Xacid_2:
+       case Xacid_3:
+       case Xacid_4:
+       case Xacid_5:
+       case Xacid_6:
+       case Xacid_7:
+       case Xacid_8:
+         Cave[y][x] = Yemerald_sB;
+         if (Cave[y][x+1] == Xblank)
+           Cave[y][x+1] = Yacid_splash_eB;
+         if (Cave[y][x-1] == Xblank)
+           Cave[y][x-1] = Yacid_splash_wB;
+         Next[y][x] = Xblank;
+         PLAY(SAMPLE_acid);
+         goto loop;
+
+       case Xblank:
+       case Yacid_splash_eB:
+       case Yacid_splash_wB:
+         Cave[y][x] = Yemerald_sB;
+         Cave[y+1][x] = Yemerald_s;
+         Next[y][x] = Xblank;
+         Next[y+1][x] = Xemerald_fall;
+         goto loop;
+
+       default:
+         Cave[y][x] = Xemerald;
+         Next[y][x] = Xemerald;
+         goto loop;
+      }
+
+    /* --------------------------------------------------------------------- */
+
+    case Xemerald_fall:
+      switch (Cave[y+1][x])
+      {
+       case Xacid_1:
+       case Xacid_2:
+       case Xacid_3:
+       case Xacid_4:
+       case Xacid_5:
+       case Xacid_6:
+       case Xacid_7:
+       case Xacid_8:
+         Cave[y][x] = Yemerald_sB;
+         if (Cave[y][x+1] == Xblank)
+           Cave[y][x+1] = Yacid_splash_eB;
+         if (Cave[y][x-1] == Xblank)
+           Cave[y][x-1] = Yacid_splash_wB;
+         Next[y][x] = Xblank;
+         PLAY(SAMPLE_acid);
+         goto loop;
+
+       case Xblank:
+       case Yacid_splash_eB:
+       case Yacid_splash_wB:
+       case Zplayer:
+         Cave[y][x] = Yemerald_sB;
+         Cave[y+1][x] = Yemerald_s;
+         Next[y][x] = Xblank;
+         Next[y+1][x] = Xemerald_fall;
+         goto loop;
+
+       case Xwonderwall:
+         if (lev.wonderwall_time)
+         {
+           lev.wonderwall_state = 1;
+           Cave[y][x] = Yemerald_sB;
+           if (tab_blank[Cave[y+2][x]])
+           {
+             Cave[y+2][x] = Ydiamond_s;
+             Next[y+2][x] = Xdiamond_fall;
+           }
+
+           Next[y][x] = Xblank;
+           play[SAMPLE_squash] = 1;
+           goto loop;
+         }
+
+       default:
+         Cave[y][x] = Xemerald;
+         Next[y][x] = Xemerald;
+         PLAY(SAMPLE_diamond);
+         goto loop;
+      }
+
+    /* --------------------------------------------------------------------- */
+
+    case Xdiamond:
+      switch (Cave[y+1][x])
+      {
+       case Xacid_1:
+       case Xacid_2:
+       case Xacid_3:
+       case Xacid_4:
+       case Xacid_5:
+       case Xacid_6:
+       case Xacid_7:
+       case Xacid_8:
+         Cave[y][x] = Ydiamond_sB;
+         if (Cave[y][x+1] == Xblank)
+           Cave[y][x+1] = Yacid_splash_eB;
+         if (Cave[y][x-1] == Xblank)
+           Cave[y][x-1] = Yacid_splash_wB;
+         Next[y][x] = Xblank;
+         PLAY(SAMPLE_acid);
+         goto loop;
+
+       case Xblank:
+       case Yacid_splash_eB:
+       case Yacid_splash_wB:
+         Cave[y][x] = Ydiamond_sB;
+         Cave[y+1][x] = Ydiamond_s;
+         Next[y][x] = Xblank;
+         Next[y+1][x] = Xdiamond_fall;
+         goto loop;
+
+       case Xspring:
+       case Xspring_pause:
+       case Xspring_e:
+       case Xspring_w:
+       case Xandroid:
+       case Xandroid_1_n:
+       case Xandroid_2_n:
+       case Xandroid_1_e:
+       case Xandroid_2_e:
+       case Xandroid_1_s:
+       case Xandroid_2_s:
+       case Xandroid_1_w:
+       case Xandroid_2_w:
+       case Xstone:
+       case Xstone_pause:
+       case Xemerald:
+       case Xemerald_pause:
+       case Xdiamond:
+       case Xdiamond_pause:
+       case Xbomb:
+       case Xbomb_pause:
+       case Xballoon:
+       case Xacid_ne:
+       case Xacid_nw:
+       case Xball_1:
+       case Xball_2:
+       case Xnut:
+       case Xnut_pause:
+       case Xgrow_ns:
+       case Xgrow_ew:
+       case Xwonderwall:
+       case Xkey_1:
+       case Xkey_2:
+       case Xkey_3:
+       case Xkey_4:
+       case Xkey_5:
+       case Xkey_6:
+       case Xkey_7:
+       case Xkey_8:
+       case Xbumper:
+       case Xswitch:
+       case Xsteel_1:
+       case Xsteel_2:
+       case Xsteel_3:
+       case Xsteel_4:
+       case Xwall_1:
+       case Xwall_2:
+       case Xwall_3:
+       case Xwall_4:
+       case Xround_wall_1:
+       case Xround_wall_2:
+       case Xround_wall_3:
+       case Xround_wall_4:
+         if (RANDOM & 1)
+         {
+           if (tab_blank[Cave[y][x+1]] && tab_acid[Cave[y+1][x+1]])
+           {
+             Cave[y][x] = Ydiamond_eB;
+             Cave[y][x+1] = Ydiamond_e;
+             Next[y][x] = Xblank;
+             Next[y][x+1] = Xdiamond_pause;
+             goto loop;
+           }
+
+           if (tab_blank[Cave[y][x-1]] && tab_acid[Cave[y+1][x-1]])
+           {
+             Cave[y][x] = Ydiamond_wB;
+             Cave[y][x-1] = Ydiamond_w;
+             Next[y][x] = Xblank;
+             Next[y][x-1] = Xdiamond_pause;
+             goto loop;
+           }
+         }
+         else
+         {
+           if (tab_blank[Cave[y][x-1]] && tab_acid[Cave[y+1][x-1]])
+           {
+             Cave[y][x] = Ydiamond_wB;
+             Cave[y][x-1] = Ydiamond_w;
+             Next[y][x] = Xblank;
+             Next[y][x-1] = Xdiamond_pause;
+             goto loop;
+           }
+
+           if (tab_blank[Cave[y][x+1]] && tab_acid[Cave[y+1][x+1]])
+           {
+             Cave[y][x] = Ydiamond_eB;
+             Cave[y][x+1] = Ydiamond_e;
+             Next[y][x] = Xblank;
+             Next[y][x+1] = Xdiamond_pause;
+             goto loop;
+           }
+         }
+
+       default:
+         if (++lev.shine_cnt > 50)
+         {
+           lev.shine_cnt = RANDOM & 7;
+           Cave[y][x] = Xdiamond_shine;
+         }
+
+         goto loop;
+      }
+
+    /* --------------------------------------------------------------------- */
+
+    case Xdiamond_pause:
+      switch (Cave[y+1][x])
+      {
+       case Xacid_1:
+       case Xacid_2:
+       case Xacid_3:
+       case Xacid_4:
+       case Xacid_5:
+       case Xacid_6:
+       case Xacid_7:
+       case Xacid_8:
+         Cave[y][x] = Ydiamond_sB;
+         if (Cave[y][x+1] == Xblank)
+           Cave[y][x+1] = Yacid_splash_eB;
+         if (Cave[y][x-1] == Xblank)
+           Cave[y][x-1] = Yacid_splash_wB;
+         Next[y][x] = Xblank;
+         PLAY(SAMPLE_acid);
+         goto loop;
+
+       case Xblank:
+       case Yacid_splash_eB:
+       case Yacid_splash_wB:
+         Cave[y][x] = Ydiamond_sB;
+         Cave[y+1][x] = Ydiamond_s;
+         Next[y][x] = Xblank;
+         Next[y+1][x] = Xdiamond_fall;
+         goto loop;
+
+       default:
+         Cave[y][x] = Xdiamond;
+         Next[y][x] = Xdiamond;
+         goto loop;
+      }
+
+    /* --------------------------------------------------------------------- */
+
+    case Xdiamond_fall:
+      switch (Cave[y+1][x])
+      {
+       case Xacid_1:
+       case Xacid_2:
+       case Xacid_3:
+       case Xacid_4:
+       case Xacid_5:
+       case Xacid_6:
+       case Xacid_7:
+       case Xacid_8:
+         Cave[y][x] = Ydiamond_sB;
+         if (Cave[y][x+1] == Xblank)
+           Cave[y][x+1] = Yacid_splash_eB;
+         if (Cave[y][x-1] == Xblank)
+           Cave[y][x-1] = Yacid_splash_wB;
+         Next[y][x] = Xblank;
+         PLAY(SAMPLE_acid);
+         goto loop;
+
+       case Xblank:
+       case Yacid_splash_eB:
+       case Yacid_splash_wB:
+       case Zplayer:
+         Cave[y][x] = Ydiamond_sB;
+         Cave[y+1][x] = Ydiamond_s;
+         Next[y][x] = Xblank;
+         Next[y+1][x] = Xdiamond_fall;
+         goto loop;
+
+       case Xwonderwall:
+         if (lev.wonderwall_time)
+         {
+           lev.wonderwall_state = 1;
+           Cave[y][x] = Ydiamond_sB;
+           if (tab_blank[Cave[y+2][x]])
+           {
+             Cave[y+2][x] = Ystone_s;
+             Next[y+2][x] = Xstone_fall;
+           }
+
+           Next[y][x] = Xblank;
+           play[SAMPLE_squash] = 1;
+           goto loop;
+         }
+
+       default:
+         Cave[y][x] = Xdiamond;
+         Next[y][x] = Xdiamond;
+         PLAY(SAMPLE_diamond);
+         goto loop;
+      }
+
+    /* --------------------------------------------------------------------- */
+
+    case Xdrip_fall:
+      switch (Cave[y+1][x])
+      {
+       case Xacid_1:
+       case Xacid_2:
+       case Xacid_3:
+       case Xacid_4:
+       case Xacid_5:
+       case Xacid_6:
+       case Xacid_7:
+       case Xacid_8:
+         Cave[y][x] = Ydrip_s1B;
+         if (Cave[y][x+1] == Xblank)
+           Cave[y][x+1] = Yacid_splash_eB;
+         if (Cave[y][x-1] == Xblank)
+           Cave[y][x-1] = Yacid_splash_wB;
+         Next[y][x] = Xdrip_stretchB;
+         PLAY(SAMPLE_acid);
+         goto loop;
+
+       case Xblank:
+       case Yacid_splash_eB:
+       case Yacid_splash_wB:
+       case Xplant:
+       case Yplant:
+       case Zplayer:
+         Cave[y][x] = Ydrip_s1B;
+         Cave[y+1][x] = Ydrip_s1;
+         Next[y][x] = Xdrip_stretchB;
+         Next[y+1][x] = Xdrip_stretch;
+         goto loop;
+
+       default:
+         switch (RANDOM & 7)
+         {
+           case 0:
+             temp = Xameuba_1;
+             break;
+
+           case 1:
+             temp = Xameuba_2;
+             break;
+
+           case 2:
+             temp = Xameuba_3;
+             break;
+
+           case 3:
+             temp = Xameuba_4;
+             break;
+
+           case 4:
+             temp = Xameuba_5;
+             break;
+
+           case 5:
+             temp = Xameuba_6;
+             break;
+
+           case 6:
+             temp = Xameuba_7;
+             break;
+
+           case 7:
+             temp = Xameuba_8;
+             break;
+         }
+
+         Cave[y][x] = temp;
+         Next[y][x] = temp;
+         play[SAMPLE_drip] = 1;
+         goto loop;
+      }
+
+    /* --------------------------------------------------------------------- */
+
+    case Xdrip_stretch:
+      Cave[y][x] = Ydrip_s2;
+      Next[y][x] = Xdrip_fall;
+      goto loop;
+
+    case Xdrip_stretchB:
+      Cave[y][x] = Ydrip_s2B;
+      Next[y][x] = Xblank;
+      goto loop;
+
+    case Xdrip_eat:
+      Next[y][x] = Xdrip_fall;
+      goto loop;
+
+    /* --------------------------------------------------------------------- */
+
+    case Xbomb:
+      switch (Cave[y+1][x])
+      {
+       case Xacid_1:
+       case Xacid_2:
+       case Xacid_3:
+       case Xacid_4:
+       case Xacid_5:
+       case Xacid_6:
+       case Xacid_7:
+       case Xacid_8:
+         Cave[y][x] = Ybomb_sB;
+         if (Cave[y][x+1] == Xblank)
+           Cave[y][x+1] = Yacid_splash_eB;
+         if (Cave[y][x-1] == Xblank)
+           Cave[y][x-1] = Yacid_splash_wB;
+         Next[y][x] = Xblank;
+         PLAY(SAMPLE_acid);
+         goto loop;
+
+       case Xblank:
+       case Yacid_splash_eB:
+       case Yacid_splash_wB:
+         Cave[y][x] = Ybomb_sB;
+         Cave[y+1][x] = Ybomb_s;
+         Next[y][x] = Xblank;
+         Next[y+1][x] = Xbomb_fall;
+         goto loop;
+
+       case Xspring:
+       case Xspring_pause:
+       case Xspring_e:
+       case Xspring_w:
+       case Xandroid:
+       case Xandroid_1_n:
+       case Xandroid_2_n:
+       case Xandroid_1_e:
+       case Xandroid_2_e:
+       case Xandroid_1_s:
+       case Xandroid_2_s:
+       case Xandroid_1_w:
+       case Xandroid_2_w:
+       case Xstone:
+       case Xstone_pause:
+       case Xemerald:
+       case Xemerald_pause:
+       case Xdiamond:
+       case Xdiamond_pause:
+       case Xbomb:
+       case Xbomb_pause:
+       case Xballoon:
+       case Xacid_ne:
+       case Xacid_nw:
+       case Xball_1:
+       case Xball_2:
+       case Xnut:
+       case Xnut_pause:
+       case Xgrow_ns:
+       case Xgrow_ew:
+       case Xkey_1:
+       case Xkey_2:
+       case Xkey_3:
+       case Xkey_4:
+       case Xkey_5:
+       case Xkey_6:
+       case Xkey_7:
+       case Xkey_8:
+       case Xbumper:
+       case Xswitch:
+       case Xround_wall_1:
+       case Xround_wall_2:
+       case Xround_wall_3:
+       case Xround_wall_4:
+         if (RANDOM & 1)
+         {
+           if (tab_blank[Cave[y][x+1]] && tab_acid[Cave[y+1][x+1]])
+           {
+             Cave[y][x] = Ybomb_eB;
+             Cave[y][x+1] = Ybomb_e;
+             Next[y][x] = Xblank;
+             Next[y][x+1] = Xbomb_pause;
+             goto loop;
+           }
+
+           if (tab_blank[Cave[y][x-1]] && tab_acid[Cave[y+1][x-1]])
+           {
+             Cave[y][x] = Ybomb_wB;
+             Cave[y][x-1] = Ybomb_w;
+             Next[y][x] = Xblank;
+             Next[y][x-1] = Xbomb_pause;
+             goto loop;
+           }
+         }
+         else
+         {
+           if (tab_blank[Cave[y][x-1]] && tab_acid[Cave[y+1][x-1]])
+           {
+             Cave[y][x] = Ybomb_wB;
+             Cave[y][x-1] = Ybomb_w;
+             Next[y][x] = Xblank;
+             Next[y][x-1] = Xbomb_pause;
+             goto loop;
+           }
+
+           if (tab_blank[Cave[y][x+1]] && tab_acid[Cave[y+1][x+1]])
+           {
+             Cave[y][x] = Ybomb_eB;
+             Cave[y][x+1] = Ybomb_e;
+             Next[y][x] = Xblank;
+             Next[y][x+1] = Xbomb_pause;
+             goto loop;
+           }
+         }
+
+       default:
+         goto loop;
+      }
+
+    /* --------------------------------------------------------------------- */
+
+    case Xbomb_pause:
+      switch (Cave[y+1][x])
+      {
+       case Xacid_1:
+       case Xacid_2:
+       case Xacid_3:
+       case Xacid_4:
+       case Xacid_5:
+       case Xacid_6:
+       case Xacid_7:
+       case Xacid_8:
+         Cave[y][x] = Ybomb_sB;
+         if (Cave[y][x+1] == Xblank)
+           Cave[y][x+1] = Yacid_splash_eB;
+         if (Cave[y][x-1] == Xblank)
+           Cave[y][x-1] = Yacid_splash_wB;
+         Next[y][x] = Xblank;
+         PLAY(SAMPLE_acid);
+         goto loop;
+
+       case Xblank:
+       case Yacid_splash_eB:
+       case Yacid_splash_wB:
+         Cave[y][x] = Ybomb_sB;
+         Cave[y+1][x] = Ybomb_s;
+         Next[y][x] = Xblank;
+         Next[y+1][x] = Xbomb_fall;
+         goto loop;
+
+       default:
+         Cave[y][x] = Xbomb;
+         Next[y][x] = Xbomb;
+         goto loop;
+      }
+
+    /* --------------------------------------------------------------------- */
+
+    case Xbomb_fall:
+      switch (Cave[y+1][x])
+      {
+       case Xacid_1:
+       case Xacid_2:
+       case Xacid_3:
+       case Xacid_4:
+       case Xacid_5:
+       case Xacid_6:
+       case Xacid_7:
+       case Xacid_8:
+         Cave[y][x] = Ybomb_sB;
+         if (Cave[y][x+1] == Xblank)
+           Cave[y][x+1] = Yacid_splash_eB;
+         if (Cave[y][x-1] == Xblank)
+           Cave[y][x-1] = Yacid_splash_wB;
+         Next[y][x] = Xblank;
+         PLAY(SAMPLE_acid);
+         goto loop;
+
+       case Xblank:
+       case Yacid_splash_eB:
+       case Yacid_splash_wB:
+         Cave[y][x] = Ybomb_sB;
+         Cave[y+1][x] = Ybomb_s;
+         Next[y][x] = Xblank;
+         Next[y+1][x] = Xbomb_fall;
+         goto loop;
+
+       default:
+         Cave[y][x] = Ybomb_eat;
+         Next[y][x] = Znormal;
+         Boom[y-1][x-1] = Xblank;
+         Boom[y-1][x] = Xblank;
+         Boom[y-1][x+1] = Xblank;
+         Boom[y][x-1] = Xblank;
+         Boom[y][x] = Xblank;
+         Boom[y][x+1] = Xblank;
+         Boom[y+1][x-1] = Xblank;
+         Boom[y+1][x] = Xblank;
+         Boom[y+1][x+1] = Xblank;
+         goto loop;
+      }
+
+    /* --------------------------------------------------------------------- */
+
+    case Xballoon:
+      if (lev.wind_cnt == 0)
+       goto loop;
+
+      switch (lev.wind_direction)
+      {
+       case 0: /* north */
+         switch (Cave[y-1][x])
+         {
+           case Xacid_1:
+           case Xacid_2:
+           case Xacid_3:
+           case Xacid_4:
+           case Xacid_5:
+           case Xacid_6:
+           case Xacid_7:
+           case Xacid_8:
+             Cave[y][x] = Yballoon_nB;
+             if (Cave[y-2][x+1] == Xblank)
+               Cave[y-2][x+1] = Yacid_splash_eB;
+             if (Cave[y-2][x-1] == Xblank)
+               Cave[y-2][x-1] = Yacid_splash_wB;
+             Next[y][x] = Xblank;
+             PLAY(SAMPLE_acid);
+             goto loop;
+
+           case Xblank:
+           case Yacid_splash_eB:
+           case Yacid_splash_wB:
+             Cave[y][x] = Yballoon_nB;
+             Cave[y-1][x] = Yballoon_n;
+             Next[y][x] = Xblank;
+             Next[y-1][x] = Xballoon;
+             goto loop;
+
+           default:
+             goto loop;
+         }
+
+        case 1: /* east */
+         switch (Cave[y][x+1])
+         {
+           case Xacid_1:
+           case Xacid_2:
+           case Xacid_3:
+           case Xacid_4:
+           case Xacid_5:
+           case Xacid_6:
+           case Xacid_7:
+           case Xacid_8:
+             Cave[y][x] = Yballoon_eB;
+             if (Cave[y-1][x+2] == Xblank)
+               Cave[y-1][x+2] = Yacid_splash_eB;
+             if (Cave[y-1][x] == Xblank)
+               Cave[y-1][x] = Yacid_splash_wB;
+             Next[y][x] = Xblank;
+             PLAY(SAMPLE_acid);
+             goto loop;
+
+           case Xblank:
+           case Yacid_splash_eB:
+           case Yacid_splash_wB:
+             Cave[y][x] = Yballoon_eB;
+             Cave[y][x+1] = Yballoon_e;
+             Next[y][x] = Xblank;
+             Next[y][x+1] = Xballoon;
+             goto loop;
+
+           default:
+             goto loop;
+         }
+
+        case 2: /* south */
+         switch (Cave[y+1][x])
+         {
+           case Xacid_1:
+           case Xacid_2:
+           case Xacid_3:
+           case Xacid_4:
+           case Xacid_5:
+           case Xacid_6:
+           case Xacid_7:
+           case Xacid_8:
+             Cave[y][x] = Yballoon_sB;
+             if (Cave[y][x+1] == Xblank)
+               Cave[y][x+1] = Yacid_splash_eB;
+             if (Cave[y][x-1] == Xblank)
+               Cave[y][x-1] = Yacid_splash_wB;
+             Next[y][x] = Xblank;
+             PLAY(SAMPLE_acid);
+             goto loop;
+
+           case Xblank:
+           case Yacid_splash_eB:
+           case Yacid_splash_wB:
+             Cave[y][x] = Yballoon_sB;
+             Cave[y+1][x] = Yballoon_s;
+             Next[y][x] = Xblank;
+             Next[y+1][x] = Xballoon;
+             goto loop;
+
+           default:
+             goto loop;
+         }
+
+        case 3: /* west */
+         switch (Cave[y][x-1])
+         {
+           case Xacid_1:
+           case Xacid_2:
+           case Xacid_3:
+           case Xacid_4:
+           case Xacid_5:
+           case Xacid_6:
+           case Xacid_7:
+           case Xacid_8:
+             Cave[y][x] = Yballoon_wB;
+             if (Cave[y-1][x] == Xblank)
+               Cave[y-1][x] = Yacid_splash_eB;
+             if (Cave[y-1][x-2] == Xblank)
+               Cave[y-1][x-2] = Yacid_splash_wB;
+             Next[y][x] = Xblank;
+             PLAY(SAMPLE_acid);
+             goto loop;
+
+           case Xblank:
+           case Yacid_splash_eB:
+           case Yacid_splash_wB:
+             Cave[y][x] = Yballoon_wB;
+             Cave[y][x-1] = Yballoon_w;
+             Next[y][x] = Xblank;
+             Next[y][x-1] = Xballoon;
+             goto loop;
+
+           default:
+             goto loop;
+         }
+      }
+
+    /* --------------------------------------------------------------------- */
+
+    case Xacid_1:
+      Next[y][x] = Xacid_2;
+      goto loop;
+
+    case Xacid_2:
+      Next[y][x] = Xacid_3;
+      goto loop;
+
+    case Xacid_3:
+      Next[y][x] = Xacid_4;
+      goto loop;
+
+    case Xacid_4:
+      Next[y][x] = Xacid_5;
+      goto loop;
+
+    case Xacid_5:
+      Next[y][x] = Xacid_6;
+      goto loop;
+
+    case Xacid_6:
+      Next[y][x] = Xacid_7;
+      goto loop;
+
+    case Xacid_7:
+      Next[y][x] = Xacid_8;
+      goto loop;
+
+    case Xacid_8:
+      Next[y][x] = Xacid_1;
+      goto loop;
+
+    /* --------------------------------------------------------------------- */
+
+    case Xball_1:
+      if (lev.ball_state == 0)
+       goto loop;
+
+      Cave[y][x] = Xball_1B;
+      Next[y][x] = Xball_2;
+      if (lev.ball_cnt)
+       goto loop;
+
+      goto ball_common;
+
+    case Xball_2:
+      if (lev.ball_state == 0)
+       goto loop;
+
+      Cave[y][x] = Xball_2B;
+      Next[y][x] = Xball_1;
+      if (lev.ball_cnt)
+       goto loop;
+
+      goto ball_common;
+
+    ball_common:
+
+      play[SAMPLE_ball] = 1;
+      if (lev.ball_random)
+      {
+       switch (RANDOM & 7)
+       {
+         case 0:
+           if (lev.ball_array[lev.ball_pos][0] != Xblank &&
+               tab_blank[Cave[y-1][x-1]])
+           {
+             Cave[y-1][x-1] = Yball_eat;
+             Next[y-1][x-1] = lev.ball_array[lev.ball_pos][0];
+           }
+           break;
+
+         case 1:
+           if (lev.ball_array[lev.ball_pos][1] != Xblank &&
+               tab_blank[Cave[y-1][x]])
+           {
+             Cave[y-1][x] = Yball_eat;
+             Next[y-1][x] = lev.ball_array[lev.ball_pos][1];
+           }
+           break;
+
+         case 2:
+           if (lev.ball_array[lev.ball_pos][2] != Xblank &&
+               tab_blank[Cave[y-1][x+1]])
+           {
+             Cave[y-1][x+1] = Yball_eat;
+             Next[y-1][x+1] = lev.ball_array[lev.ball_pos][2];
+           }
+           break;
+
+         case 3:
+           if (lev.ball_array[lev.ball_pos][3] != Xblank &&
+               tab_blank[Cave[y][x-1]])
+           {
+             Cave[y][x-1] = Yball_eat;
+             Next[y][x-1] = lev.ball_array[lev.ball_pos][3];
+           }
+           break;
+
+         case 4:
+           if (lev.ball_array[lev.ball_pos][4] != Xblank &&
+               tab_blank[Cave[y][x+1]])
+           {
+             Cave[y][x+1] = Yball_eat;
+             Next[y][x+1] = lev.ball_array[lev.ball_pos][4];
+           }
+           break;
+
+         case 5:
+           if (lev.ball_array[lev.ball_pos][5] != Xblank &&
+               tab_blank[Cave[y+1][x-1]])
+           {
+             Cave[y+1][x-1] = Yball_eat;
+             Next[y+1][x-1] = lev.ball_array[lev.ball_pos][5];
+           }
+           break;
+
+         case 6:
+           if (lev.ball_array[lev.ball_pos][6] != Xblank &&
+               tab_blank[Cave[y+1][x]])
+           {
+             Cave[y+1][x] = Yball_eat;
+             Next[y+1][x] = lev.ball_array[lev.ball_pos][6];
+           }
+           break;
+
+         case 7:
+           if (lev.ball_array[lev.ball_pos][7] != Xblank &&
+               tab_blank[Cave[y+1][x+1]])
+           {
+             Cave[y+1][x+1] = Yball_eat;
+             Next[y+1][x+1] = lev.ball_array[lev.ball_pos][7];
+           }
+           break;
+       }
+      }
+      else
+      {
+       if (lev.ball_array[lev.ball_pos][0] != Xblank &&
+           tab_blank[Cave[y-1][x-1]])
+       {
+         Cave[y-1][x-1] = Yball_eat;
+         Next[y-1][x-1] = lev.ball_array[lev.ball_pos][0];
+       }
+
+       if (lev.ball_array[lev.ball_pos][1] != Xblank &&
+           tab_blank[Cave[y-1][x]])
+       {
+         Cave[y-1][x] = Yball_eat;
+         Next[y-1][x] = lev.ball_array[lev.ball_pos][1];
+       }
+
+       if (lev.ball_array[lev.ball_pos][2] != Xblank &&
+           tab_blank[Cave[y-1][x+1]])
+       {
+         Cave[y-1][x+1] = Yball_eat;
+         Next[y-1][x+1] = lev.ball_array[lev.ball_pos][2];
+       }
+
+       if (lev.ball_array[lev.ball_pos][3] != Xblank &&
+           tab_blank[Cave[y][x-1]])
+       {
+         Cave[y][x-1] = Yball_eat;
+         Next[y][x-1] = lev.ball_array[lev.ball_pos][3];
+       }
+
+       if (lev.ball_array[lev.ball_pos][4] != Xblank &&
+           tab_blank[Cave[y][x+1]])
+       {
+         Cave[y][x+1] = Yball_eat;
+         Next[y][x+1] = lev.ball_array[lev.ball_pos][4];
+       }
+
+       if (lev.ball_array[lev.ball_pos][5] != Xblank &&
+           tab_blank[Cave[y+1][x-1]])
+       {
+         Cave[y+1][x-1] = Yball_eat;
+         Next[y+1][x-1] = lev.ball_array[lev.ball_pos][5];
+       }
+
+       if (lev.ball_array[lev.ball_pos][6] != Xblank &&
+           tab_blank[Cave[y+1][x]])
+       {
+         Cave[y+1][x] = Yball_eat;
+         Next[y+1][x] = lev.ball_array[lev.ball_pos][6];
+       }
+
+       if (lev.ball_array[lev.ball_pos][7] != Xblank &&
+           tab_blank[Cave[y+1][x+1]])
+       {
+         Cave[y+1][x+1] = Yball_eat;
+         Next[y+1][x+1] = lev.ball_array[lev.ball_pos][7];
+       }
+      }
+
+      lev.ball_pos = (lev.ball_pos + 1) & 7;
+      goto loop;
+
+    /* --------------------------------------------------------------------- */
+
+    case Xgrow_ns:
+      if (tab_blank[Cave[y-1][x]])
+      {
+       Cave[y-1][x] = Ygrow_ns_eat;
+       Next[y-1][x] = Xgrow_ns;
+       play[SAMPLE_grow] = 1;
+      }
+
+      if (tab_blank[Cave[y+1][x]])
+      {
+       Cave[y+1][x] = Ygrow_ns_eat;
+       Next[y+1][x] = Xgrow_ns;
+       play[SAMPLE_grow] = 1;
+      }
+
+      goto loop;
+
+    case Xgrow_ew:
+      if (tab_blank[Cave[y][x+1]])
+      {
+       Cave[y][x+1] = Ygrow_ew_eat;
+       Next[y][x+1] = Xgrow_ew;
+       play[SAMPLE_grow] = 1;
+      }
+
+      if (tab_blank[Cave[y][x-1]])
+      {
+       Cave[y][x-1] = Ygrow_ew_eat;
+       Next[y][x-1] = Xgrow_ew;
+       play[SAMPLE_grow] = 1;
+      }
+
+      goto loop;
+
+    /* --------------------------------------------------------------------- */
+
+    case Xwonderwall:
+      if (lev.wonderwall_time && lev.wonderwall_state)
+      {
+       Cave[y][x] = XwonderwallB;
+       play[SAMPLE_wonder] = 1;
+      }
+
+      goto loop;
+
+    /* --------------------------------------------------------------------- */
+
+    case Xexit:
+      if (lev.required > 0)
+       goto loop;
+
+      temp = RANDOM & 63;
+      if (temp < 21)
+      {
+       Cave[y][x] = Xexit_1;
+       Next[y][x] = Xexit_2;
+      }
+      else if (temp < 42)
+      {
+       Cave[y][x] = Xexit_2;
+       Next[y][x] = Xexit_3;
+      }
+      else
+      {
+       Cave[y][x] = Xexit_3;
+       Next[y][x] = Xexit_1;
+      }
+
+      goto loop;
+
+    case Xexit_1:
+      Next[y][x] = Xexit_2;
+      goto loop;
+
+    case Xexit_2:
+      Next[y][x] = Xexit_3;
+      goto loop;
+
+    case Xexit_3:
+      Next[y][x] = Xexit_1;
+      goto loop;
+
+    /* --------------------------------------------------------------------- */
+
+    case Xdynamite_1:
+      play[SAMPLE_tick] = 1;
+      Next[y][x] = Xdynamite_2;
+      goto loop;
+
+    case Xdynamite_2:
+      play[SAMPLE_tick] = 1;
+      Next[y][x] = Xdynamite_3;
+      goto loop;
+
+    case Xdynamite_3:
+      play[SAMPLE_tick] = 1;
+      Next[y][x] = Xdynamite_4;
+      goto loop;
+
+    case Xdynamite_4:
+      play[SAMPLE_tick] = 1;
+      Next[y][x] = Zdynamite;
+      Boom[y-1][x-1] = Xblank;
+      Boom[y-1][x] = Xblank;
+      Boom[y-1][x+1] = Xblank;
+      Boom[y][x-1] = Xblank;
+      Boom[y][x] = Xblank;
+      Boom[y][x+1] = Xblank;
+      Boom[y+1][x-1] = Xblank;
+      Boom[y+1][x] = Xblank;
+      Boom[y+1][x+1] = Xblank;
+      goto loop;
+
+    /* --------------------------------------------------------------------- */
+
+    case Xwheel:
+      if (lev.wheel_cnt && x == lev.wheel_x && y == lev.wheel_y)
+       Cave[y][x] = XwheelB;
+      goto loop;
+
+    /* --------------------------------------------------------------------- */
+
+    case Xswitch:
+      if (lev.ball_state)
+       Cave[y][x] = XswitchB;
+      goto loop;
+
+    /* --------------------------------------------------------------------- */
+
+    case Xsand_stone:
+      switch (Cave[y+1][x])
+      {
+       case Xacid_1:
+       case Xacid_2:
+       case Xacid_3:
+       case Xacid_4:
+       case Xacid_5:
+       case Xacid_6:
+       case Xacid_7:
+       case Xacid_8:
+         Cave[y][x] = Xsand_stonesand_3;
+         if (Cave[y][x+1] == Xblank)
+           Cave[y][x+1] = Yacid_splash_eB;
+         if (Cave[y][x-1] == Xblank)
+           Cave[y][x-1] = Yacid_splash_wB;
+         Next[y][x] = Xsand_stonesand_4;
+         PLAY(SAMPLE_acid);
+         goto loop;
+
+       case Xblank:
+       case Yacid_splash_eB:
+       case Yacid_splash_wB:
+         Cave[y][x] = Xsand_stonesand_3;
+         Cave[y+1][x] = Xsand_stoneout_1;
+         Next[y][x] = Xsand_stonesand_4;
+         Next[y+1][x] = Xsand_stoneout_2;
+         goto loop;
+
+       case Xsand:
+         Cave[y][x] = Xsand_stonesand_1;
+         Cave[y+1][x] = Xsand_sandstone_1;
+         Next[y][x] = Xsand_stonesand_2;
+         Next[y+1][x] = Xsand_sandstone_2;
+         goto loop;
+
+       default:
+         goto loop;
+      }
+
+    case Xsand_stonein_1:
+      Next[y][x] = Xsand_stonein_2;
+      goto loop;
+
+    case Xsand_stonein_2:
+      Next[y][x] = Xsand_stonein_3;
+      goto loop;
+
+    case Xsand_stonein_3:
+      Next[y][x] = Xsand_stonein_4;
+      goto loop;
+
+    case Xsand_stonein_4:
+      Next[y][x] = Xblank;
+      goto loop;
+
+    case Xsand_stonesand_1:
+      Next[y][x] = Xsand_stonesand_2;
+      goto loop;
+
+    case Xsand_stonesand_2:
+      Next[y][x] = Xsand_stonesand_3;
+      goto loop;
+
+    case Xsand_stonesand_3:
+      Next[y][x] = Xsand_stonesand_4;
+      goto loop;
+
+    case Xsand_stonesand_4:
+      Next[y][x] = Xsand;
+      goto loop;
+
+    case Xsand_stoneout_1:
+      Next[y][x] = Xsand_stoneout_2;
+      goto loop;
+
+    case Xsand_stoneout_2:
+      Next[y][x] = Xstone_fall;
+      goto loop;
+
+    case Xsand_sandstone_1:
+      Next[y][x] = Xsand_sandstone_2;
+      goto loop;
+
+    case Xsand_sandstone_2:
+      Next[y][x] = Xsand_sandstone_3;
+      goto loop;
+
+    case Xsand_sandstone_3:
+      Next[y][x] = Xsand_sandstone_4;
+      goto loop;
+
+    case Xsand_sandstone_4:
+      Next[y][x] = Xsand_stone;
+      goto loop;
+
+    /* --------------------------------------------------------------------- */
+
+    case Xdripper:
+      if (lev.lenses_cnt)
+       Cave[y][x] = XdripperB;
+      goto loop;
+
+    /* --------------------------------------------------------------------- */
+
+    case Xfake_blank:
+      if (lev.lenses_cnt)
+       Cave[y][x] = Xfake_blankB;
+      goto loop;
+
+    /* --------------------------------------------------------------------- */
+
+    case Xfake_grass:
+      if (lev.magnify_cnt)
+       Cave[y][x] = Xfake_grassB;
+      goto loop;
+
+    /* --------------------------------------------------------------------- */
+
+    case Xfake_door_1:
+      if (lev.magnify_cnt)
+       Cave[y][x] = Xdoor_1;
+      goto loop;
+
+    case Xfake_door_2:
+      if (lev.magnify_cnt)
+       Cave[y][x] = Xdoor_2;
+      goto loop;
+
+    case Xfake_door_3:
+      if (lev.magnify_cnt)
+       Cave[y][x] = Xdoor_3;
+      goto loop;
+
+    case Xfake_door_4:
+      if (lev.magnify_cnt)
+       Cave[y][x] = Xdoor_4;
+      goto loop;
+
+    case Xfake_door_5:
+      if (lev.magnify_cnt)
+       Cave[y][x] = Xdoor_5;
+      goto loop;
+
+    case Xfake_door_6:
+      if (lev.magnify_cnt)
+       Cave[y][x] = Xdoor_6;
+      goto loop;
+
+    case Xfake_door_7:
+      if (lev.magnify_cnt)
+       Cave[y][x] = Xdoor_7;
+      goto loop;
+
+    case Xfake_door_8:
+      if (lev.magnify_cnt)
+       Cave[y][x] = Xdoor_8;
+      goto loop;
+
+    /* --------------------------------------------------------------------- */
+
+    case Xboom_bug:
+      bug_boom:
+      Next[y][x] = Znormal;
+      Boom[y-1][x-1] = Xemerald;
+      Boom[y-1][x] = Xemerald;
+      Boom[y-1][x+1] = Xemerald;
+      Boom[y][x-1] = Xemerald;
+      Boom[y][x] = Xdiamond;
+      Boom[y][x+1] = Xemerald;
+      Boom[y+1][x-1] = Xemerald;
+      Boom[y+1][x] = Xemerald;
+      Boom[y+1][x+1] = Xemerald;
+      goto loop;
+
+    case Xboom_bomb:
+
+    tank_boom:
+
+      Next[y][x] = Znormal;
+      Boom[y-1][x-1] = Xblank;
+      Boom[y-1][x] = Xblank;
+      Boom[y-1][x+1] = Xblank;
+      Boom[y][x-1] = Xblank;
+      Boom[y][x] = Xblank;
+      Boom[y][x+1] = Xblank;
+      Boom[y+1][x-1] = Xblank;
+      Boom[y+1][x] = Xblank;
+      Boom[y+1][x+1] = Xblank;
+      goto loop;
+
+    case Xboom_android:
+    case Xboom_1:
+      Next[y][x] = Xboom_2;
+      play[SAMPLE_boom] = 1;
+      goto loop;
+
+    case Xboom_2:
+      Next[y][x] = Boom[y][x];
+      goto loop;
+
+    /* --------------------------------------------------------------------- */
+
+    case ZBORDER:
+      if (++y < HEIGHT - 1)
+      {
+       x = 0;
+       cave_cache = Cave[y];
+       goto loop;
+      }
+
+      goto done;
+  }
+
+#undef RANDOM
+#undef PLAY
+#undef PLAY_FORCE
+
+ done:
+
+  if (ply1.alive || ply2.alive)
+    lev.score += score; /* only get a score if someone is alive */
+
+  Random = random;
+
+  {
+    void *temp = Cave;
+
+    /* triple buffering */
+    Cave = Next;
+    Next = Draw;
+    Draw = temp;
+  }
 }
 
 #endif
index 45022e44284fca403c9b8ee992258ba2dceb3f8f..d47741f9a7a53cc1078ba3eceaccb6d2afae930f 100644 (file)
 
 void synchro_3(void)
 {
-       register unsigned int x;
-       register unsigned int y;
-       register unsigned int count;
-       register unsigned long random;
-
-/* update variables */
-       if(lev.score > 9999) lev.score = 9999;
-
-       if(lev.time) lev.time--;
-       if(lev.android_move_cnt-- == 0) lev.android_move_cnt = lev.android_move_time;
-       if(lev.android_clone_cnt-- == 0) lev.android_clone_cnt = lev.android_clone_time;
-       if(lev.ball_state) if(lev.ball_cnt-- == 0) lev.ball_cnt = lev.ball_time;
-       if(lev.lenses_cnt) lev.lenses_cnt--;
-       if(lev.magnify_cnt) lev.magnify_cnt--;
-       if(lev.wheel_cnt) lev.wheel_cnt--;
-       if(lev.wind_cnt) lev.wind_cnt--;
-       if(lev.wonderwall_time && lev.wonderwall_state) lev.wonderwall_time--;
-
-       if(lev.time > 0 && lev.time <= 50 && lev.time % 5 == 0) play[SAMPLE_time] = 1;
-       if(lev.wheel_cnt) play[SAMPLE_wheel] = 1;
-
-/* grow ameuba */
-       random = Random;
-       for(count = lev.ameuba_time; count--;) {
-               x = (random >> 10) % (WIDTH - 2);
-               y = (random >> 20) % (HEIGHT - 2);
-               switch(Cave[y][x]) {
-               case Xblank:
-               case Yacid_splash_eB:
-               case Yacid_splash_wB:
-               case Xgrass:
-               case Xdirt:
-               case Xsand:
-               case Xplant:
-               case Yplant:
-                       if(tab_ameuba[Cave[y-1][x]] || tab_ameuba[Cave[y][x+1]] || tab_ameuba[Cave[y+1][x]] || tab_ameuba[Cave[y][x-1]]) Cave[y][x] = Xdrip_eat;
-               }
-               random = random * 129 + 1;
-       }
-       Random = random;
-
-/* handle explosions */
-       for(y = 1; y < HEIGHT - 1; y++) for(x = 1; x < WIDTH - 1; x++) {
-               switch(Cave[y][x]) {
-               case Znormal:
-                       Cave[y][x] = Xboom_1;
-                       Cave[y-1][x] = tab_explode_normal[Cave[y-1][x]];
-                       Cave[y][x-1] = tab_explode_normal[Cave[y][x-1]];
-                       Cave[y][x+1] = tab_explode_normal[Cave[y][x+1]];
-                       Cave[y+1][x] = tab_explode_normal[Cave[y+1][x]];
-                       Cave[y-1][x-1] = tab_explode_normal[Cave[y-1][x-1]];
-                       Cave[y-1][x+1] = tab_explode_normal[Cave[y-1][x+1]];
-                       Cave[y+1][x-1] = tab_explode_normal[Cave[y+1][x-1]];
-                       Cave[y+1][x+1] = tab_explode_normal[Cave[y+1][x+1]];
-                       break;
-               case Zdynamite:
-                       Cave[y][x] = Xboom_1;
-                       Cave[y-1][x] = tab_explode_dynamite[Cave[y-1][x]];
-                       Cave[y][x-1] = tab_explode_dynamite[Cave[y][x-1]];
-                       Cave[y][x+1] = tab_explode_dynamite[Cave[y][x+1]];
-                       Cave[y+1][x] = tab_explode_dynamite[Cave[y+1][x]];
-                       Cave[y-1][x-1] = tab_explode_dynamite[Cave[y-1][x-1]];
-                       Cave[y-1][x+1] = tab_explode_dynamite[Cave[y-1][x+1]];
-                       Cave[y+1][x-1] = tab_explode_dynamite[Cave[y+1][x-1]];
-                       Cave[y+1][x+1] = tab_explode_dynamite[Cave[y+1][x+1]];
-                       break;
-               }
-       }
-
-/* triple buffering */
-       for(y = 0; y < HEIGHT; y++) for(x = 0; x < WIDTH; x++) {
-               Next[y][x] = Cave[y][x];
-       }
+  register unsigned int x;
+  register unsigned int y;
+  register unsigned int count;
+  register unsigned long random;
+
+  /* update variables */
+
+  if (lev.score > 9999)
+    lev.score = 9999;
+
+  if (lev.time)
+    lev.time--;
+  if (lev.android_move_cnt-- == 0)
+    lev.android_move_cnt = lev.android_move_time;
+  if (lev.android_clone_cnt-- == 0)
+    lev.android_clone_cnt = lev.android_clone_time;
+  if (lev.ball_state)
+    if (lev.ball_cnt-- == 0)
+      lev.ball_cnt = lev.ball_time;
+  if (lev.lenses_cnt)
+    lev.lenses_cnt--;
+  if (lev.magnify_cnt)
+    lev.magnify_cnt--;
+  if (lev.wheel_cnt)
+    lev.wheel_cnt--;
+  if (lev.wind_cnt)
+    lev.wind_cnt--;
+  if (lev.wonderwall_time && lev.wonderwall_state)
+    lev.wonderwall_time--;
+
+  if (lev.time > 0 && lev.time <= 50 && lev.time % 5 == 0)
+    play[SAMPLE_time] = 1;
+
+  if (lev.wheel_cnt)
+    play[SAMPLE_wheel] = 1;
+
+  /* grow ameuba */
+
+  random = Random;
+
+  for (count = lev.ameuba_time; count--;)
+  {
+    x = (random >> 10) % (WIDTH - 2);
+    y = (random >> 20) % (HEIGHT - 2);
+    switch (Cave[y][x])
+    {
+      case Xblank:
+      case Yacid_splash_eB:
+      case Yacid_splash_wB:
+      case Xgrass:
+      case Xdirt:
+      case Xsand:
+      case Xplant:
+      case Yplant:
+       if (tab_ameuba[Cave[y-1][x]] ||
+           tab_ameuba[Cave[y][x+1]] ||
+           tab_ameuba[Cave[y+1][x]] ||
+           tab_ameuba[Cave[y][x-1]])
+         Cave[y][x] = Xdrip_eat;
+    }
+
+    random = random * 129 + 1;
+  }
+
+  Random = random;
+
+  /* handle explosions */
+
+  for (y = 1; y < HEIGHT - 1; y++)
+    for (x = 1; x < WIDTH - 1; x++)
+    {
+      switch (Cave[y][x])
+      {
+        case Znormal:
+         Cave[y][x] = Xboom_1;
+         Cave[y-1][x] = tab_explode_normal[Cave[y-1][x]];
+         Cave[y][x-1] = tab_explode_normal[Cave[y][x-1]];
+         Cave[y][x+1] = tab_explode_normal[Cave[y][x+1]];
+         Cave[y+1][x] = tab_explode_normal[Cave[y+1][x]];
+         Cave[y-1][x-1] = tab_explode_normal[Cave[y-1][x-1]];
+         Cave[y-1][x+1] = tab_explode_normal[Cave[y-1][x+1]];
+         Cave[y+1][x-1] = tab_explode_normal[Cave[y+1][x-1]];
+         Cave[y+1][x+1] = tab_explode_normal[Cave[y+1][x+1]];
+         break;
+
+        case Zdynamite:
+         Cave[y][x] = Xboom_1;
+         Cave[y-1][x] = tab_explode_dynamite[Cave[y-1][x]];
+         Cave[y][x-1] = tab_explode_dynamite[Cave[y][x-1]];
+         Cave[y][x+1] = tab_explode_dynamite[Cave[y][x+1]];
+         Cave[y+1][x] = tab_explode_dynamite[Cave[y+1][x]];
+         Cave[y-1][x-1] = tab_explode_dynamite[Cave[y-1][x-1]];
+         Cave[y-1][x+1] = tab_explode_dynamite[Cave[y-1][x+1]];
+         Cave[y+1][x-1] = tab_explode_dynamite[Cave[y+1][x-1]];
+         Cave[y+1][x+1] = tab_explode_dynamite[Cave[y+1][x+1]];
+         break;
+      }
+    }
+
+  /* triple buffering */
+
+  for (y = 0; y < HEIGHT; y++)
+    for (x = 0; x < WIDTH; x++)
+      Next[y][x] = Cave[y][x];
 }
 
 #endif
index 5f0f086c9f6919f232a22840733bc2868b4134f0..0af10d72169ef93cafc69655f6d88027c1af3ba8 100644 (file)
 #define BAD_ROLL
 #define BAD_SPRING
 
-enum {
-       Xblank = 0, /* still */
-       Yacid_splash_eB, /* hmm */
-       Yacid_splash_wB, /* hmm */
+enum
+{
+  Xblank = 0, /* still */
+  Yacid_splash_eB, /* hmm */
+  Yacid_splash_wB, /* hmm */
 
 #ifdef BAD_ROLL
-       Xstone_force_e, /* only use these in eater */
-       Xstone_force_w,
-       Xnut_force_e,
-       Xnut_force_w,
-       Xspring_force_e,
-       Xspring_force_w,
-       Xemerald_force_e,
-       Xemerald_force_w,
-       Xdiamond_force_e,
-       Xdiamond_force_w,
-       Xbomb_force_e,
-       Xbomb_force_w,
+  Xstone_force_e, /* only use these in eater */
+  Xstone_force_w,
+  Xnut_force_e,
+  Xnut_force_w,
+  Xspring_force_e,
+  Xspring_force_w,
+  Xemerald_force_e,
+  Xemerald_force_w,
+  Xdiamond_force_e,
+  Xdiamond_force_w,
+  Xbomb_force_e,
+  Xbomb_force_w,
 #endif
 
-       Xstone,
-       Xstone_pause,
-       Xstone_fall,
-       Ystone_s,
-       Ystone_sB,
-       Ystone_e,
-       Ystone_eB,
-       Ystone_w,
-       Ystone_wB,
-       Xnut,
-       Xnut_pause,
-       Xnut_fall,
-       Ynut_s,
-       Ynut_sB,
-       Ynut_e,
-       Ynut_eB,
-       Ynut_w,
-       Ynut_wB,
-       Xbug_n,
-       Xbug_e,
-       Xbug_s,
-       Xbug_w,
-       Xbug_gon,
-       Xbug_goe,
-       Xbug_gos,
-       Xbug_gow,
-       Ybug_n,
-       Ybug_nB,
-       Ybug_e,
-       Ybug_eB,
-       Ybug_s,
-       Ybug_sB,
-       Ybug_w,
-       Ybug_wB,
-       Ybug_w_n,
-       Ybug_n_e,
-       Ybug_e_s,
-       Ybug_s_w,
-       Ybug_e_n,
-       Ybug_s_e,
-       Ybug_w_s,
-       Ybug_n_w,
-       Ybug_stone,
-       Ybug_spring,
-       Xtank_n,
-       Xtank_e,
-       Xtank_s,
-       Xtank_w,
-       Xtank_gon,
-       Xtank_goe,
-       Xtank_gos,
-       Xtank_gow,
-       Ytank_n,
-       Ytank_nB,
-       Ytank_e,
-       Ytank_eB,
-       Ytank_s,
-       Ytank_sB,
-       Ytank_w,
-       Ytank_wB,
-       Ytank_w_n,
-       Ytank_n_e,
-       Ytank_e_s,
-       Ytank_s_w,
-       Ytank_e_n,
-       Ytank_s_e,
-       Ytank_w_s,
-       Ytank_n_w,
-       Ytank_stone,
-       Ytank_spring,
-       Xandroid,
-       Xandroid_1_n,
-       Xandroid_2_n,
-       Xandroid_1_e,
-       Xandroid_2_e,
-       Xandroid_1_w,
-       Xandroid_2_w,
-       Xandroid_1_s,
-       Xandroid_2_s,
-       Yandroid_n,
-       Yandroid_nB,
-       Yandroid_ne,
-       Yandroid_neB,
-       Yandroid_e,
-       Yandroid_eB,
-       Yandroid_se,
-       Yandroid_seB,
-       Yandroid_s,
-       Yandroid_sB,
-       Yandroid_sw,
-       Yandroid_swB,
-       Yandroid_w,
-       Yandroid_wB,
-       Yandroid_nw,
-       Yandroid_nwB,
-       Xspring,
-       Xspring_pause,
-       Xspring_e,
-       Xspring_w,
-       Xspring_fall,
-       Yspring_s,
-       Yspring_sB,
-       Yspring_e,
-       Yspring_eB,
-       Yspring_w,
-       Yspring_wB,
-       Yspring_kill_e,
-       Yspring_kill_eB,
-       Yspring_kill_w,
-       Yspring_kill_wB,
-       Xeater_n,
-       Xeater_e,
-       Xeater_w,
-       Xeater_s,
-       Yeater_n,
-       Yeater_nB,
-       Yeater_e,
-       Yeater_eB,
-       Yeater_s,
-       Yeater_sB,
-       Yeater_w,
-       Yeater_wB,
-       Yeater_stone,
-       Yeater_spring,
-       Xalien,
-       Xalien_pause,
-       Yalien_n,
-       Yalien_nB,
-       Yalien_e,
-       Yalien_eB,
-       Yalien_s,
-       Yalien_sB,
-       Yalien_w,
-       Yalien_wB,
-       Yalien_stone,
-       Yalien_spring,
-       Xemerald,
-       Xemerald_pause,
-       Xemerald_fall,
-       Xemerald_shine,
-       Yemerald_s,
-       Yemerald_sB,
-       Yemerald_e,
-       Yemerald_eB,
-       Yemerald_w,
-       Yemerald_wB,
-       Yemerald_eat,
-       Yemerald_stone,
-       Xdiamond,
-       Xdiamond_pause,
-       Xdiamond_fall,
-       Xdiamond_shine,
-       Ydiamond_s,
-       Ydiamond_sB,
-       Ydiamond_e,
-       Ydiamond_eB,
-       Ydiamond_w,
-       Ydiamond_wB,
-       Ydiamond_eat,
-       Ydiamond_stone,
-       Xdrip_fall,
-       Xdrip_stretch,
-       Xdrip_stretchB,
-       Xdrip_eat,
-       Ydrip_s1,
-       Ydrip_s1B,
-       Ydrip_s2,
-       Ydrip_s2B,
-       Xbomb,
-       Xbomb_pause,
-       Xbomb_fall,
-       Ybomb_s,
-       Ybomb_sB,
-       Ybomb_e,
-       Ybomb_eB,
-       Ybomb_w,
-       Ybomb_wB,
-       Ybomb_eat,
-       Xballoon,
-       Yballoon_n,
-       Yballoon_nB,
-       Yballoon_e,
-       Yballoon_eB,
-       Yballoon_s,
-       Yballoon_sB,
-       Yballoon_w,
-       Yballoon_wB,
-       Xgrass,
-       Ygrass_nB,
-       Ygrass_eB,
-       Ygrass_sB,
-       Ygrass_wB,
-       Xdirt,
-       Ydirt_nB,
-       Ydirt_eB,
-       Ydirt_sB,
-       Ydirt_wB,
-       Xacid_ne,
-       Xacid_se,
-       Xacid_s,
-       Xacid_sw,
-       Xacid_nw,
-       Xacid_1,
-       Xacid_2,
-       Xacid_3,
-       Xacid_4,
-       Xacid_5,
-       Xacid_6,
-       Xacid_7,
-       Xacid_8,
-       Xball_1,
-       Xball_1B,
-       Xball_2,
-       Xball_2B,
-       Yball_eat,
-       Xgrow_ns,
-       Ygrow_ns_eat,
-       Xgrow_ew,
-       Ygrow_ew_eat,
-       Xwonderwall,
-       XwonderwallB,
-       Xameuba_1,
-       Xameuba_2,
-       Xameuba_3,
-       Xameuba_4,
-       Xameuba_5,
-       Xameuba_6,
-       Xameuba_7,
-       Xameuba_8,
-       Xdoor_1,
-       Xdoor_2,
-       Xdoor_3,
-       Xdoor_4,
-       Xdoor_5,
-       Xdoor_6,
-       Xdoor_7,
-       Xdoor_8,
-       Xkey_1,
-       Xkey_2,
-       Xkey_3,
-       Xkey_4,
-       Xkey_5,
-       Xkey_6,
-       Xkey_7,
-       Xkey_8,
-       Xwind_n,
-       Xwind_e,
-       Xwind_s,
-       Xwind_w,
-       Xwind_nesw,
-       Xwind_stop,
-       Xexit,
-       Xexit_1,
-       Xexit_2,
-       Xexit_3,
-       Xdynamite,
-       Ydynamite_eat,
-       Xdynamite_1,
-       Xdynamite_2,
-       Xdynamite_3,
-       Xdynamite_4,
-       Xbumper,
-       XbumperB,
-       Xwheel,
-       XwheelB,
-       Xswitch,
-       XswitchB,
-       Xsand,
-       Xsand_stone,
-       Xsand_stonein_1,
-       Xsand_stonein_2,
-       Xsand_stonein_3,
-       Xsand_stonein_4,
-       Xsand_stonesand_1,
-       Xsand_stonesand_2,
-       Xsand_stonesand_3,
-       Xsand_stonesand_4,
-       Xsand_stoneout_1,
-       Xsand_stoneout_2,
-       Xsand_sandstone_1,
-       Xsand_sandstone_2,
-       Xsand_sandstone_3,
-       Xsand_sandstone_4,
-       Xplant,
-       Yplant,
-       Xlenses,
-       Xmagnify,
-       Xdripper,
-       XdripperB,
-       Xfake_blank,
-       Xfake_blankB,
-       Xfake_grass,
-       Xfake_grassB,
-       Xfake_door_1,
-       Xfake_door_2,
-       Xfake_door_3,
-       Xfake_door_4,
-       Xfake_door_5,
-       Xfake_door_6,
-       Xfake_door_7,
-       Xfake_door_8,
-       Xsteel_1,
-       Xsteel_2,
-       Xsteel_3,
-       Xsteel_4,
-       Xwall_1,
-       Xwall_2,
-       Xwall_3,
-       Xwall_4,
-       Xround_wall_1,
-       Xround_wall_2,
-       Xround_wall_3,
-       Xround_wall_4,
-       Xdecor_1,
-       Xdecor_2,
-       Xdecor_3,
-       Xdecor_4,
-       Xdecor_5,
-       Xdecor_6,
-       Xdecor_7,
-       Xdecor_8,
-       Xdecor_9,
-       Xdecor_10,
-       Xdecor_11,
-       Xdecor_12,
-       Xalpha_0,
-       Xalpha_1,
-       Xalpha_2,
-       Xalpha_3,
-       Xalpha_4,
-       Xalpha_5,
-       Xalpha_6,
-       Xalpha_7,
-       Xalpha_8,
-       Xalpha_9,
-       Xalpha_excla,
-       Xalpha_quote,
-       Xalpha_comma,
-       Xalpha_minus,
-       Xalpha_perio,
-       Xalpha_colon,
-       Xalpha_quest,
-       Xalpha_a,
-       Xalpha_b,
-       Xalpha_c,
-       Xalpha_d,
-       Xalpha_e,
-       Xalpha_f,
-       Xalpha_g,
-       Xalpha_h,
-       Xalpha_i,
-       Xalpha_j,
-       Xalpha_k,
-       Xalpha_l,
-       Xalpha_m,
-       Xalpha_n,
-       Xalpha_o,
-       Xalpha_p,
-       Xalpha_q,
-       Xalpha_r,
-       Xalpha_s,
-       Xalpha_t,
-       Xalpha_u,
-       Xalpha_v,
-       Xalpha_w,
-       Xalpha_x,
-       Xalpha_y,
-       Xalpha_z,
-       Xalpha_arrow_e,
-       Xalpha_arrow_w,
-       Xalpha_copyr,
+  Xstone,
+  Xstone_pause,
+  Xstone_fall,
+  Ystone_s,
+  Ystone_sB,
+  Ystone_e,
+  Ystone_eB,
+  Ystone_w,
+  Ystone_wB,
+  Xnut,
+  Xnut_pause,
+  Xnut_fall,
+  Ynut_s,
+  Ynut_sB,
+  Ynut_e,
+  Ynut_eB,
+  Ynut_w,
+  Ynut_wB,
+  Xbug_n,
+  Xbug_e,
+  Xbug_s,
+  Xbug_w,
+  Xbug_gon,
+  Xbug_goe,
+  Xbug_gos,
+  Xbug_gow,
+  Ybug_n,
+  Ybug_nB,
+  Ybug_e,
+  Ybug_eB,
+  Ybug_s,
+  Ybug_sB,
+  Ybug_w,
+  Ybug_wB,
+  Ybug_w_n,
+  Ybug_n_e,
+  Ybug_e_s,
+  Ybug_s_w,
+  Ybug_e_n,
+  Ybug_s_e,
+  Ybug_w_s,
+  Ybug_n_w,
+  Ybug_stone,
+  Ybug_spring,
+  Xtank_n,
+  Xtank_e,
+  Xtank_s,
+  Xtank_w,
+  Xtank_gon,
+  Xtank_goe,
+  Xtank_gos,
+  Xtank_gow,
+  Ytank_n,
+  Ytank_nB,
+  Ytank_e,
+  Ytank_eB,
+  Ytank_s,
+  Ytank_sB,
+  Ytank_w,
+  Ytank_wB,
+  Ytank_w_n,
+  Ytank_n_e,
+  Ytank_e_s,
+  Ytank_s_w,
+  Ytank_e_n,
+  Ytank_s_e,
+  Ytank_w_s,
+  Ytank_n_w,
+  Ytank_stone,
+  Ytank_spring,
+  Xandroid,
+  Xandroid_1_n,
+  Xandroid_2_n,
+  Xandroid_1_e,
+  Xandroid_2_e,
+  Xandroid_1_w,
+  Xandroid_2_w,
+  Xandroid_1_s,
+  Xandroid_2_s,
+  Yandroid_n,
+  Yandroid_nB,
+  Yandroid_ne,
+  Yandroid_neB,
+  Yandroid_e,
+  Yandroid_eB,
+  Yandroid_se,
+  Yandroid_seB,
+  Yandroid_s,
+  Yandroid_sB,
+  Yandroid_sw,
+  Yandroid_swB,
+  Yandroid_w,
+  Yandroid_wB,
+  Yandroid_nw,
+  Yandroid_nwB,
+  Xspring,
+  Xspring_pause,
+  Xspring_e,
+  Xspring_w,
+  Xspring_fall,
+  Yspring_s,
+  Yspring_sB,
+  Yspring_e,
+  Yspring_eB,
+  Yspring_w,
+  Yspring_wB,
+  Yspring_kill_e,
+  Yspring_kill_eB,
+  Yspring_kill_w,
+  Yspring_kill_wB,
+  Xeater_n,
+  Xeater_e,
+  Xeater_w,
+  Xeater_s,
+  Yeater_n,
+  Yeater_nB,
+  Yeater_e,
+  Yeater_eB,
+  Yeater_s,
+  Yeater_sB,
+  Yeater_w,
+  Yeater_wB,
+  Yeater_stone,
+  Yeater_spring,
+  Xalien,
+  Xalien_pause,
+  Yalien_n,
+  Yalien_nB,
+  Yalien_e,
+  Yalien_eB,
+  Yalien_s,
+  Yalien_sB,
+  Yalien_w,
+  Yalien_wB,
+  Yalien_stone,
+  Yalien_spring,
+  Xemerald,
+  Xemerald_pause,
+  Xemerald_fall,
+  Xemerald_shine,
+  Yemerald_s,
+  Yemerald_sB,
+  Yemerald_e,
+  Yemerald_eB,
+  Yemerald_w,
+  Yemerald_wB,
+  Yemerald_eat,
+  Yemerald_stone,
+  Xdiamond,
+  Xdiamond_pause,
+  Xdiamond_fall,
+  Xdiamond_shine,
+  Ydiamond_s,
+  Ydiamond_sB,
+  Ydiamond_e,
+  Ydiamond_eB,
+  Ydiamond_w,
+  Ydiamond_wB,
+  Ydiamond_eat,
+  Ydiamond_stone,
+  Xdrip_fall,
+  Xdrip_stretch,
+  Xdrip_stretchB,
+  Xdrip_eat,
+  Ydrip_s1,
+  Ydrip_s1B,
+  Ydrip_s2,
+  Ydrip_s2B,
+  Xbomb,
+  Xbomb_pause,
+  Xbomb_fall,
+  Ybomb_s,
+  Ybomb_sB,
+  Ybomb_e,
+  Ybomb_eB,
+  Ybomb_w,
+  Ybomb_wB,
+  Ybomb_eat,
+  Xballoon,
+  Yballoon_n,
+  Yballoon_nB,
+  Yballoon_e,
+  Yballoon_eB,
+  Yballoon_s,
+  Yballoon_sB,
+  Yballoon_w,
+  Yballoon_wB,
+  Xgrass,
+  Ygrass_nB,
+  Ygrass_eB,
+  Ygrass_sB,
+  Ygrass_wB,
+  Xdirt,
+  Ydirt_nB,
+  Ydirt_eB,
+  Ydirt_sB,
+  Ydirt_wB,
+  Xacid_ne,
+  Xacid_se,
+  Xacid_s,
+  Xacid_sw,
+  Xacid_nw,
+  Xacid_1,
+  Xacid_2,
+  Xacid_3,
+  Xacid_4,
+  Xacid_5,
+  Xacid_6,
+  Xacid_7,
+  Xacid_8,
+  Xball_1,
+  Xball_1B,
+  Xball_2,
+  Xball_2B,
+  Yball_eat,
+  Xgrow_ns,
+  Ygrow_ns_eat,
+  Xgrow_ew,
+  Ygrow_ew_eat,
+  Xwonderwall,
+  XwonderwallB,
+  Xameuba_1,
+  Xameuba_2,
+  Xameuba_3,
+  Xameuba_4,
+  Xameuba_5,
+  Xameuba_6,
+  Xameuba_7,
+  Xameuba_8,
+  Xdoor_1,
+  Xdoor_2,
+  Xdoor_3,
+  Xdoor_4,
+  Xdoor_5,
+  Xdoor_6,
+  Xdoor_7,
+  Xdoor_8,
+  Xkey_1,
+  Xkey_2,
+  Xkey_3,
+  Xkey_4,
+  Xkey_5,
+  Xkey_6,
+  Xkey_7,
+  Xkey_8,
+  Xwind_n,
+  Xwind_e,
+  Xwind_s,
+  Xwind_w,
+  Xwind_nesw,
+  Xwind_stop,
+  Xexit,
+  Xexit_1,
+  Xexit_2,
+  Xexit_3,
+  Xdynamite,
+  Ydynamite_eat,
+  Xdynamite_1,
+  Xdynamite_2,
+  Xdynamite_3,
+  Xdynamite_4,
+  Xbumper,
+  XbumperB,
+  Xwheel,
+  XwheelB,
+  Xswitch,
+  XswitchB,
+  Xsand,
+  Xsand_stone,
+  Xsand_stonein_1,
+  Xsand_stonein_2,
+  Xsand_stonein_3,
+  Xsand_stonein_4,
+  Xsand_stonesand_1,
+  Xsand_stonesand_2,
+  Xsand_stonesand_3,
+  Xsand_stonesand_4,
+  Xsand_stoneout_1,
+  Xsand_stoneout_2,
+  Xsand_sandstone_1,
+  Xsand_sandstone_2,
+  Xsand_sandstone_3,
+  Xsand_sandstone_4,
+  Xplant,
+  Yplant,
+  Xlenses,
+  Xmagnify,
+  Xdripper,
+  XdripperB,
+  Xfake_blank,
+  Xfake_blankB,
+  Xfake_grass,
+  Xfake_grassB,
+  Xfake_door_1,
+  Xfake_door_2,
+  Xfake_door_3,
+  Xfake_door_4,
+  Xfake_door_5,
+  Xfake_door_6,
+  Xfake_door_7,
+  Xfake_door_8,
+  Xsteel_1,
+  Xsteel_2,
+  Xsteel_3,
+  Xsteel_4,
+  Xwall_1,
+  Xwall_2,
+  Xwall_3,
+  Xwall_4,
+  Xround_wall_1,
+  Xround_wall_2,
+  Xround_wall_3,
+  Xround_wall_4,
+  Xdecor_1,
+  Xdecor_2,
+  Xdecor_3,
+  Xdecor_4,
+  Xdecor_5,
+  Xdecor_6,
+  Xdecor_7,
+  Xdecor_8,
+  Xdecor_9,
+  Xdecor_10,
+  Xdecor_11,
+  Xdecor_12,
+  Xalpha_0,
+  Xalpha_1,
+  Xalpha_2,
+  Xalpha_3,
+  Xalpha_4,
+  Xalpha_5,
+  Xalpha_6,
+  Xalpha_7,
+  Xalpha_8,
+  Xalpha_9,
+  Xalpha_excla,
+  Xalpha_quote,
+  Xalpha_comma,
+  Xalpha_minus,
+  Xalpha_perio,
+  Xalpha_colon,
+  Xalpha_quest,
+  Xalpha_a,
+  Xalpha_b,
+  Xalpha_c,
+  Xalpha_d,
+  Xalpha_e,
+  Xalpha_f,
+  Xalpha_g,
+  Xalpha_h,
+  Xalpha_i,
+  Xalpha_j,
+  Xalpha_k,
+  Xalpha_l,
+  Xalpha_m,
+  Xalpha_n,
+  Xalpha_o,
+  Xalpha_p,
+  Xalpha_q,
+  Xalpha_r,
+  Xalpha_s,
+  Xalpha_t,
+  Xalpha_u,
+  Xalpha_v,
+  Xalpha_w,
+  Xalpha_x,
+  Xalpha_y,
+  Xalpha_z,
+  Xalpha_arrow_e,
+  Xalpha_arrow_w,
+  Xalpha_copyr,
 
-       Xboom_bug, /* passed from explode to synchro (linked explosion); transition to explode_normal */
-       Xboom_bomb, /* passed from explode to synchro (linked explosion); transition to explode_normal */
-       Xboom_android, /* passed from explode to synchro; transition to boom_2 */
-       Xboom_1, /* passed from explode to synchro; transition to boom_2 */
-       Xboom_2, /* transition to boom[] */
+  Xboom_bug, /* passed from explode to synchro (linked explosion); transition to explode_normal */
+  Xboom_bomb, /* passed from explode to synchro (linked explosion); transition to explode_normal */
+  Xboom_android, /* passed from explode to synchro; transition to boom_2 */
+  Xboom_1, /* passed from explode to synchro; transition to boom_2 */
+  Xboom_2, /* transition to boom[] */
 
-       Znormal, /* no picture */ /* this tile is passed from synchro to explode, only in next[] */
-       Zdynamite, /* no picture */ /* this tile is passed from synchro to explode, only in next[] */
-       Zplayer, /* no picture */ /* special code to indicate player */
-       ZBORDER, /* no picture */ /* special code to indicate border */
+  Znormal, /* no picture */ /* this tile is passed from synchro to explode, only in next[] */
+  Zdynamite, /* no picture */ /* this tile is passed from synchro to explode, only in next[] */
+  Zplayer, /* no picture */ /* special code to indicate player */
+  ZBORDER, /* no picture */ /* special code to indicate border */
 
-       TILE_MAX
+  TILE_MAX
 };
 
-enum {
-       SPR_still = 0,
-       SPR_walk = 1,
-       SPR_push = 5,
-       SPR_spray = 9,
-       SPR_MAX = 13
+enum
+{
+  SPR_still = 0,
+  SPR_walk = 1,
+  SPR_push = 5,
+  SPR_spray = 9,
+  SPR_MAX = 13
 };
 
 extern unsigned char tab_blank[TILE_MAX];