-#define COMPILE_DATE_STRING "[2004-08-21 16:45]"
+#define COMPILE_DATE_STRING "[2004-08-21 19:09]"
*/
int cave_convert(char *filename)
{
- int result;
- FILE *file;
- int actual;
- unsigned long length;
- unsigned char buffer[16384];
-
- clear();
-
- file = fopen(filename, "rb");
- if(file == 0) {
- fprintf(stderr, "%s: \"%s\": %s: %s\n", progname, filename, "open error", strerror(errno));
- result = 1;
- goto fail;
- }
- actual = fread(buffer, 1, 16384, file);
- if(actual == -1) {
- fprintf(stderr, "%s: \"%s\": %s: %s\n", progname, filename, "read error", strerror(errno));
- result = 1;
- goto fail;
- }
- length = actual;
- fclose(file);
- file = 0;
-
- if(clean_emerald(buffer, &length)) {
- fprintf(stderr, "%s: \"%s\": %s\n", progname, filename, "unrecognized format");
- result = 1; goto fail;
- }
- convert_emerald(buffer);
-
- result = 0;
-fail:
- if(file) fclose(file);
- return(result);
+ int result;
+ FILE *file;
+ int actual;
+ unsigned long length;
+ unsigned char buffer[16384];
+
+ clear();
+
+ file = fopen(filename, "rb");
+ if (file == 0)
+ {
+ fprintf(stderr, "%s: \"%s\": %s: %s\n", progname, filename, "open error",
+ strerror(errno));
+ result = 1;
+ goto fail;
+ }
+
+ actual = fread(buffer, 1, 16384, file);
+ if (actual == -1)
+ {
+ fprintf(stderr, "%s: \"%s\": %s: %s\n", progname, filename, "read error",
+ strerror(errno));
+ result = 1;
+ goto fail;
+ }
+
+ length = actual;
+ fclose(file);
+ file = 0;
+
+ if (clean_emerald(buffer, &length))
+ {
+ fprintf(stderr, "%s: \"%s\": %s\n", progname, filename,
+ "unrecognized format");
+ result = 1;
+ goto fail;
+ }
+
+ convert_emerald(buffer);
+
+ result = 0;
+
+ fail:
+
+ if (file)
+ fclose(file);
+
+ return(result);
}
static void clear(void)
{
- lev.home = 1; /* number of players */
- lev.width = 0;
- lev.height = 0;
- lev.time = 0;
- lev.required = 0;
- lev.score = 0;
-
- ply1.num = 0;
- ply1.alive = (lev.home >= 1);
- ply1.dynamite = 0;
- ply1.dynamite_cnt = 0;
- ply1.keys = 0;
- ply1.anim = 0;
- ply1.oldx = ply1.x = 0;
- ply1.oldy = ply1.y = 0;
- ply1.joy_n = ply1.joy_e = ply1.joy_s = ply1.joy_w = ply1.joy_fire = ply1.joy_stick = ply1.joy_spin = 0;
- ply2.num = 1;
- ply2.alive = (lev.home >= 2);
- ply2.dynamite = 0;
- ply2.dynamite_cnt = 0;
- ply2.keys = 0;
- ply2.anim = 0;
- ply2.oldx = ply2.x = 0;
- ply2.oldy = ply2.y = 0;
- ply2.joy_n = ply2.joy_e = ply2.joy_s = ply2.joy_w = ply2.joy_fire = ply2.joy_stick = ply2.joy_spin = 0;
+ lev.home = 1; /* number of players */
+ lev.width = 0;
+ lev.height = 0;
+ lev.time = 0;
+ lev.required = 0;
+ lev.score = 0;
+
+ ply1.num = 0;
+ ply1.alive = (lev.home >= 1);
+ ply1.dynamite = 0;
+ ply1.dynamite_cnt = 0;
+ ply1.keys = 0;
+ ply1.anim = 0;
+ ply1.oldx = ply1.x = 0;
+ ply1.oldy = ply1.y = 0;
+ ply1.joy_n = ply1.joy_e = ply1.joy_s = ply1.joy_w = ply1.joy_fire = 0;
+ ply1.joy_stick = ply1.joy_spin = 0;
+ ply2.num = 1;
+ ply2.alive = (lev.home >= 2);
+ ply2.dynamite = 0;
+ ply2.dynamite_cnt = 0;
+ ply2.keys = 0;
+ ply2.anim = 0;
+ ply2.oldx = ply2.x = 0;
+ ply2.oldy = ply2.y = 0;
+ ply2.joy_n = ply2.joy_e = ply2.joy_s = ply2.joy_w = ply2.joy_fire = 0;
+ ply2.joy_stick = ply2.joy_spin = 0;
}
void read_cave_list(void)
{
- char name[MAXNAME+2];
- struct cave_node *node, **prev;
- DIR *dir;
- struct dirent *entry;
- char *cut;
- int len;
-
- free_cave_list(); /* delete old list if i forgot to before */
-
- name[MAXNAME] = 0;
- if(arg_basedir) {
- snprintf(name, MAXNAME+2, "%s/%s", arg_basedir, EM_LVL_DIR);
- } else {
- snprintf(name, MAXNAME+2, "%s", EM_LVL_DIR);
- }
- if(name[MAXNAME]) snprintf_overflow("read cave/ directory");
-
- dir = opendir(name);
- if(dir) {
- prev = &cave_list;
- while((entry = readdir(dir))) {
- if(strcmp(entry->d_name, ".") == 0 || strcmp(entry->d_name, "..") == 0) continue;
-
- node = malloc(sizeof(*node)); if(node == 0) break;
- *prev = node; prev = &node->next;
-
- node->path[MAXNAME] = 0;
- snprintf(node->path, MAXNAME+2, "%s/%s", name, entry->d_name);
- if(node->path[MAXNAME]) snprintf_overflow("read cave/ directory");
-
- cut = strrchr(node->path, '/'); cut = cut ? cut + 1 : node->path;
- len = strlen(cut);
- if(len <= 32) {
- strncpy(node->name, cut, 32);
- } else {
- snprintf(node->name, 32, "%.8s..%s", cut, cut + len - 16);
- }
- }
- *prev = 0;
- closedir(dir);
- } else {
- fprintf(stderr, "%s: \"%s\": %s: %s\n", progname, name, "failed to open directory", strerror(errno));
- }
+ char name[MAXNAME+2];
+ struct cave_node *node, **prev;
+ DIR *dir;
+ struct dirent *entry;
+ char *cut;
+ int len;
+
+ free_cave_list(); /* delete old list if i forgot to before */
+
+ name[MAXNAME] = 0;
+ if (arg_basedir)
+ {
+ snprintf(name, MAXNAME+2, "%s/%s", arg_basedir, EM_LVL_DIR);
+ }
+ else
+ {
+ snprintf(name, MAXNAME+2, "%s", EM_LVL_DIR);
+ }
+
+ if (name[MAXNAME])
+ snprintf_overflow("read cave/ directory");
+
+ dir = opendir(name);
+ if (dir)
+ {
+ prev = &cave_list;
+ while ((entry = readdir(dir)))
+ {
+ if (strcmp(entry->d_name, ".") == 0 || strcmp(entry->d_name, "..") == 0)
+ continue;
+
+ node = malloc(sizeof(*node)); if (node == 0) break;
+ *prev = node; prev = &node->next;
+
+ node->path[MAXNAME] = 0;
+ snprintf(node->path, MAXNAME+2, "%s/%s", name, entry->d_name);
+ if (node->path[MAXNAME])
+ snprintf_overflow("read cave/ directory");
+
+ cut = strrchr(node->path, '/'); cut = cut ? cut + 1 : node->path;
+ len = strlen(cut);
+ if (len <= 32)
+ {
+ strncpy(node->name, cut, 32);
+ }
+ else
+ {
+ snprintf(node->name, 32, "%.8s..%s", cut, cut + len - 16);
+ }
+ }
+
+ *prev = 0;
+ closedir(dir);
+ }
+ else
+ {
+ fprintf(stderr, "%s: \"%s\": %s: %s\n", progname, name,
+ "failed to open directory", strerror(errno));
+ }
}
void free_cave_list(void)
{
- struct cave_node *node, *next;
-
- for(node = cave_list; node; node = next) {
- next = node->next;
- free(node);
- }
- cave_list = 0;
+ struct cave_node *node, *next;
+
+ for (node = cave_list; node; node = next)
+ {
+ next = node->next;
+ free(node);
+ }
+ cave_list = 0;
}
#endif
#if defined(TARGET_X11)
-static unsigned char remap_v6[256] = { /* filter crap for v6 */
- 0,0,2,2,4,4,118,118,8,9,10,11,12,13,14,15,16,16,18,18,20,21,22,23,24,25,26,27,28,
- 28,118,28,0,16,2,18,36,37,37,37,40,41,42,43,44,45,128,128,128,148,148,148,45,45,45,
- 148,0,57,58,59,60,61,62,63,64,65,66,67,68,69,69,69,69,73,74,75,118,75,75,75,75,75,
- 75,75,75,153,153,153,153,153,153,153,153,153,153,153,153,153,153,99,100,68,68,68,
- 68,68,68,68,68,118,118,118,118,118,114,115,131,118,118,119,120,121,122,118,118,118,
- 118,118,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,
- 147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,165,118,
- 168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,
- 189,68,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,
- 210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,
- 231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,153,153,153,153,153,153,
- 153,153,153,153
+static unsigned char remap_v6[256] =
+{
+ /* filter crap for v6 */
+
+ 0,0,2,2,4,4,118,118,8,9,10,11,12,13,14,15,
+ 16,16,18,18,20,21,22,23,24,25,26,27,28,28,118,28,
+ 0,16,2,18,36,37,37,37,40,41,42,43,44,45,128,128,
+ 128,148,148,148,45,45,45,148,0,57,58,59,60,61,62,63,
+ 64,65,66,67,68,69,69,69,69,73,74,75,118,75,75,75,
+ 75,75,75,75,75,153,153,153,153,153,153,153,153,153,153,153,
+ 153,153,153,99,100,68,68,68,68,68,68,68,68,118,118,118,
+ 118,118,114,115,131,118,118,119,120,121,122,118,118,118,118,118,
+ 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
+ 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
+ 160,161,162,163,164,165,165,118,168,169,170,171,172,173,174,175,
+ 176,177,178,179,180,181,182,183,184,185,186,187,188,189,68,191,
+ 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
+ 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
+ 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
+ 240,241,242,243,244,245,153,153,153,153,153,153,153,153,153,153
};
-static unsigned char remap_v5[256] = { /* filter crap for v5 */
- 0,0,2,2,4,4,118,118,8,9,10,11,12,13,14,15,16,16,18,18,20,21,22,23,24,25,26,27,28,
- 28,118,28,0,16,2,18,36,37,37,37,147,41,42,43,44,45,128,128,128,148,148,148,45,45,
- 45,148,0,57,58,59,60,61,62,63,64,65,66,67,68,153,153,153,153,153,153,153,153,153,
- 153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,
- 153,153,68,68,68,68,68,68,68,68,118,118,118,118,118,114,115,131,118,118,119,120,121,
- 122,118,118,118,118,118,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,
- 143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,153,153,153,
- 153,153,153,118,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,
- 185,186,187,188,189,68,153,153,153,153,153,153,153,153,153,200,201,202,203,204,205,
- 206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,
- 227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,153,153,153,153,153,153,
- 153,153,153,153,153,153,153,153
+
+static unsigned char remap_v5[256] =
+{
+ /* filter crap for v5 */
+
+ 0,0,2,2,4,4,118,118,8,9,10,11,12,13,14,15,
+ 16,16,18,18,20,21,22,23,24,25,26,27,28,28,118,28,
+ 0,16,2,18,36,37,37,37,147,41,42,43,44,45,128,128,
+ 128,148,148,148,45,45,45,148,0,57,58,59,60,61,62,63,
+ 64,65,66,67,68,153,153,153,153,153,153,153,153,153,153,153,
+ 153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,
+ 153,153,153,153,153,68,68,68,68,68,68,68,68,118,118,118,
+ 118,118,114,115,131,118,118,119,120,121,122,118,118,118,118,118,
+ 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
+ 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
+ 160,153,153,153,153,153,153,118,168,169,170,171,172,173,174,175,
+ 176,177,178,179,180,181,182,183,184,185,186,187,188,189,68,153,
+ 153,153,153,153,153,153,153,153,200,201,202,203,204,205,206,207,
+ 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
+ 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
+ 240,241,153,153,153,153,153,153,153,153,153,153,153,153,153,153
};
-static unsigned char remap_v4[256] = { /* filter crap for v4 */
- 0,0,2,2,4,4,118,118,8,9,10,11,12,13,14,15,16,16,18,18,20,21,22,23,24,25,26,27,28,
- 28,118,28,0,16,2,18,36,37,37,37,147,41,42,43,44,45,128,128,128,148,148,148,45,45,
- 45,148,0,153,153,59,60,61,62,63,64,65,66,153,153,153,153,153,153,153,153,153,153,
- 153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,
- 153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,118,114,115,131,118,118,
- 119,120,121,122,118,118,118,118,118,128,129,130,131,132,133,134,135,136,137,138,139,
- 140,141,142,143,144,145,146,147,148,149,150,151,152,68,154,155,156,157,158,160,160,
- 160,160,160,160,160,160,160,160,160,160,160,160,160,160,175,153,153,153,153,153,153,
- 153,153,153,153,153,153,153,153,68,153,153,153,153,153,153,153,153,153,200,201,202,
- 203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
- 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,153,153,153,
- 153,153,153,153,153,153,153,153,153,153,153
+
+static unsigned char remap_v4[256] =
+{
+ /* filter crap for v4 */
+
+ 0,0,2,2,4,4,118,118,8,9,10,11,12,13,14,15,
+ 16,16,18,18,20,21,22,23,24,25,26,27,28,28,118,28,
+ 0,16,2,18,36,37,37,37,147,41,42,43,44,45,128,128,
+ 128,148,148,148,45,45,45,148,0,153,153,59,60,61,62,63,
+ 64,65,66,153,153,153,153,153,153,153,153,153,153,153,153,153,
+ 153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,
+ 153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,
+ 153,118,114,115,131,118,118,119,120,121,122,118,118,118,118,118,
+ 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
+ 144,145,146,147,148,149,150,151,152,68,154,155,156,157,158,160,
+ 160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,175,
+ 153,153,153,153,153,153,153,153,153,153,153,153,153,153,68,153,
+ 153,153,153,153,153,153,153,153,200,201,202,203,204,205,206,207,
+ 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
+ 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
+ 240,241,153,153,153,153,153,153,153,153,153,153,153,153,153,153
};
-static unsigned char remap_v4eater[28] = { /* filter crap for v4 */
- 128,18,2,0,4,8,16,20,28,37,41,45,130,129,131,132,133,134,135,136,146,147,175,65,66,
- 64,2,18
+
+static unsigned char remap_v4eater[28] =
+{
+ /* filter crap for v4 */
+
+ 128,18,2,0,4,8,16,20,28,37,
+ 41,45,130,129,131,132,133,134,135,136,
+ 146,147,175,65,66,64,2,18
};
int clean_emerald(unsigned char *src, unsigned long *length)
{
- unsigned int i;
- if(*length >= 2172 && src[2106] == 255 && src[2107] == 54 && src[2108] == 48 && src[2109] == 48) {
- for(i = 0; i < 2048; i++) src[i] = remap_v6[src[i]];
- for(i = 2048; i < 2084; i++) src[i] = remap_v6[src[i]];
- for(i = 2112; i < 2148; i++) src[i] = remap_v6[src[i]];
- goto v6;
- }
- if(*length >= 2110 && src[2106] == 255 && src[2107] == 53 && src[2108] == 48 && src[2109] == 48) {
- for(i = 0; i < 2048; i++) src[i] = remap_v5[src[i]];
- for(i = 2048; i < 2084; i++) src[i] = remap_v5[src[i]];
- for(i = 2112; i < 2148; i++) src[i] = src[i - 64];
- goto v5;
- }
- if(*length >= 2106 && src[1983] == 116) {
- for(i = 0; i < 2048; i++) src[i] = remap_v4[src[i]];
- for(i = 2048; i < 2084; i++) src[i] = remap_v4eater[src[i] >= 28 ? 0 : src[i]];
- for(i = 2112; i < 2148; i++) src[i] = src[i - 64];
- goto v4;
- }
- if(*length >= 2106 && src[0] == 241 && src[1983] == 27) {
- unsigned char j = 94;
- for(i = 0; i < 2106; i++) src[i] = (src[i] ^ (j += 7)) - 0x11;
- src[1] = 131;
- for(i = 0; i < 2048; i++) src[i] = remap_v4[src[i]];
- for(i = 2048; i < 2084; i++) src[i] = remap_v4eater[src[i] >= 28 ? 0 : src[i]];
- for(i = 2112; i < 2148; i++) src[i] = src[i - 64];
- goto v3;
- }
- return(1); /* unrecognized cave */
-v3:
-v4:
-v5:
- src[2106] = 255; src[2107] = 54; src[2108] = 48; src[2109] = 48; /* id */
- i = src[2094] * 10; src[2110] = i >> 8; src[2111] = i; /* time */
- for(i = 2148; i < 2172; i++) src[i] = 0;
- src[2159] = 128; /* ball data */
-v6:
- for(i = 0; i < 2048; i++) if(src[i] == 40) break; /* fix wheel */
- for(i++; i < 2048; i++) if(src[i] == 40) src[i] = 147;
- for(i = 64; i < 2048; i++) if(src[i] == 63) src[i - 64] = 101; /* fix acid */
- for(i = 2051; i < 2057; i++) if(src[i] == 63) src[i - 3] = 101; /* fix acid in eater 1 */
- for(i = 2060; i < 2066; i++) if(src[i] == 63) src[i - 3] = 101; /* fix acid in eater 2 */
- for(i = 2069; i < 2075; i++) if(src[i] == 63) src[i - 3] = 101; /* fix acid in eater 3 */
- for(i = 2078; i < 2084; i++) if(src[i] == 63) src[i - 3] = 101; /* fix acid in eater 4 */
- for(i = 2115; i < 2121; i++) if(src[i] == 63) src[i - 3] = 101; /* fix acid in eater 5 */
- for(i = 2124; i < 2130; i++) if(src[i] == 63) src[i - 3] = 101; /* fix acid in eater 6 */
- for(i = 2133; i < 2139; i++) if(src[i] == 63) src[i - 3] = 101; /* fix acid in eater 7 */
- for(i = 2142; i < 2148; i++) if(src[i] == 63) src[i - 3] = 101; /* fix acid in eater 8 */
- src[2094] = 0; /* old style time */
- src[2096] &= 7; src[src[2096] << 8 | src[2097]] = 128; /* player 1 pos */
- src[2098] &= 7; src[src[2098] << 8 | src[2099]] = 128; /* player 2 pos */
- if((src[2100] << 8 | src[2101]) > 9999) { src[2100] = 39; src[2101] = 15; } /* ameuba speed */
- if((src[2102] << 8 | src[2103]) > 9999) { src[2102] = 39; src[2103] = 15; } /* time wonderwall */
- if((src[2110] << 8 | src[2111]) > 9999) { src[2110] = 39; src[2111] = 15; } /* time */
- i = src[2149]; i &= 15; i &= -i; src[2149] = i; /* wind direction */
- if((src[2154] << 8 | src[2155]) > 9999) { src[2154] = 39; src[2155] = 15; } /* time lenses */
- if((src[2156] << 8 | src[2157]) > 9999) { src[2156] = 39; src[2157] = 15; } /* time magnify */
- src[2158] = 0; src[2159] = remap_v6[src[2159]]; /* ball object */
- if((src[2160] << 8 | src[2161]) > 9999) { src[2160] = 39; src[2161] = 15; } /* ball pause */
- src[2162] &= 129; if(src[2162] & 1) src[2163] = 0; /* ball data */
- if((src[2164] << 8 | src[2165]) > 9999) { src[2164] = 39; src[2165] = 15; } /* android move pause */
- if((src[2166] << 8 | src[2167]) > 9999) { src[2166] = 39; src[2167] = 15; } /* android clone pause */
- src[2168] &= 31; /* android data */
-
- *length = 2172; /* size of v6 cave */
- return(0);
+ unsigned int i;
+
+ if (*length >= 2172 &&
+ src[2106] == 255 &&
+ src[2107] == 54 &&
+ src[2108] == 48 &&
+ src[2109] == 48)
+ {
+ for (i = 0; i < 2048; i++)
+ src[i] = remap_v6[src[i]];
+ for (i = 2048; i < 2084; i++)
+ src[i] = remap_v6[src[i]];
+ for (i = 2112; i < 2148; i++)
+ src[i] = remap_v6[src[i]];
+
+ goto v6;
+ }
+
+ if (*length >= 2110 &&
+ src[2106] == 255 &&
+ src[2107] == 53 &&
+ src[2108] == 48 &&
+ src[2109] == 48)
+ {
+ for (i = 0; i < 2048; i++)
+ src[i] = remap_v5[src[i]];
+ for (i = 2048; i < 2084; i++)
+ src[i] = remap_v5[src[i]];
+ for (i = 2112; i < 2148; i++)
+ src[i] = src[i - 64];
+
+ goto v5;
+ }
+
+ if (*length >= 2106 &&
+ src[1983] == 116)
+ {
+ for (i = 0; i < 2048; i++)
+ src[i] = remap_v4[src[i]];
+ for (i = 2048; i < 2084; i++)
+ src[i] = remap_v4eater[src[i] >= 28 ? 0 : src[i]];
+ for (i = 2112; i < 2148; i++) src[i] = src[i - 64];
+
+ goto v4;
+ }
+
+ if (*length >= 2106 &&
+ src[0] == 241 &&
+ src[1983] == 27)
+ {
+ unsigned char j = 94;
+
+ for (i = 0; i < 2106; i++)
+ src[i] = (src[i] ^ (j += 7)) - 0x11;
+ src[1] = 131;
+ for (i = 0; i < 2048; i++)
+ src[i] = remap_v4[src[i]];
+ for (i = 2048; i < 2084; i++)
+ src[i] = remap_v4eater[src[i] >= 28 ? 0 : src[i]];
+ for (i = 2112; i < 2148; i++)
+ src[i] = src[i - 64];
+
+ goto v3;
+ }
+
+ return 1; /* unrecognized cave */
+
+ v3:
+ v4:
+ v5:
+
+ /* id */
+ src[2106] = 255;
+ src[2107] = 54;
+ src[2108] = 48;
+ src[2109] = 48;
+
+ /* time */
+ i = src[2094] * 10;
+ src[2110] = i >> 8;
+ src[2111] = i;
+
+ for (i = 2148; i < 2172; i++)
+ src[i] = 0;
+
+ /* ball data */
+ src[2159] = 128;
+
+ v6:
+
+ /* fix wheel */
+ for (i = 0; i < 2048; i++)
+ if (src[i] == 40)
+ break;
+
+ for (i++; i < 2048; i++)
+ if (src[i] == 40)
+ src[i] = 147;
+
+ /* fix acid */
+ for (i = 64; i < 2048; i++)
+ if (src[i] == 63)
+ src[i - 64] = 101;
+
+ /* fix acid in eater 1 */
+ for (i = 2051; i < 2057; i++)
+ if (src[i] == 63)
+ src[i - 3] = 101;
+
+ for (i = 2060; i < 2066; i++)
+ if (src[i] == 63)
+ src[i - 3] = 101;
+ /* fix acid in eater 2 */
+
+ /* fix acid in eater 3 */
+ for (i = 2069; i < 2075; i++)
+ if (src[i] == 63)
+ src[i - 3] = 101;
+
+ /* fix acid in eater 4 */
+ for (i = 2078; i < 2084; i++)
+ if (src[i] == 63)
+ src[i - 3] = 101;
+
+ /* fix acid in eater 5 */
+ for (i = 2115; i < 2121; i++)
+ if (src[i] == 63)
+ src[i - 3] = 101;
+
+ /* fix acid in eater 6 */
+ for (i = 2124; i < 2130; i++)
+ if (src[i] == 63)
+ src[i - 3] = 101;
+
+ /* fix acid in eater 7 */
+ for (i = 2133; i < 2139; i++)
+ if (src[i] == 63)
+ src[i - 3] = 101;
+
+ /* fix acid in eater 8 */
+ for (i = 2142; i < 2148; i++)
+ if (src[i] == 63)
+ src[i - 3] = 101;
+
+ /* old style time */
+ src[2094] = 0;
+
+ /* player 1 pos */
+ src[2096] &= 7;
+ src[src[2096] << 8 | src[2097]] = 128;
+
+ /* player 2 pos */
+ src[2098] &= 7;
+ src[src[2098] << 8 | src[2099]] = 128;
+
+ /* ameuba speed */
+ if ((src[2100] << 8 | src[2101]) > 9999)
+ {
+ src[2100] = 39;
+ src[2101] = 15;
+ }
+
+ /* time wonderwall */
+ if ((src[2102] << 8 | src[2103]) > 9999)
+ {
+ src[2102] = 39;
+ src[2103] = 15;
+ }
+
+ /* time */
+ if ((src[2110] << 8 | src[2111]) > 9999)
+ {
+ src[2110] = 39;
+ src[2111] = 15;
+ }
+
+ /* wind direction */
+ i = src[2149];
+ i &= 15;
+ i &= -i;
+ src[2149] = i;
+
+ /* time lenses */
+ if ((src[2154] << 8 | src[2155]) > 9999)
+ {
+ src[2154] = 39;
+ src[2155] = 15;
+ }
+
+ /* time magnify */
+ if ((src[2156] << 8 | src[2157]) > 9999)
+ {
+ src[2156] = 39;
+ src[2157] = 15;
+ }
+
+ /* ball object */
+ src[2158] = 0;
+ src[2159] = remap_v6[src[2159]];
+
+ /* ball pause */
+ if ((src[2160] << 8 | src[2161]) > 9999)
+ {
+ src[2160] = 39;
+ src[2161] = 15;
+ }
+
+ /* ball data */
+ src[2162] &= 129;
+ if (src[2162] & 1)
+ src[2163] = 0;
+
+ /* android move pause */
+ if ((src[2164] << 8 | src[2165]) > 9999)
+ {
+ src[2164] = 39;
+ src[2165] = 15;
+ }
+
+ /* android clone pause */
+ if ((src[2166] << 8 | src[2167]) > 9999)
+ {
+ src[2166] = 39;
+ src[2167] = 15;
+ }
+
+ /* android data */
+ src[2168] &= 31;
+
+ /* size of v6 cave */
+ *length = 2172;
+
+ return 0;
}
/* 2000-07-30T00:26:00Z
*
* Read emerald mine caves version 6
+ *
+ * v4 and v5 emerald mine caves are converted to v6 (which completely supports
+ * older versions)
*
- * v4 and v5 emerald mine caves are converted to v6 (which completely supports older versions)
- *
- * converting to the internal format loses /significant/ information which can breaks lots of caves.
+ * converting to the internal format loses /significant/ information which can
+ * break lots of caves.
*
* major incompatibilities:
- * borderless caves behave completely differently, the player no longer "warps" to the other side.
- * a compile time option for spring can make it behave differently when it rolls.
- * a compile time option for rolling objects (stone, nut, spring, bomb) only in eater.
- * acid is always deadly even with no base beneath it.
+ * - borderless caves behave completely differently, the player no longer
+ * "warps" to the other side.
+ * - a compile time option for spring can make it behave differently when it
+ * rolls.
+ * - a compile time option for rolling objects (stone, nut, spring, bomb) only
+ * in eater.
+ * - acid is always deadly even with no base beneath it.
*
* so far all below have not broken any caves:
*
- * active wheel inside an eater will not function, eater explosions will not change settings.
- * initial collect objects (emerald, diamond, dynamite) dont exist.
- * initial rolling objects will be moved manually and made into sitting objects.
- * drips always appear from dots.
- * more than one thing can fall into acid at the same time.
- * acid explodes when the player walks into it, rather than splashing.
- * simultaneous explosions may be in a slightly different order.
- * quicksand states have been reduced.
- * acid base is effectively an indestructable wall now which can affect eater explosions.
- * android can clone forever with a clone pause of 0 (emeralds, diamonds, nuts, stones, bombs, springs).
+ * - active wheel inside an eater will not function, eater explosions will not
+ * change settings.
+ * - initial collect objects (emerald, diamond, dynamite) don't exist.
+ * - initial rolling objects will be moved manually and made into sitting
+ * objects.
+ * - drips always appear from dots.
+ * - more than one thing can fall into acid at the same time.
+ * - acid explodes when the player walks into it, rather than splashing.
+ * - simultaneous explosions may be in a slightly different order.
+ * - quicksand states have been reduced.
+ * - acid base is effectively an indestructable wall now which can affect eater
+ * explosions.
+ * - android can clone forever with a clone pause of 0 (emeralds, diamonds,
+ * nuts, stones, bombs, springs).
*
* 2001-03-12T02:46:55Z
- * rolling stuff is now allowed in the cave, i didn't like making this decision.
- * if BAD_ROLL is not defined, initial rolling objects are moved by hand.
- * initial collect objects break some cave in elvis mine 5.
- * different timing for wonderwall break some cave in exception mine 2.
- * i think i'm pretty locked into always using the bad roll. *sigh*
- * rolling spring is now turned into regular spring. it appears the emc editor only uses
- * the force code for initially moving spring. i will follow this in my editor.
+ * - rolling stuff is now allowed in the cave, i didn't like making this
+ * decision.
+ * - if BAD_ROLL is not defined, initial rolling objects are moved by hand.
+ * - initial collect objects break some cave in elvis mine 5.
+ * - different timing for wonderwall break some cave in exception mine 2.
+ * - i think i'm pretty locked into always using the bad roll. *sigh*
+ * - rolling spring is now turned into regular spring. it appears the emc
+ * editor only uses the force code for initially moving spring. i will
+ * follow this in my editor.
*/
-static unsigned short remap_emerald[256] = {
- Xstone, Xstone, Xdiamond, Xdiamond, Xalien, Xalien, Xblank, Xblank,
- Xtank_n, Xtank_e, Xtank_s, Xtank_w, Xtank_gon, Xtank_goe, Xtank_gos, Xtank_gow,
- Xbomb, Xbomb, Xemerald, Xemerald, Xbug_n, Xbug_e, Xbug_s, Xbug_w,
- Xbug_gon, Xbug_goe, Xbug_gos, Xbug_gow, Xdrip_eat, Xdrip_eat, Xdrip_eat, Xdrip_eat,
- Xstone, Xbomb, Xdiamond, Xemerald, Xwonderwall, Xnut, Xnut, Xnut,
- Xwheel, Xeater_n, Xeater_s, Xeater_w, Xeater_e, Xsand_stone, Xblank, Xblank,
- Xblank, Xsand, Xsand, Xsand, Xsand_stone, Xsand_stone, Xsand_stone, Xsand,
- Xstone, Xgrow_ew, Xgrow_ns, Xdynamite_1, Xdynamite_2, Xdynamite_3, Xdynamite_4, Xacid_s,
- Xexit_1, Xexit_2, Xexit_3, Xballoon, Xplant, Xspring, Xspring, Xspring,
- Xspring, Xball_1, Xball_2, Xandroid, Xblank, Xandroid, Xandroid, Xandroid,
- Xandroid, Xandroid, Xandroid, Xandroid, Xandroid, Xblank, Xblank, Xblank,
- Xblank, Xblank, Xblank, Xblank, Xblank, Xblank, Xblank, Xblank,
+static unsigned short remap_emerald[256] =
+{
+ Xstone, Xstone, Xdiamond, Xdiamond, Xalien, Xalien, Xblank, Xblank,
+ Xtank_n, Xtank_e, Xtank_s, Xtank_w, Xtank_gon, Xtank_goe, Xtank_gos, Xtank_gow,
+ Xbomb, Xbomb, Xemerald, Xemerald, Xbug_n, Xbug_e, Xbug_s, Xbug_w,
+ Xbug_gon, Xbug_goe, Xbug_gos, Xbug_gow, Xdrip_eat, Xdrip_eat, Xdrip_eat, Xdrip_eat,
+ Xstone, Xbomb, Xdiamond, Xemerald, Xwonderwall, Xnut, Xnut, Xnut,
+ Xwheel, Xeater_n, Xeater_s, Xeater_w, Xeater_e, Xsand_stone, Xblank, Xblank,
+ Xblank, Xsand, Xsand, Xsand, Xsand_stone, Xsand_stone, Xsand_stone, Xsand,
+ Xstone, Xgrow_ew, Xgrow_ns, Xdynamite_1, Xdynamite_2, Xdynamite_3, Xdynamite_4, Xacid_s,
+ Xexit_1, Xexit_2, Xexit_3, Xballoon, Xplant, Xspring, Xspring, Xspring,
+ Xspring, Xball_1, Xball_2, Xandroid, Xblank, Xandroid, Xandroid, Xandroid,
+ Xandroid, Xandroid, Xandroid, Xandroid, Xandroid, Xblank, Xblank, Xblank,
+ Xblank, Xblank, Xblank, Xblank, Xblank, Xblank, Xblank, Xblank,
+
#ifdef BAD_ROLL
- Xblank, Xblank, Xblank, Xspring_force_w, Xspring_force_e, Xacid_1, Xacid_2, Xacid_3,
- Xacid_4, Xacid_5, Xacid_6, Xacid_7, Xacid_8, Xblank, Xblank, Xblank,
- Xblank, Xblank, Xnut_force_w, Xnut_force_e, Xsteel_1, Xblank, Xblank, Xbomb_force_w,
- Xbomb_force_e, Xstone_force_w, Xstone_force_e, Xblank, Xblank, Xblank, Xblank, Xblank,
+
+ Xblank, Xblank, Xblank, Xspring_force_w, Xspring_force_e, Xacid_1, Xacid_2, Xacid_3,
+ Xacid_4, Xacid_5, Xacid_6, Xacid_7, Xacid_8, Xblank, Xblank, Xblank,
+ Xblank, Xblank, Xnut_force_w, Xnut_force_e, Xsteel_1, Xblank, Xblank, Xbomb_force_w,
+ Xbomb_force_e, Xstone_force_w, Xstone_force_e, Xblank, Xblank, Xblank, Xblank, Xblank,
+
#else
- Xblank, Xblank, Xblank, Xspring, Xspring, Xacid_1, Xacid_2, Xacid_3,
- Xacid_4, Xacid_5, Xacid_6, Xacid_7, Xacid_8, Xblank, Xblank, Xblank,
- Xblank, Xblank, Xnut, Xnut, Xsteel_1, Xblank, Xblank, Xbomb,
- Xbomb, Xstone, Xstone, Xblank, Xblank, Xblank, Xblank, Xblank,
+
+ Xblank, Xblank, Xblank, Xspring, Xspring, Xacid_1, Xacid_2, Xacid_3,
+ Xacid_4, Xacid_5, Xacid_6, Xacid_7, Xacid_8, Xblank, Xblank, Xblank,
+ Xblank, Xblank, Xnut, Xnut, Xsteel_1, Xblank, Xblank, Xbomb,
+ Xbomb, Xstone, Xstone, Xblank, Xblank, Xblank, Xblank, Xblank,
+
#endif
- Xblank, Xround_wall_1, Xgrass, Xsteel_1, Xwall_1, Xkey_1, Xkey_2, Xkey_3,
- Xkey_4, Xdoor_1, Xdoor_2, Xdoor_3, Xdoor_4, Xdripper, Xfake_door_1, Xfake_door_2,
- Xfake_door_3, Xfake_door_4, Xwonderwall, Xwheel, Xsand, Xacid_nw, Xacid_ne, Xacid_sw,
- Xacid_se, Xfake_blank, Xameuba_1, Xameuba_2, Xameuba_3, Xameuba_4, Xexit, Xalpha_arrow_w,
- Xfake_grass, Xlenses, Xmagnify, Xfake_blank, Xfake_grass, Xswitch, Xswitch, Xblank,
- Xdecor_8, Xdecor_9, Xdecor_10, Xdecor_5, Xalpha_comma, Xalpha_quote, Xalpha_minus, Xdynamite,
- Xsteel_3, Xdecor_6, Xdecor_7, Xsteel_2, Xround_wall_2, Xdecor_2, Xdecor_4, Xdecor_3,
- Xwind_nesw, Xwind_e, Xwind_s, Xwind_w, Xwind_n, Xdirt, Xplant, Xkey_5,
- Xkey_6, Xkey_7, Xkey_8, Xdoor_5, Xdoor_6, Xdoor_7, Xdoor_8, Xbumper,
- 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_0, Xalpha_1, Xalpha_2, Xalpha_3, Xalpha_4, Xalpha_5,
- Xalpha_6, Xalpha_7, Xalpha_8, Xalpha_9, Xalpha_perio, Xalpha_excla, Xalpha_colon, Xalpha_quest,
- Xalpha_arrow_e, Xdecor_1, Xfake_door_5, Xfake_door_6, Xfake_door_7, Xfake_door_8, Xblank, Xblank,
- Xblank, Xblank, Xblank, Xblank, Xblank, Xblank, Xblank, Xblank,
+
+ Xblank, Xround_wall_1, Xgrass, Xsteel_1, Xwall_1, Xkey_1, Xkey_2, Xkey_3,
+ Xkey_4, Xdoor_1, Xdoor_2, Xdoor_3, Xdoor_4, Xdripper, Xfake_door_1, Xfake_door_2,
+ Xfake_door_3, Xfake_door_4, Xwonderwall, Xwheel, Xsand, Xacid_nw, Xacid_ne, Xacid_sw,
+ Xacid_se, Xfake_blank, Xameuba_1, Xameuba_2, Xameuba_3, Xameuba_4, Xexit, Xalpha_arrow_w,
+ Xfake_grass, Xlenses, Xmagnify, Xfake_blank, Xfake_grass, Xswitch, Xswitch, Xblank,
+ Xdecor_8, Xdecor_9, Xdecor_10, Xdecor_5, Xalpha_comma, Xalpha_quote, Xalpha_minus, Xdynamite,
+ Xsteel_3, Xdecor_6, Xdecor_7, Xsteel_2, Xround_wall_2, Xdecor_2, Xdecor_4, Xdecor_3,
+ Xwind_nesw, Xwind_e, Xwind_s, Xwind_w, Xwind_n, Xdirt, Xplant, Xkey_5,
+ Xkey_6, Xkey_7, Xkey_8, Xdoor_5, Xdoor_6, Xdoor_7, Xdoor_8, Xbumper,
+ 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_0, Xalpha_1, Xalpha_2, Xalpha_3, Xalpha_4, Xalpha_5,
+ Xalpha_6, Xalpha_7, Xalpha_8, Xalpha_9, Xalpha_perio, Xalpha_excla, Xalpha_colon, Xalpha_quest,
+ Xalpha_arrow_e, Xdecor_1, Xfake_door_5, Xfake_door_6, Xfake_door_7, Xfake_door_8, Xblank, Xblank,
+ Xblank, Xblank, Xblank, Xblank, Xblank, Xblank, Xblank, Xblank,
};
void convert_emerald(unsigned char *src)
{
- unsigned int x, y, temp;
-
- lev.width = 64;
- lev.height = 32;
- temp = ((src[0x83E] << 8 | src[0x83F]) * 25 + 3) / 4; if(temp == 0 || temp > 9999) temp = 9999;
- lev.time = temp;
- lev.required = src[0x82F];
-
- temp = src[0x830] << 8 | src[0x831];
- ply1.oldx = ply1.x = (temp & 63) + 1;
- ply1.oldy = ply1.y = (temp >> 6 & 31) + 1;
- temp = src[0x832] << 8 | src[0x833];
- ply2.oldx = ply2.x = (temp & 63) + 1;
- ply2.oldy = ply2.y = (temp >> 6 & 31) + 1;
-
- lev.alien_score = src[0x826];
- temp = (src[0x834] << 8 | src[0x835]) * 28; if(temp > 9999) temp = 9999;
- lev.ameuba_time = temp;
- lev.android_move_cnt = lev.android_move_time = src[0x874] << 8 | src[0x875];
- lev.android_clone_cnt = lev.android_clone_time = src[0x876] << 8 | src[0x877];
- lev.ball_pos = 0;
- lev.ball_random = src[0x872] & 1 ? 1 : 0;
- lev.ball_state = src[0x872] & 128 ? 1 : 0;
- lev.ball_cnt = lev.ball_time = src[0x870] << 8 | src[0x871];
- lev.bug_score = src[0x828];
- lev.diamond_score = src[0x825];
- lev.dynamite_score = src[0x82B];
- lev.eater_pos = 0;
- lev.eater_score = src[0x829];
- lev.emerald_score = src[0x824];
- lev.exit_score = src[0x82D] * 8 / 5;
- lev.key_score = src[0x82C];
- lev.lenses_cnt = 0;
- lev.lenses_score = src[0x867];
- lev.lenses_time = src[0x86A] << 8 | src[0x86B];
- lev.magnify_cnt = 0;
- lev.magnify_score = src[0x868];
- lev.magnify_time = src[0x86C] << 8 | src[0x86D];
- lev.nut_score = src[0x82A];
- lev.shine_cnt = 0;
- lev.slurp_score = src[0x869];
- lev.tank_score = src[0x827];
- lev.wheel_cnt = 0;
- lev.wheel_x = 1;
- lev.wheel_y = 1;
- lev.wheel_time = src[0x838] << 8 | src[0x839];
- lev.wind_cnt = src[0x865] & 15 ? 9999 : 0;
- temp = src[0x865];
- lev.wind_direction = temp & 8 ? 0 : temp & 1 ? 1 : temp & 2 ? 2 : temp & 4 ? 3 : 0;
- lev.wind_time = 9999;
- lev.wonderwall_state = 0;
- lev.wonderwall_time = src[0x836] << 8 | src[0x837];
-
- for(x = 0; x < 9; x++) lev.eater_array[0][x] = remap_emerald[src[0x800 + x]];
- for(x = 0; x < 9; x++) lev.eater_array[1][x] = remap_emerald[src[0x809 + x]];
- for(x = 0; x < 9; x++) lev.eater_array[2][x] = remap_emerald[src[0x812 + x]];
- for(x = 0; x < 9; x++) lev.eater_array[3][x] = remap_emerald[src[0x81B + x]];
- for(x = 0; x < 9; x++) lev.eater_array[4][x] = remap_emerald[src[0x840 + x]];
- for(x = 0; x < 9; x++) lev.eater_array[5][x] = remap_emerald[src[0x849 + x]];
- for(x = 0; x < 9; x++) lev.eater_array[6][x] = remap_emerald[src[0x852 + x]];
- for(x = 0; x < 9; x++) lev.eater_array[7][x] = remap_emerald[src[0x85B + x]];
- temp = remap_emerald[src[0x86F]];
- for(y = 0; y < 8; y++) {
- if(src[0x872] & 1) {
- for(x = 0; x < 8; x++) lev.ball_array[y][x] = temp;
- } else {
- lev.ball_array[y][1] = (src[0x873] & 1) ? temp : Xblank; /* north */
- lev.ball_array[y][6] = (src[0x873] & 2) ? temp : Xblank; /* south */
- lev.ball_array[y][3] = (src[0x873] & 4) ? temp : Xblank; /* west */
- lev.ball_array[y][4] = (src[0x873] & 8) ? temp : Xblank; /* east */
- lev.ball_array[y][7] = (src[0x873] & 16) ? temp : Xblank; /* south east */
- lev.ball_array[y][5] = (src[0x873] & 32) ? temp : Xblank; /* south west */
- lev.ball_array[y][2] = (src[0x873] & 64) ? temp : Xblank; /* north east */
- lev.ball_array[y][0] = (src[0x873] & 128) ? temp : Xblank; /* north west */
- }
- }
- for(temp = 0; temp < TILE_MAX; temp++) lev.android_array[temp] = Xblank;
- temp = src[0x878] << 8 | src[0x879];
- if(temp & 1) {
- lev.android_array[Xemerald] = lev.android_array[Xemerald_pause] =
- lev.android_array[Xemerald_fall] = lev.android_array[Yemerald_sB] =
- lev.android_array[Yemerald_eB] = lev.android_array[Yemerald_wB] = Xemerald;
- }
- if(temp & 2) {
- lev.android_array[Xdiamond] = lev.android_array[Xdiamond_pause] =
- lev.android_array[Xdiamond_fall] = lev.android_array[Ydiamond_sB] =
- lev.android_array[Ydiamond_eB] = lev.android_array[Ydiamond_wB] = Xdiamond;
- }
- if(temp & 4) {
- lev.android_array[Xstone] = lev.android_array[Xstone_pause] =
- lev.android_array[Xstone_fall] = lev.android_array[Ystone_sB] =
- lev.android_array[Ystone_eB] = lev.android_array[Ystone_wB] = Xstone;
- }
- if(temp & 8) {
- lev.android_array[Xbomb] = lev.android_array[Xbomb_pause] =
- lev.android_array[Xbomb_fall] = lev.android_array[Ybomb_sB] =
- lev.android_array[Ybomb_eB] = lev.android_array[Ybomb_wB] = Xbomb;
- }
- if(temp & 16) {
- lev.android_array[Xnut] = lev.android_array[Xnut_pause] =
- lev.android_array[Xnut_fall] = lev.android_array[Ynut_sB] =
- lev.android_array[Ynut_eB] = lev.android_array[Ynut_wB] = Xnut;
- }
- if(temp & 32) {
- lev.android_array[Xtank_n] = lev.android_array[Xtank_gon] = lev.android_array[Ytank_nB] =
- lev.android_array[Ytank_n_e] = lev.android_array[Ytank_n_w] = Xtank_n;
- lev.android_array[Xtank_e] = lev.android_array[Xtank_goe] = lev.android_array[Ytank_eB] =
- lev.android_array[Ytank_e_s] = lev.android_array[Ytank_e_n] = Xtank_e;
- lev.android_array[Xtank_s] = lev.android_array[Xtank_gos] = lev.android_array[Ytank_sB] =
- lev.android_array[Ytank_s_w] = lev.android_array[Ytank_s_e] = Xtank_s;
- lev.android_array[Xtank_w] = lev.android_array[Xtank_gow] = lev.android_array[Ytank_wB] =
- lev.android_array[Ytank_w_n] = lev.android_array[Ytank_w_s] = Xtank_w;
- }
- if(temp & 64) {
- lev.android_array[Xeater_n] = lev.android_array[Yeater_nB] = Xeater_n;
- lev.android_array[Xeater_e] = lev.android_array[Yeater_eB] = Xeater_e;
- lev.android_array[Xeater_s] = lev.android_array[Yeater_sB] = Xeater_s;
- lev.android_array[Xeater_w] = lev.android_array[Yeater_wB] = Xeater_w;
- }
- if(temp & 128) {
- lev.android_array[Xbug_n] = lev.android_array[Xbug_gon] = lev.android_array[Ybug_nB] =
- lev.android_array[Ybug_n_e] = lev.android_array[Ybug_n_w] = Xbug_gon;
- lev.android_array[Xbug_e] = lev.android_array[Xbug_goe] = lev.android_array[Ybug_eB] =
- lev.android_array[Ybug_e_s] = lev.android_array[Ybug_e_n] = Xbug_goe;
- lev.android_array[Xbug_s] = lev.android_array[Xbug_gos] = lev.android_array[Ybug_sB] =
- lev.android_array[Ybug_s_w] = lev.android_array[Ybug_s_e] = Xbug_gos;
- lev.android_array[Xbug_w] = lev.android_array[Xbug_gow] = lev.android_array[Ybug_wB] =
- lev.android_array[Ybug_w_n] = lev.android_array[Ybug_w_s] = Xbug_gow;
- }
- if(temp & 256) {
- lev.android_array[Xalien] = lev.android_array[Xalien_pause] =
- lev.android_array[Yalien_nB] = lev.android_array[Yalien_eB] =
- lev.android_array[Yalien_sB] = lev.android_array[Yalien_wB] = Xalien;
- }
- if(temp & 512) {
- lev.android_array[Xspring] = lev.android_array[Xspring_pause] =
- lev.android_array[Xspring_e] = lev.android_array[Yspring_eB] = lev.android_array[Yspring_kill_eB] =
- lev.android_array[Xspring_w] = lev.android_array[Yspring_wB] = lev.android_array[Yspring_kill_wB] =
- lev.android_array[Xspring_fall] = lev.android_array[Yspring_sB] = Xspring;
- }
- if(temp & 1024) {
- lev.android_array[Yballoon_nB] = lev.android_array[Yballoon_eB] =
- lev.android_array[Yballoon_sB] = lev.android_array[Yballoon_wB] =
- lev.android_array[Xballoon] = Xballoon;
- }
- if(temp & 2048) {
- lev.android_array[Xdripper] = lev.android_array[XdripperB] =
- lev.android_array[Xameuba_1] = lev.android_array[Xameuba_2] =
- lev.android_array[Xameuba_3] = lev.android_array[Xameuba_4] =
- lev.android_array[Xameuba_5] = lev.android_array[Xameuba_6] =
- lev.android_array[Xameuba_7] = lev.android_array[Xameuba_8] = Xdrip_eat;
- }
- if(temp & 4096) {
- lev.android_array[Xdynamite] = Xdynamite;
- }
-
- for(temp = 1; temp < 2047; temp++) {
- switch(src[temp]) {
- case 0x24: lev.wonderwall_state = 1; lev.wonderwall_time = 9999; break; /* wonderwall */
- case 0x28: lev.wheel_x = temp & 63; lev.wheel_y = temp >> 6; lev.wheel_cnt = lev.wheel_time; break; /* wheel */
+ unsigned int x, y, temp;
+
+ lev.width = 64;
+ lev.height = 32;
+
+ temp = ((src[0x83E] << 8 | src[0x83F]) * 25 + 3) / 4;
+ if (temp == 0 || temp > 9999)
+ temp = 9999;
+ lev.time = temp;
+ lev.required = src[0x82F];
+
+ temp = src[0x830] << 8 | src[0x831];
+ ply1.oldx = ply1.x = (temp & 63) + 1;
+ ply1.oldy = ply1.y = (temp >> 6 & 31) + 1;
+ temp = src[0x832] << 8 | src[0x833];
+ ply2.oldx = ply2.x = (temp & 63) + 1;
+ ply2.oldy = ply2.y = (temp >> 6 & 31) + 1;
+
+ lev.alien_score = src[0x826];
+
+ temp = (src[0x834] << 8 | src[0x835]) * 28;
+ if (temp > 9999)
+ temp = 9999;
+ lev.ameuba_time = temp;
+ lev.android_move_cnt = lev.android_move_time = src[0x874] << 8 | src[0x875];
+ lev.android_clone_cnt= lev.android_clone_time = src[0x876] << 8 | src[0x877];
+ lev.ball_pos = 0;
+ lev.ball_random = src[0x872] & 1 ? 1 : 0;
+ lev.ball_state = src[0x872] & 128 ? 1 : 0;
+ lev.ball_cnt = lev.ball_time = src[0x870] << 8 | src[0x871];
+ lev.bug_score = src[0x828];
+ lev.diamond_score = src[0x825];
+ lev.dynamite_score = src[0x82B];
+ lev.eater_pos = 0;
+ lev.eater_score = src[0x829];
+ lev.emerald_score = src[0x824];
+ lev.exit_score = src[0x82D] * 8 / 5;
+ lev.key_score = src[0x82C];
+ lev.lenses_cnt = 0;
+ lev.lenses_score = src[0x867];
+ lev.lenses_time = src[0x86A] << 8 | src[0x86B];
+ lev.magnify_cnt = 0;
+ lev.magnify_score = src[0x868];
+ lev.magnify_time = src[0x86C] << 8 | src[0x86D];
+ lev.nut_score = src[0x82A];
+ lev.shine_cnt = 0;
+ lev.slurp_score = src[0x869];
+ lev.tank_score = src[0x827];
+ lev.wheel_cnt = 0;
+ lev.wheel_x = 1;
+ lev.wheel_y = 1;
+ lev.wheel_time = src[0x838] << 8 | src[0x839];
+ lev.wind_cnt = src[0x865] & 15 ? 9999 : 0;
+ temp = src[0x865];
+ lev.wind_direction = (temp & 8 ? 0 :
+ temp & 1 ? 1 :
+ temp & 2 ? 2 :
+ temp & 4 ? 3 : 0);
+ lev.wind_time = 9999;
+ lev.wonderwall_state = 0;
+ lev.wonderwall_time = src[0x836] << 8 | src[0x837];
+
+ for (x = 0; x < 9; x++)
+ lev.eater_array[0][x] = remap_emerald[src[0x800 + x]];
+ for (x = 0; x < 9; x++)
+ lev.eater_array[1][x] = remap_emerald[src[0x809 + x]];
+ for (x = 0; x < 9; x++)
+ lev.eater_array[2][x] = remap_emerald[src[0x812 + x]];
+ for (x = 0; x < 9; x++)
+ lev.eater_array[3][x] = remap_emerald[src[0x81B + x]];
+ for (x = 0; x < 9; x++)
+ lev.eater_array[4][x] = remap_emerald[src[0x840 + x]];
+ for (x = 0; x < 9; x++)
+ lev.eater_array[5][x] = remap_emerald[src[0x849 + x]];
+ for (x = 0; x < 9; x++)
+ lev.eater_array[6][x] = remap_emerald[src[0x852 + x]];
+ for (x = 0; x < 9; x++)
+ lev.eater_array[7][x] = remap_emerald[src[0x85B + x]];
+
+ temp = remap_emerald[src[0x86F]];
+ for (y = 0; y < 8; y++)
+ {
+ if (src[0x872] & 1)
+ {
+ for (x = 0; x < 8; x++)
+ lev.ball_array[y][x] = temp;
+ }
+ else
+ {
+ lev.ball_array[y][1] = (src[0x873] & 1) ? temp : Xblank; /* north */
+ lev.ball_array[y][6] = (src[0x873] & 2) ? temp : Xblank; /* south */
+ lev.ball_array[y][3] = (src[0x873] & 4) ? temp : Xblank; /* west */
+ lev.ball_array[y][4] = (src[0x873] & 8) ? temp : Xblank; /* east */
+ lev.ball_array[y][7] = (src[0x873] & 16) ? temp : Xblank; /* southeast */
+ lev.ball_array[y][5] = (src[0x873] & 32) ? temp : Xblank; /* southwest */
+ lev.ball_array[y][2] = (src[0x873] & 64) ? temp : Xblank; /* northeast */
+ lev.ball_array[y][0] = (src[0x873] & 128) ? temp : Xblank;/* northwest */
+ }
+ }
+
+ for (temp = 0; temp < TILE_MAX; temp++)
+ lev.android_array[temp] = Xblank;
+
+ temp = src[0x878] << 8 | src[0x879];
+
+ if (temp & 1)
+ {
+ lev.android_array[Xemerald] =
+ lev.android_array[Xemerald_pause] =
+ lev.android_array[Xemerald_fall] =
+ lev.android_array[Yemerald_sB] =
+ lev.android_array[Yemerald_eB] =
+ lev.android_array[Yemerald_wB] = Xemerald;
+ }
+
+ if (temp & 2)
+ {
+ lev.android_array[Xdiamond] =
+ lev.android_array[Xdiamond_pause] =
+ lev.android_array[Xdiamond_fall] =
+ lev.android_array[Ydiamond_sB] =
+ lev.android_array[Ydiamond_eB] =
+ lev.android_array[Ydiamond_wB] = Xdiamond;
+ }
+
+ if (temp & 4)
+ {
+ lev.android_array[Xstone] =
+ lev.android_array[Xstone_pause] =
+ lev.android_array[Xstone_fall] =
+ lev.android_array[Ystone_sB] =
+ lev.android_array[Ystone_eB] =
+ lev.android_array[Ystone_wB] = Xstone;
+ }
+
+ if (temp & 8)
+ {
+ lev.android_array[Xbomb] =
+ lev.android_array[Xbomb_pause] =
+ lev.android_array[Xbomb_fall] =
+ lev.android_array[Ybomb_sB] =
+ lev.android_array[Ybomb_eB] =
+ lev.android_array[Ybomb_wB] = Xbomb;
+ }
+
+ if (temp & 16)
+ {
+ lev.android_array[Xnut] =
+ lev.android_array[Xnut_pause] =
+ lev.android_array[Xnut_fall] =
+ lev.android_array[Ynut_sB] =
+ lev.android_array[Ynut_eB] =
+ lev.android_array[Ynut_wB] = Xnut;
+ }
+
+ if (temp & 32)
+ {
+ lev.android_array[Xtank_n] =
+ lev.android_array[Xtank_gon] =
+ lev.android_array[Ytank_nB] =
+ lev.android_array[Ytank_n_e] =
+ lev.android_array[Ytank_n_w] = Xtank_n;
+
+ lev.android_array[Xtank_e] =
+ lev.android_array[Xtank_goe] =
+ lev.android_array[Ytank_eB] =
+ lev.android_array[Ytank_e_s] =
+ lev.android_array[Ytank_e_n] = Xtank_e;
+
+ lev.android_array[Xtank_s] =
+ lev.android_array[Xtank_gos] =
+ lev.android_array[Ytank_sB] =
+ lev.android_array[Ytank_s_w] =
+ lev.android_array[Ytank_s_e] = Xtank_s;
+
+ lev.android_array[Xtank_w] =
+ lev.android_array[Xtank_gow] =
+ lev.android_array[Ytank_wB] =
+ lev.android_array[Ytank_w_n] =
+ lev.android_array[Ytank_w_s] = Xtank_w;
+ }
+
+ if (temp & 64)
+ {
+ lev.android_array[Xeater_n] = lev.android_array[Yeater_nB] = Xeater_n;
+ lev.android_array[Xeater_e] = lev.android_array[Yeater_eB] = Xeater_e;
+ lev.android_array[Xeater_s] = lev.android_array[Yeater_sB] = Xeater_s;
+ lev.android_array[Xeater_w] = lev.android_array[Yeater_wB] = Xeater_w;
+ }
+
+ if (temp & 128)
+ {
+ lev.android_array[Xbug_n] =
+ lev.android_array[Xbug_gon] =
+ lev.android_array[Ybug_nB] =
+ lev.android_array[Ybug_n_e] =
+ lev.android_array[Ybug_n_w] = Xbug_gon;
+
+ lev.android_array[Xbug_e] =
+ lev.android_array[Xbug_goe] =
+ lev.android_array[Ybug_eB] =
+ lev.android_array[Ybug_e_s] =
+ lev.android_array[Ybug_e_n] = Xbug_goe;
+
+ lev.android_array[Xbug_s] =
+ lev.android_array[Xbug_gos] =
+ lev.android_array[Ybug_sB] =
+ lev.android_array[Ybug_s_w] =
+ lev.android_array[Ybug_s_e] = Xbug_gos;
+
+ lev.android_array[Xbug_w] =
+ lev.android_array[Xbug_gow] =
+ lev.android_array[Ybug_wB] =
+ lev.android_array[Ybug_w_n] =
+ lev.android_array[Ybug_w_s] = Xbug_gow;
+ }
+
+ if (temp & 256)
+ {
+ lev.android_array[Xalien] = lev.android_array[Xalien_pause] =
+ lev.android_array[Yalien_nB] = lev.android_array[Yalien_eB] =
+ lev.android_array[Yalien_sB] = lev.android_array[Yalien_wB] = Xalien;
+ }
+
+ if (temp & 512)
+ {
+ lev.android_array[Xspring] =
+ lev.android_array[Xspring_pause] =
+ lev.android_array[Xspring_e] =
+ lev.android_array[Yspring_eB] =
+ lev.android_array[Yspring_kill_eB] =
+ lev.android_array[Xspring_w] =
+ lev.android_array[Yspring_wB] =
+ lev.android_array[Yspring_kill_wB] =
+ lev.android_array[Xspring_fall] =
+ lev.android_array[Yspring_sB] = Xspring;
+ }
+
+ if (temp & 1024)
+ {
+ lev.android_array[Yballoon_nB] =
+ lev.android_array[Yballoon_eB] =
+ lev.android_array[Yballoon_sB] =
+ lev.android_array[Yballoon_wB] =
+ lev.android_array[Xballoon] = Xballoon;
+ }
+
+ if (temp & 2048)
+ {
+ lev.android_array[Xdripper] =
+ lev.android_array[XdripperB] =
+ lev.android_array[Xameuba_1] =
+ lev.android_array[Xameuba_2] =
+ lev.android_array[Xameuba_3] =
+ lev.android_array[Xameuba_4] =
+ lev.android_array[Xameuba_5] =
+ lev.android_array[Xameuba_6] =
+ lev.android_array[Xameuba_7] =
+ lev.android_array[Xameuba_8] = Xdrip_eat;
+ }
+
+ if (temp & 4096)
+ {
+ lev.android_array[Xdynamite] = Xdynamite;
+ }
+
+ for (temp = 1; temp < 2047; temp++)
+ {
+ switch(src[temp])
+ {
+ case 0x24: /* wonderwall */
+ lev.wonderwall_state = 1;
+ lev.wonderwall_time = 9999;
+ break;
+
+ case 0x28: /* wheel */
+ lev.wheel_x = temp & 63;
+ lev.wheel_y = temp >> 6;
+ lev.wheel_cnt = lev.wheel_time;
+ break;
+
#ifndef BAD_ROLL
- case 0x63: src[temp - 1] = 0x45; src[temp] = 0x80; break; /* spring roll left */
- case 0x64: src[temp + 1] = 0x45; src[temp] = 0x80; break; /* spring roll right */
- case 0x72: src[temp - 1] = 0x25; src[temp] = 0x80; break; /* nut roll left */
- case 0x73: src[temp + 1] = 0x25; src[temp] = 0x80; break; /* nut roll right */
- case 0x77: src[temp - 1] = 0x10; src[temp] = 0x80; break; /* bomb roll left */
- case 0x78: src[temp + 1] = 0x10; src[temp] = 0x80; break; /* bomb roll right */
- case 0x79: src[temp - 1] = 0x00; src[temp] = 0x80; break; /* stone roll left */
- case 0x7A: src[temp + 1] = 0x00; src[temp] = 0x80; break; /* stone roll right */
+ case 0x63: /* spring roll left */
+ src[temp - 1] = 0x45;
+ src[temp] = 0x80;
+ break;
+
+ case 0x64: /* spring roll right */
+ src[temp + 1] = 0x45;
+ src[temp] = 0x80;
+ break;
+
+ case 0x72: /* nut roll left */
+ src[temp - 1] = 0x25;
+ src[temp] = 0x80;
+ break;
+
+ case 0x73: /* nut roll right */
+ src[temp + 1] = 0x25;
+ src[temp] = 0x80;
+ break;
+
+ case 0x77: /* bomb roll left */
+ src[temp - 1] = 0x10;
+ src[temp] = 0x80;
+ break;
+
+ case 0x78: /* bomb roll right */
+ src[temp + 1] = 0x10;
+ src[temp] = 0x80;
+ break;
+
+ case 0x79: /* stone roll left */
+ src[temp - 1] = 0x00;
+ src[temp] = 0x80;
+ break;
+
+ case 0x7A: /* stone roll right */
+ src[temp + 1] = 0x00;
+ src[temp] = 0x80;
+ break;
#endif
- case 0xA3: lev.lenses_cnt = 9999; break; /* fake blank */
- case 0xA4: lev.magnify_cnt = 9999; break; /* fake grass */
- }
- }
- for(y = 0; y < HEIGHT; y++) for(x = 0; x < WIDTH; x++) Cave[y][x] = ZBORDER;
- temp = 0; for(y = 0; y < lev.height; y++) for(x = 0; x < lev.width; x++) {
- Cave[y+1][x+1] = remap_emerald[src[temp++]];
- }
- if(ply1.alive) Cave[ply1.y][ply1.x] = Zplayer;
- if(ply2.alive) Cave[ply2.y][ply2.x] = Zplayer;
- for(y = 0; y < HEIGHT; y++) for(x = 0; x < WIDTH; x++) Next[y][x] = Cave[y][x];
- for(y = 0; y < HEIGHT; y++) for(x = 0; x < WIDTH; x++) Draw[y][x] = Cave[y][x];
+
+ case 0xA3: /* fake blank */
+ lev.lenses_cnt = 9999;
+ break;
+
+ case 0xA4: /* fake grass */
+ lev.magnify_cnt = 9999;
+ break;
+ }
+ }
+
+ for (y = 0; y < HEIGHT; y++)
+ for (x = 0; x < WIDTH; x++)
+ Cave[y][x] = ZBORDER;
+
+ temp = 0;
+ for (y = 0; y < lev.height; y++)
+ for (x = 0; x < lev.width; x++)
+ Cave[y+1][x+1] = remap_emerald[src[temp++]];
+
+ if (ply1.alive)
+ Cave[ply1.y][ply1.x] = Zplayer;
+ if (ply2.alive)
+ Cave[ply2.y][ply2.x] = Zplayer;
+
+ for (y = 0; y < HEIGHT; y++)
+ for (x = 0; x < WIDTH; x++)
+ Next[y][x] = Cave[y][x];
+
+ for (y = 0; y < HEIGHT; y++)
+ for (x = 0; x < WIDTH; x++)
+ Draw[y][x] = Cave[y][x];
}
#endif
static KeyCode keycodes[16];
#if 0
-static const char *xpmNames[4] = { "object.xpm", "score.xpm", "sprite.xpm", "title.xpm" };
+static const char *xpmNames[4] =
+{
+ "object.xpm",
+ "score.xpm",
+ "sprite.xpm",
+ "title.xpm"
+};
#endif
#if 1
-static const char *pcxNames[4] = { "object.pcx", "score.pcx", "sprite.pcx", "title.pcx" };
+static const char *pcxNames[4] =
+{
+ "object.pcx",
+ "score.pcx",
+ "sprite.pcx",
+ "title.pcx"
+};
#endif
static const int xpmCloseness[4] = { 10000, 10000, 40000, 50000 };
-static const KeySym keysyms[16] = {
- XK_Up, XK_KP_Up, XK_r, /* north */
- XK_Right, XK_KP_Right, XK_g, /* east */
- XK_Down, XK_KP_Down, XK_f, /* south */
- XK_Left, XK_KP_Left, XK_d, /* west */
- XK_Shift_L, XK_Control_R, XK_space, /* fire */
- XK_Escape /* escape */
+static const KeySym keysyms[16] =
+{
+ XK_Up, XK_KP_Up, XK_r, /* north */
+ XK_Right, XK_KP_Right, XK_g, /* east */
+ XK_Down, XK_KP_Down, XK_f, /* south */
+ XK_Left, XK_KP_Left, XK_d, /* west */
+ XK_Shift_L, XK_Control_R, XK_space, /* fire */
+ XK_Escape /* escape */
};
-static const char *sound_names[SAMPLE_MAX] = {
- "00.blank.au","01.roll.au","02.stone.au","03.nut.au","04.crack.au",
- "05.bug.au","06.tank.au","07.android.au","08.spring.au","09.slurp.au",
- "10.eater.au","11.alien.au","12.collect.au","13.diamond.au","14.squash.au",
- "15.drip.au","16.push.au","17.dirt.au","18.acid.au","19.ball.au",
- "20.grow.au","21.wonder.au","22.door.au","23.exit.au","24.dynamite.au",
- "25.tick.au","26.press.au","27.wheel.au","28.boom.au","29.time.au",
- "30.die.au"
+static const char *sound_names[SAMPLE_MAX] =
+{
+ "00.blank.au","01.roll.au","02.stone.au","03.nut.au","04.crack.au",
+ "05.bug.au","06.tank.au","07.android.au","08.spring.au","09.slurp.au",
+ "10.eater.au","11.alien.au","12.collect.au","13.diamond.au","14.squash.au",
+ "15.drip.au","16.push.au","17.dirt.au","18.acid.au","19.ball.au",
+ "20.grow.au","21.wonder.au","22.door.au","23.exit.au","24.dynamite.au",
+ "25.tick.au","26.press.au","27.wheel.au","28.boom.au","29.time.au",
+ "30.die.au"
};
-static const int sound_volume[SAMPLE_MAX] = {
- 20,100,100,100,100,20,20,100,100,100,
- 50,100,100,100,100,100,100,100,100,100,
- 100,20,100,100,100,100,100,20,100,100,
- 100
+static const int sound_volume[SAMPLE_MAX] =
+{
+ 20,100,100,100,100,20,20,100,100,100,
+ 50,100,100,100,100,100,100,100,100,100,
+ 100,20,100,100,100,100,100,20,100,100,
+ 100
};
#if 0
int open_all(void)
{
- char name[MAXNAME+2];
+ char name[MAXNAME+2];
#if 0
- void *dummyptr;
- int dummyint;
+ void *dummyptr;
+ int dummyint;
#endif
- int i;
+ int i;
#if 0
- display = XOpenDisplay(arg_display);
- if(display == 0) {
- fprintf(stderr, "%s: \"%s\": %s: %s\n", progname, XDisplayName(arg_display), "failed to open display", strerror(errno));
- return(1);
- }
+ display = XOpenDisplay(arg_display);
+ if (display == 0)
+ {
+ fprintf(stderr, "%s: \"%s\": %s: %s\n", progname,
+ XDisplayName(arg_display), "failed to open display",
+ strerror(errno));
+ return(1);
+ }
#endif
- defaultScreen = DefaultScreenOfDisplay(display);
- defaultVisual = DefaultVisualOfScreen(defaultScreen);
- defaultColourmap = DefaultColormapOfScreen(defaultScreen);
- defaultRootWindow = RootWindowOfScreen(defaultScreen);
- screenDepth = DefaultDepthOfScreen(defaultScreen);
- screenWidth = WidthOfScreen(defaultScreen);
- screenHeight = HeightOfScreen(defaultScreen);
- screenBlackPixel = BlackPixelOfScreen(defaultScreen);
- screenWhitePixel = WhitePixelOfScreen(defaultScreen);
+ defaultScreen = DefaultScreenOfDisplay(display);
+ defaultVisual = DefaultVisualOfScreen(defaultScreen);
+ defaultColourmap = DefaultColormapOfScreen(defaultScreen);
+ defaultRootWindow = RootWindowOfScreen(defaultScreen);
+ screenDepth = DefaultDepthOfScreen(defaultScreen);
+ screenWidth = WidthOfScreen(defaultScreen);
+ screenHeight = HeightOfScreen(defaultScreen);
+ screenBlackPixel = BlackPixelOfScreen(defaultScreen);
+ screenWhitePixel = WhitePixelOfScreen(defaultScreen);
#if 0
- if(arg_install) {
- visualInfo.visualid = XVisualIDFromVisual(defaultVisual);
- dummyptr = XGetVisualInfo(display, VisualIDMask, &visualInfo, &dummyint);
- if(dummyptr == 0) {
- fprintf(stderr, "%s: \"%s\": %s: %s\n", progname, XDisplayName(arg_display), "failed to get visual info", strerror(errno));
- return(1);
- }
- memcpy(&visualInfo, dummyptr, sizeof(visualInfo));
- XFree(dummyptr);
-
- if(visualInfo.class != PseudoColor) {
- fprintf(stderr, "%s: \"%s\": %s\n", progname, XDisplayName(arg_display), "private colourmap only supported for pseudocolour display");
- return(1);
- }
-
- privateColourmap = XCreateColormap(display, defaultRootWindow, defaultVisual, AllocAll);
- if(privateColourmap == 0) {
- fprintf(stderr, "%s: \"%s\": %s: %s\n", progname, XDisplayName(arg_display), "failed to create colourmap", strerror(errno));
- return(1);
- }
-
- privateNumColours = visualInfo.colormap_size;
-
- privateColours = malloc(privateNumColours * sizeof(XColor));
- if(privateColours == 0) {
- fprintf(stderr, "%s: %s (%d): %s\n", progname, "malloc failed", privateNumColours * sizeof(XColor), strerror(errno));
- return(1);
- }
- for(dummyint = 0; dummyint < privateNumColours; dummyint++) privateColours[dummyint].pixel = dummyint;
- XQueryColors(display, defaultColourmap, privateColours, privateNumColours);
- XStoreColors(display, privateColourmap, privateColours, privateNumColours);
-
- privateFlags = malloc(privateNumColours);
- if(privateFlags == 0) {
- fprintf(stderr, "%s: %s (%d): %s\n", progname, "malloc failed", privateNumColours, strerror(errno));
- return(1);
- }
- memset(privateFlags, 0, privateNumColours);
- privateFlags[0] = 1; /* first two entries (black and white) are already allocated */
- privateFlags[1] = 1;
- }
+ if (arg_install)
+ {
+ visualInfo.visualid = XVisualIDFromVisual(defaultVisual);
+ dummyptr = XGetVisualInfo(display, VisualIDMask, &visualInfo, &dummyint);
+ if (dummyptr == 0)
+ {
+ fprintf(stderr, "%s: \"%s\": %s: %s\n", progname,
+ XDisplayName(arg_display), "failed to get visual info",
+ strerror(errno));
+ return(1);
+ }
- sizeHints.flags = PSize | PMinSize | PMaxSize;
- sizeHints.width = 20 * TILEX;
- sizeHints.height = 12 * TILEY + SCOREY;
- sizeHints.min_width = sizeHints.max_width = sizeHints.width;
- sizeHints.min_height = sizeHints.max_height = sizeHints.height;
- if(arg_geometry) {
- dummyint = XWMGeometry(display, XScreenNumberOfScreen(defaultScreen), arg_geometry, 0, 2, &sizeHints, &sizeHints.x, &sizeHints.y, &dummyint, &dummyint, &sizeHints.win_gravity);
- if(dummyint & (XValue | YValue)) sizeHints.flags |= USPosition | PWinGravity;
- }
+ memcpy(&visualInfo, dummyptr, sizeof(visualInfo));
+ XFree(dummyptr);
- xwindow = XCreateWindow(display, defaultRootWindow, sizeHints.x, sizeHints.y, sizeHints.width, sizeHints.height, 2, screenDepth, InputOutput, CopyFromParent, 0, 0);
- if(xwindow == 0) {
- fprintf(stderr, "%s: \"%s\": %s: %s\n", progname, XDisplayName(arg_display), "failed to open window", strerror(errno));
- return(1);
- }
+ if (visualInfo.class != PseudoColor)
+ {
+ fprintf(stderr, "%s: \"%s\": %s\n", progname, XDisplayName(arg_display),
+ "private colourmap only supported for pseudocolour display");
+ return(1);
+ }
+
+ privateColourmap = XCreateColormap(display, defaultRootWindow,
+ defaultVisual, AllocAll);
+ if (privateColourmap == 0)
+ {
+ fprintf(stderr, "%s: \"%s\": %s: %s\n", progname,
+ XDisplayName(arg_display), "failed to create colourmap",
+ strerror(errno));
+ return(1);
+ }
+
+ privateNumColours = visualInfo.colormap_size;
+
+ privateColours = malloc(privateNumColours * sizeof(XColor));
+ if (privateColours == 0)
+ {
+ fprintf(stderr, "%s: %s (%d): %s\n", progname, "malloc failed",
+ privateNumColours * sizeof(XColor), strerror(errno));
+ return(1);
+ }
- setWindowAttributes.background_pixel = screenBlackPixel;
- setWindowAttributes.border_pixel = screenWhitePixel;
- setWindowAttributes.backing_store = NotUseful;
- setWindowAttributes.override_redirect = False;
- setWindowAttributes.event_mask = KeyPressMask | EnterWindowMask | LeaveWindowMask | ExposureMask;
- setWindowAttributes.colormap = privateColourmap ? privateColourmap : defaultColourmap;
- XChangeWindowAttributes(display, xwindow, CWBackPixel | CWBorderPixel | CWBackingStore | CWOverrideRedirect | CWEventMask | CWColormap, &setWindowAttributes);
+ for (dummyint = 0; dummyint < privateNumColours; dummyint++)
+ privateColours[dummyint].pixel = dummyint;
- XStoreName(display, xwindow, "Emerald Mine");
+ XQueryColors(display, defaultColourmap, privateColours, privateNumColours);
+ XStoreColors(display, privateColourmap, privateColours, privateNumColours);
- wmHints.flags = InputHint | StateHint;
- wmHints.input = True;
- wmHints.initial_state = NormalState;
- XSetWMHints(display, xwindow, &wmHints);
+ privateFlags = malloc(privateNumColours);
+ if (privateFlags == 0)
+ {
+ fprintf(stderr, "%s: %s (%d): %s\n", progname, "malloc failed",
+ privateNumColours, strerror(errno));
+ return(1);
+ }
- XSetWMNormalHints(display, xwindow, &sizeHints);
+ memset(privateFlags, 0, privateNumColours);
+
+ /* first two entries (black and white) are already allocated */
+ privateFlags[0] = 1;
+ privateFlags[1] = 1;
+ }
- deleteAtom = XInternAtom(display, "WM_DELETE_WINDOW", False);
- XSetWMProtocols(display, xwindow, &deleteAtom, 1);
+ sizeHints.flags = PSize | PMinSize | PMaxSize;
+ sizeHints.width = 20 * TILEX;
+ sizeHints.height = 12 * TILEY + SCOREY;
+ sizeHints.min_width = sizeHints.max_width = sizeHints.width;
+ sizeHints.min_height = sizeHints.max_height = sizeHints.height;
- cursor = XCreateFontCursor(display, XC_trek);
- if(cursor) XDefineCursor(display, xwindow, cursor);
+ if (arg_geometry)
+ {
+ dummyint = XWMGeometry(display, XScreenNumberOfScreen(defaultScreen),
+ arg_geometry, 0, 2, &sizeHints, &sizeHints.x,
+ &sizeHints.y, &dummyint, &dummyint,
+ &sizeHints.win_gravity);
+ if (dummyint & (XValue | YValue))
+ sizeHints.flags |= USPosition | PWinGravity;
+ }
- XMapWindow(display, xwindow);
+ xwindow = XCreateWindow(display, defaultRootWindow, sizeHints.x, sizeHints.y,
+ sizeHints.width, sizeHints.height, 2, screenDepth,
+ InputOutput, CopyFromParent, 0, 0);
+ if (xwindow == 0)
+ {
+ fprintf(stderr, "%s: \"%s\": %s: %s\n", progname,
+ XDisplayName(arg_display), "failed to open window",
+ strerror(errno));
+ return(1);
+ }
+
+ setWindowAttributes.background_pixel = screenBlackPixel;
+ setWindowAttributes.border_pixel = screenWhitePixel;
+ setWindowAttributes.backing_store = NotUseful;
+ setWindowAttributes.override_redirect = False;
+ setWindowAttributes.event_mask =
+ KeyPressMask | EnterWindowMask | LeaveWindowMask | ExposureMask;
+ setWindowAttributes.colormap =
+ privateColourmap ? privateColourmap : defaultColourmap;
+ XChangeWindowAttributes(display, xwindow,
+ CWBackPixel | CWBorderPixel | CWBackingStore |
+ CWOverrideRedirect | CWEventMask | CWColormap,
+ &setWindowAttributes);
+
+ XStoreName(display, xwindow, "Emerald Mine");
+
+ wmHints.flags = InputHint | StateHint;
+ wmHints.input = True;
+ wmHints.initial_state = NormalState;
+ XSetWMHints(display, xwindow, &wmHints);
+
+ XSetWMNormalHints(display, xwindow, &sizeHints);
+
+ deleteAtom = XInternAtom(display, "WM_DELETE_WINDOW", False);
+ XSetWMProtocols(display, xwindow, &deleteAtom, 1);
+
+ cursor = XCreateFontCursor(display, XC_trek);
+ if (cursor) XDefineCursor(display, xwindow, cursor);
+
+ XMapWindow(display, xwindow);
#endif
#if 0
- for(i = 0; i < 4; i++) {
- name[MAXNAME] = 0;
- if(arg_basedir) {
- snprintf(name, MAXNAME+2, "%s/%s/%s", arg_basedir, EM_GFX_DIR, xpmNames[i]);
- } else {
- snprintf(name, MAXNAME+2, "%s/%s", EM_GFX_DIR, xpmNames[i]);
- }
- if(name[MAXNAME]) snprintf_overflow("read graphics/ files");
-
- xpmAttributes[i].valuemask = XpmColormap | XpmReturnAllocPixels | XpmExactColors | XpmCloseness | XpmAllocColor | XpmFreeColors;
- xpmAttributes[i].colormap = privateColourmap ? privateColourmap : defaultColourmap;
- xpmAttributes[i].exactColors = False;
- xpmAttributes[i].closeness = xpmCloseness[i];
- xpmAttributes[i].alloc_color = xpmAllocColourFunc;
- xpmAttributes[i].free_colors = xpmFreeColoursFunc;
- dummyint = XpmReadFileToPixmap(display, xwindow, name, &xpmPixmaps[i], &xpmBitmaps[i], &xpmAttributes[i]);
- if(dummyint) {
- fprintf(stderr, "%s: \"%s\": \"%s\": %s: %s: %s\n", progname, XDisplayName(arg_display), name, "failed to read xpm", XpmGetErrorString(dummyint), strerror(errno));
- return(1);
- }
- xpmGot[i] = 1;
- }
+ for (i = 0; i < 4; i++)
+ {
+ name[MAXNAME] = 0;
+ if (arg_basedir)
+ {
+ snprintf(name, MAXNAME+2, "%s/%s/%s", arg_basedir, EM_GFX_DIR,
+ xpmNames[i]);
+ }
+ else
+ {
+ snprintf(name, MAXNAME+2, "%s/%s", EM_GFX_DIR, xpmNames[i]);
+ }
+
+ if (name[MAXNAME]) snprintf_overflow("read graphics/ files");
+
+ xpmAttributes[i].valuemask =
+ XpmColormap | XpmReturnAllocPixels | XpmExactColors | XpmCloseness |
+ XpmAllocColor | XpmFreeColors;
+ xpmAttributes[i].colormap =
+ privateColourmap ? privateColourmap : defaultColourmap;
+ xpmAttributes[i].exactColors = False;
+ xpmAttributes[i].closeness = xpmCloseness[i];
+ xpmAttributes[i].alloc_color = xpmAllocColourFunc;
+ xpmAttributes[i].free_colors = xpmFreeColoursFunc;
+ dummyint = XpmReadFileToPixmap(display, xwindow, name, &xpmPixmaps[i],
+ &xpmBitmaps[i], &xpmAttributes[i]);
+ if (dummyint)
+ {
+ fprintf(stderr, "%s: \"%s\": \"%s\": %s: %s: %s\n", progname,
+ XDisplayName(arg_display), name, "failed to read xpm",
+ XpmGetErrorString(dummyint), strerror(errno));
+ return(1);
+ }
+
+ xpmGot[i] = 1;
+ }
#endif
- for(i = 0; i < 4; i++)
- {
- name[MAXNAME] = 0;
- snprintf(name, MAXNAME+2, "%s/%s", EM_GFX_DIR, pcxNames[i]);
+ for (i = 0; i < 4; i++)
+ {
+ name[MAXNAME] = 0;
+ snprintf(name, MAXNAME+2, "%s/%s", EM_GFX_DIR, pcxNames[i]);
- if (name[MAXNAME])
- snprintf_overflow("read graphics/ files");
+ if (name[MAXNAME])
+ snprintf_overflow("read graphics/ files");
- if ((pcxBitmaps[i] = LoadImage(name)) == NULL)
- {
- printf("::: LoadImage() failed for file '%s'\n", name);
- return 1;
- }
- }
+ if ((pcxBitmaps[i] = LoadImage(name)) == NULL)
+ {
+ printf("::: LoadImage() failed for file '%s'\n", name);
+ return 1;
+ }
+ }
- objBitmap = pcxBitmaps[0];
- botBitmap = pcxBitmaps[1];
- sprBitmap = pcxBitmaps[2];
- ttlBitmap = pcxBitmaps[3];
+ objBitmap = pcxBitmaps[0];
+ botBitmap = pcxBitmaps[1];
+ sprBitmap = pcxBitmaps[2];
+ ttlBitmap = pcxBitmaps[3];
#if 0
- objPixmap = xpmPixmaps[0];
- botPixmap = xpmPixmaps[1];
- sprPixmap = xpmPixmaps[2];
- ttlPixmap = xpmPixmaps[3];
- objmaskBitmap = xpmBitmaps[0];
- botmaskBitmap = xpmBitmaps[1];
- sprmaskBitmap = xpmBitmaps[2];
- ttlmaskBitmap = xpmBitmaps[3];
+ objPixmap = xpmPixmaps[0];
+ botPixmap = xpmPixmaps[1];
+ sprPixmap = xpmPixmaps[2];
+ ttlPixmap = xpmPixmaps[3];
+ objmaskBitmap = xpmBitmaps[0];
+ botmaskBitmap = xpmBitmaps[1];
+ sprmaskBitmap = xpmBitmaps[2];
+ ttlmaskBitmap = xpmBitmaps[3];
#else
- objPixmap = pcxBitmaps[0]->drawable;
- botPixmap = pcxBitmaps[1]->drawable;
- sprPixmap = pcxBitmaps[2]->drawable;
- ttlPixmap = pcxBitmaps[3]->drawable;
- objmaskBitmap = pcxBitmaps[0]->clip_mask;
- botmaskBitmap = pcxBitmaps[1]->clip_mask;
- sprmaskBitmap = pcxBitmaps[2]->clip_mask;
- ttlmaskBitmap = pcxBitmaps[3]->clip_mask;
+ objPixmap = pcxBitmaps[0]->drawable;
+ botPixmap = pcxBitmaps[1]->drawable;
+ sprPixmap = pcxBitmaps[2]->drawable;
+ ttlPixmap = pcxBitmaps[3]->drawable;
+ objmaskBitmap = pcxBitmaps[0]->clip_mask;
+ botmaskBitmap = pcxBitmaps[1]->clip_mask;
+ sprmaskBitmap = pcxBitmaps[2]->clip_mask;
+ ttlmaskBitmap = pcxBitmaps[3]->clip_mask;
#endif
#if 1
- for (i = 0; i < 4; i++)
- {
- Pixmap clip_mask;
+ for (i = 0; i < 4; i++)
+ {
+ Pixmap clip_mask;
- if ((clip_mask = XCreatePixmap(display, window->drawable,
- pcxBitmaps[i]->width * 2,
- pcxBitmaps[i]->height * 2, 1))
- == None)
- {
- printf("::: cannot create clip mask");
- return 1;
- }
+ if ((clip_mask = XCreatePixmap(display, window->drawable,
+ pcxBitmaps[i]->width * 2,
+ pcxBitmaps[i]->height * 2, 1))
+ == None)
+ {
+ printf("::: cannot create clip mask");
+ return 1;
+ }
#if 0
- {
- XGCValues clip_gc_values;
- unsigned long clip_gc_valuemask;
- GC gc;
-
- clip_gc_values.graphics_exposures = False;
- clip_gc_valuemask = GCGraphicsExposures;
- if ((gc = XCreateGC(display, clip_mask,
- clip_gc_valuemask, &clip_gc_values)) == None)
- {
- printf("X CreateGC failed\n");
- exit(1);
- }
-
- XFillRectangle(display, clip_mask, gc, 0, 0,
- pcxBitmaps[i]->width * 2,
- pcxBitmaps[i]->height * 2);
- }
+ {
+ XGCValues clip_gc_values;
+ unsigned long clip_gc_valuemask;
+ GC gc;
+
+ clip_gc_values.graphics_exposures = False;
+ clip_gc_valuemask = GCGraphicsExposures;
+ if ((gc = XCreateGC(display, clip_mask,
+ clip_gc_valuemask, &clip_gc_values)) == None)
+ {
+ printf("X CreateGC failed\n");
+ exit(1);
+ }
+
+ XFillRectangle(display, clip_mask, gc, 0, 0,
+ pcxBitmaps[i]->width * 2,
+ pcxBitmaps[i]->height * 2);
+ }
#endif
#if 0
- {
- byte * src_ptr;
- int src_width = pcxBitmaps[i]->width;
- int src_height = pcxBitmaps[i]->height;
+ {
+ byte * src_ptr;
+ int src_width = pcxBitmaps[i]->width;
+ int src_height = pcxBitmaps[i]->height;
#if 0
- printf("::: %d, %d [%ld -> %ld (%ld)]\n",
- src_width, src_height,
- src_ptr,
- src_ptr + src_width * src_height * 1,
- src_width * src_height * 1);
+ printf("::: %d, %d [%ld -> %ld (%ld)]\n",
+ src_width, src_height,
+ src_ptr,
+ src_ptr + src_width * src_height * 1,
+ src_width * src_height * 1);
#endif
#if 0
- for (i = src_ptr; i < src_ptr + src_width * src_height * 1; i++)
- {
- byte x = *(byte *)i;
+ for (i = src_ptr; i < src_ptr + src_width * src_height * 1; i++)
+ {
+ byte x = *(byte *)i;
- x = x * 1;
- }
+ x = x * 1;
+ }
#endif
- }
+ }
#endif
- if (ZOOM_FACTOR > 1)
- pcxBitmapsX2[i] = ZoomBitmap(pcxBitmaps[i],
- pcxBitmaps[i]->width * ZOOM_FACTOR,
- pcxBitmaps[i]->height * ZOOM_FACTOR);
- else
- pcxBitmapsX2[i] = pcxBitmaps[i];
+ if (ZOOM_FACTOR > 1)
+ pcxBitmapsX2[i] = ZoomBitmap(pcxBitmaps[i],
+ pcxBitmaps[i]->width * ZOOM_FACTOR,
+ pcxBitmaps[i]->height * ZOOM_FACTOR);
+ else
+ pcxBitmapsX2[i] = pcxBitmaps[i];
#if 1
#if 0
- printf("::: CREATING NEW CLIPMASKS ...\n");
+ printf("::: CREATING NEW CLIPMASKS ...\n");
#endif
#if 1
- clip_mask = Pixmap_to_Mask(pcxBitmapsX2[i]->drawable,
- pcxBitmapsX2[i]->width,
- pcxBitmapsX2[i]->height);
+ clip_mask = Pixmap_to_Mask(pcxBitmapsX2[i]->drawable,
+ pcxBitmapsX2[i]->width,
+ pcxBitmapsX2[i]->height);
#endif
#if 0
- printf("::: CREATING NEW CLIPMASKS DONE\n");
+ printf("::: CREATING NEW CLIPMASKS DONE\n");
#endif
- pcxBitmapsX2[i]->clip_mask = clip_mask;
+ pcxBitmapsX2[i]->clip_mask = clip_mask;
- /* add clip mask GC */
- {
- XGCValues clip_gc_values;
- unsigned long clip_gc_valuemask;
-
- clip_gc_values.graphics_exposures = False;
- clip_gc_values.clip_mask = pcxBitmapsX2[i]->clip_mask;
- clip_gc_valuemask = GCGraphicsExposures | GCClipMask;
- pcxBitmapsX2[i]->stored_clip_gc = XCreateGC(display,
- window->drawable,
- clip_gc_valuemask,
- &clip_gc_values);
- }
+ /* add clip mask GC */
+ {
+ XGCValues clip_gc_values;
+ unsigned long clip_gc_valuemask;
+
+ clip_gc_values.graphics_exposures = False;
+ clip_gc_values.clip_mask = pcxBitmapsX2[i]->clip_mask;
+ clip_gc_valuemask = GCGraphicsExposures | GCClipMask;
+ pcxBitmapsX2[i]->stored_clip_gc = XCreateGC(display,
+ window->drawable,
+ clip_gc_valuemask,
+ &clip_gc_values);
+ }
#if 0
- printf("::: %ld, %ld, %ld, %ld, %ld, %ld, %ld\n",
- pcxBitmaps[i]->gc,
- pcxBitmaps[i]->clip_mask, pcxBitmapsX2[i]->clip_mask,
- pcxBitmaps[i]->width, pcxBitmaps[i]->height,
- pcxBitmapsX2[i]->width, pcxBitmapsX2[i]->height);
+ printf("::: %ld, %ld, %ld, %ld, %ld, %ld, %ld\n",
+ pcxBitmaps[i]->gc,
+ pcxBitmaps[i]->clip_mask, pcxBitmapsX2[i]->clip_mask,
+ pcxBitmaps[i]->width, pcxBitmaps[i]->height,
+ pcxBitmapsX2[i]->width, pcxBitmapsX2[i]->height);
#endif
#if 0
- ZoomPixmap(display, pcxBitmaps[i]->gc,
- pcxBitmaps[i]->clip_mask, pcxBitmapsX2[i]->clip_mask,
- pcxBitmaps[i]->width, pcxBitmaps[i]->height,
- pcxBitmapsX2[i]->width, pcxBitmapsX2[i]->height);
+ ZoomPixmap(display, pcxBitmaps[i]->gc,
+ pcxBitmaps[i]->clip_mask, pcxBitmapsX2[i]->clip_mask,
+ pcxBitmaps[i]->width, pcxBitmaps[i]->height,
+ pcxBitmapsX2[i]->width, pcxBitmapsX2[i]->height);
#endif
#endif
- }
+ }
- objBitmap = pcxBitmapsX2[0];
- botBitmap = pcxBitmapsX2[1];
- sprBitmap = pcxBitmapsX2[2];
- ttlBitmap = pcxBitmapsX2[3];
+ objBitmap = pcxBitmapsX2[0];
+ botBitmap = pcxBitmapsX2[1];
+ sprBitmap = pcxBitmapsX2[2];
+ ttlBitmap = pcxBitmapsX2[3];
- objPixmap = pcxBitmapsX2[0]->drawable;
- botPixmap = pcxBitmapsX2[1]->drawable;
- sprPixmap = pcxBitmapsX2[2]->drawable;
- ttlPixmap = pcxBitmapsX2[3]->drawable;
+ objPixmap = pcxBitmapsX2[0]->drawable;
+ botPixmap = pcxBitmapsX2[1]->drawable;
+ sprPixmap = pcxBitmapsX2[2]->drawable;
+ ttlPixmap = pcxBitmapsX2[3]->drawable;
#if 1
- objmaskBitmap = pcxBitmapsX2[0]->clip_mask;
- botmaskBitmap = pcxBitmapsX2[1]->clip_mask;
- sprmaskBitmap = pcxBitmapsX2[2]->clip_mask;
- ttlmaskBitmap = pcxBitmapsX2[3]->clip_mask;
+ objmaskBitmap = pcxBitmapsX2[0]->clip_mask;
+ botmaskBitmap = pcxBitmapsX2[1]->clip_mask;
+ sprmaskBitmap = pcxBitmapsX2[2]->clip_mask;
+ ttlmaskBitmap = pcxBitmapsX2[3]->clip_mask;
#endif
#endif
#if 1
- screenBitmap = CreateBitmap(22 * TILEX, 14 * TILEY, DEFAULT_DEPTH);
- scoreBitmap = CreateBitmap(20 * TILEX, SCOREY, DEFAULT_DEPTH);
+ screenBitmap = CreateBitmap(22 * TILEX, 14 * TILEY, DEFAULT_DEPTH);
+ scoreBitmap = CreateBitmap(20 * TILEX, SCOREY, DEFAULT_DEPTH);
#endif
- screenPixmap = XCreatePixmap(display, xwindow, 22 * TILEX, 14 * TILEY, screenDepth);
- if(screenPixmap == 0) {
- fprintf(stderr, "%s: \"%s\": %s: %s\n", progname, XDisplayName(arg_display), "failed to create pixmap", strerror(errno));
- return(1);
- }
+ screenPixmap = XCreatePixmap(display, xwindow, 22 * TILEX, 14 * TILEY,
+ screenDepth);
+ if (screenPixmap == 0)
+ {
+ fprintf(stderr, "%s: \"%s\": %s: %s\n", progname,
+ XDisplayName(arg_display), "failed to create pixmap",
+ strerror(errno));
+ return(1);
+ }
- scorePixmap = XCreatePixmap(display, xwindow, 20 * TILEX, SCOREY, screenDepth);
- if(scorePixmap == 0) {
- fprintf(stderr, "%s: \"%s\": %s: %s\n", progname, XDisplayName(arg_display), "failed to create pixmap", strerror(errno));
- return(1);
- }
+ scorePixmap = XCreatePixmap(display, xwindow, 20 * TILEX, SCOREY,
+ screenDepth);
+ if (scorePixmap == 0)
+ {
+ fprintf(stderr, "%s: \"%s\": %s: %s\n", progname,
+ XDisplayName(arg_display), "failed to create pixmap",
+ strerror(errno));
+ return(1);
+ }
#if 1
- screenBitmap->drawable = screenPixmap;
- scoreBitmap->drawable = scorePixmap;
+ screenBitmap->drawable = screenPixmap;
+ scoreBitmap->drawable = scorePixmap;
#endif
- spriteBitmap = XCreatePixmap(display, xwindow, TILEX, TILEY, 1);
- if(spriteBitmap == 0) {
- fprintf(stderr, "%s: \"%s\": %s: %s\n", progname, XDisplayName(arg_display), "failed to create pixmap", strerror(errno));
- return(1);
- }
+ spriteBitmap = XCreatePixmap(display, xwindow, TILEX, TILEY, 1);
+ if (spriteBitmap == 0)
+ {
+ fprintf(stderr, "%s: \"%s\": %s: %s\n", progname,
+ XDisplayName(arg_display), "failed to create pixmap",
+ strerror(errno));
+ return(1);
+ }
- redColour.pixel = screenWhitePixel;
- whiteColour.pixel = screenBlackPixel;
- gotRed = (xpmAllocColourFunc(display, privateColourmap ? privateColourmap : defaultColourmap, "red", &redColour, 0) > 0);
- gotWhite = (xpmAllocColourFunc(display, privateColourmap ? privateColourmap : defaultColourmap, "white", &whiteColour, 0) > 0);
+ redColour.pixel = screenWhitePixel;
+ whiteColour.pixel = screenBlackPixel;
+ gotRed = (xpmAllocColourFunc(display, privateColourmap ? privateColourmap :
+ defaultColourmap,
+ "red", &redColour, 0) > 0);
+ gotWhite = (xpmAllocColourFunc(display, privateColourmap ? privateColourmap :
+ defaultColourmap,
+ "white", &whiteColour, 0) > 0);
+
+ gcValues.graphics_exposures = False;
+ screenGC = XCreateGC(display, screenPixmap, GCGraphicsExposures, &gcValues);
+ if (screenGC == 0)
+ {
+ fprintf(stderr, "%s: \"%s\": %s: %s\n", progname,
+ XDisplayName(arg_display), "failed to create graphics context",
+ strerror(errno));
+ return(1);
+ }
- gcValues.graphics_exposures = False;
- screenGC = XCreateGC(display, screenPixmap, GCGraphicsExposures, &gcValues);
- if(screenGC == 0) {
- fprintf(stderr, "%s: \"%s\": %s: %s\n", progname, XDisplayName(arg_display), "failed to create graphics context", strerror(errno));
- return(1);
- }
+ gcValues.graphics_exposures = False;
+ scoreGC = XCreateGC(display, scorePixmap, GCGraphicsExposures, &gcValues);
+ if (scoreGC == 0)
+ {
+ fprintf(stderr, "%s: \"%s\": %s: %s\n", progname,
+ XDisplayName(arg_display), "failed to create graphics context",
+ strerror(errno));
+ return(1);
+ }
- gcValues.graphics_exposures = False;
- scoreGC = XCreateGC(display, scorePixmap, GCGraphicsExposures, &gcValues);
- if(scoreGC == 0) {
- fprintf(stderr, "%s: \"%s\": %s: %s\n", progname, XDisplayName(arg_display), "failed to create graphics context", strerror(errno));
- return(1);
- }
+ gcValues.function =
+ objmaskBitmap ? GXcopyInverted : sprmaskBitmap ? GXcopy : GXset;
+ gcValues.graphics_exposures = False;
+ spriteGC = XCreateGC(display, spriteBitmap, GCFunction | GCGraphicsExposures,
+ &gcValues);
+ if (spriteGC == 0)
+ {
+ fprintf(stderr, "%s: \"%s\": %s: %s\n", progname,
+ XDisplayName(arg_display), "failed to create graphics context",
+ strerror(errno));
+ return(1);
+ }
- gcValues.function = objmaskBitmap ? GXcopyInverted : sprmaskBitmap ? GXcopy : GXset;
- gcValues.graphics_exposures = False;
- spriteGC = XCreateGC(display, spriteBitmap, GCFunction | GCGraphicsExposures, &gcValues);
- if(spriteGC == 0) {
- fprintf(stderr, "%s: \"%s\": %s: %s\n", progname, XDisplayName(arg_display), "failed to create graphics context", strerror(errno));
- return(1);
- }
+ gcValues.foreground = redColour.pixel;
+ gcValues.background = whiteColour.pixel;
+ gcValues.line_style = LineDoubleDash;
+ gcValues.graphics_exposures = False;
+ antsGC = XCreateGC(display, screenPixmap,
+ GCForeground | GCBackground | GCLineStyle |
+ GCGraphicsExposures,
+ &gcValues);
+ if (antsGC == 0)
+ {
+ fprintf(stderr, "%s: \"%s\": %s: %s\n", progname,
+ XDisplayName(arg_display), "failed to create graphics context",
+ strerror(errno));
+ return(1);
+ }
- gcValues.foreground = redColour.pixel;
- gcValues.background = whiteColour.pixel;
- gcValues.line_style = LineDoubleDash;
- gcValues.graphics_exposures = False;
- antsGC = XCreateGC(display, screenPixmap, GCForeground | GCBackground | GCLineStyle | GCGraphicsExposures, &gcValues);
- if(antsGC == 0) {
- fprintf(stderr, "%s: \"%s\": %s: %s\n", progname, XDisplayName(arg_display), "failed to create graphics context", strerror(errno));
- return(1);
- }
+ for (i = 0; i < 16; i++)
+ keycodes[i] = XKeysymToKeycode(display, keysyms[i]);
- for(i = 0; i < 16; i++) {
- keycodes[i] = XKeysymToKeycode(display, keysyms[i]);
- }
- for(i = 0; i < 3; i++) northKeyCode[i] = keycodes[i + 0];
- for(i = 0; i < 3; i++) eastKeyCode[i] = keycodes[i + 3];
- for(i = 0; i < 3; i++) southKeyCode[i] = keycodes[i + 6];
- for(i = 0; i < 3; i++) westKeyCode[i] = keycodes[i + 9];
- for(i = 0; i < 3; i++) fireKeyCode[i] = keycodes[i + 12];
- for(i = 0; i < 1; i++) escKeyCode[i] = keycodes[i + 15];
+ for (i = 0; i < 3; i++)
+ northKeyCode[i] = keycodes[i + 0];
+ for (i = 0; i < 3; i++)
+ eastKeyCode[i] = keycodes[i + 3];
+ for (i = 0; i < 3; i++)
+ southKeyCode[i] = keycodes[i + 6];
+ for (i = 0; i < 3; i++)
+ westKeyCode[i] = keycodes[i + 9];
+ for (i = 0; i < 3; i++)
+ fireKeyCode[i] = keycodes[i + 12];
+ for (i = 0; i < 1; i++)
+ escKeyCode[i] = keycodes[i + 15];
- /* ----------------------------------------------------------------- */
+ /* ----------------------------------------------------------------- */
#if 0
- {
- Bitmap *bm = pcxBitmaps[2];
- Pixmap clip_mask = bm->clip_mask;
+ {
+ Bitmap *bm = pcxBitmaps[2];
+ Pixmap clip_mask = bm->clip_mask;
- if (clip_mask)
- {
+ if (clip_mask)
+ {
#if 1
- int width = bm->width;
- int height = bm->height;
+ int width = bm->width;
+ int height = bm->height;
#else
- int width = 16 * 4;
- int height = 16 * 4;
+ int width = 16 * 4;
+ int height = 16 * 4;
#endif
- XImage *src_ximage = XGetImage(display, clip_mask, 0, 0,
- width, height, AllPlanes, ZPixmap);
- XImage *dst_ximage = XGetImage(display, xwindow, 0, 0,
- width, height, AllPlanes, ZPixmap);
- int x, y;
-
- if (src_ximage == NULL)
- {
- printf("src_ximage failed\n");
- exit(1);
- }
-
- if (dst_ximage == NULL)
- {
- printf("dst_ximage failed\n");
- exit(1);
- }
-
- printf("::: DISPLAY CLIP MASK ...\n");
-
- for (x=0; x<width; x++)
- {
- for (y=0; y<height; y++)
- {
- unsigned long pixel = XGetPixel(src_ximage, x, y);
+ XImage *src_ximage = XGetImage(display, clip_mask, 0, 0,
+ width, height, AllPlanes, ZPixmap);
+ XImage *dst_ximage = XGetImage(display, xwindow, 0, 0,
+ width, height, AllPlanes, ZPixmap);
+ int x, y;
+
+ if (src_ximage == NULL)
+ {
+ printf("src_ximage failed\n");
+ exit(1);
+ }
- if (pixel != BlackPixel(display, screen))
- pixel = WhitePixel(display, screen);
+ if (dst_ximage == NULL)
+ {
+ printf("dst_ximage failed\n");
+ exit(1);
+ }
- XPutPixel(dst_ximage, x, y, pixel);
- }
- }
+ printf("::: DISPLAY CLIP MASK ...\n");
- printf("::: DISPLAY CLIP MASK NOW\n");
+ for (x=0; x<width; x++)
+ {
+ for (y=0; y<height; y++)
+ {
+ unsigned long pixel = XGetPixel(src_ximage, x, y);
- XPutImage(display, xwindow, screenGC, dst_ximage, 0, 0,
- 0, 13 * TILEY, width, height);
+ if (pixel != BlackPixel(display, screen))
+ pixel = WhitePixel(display, screen);
- printf("::: DISPLAY CLIP MASK DONE\n");
- }
+ XPutPixel(dst_ximage, x, y, pixel);
}
+ }
+
+ printf("::: DISPLAY CLIP MASK NOW\n");
+
+ XPutImage(display, xwindow, screenGC, dst_ximage, 0, 0,
+ 0, 13 * TILEY, width, height);
+
+ printf("::: DISPLAY CLIP MASK DONE\n");
+ }
+ }
#endif
- /* ----------------------------------------------------------------- */
+ /* ----------------------------------------------------------------- */
#if 0
- {
- int ii = 2;
+ {
+ int ii = 2;
- XGCValues clip_gc_values;
- unsigned long clip_gc_valuemask;
+ XGCValues clip_gc_values;
+ unsigned long clip_gc_valuemask;
#if 1
- GC gc = screenGC;
+ GC gc = screenGC;
#else
#if 1
- GC gc = pcxBitmaps[ii]->stored_clip_gc;
+ GC gc = pcxBitmaps[ii]->stored_clip_gc;
#else
- GC gc = pcxBitmaps[ii]->gc;
+ GC gc = pcxBitmaps[ii]->gc;
#endif
#endif
- Pixmap src_pixmap = pcxBitmaps[ii]->clip_mask;
- Pixmap dst_pixmap = pcxBitmapsX2[ii]->clip_mask;
- int src_width = pcxBitmaps[ii]->width;
- int src_height = pcxBitmaps[ii]->height;
- int dst_width = pcxBitmapsX2[ii]->width;
- int dst_height = pcxBitmapsX2[ii]->height;
-
- XImage *src_ximage, *dst_ximage;
- byte *src_ptr, *dst_ptr;
- int bits_per_pixel;
- int bytes_per_pixel;
- int x, y, xx, yy, i;
+ Pixmap src_pixmap = pcxBitmaps[ii]->clip_mask;
+ Pixmap dst_pixmap = pcxBitmapsX2[ii]->clip_mask;
+ int src_width = pcxBitmaps[ii]->width;
+ int src_height = pcxBitmaps[ii]->height;
+ int dst_width = pcxBitmapsX2[ii]->width;
+ int dst_height = pcxBitmapsX2[ii]->height;
+
+ XImage *src_ximage, *dst_ximage;
+ byte *src_ptr, *dst_ptr;
+ int bits_per_pixel;
+ int bytes_per_pixel;
+ int x, y, xx, yy, i;
#if 1
- boolean scale_down = (src_width > dst_width);
- int zoom_factor;
+ boolean scale_down = (src_width > dst_width);
+ int zoom_factor;
#else
- int zoom_factor = src_width / dst_width; /* currently very limited! */
+ int zoom_factor = src_width / dst_width; /* currently very limited! */
#endif
- int row_skip, col_skip;
+ int row_skip, col_skip;
- printf("::: %d\n", scale_down);
+ printf("::: %d\n", scale_down);
- xdebug("::: ZOOM STEP 1");
+ xdebug("::: ZOOM STEP 1");
- clip_gc_values.graphics_exposures = False;
- clip_gc_valuemask = GCGraphicsExposures;
- if ((gc = XCreateGC(display, pcxBitmaps[ii]->clip_mask,
- clip_gc_valuemask, &clip_gc_values)) == None)
- {
- printf("XCreateGC failed\n");
- exit(1);
- }
+ clip_gc_values.graphics_exposures = False;
+ clip_gc_valuemask = GCGraphicsExposures;
+ if ((gc = XCreateGC(display, pcxBitmaps[ii]->clip_mask,
+ clip_gc_valuemask, &clip_gc_values)) == None)
+ {
+ printf("XCreateGC failed\n");
+ exit(1);
+ }
- xdebug("::: ZOOM STEP 2");
+ xdebug("::: ZOOM STEP 2");
- if (scale_down)
- {
- zoom_factor = src_width / dst_width;
+ if (scale_down)
+ {
+ zoom_factor = src_width / dst_width;
- /* adjust source image size to integer multiple of destination size */
- src_width = dst_width * zoom_factor;
- src_height = dst_height * zoom_factor;
- }
- else
- {
- zoom_factor = dst_width / src_width;
+ /* adjust source image size to integer multiple of destination size */
+ src_width = dst_width * zoom_factor;
+ src_height = dst_height * zoom_factor;
+ }
+ else
+ {
+ zoom_factor = dst_width / src_width;
- /* no adjustment needed when scaling up (some pixels may be left blank) */
- }
+ /* no adjustment needed when scaling up (some pixels may be left blank) */
+ }
- /* copy source pixmap to temporary image */
- if ((src_ximage = XGetImage(display, src_pixmap, 0, 0, src_width, src_height,
- AllPlanes, ZPixmap)) == NULL)
- Error(ERR_EXIT, "ZoomPixmap(): XGetImage() failed");
+ /* copy source pixmap to temporary image */
+ if ((src_ximage = XGetImage(display, src_pixmap, 0, 0, src_width, src_height,
+ AllPlanes, ZPixmap)) == NULL)
+ Error(ERR_EXIT, "ZoomPixmap(): XGetImage() failed");
- bits_per_pixel = src_ximage->bits_per_pixel;
- bytes_per_pixel = (bits_per_pixel + 7) / 8;
+ bits_per_pixel = src_ximage->bits_per_pixel;
+ bytes_per_pixel = (bits_per_pixel + 7) / 8;
- printf("::: bits_per_pixel == %d\n", bits_per_pixel);
+ printf("::: bits_per_pixel == %d\n", bits_per_pixel);
- if ((dst_ximage = XCreateImage(display, visual, src_ximage->depth, ZPixmap,
- 0, NULL, dst_width, dst_height,
- 8, dst_width * bytes_per_pixel)) == NULL)
- Error(ERR_EXIT, "ZoomPixmap(): XCreateImage() failed");
+ if ((dst_ximage = XCreateImage(display, visual, src_ximage->depth, ZPixmap,
+ 0, NULL, dst_width, dst_height,
+ 8, dst_width * bytes_per_pixel)) == NULL)
+ Error(ERR_EXIT, "ZoomPixmap(): XC reateImage() failed");
- dst_ximage->data =
- checked_malloc(dst_width * dst_height * bytes_per_pixel);
- dst_ximage->byte_order = src_ximage->byte_order;
+ dst_ximage->data =
+ checked_malloc(dst_width * dst_height * bytes_per_pixel);
+ dst_ximage->byte_order = src_ximage->byte_order;
- src_ptr = (byte *)src_ximage->data;
- dst_ptr = (byte *)dst_ximage->data;
+ src_ptr = (byte *)src_ximage->data;
+ dst_ptr = (byte *)dst_ximage->data;
- if (scale_down)
- {
- col_skip = (zoom_factor - 1) * bytes_per_pixel;
- row_skip = col_skip * src_width;
-
- /* scale image down by scaling factor 'zoom_factor' */
- for (y = 0; y < src_height; y += zoom_factor, src_ptr += row_skip)
- for (x = 0; x < src_width; x += zoom_factor, src_ptr += col_skip)
- for (i = 0; i < bytes_per_pixel; i++)
- *dst_ptr++ = *src_ptr++;
- }
- else
- {
- row_skip = src_width * bytes_per_pixel;
+ if (scale_down)
+ {
+ col_skip = (zoom_factor - 1) * bytes_per_pixel;
+ row_skip = col_skip * src_width;
+
+ /* scale image down by scaling factor 'zoom_factor' */
+ for (y = 0; y < src_height; y += zoom_factor, src_ptr += row_skip)
+ for (x = 0; x < src_width; x += zoom_factor, src_ptr += col_skip)
+ for (i = 0; i < bytes_per_pixel; i++)
+ *dst_ptr++ = *src_ptr++;
+ }
+ else
+ {
+ row_skip = src_width * bytes_per_pixel;
#if 1
- printf("::: %d, %d -> %d, %d [%d / %d]\n[%ld -> %ld (%ld)] [%ld -> %ld (%ld)]\n",
- src_width, src_height,
- dst_width, dst_height,
- zoom_factor, bytes_per_pixel,
- src_ptr,
- src_ptr + src_width * src_height * bytes_per_pixel,
- src_width * src_height * bytes_per_pixel,
- dst_ptr,
- dst_ptr + dst_width * dst_height * bytes_per_pixel,
- dst_width * dst_height * bytes_per_pixel);
+ printf("::: %d, %d -> %d, %d [%d / %d]\n[%ld -> %ld (%ld)] [%ld -> %ld (%ld)]\n",
+ src_width, src_height,
+ dst_width, dst_height,
+ zoom_factor, bytes_per_pixel,
+ src_ptr,
+ src_ptr + src_width * src_height * bytes_per_pixel,
+ src_width * src_height * bytes_per_pixel,
+ dst_ptr,
+ dst_ptr + dst_width * dst_height * bytes_per_pixel,
+ dst_width * dst_height * bytes_per_pixel);
#endif
#if 0
- printf("A\n");
+ printf("A\n");
- for (i = 0; i < src_width * src_height * bytes_per_pixel;
- i++)
- {
- byte x = *(byte *)(src_ptr + i);
+ for (i = 0; i < src_width * src_height * bytes_per_pixel;
+ i++)
+ {
+ byte x = *(byte *)(src_ptr + i);
- printf("::: %d ...\n", i);
+ printf("::: %d ...\n", i);
- x = x * 1;
- }
+ x = x * 1;
+ }
- printf("B\n");
+ printf("B\n");
#endif
- /* scale image up by scaling factor 'zoom_factor' */
- for (y = 0; y < src_height; y++)
- {
- for (yy = 0; yy < zoom_factor; yy++)
+ /* scale image up by scaling factor 'zoom_factor' */
+ for (y = 0; y < src_height; y++)
{
- if (yy > 0)
- src_ptr -= row_skip;
+ for (yy = 0; yy < zoom_factor; yy++)
+ {
+ if (yy > 0)
+ src_ptr -= row_skip;
#if 0
- printf("::: [%d -> %ld / %ld]\n", y, src_ptr, dst_ptr);
+ printf("::: [%d -> %ld / %ld]\n", y, src_ptr, dst_ptr);
#endif
- for (x = 0; x < src_width; x++)
- {
- for (xx = 0; xx < zoom_factor; xx++)
- for (i = 0; i < bytes_per_pixel; i++)
+ for (x = 0; x < src_width; x++)
+ {
+ for (xx = 0; xx < zoom_factor; xx++)
+ for (i = 0; i < bytes_per_pixel; i++)
#if 1
- {
+ {
#if 0
- printf("::: %d\n", *(src_ptr + i));
+ printf("::: %d\n", *(src_ptr + i));
#endif
- *dst_ptr++ = *(src_ptr + i);
- }
+ *dst_ptr++ = *(src_ptr + i);
+ }
#else
- *dst_ptr++ = 0;
+ *dst_ptr++ = 0;
#endif
- src_ptr += i;
+ src_ptr += i;
+ }
}
}
}
- }
- xdebug("::: ZOOM STEP 9");
+ xdebug("::: ZOOM STEP 9");
- /* copy scaled image to destination pixmap */
- XPutImage(display, dst_pixmap, gc, dst_ximage, 0, 0, 0, 0,
- dst_width, dst_height);
+ /* copy scaled image to destination pixmap */
+ XPutImage(display, dst_pixmap, gc, dst_ximage, 0, 0, 0, 0,
+ dst_width, dst_height);
- /* free temporary images */
- X11DestroyImage(src_ximage);
- X11DestroyImage(dst_ximage);
+ /* free temporary images */
+ X11DestroyImage(src_ximage);
+ X11DestroyImage(dst_ximage);
- xdebug("::: ZOOM DONE");
+ xdebug("::: ZOOM DONE");
- }
+ }
#endif
- /* ----------------------------------------------------------------- */
+ /* ----------------------------------------------------------------- */
#if 0
- {
- Bitmap *bm = pcxBitmapsX2[2];
- Pixmap clip_mask = bm->clip_mask;
+ {
+ Bitmap *bm = pcxBitmapsX2[2];
+ Pixmap clip_mask = bm->clip_mask;
- if (clip_mask)
- {
+ if (clip_mask)
+ {
#if 0
- int width = bm->width;
- int height = bm->height;
+ int width = bm->width;
+ int height = bm->height;
#else
- int width = 16 * 4;
- int height = 16 * 4;
+ int width = 16 * 4;
+ int height = 16 * 4;
#endif
- XImage *src_ximage = XGetImage(display, clip_mask, 0, 0,
- width, height, AllPlanes, ZPixmap);
- XImage *dst_ximage = XGetImage(display, xwindow, 0, 0,
- width, height, AllPlanes, ZPixmap);
- int x, y;
-
- if (src_ximage == NULL)
- {
- printf("src_ximage failed\n");
- exit(1);
- }
-
- if (dst_ximage == NULL)
- {
- printf("dst_ximage failed\n");
- exit(1);
- }
-
- printf("::: DISPLAY CLIP MASK ...\n");
-
- for (x=0; x<width; x++)
- {
- for (y=0; y<height; y++)
- {
- unsigned long pixel = XGetPixel(src_ximage, x, y);
+ XImage *src_ximage = XGetImage(display, clip_mask, 0, 0,
+ width, height, AllPlanes, ZPixmap);
+ XImage *dst_ximage = XGetImage(display, xwindow, 0, 0,
+ width, height, AllPlanes, ZPixmap);
+ int x, y;
- if (pixel != BlackPixel(display, screen))
- pixel = WhitePixel(display, screen);
+ if (src_ximage == NULL)
+ {
+ printf("src_ximage failed\n");
+ exit(1);
+ }
- XPutPixel(dst_ximage, x, y, pixel);
- }
- }
+ if (dst_ximage == NULL)
+ {
+ printf("dst_ximage failed\n");
+ exit(1);
+ }
- printf("::: DISPLAY CLIP MASK NOW\n");
+ printf("::: DISPLAY CLIP MASK ...\n");
- XPutImage(display, xwindow, screenGC, dst_ximage, 0, 0,
- 0, 13 * TILEY + height, width, height);
+ for (x=0; x<width; x++)
+ {
+ for (y=0; y<height; y++)
+ {
+ unsigned long pixel = XGetPixel(src_ximage, x, y);
- printf("::: DISPLAY CLIP MASK DONE\n");
- }
+ if (pixel != BlackPixel(display, screen))
+ pixel = WhitePixel(display, screen);
+
+ XPutPixel(dst_ximage, x, y, pixel);
}
+ }
+
+ printf("::: DISPLAY CLIP MASK NOW\n");
+
+ XPutImage(display, xwindow, screenGC, dst_ximage, 0, 0,
+ 0, 13 * TILEY + height, width, height);
+
+ printf("::: DISPLAY CLIP MASK DONE\n");
+ }
+ }
#endif
- /* ----------------------------------------------------------------- */
+ /* ----------------------------------------------------------------- */
#if 0
- {
- XImage *dst_ximage;
+ {
+ XImage *dst_ximage;
- printf("::: GET IMAGE ...\n");
+ printf("::: GET IMAGE ...\n");
- dst_ximage = XGetImage(display, xwindow, 0, 0,
- 16, 16, AllPlanes, ZPixmap);
- if (dst_ximage == NULL)
- {
- printf("dst_ximage failed\n");
- exit(1);
- }
+ dst_ximage = XGetImage(display, xwindow, 0, 0,
+ 16, 16, AllPlanes, ZPixmap);
+ if (dst_ximage == NULL)
+ {
+ printf("dst_ximage failed\n");
+ exit(1);
+ }
- printf("::: PUT IMAGE ...\n");
+ printf("::: PUT IMAGE ...\n");
- XPutImage(display, xwindow, screenGC, dst_ximage, 0, 0,
- 0, 13 * TILEY, 10, 10);
+ XPutImage(display, xwindow, screenGC, dst_ximage, 0, 0,
+ 0, 13 * TILEY, 10, 10);
- printf("::: PUT IMAGE DONE\n");
- }
+ printf("::: PUT IMAGE DONE\n");
+ }
#endif
- /* ----------------------------------------------------------------- */
+ /* ----------------------------------------------------------------- */
#if defined(PLATFORM_LINUX) || defined(PLATFORM_BSD)
- if(arg_silence == 0) {
- for(i = 0; i < SAMPLE_MAX; i++) {
- name[MAXNAME] = 0;
- if(arg_basedir) {
- snprintf(name, MAXNAME+2, "%s/%s/%s", arg_basedir, EM_SND_DIR, sound_names[i]);
- } else {
- snprintf(name, MAXNAME+2, "%s/%s", EM_SND_DIR, sound_names[i]);
- }
- if(name[MAXNAME]) snprintf_overflow("read sounds/ directory");
-
- if(read_sample(name, &sound_data[i], &sound_length[i])) return(1);
-
- {
- short *ptr, *stop;
- int mult = sound_volume[i] * 65536 / (100 * MIXER_MAX);
- stop = sound_data[i] + sound_length[i];
- for(ptr = sound_data[i]; ptr < stop; ptr++) *ptr = (*ptr * mult) / 65536;
- }
- }
-
- if(pipe(sound_pipe) == -1) {
- fprintf(stderr, "%s: %s: %s\n", progname, "unable to create sound pipe", strerror(errno));
- return(1);
- }
- sound_pid = fork();
- if(sound_pid == -1) {
- fprintf(stderr, "%s: %s: %s\n", progname, "unable to fork sound thread", strerror(errno));
- return(1);
- }
- close(sound_pipe[sound_pid == 0]); sound_pipe[sound_pid == 0] = -1;
- if(sound_pid == 0) _exit(sound_thread());
- signal(SIGPIPE, SIG_IGN); /* dont crash if sound process dies */
- }
+ if (arg_silence == 0)
+ {
+ for (i = 0; i < SAMPLE_MAX; i++)
+ {
+ name[MAXNAME] = 0;
+
+ if (arg_basedir)
+ {
+ snprintf(name, MAXNAME+2, "%s/%s/%s", arg_basedir, EM_SND_DIR,
+ sound_names[i]);
+ }
+ else
+ {
+ snprintf(name, MAXNAME+2, "%s/%s", EM_SND_DIR, sound_names[i]);
+ }
+
+ if (name[MAXNAME]) snprintf_overflow("read sounds/ directory");
+
+ if (read_sample(name, &sound_data[i], &sound_length[i]))
+ return(1);
+
+ {
+ short *ptr, *stop;
+ int mult = sound_volume[i] * 65536 / (100 * MIXER_MAX);
+ stop = sound_data[i] + sound_length[i];
+ for (ptr = sound_data[i]; ptr < stop; ptr++)
+ *ptr = (*ptr * mult) / 65536;
+ }
+ }
+
+ if (pipe(sound_pipe) == -1)
+ {
+ fprintf(stderr, "%s: %s: %s\n", progname, "unable to create sound pipe",
+ strerror(errno));
+ return(1);
+ }
+
+ sound_pid = fork();
+ if (sound_pid == -1)
+ {
+ fprintf(stderr, "%s: %s: %s\n", progname, "unable to fork sound thread",
+ strerror(errno));
+ return(1);
+ }
+
+ close(sound_pipe[sound_pid == 0]); sound_pipe[sound_pid == 0] = -1;
+ if (sound_pid == 0)
+ _exit(sound_thread());
+
+ signal(SIGPIPE, SIG_IGN); /* dont crash if sound process dies */
+ }
+
#endif /* defined(PLATFORM_LINUX) || defined(PLATFORM_BSD) */
- return(0);
+ return(0);
}
void close_all(void)
{
- int i;
+ int i;
- if(sound_pid != -1) {
- kill(sound_pid, SIGTERM);
- waitpid(sound_pid, 0, 0);
- }
- if(sound_pipe[0] != -1) close(sound_pipe[0]);
- if(sound_pipe[1] != -1) close(sound_pipe[1]);
- for(i = 0; i < SAMPLE_MAX; i++) if(sound_data[i]) free(sound_data[i]);
+ if (sound_pid != -1)
+ {
+ kill(sound_pid, SIGTERM);
+ waitpid(sound_pid, 0, 0);
+ }
+
+ if (sound_pipe[0] != -1)
+ close(sound_pipe[0]);
+ if (sound_pipe[1] != -1)
+ close(sound_pipe[1]);
+
+ for (i = 0; i < SAMPLE_MAX; i++)
+ if (sound_data[i])
+ free(sound_data[i]);
#if 0
- for(i = 0; i < 4; i++) if(xpmPixmaps[i]) XFreePixmap(display, xpmPixmaps[i]);
- for(i = 0; i < 4; i++) if(xpmBitmaps[i]) XFreePixmap(display, xpmBitmaps[i]);
- for(i = 0; i < 4; i++) if(xpmGot[i]) {
- xpmFreeColoursFunc(display, xpmAttributes[i].colormap, xpmAttributes[i].alloc_pixels, xpmAttributes[i].nalloc_pixels, 0);
- XpmFreeAttributes(&xpmAttributes[i]);
- }
+ for (i = 0; i < 4; i++)
+ if (xpmPixmaps[i])
+ XFreePixmap(display, xpmPixmaps[i]);
+ for (i = 0; i < 4; i++)
+ if (xpmBitmaps[i])
+ XFreePixmap(display, xpmBitmaps[i]);
+ for (i = 0; i < 4; i++)
+ if (xpmGot[i])
+ {
+ xpmFreeColoursFunc(display, xpmAttributes[i].colormap,
+ xpmAttributes[i].alloc_pixels,
+ xpmAttributes[i].nalloc_pixels, 0);
+ XpmFreeAttributes(&xpmAttributes[i]);
+ }
#endif
- if(gotRed) xpmFreeColoursFunc(display, privateColourmap ? privateColourmap : defaultColourmap, &redColour.pixel, 1, 0);
- if(gotWhite) xpmFreeColoursFunc(display, privateColourmap ? privateColourmap : defaultColourmap, &whiteColour.pixel, 1, 0);
-
- if(screenGC) XFreeGC(display, screenGC);
- if(scoreGC) XFreeGC(display, scoreGC);
- if(spriteGC) XFreeGC(display, spriteGC);
- if(antsGC) XFreeGC(display, antsGC);
- if(screenPixmap) XFreePixmap(display, screenPixmap);
- if(scorePixmap) XFreePixmap(display, scorePixmap);
- if(spriteBitmap) XFreePixmap(display, spriteBitmap);
- if(xwindow) XDestroyWindow(display, xwindow);
- if(cursor) XFreeCursor(display, cursor);
- if(privateColourmap) XFreeColormap(display, privateColourmap);
- if(privateColours) free(privateColours);
- if(privateFlags) free(privateFlags);
+ if (gotRed)
+ xpmFreeColoursFunc(display,
+ privateColourmap ? privateColourmap : defaultColourmap,
+ &redColour.pixel, 1, 0);
+ if (gotWhite)
+ xpmFreeColoursFunc(display,
+ privateColourmap ? privateColourmap : defaultColourmap,
+ &whiteColour.pixel, 1, 0);
+
+ if (screenGC)
+ XFreeGC(display, screenGC);
+ if (scoreGC)
+ XFreeGC(display, scoreGC);
+ if (spriteGC)
+ XFreeGC(display, spriteGC);
+ if (antsGC)
+ XFreeGC(display, antsGC);
+ if (screenPixmap)
+ XFreePixmap(display, screenPixmap);
+ if (scorePixmap)
+ XFreePixmap(display, scorePixmap);
+ if (spriteBitmap)
+ XFreePixmap(display, spriteBitmap);
+ if (xwindow)
+ XDestroyWindow(display, xwindow);
+ if (cursor)
+ XFreeCursor(display, cursor);
+ if (privateColourmap)
+ XFreeColormap(display, privateColourmap);
+ if (privateColours)
+ free(privateColours);
+ if (privateFlags)
+ free(privateFlags);
#if 0
- if(display) XCloseDisplay(display);
+ if (display)
+ XCloseDisplay(display);
#endif
}
void sound_play(void)
{
- if(sound_pipe[1] != -1) {
- if(write(sound_pipe[1], &play, sizeof(play)) == -1) {
- fprintf(stderr, "%s: %s: %s\n", progname, "write sound", strerror(errno));
- if(sound_pipe[0] != -1) { close(sound_pipe[0]); sound_pipe[0] = -1; }
- if(sound_pipe[1] != -1) { close(sound_pipe[1]); sound_pipe[1] = -1; }
- }
- }
- memset(play, 0, sizeof(play));
+ if (sound_pipe[1] != -1)
+ {
+ if (write(sound_pipe[1], &play, sizeof(play)) == -1)
+ {
+ fprintf(stderr, "%s: %s: %s\n", progname, "write sound",
+ strerror(errno));
+
+ if (sound_pipe[0] != -1)
+ {
+ close(sound_pipe[0]);
+ sound_pipe[0] = -1;
+ }
+
+ if (sound_pipe[1] != -1)
+ {
+ close(sound_pipe[1]);
+ sound_pipe[1] = -1;
+ }
+ }
+ }
+
+ memset(play, 0, sizeof(play));
}
/* ---------------------------------------------------------------------- */
-static int xpmAllocColourFunc(Display *display, Colormap colourmap, char *colourname, XColor *xcolour, void *closure)
+static int xpmAllocColourFunc(Display *display, Colormap colourmap,
+ char *colourname, XColor *xcolour, void *closure)
{
- int i, match;
- int r,g,b;
- long best, sum;
+ int i, match;
+ int r,g,b;
+ long best, sum;
+
+ if (colourname)
+ if (XParseColor(display, colourmap, colourname, xcolour) == 0)
+ return(-1); /* invalid name */
+ if (colourmap != privateColourmap)
+ return(XAllocColor(display, colourmap, xcolour) != 0);
+
+ /* first try to find an exact match */
+ match = -1;
+ for (i = 0; i < privateNumColours; i++)
+ {
+ if (privateColours[i].red == xcolour->red &&
+ privateColours[i].green == xcolour->green &&
+ privateColours[i].blue == xcolour->blue)
+ match = i;
+ }
- if(colourname) if(XParseColor(display, colourmap, colourname, xcolour) == 0) return(-1); /* invalid name */
- if(colourmap != privateColourmap) return(XAllocColor(display, colourmap, xcolour) != 0);
+ if (match != -1)
+ {
+ privateFlags[match] = 1;
+ xcolour->pixel = privateColours[match].pixel;
+ return(1);
+ }
-/* first try to find an exact match */
- match = -1;
- for(i = 0; i < privateNumColours; i++) {
- if(privateColours[i].red == xcolour->red && privateColours[i].green == xcolour->green && privateColours[i].blue == xcolour->blue) match = i;
- }
- if(match != -1) {
- privateFlags[match] = 1;
- xcolour->pixel = privateColours[match].pixel;
- return(1);
- }
+ /* then find an unallocated colour that is close to what we want */
+ match = -1;
+ best = 1000000;
+ for (i = 0; i < privateNumColours; i++)
+ {
+ if (privateFlags[i])
+ continue; /* skip if it is already allocated */
-/* then find an unallocated colour that is close to what we want */
- match = -1;
- best = 1000000;
- for(i = 0; i < privateNumColours; i++) {
- if(privateFlags[i]) continue; /* skip if it is already allocated */
- r = (privateColours[i].red - xcolour->red) / 256;
- g = (privateColours[i].green - xcolour->green) / 256;
- b = (privateColours[i].blue - xcolour->blue) / 256;
- sum = r * r + g * g + b * b;
- if(sum < best) {
- best = sum;
- match = i;
- }
- }
- if(match != -1) {
- privateFlags[match] = 1;
- privateColours[match].red = xcolour->red;
- privateColours[match].green = xcolour->green;
- privateColours[match].blue = xcolour->blue;
- XStoreColor(display, colourmap, &privateColours[match]);
- xcolour->pixel = privateColours[match].pixel;
- return(1); /* found a close match */
- }
+ r = (privateColours[i].red - xcolour->red) / 256;
+ g = (privateColours[i].green - xcolour->green) / 256;
+ b = (privateColours[i].blue - xcolour->blue) / 256;
+ sum = r * r + g * g + b * b;
-/* if all else fails, just find the closest colour and return it */
- match = -1;
- best = 1000000;
- for(i = 0; i < privateNumColours; i++) {
- r = (privateColours[i].red - xcolour->red) / 256;
- g = (privateColours[i].green - xcolour->green) / 256;
- b = (privateColours[i].blue - xcolour->blue) / 256;
- sum = r * r + g * g + b * b;
- if(sum < best) {
- best = sum;
- match = i;
- }
- }
- if(match != -1) {
- xcolour->red = privateColours[match].red;
- xcolour->green = privateColours[match].green;
- xcolour->blue = privateColours[match].blue;
- xcolour->pixel = privateColours[match].pixel;
- return(1); /* best we could do */
- }
- return(0); /* still didnt find one, give up */
+ if (sum < best)
+ {
+ best = sum;
+ match = i;
+ }
+ }
+
+ if (match != -1)
+ {
+ privateFlags[match] = 1;
+ privateColours[match].red = xcolour->red;
+ privateColours[match].green = xcolour->green;
+ privateColours[match].blue = xcolour->blue;
+ XStoreColor(display, colourmap, &privateColours[match]);
+ xcolour->pixel = privateColours[match].pixel;
+ return(1); /* found a close match */
+ }
+
+ /* if all else fails, just find the closest colour and return it */
+ match = -1;
+ best = 1000000;
+ for (i = 0; i < privateNumColours; i++)
+ {
+ r = (privateColours[i].red - xcolour->red) / 256;
+ g = (privateColours[i].green - xcolour->green) / 256;
+ b = (privateColours[i].blue - xcolour->blue) / 256;
+ sum = r * r + g * g + b * b;
+
+ if (sum < best)
+ {
+ best = sum;
+ match = i;
+ }
+ }
+
+ if (match != -1)
+ {
+ xcolour->red = privateColours[match].red;
+ xcolour->green = privateColours[match].green;
+ xcolour->blue = privateColours[match].blue;
+ xcolour->pixel = privateColours[match].pixel;
+ return(1); /* best we could do */
+ }
+
+ return(0); /* still didnt find one, give up */
}
-static int xpmFreeColoursFunc(Display *display, Colormap colourmap, unsigned long *pixels, int npixels, void *closure)
+static int xpmFreeColoursFunc(Display *display, Colormap colourmap,
+ unsigned long *pixels, int npixels,
+ void *closure)
{
- if(colourmap != privateColourmap) XFreeColors(display, colourmap, pixels, npixels, 0);
- return(1); /* non-zero for success */
+ if (colourmap != privateColourmap)
+ XFreeColors(display, colourmap, pixels, npixels, 0);
+
+ return(1); /* non-zero for success */
}
#endif
static char audioname[] = "/dev/audio";
-static const int sound_priority[SAMPLE_MAX] = {
- SAMPLE_exit, SAMPLE_die, SAMPLE_time, SAMPLE_boom, SAMPLE_tick,
- SAMPLE_collect, SAMPLE_roll, SAMPLE_push, SAMPLE_dynamite, SAMPLE_press,
- SAMPLE_door, SAMPLE_dirt, SAMPLE_blank, SAMPLE_android, SAMPLE_ball,
- SAMPLE_grow, SAMPLE_squash, SAMPLE_crack, SAMPLE_slurp, SAMPLE_drip,
- SAMPLE_wonder, SAMPLE_wheel, SAMPLE_stone, SAMPLE_spring, SAMPLE_diamond,
- SAMPLE_nut, SAMPLE_bug, SAMPLE_tank, SAMPLE_eater, SAMPLE_alien,
- SAMPLE_acid
+static const int sound_priority[SAMPLE_MAX] =
+{
+ SAMPLE_exit, SAMPLE_die, SAMPLE_time, SAMPLE_boom, SAMPLE_tick,
+ SAMPLE_collect, SAMPLE_roll, SAMPLE_push, SAMPLE_dynamite, SAMPLE_press,
+ SAMPLE_door, SAMPLE_dirt, SAMPLE_blank, SAMPLE_android, SAMPLE_ball,
+ SAMPLE_grow, SAMPLE_squash, SAMPLE_crack, SAMPLE_slurp, SAMPLE_drip,
+ SAMPLE_wonder, SAMPLE_wheel, SAMPLE_stone, SAMPLE_spring, SAMPLE_diamond,
+ SAMPLE_nut, SAMPLE_bug, SAMPLE_tank, SAMPLE_eater, SAMPLE_alien,
+ SAMPLE_acid
};
int sound_thread(void)
{
- int audio_fd; /* file descriptor of /dev/audio or -1 if not open */
- int audio_format;
- int sample_rate;
- int fragment_size;
- unsigned char *audio_buffer; /* actual buffer pumped to /dev/audio */
- short *mix_buffer;
-
- char sound_play[SAMPLE_MAX]; /* if set, we should be playing these sounds */
- long sound_pos[SAMPLE_MAX]; /* position in the sound */
- int mix_play[MIXER_MAX]; /* which sounds we have chosen to mix (calculated each time) */
- int mix_count;
-
- int i;
-
-loop:
- audio_fd = -1;
- audio_format = AUDIO_ULAW; /* defaults for non-OSS /dev/audio */
- sample_rate = 8000;
- fragment_size = 256;
- audio_buffer = 0;
- mix_buffer = 0;
- mix_count = 0;
-
- memset(sound_play, 0, sizeof(sound_play)); /* not playing any sounds */
-
- for(;;) {
- for(;;) {
-
-/* pick sounds to play, if any */
- if(sound_play[SAMPLE_exit] || sound_play[SAMPLE_die]) sound_play[SAMPLE_boom] = 0; /* no explosions if player goes home */
- mix_count = 0;
- for(i = 0; i < SAMPLE_MAX; i++) {
- if(sound_play[sound_priority[i]]) {
- mix_play[mix_count++] = sound_priority[i];
- if(mix_count == MIXER_MAX) break; /* cant mix too many sounds at once */
- }
- }
-
-/* check for incoming messages */
- if(mix_count || audio_fd != -1) { /* dont block if we are playing sounds */
- fd_set rfds;
- struct timeval tv;
- FD_ZERO(&rfds);
- FD_SET(sound_pipe[0], &rfds);
- tv.tv_sec = 0;
- tv.tv_usec = 0; /* (900000 * fragment_size / sample_rate) */
- i = select(sound_pipe[0] + 1, &rfds, 0, 0, &tv); /* dont block */
- if(i == -1) {
- fprintf(stderr, "%s: %s: %s\n", progname, "select failed", strerror(errno));
- goto fail;
- }
- if(i == 0) break; /* no messages */
- }
-
-/* get a message and start a sound */
- i = read(sound_pipe[0], &play, sizeof(play));
- if(i == -1) {
- fprintf(stderr, "%s: %s: %s\n", progname, "read failed", strerror(errno));
- goto fail;
- }
- if(i == 0) {
- fprintf(stderr, "%s: %s: %s\n", progname, "read sound", "Broken pipe");
- goto fail;
- }
- if(i != sizeof(play)) {
- fprintf(stderr, "%s: %s\n", progname, "bad message length");
- goto fail;
- }
- for(i = 0; i < SAMPLE_MAX; i++) {
- if(play[i]) {
- sound_play[i] = 1; /* play this sound */
- sound_pos[i] = 0; /* start it from the start */
- }
- }
- }
-
-/* open the audio device if there are sounds to play */
- if(mix_count && audio_fd == -1) {
- audio_fd = open(audioname, O_WRONLY);
- if(audio_fd == -1) goto reset;
-#ifdef OPEN_SOUND_SYSTEM
- i = 0x00020008;
- if(ioctl(audio_fd, SNDCTL_DSP_SETFRAGMENT, &i) == -1) {
- fprintf(stderr, "%s: \"%s\": %s (%d): %s\n", progname, audioname, "unable to set fragment size", 512, strerror(errno));
- goto reset;
- }
- if(ioctl(audio_fd, SNDCTL_DSP_GETFMTS, &i) == -1) {
- fprintf(stderr, "%s: \"%s\": %s: %s\n", progname, audioname, "unable to query audio format", strerror(errno));
- goto reset;
- }
- audio_format = (i & AFMT_U8) ? AFMT_U8 : AFMT_MU_LAW; /* prefer 8 bit unsigned and fall back on mu-law */
- i = audio_format;
- if(ioctl(audio_fd, SNDCTL_DSP_SETFMT, &i) == -1) {
- fprintf(stderr, "%s: \"%s\": %s (%d): %s\n", progname, audioname, "unable to set audio format", audio_format, strerror(errno));
- goto reset;
- }
- if(i == AFMT_MU_LAW) {
- audio_format = AUDIO_ULAW;
- } else if(i == AFMT_U8) {
- audio_format = AUDIO_U8;
- } else {
- fprintf(stderr, "%s: \"%s\": %s (%d)\n", progname, audioname, "audio format required by device not supported", i);
- goto reset;
- }
- i = 1;
- if(ioctl(audio_fd, SNDCTL_DSP_CHANNELS, &i) == -1) {
- fprintf(stderr, "%s: \"%s\": %s: %s\n", progname, audioname, "unable to set channels to mono", strerror(errno));
- goto reset;
- }
- if(i != 1) {
- fprintf(stderr, "%s: \"%s\": %s (%d)\n", progname, audioname, "channels required by device not supported", i);
- goto reset;
- }
- i = 8000;
- if(ioctl(audio_fd, SNDCTL_DSP_SPEED, &i) == -1) {
- fprintf(stderr, "%s: \"%s\": %s: %s\n", progname, audioname, "unable to set sampling rate", strerror(errno));
- goto reset;
- }
- sample_rate = i;
- if(ioctl(audio_fd, SNDCTL_DSP_GETBLKSIZE, &i) == -1) {
- fprintf(stderr, "%s: \"%s\": %s: %s\n", progname, audioname, "unable to get block size", strerror(errno));
- goto reset;
- }
- fragment_size = i;
-#else
- if(fcntl(audio_fd, F_SETFL, O_NONBLOCK) == -1) {
- fprintf(stderr, "%s: \"%s\": %s: %s\n", progname, audioname, "unable to make audio non blocking", strerror(errno));
- goto reset;
- }
-#endif /* OPEN_SOUND_SYSTEM */
- audio_buffer = malloc(fragment_size * sizeof(*audio_buffer));
- if(audio_buffer == 0) {
- fprintf(stderr, "%s: %s (%d): %s\n", progname, "unable to malloc audio buffer", fragment_size * sizeof(*audio_buffer), strerror(errno));
- goto fail;
- }
- mix_buffer = malloc(fragment_size * sizeof(*mix_buffer));
- if(mix_buffer == 0) {
- fprintf(stderr, "%s: %s (%d): %s\n", progname, "unable to malloc mixing buffer", fragment_size * sizeof(*mix_buffer), strerror(errno));
- goto fail;
- }
- }
-
-/* close the audio device if no sounds are playing */
- if(mix_count == 0 && audio_fd != -1) {
- close(audio_fd);
- free(audio_buffer);
- free(mix_buffer);
- audio_fd = -1;
- audio_buffer = 0;
- mix_buffer = 0;
- }
-
-/* if we are playing sounds and the audio device is open, mix them */
- if(mix_count && audio_fd != -1) {
-
- memset(mix_buffer, 0, fragment_size * sizeof(*mix_buffer)); /* prepare mix buffer */
-
- for(i = 0; i < mix_count; i++) {
- register short *mix_ptr = mix_buffer;
- register short *sound_ptr = sound_data[mix_play[i]] + sound_pos[mix_play[i]];
- register long count = sound_length[mix_play[i]] - sound_pos[mix_play[i]];
- if(count > fragment_size) count = fragment_size;
- while(count--) *mix_ptr++ += *sound_ptr++; /* mix the sounds in */
- }
- switch(audio_format) {
- case AUDIO_ULAW:
- for(i = 0; i < fragment_size; i++) audio_buffer[i] = linear_to_ulaw[mix_buffer[i] + 32768];
- break;
- case AUDIO_U8:
- for(i = 0; i < fragment_size; i++) audio_buffer[i] = (mix_buffer[i] + 32768) >> 8;
- break;
- }
-
-/* advance sound pointers */
- for(i = 0; i < SAMPLE_MAX; i++) {
- if(sound_play[i]) {
- if(sound_pos[i] + fragment_size < sound_length[i]) {
- sound_pos[i] += fragment_size;
- } else {
- sound_play[i] = 0;
- }
- }
- }
-
-/* send the data to the audio device */
- i = write(audio_fd, audio_buffer, fragment_size);
- if(i == -1) {
- fprintf(stderr, "%s: %s: %s\n", progname, "write error", strerror(errno));
- goto reset;
- }
- if(i != fragment_size) {
- fprintf(stderr, "%s: %s\n", progname, "bad write length");
- goto reset;
- }
- }
- } /* for */
-
-reset:
- if(audio_fd != -1) close(audio_fd);
- if(audio_buffer) free(audio_buffer);
- if(mix_buffer) free(mix_buffer);
- goto loop; /* back to top */
-
-fail:
- if(audio_fd != -1) close(audio_fd);
- if(audio_buffer) free(audio_buffer);
- if(mix_buffer) free(mix_buffer);
- return(0);
-}
-
-int read_sample(char *name, short **data, long *length)
-{
- int result;
- FILE *file = 0;
- short *dataptr = 0;
- long datalength;
-
- int i, actual, ch;
- unsigned char buffer[24];
- unsigned long temp;
-
- file = fopen(name, "rb");
- if(file == 0) {
- fprintf(stderr, "%s: \"%s\": %s: %s\n", progname, name, "open error", strerror(errno));
- result = 1; goto fail;
- }
- actual = fread(buffer, 1, 24, file);
- if(actual == -1) {
- fprintf(stderr, "%s: \"%s\": %s: %s\n", progname, name, "read error", strerror(errno));
- result = 1; goto fail;
- }
- if(actual < 24) {
- fprintf(stderr, "%s: \"%s\": %s\n", progname, name, "premature eof");
- result = 1; goto fail;
+ int audio_fd; /* file descriptor of /dev/audio or -1 if not open */
+ int audio_format;
+ int sample_rate;
+ int fragment_size;
+ unsigned char *audio_buffer; /* actual buffer pumped to /dev/audio */
+ short *mix_buffer;
+
+ char sound_play[SAMPLE_MAX]; /* if set, we should be playing these sounds */
+ long sound_pos[SAMPLE_MAX]; /* position in the sound */
+ int mix_play[MIXER_MAX]; /* which sounds we have chosen to mix (calculated each time) */
+ int mix_count;
+ int i;
+
+ loop:
+
+ audio_fd = -1;
+ audio_format = AUDIO_ULAW; /* defaults for non-OSS /dev/audio */
+ sample_rate = 8000;
+ fragment_size = 256;
+ audio_buffer = 0;
+ mix_buffer = 0;
+ mix_count = 0;
+
+ memset(sound_play, 0, sizeof(sound_play)); /* not playing any sounds */
+
+ for (;;)
+ {
+ for (;;)
+ {
+
+ /* pick sounds to play, if any */
+ if (sound_play[SAMPLE_exit] || sound_play[SAMPLE_die])
+ sound_play[SAMPLE_boom] = 0; /* no explosions if player goes home */
+
+ mix_count = 0;
+ for (i = 0; i < SAMPLE_MAX; i++)
+ {
+ if (sound_play[sound_priority[i]])
+ {
+ mix_play[mix_count++] = sound_priority[i];
+
+ if (mix_count == MIXER_MAX)
+ break; /* cant mix too many sounds at once */
}
- temp = buffer[0] << 24 | buffer[1] << 16 | buffer[2] << 8 | buffer[3]; /* magic */
- if(temp != 0x2e736e64) {
- fprintf(stderr, "%s: \"%s\": %s\n", progname, name, "unrecognized file format");
- result = 1; goto fail;
- }
- temp = buffer[4] << 24 | buffer[5] << 16 | buffer[6] << 8 | buffer[7]; /* header length */
- if(temp < 24) {
- fprintf(stderr, "%s: \"%s\": %s\n", progname, name, "bad header length");
- result = 1; goto fail;
- }
- actual = temp;
- for(i = 24; i < actual; i++) { /* skip the rest of the header */
- ch = fgetc(file);
- if(ch == EOF) break;
+ }
+
+ /* check for incoming messages */
+ if (mix_count || audio_fd != -1)
+ {
+ /* dont block if we are playing sounds */
+ fd_set rfds;
+ struct timeval tv;
+ FD_ZERO(&rfds);
+ FD_SET(sound_pipe[0], &rfds);
+ tv.tv_sec = 0;
+ tv.tv_usec = 0; /* (900000 * fragment_size / sample_rate) */
+ i = select(sound_pipe[0] + 1, &rfds, 0, 0, &tv); /* dont block */
+
+ if (i == -1)
+ {
+ fprintf(stderr, "%s: %s: %s\n", progname, "select failed",
+ strerror(errno));
+ goto fail;
}
- temp = buffer[8] << 24 | buffer[9] << 16 | buffer[10] << 8 | buffer[11]; /* data length */
- datalength = temp;
- temp = buffer[12] << 24 | buffer[13] << 16 | buffer[14] << 8 | buffer[15]; /* encoding */
- if(temp != 1) {
- fprintf(stderr, "%s: \"%s\": %s (%ld != 1)\n", progname, name, "bad encoding type", temp);
- result = 1; goto fail;
- }
- temp = buffer[16] << 24 | buffer[17] << 16 | buffer[18] << 8 | buffer[19]; /* sample rate */
- if(temp != 8000) {
- fprintf(stderr, "%s: \"%s\": %s (%ld != 8000)\n", progname, name, "bad sample rate", temp);
- result = 1; goto fail;
- }
- temp = buffer[20] << 24 | buffer[21] << 16 | buffer[22] << 8 | buffer[23]; /* channels */
- if(temp != 1) {
- fprintf(stderr, "%s: \"%s\": %s (%ld != 1)\n", progname, name, "unsupported channels", temp);
- result = 1; goto fail;
+ if (i == 0)
+ break; /* no messages */
+ }
+
+ /* get a message and start a sound */
+ i = read(sound_pipe[0], &play, sizeof(play));
+
+ if (i == -1)
+ {
+ fprintf(stderr, "%s: %s: %s\n", progname, "read failed",
+ strerror(errno));
+ goto fail;
+ }
+
+ if (i == 0)
+ {
+ fprintf(stderr, "%s: %s: %s\n", progname, "read sound", "Broken pipe");
+ goto fail;
+ }
+
+ if (i != sizeof(play))
+ {
+ fprintf(stderr, "%s: %s\n", progname, "bad message length");
+ goto fail;
+ }
+
+ for (i = 0; i < SAMPLE_MAX; i++)
+ {
+ if (play[i])
+ {
+ sound_play[i] = 1; /* play this sound */
+ sound_pos[i] = 0; /* start it from the start */
}
+ }
+ }
- dataptr = malloc(datalength * sizeof(*dataptr));
- if(dataptr == 0) {
- fprintf(stderr, "%s: \"%s\": %s (%ld): %s\n", progname, name, "unable to malloc buffer", datalength * sizeof(*dataptr), strerror(errno));
- result = 1; goto fail;
- }
+ /* open the audio device if there are sounds to play */
+ if (mix_count && audio_fd == -1)
+ {
+ audio_fd = open(audioname, O_WRONLY);
+
+ if (audio_fd == -1)
+ goto reset;
+
+#ifdef OPEN_SOUND_SYSTEM
+ i = 0x00020008;
+
+ if (ioctl(audio_fd, SNDCTL_DSP_SETFRAGMENT, &i) == -1)
+ {
+ fprintf(stderr, "%s: \"%s\": %s (%d): %s\n", progname, audioname,
+ "unable to set fragment size", 512, strerror(errno));
+ goto reset;
+ }
+
+ if (ioctl(audio_fd, SNDCTL_DSP_GETFMTS, &i) == -1)
+ {
+ fprintf(stderr, "%s: \"%s\": %s: %s\n", progname, audioname,
+ "unable to query audio format", strerror(errno));
+ goto reset;
+ }
+
+ /* prefer 8 bit unsigned and fall back on mu-law */
+ audio_format = (i & AFMT_U8) ? AFMT_U8 : AFMT_MU_LAW;
+
+ i = audio_format;
+ if (ioctl(audio_fd, SNDCTL_DSP_SETFMT, &i) == -1)
+ {
+ fprintf(stderr, "%s: \"%s\": %s (%d): %s\n", progname, audioname,
+ "unable to set audio format", audio_format, strerror(errno));
+ goto reset;
+ }
+
+ if (i == AFMT_MU_LAW)
+ {
+ audio_format = AUDIO_ULAW;
+ }
+ else if (i == AFMT_U8)
+ {
+ audio_format = AUDIO_U8;
+ }
+ else
+ {
+ fprintf(stderr, "%s: \"%s\": %s (%d)\n", progname, audioname,
+ "audio format required by device not supported", i);
+ goto reset;
+ }
+
+ i = 1;
+ if (ioctl(audio_fd, SNDCTL_DSP_CHANNELS, &i) == -1)
+ {
+ fprintf(stderr, "%s: \"%s\": %s: %s\n", progname, audioname,
+ "unable to set channels to mono", strerror(errno));
+ goto reset;
+ }
+
+ if (i != 1)
+ {
+ fprintf(stderr, "%s: \"%s\": %s (%d)\n", progname, audioname,
+ "channels required by device not supported", i);
+ goto reset;
+ }
+
+ i = 8000;
+ if (ioctl(audio_fd, SNDCTL_DSP_SPEED, &i) == -1)
+ {
+ fprintf(stderr, "%s: \"%s\": %s: %s\n", progname, audioname,
+ "unable to set sampling rate", strerror(errno));
+ goto reset;
+ }
+
+ sample_rate = i;
+ if (ioctl(audio_fd, SNDCTL_DSP_GETBLKSIZE, &i) == -1)
+ {
+ fprintf(stderr, "%s: \"%s\": %s: %s\n", progname, audioname,
+ "unable to get block size", strerror(errno));
+ goto reset;
+ }
+
+ fragment_size = i;
+
+#else
+ if (fcntl(audio_fd, F_SETFL, O_NONBLOCK) == -1)
+ {
+ fprintf(stderr, "%s: \"%s\": %s: %s\n", progname, audioname,
+ "unable to make audio non blocking", strerror(errno));
+ goto reset;
+ }
- for(i = 0; i < datalength; i++) {
- ch = fgetc(file);
- if(ch == EOF) break;
- dataptr[i] = ulaw_to_linear[ch];
+#endif /* OPEN_SOUND_SYSTEM */
+
+ audio_buffer = malloc(fragment_size * sizeof(*audio_buffer));
+ if (audio_buffer == 0)
+ {
+ fprintf(stderr, "%s: %s (%d): %s\n", progname,
+ "unable to malloc audio buffer",
+ fragment_size * sizeof(*audio_buffer), strerror(errno));
+ goto fail;
+ }
+
+ mix_buffer = malloc(fragment_size * sizeof(*mix_buffer));
+ if (mix_buffer == 0)
+ {
+ fprintf(stderr, "%s: %s (%d): %s\n", progname,
+ "unable to malloc mixing buffer",
+ fragment_size * sizeof(*mix_buffer), strerror(errno));
+ goto fail;
+ }
+ }
+
+ /* close the audio device if no sounds are playing */
+ if (mix_count == 0 && audio_fd != -1)
+ {
+ close(audio_fd);
+ free(audio_buffer);
+ free(mix_buffer);
+ audio_fd = -1;
+ audio_buffer = 0;
+ mix_buffer = 0;
+ }
+
+ /* if we are playing sounds and the audio device is open, mix them */
+ if (mix_count && audio_fd != -1)
+ {
+ /* prepare mix buffer */
+ memset(mix_buffer, 0, fragment_size * sizeof(*mix_buffer));
+
+ for (i = 0; i < mix_count; i++)
+ {
+ register short *mix_ptr = mix_buffer;
+ register short *sound_ptr =
+ sound_data[mix_play[i]] + sound_pos[mix_play[i]];
+ register long count =
+ sound_length[mix_play[i]] - sound_pos[mix_play[i]];
+
+ if (count > fragment_size)
+ count = fragment_size;
+
+ while (count--)
+ *mix_ptr++ += *sound_ptr++; /* mix the sounds in */
+ }
+
+ switch(audio_format)
+ {
+ case AUDIO_ULAW:
+ for (i = 0; i < fragment_size; i++)
+ audio_buffer[i] = linear_to_ulaw[mix_buffer[i] + 32768];
+ break;
+
+ case AUDIO_U8:
+ for (i = 0; i < fragment_size; i++)
+ audio_buffer[i] = (mix_buffer[i] + 32768) >> 8;
+ break;
+ }
+
+ /* advance sound pointers */
+ for (i = 0; i < SAMPLE_MAX; i++)
+ {
+ if (sound_play[i])
+ {
+ if (sound_pos[i] + fragment_size < sound_length[i])
+ {
+ sound_pos[i] += fragment_size;
+ }
+ else
+ {
+ sound_play[i] = 0;
+ }
}
- fclose(file);
- file = 0;
-
- *data = dataptr;
- *length = datalength;
- result = 0;
-fail:
- if(file) fclose(file);
- return(result);
+ }
+
+ /* send the data to the audio device */
+ i = write(audio_fd, audio_buffer, fragment_size);
+ if (i == -1)
+ {
+ fprintf(stderr, "%s: %s: %s\n", progname, "write error",
+ strerror(errno));
+ goto reset;
+ }
+
+ if (i != fragment_size)
+ {
+ fprintf(stderr, "%s: %s\n", progname, "bad write length");
+ goto reset;
+ }
+ }
+ } /* for */
+
+ reset:
+
+ if (audio_fd != -1)
+ close(audio_fd);
+ if (audio_buffer)
+ free(audio_buffer);
+ if (mix_buffer)
+ free(mix_buffer);
+ goto loop; /* back to top */
+
+ fail:
+ if (audio_fd != -1)
+ close(audio_fd);
+ if (audio_buffer)
+ free(audio_buffer);
+ if (mix_buffer)
+ free(mix_buffer);
+
+ return(0);
+}
+
+int read_sample(char *name, short **data, long *length)
+{
+ int result;
+ FILE *file = 0;
+ short *dataptr = 0;
+ long datalength;
+
+ int i, actual, ch;
+ unsigned char buffer[24];
+ unsigned long temp;
+
+ file = fopen(name, "rb");
+ if (file == 0)
+ {
+ fprintf(stderr, "%s: \"%s\": %s: %s\n", progname, name, "open error",
+ strerror(errno));
+ result = 1;
+ goto fail;
+ }
+
+ actual = fread(buffer, 1, 24, file);
+ if (actual == -1)
+ {
+ fprintf(stderr, "%s: \"%s\": %s: %s\n", progname, name, "read error",
+ strerror(errno));
+ result = 1;
+ goto fail;
+ }
+
+ if (actual < 24)
+ {
+ fprintf(stderr, "%s: \"%s\": %s\n", progname, name, "premature eof");
+ result = 1;
+ goto fail;
+ }
+
+ /* magic */
+ temp = buffer[0] << 24 | buffer[1] << 16 | buffer[2] << 8 | buffer[3];
+ if (temp != 0x2e736e64)
+ {
+ fprintf(stderr, "%s: \"%s\": %s\n", progname, name,
+ "unrecognized file format");
+ result = 1;
+ goto fail;
+ }
+
+ /* header length */
+ temp = buffer[4] << 24 | buffer[5] << 16 | buffer[6] << 8 | buffer[7];
+ if (temp < 24)
+ {
+ fprintf(stderr, "%s: \"%s\": %s\n", progname, name, "bad header length");
+ result = 1;
+ goto fail;
+ }
+
+ actual = temp;
+ for (i = 24; i < actual; i++)
+ {
+ /* skip the rest of the header */
+ ch = fgetc(file);
+ if (ch == EOF)
+ break;
+ }
+
+ /* data length */
+ temp = buffer[8] << 24 | buffer[9] << 16 | buffer[10] << 8 | buffer[11];
+ datalength = temp;
+
+ /* encoding */
+ temp = buffer[12] << 24 | buffer[13] << 16 | buffer[14] << 8 | buffer[15];
+ if (temp != 1)
+ {
+ fprintf(stderr, "%s: \"%s\": %s (%ld != 1)\n", progname, name,
+ "bad encoding type", temp);
+ result = 1;
+ goto fail;
+ }
+
+ /* sample rate */
+ temp = buffer[16] << 24 | buffer[17] << 16 | buffer[18] << 8 | buffer[19];
+ if (temp != 8000)
+ {
+ fprintf(stderr, "%s: \"%s\": %s (%ld != 8000)\n", progname, name,
+ "bad sample rate", temp);
+ result = 1;
+ goto fail;
+ }
+
+ /* channels */
+ temp = buffer[20] << 24 | buffer[21] << 16 | buffer[22] << 8 | buffer[23];
+ if (temp != 1)
+ {
+ fprintf(stderr, "%s: \"%s\": %s (%ld != 1)\n", progname, name,
+ "unsupported channels", temp);
+ result = 1;
+ goto fail;
+ }
+
+ dataptr = malloc(datalength * sizeof(*dataptr));
+ if (dataptr == 0)
+ {
+ fprintf(stderr, "%s: \"%s\": %s (%ld): %s\n", progname, name,
+ "unable to malloc buffer", datalength * sizeof(*dataptr),
+ strerror(errno));
+ result = 1;
+ goto fail;
+ }
+
+ for (i = 0; i < datalength; i++)
+ {
+ ch = fgetc(file);
+ if (ch == EOF) break;
+ dataptr[i] = ulaw_to_linear[ch];
+ }
+
+ fclose(file);
+ file = 0;
+
+ *data = dataptr;
+ *length = datalength;
+ result = 0;
+
+ fail:
+
+ if (file)
+ fclose(file);
+
+ return(result);
}
#endif /* defined(PLATFORM_LINUX) || defined(PLATFORM_BSD) */
void synchro_1(void)
{
- char ply1_kill = test(&ply1); /* must test for death and actually kill separately */
- char ply2_kill = test(&ply2);
- if(ply1.alive && ply1_kill) die(&ply1);
- if(ply2.alive && ply2_kill) die(&ply2);
+ /* must test for death and actually kill separately */
+ char ply1_kill = test(&ply1);
+ char ply2_kill = test(&ply2);
+
+ if (ply1.alive && ply1_kill)
+ die(&ply1);
+ if (ply2.alive && ply2_kill)
+ die(&ply2);
#if 0
- ply1.alive = 1; /* debugging */
+ ply1.alive = 1; /* debugging */
#endif
- ply1.oldx = ply1.x;
- ply1.oldy = ply1.y;
- ply1.anim = SPR_still;
- ply2.oldx = ply2.x;
- ply2.oldy = ply2.y;
- ply2.anim = SPR_still;
-
- if(Random & 256) {
- if(ply1.alive) player(&ply1);
- if(ply2.alive) player(&ply2);
- } else {
- if(ply2.alive) player(&ply2);
- if(ply1.alive) player(&ply1);
- }
- if(ply1.alive) {
- if(Cave[ply1.oldy][ply1.oldx] == Zplayer) {
- Cave[ply1.oldy][ply1.oldx] = Xblank;
- Next[ply1.oldy][ply1.oldx] = Xblank;
- }
- if(Cave[ply1.y][ply1.x] == Xblank) {
- Cave[ply1.y][ply1.x] = Zplayer;
- Next[ply1.y][ply1.x] = Zplayer;
- }
- }
- if(ply2.alive) {
- if(Cave[ply2.oldy][ply2.oldx] == Zplayer) {
- Cave[ply2.oldy][ply2.oldx] = Xblank;
- Next[ply2.oldy][ply2.oldx] = Xblank;
- }
- if(Cave[ply2.y][ply2.x] == Xblank) {
- Cave[ply2.y][ply2.x] = Zplayer;
- Next[ply2.y][ply2.x] = Zplayer;
- }
- }
+ ply1.oldx = ply1.x;
+ ply1.oldy = ply1.y;
+ ply1.anim = SPR_still;
+ ply2.oldx = ply2.x;
+ ply2.oldy = ply2.y;
+ ply2.anim = SPR_still;
+
+ if (Random & 256)
+ {
+ if (ply1.alive) player(&ply1);
+ if (ply2.alive) player(&ply2);
+ }
+ else
+ {
+ if (ply2.alive) player(&ply2);
+ if (ply1.alive) player(&ply1);
+ }
+
+ if (ply1.alive)
+ {
+ if (Cave[ply1.oldy][ply1.oldx] == Zplayer)
+ {
+ Cave[ply1.oldy][ply1.oldx] = Xblank;
+ Next[ply1.oldy][ply1.oldx] = Xblank;
+ }
+
+ if (Cave[ply1.y][ply1.x] == Xblank)
+ {
+ Cave[ply1.y][ply1.x] = Zplayer;
+ Next[ply1.y][ply1.x] = Zplayer;
+ }
+ }
+
+ if (ply2.alive)
+ {
+ if (Cave[ply2.oldy][ply2.oldx] == Zplayer)
+ {
+ Cave[ply2.oldy][ply2.oldx] = Xblank;
+ Next[ply2.oldy][ply2.oldx] = Xblank;
+ }
+
+ if (Cave[ply2.y][ply2.x] == Xblank)
+ {
+ Cave[ply2.y][ply2.x] = Zplayer;
+ Next[ply2.y][ply2.x] = Zplayer;
+ }
+ }
}
static int test(struct PLAYER *ply)
{
- register unsigned int x = ply->x;
- register unsigned int y = ply->y;
-
- if(lev.time == 0) return(1);
-
- switch(Cave[y-1][x]) {
- 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:
- return(1);
- }
- switch(Cave[y][x+1]) {
- 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:
- return(1);
- }
- switch(Cave[y+1][x]) {
- 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:
- return(1);
- }
- switch(Cave[y][x-1]) {
- 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:
- return(1);
- }
- switch(Cave[y][x]) {
- case Xblank:
- case Yacid_splash_eB:
- case Yacid_splash_wB:
- case Zplayer:
- case Xdynamite_1:
- case Xdynamite_2:
- case Xdynamite_3:
- case Xdynamite_4:
- return(0);
- }
- return(1);
+ register unsigned int x = ply->x;
+ register unsigned int y = ply->y;
+
+ if (lev.time == 0)
+ return(1);
+
+ switch(Cave[y-1][x])
+ {
+ 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:
+ return(1);
+ }
+
+ switch(Cave[y][x+1])
+ {
+ 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:
+ return(1);
+ }
+
+ switch(Cave[y+1][x])
+ {
+ 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:
+ return(1);
+ }
+
+ switch(Cave[y][x-1])
+ {
+ 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:
+ return(1);
+ }
+
+ switch(Cave[y][x])
+ {
+ case Xblank:
+ case Yacid_splash_eB:
+ case Yacid_splash_wB:
+ case Zplayer:
+ case Xdynamite_1:
+ case Xdynamite_2:
+ case Xdynamite_3:
+ case Xdynamite_4:
+ return(0);
+ }
+
+ return(1);
}
static void die(struct PLAYER *ply)
{
- register unsigned int x = ply->x;
- register unsigned int y = ply->y;
-
- ply->alive = 0;
-
- switch(Cave[y-1][x]) {
- 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-1][x] = Xboom_bug; break;
- 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-1][x] = Xboom_bomb; break;
- }
- switch(Cave[y][x+1]) {
- 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+1] = Xboom_bug; break;
- 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+1] = Xboom_bomb; break;
- }
- switch(Cave[y+1][x]) {
- 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+1][x] = Xboom_bug; break;
- 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+1][x] = Xboom_bomb; break;
- }
- switch(Cave[y][x-1]) {
- 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-1] = Xboom_bug; break;
- 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-1] = Xboom_bomb; break;
- }
- switch(Cave[y][x]) {
- case Xexit_1:
- case Xexit_2:
- case Xexit_3:
- play[SAMPLE_exit] = 1; break;
- default:
- play[SAMPLE_die] = 1; break;
- }
- Cave[y][x] = Xboom_1;
- Boom[y][x] = Xblank;
+ register unsigned int x = ply->x;
+ register unsigned int y = ply->y;
+
+ ply->alive = 0;
+
+ switch(Cave[y-1][x])
+ {
+ 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-1][x] = Xboom_bug;
+ break;
+
+ 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-1][x] = Xboom_bomb;
+ break;
+ }
+
+ switch(Cave[y][x+1])
+ {
+ 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+1] = Xboom_bug;
+ break;
+
+ 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+1] = Xboom_bomb;
+ break;
+ }
+
+ switch(Cave[y+1][x])
+ {
+ 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+1][x] = Xboom_bug;
+ break;
+
+ 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+1][x] = Xboom_bomb;
+ break;
+ }
+
+ switch(Cave[y][x-1])
+ {
+ 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-1] = Xboom_bug;
+ break;
+
+ 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-1] = Xboom_bomb;
+ break;
+ }
+
+ switch(Cave[y][x])
+ {
+ case Xexit_1:
+ case Xexit_2:
+ case Xexit_3:
+ play[SAMPLE_exit] = 1;
+ break;
+
+ default:
+ play[SAMPLE_die] = 1;
+ break;
+ }
+
+ Cave[y][x] = Xboom_1;
+ Boom[y][x] = Xblank;
}
static void player(struct PLAYER *ply)
{
- register unsigned int x = ply->x;
- register unsigned int y = ply->y;
- unsigned int anim = 0; /* initialized to make compilers happy */
- int dx = 0, dy = 0;
-
- if((ply->joy_spin = !ply->joy_spin)) {
- if(ply->joy_n) {
- y--; dy = -1; anim = 0; /* north */
- } else if(ply->joy_e) {
- x++; dx = 1; anim = 1; /* east */
- } else if(ply->joy_s) {
- y++; dy = 1; anim = 2; /* south */
- } else if(ply->joy_w) {
- x--; dx = -1; anim = 3; /* west */
- }
- } else {
- if(ply->joy_w) {
- x--; dx = -1; anim = 3; /* west */
- } else if(ply->joy_s) {
- y++; dy = 1; anim = 2; /* south */
- } else if(ply->joy_e) {
- x++; dx = 1; anim = 1; /* east */
- } else if(ply->joy_n) {
- y--; dy = -1; anim = 0; /* north */
- }
+ register unsigned int x = ply->x;
+ register unsigned int y = ply->y;
+ unsigned int anim = 0; /* initialized to make compilers happy */
+ int dx = 0, dy = 0;
+
+ if ((ply->joy_spin = !ply->joy_spin))
+ {
+ if (ply->joy_n)
+ {
+ y--;
+ dy = -1;
+ anim = 0;
+ /* north */
+ }
+ else if (ply->joy_e)
+ {
+ x++;
+ dx = 1;
+ anim = 1;
+ /* east */
+ }
+ else if (ply->joy_s)
+ {
+ y++;
+ dy = 1;
+ anim = 2;
+ /* south */
+ }
+ else if (ply->joy_w)
+ {
+ x--;
+ dx = -1;
+ anim = 3;
+ /* west */
+ }
+ }
+ else
+ {
+ if (ply->joy_w)
+ {
+ x--;
+ dx = -1;
+ anim = 3;
+ /* west */
+ }
+ else if (ply->joy_s)
+ {
+ y++;
+ dy = 1;
+ anim = 2;
+ /* south */
+ }
+ else if (ply->joy_e)
+ {
+ x++;
+ dx = 1;
+ anim = 1;
+ /* east */
+ }
+ else if (ply->joy_n)
+ {
+ y--;
+ dy = -1;
+ anim = 0;
+ /* north */
+ }
+ }
+
+ if (dx == 0 && dy == 0)
+ {
+ ply->joy_stick = 0;
+
+ if (ply->joy_fire)
+ {
+ if (++ply->dynamite_cnt == 5 && ply->dynamite)
+ {
+ Cave[y][x] = Xdynamite_1;
+ play[SAMPLE_dynamite] = 1;
+ ply->dynamite--;
+ }
+ }
+ else
+ {
+ ply->dynamite_cnt = 0;
+ }
+
+ Random += 7; /* bit more random if we dont move */
+
+ return;
+ }
+
+ ply->joy_stick = 1;
+ ply->joy_n = ply->joy_e = ply->joy_s = ply->joy_w = 0;
+ ply->dynamite_cnt = 0; /* reset dynamite timer if we move */
+
+ if (ply->joy_fire == 0)
+ {
+ switch(Cave[y][x])
+ {
+ /* fire is released */
+ case Xblank:
+ case Yacid_splash_eB:
+ case Yacid_splash_wB:
+ Cave[y][x] = Zplayer;
+ Next[y][x] = Zplayer;
+ play[SAMPLE_blank] = 1;
+ ply->anim = SPR_walk + anim;
+ ply->x = x;
+ ply->y = y;
+ break;
+
+ case Xboom_android:
+ case Xboom_1:
+ 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 Xacid_1:
+ case Xacid_2:
+ case Xacid_3:
+ case Xacid_4:
+ case Xacid_5:
+ case Xacid_6:
+ case Xacid_7:
+ case Xacid_8:
+ ply->anim = SPR_walk + anim;
+ ply->x = x;
+ ply->y = y;
+ break;
+
+ case Xgrass:
+ Cave[y][x] = (dy ? (dy < 0 ? Ygrass_nB : Ygrass_sB) :
+ (dx > 0 ? Ygrass_eB : Ygrass_wB));
+ Next[y][x] = Zplayer;
+ play[SAMPLE_dirt] = 1;
+ ply->anim = SPR_walk + anim;
+ ply->x = x;
+ ply->y = y;
+ break;
+
+ case Xdirt:
+ Cave[y][x] = (dy ? (dy < 0 ? Ydirt_nB : Ydirt_sB) :
+ (dx > 0 ? Ydirt_eB : Ydirt_wB));
+ Next[y][x] = Zplayer;
+ play[SAMPLE_dirt] = 1;
+ ply->anim = SPR_walk + anim;
+ ply->x = x;
+ ply->y = y;
+ break;
+
+ case Xdiamond:
+ case Xdiamond_pause:
+ Cave[y][x] = Ydiamond_eat;
+ Next[y][x] = Zplayer;
+ play[SAMPLE_collect] = 1;
+ lev.score += lev.diamond_score;
+ lev.required = lev.required < 3 ? 0 : lev.required - 3;
+ ply->anim = SPR_walk + anim;
+ ply->x = x;
+ ply->y = y;
+ break;
+
+ case Xemerald:
+ case Xemerald_pause:
+ Cave[y][x] = Yemerald_eat;
+ Next[y][x] = Zplayer;
+ play[SAMPLE_collect] = 1;
+ lev.score += lev.emerald_score;
+ lev.required = lev.required < 1 ? 0 : lev.required - 1;
+ ply->anim = SPR_walk + anim;
+ ply->x = x;
+ ply->y = y;
+ break;
+
+ case Xdynamite:
+ Cave[y][x] = Ydynamite_eat;
+ Next[y][x] = Zplayer;
+ play[SAMPLE_collect] = 1;
+ lev.score += lev.dynamite_score;
+ ply->dynamite = ply->dynamite > 9998 ? 9999 : ply->dynamite + 1;
+ ply->anim = SPR_walk + anim;
+ ply->x = x;
+ ply->y = y;
+ break;
+
+ case Xkey_1:
+ ply->keys |= 0x01;
+ goto key_walk;
+
+ case Xkey_2:
+ ply->keys |= 0x02;
+ goto key_walk;
+
+ case Xkey_3:
+ ply->keys |= 0x04;
+ goto key_walk;
+
+ case Xkey_4:
+ ply->keys |= 0x08;
+ goto key_walk;
+
+ case Xkey_5:
+ ply->keys |= 0x10;
+ goto key_walk;
+
+ case Xkey_6:
+ ply->keys |= 0x20;
+ goto key_walk;
+
+ case Xkey_7:
+ ply->keys |= 0x40;
+ goto key_walk;
+
+ case Xkey_8:
+ ply->keys |= 0x80;
+ goto key_walk;
+
+ key_walk:
+
+ Cave[y][x] = Yball_eat;
+ Next[y][x] = Zplayer;
+ play[SAMPLE_collect] = 1;
+ lev.score += lev.key_score;
+ ply->anim = SPR_walk + anim;
+ ply->x = x;
+ ply->y = y;
+ break;
+
+ case Xlenses:
+ Cave[y][x] = Yball_eat;
+ Next[y][x] = Zplayer;
+ play[SAMPLE_collect] = 1;
+ lev.score += lev.lenses_score;
+ lev.lenses_cnt = lev.lenses_time;
+ ply->anim = SPR_walk + anim;
+ ply->x = x;
+ ply->y = y;
+ break;
+
+ case Xmagnify:
+ Cave[y][x] = Yball_eat;
+ Next[y][x] = Zplayer;
+ play[SAMPLE_collect] = 1;
+ lev.score += lev.magnify_score;
+ lev.magnify_cnt = lev.magnify_time;
+ ply->anim = SPR_walk + anim;
+ ply->x = x;
+ ply->y = y;
+ break;
+
+ case Xstone:
+ if (dy)
+ break;
+
+ switch(Cave[y][x+dx])
+ {
+ case Xacid_1:
+ case Xacid_2:
+ case Xacid_3:
+ case Xacid_4:
+ case Xacid_5:
+ case Xacid_6:
+ case Xacid_7:
+ case Xacid_8:
+ if (Cave[y-1][x+dx+1] == Xblank)
+ Cave[y-1][x+dx+1] = Yacid_splash_eB;
+ if (Cave[y-1][x+dx-1] == Xblank)
+ Cave[y-1][x+dx-1] = Yacid_splash_wB;
+ play[SAMPLE_acid] = 1;
+ goto stone_walk;
+
+ case Xblank:
+ case Yacid_splash_eB:
+ case Yacid_splash_wB:
+ Cave[y][x+dx] = dx > 0 ? Ystone_e : Ystone_w;
+ Next[y][x+dx] = Xstone_pause;
+
+ stone_walk:
+
+ Cave[y][x] = dx > 0 ? Ystone_eB : Ystone_wB;
+ Next[y][x] = Zplayer;
+ play[SAMPLE_roll] = 1;
+ ply->x = x;
}
- if(dx == 0 && dy == 0) {
- ply->joy_stick = 0;
- if(ply->joy_fire) {
- if(++ply->dynamite_cnt == 5 && ply->dynamite) {
- Cave[y][x] = Xdynamite_1;
- play[SAMPLE_dynamite] = 1;
- ply->dynamite--;
- }
- } else {
- ply->dynamite_cnt = 0;
- }
- Random += 7; /* bit more random if we dont move */
- return;
+
+ ply->anim = SPR_push + anim;
+ break;
+
+ case Xbomb:
+ if (dy)
+ break;
+
+ switch(Cave[y][x+dx])
+ {
+ case Xacid_1:
+ case Xacid_2:
+ case Xacid_3:
+ case Xacid_4:
+ case Xacid_5:
+ case Xacid_6:
+ case Xacid_7:
+ case Xacid_8:
+ if (Cave[y-1][x+dx+1] == Xblank)
+ Cave[y-1][x+dx+1] = Yacid_splash_eB;
+ if (Cave[y-1][x+dx-1] == Xblank)
+ Cave[y-1][x+dx-1] = Yacid_splash_wB;
+ play[SAMPLE_acid] = 1;
+ goto bomb_walk;
+
+ case Xblank:
+ case Yacid_splash_eB:
+ case Yacid_splash_wB:
+ Cave[y][x+dx] = dx > 0 ? Ybomb_e : Ybomb_w;
+ Next[y][x+dx] = Xbomb_pause;
+
+ bomb_walk:
+
+ Cave[y][x] = dx > 0 ? Ybomb_eB : Ybomb_wB;
+ Next[y][x] = Zplayer;
+ play[SAMPLE_roll] = 1;
+ ply->x = x;
+ }
+
+ ply->anim = SPR_push + anim;
+ break;
+
+ case Xnut:
+ if (dy)
+ break;
+
+ switch(Cave[y][x+dx])
+ {
+ case Xacid_1:
+ case Xacid_2:
+ case Xacid_3:
+ case Xacid_4:
+ case Xacid_5:
+ case Xacid_6:
+ case Xacid_7:
+ case Xacid_8:
+ if (Cave[y-1][x+dx+1] == Xblank)
+ Cave[y-1][x+dx+1] = Yacid_splash_eB;
+ if (Cave[y-1][x+dx-1] == Xblank)
+ Cave[y-1][x+dx-1] = Yacid_splash_wB;
+ play[SAMPLE_acid] = 1;
+ goto nut_walk;
+
+ case Xblank:
+ case Yacid_splash_eB:
+ case Yacid_splash_wB:
+ Cave[y][x+dx] = dx > 0 ? Ynut_e : Ynut_w;
+ Next[y][x+dx] = Xnut_pause;
+
+ nut_walk:
+
+ Cave[y][x] = dx > 0 ? Ynut_eB : Ynut_wB;
+ Next[y][x] = Zplayer;
+ play[SAMPLE_roll] = 1;
+ ply->x = x;
+ }
+
+ ply->anim = SPR_push + anim;
+ break;
+
+ case Xspring:
+ if (dy)
+ break;
+
+ switch(Cave[y][x+dx])
+ {
+ case Xalien:
+ case Xalien_pause:
+ Cave[y][x] = dx > 0 ? Yspring_kill_eB : Yspring_kill_wB;
+ Cave[y][x+dx] = dx > 0 ? Yspring_kill_e : Yspring_kill_w;
+ Next[y][x] = Zplayer;
+ Next[y][x+dx] = dx > 0 ? Xspring_e : Xspring_w;
+ play[SAMPLE_slurp] = 1;
+ lev.score += lev.slurp_score;
+ ply->x = x;
+ break;
+
+ case Xacid_1:
+ case Xacid_2:
+ case Xacid_3:
+ case Xacid_4:
+ case Xacid_5:
+ case Xacid_6:
+ case Xacid_7:
+ case Xacid_8:
+ if (Cave[y-1][x+dx+1] == Xblank)
+ Cave[y-1][x+dx+1] = Yacid_splash_eB;
+ if (Cave[y-1][x+dx-1] == Xblank)
+ Cave[y-1][x+dx-1] = Yacid_splash_wB;
+ play[SAMPLE_acid] = 1;
+ goto spring_walk;
+
+ case Xblank:
+ case Yacid_splash_eB:
+ case Yacid_splash_wB:
+ Cave[y][x+dx] = dx > 0 ? Yspring_e : Yspring_w;
+ Next[y][x+dx] = dx > 0 ? Xspring_e : Xspring_w;
+
+ spring_walk:
+ Cave[y][x] = dx > 0 ? Yspring_eB : Yspring_wB;
+ Next[y][x] = Zplayer;
+ play[SAMPLE_roll] = 1;
+ ply->x = x;
}
- ply->joy_stick = 1;
- ply->joy_n = ply->joy_e = ply->joy_s = ply->joy_w = 0;
- ply->dynamite_cnt = 0; /* reset dynamite timer if we move */
-
- if(ply->joy_fire == 0) {
- switch(Cave[y][x]) { /* fire is released */
- case Xblank:
- case Yacid_splash_eB:
- case Yacid_splash_wB:
- Cave[y][x] = Zplayer;
- Next[y][x] = Zplayer;
- play[SAMPLE_blank] = 1;
- ply->anim = SPR_walk + anim;
- ply->x = x;
- ply->y = y;
- break;
- case Xboom_android:
- case Xboom_1:
- 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 Xacid_1:
- case Xacid_2:
- case Xacid_3:
- case Xacid_4:
- case Xacid_5:
- case Xacid_6:
- case Xacid_7:
- case Xacid_8:
- ply->anim = SPR_walk + anim;
- ply->x = x;
- ply->y = y;
- break;
- case Xgrass:
- Cave[y][x] = dy ? (dy < 0 ? Ygrass_nB : Ygrass_sB) : (dx > 0 ? Ygrass_eB : Ygrass_wB);
- Next[y][x] = Zplayer;
- play[SAMPLE_dirt] = 1;
- ply->anim = SPR_walk + anim;
- ply->x = x;
- ply->y = y;
- break;
- case Xdirt:
- Cave[y][x] = dy ? (dy < 0 ? Ydirt_nB : Ydirt_sB) : (dx > 0 ? Ydirt_eB : Ydirt_wB);
- Next[y][x] = Zplayer;
- play[SAMPLE_dirt] = 1;
- ply->anim = SPR_walk + anim;
- ply->x = x;
- ply->y = y;
- break;
- case Xdiamond:
- case Xdiamond_pause:
- Cave[y][x] = Ydiamond_eat;
- Next[y][x] = Zplayer;
- play[SAMPLE_collect] = 1;
- lev.score += lev.diamond_score;
- lev.required = lev.required < 3 ? 0 : lev.required - 3;
- ply->anim = SPR_walk + anim;
- ply->x = x;
- ply->y = y;
- break;
- case Xemerald:
- case Xemerald_pause:
- Cave[y][x] = Yemerald_eat;
- Next[y][x] = Zplayer;
- play[SAMPLE_collect] = 1;
- lev.score += lev.emerald_score;
- lev.required = lev.required < 1 ? 0 : lev.required - 1;
- ply->anim = SPR_walk + anim;
- ply->x = x;
- ply->y = y;
- break;
- case Xdynamite:
- Cave[y][x] = Ydynamite_eat;
- Next[y][x] = Zplayer;
- play[SAMPLE_collect] = 1;
- lev.score += lev.dynamite_score;
- ply->dynamite = ply->dynamite > 9998 ? 9999 : ply->dynamite + 1;
- ply->anim = SPR_walk + anim;
- ply->x = x;
- ply->y = y;
- break;
- case Xkey_1:
- ply->keys |= 0x01; goto key_walk;
- case Xkey_2:
- ply->keys |= 0x02; goto key_walk;
- case Xkey_3:
- ply->keys |= 0x04; goto key_walk;
- case Xkey_4:
- ply->keys |= 0x08; goto key_walk;
- case Xkey_5:
- ply->keys |= 0x10; goto key_walk;
- case Xkey_6:
- ply->keys |= 0x20; goto key_walk;
- case Xkey_7:
- ply->keys |= 0x40; goto key_walk;
- case Xkey_8:
- ply->keys |= 0x80; goto key_walk;
- key_walk:
- Cave[y][x] = Yball_eat;
- Next[y][x] = Zplayer;
- play[SAMPLE_collect] = 1;
- lev.score += lev.key_score;
- ply->anim = SPR_walk + anim;
- ply->x = x;
- ply->y = y;
- break;
- case Xlenses:
- Cave[y][x] = Yball_eat;
- Next[y][x] = Zplayer;
- play[SAMPLE_collect] = 1;
- lev.score += lev.lenses_score;
- lev.lenses_cnt = lev.lenses_time;
- ply->anim = SPR_walk + anim;
- ply->x = x;
- ply->y = y;
- break;
- case Xmagnify:
- Cave[y][x] = Yball_eat;
- Next[y][x] = Zplayer;
- play[SAMPLE_collect] = 1;
- lev.score += lev.magnify_score;
- lev.magnify_cnt = lev.magnify_time;
- ply->anim = SPR_walk + anim;
- ply->x = x;
- ply->y = y;
- break;
- case Xstone:
- if(dy) break;
- switch(Cave[y][x+dx]) {
- case Xacid_1:
- case Xacid_2:
- case Xacid_3:
- case Xacid_4:
- case Xacid_5:
- case Xacid_6:
- case Xacid_7:
- case Xacid_8:
- if(Cave[y-1][x+dx+1] == Xblank) Cave[y-1][x+dx+1] = Yacid_splash_eB;
- if(Cave[y-1][x+dx-1] == Xblank) Cave[y-1][x+dx-1] = Yacid_splash_wB;
- play[SAMPLE_acid] = 1;
- goto stone_walk;
- case Xblank:
- case Yacid_splash_eB:
- case Yacid_splash_wB:
- Cave[y][x+dx] = dx > 0 ? Ystone_e : Ystone_w;
- Next[y][x+dx] = Xstone_pause;
- stone_walk:
- Cave[y][x] = dx > 0 ? Ystone_eB : Ystone_wB;
- Next[y][x] = Zplayer;
- play[SAMPLE_roll] = 1;
- ply->x = x;
- }
- ply->anim = SPR_push + anim;
- break;
- case Xbomb:
- if(dy) break;
- switch(Cave[y][x+dx]) {
- case Xacid_1:
- case Xacid_2:
- case Xacid_3:
- case Xacid_4:
- case Xacid_5:
- case Xacid_6:
- case Xacid_7:
- case Xacid_8:
- if(Cave[y-1][x+dx+1] == Xblank) Cave[y-1][x+dx+1] = Yacid_splash_eB;
- if(Cave[y-1][x+dx-1] == Xblank) Cave[y-1][x+dx-1] = Yacid_splash_wB;
- play[SAMPLE_acid] = 1;
- goto bomb_walk;
- case Xblank:
- case Yacid_splash_eB:
- case Yacid_splash_wB:
- Cave[y][x+dx] = dx > 0 ? Ybomb_e : Ybomb_w;
- Next[y][x+dx] = Xbomb_pause;
- bomb_walk:
- Cave[y][x] = dx > 0 ? Ybomb_eB : Ybomb_wB;
- Next[y][x] = Zplayer;
- play[SAMPLE_roll] = 1;
- ply->x = x;
- }
- ply->anim = SPR_push + anim;
- break;
- case Xnut:
- if(dy) break;
- switch(Cave[y][x+dx]) {
- case Xacid_1:
- case Xacid_2:
- case Xacid_3:
- case Xacid_4:
- case Xacid_5:
- case Xacid_6:
- case Xacid_7:
- case Xacid_8:
- if(Cave[y-1][x+dx+1] == Xblank) Cave[y-1][x+dx+1] = Yacid_splash_eB;
- if(Cave[y-1][x+dx-1] == Xblank) Cave[y-1][x+dx-1] = Yacid_splash_wB;
- play[SAMPLE_acid] = 1;
- goto nut_walk;
- case Xblank:
- case Yacid_splash_eB:
- case Yacid_splash_wB:
- Cave[y][x+dx] = dx > 0 ? Ynut_e : Ynut_w;
- Next[y][x+dx] = Xnut_pause;
- nut_walk:
- Cave[y][x] = dx > 0 ? Ynut_eB : Ynut_wB;
- Next[y][x] = Zplayer;
- play[SAMPLE_roll] = 1;
- ply->x = x;
- }
- ply->anim = SPR_push + anim;
- break;
- case Xspring:
- if(dy) break;
- switch(Cave[y][x+dx]) {
- case Xalien:
- case Xalien_pause:
- Cave[y][x] = dx > 0 ? Yspring_kill_eB : Yspring_kill_wB;
- Cave[y][x+dx] = dx > 0 ? Yspring_kill_e : Yspring_kill_w;
- Next[y][x] = Zplayer;
- Next[y][x+dx] = dx > 0 ? Xspring_e : Xspring_w;
- play[SAMPLE_slurp] = 1;
- lev.score += lev.slurp_score;
- ply->x = x;
- break;
- case Xacid_1:
- case Xacid_2:
- case Xacid_3:
- case Xacid_4:
- case Xacid_5:
- case Xacid_6:
- case Xacid_7:
- case Xacid_8:
- if(Cave[y-1][x+dx+1] == Xblank) Cave[y-1][x+dx+1] = Yacid_splash_eB;
- if(Cave[y-1][x+dx-1] == Xblank) Cave[y-1][x+dx-1] = Yacid_splash_wB;
- play[SAMPLE_acid] = 1;
- goto spring_walk;
- case Xblank:
- case Yacid_splash_eB:
- case Yacid_splash_wB:
- Cave[y][x+dx] = dx > 0 ? Yspring_e : Yspring_w;
- Next[y][x+dx] = dx > 0 ? Xspring_e : Xspring_w;
- spring_walk:
- Cave[y][x] = dx > 0 ? Yspring_eB : Yspring_wB;
- Next[y][x] = Zplayer;
- play[SAMPLE_roll] = 1;
- ply->x = x;
- }
- ply->anim = SPR_push + anim;
- break;
- case Xspring_pause:
- case Xstone_pause:
- case Xbomb_pause:
- case Xnut_pause:
- case Xsand_stonein_1:
- case Xsand_stonein_2:
- case Xsand_stonein_3:
- case Xsand_stonein_4:
- if(dy) break;
- ply->anim = SPR_push + anim;
- break;
- case Xballoon:
- switch(Cave[y+dy][x+dx]) {
- case Xacid_1:
- case Xacid_2:
- case Xacid_3:
- case Xacid_4:
- case Xacid_5:
- case Xacid_6:
- case Xacid_7:
- case Xacid_8:
- if(Cave[y+dy-1][x+dx+1] == Xblank) Cave[y+dy-1][x+dx+1] = Yacid_splash_eB;
- if(Cave[y+dy-1][x+dx-1] == Xblank) Cave[y+dy-1][x+dx-1] = Yacid_splash_wB;
- play[SAMPLE_acid] = 1;
- goto balloon_walk;
- case Xblank:
- case Yacid_splash_eB:
- case Yacid_splash_wB:
- Cave[y+dy][x+dx] = dy ? (dy < 0 ? Yballoon_n : Yballoon_s) : (dx > 0 ? Yballoon_e : Yballoon_w);
- Next[y+dy][x+dx] = Xballoon;
- balloon_walk:
- Cave[y][x] = dy ? (dy < 0 ? Yballoon_nB : Yballoon_sB) : (dx > 0 ? Yballoon_eB : Yballoon_wB);
- Next[y][x] = Zplayer;
- play[SAMPLE_push] = 1;
- ply->x = x;
- ply->y = y;
- }
- ply->anim = SPR_push + anim;
- break;
- 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:
- switch(Cave[y+dy][x+dx]) {
- case Xacid_1:
- case Xacid_2:
- case Xacid_3:
- case Xacid_4:
- case Xacid_5:
- case Xacid_6:
- case Xacid_7:
- case Xacid_8:
- if(Cave[y+dy-1][x+dx+1] == Xblank) Cave[y+dy-1][x+dx+1] = Yacid_splash_eB;
- if(Cave[y+dy-1][x+dx-1] == Xblank) Cave[y+dy-1][x+dx-1] = Yacid_splash_wB;
- play[SAMPLE_acid] = 1;
- goto android_walk;
- case Xblank:
- case Yacid_splash_eB:
- case Yacid_splash_wB:
- Cave[y+dy][x+dx] = dy ? (dy < 0 ? Yandroid_n : Yandroid_s) : (dx > 0 ? Yandroid_e : Yandroid_w);
- Next[y+dy][x+dx] = dy ? (dy < 0 ? Xandroid_2_n : Xandroid_2_s) : (dx > 0 ? Xandroid_2_e : Xandroid_2_w);
- android_walk:
- Cave[y][x] = dy ? (dy < 0 ? Yandroid_nB : Yandroid_sB) : (dx > 0 ? Yandroid_eB : Yandroid_wB);
- Next[y][x] = Zplayer;
- play[SAMPLE_push] = 1;
- ply->x = x;
- ply->y = y;
- }
- ply->anim = SPR_push + anim;
- break;
- case Xdoor_1:
- case Xfake_door_1:
- if(ply->keys & 0x01) goto door_walk; else break;
- case Xdoor_2:
- case Xfake_door_2:
- if(ply->keys & 0x02) goto door_walk; else break;
- case Xdoor_3:
- case Xfake_door_3:
- if(ply->keys & 0x04) goto door_walk; else break;
- case Xdoor_4:
- case Xfake_door_4:
- if(ply->keys & 0x08) goto door_walk; else break;
- case Xdoor_5:
- case Xfake_door_5:
- if(ply->keys & 0x10) goto door_walk; else break;
- case Xdoor_6:
- case Xfake_door_6:
- if(ply->keys & 0x20) goto door_walk; else break;
- case Xdoor_7:
- case Xfake_door_7:
- if(ply->keys & 0x40) goto door_walk; else break;
- case Xdoor_8:
- case Xfake_door_8:
- if(ply->keys & 0x80) goto door_walk; else break;
- door_walk:
- if(!tab_blank[Cave[y+dy][x+dx]]) break;
- Cave[y+dy][x+dx] = Zplayer;
- Next[y+dy][x+dx] = Zplayer;
- play[SAMPLE_door] = 1;
- ply->anim = SPR_walk + anim;
- ply->x = x + dx;
- ply->y = y + dy;
- break;
- case Xwheel:
- play[SAMPLE_press] = 1;
- lev.wheel_cnt = lev.wheel_time;
- lev.wheel_x = x;
- lev.wheel_y = y;
- break;
- case Xwind_n:
- lev.wind_direction = 0; goto wind_walk;
- case Xwind_e:
- lev.wind_direction = 1; goto wind_walk;
- case Xwind_s:
- lev.wind_direction = 2; goto wind_walk;
- case Xwind_w:
- lev.wind_direction = 3; goto wind_walk;
- case Xwind_nesw:
- lev.wind_direction = dy ? (dy < 0 ? 0 : 2) : (dx > 0 ? 1 : 3); goto wind_walk;
- wind_walk:
- play[SAMPLE_press] = 1;
- lev.wind_cnt = lev.wind_time;
- break;
- case Xwind_stop:
- play[SAMPLE_press] = 1;
- lev.wind_cnt = 0;
- break;
- case Xswitch:
- play[SAMPLE_press] = 1;
- lev.ball_cnt = lev.ball_time;
- lev.ball_state = !lev.ball_state;
- break;
- case Xplant:
- Cave[y][x] = Yplant;
- Next[y][x] = Xplant;
- play[SAMPLE_blank] = 1;
- ply->anim = SPR_walk + anim;
- ply->x = x;
- ply->y = y;
- break;
- case Xexit_1:
- case Xexit_2:
- case Xexit_3:
- play[SAMPLE_exit] = 1;
- if(--lev.home == 0) lev.score += lev.time * lev.exit_score / 100;
- ply->anim = SPR_walk + anim;
- ply->x = x;
- ply->y = y;
- break;
- }
- } else {
- switch(Cave[y][x]) { /* fire is pressed */
- case Xgrass:
- case Xdirt:
- Cave[y][x] = Yball_eat;
- Next[y][x] = Xblank;
- play[SAMPLE_dirt] = 1;
- ply->anim = SPR_spray + anim;
- break;
- case Xdiamond:
- case Xdiamond_pause:
- Cave[y][x] = Ydiamond_eat;
- Next[y][x] = Xblank;
- play[SAMPLE_collect] = 1;
- lev.score += lev.diamond_score;
- lev.required = lev.required < 3 ? 0 : lev.required - 3;
- ply->anim = SPR_walk + anim;
- break;
- case Xemerald:
- case Xemerald_pause:
- Cave[y][x] = Yemerald_eat;
- Next[y][x] = Xblank;
- play[SAMPLE_collect] = 1;
- lev.score += lev.emerald_score;
- lev.required = lev.required < 1 ? 0 : lev.required - 1;
- ply->anim = SPR_walk + anim;
- break;
- case Xdynamite:
- Cave[y][x] = Ydynamite_eat;
- Next[y][x] = Xblank;
- play[SAMPLE_collect] = 1;
- lev.score += lev.dynamite_score;
- ply->dynamite = ply->dynamite > 9998 ? 9999 : ply->dynamite + 1;
- ply->anim = SPR_walk + anim;
- break;
- case Xkey_1:
- ply->keys |= 0x01; goto key_shoot;
- case Xkey_2:
- ply->keys |= 0x02; goto key_shoot;
- case Xkey_3:
- ply->keys |= 0x04; goto key_shoot;
- case Xkey_4:
- ply->keys |= 0x08; goto key_shoot;
- case Xkey_5:
- ply->keys |= 0x10; goto key_shoot;
- case Xkey_6:
- ply->keys |= 0x20; goto key_shoot;
- case Xkey_7:
- ply->keys |= 0x40; goto key_shoot;
- case Xkey_8:
- ply->keys |= 0x80; goto key_shoot;
- key_shoot:
- Cave[y][x] = Yball_eat;
- Next[y][x] = Xblank;
- play[SAMPLE_collect] = 1;
- lev.score += lev.key_score;
- ply->anim = SPR_walk + anim;
- break;
- case Xlenses:
- Cave[y][x] = Yball_eat;
- Next[y][x] = Xblank;
- play[SAMPLE_collect] = 1;
- lev.score += lev.lenses_score;
- lev.lenses_cnt = lev.lenses_time;
- ply->anim = SPR_walk + anim;
- break;
- case Xmagnify:
- Cave[y][x] = Yball_eat;
- Next[y][x] = Xblank;
- play[SAMPLE_collect] = 1;
- lev.score += lev.magnify_score;
- lev.magnify_cnt = lev.magnify_time;
- ply->anim = SPR_walk + anim;
- break;
- }
+
+ ply->anim = SPR_push + anim;
+ break;
+
+ case Xspring_pause:
+ case Xstone_pause:
+ case Xbomb_pause:
+ case Xnut_pause:
+ case Xsand_stonein_1:
+ case Xsand_stonein_2:
+ case Xsand_stonein_3:
+ case Xsand_stonein_4:
+ if (dy)
+ break;
+
+ ply->anim = SPR_push + anim;
+ break;
+
+ case Xballoon:
+ switch(Cave[y+dy][x+dx])
+ {
+ case Xacid_1:
+ case Xacid_2:
+ case Xacid_3:
+ case Xacid_4:
+ case Xacid_5:
+ case Xacid_6:
+ case Xacid_7:
+ case Xacid_8:
+ if (Cave[y+dy-1][x+dx+1] == Xblank)
+ Cave[y+dy-1][x+dx+1] = Yacid_splash_eB;
+ if (Cave[y+dy-1][x+dx-1] == Xblank)
+ Cave[y+dy-1][x+dx-1] = Yacid_splash_wB;
+ play[SAMPLE_acid] = 1;
+ goto balloon_walk;
+
+ case Xblank:
+ case Yacid_splash_eB:
+ case Yacid_splash_wB:
+ Cave[y+dy][x+dx] = (dy ? (dy < 0 ? Yballoon_n : Yballoon_s) :
+ (dx > 0 ? Yballoon_e : Yballoon_w));
+ Next[y+dy][x+dx] = Xballoon;
+
+ balloon_walk:
+ Cave[y][x] = (dy ? (dy < 0 ? Yballoon_nB : Yballoon_sB) :
+ (dx > 0 ? Yballoon_eB : Yballoon_wB));
+ Next[y][x] = Zplayer;
+ play[SAMPLE_push] = 1;
+ ply->x = x;
+ ply->y = y;
}
+
+ ply->anim = SPR_push + anim;
+ break;
+
+ 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:
+ switch(Cave[y+dy][x+dx])
+ {
+ case Xacid_1:
+ case Xacid_2:
+ case Xacid_3:
+ case Xacid_4:
+ case Xacid_5:
+ case Xacid_6:
+ case Xacid_7:
+ case Xacid_8:
+ if (Cave[y+dy-1][x+dx+1] == Xblank)
+ Cave[y+dy-1][x+dx+1] = Yacid_splash_eB;
+ if (Cave[y+dy-1][x+dx-1] == Xblank)
+ Cave[y+dy-1][x+dx-1] = Yacid_splash_wB;
+ play[SAMPLE_acid] = 1;
+ goto android_walk;
+
+ case Xblank:
+ case Yacid_splash_eB:
+ case Yacid_splash_wB:
+ Cave[y+dy][x+dx] = (dy ? (dy < 0 ? Yandroid_n : Yandroid_s) :
+ (dx > 0 ? Yandroid_e : Yandroid_w));
+ Next[y+dy][x+dx] = (dy ? (dy < 0 ? Xandroid_2_n : Xandroid_2_s) :
+ (dx > 0 ? Xandroid_2_e : Xandroid_2_w));
+
+ android_walk:
+ Cave[y][x] = (dy ? (dy < 0 ? Yandroid_nB : Yandroid_sB) :
+ (dx > 0 ? Yandroid_eB : Yandroid_wB));
+ Next[y][x] = Zplayer;
+ play[SAMPLE_push] = 1;
+ ply->x = x;
+ ply->y = y;
+ }
+
+ ply->anim = SPR_push + anim;
+ break;
+
+ case Xdoor_1:
+ case Xfake_door_1:
+ if (ply->keys & 0x01)
+ goto door_walk;
+ else
+ break;
+
+ case Xdoor_2:
+ case Xfake_door_2:
+ if (ply->keys & 0x02)
+ goto door_walk;
+ else
+ break;
+
+ case Xdoor_3:
+ case Xfake_door_3:
+ if (ply->keys & 0x04)
+ goto door_walk;
+ else
+ break;
+
+ case Xdoor_4:
+ case Xfake_door_4:
+ if (ply->keys & 0x08)
+ goto door_walk;
+ else
+ break;
+
+ case Xdoor_5:
+ case Xfake_door_5:
+ if (ply->keys & 0x10)
+ goto door_walk;
+ else
+ break;
+
+ case Xdoor_6:
+ case Xfake_door_6:
+ if (ply->keys & 0x20)
+ goto door_walk;
+ else
+ break;
+
+ case Xdoor_7:
+ case Xfake_door_7:
+ if (ply->keys & 0x40)
+ goto door_walk;
+ else
+ break;
+
+ case Xdoor_8:
+ case Xfake_door_8:
+ if (ply->keys & 0x80)
+ goto door_walk;
+ else
+ break;
+
+ door_walk:
+ if (!tab_blank[Cave[y+dy][x+dx]])
+ break;
+
+ Cave[y+dy][x+dx] = Zplayer;
+ Next[y+dy][x+dx] = Zplayer;
+ play[SAMPLE_door] = 1;
+ ply->anim = SPR_walk + anim;
+ ply->x = x + dx;
+ ply->y = y + dy;
+ break;
+
+ case Xwheel:
+ play[SAMPLE_press] = 1;
+ lev.wheel_cnt = lev.wheel_time;
+ lev.wheel_x = x;
+ lev.wheel_y = y;
+ break;
+
+ case Xwind_n:
+ lev.wind_direction = 0;
+ goto wind_walk;
+
+ case Xwind_e:
+ lev.wind_direction = 1;
+ goto wind_walk;
+
+ case Xwind_s:
+ lev.wind_direction = 2;
+ goto wind_walk;
+
+ case Xwind_w:
+ lev.wind_direction = 3;
+ goto wind_walk;
+
+ case Xwind_nesw:
+ lev.wind_direction = dy ? (dy < 0 ? 0 : 2) : (dx > 0 ? 1 : 3);
+ goto wind_walk;
+
+ wind_walk:
+ play[SAMPLE_press] = 1;
+ lev.wind_cnt = lev.wind_time;
+ break;
+
+ case Xwind_stop:
+ play[SAMPLE_press] = 1;
+ lev.wind_cnt = 0;
+ break;
+
+ case Xswitch:
+ play[SAMPLE_press] = 1;
+ lev.ball_cnt = lev.ball_time;
+ lev.ball_state = !lev.ball_state;
+ break;
+
+ case Xplant:
+ Cave[y][x] = Yplant;
+ Next[y][x] = Xplant;
+ play[SAMPLE_blank] = 1;
+ ply->anim = SPR_walk + anim;
+ ply->x = x;
+ ply->y = y;
+ break;
+
+ case Xexit_1:
+ case Xexit_2:
+ case Xexit_3:
+ play[SAMPLE_exit] = 1;
+ if (--lev.home == 0)
+ lev.score += lev.time * lev.exit_score / 100;
+ ply->anim = SPR_walk + anim;
+ ply->x = x;
+ ply->y = y;
+ break;
+ }
+ }
+ else
+ {
+ switch(Cave[y][x])
+ {
+ /* fire is pressed */
+
+ case Xgrass:
+ case Xdirt:
+ Cave[y][x] = Yball_eat;
+ Next[y][x] = Xblank;
+ play[SAMPLE_dirt] = 1;
+ ply->anim = SPR_spray + anim;
+ break;
+
+ case Xdiamond:
+ case Xdiamond_pause:
+ Cave[y][x] = Ydiamond_eat;
+ Next[y][x] = Xblank;
+ play[SAMPLE_collect] = 1;
+ lev.score += lev.diamond_score;
+ lev.required = lev.required < 3 ? 0 : lev.required - 3;
+ ply->anim = SPR_walk + anim;
+ break;
+
+ case Xemerald:
+ case Xemerald_pause:
+ Cave[y][x] = Yemerald_eat;
+ Next[y][x] = Xblank;
+ play[SAMPLE_collect] = 1;
+ lev.score += lev.emerald_score;
+ lev.required = lev.required < 1 ? 0 : lev.required - 1;
+ ply->anim = SPR_walk + anim;
+ break;
+
+ case Xdynamite:
+ Cave[y][x] = Ydynamite_eat;
+ Next[y][x] = Xblank;
+ play[SAMPLE_collect] = 1;
+ lev.score += lev.dynamite_score;
+ ply->dynamite = ply->dynamite > 9998 ? 9999 : ply->dynamite + 1;
+ ply->anim = SPR_walk + anim;
+ break;
+
+ case Xkey_1:
+ ply->keys |= 0x01;
+ goto key_shoot;
+
+ case Xkey_2:
+ ply->keys |= 0x02;
+ goto key_shoot;
+
+ case Xkey_3:
+ ply->keys |= 0x04;
+ goto key_shoot;
+
+ case Xkey_4:
+ ply->keys |= 0x08;
+ goto key_shoot;
+
+ case Xkey_5:
+ ply->keys |= 0x10;
+ goto key_shoot;
+
+ case Xkey_6:
+ ply->keys |= 0x20;
+ goto key_shoot;
+
+ case Xkey_7:
+ ply->keys |= 0x40;
+ goto key_shoot;
+
+ case Xkey_8:
+ ply->keys |= 0x80;
+ goto key_shoot;
+
+ key_shoot:
+ Cave[y][x] = Yball_eat;
+ Next[y][x] = Xblank;
+ play[SAMPLE_collect] = 1;
+ lev.score += lev.key_score;
+ ply->anim = SPR_walk + anim;
+ break;
+
+ case Xlenses:
+ Cave[y][x] = Yball_eat;
+ Next[y][x] = Xblank;
+ play[SAMPLE_collect] = 1;
+ lev.score += lev.lenses_score;
+ lev.lenses_cnt = lev.lenses_time;
+ ply->anim = SPR_walk + anim;
+ break;
+
+ case Xmagnify:
+ Cave[y][x] = Yball_eat;
+ Next[y][x] = Xblank;
+ play[SAMPLE_collect] = 1;
+ lev.score += lev.magnify_score;
+ lev.magnify_cnt = lev.magnify_time;
+ ply->anim = SPR_walk + anim;
+ break;
+ }
+ }
}
#endif
/* ---------------------------------------------------------------------- */
/* 0=stop 1=blank */
-int tile_blank[] = {
- Xblank, 1,
- Yacid_splash_eB, 1,
- Yacid_splash_wB, 1,
- TILE_MAX
+int tile_blank[] =
+{
+ Xblank, 1,
+ Yacid_splash_eB, 1,
+ Yacid_splash_wB, 1,
+ TILE_MAX
};
+
/* 0=stop 1=acid */
-int tile_acid[] = {
- Xblank, 1,
- Yacid_splash_eB, 1,
- Yacid_splash_wB, 1,
- Xacid_1, 1,
- Xacid_2, 1,
- Xacid_3, 1,
- Xacid_4, 1,
- Xacid_5, 1,
- Xacid_6, 1,
- Xacid_7, 1,
- Xacid_8, 1,
- TILE_MAX
+int tile_acid[] =
+{
+ Xblank, 1,
+ Yacid_splash_eB, 1,
+ Yacid_splash_wB, 1,
+ Xacid_1, 1,
+ Xacid_2, 1,
+ Xacid_3, 1,
+ Xacid_4, 1,
+ Xacid_5, 1,
+ Xacid_6, 1,
+ Xacid_7, 1,
+ Xacid_8, 1,
+ TILE_MAX
};
+
/* 0=stop 1=ameuba */
-int tile_ameuba[] = {
- Xdripper, 1,
- XdripperB, 1,
- Xameuba_1, 1,
- Xameuba_2, 1,
- Xameuba_3, 1,
- Xameuba_4, 1,
- Xameuba_5, 1,
- Xameuba_6, 1,
- Xameuba_7, 1,
- Xameuba_8, 1,
- TILE_MAX
+int tile_ameuba[] =
+{
+ Xdripper, 1,
+ XdripperB, 1,
+ Xameuba_1, 1,
+ Xameuba_2, 1,
+ Xameuba_3, 1,
+ Xameuba_4, 1,
+ Xameuba_5, 1,
+ Xameuba_6, 1,
+ Xameuba_7, 1,
+ Xameuba_8, 1,
+ TILE_MAX
};
+
/* 0=stop 1=move */
-int tile_android_move[] = {
- Xblank, 1,
- Yacid_splash_eB, 1,
- Yacid_splash_wB, 1,
- Xplant, 1,
- TILE_MAX
+int tile_android_move[] =
+{
+ Xblank, 1,
+ Yacid_splash_eB, 1,
+ Yacid_splash_wB, 1,
+ Xplant, 1,
+ TILE_MAX
};
/* ---------------------------------------------------------------------- */
/* explosions: special format */
/* everything is initially filled with Xboom_1 */
-int tile_explode[] = {
- ZBORDER,
- Znormal,
- Zdynamite,
- Xboom_bug,
- Xboom_bomb,
- Xboom_android,
- Xandroid,
- Xandroid_1_n,
- Xandroid_2_n,
- Xandroid_1_e,
- Xandroid_2_e,
- Xandroid_1_s,
- Xandroid_2_s,
- Xandroid_1_w,
- Xandroid_2_w,
- Xacid_ne,
- Xacid_nw,
- Xacid_s,
- Xacid_se,
- Xacid_sw,
- Xacid_1,
- Xacid_2,
- Xacid_3,
- Xacid_4,
- Xacid_5,
- Xacid_6,
- Xacid_7,
- Xacid_8,
- Xdoor_1,
- Xdoor_2,
- Xdoor_3,
- Xdoor_4,
- Xdoor_5,
- Xdoor_6,
- Xdoor_7,
- Xdoor_8,
- Xplant,
- Yplant,
- 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,
- TILE_MAX, /* up till here are indestructable */
- Xbug_n, Xboom_bug,
- Xbug_e, Xboom_bug,
- Xbug_s, Xboom_bug,
- Xbug_w, Xboom_bug,
- Xbug_gon, Xboom_bug,
- Xbug_goe, Xboom_bug,
- Xbug_gos, Xboom_bug,
- Xbug_gow, Xboom_bug,
- Xbomb, Xboom_bomb,
- Xbomb_pause, Xboom_bomb,
- Xbomb_fall, Xboom_bomb,
- TILE_MAX, /* up till here are special explosions */
- Xandroid, Xboom_android,
- Xandroid_1_n, Xboom_android,
- Xandroid_2_n, Xboom_android,
- Xandroid_1_e, Xboom_android,
- Xandroid_2_e, Xboom_android,
- Xandroid_1_s, Xboom_android,
- Xandroid_2_s, Xboom_android,
- Xandroid_1_w, Xboom_android,
- Xandroid_2_w, Xboom_android,
- TILE_MAX /* up until here are dynamite explosions */
+int tile_explode[] =
+{
+ ZBORDER,
+ Znormal,
+ Zdynamite,
+ Xboom_bug,
+ Xboom_bomb,
+ Xboom_android,
+ Xandroid,
+ Xandroid_1_n,
+ Xandroid_2_n,
+ Xandroid_1_e,
+ Xandroid_2_e,
+ Xandroid_1_s,
+ Xandroid_2_s,
+ Xandroid_1_w,
+ Xandroid_2_w,
+ Xacid_ne,
+ Xacid_nw,
+ Xacid_s,
+ Xacid_se,
+ Xacid_sw,
+ Xacid_1,
+ Xacid_2,
+ Xacid_3,
+ Xacid_4,
+ Xacid_5,
+ Xacid_6,
+ Xacid_7,
+ Xacid_8,
+ Xdoor_1,
+ Xdoor_2,
+ Xdoor_3,
+ Xdoor_4,
+ Xdoor_5,
+ Xdoor_6,
+ Xdoor_7,
+ Xdoor_8,
+ Xplant,
+ Yplant,
+ 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,
+ TILE_MAX, /* up till here are indestructable */
+
+ Xbug_n, Xboom_bug,
+ Xbug_e, Xboom_bug,
+ Xbug_s, Xboom_bug,
+ Xbug_w, Xboom_bug,
+ Xbug_gon, Xboom_bug,
+ Xbug_goe, Xboom_bug,
+ Xbug_gos, Xboom_bug,
+ Xbug_gow, Xboom_bug,
+ Xbomb, Xboom_bomb,
+ Xbomb_pause, Xboom_bomb,
+ Xbomb_fall, Xboom_bomb,
+ TILE_MAX, /* up till here are special explosions */
+
+ Xandroid, Xboom_android,
+ Xandroid_1_n, Xboom_android,
+ Xandroid_2_n, Xboom_android,
+ Xandroid_1_e, Xboom_android,
+ Xandroid_2_e, Xboom_android,
+ Xandroid_1_s, Xboom_android,
+ Xandroid_2_s, Xboom_android,
+ Xandroid_1_w, Xboom_android,
+ Xandroid_2_w, Xboom_android,
+ TILE_MAX /* up until here are dynamite explosions */
};
/* ---------------------------------------------------------------------- */
* one graphics icon maps to many tiles and animations
*/
-int obj_map[] = {
+int obj_map[] =
+{
+ /* special */
-/* special */
+ Ystone_sB, 7,
+ Xsand_stonein_4, 7,
+ -1,
+ Xsand_stonein_4, 5,
+ Xsand_stonein_4, 6,
+ -1,
+ Ystone_sB, 6,
+ Xsand_stonein_4, 3,
+ Xsand_stonein_4, 4,
+ -1,
+ Xsand_stonein_4, 1,
+ Xsand_stonein_4, 2,
+ -1,
+ Ystone_sB, 5,
+ Xsand_stonein_3, 7,
+ Xsand_stonein_4, 0,
+ -1,
+ Xsand_stonein_3, 5,
+ Xsand_stonein_3, 6,
+ -1,
+ Ystone_sB, 4,
+ Xsand_stonein_3, 3,
+ Xsand_stonein_3, 4,
+ -1,
+ Xsand_stonein_3, 1,
+ Xsand_stonein_3, 2,
+ -1,
+ Ystone_sB, 3,
+ Xsand_stonein_2, 7,
+ Xsand_stonein_3, 0,
+ -1,
+ Xsand_stonein_2, 5,
+ Xsand_stonein_2, 6,
+ -1,
+ Ystone_sB, 2,
+ Xsand_stonein_2, 3,
+ Xsand_stonein_2, 4,
+ -1,
+ Xsand_stonein_2, 1,
+ Xsand_stonein_2, 2,
+ -1,
+ Ystone_sB, 1,
+ Xsand_stonein_1, 7,
+ Xsand_stonein_2, 0,
+ -1,
+ Xsand_stonein_1, 5,
+ Xsand_stonein_1, 6,
+ -1,
+ Ystone_sB, 0,
+ Xsand_stonein_1, 3,
+ Xsand_stonein_1, 4,
+ -1,
+ Xsand_stonein_1, 1,
+ Xsand_stonein_1, 2,
+ -1,
+ Xstone, 0,
+ Xstone, 1,
+ Xstone, 2,
+ Xstone, 3,
+ Xstone, 4,
+ Xstone, 5,
+ Xstone, 6,
+ Xstone, 7,
+ Xstone_pause, 0,
+ Xstone_pause, 1,
+ Xstone_pause, 2,
+ Xstone_pause, 3,
+ Xstone_pause, 4,
+ Xstone_pause, 5,
+ Xstone_pause, 6,
+ Xstone_pause, 7,
+ Xstone_fall, 0,
+ Xstone_fall, 1,
+ Xstone_fall, 2,
+ Xstone_fall, 3,
+ Xstone_fall, 4,
+ Xstone_fall, 5,
+ Xstone_fall, 6,
+ Xstone_fall, 7,
-Ystone_sB,7 ,
-Xsand_stonein_4,7 ,
--1,
-Xsand_stonein_4,5 ,
-Xsand_stonein_4,6 ,
--1,
-Ystone_sB,6 ,
-Xsand_stonein_4,3 ,
-Xsand_stonein_4,4 ,
--1,
-Xsand_stonein_4,1 ,
-Xsand_stonein_4,2 ,
--1,
-Ystone_sB,5 ,
-Xsand_stonein_3,7 ,
-Xsand_stonein_4,0 ,
--1,
-Xsand_stonein_3,5 ,
-Xsand_stonein_3,6 ,
--1,
-Ystone_sB,4 ,
-Xsand_stonein_3,3 ,
-Xsand_stonein_3,4 ,
--1,
-Xsand_stonein_3,1 ,
-Xsand_stonein_3,2 ,
--1,
-Ystone_sB,3 ,
-Xsand_stonein_2,7 ,
-Xsand_stonein_3,0 ,
--1,
-Xsand_stonein_2,5 ,
-Xsand_stonein_2,6 ,
--1,
-Ystone_sB,2 ,
-Xsand_stonein_2,3 ,
-Xsand_stonein_2,4 ,
--1,
-Xsand_stonein_2,1 ,
-Xsand_stonein_2,2 ,
--1,
-Ystone_sB,1 ,
-Xsand_stonein_1,7 ,
-Xsand_stonein_2,0 ,
--1,
-Xsand_stonein_1,5 ,
-Xsand_stonein_1,6 ,
--1,
-Ystone_sB,0 ,
-Xsand_stonein_1,3 ,
-Xsand_stonein_1,4 ,
--1,
-Xsand_stonein_1,1 ,
-Xsand_stonein_1,2 ,
--1,
-Xstone,0 ,
-Xstone,1 ,
-Xstone,2 ,
-Xstone,3 ,
-Xstone,4 ,
-Xstone,5 ,
-Xstone,6 ,
-Xstone,7 ,
-Xstone_pause,0 ,
-Xstone_pause,1 ,
-Xstone_pause,2 ,
-Xstone_pause,3 ,
-Xstone_pause,4 ,
-Xstone_pause,5 ,
-Xstone_pause,6 ,
-Xstone_pause,7 ,
-Xstone_fall,0 ,
-Xstone_fall,1 ,
-Xstone_fall,2 ,
-Xstone_fall,3 ,
-Xstone_fall,4 ,
-Xstone_fall,5 ,
-Xstone_fall,6 ,
-Xstone_fall,7 ,
#ifdef BAD_ROLL
-Xstone_force_e,0 ,
-Xstone_force_e,1 ,
-Xstone_force_e,2 ,
-Xstone_force_e,3 ,
-Xstone_force_e,4 ,
-Xstone_force_e,5 ,
-Xstone_force_e,6 ,
-Xstone_force_e,7 ,
-Xstone_force_w,0 ,
-Xstone_force_w,1 ,
-Xstone_force_w,2 ,
-Xstone_force_w,3 ,
-Xstone_force_w,4 ,
-Xstone_force_w,5 ,
-Xstone_force_w,6 ,
-Xstone_force_w,7 ,
+ Xstone_force_e, 0,
+ Xstone_force_e, 1,
+ Xstone_force_e, 2,
+ Xstone_force_e, 3,
+ Xstone_force_e, 4,
+ Xstone_force_e, 5,
+ Xstone_force_e, 6,
+ Xstone_force_e, 7,
+ Xstone_force_w, 0,
+ Xstone_force_w, 1,
+ Xstone_force_w, 2,
+ Xstone_force_w, 3,
+ Xstone_force_w, 4,
+ Xstone_force_w, 5,
+ Xstone_force_w, 6,
+ Xstone_force_w, 7,
#endif
-Ystone_s,7 ,
-Xsand_stoneout_2,7 ,
-Xsand_stonein_1,0 ,
-Ystone_e,7 ,
-Ystone_w,7 ,
-Ydiamond_stone,7 ,
--1,
--1,
-Ystone_s,6 ,
-Xsand_stoneout_2,6 ,
--1,
--1,
-Ystone_s,5 ,
-Xsand_stoneout_2,5 ,
--1,
--1,
-Ystone_s,4 ,
-Xsand_stoneout_2,4 ,
--1,
-Xsand_stoneout_2,3 ,
--1,
-Ystone_s,3 ,
-Xsand_stoneout_2,2 ,
--1,
-Xsand_stoneout_2,1 ,
--1,
-Ystone_s,2 ,
-Xsand_stoneout_2,0 ,
--1,
-Xsand_stoneout_1,7 ,
-Xsand_stoneout_1,6 ,
--1,
-Ystone_s,1 ,
-Xsand_stoneout_1,5 ,
--1,
-Xsand_stoneout_1,4 ,
-Xsand_stoneout_1,3 ,
--1,
-Ystone_s,0 ,
-Xsand_stoneout_1,2 ,
--1,
-Xsand_stoneout_1,1 ,
-Xsand_stoneout_1,0 ,
--1,
-Ynut_sB,7 ,
--1,
--1,
-Ynut_sB,6 ,
--1,
--1,
-Ynut_sB,5 ,
--1,
--1,
-Ynut_sB,4 ,
--1,
--1,
-Ynut_sB,3 ,
--1,
--1,
-Ynut_sB,2 ,
--1,
--1,
-Ynut_sB,1 ,
--1,
--1,
-Ynut_sB,0 ,
--1,
--1,
-Ynut_s,7 ,
-Ynut_e,7 ,
-Ynut_w,7 ,
-Xnut,0 ,
-Xnut,1 ,
-Xnut,2 ,
-Xnut,3 ,
-Xnut,4 ,
-Xnut,5 ,
-Xnut,6 ,
-Xnut,7 ,
-Xnut_pause,0 ,
-Xnut_pause,1 ,
-Xnut_pause,2 ,
-Xnut_pause,3 ,
-Xnut_pause,4 ,
-Xnut_pause,5 ,
-Xnut_pause,6 ,
-Xnut_pause,7 ,
-Xnut_fall,0 ,
-Xnut_fall,1 ,
-Xnut_fall,2 ,
-Xnut_fall,3 ,
-Xnut_fall,4 ,
-Xnut_fall,5 ,
-Xnut_fall,6 ,
-Xnut_fall,7 ,
+
+ Ystone_s, 7,
+ Xsand_stoneout_2, 7,
+ Xsand_stonein_1, 0,
+ Ystone_e, 7,
+ Ystone_w, 7,
+ Ydiamond_stone, 7,
+ -1,
+ -1,
+ Ystone_s, 6,
+ Xsand_stoneout_2, 6,
+ -1,
+ -1,
+ Ystone_s, 5,
+ Xsand_stoneout_2, 5,
+ -1,
+ -1,
+ Ystone_s, 4,
+ Xsand_stoneout_2, 4,
+ -1,
+ Xsand_stoneout_2, 3,
+ -1,
+ Ystone_s, 3,
+ Xsand_stoneout_2, 2,
+ -1,
+ Xsand_stoneout_2, 1,
+ -1,
+ Ystone_s, 2,
+ Xsand_stoneout_2, 0,
+ -1,
+ Xsand_stoneout_1, 7,
+ Xsand_stoneout_1, 6,
+ -1,
+ Ystone_s, 1,
+ Xsand_stoneout_1, 5,
+ -1,
+ Xsand_stoneout_1, 4,
+ Xsand_stoneout_1, 3,
+ -1,
+ Ystone_s, 0,
+ Xsand_stoneout_1, 2,
+ -1,
+ Xsand_stoneout_1, 1,
+ Xsand_stoneout_1, 0,
+ -1,
+ Ynut_sB, 7,
+ -1,
+ -1,
+ Ynut_sB, 6,
+ -1,
+ -1,
+ Ynut_sB, 5,
+ -1,
+ -1,
+ Ynut_sB, 4,
+ -1,
+ -1,
+ Ynut_sB, 3,
+ -1,
+ -1,
+ Ynut_sB, 2,
+ -1,
+ -1,
+ Ynut_sB, 1,
+ -1,
+ -1,
+ Ynut_sB, 0,
+ -1,
+ -1,
+ Ynut_s, 7,
+ Ynut_e, 7,
+ Ynut_w, 7,
+ Xnut, 0,
+ Xnut, 1,
+ Xnut, 2,
+ Xnut, 3,
+ Xnut, 4,
+ Xnut, 5,
+ Xnut, 6,
+ Xnut, 7,
+ Xnut_pause, 0,
+ Xnut_pause, 1,
+ Xnut_pause, 2,
+ Xnut_pause, 3,
+ Xnut_pause, 4,
+ Xnut_pause, 5,
+ Xnut_pause, 6,
+ Xnut_pause, 7,
+ Xnut_fall, 0,
+ Xnut_fall, 1,
+ Xnut_fall, 2,
+ Xnut_fall, 3,
+ Xnut_fall, 4,
+ Xnut_fall, 5,
+ Xnut_fall, 6,
+ Xnut_fall, 7,
+
#ifdef BAD_ROLL
-Xnut_force_e,0 ,
-Xnut_force_e,1 ,
-Xnut_force_e,2 ,
-Xnut_force_e,3 ,
-Xnut_force_e,4 ,
-Xnut_force_e,5 ,
-Xnut_force_e,6 ,
-Xnut_force_e,7 ,
-Xnut_force_w,0 ,
-Xnut_force_w,1 ,
-Xnut_force_w,2 ,
-Xnut_force_w,3 ,
-Xnut_force_w,4 ,
-Xnut_force_w,5 ,
-Xnut_force_w,6 ,
-Xnut_force_w,7 ,
+ Xnut_force_e, 0,
+ Xnut_force_e, 1,
+ Xnut_force_e, 2,
+ Xnut_force_e, 3,
+ Xnut_force_e, 4,
+ Xnut_force_e, 5,
+ Xnut_force_e, 6,
+ Xnut_force_e, 7,
+ Xnut_force_w, 0,
+ Xnut_force_w, 1,
+ Xnut_force_w, 2,
+ Xnut_force_w, 3,
+ Xnut_force_w, 4,
+ Xnut_force_w, 5,
+ Xnut_force_w, 6,
+ Xnut_force_w, 7,
#endif
--1,
--1,
-Ynut_s,6 ,
--1,
--1,
-Ynut_s,5 ,
--1,
--1,
-Ynut_s,4 ,
--1,
--1,
-Ynut_s,3 ,
--1,
--1,
-Ynut_s,2 ,
--1,
--1,
-Ynut_s,1 ,
--1,
--1,
-Ynut_s,0 ,
--1,
--1,
+
+ -1,
+ -1,
+ Ynut_s, 6,
+ -1,
+ -1,
+ Ynut_s, 5,
+ -1,
+ -1,
+ Ynut_s, 4,
+ -1,
+ -1,
+ Ynut_s, 3,
+ -1,
+ -1,
+ Ynut_s, 2,
+ -1,
+ -1,
+ Ynut_s, 1,
+ -1,
+ -1,
+ Ynut_s, 0,
+ -1,
+ -1,
/* normal */
-Xblank,0 ,
-Xblank,1 ,
-Xblank,2 ,
-Xblank,3 ,
-Xblank,4 ,
-Xblank,5 ,
-Xblank,6 ,
-Xblank,7 ,
-Xfake_blank,0 ,
-Xfake_blank,1 ,
-Xfake_blank,2 ,
-Xfake_blank,3 ,
-Xfake_blank,4 ,
-Xfake_blank,5 ,
-Xfake_blank,6 ,
-Xfake_blank,7 ,
-Xdripper,0 ,
-Xdripper,1 ,
-Xdripper,2 ,
-Xdripper,3 ,
-Xdripper,4 ,
-Xdripper,5 ,
-Xdripper,6 ,
-Xdripper,7 ,
-Zplayer,0 ,
-Zplayer,1 ,
-Zplayer,2 ,
-Zplayer,3 ,
-Zplayer,4 ,
-Zplayer,5 ,
-Zplayer,6 ,
-Zplayer,7 ,
-Ydynamite_eat,3 ,
-Ydynamite_eat,4 ,
-Ydynamite_eat,5 ,
-Ydynamite_eat,6 ,
-Ydynamite_eat,7 ,
--1,
--1,
--1,
--1,
--1,
+ Xblank, 0,
+ Xblank, 1,
+ Xblank, 2,
+ Xblank, 3,
+ Xblank, 4,
+ Xblank, 5,
+ Xblank, 6,
+ Xblank, 7,
+ Xfake_blank, 0,
+ Xfake_blank, 1,
+ Xfake_blank, 2,
+ Xfake_blank, 3,
+ Xfake_blank, 4,
+ Xfake_blank, 5,
+ Xfake_blank, 6,
+ Xfake_blank, 7,
+ Xdripper, 0,
+ Xdripper, 1,
+ Xdripper, 2,
+ Xdripper, 3,
+ Xdripper, 4,
+ Xdripper, 5,
+ Xdripper, 6,
+ Xdripper, 7,
+ Zplayer, 0,
+ Zplayer, 1,
+ Zplayer, 2,
+ Zplayer, 3,
+ Zplayer, 4,
+ Zplayer, 5,
+ Zplayer, 6,
+ Zplayer, 7,
+ Ydynamite_eat, 3,
+ Ydynamite_eat, 4,
+ Ydynamite_eat, 5,
+ Ydynamite_eat, 6,
+ Ydynamite_eat, 7,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
-Ystone_eB,6 ,
-Ystone_w,0 ,
--1,
-Ystone_e,6 ,
-Ystone_wB,0 ,
--1,
-Ystone_eB,5 ,
-Ystone_w,1 ,
--1,
-Ystone_e,5 ,
-Ystone_wB,1 ,
--1,
-Ystone_eB,4 ,
-Ystone_w,2 ,
--1,
-Ystone_e,4 ,
-Ystone_wB,2 ,
--1,
-Ystone_eB,3 ,
-Ystone_w,3 ,
--1,
-Ystone_e,3 ,
-Ystone_wB,3 ,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Ytank_stone,3 ,
--1,
-Ytank_stone,4 ,
--1,
-Ytank_stone,5 ,
--1,
-Ytank_stone,6 ,
--1,
-Ytank_spring,0 ,
--1,
-Ytank_spring,1 ,
--1,
-Ytank_spring,2 ,
--1,
-Ytank_spring,3 ,
--1,
-Ytank_spring,4 ,
--1,
-Ytank_spring,5 ,
--1,
-Ytank_spring,6 ,
--1,
+ Ytank_w_n, 7,
+ Ytank_e_n, 7,
+ Ytank_n, 7,
+ Xtank_n, 0,
+ Xtank_n, 1,
+ Xtank_n, 2,
+ Xtank_n, 3,
+ Xtank_n, 4,
+ Xtank_n, 5,
+ Xtank_n, 6,
+ Xtank_n, 7,
+ Xtank_gon, 0,
+ Xtank_gon, 1,
+ Xtank_gon, 2,
+ Xtank_gon, 3,
+ Xtank_gon, 4,
+ Xtank_gon, 5,
+ Xtank_gon, 6,
+ Xtank_gon, 7,
+ -1,
+ Ytank_n_e, 7,
+ Ytank_s_e, 7,
+ Ytank_e, 7,
+ Xtank_e, 0,
+ Xtank_e, 1,
+ Xtank_e, 2,
+ Xtank_e, 3,
+ Xtank_e, 4,
+ Xtank_e, 5,
+ Xtank_e, 6,
+ Xtank_e, 7,
+ Xtank_goe, 0,
+ Xtank_goe, 1,
+ Xtank_goe, 2,
+ Xtank_goe, 3,
+ Xtank_goe, 4,
+ Xtank_goe, 5,
+ Xtank_goe, 6,
+ Xtank_goe, 7,
+ -1,
+ Ytank_e_s, 7,
+ Ytank_w_s, 7,
+ Ytank_s, 7,
+ Xtank_s, 0,
+ Xtank_s, 1,
+ Xtank_s, 2,
+ Xtank_s, 3,
+ Xtank_s, 4,
+ Xtank_s, 5,
+ Xtank_s, 6,
+ Xtank_s, 7,
+ Xtank_gos, 0,
+ Xtank_gos, 1,
+ Xtank_gos, 2,
+ Xtank_gos, 3,
+ Xtank_gos, 4,
+ Xtank_gos, 5,
+ Xtank_gos, 6,
+ Xtank_gos, 7,
+ -1,
+ Ytank_n_w, 7,
+ Ytank_s_w, 7,
+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ytank_s_w, 6,
+ Ytank_w_s, 0,
+ -1,
+ Ytank_n_w, 6,
+ Ytank_w_n, 0,
+ -1,
+ Ytank_n_w, 5,
+ Ytank_w_n, 1,
+ -1,
+ Ytank_n_w, 4,
+ Ytank_w_n, 2,
+ -1,
+ Ytank_n_w, 3,
+ Ytank_w_n, 3,
+ -1,
+ Ytank_n_w, 2,
+ Ytank_w_n, 4,
+ -1,
+ Ytank_n_w, 1,
+ Ytank_w_n, 5,
+ -1,
+ Ytank_n_w, 0,
+ Ytank_w_n, 6,
+ -1,
+ Ytank_stone, 0,
+ -1,
+ Ytank_stone, 1,
+ -1,
+ Ytank_stone, 2,
+ -1,
+ Ytank_stone, 3,
+ -1,
+ Ytank_stone, 4,
+ -1,
+ Ytank_stone, 5,
+ -1,
+ Ytank_stone, 6,
+ -1,
+ Ytank_spring, 0,
+ -1,
+ Ytank_spring, 1,
+ -1,
+ Ytank_spring, 2,
+ -1,
+ Ytank_spring, 3,
+ -1,
+ Ytank_spring, 4,
+ -1,
+ Ytank_spring, 5,
+ -1,
+ Ytank_spring, 6,
+ -1,
-Yandroid_n,7 ,
-Yandroid_ne,7 ,
-Yandroid_e,7 ,
-Yandroid_se,7 ,
-Yandroid_s,7 ,
-Yandroid_sw,7 ,
-Yandroid_w,7 ,
-Yandroid_nw,7 ,
-Xandroid,7 ,
-Xandroid_1_n,7 ,
-Xandroid_2_n,7 ,
-Xandroid_1_e,7 ,
-Xandroid_2_e,7 ,
-Xandroid_1_w,7 ,
-Xandroid_2_w,7 ,
-Xandroid_1_s,7 ,
-Xandroid_2_s,7 ,
--1,
-Xandroid,0 ,
-Xandroid_1_n,0 ,
-Xandroid_2_n,0 ,
-Xandroid_1_e,0 ,
-Xandroid_2_e,0 ,
-Xandroid_1_w,0 ,
-Xandroid_2_w,0 ,
-Xandroid_1_s,0 ,
-Xandroid_2_s,0 ,
--1,
-Xandroid,1 ,
-Xandroid_1_n,1 ,
-Xandroid_2_n,1 ,
-Xandroid_1_e,1 ,
-Xandroid_2_e,1 ,
-Xandroid_1_w,1 ,
-Xandroid_2_w,1 ,
-Xandroid_1_s,1 ,
-Xandroid_2_s,1 ,
--1,
-Xandroid,2 ,
-Xandroid_1_n,2 ,
-Xandroid_2_n,2 ,
-Xandroid_1_e,2 ,
-Xandroid_2_e,2 ,
-Xandroid_1_w,2 ,
-Xandroid_2_w,2 ,
-Xandroid_1_s,2 ,
-Xandroid_2_s,2 ,
--1,
-Xandroid,3 ,
-Xandroid_1_n,3 ,
-Xandroid_2_n,3 ,
-Xandroid_1_e,3 ,
-Xandroid_2_e,3 ,
-Xandroid_1_w,3 ,
-Xandroid_2_w,3 ,
-Xandroid_1_s,3 ,
-Xandroid_2_s,3 ,
--1,
-Xandroid,4 ,
-Xandroid_1_n,4 ,
-Xandroid_2_n,4 ,
-Xandroid_1_e,4 ,
-Xandroid_2_e,4 ,
-Xandroid_1_w,4 ,
-Xandroid_2_w,4 ,
-Xandroid_1_s,4 ,
-Xandroid_2_s,4 ,
--1,
-Xandroid,5 ,
-Xandroid_1_n,5 ,
-Xandroid_2_n,5 ,
-Xandroid_1_e,5 ,
-Xandroid_2_e,5 ,
-Xandroid_1_w,5 ,
-Xandroid_2_w,5 ,
-Xandroid_1_s,5 ,
-Xandroid_2_s,5 ,
--1,
-Xandroid,6 ,
-Xandroid_1_n,6 ,
-Xandroid_2_n,6 ,
-Xandroid_1_e,6 ,
-Xandroid_2_e,6 ,
-Xandroid_1_w,6 ,
-Xandroid_2_w,6 ,
-Xandroid_1_s,6 ,
-Xandroid_2_s,6 ,
--1,
-Yandroid_n,0 ,
-Yandroid_sB,6 ,
--1,
-Yandroid_nB,0 ,
-Yandroid_s,6 ,
--1,
-Yandroid_n,1 ,
-Yandroid_sB,5 ,
--1,
-Yandroid_nB,1 ,
-Yandroid_s,5 ,
--1,
-Yandroid_n,2 ,
-Yandroid_sB,4 ,
-Xboom_android,0 ,
--1,
-Yandroid_nB,2 ,
-Yandroid_s,4 ,
-Xboom_android,1 ,
--1,
-Yandroid_n,3 ,
-Yandroid_sB,3 ,
-Xboom_android,2 ,
--1,
-Yandroid_nB,3 ,
-Yandroid_s,3 ,
-Xboom_android,3 ,
--1,
-Yandroid_n,4 ,
-Yandroid_sB,2 ,
-Xboom_android,4 ,
--1,
-Yandroid_nB,4 ,
-Yandroid_s,2 ,
-Xboom_android,5 ,
--1,
-Yandroid_n,5 ,
-Yandroid_sB,1 ,
-Xboom_android,6 ,
--1,
-Yandroid_nB,5 ,
-Yandroid_s,1 ,
--1,
-Yandroid_n,6 ,
-Yandroid_sB,0 ,
--1,
-Yandroid_nB,6 ,
-Yandroid_s,0 ,
--1,
-Yandroid_eB,6 ,
-Yandroid_w,0 ,
--1,
-Yandroid_e,6 ,
-Yandroid_wB,0 ,
--1,
-Yandroid_eB,5 ,
-Yandroid_w,1 ,
--1,
-Yandroid_e,5 ,
-Yandroid_wB,1 ,
--1,
-Yandroid_eB,4 ,
-Yandroid_w,2 ,
--1,
-Yandroid_e,4 ,
-Yandroid_wB,2 ,
--1,
-Yandroid_eB,3 ,
-Yandroid_w,3 ,
--1,
-Yandroid_e,3 ,
-Yandroid_wB,3 ,
--1,
-Yandroid_eB,2 ,
-Yandroid_w,4 ,
--1,
-Yandroid_e,2 ,
-Yandroid_wB,4 ,
--1,
-Yandroid_eB,1 ,
-Yandroid_w,5 ,
--1,
-Yandroid_e,1 ,
-Yandroid_wB,5 ,
--1,
-Yandroid_eB,0 ,
-Yandroid_w,6 ,
--1,
-Yandroid_e,0 ,
-Yandroid_wB,6 ,
--1,
-Yandroid_neB,6 ,
-Yandroid_sw,0 ,
--1,
-Yandroid_ne,6 ,
-Yandroid_swB,0 ,
--1,
-Yandroid_neB,5 ,
-Yandroid_sw,1 ,
--1,
-Yandroid_ne,5 ,
-Yandroid_swB,1 ,
--1,
-Yandroid_neB,4 ,
-Yandroid_sw,2 ,
--1,
-Yandroid_ne,4 ,
-Yandroid_swB,2 ,
--1,
-Yandroid_neB,3 ,
-Yandroid_sw,3 ,
--1,
-Yandroid_ne,3 ,
-Yandroid_swB,3 ,
--1,
-Yandroid_neB,2 ,
-Yandroid_sw,4 ,
--1,
-Yandroid_ne,2 ,
-Yandroid_swB,4 ,
--1,
-Yandroid_neB,1 ,
-Yandroid_sw,5 ,
--1,
-Yandroid_ne,1 ,
-Yandroid_swB,5 ,
--1,
-Yandroid_neB,0 ,
-Yandroid_sw,6 ,
--1,
-Yandroid_ne,0 ,
-Yandroid_swB,6 ,
--1,
-Yandroid_nw,0 ,
-Yandroid_seB,6 ,
--1,
-Yandroid_nwB,0 ,
-Yandroid_se,6 ,
--1,
-Yandroid_nw,1 ,
-Yandroid_seB,5 ,
--1,
-Yandroid_nwB,1 ,
-Yandroid_se,5 ,
--1,
-Yandroid_nw,2 ,
-Yandroid_seB,4 ,
--1,
-Yandroid_nwB,2 ,
-Yandroid_se,4 ,
--1,
-Yandroid_nw,3 ,
-Yandroid_seB,3 ,
--1,
-Yandroid_nwB,3 ,
-Yandroid_se,3 ,
--1,
-Yandroid_nw,4 ,
-Yandroid_seB,2 ,
--1,
-Yandroid_nwB,4 ,
-Yandroid_se,2 ,
--1,
-Yandroid_nw,5 ,
-Yandroid_seB,1 ,
--1,
-Yandroid_nwB,5 ,
-Yandroid_se,1 ,
--1,
-Yandroid_nw,6 ,
-Yandroid_seB,0 ,
--1,
-Yandroid_nwB,6 ,
-Yandroid_se,0 ,
--1,
+ Yandroid_n, 7,
+ Yandroid_ne, 7,
+ Yandroid_e, 7,
+ Yandroid_se, 7,
+ Yandroid_s, 7,
+ Yandroid_sw, 7,
+ Yandroid_w, 7,
+ Yandroid_nw, 7,
+ Xandroid, 7,
+ Xandroid_1_n, 7,
+ Xandroid_2_n, 7,
+ Xandroid_1_e, 7,
+ Xandroid_2_e, 7,
+ Xandroid_1_w, 7,
+ Xandroid_2_w, 7,
+ Xandroid_1_s, 7,
+ Xandroid_2_s, 7,
+ -1,
+ Xandroid, 0,
+ Xandroid_1_n, 0,
+ Xandroid_2_n, 0,
+ Xandroid_1_e, 0,
+ Xandroid_2_e, 0,
+ Xandroid_1_w, 0,
+ Xandroid_2_w, 0,
+ Xandroid_1_s, 0,
+ Xandroid_2_s, 0,
+ -1,
+ Xandroid, 1,
+ Xandroid_1_n, 1,
+ Xandroid_2_n, 1,
+ Xandroid_1_e, 1,
+ Xandroid_2_e, 1,
+ Xandroid_1_w, 1,
+ Xandroid_2_w, 1,
+ Xandroid_1_s, 1,
+ Xandroid_2_s, 1,
+ -1,
+ Xandroid, 2,
+ Xandroid_1_n, 2,
+ Xandroid_2_n, 2,
+ Xandroid_1_e, 2,
+ Xandroid_2_e, 2,
+ Xandroid_1_w, 2,
+ Xandroid_2_w, 2,
+ Xandroid_1_s, 2,
+ Xandroid_2_s, 2,
+ -1,
+ Xandroid, 3,
+ Xandroid_1_n, 3,
+ Xandroid_2_n, 3,
+ Xandroid_1_e, 3,
+ Xandroid_2_e, 3,
+ Xandroid_1_w, 3,
+ Xandroid_2_w, 3,
+ Xandroid_1_s, 3,
+ Xandroid_2_s, 3,
+ -1,
+ Xandroid, 4,
+ Xandroid_1_n, 4,
+ Xandroid_2_n, 4,
+ Xandroid_1_e, 4,
+ Xandroid_2_e, 4,
+ Xandroid_1_w, 4,
+ Xandroid_2_w, 4,
+ Xandroid_1_s, 4,
+ Xandroid_2_s, 4,
+ -1,
+ Xandroid, 5,
+ Xandroid_1_n, 5,
+ Xandroid_2_n, 5,
+ Xandroid_1_e, 5,
+ Xandroid_2_e, 5,
+ Xandroid_1_w, 5,
+ Xandroid_2_w, 5,
+ Xandroid_1_s, 5,
+ Xandroid_2_s, 5,
+ -1,
+ Xandroid, 6,
+ Xandroid_1_n, 6,
+ Xandroid_2_n, 6,
+ Xandroid_1_e, 6,
+ Xandroid_2_e, 6,
+ Xandroid_1_w, 6,
+ Xandroid_2_w, 6,
+ Xandroid_1_s, 6,
+ Xandroid_2_s, 6,
+ -1,
+ Yandroid_n, 0,
+ Yandroid_sB, 6,
+ -1,
+ Yandroid_nB, 0,
+ Yandroid_s, 6,
+ -1,
+ Yandroid_n, 1,
+ Yandroid_sB, 5,
+ -1,
+ Yandroid_nB, 1,
+ Yandroid_s, 5,
+ -1,
+ Yandroid_n, 2,
+ Yandroid_sB, 4,
+ Xboom_android, 0,
+ -1,
+ Yandroid_nB, 2,
+ Yandroid_s, 4,
+ Xboom_android, 1,
+ -1,
+ Yandroid_n, 3,
+ Yandroid_sB, 3,
+ Xboom_android, 2,
+ -1,
+ Yandroid_nB, 3,
+ Yandroid_s, 3,
+ Xboom_android, 3,
+ -1,
+ Yandroid_n, 4,
+ Yandroid_sB, 2,
+ Xboom_android, 4,
+ -1,
+ Yandroid_nB, 4,
+ Yandroid_s, 2,
+ Xboom_android, 5,
+ -1,
+ Yandroid_n, 5,
+ Yandroid_sB, 1,
+ Xboom_android, 6,
+ -1,
+ Yandroid_nB, 5,
+ Yandroid_s, 1,
+ -1,
+ Yandroid_n, 6,
+ Yandroid_sB, 0,
+ -1,
+ Yandroid_nB, 6,
+ Yandroid_s, 0,
+ -1,
+ Yandroid_eB, 6,
+ Yandroid_w, 0,
+ -1,
+ Yandroid_e, 6,
+ Yandroid_wB, 0,
+ -1,
+ Yandroid_eB, 5,
+ Yandroid_w, 1,
+ -1,
+ Yandroid_e, 5,
+ Yandroid_wB, 1,
+ -1,
+ Yandroid_eB, 4,
+ Yandroid_w, 2,
+ -1,
+ Yandroid_e, 4,
+ Yandroid_wB, 2,
+ -1,
+ Yandroid_eB, 3,
+ Yandroid_w, 3,
+ -1,
+ Yandroid_e, 3,
+ Yandroid_wB, 3,
+ -1,
+ Yandroid_eB, 2,
+ Yandroid_w, 4,
+ -1,
+ Yandroid_e, 2,
+ Yandroid_wB, 4,
+ -1,
+ Yandroid_eB, 1,
+ Yandroid_w, 5,
+ -1,
+ Yandroid_e, 1,
+ Yandroid_wB, 5,
+ -1,
+ Yandroid_eB, 0,
+ Yandroid_w, 6,
+ -1,
+ Yandroid_e, 0,
+ Yandroid_wB, 6,
+ -1,
+ Yandroid_neB, 6,
+ Yandroid_sw, 0,
+ -1,
+ Yandroid_ne, 6,
+ Yandroid_swB, 0,
+ -1,
+ Yandroid_neB, 5,
+ Yandroid_sw, 1,
+ -1,
+ Yandroid_ne, 5,
+ Yandroid_swB, 1,
+ -1,
+ Yandroid_neB, 4,
+ Yandroid_sw, 2,
+ -1,
+ Yandroid_ne, 4,
+ Yandroid_swB, 2,
+ -1,
+ Yandroid_neB, 3,
+ Yandroid_sw, 3,
+ -1,
+ Yandroid_ne, 3,
+ Yandroid_swB, 3,
+ -1,
+ Yandroid_neB, 2,
+ Yandroid_sw, 4,
+ -1,
+ Yandroid_ne, 2,
+ Yandroid_swB, 4,
+ -1,
+ Yandroid_neB, 1,
+ Yandroid_sw, 5,
+ -1,
+ Yandroid_ne, 1,
+ Yandroid_swB, 5,
+ -1,
+ Yandroid_neB, 0,
+ Yandroid_sw, 6,
+ -1,
+ Yandroid_ne, 0,
+ Yandroid_swB, 6,
+ -1,
+ Yandroid_nw, 0,
+ Yandroid_seB, 6,
+ -1,
+ Yandroid_nwB, 0,
+ Yandroid_se, 6,
+ -1,
+ Yandroid_nw, 1,
+ Yandroid_seB, 5,
+ -1,
+ Yandroid_nwB, 1,
+ Yandroid_se, 5,
+ -1,
+ Yandroid_nw, 2,
+ Yandroid_seB, 4,
+ -1,
+ Yandroid_nwB, 2,
+ Yandroid_se, 4,
+ -1,
+ Yandroid_nw, 3,
+ Yandroid_seB, 3,
+ -1,
+ Yandroid_nwB, 3,
+ Yandroid_se, 3,
+ -1,
+ Yandroid_nw, 4,
+ Yandroid_seB, 2,
+ -1,
+ Yandroid_nwB, 4,
+ Yandroid_se, 2,
+ -1,
+ Yandroid_nw, 5,
+ Yandroid_seB, 1,
+ -1,
+ Yandroid_nwB, 5,
+ Yandroid_se, 1,
+ -1,
+ Yandroid_nw, 6,
+ Yandroid_seB, 0,
+ -1,
+ Yandroid_nwB, 6,
+ Yandroid_se, 0,
+ -1,
+
+ Yspring_e, 7,
+ Yspring_w, 7,
+ Yspring_kill_e, 7,
+ Yspring_kill_w, 7,
+ Yspring_s, 7,
+ Xspring, 0,
+ Xspring, 1,
+ Xspring, 2,
+ Xspring, 3,
+ Xspring, 4,
+ Xspring, 5,
+ Xspring, 6,
+ Xspring, 7,
+ Xspring_pause, 0,
+ Xspring_pause, 1,
+ Xspring_pause, 2,
+ Xspring_pause, 3,
+ Xspring_pause, 4,
+ Xspring_pause, 5,
+ Xspring_pause, 6,
+ Xspring_pause, 7,
+ Xspring_e, 0,
+ Xspring_e, 1,
+ Xspring_e, 2,
+ Xspring_e, 3,
+ Xspring_e, 4,
+ Xspring_e, 5,
+ Xspring_e, 6,
+ Xspring_e, 7,
+ Xspring_w, 0,
+ Xspring_w, 1,
+ Xspring_w, 2,
+ Xspring_w, 3,
+ Xspring_w, 4,
+ Xspring_w, 5,
+ Xspring_w, 6,
+ Xspring_w, 7,
+ Xspring_fall, 0,
+ Xspring_fall, 1,
+ Xspring_fall, 2,
+ Xspring_fall, 3,
+ Xspring_fall, 4,
+ Xspring_fall, 5,
+ Xspring_fall, 6,
+ Xspring_fall, 7,
-Yspring_e,7 ,
-Yspring_w,7 ,
-Yspring_kill_e,7 ,
-Yspring_kill_w,7 ,
-Yspring_s,7 ,
-Xspring,0 ,
-Xspring,1 ,
-Xspring,2 ,
-Xspring,3 ,
-Xspring,4 ,
-Xspring,5 ,
-Xspring,6 ,
-Xspring,7 ,
-Xspring_pause,0 ,
-Xspring_pause,1 ,
-Xspring_pause,2 ,
-Xspring_pause,3 ,
-Xspring_pause,4 ,
-Xspring_pause,5 ,
-Xspring_pause,6 ,
-Xspring_pause,7 ,
-Xspring_e,0 ,
-Xspring_e,1 ,
-Xspring_e,2 ,
-Xspring_e,3 ,
-Xspring_e,4 ,
-Xspring_e,5 ,
-Xspring_e,6 ,
-Xspring_e,7 ,
-Xspring_w,0 ,
-Xspring_w,1 ,
-Xspring_w,2 ,
-Xspring_w,3 ,
-Xspring_w,4 ,
-Xspring_w,5 ,
-Xspring_w,6 ,
-Xspring_w,7 ,
-Xspring_fall,0 ,
-Xspring_fall,1 ,
-Xspring_fall,2 ,
-Xspring_fall,3 ,
-Xspring_fall,4 ,
-Xspring_fall,5 ,
-Xspring_fall,6 ,
-Xspring_fall,7 ,
#ifdef BAD_ROLL
-Xspring_force_e,0 ,
-Xspring_force_e,1 ,
-Xspring_force_e,2 ,
-Xspring_force_e,3 ,
-Xspring_force_e,4 ,
-Xspring_force_e,5 ,
-Xspring_force_e,6 ,
-Xspring_force_e,7 ,
-Xspring_force_w,0 ,
-Xspring_force_w,1 ,
-Xspring_force_w,2 ,
-Xspring_force_w,3 ,
-Xspring_force_w,4 ,
-Xspring_force_w,5 ,
-Xspring_force_w,6 ,
-Xspring_force_w,7 ,
+ Xspring_force_e, 0,
+ Xspring_force_e, 1,
+ Xspring_force_e, 2,
+ Xspring_force_e, 3,
+ Xspring_force_e, 4,
+ Xspring_force_e, 5,
+ Xspring_force_e, 6,
+ Xspring_force_e, 7,
+ Xspring_force_w, 0,
+ Xspring_force_w, 1,
+ Xspring_force_w, 2,
+ Xspring_force_w, 3,
+ Xspring_force_w, 4,
+ Xspring_force_w, 5,
+ Xspring_force_w, 6,
+ Xspring_force_w, 7,
#endif
--1,
-Yspring_sB,6 ,
--1,
-Yspring_s,6 ,
--1,
-Yspring_sB,5 ,
--1,
-Yspring_s,5 ,
--1,
-Yspring_sB,4 ,
--1,
-Yspring_s,4 ,
--1,
-Yspring_sB,3 ,
--1,
-Yspring_s,3 ,
--1,
-Yspring_sB,2 ,
--1,
-Yspring_s,2 ,
--1,
-Yspring_sB,1 ,
--1,
-Yspring_s,1 ,
--1,
-Yspring_sB,0 ,
--1,
-Yspring_s,0 ,
--1,
-Yspring_eB,6 ,
-Yspring_w,0 ,
--1,
-Yspring_e,6 ,
-Yspring_wB,0 ,
--1,
-Yspring_eB,5 ,
-Yspring_w,1 ,
--1,
-Yspring_e,5 ,
-Yspring_wB,1 ,
--1,
-Yspring_eB,4 ,
-Yspring_w,2 ,
--1,
-Yspring_e,4 ,
-Yspring_wB,2 ,
--1,
-Yspring_eB,3 ,
-Yspring_w,3 ,
--1,
-Yspring_e,3 ,
-Yspring_wB,3 ,
--1,
-Yspring_eB,2 ,
-Yspring_w,4 ,
--1,
-Yspring_e,2 ,
-Yspring_wB,4 ,
--1,
-Yspring_eB,1 ,
-Yspring_w,5 ,
--1,
-Yspring_e,1 ,
-Yspring_wB,5 ,
--1,
-Yspring_eB,0 ,
-Yspring_w,6 ,
--1,
-Yspring_e,0 ,
-Yspring_wB,6 ,
--1,
-Yspring_kill_eB,6 ,
--1,
-Yspring_kill_e,6 ,
--1,
-Yspring_kill_eB,5 ,
--1,
-Yspring_kill_e,5 ,
--1,
-Yspring_kill_eB,4 ,
--1,
-Yspring_kill_e,4 ,
--1,
-Yspring_kill_eB,3 ,
--1,
-Yspring_kill_e,3 ,
--1,
-Yspring_kill_eB,2 ,
--1,
-Yspring_kill_e,2 ,
--1,
-Yspring_kill_eB,1 ,
--1,
-Yspring_kill_e,1 ,
--1,
-Yspring_kill_eB,0 ,
--1,
-Yspring_kill_e,0 ,
--1,
-Yspring_kill_w,0 ,
--1,
-Yspring_kill_wB,0 ,
--1,
-Yspring_kill_w,1 ,
--1,
-Yspring_kill_wB,1 ,
--1,
-Yspring_kill_w,2 ,
--1,
-Yspring_kill_wB,2 ,
--1,
-Yspring_kill_w,3 ,
--1,
-Yspring_kill_wB,3 ,
--1,
-Yspring_kill_w,4 ,
--1,
-Yspring_kill_wB,4 ,
--1,
-Yspring_kill_w,5 ,
--1,
-Yspring_kill_wB,5 ,
--1,
-Yspring_kill_w,6 ,
--1,
-Yspring_kill_wB,6 ,
--1,
-
-Xeater_n,0 ,
-Xeater_e,0 ,
-Xeater_w,0 ,
-Xeater_s,0 ,
-Xeater_n,7 ,
-Xeater_e,7 ,
-Xeater_s,7 ,
-Xeater_w,7 ,
-Yeater_n,7 ,
-Yeater_e,7 ,
-Yeater_s,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,
-Yeater_eB,2 ,
-Yeater_w,4 ,
--1,
-Yeater_e,2 ,
-Yeater_wB,4 ,
--1,
-Yeater_eB,1 ,
-Yeater_w,5 ,
--1,
-Yeater_e,1 ,
-Yeater_wB,5 ,
--1,
-Yeater_eB,0 ,
-Yeater_w,6 ,
--1,
-Yeater_e,0 ,
-Yeater_wB,6 ,
--1,
-Yeater_stone,0 ,
--1,
-Yeater_stone,1 ,
--1,
-Yeater_stone,2 ,
--1,
-Yeater_stone,3 ,
--1,
-Yeater_stone,4 ,
--1,
-Yeater_stone,5 ,
--1,
-Yeater_stone,6 ,
--1,
-Yeater_spring,0 ,
--1,
-Yeater_spring,1 ,
--1,
-Yeater_spring,2 ,
--1,
-Yeater_spring,3 ,
--1,
-Yeater_spring,4 ,
--1,
-Yeater_spring,5 ,
--1,
-Yeater_spring,6 ,
--1,
-Xalien,0 ,
-Xalien_pause,0 ,
-Xalien,7 ,
-Xalien_pause,7 ,
-Yalien_n,7 ,
-Yalien_e,7 ,
-Yalien_s,7 ,
-Yalien_w,7 ,
--1,
-Xalien,1 ,
-Xalien_pause,1 ,
-Xalien,6 ,
-Xalien_pause,6 ,
--1,
-Xalien,2 ,
-Xalien_pause,2 ,
-Xalien,5 ,
-Xalien_pause,5 ,
--1,
-Xalien,3 ,
-Xalien_pause,3 ,
-Xalien,4 ,
-Xalien_pause,4 ,
--1,
-Yalien_n,0 ,
-Yalien_sB,6 ,
--1,
-Yalien_nB,0 ,
-Yalien_s,6 ,
--1,
-Yalien_n,1 ,
-Yalien_sB,5 ,
--1,
-Yalien_nB,1 ,
-Yalien_s,5 ,
--1,
-Yalien_n,2 ,
-Yalien_sB,4 ,
--1,
-Yalien_nB,2 ,
-Yalien_s,4 ,
--1,
-Yalien_n,3 ,
-Yalien_sB,3 ,
--1,
-Yalien_nB,3 ,
-Yalien_s,3 ,
--1,
-Yalien_n,4 ,
-Yalien_sB,2 ,
--1,
-Yalien_nB,4 ,
-Yalien_s,2 ,
--1,
-Yalien_n,5 ,
-Yalien_sB,1 ,
--1,
-Yalien_nB,5 ,
-Yalien_s,1 ,
--1,
-Yalien_n,6 ,
-Yalien_sB,0 ,
--1,
-Yalien_nB,6 ,
-Yalien_s,0 ,
--1,
-Yalien_eB,6 ,
-Yalien_w,0 ,
--1,
-Yalien_e,6 ,
-Yalien_wB,0 ,
--1,
-Yalien_eB,5 ,
-Yalien_w,1 ,
--1,
-Yalien_e,5 ,
-Yalien_wB,1 ,
--1,
-Yalien_eB,4 ,
-Yalien_w,2 ,
--1,
-Yalien_e,4 ,
-Yalien_wB,2 ,
--1,
-Yalien_eB,3 ,
-Yalien_w,3 ,
--1,
-Yalien_e,3 ,
-Yalien_wB,3 ,
--1,
-Yalien_eB,2 ,
-Yalien_w,4 ,
--1,
-Yalien_e,2 ,
-Yalien_wB,4 ,
--1,
-Yalien_eB,1 ,
-Yalien_w,5 ,
--1,
-Yalien_e,1 ,
-Yalien_wB,5 ,
--1,
-Yalien_eB,0 ,
-Yalien_w,6 ,
--1,
-Yalien_e,0 ,
-Yalien_wB,6 ,
--1,
-Yalien_stone,0 ,
--1,
-Yalien_stone,1 ,
--1,
-Yalien_stone,2 ,
--1,
-Yalien_stone,3 ,
--1,
-Yalien_stone,4 ,
--1,
-Yalien_stone,5 ,
--1,
-Yalien_stone,6 ,
--1,
-Yalien_spring,0 ,
--1,
-Yalien_spring,1 ,
--1,
-Yalien_spring,2 ,
--1,
-Yalien_spring,3 ,
--1,
-Yalien_spring,4 ,
--1,
-Yalien_spring,5 ,
--1,
-Yalien_spring,6 ,
--1,
+ -1,
+ Yspring_sB, 6,
+ -1,
+ Yspring_s, 6,
+ -1,
+ Yspring_sB, 5,
+ -1,
+ Yspring_s, 5,
+ -1,
+ Yspring_sB, 4,
+ -1,
+ Yspring_s, 4,
+ -1,
+ Yspring_sB, 3,
+ -1,
+ Yspring_s, 3,
+ -1,
+ Yspring_sB, 2,
+ -1,
+ Yspring_s, 2,
+ -1,
+ Yspring_sB, 1,
+ -1,
+ Yspring_s, 1,
+ -1,
+ Yspring_sB, 0,
+ -1,
+ Yspring_s, 0,
+ -1,
+ Yspring_eB, 6,
+ Yspring_w, 0,
+ -1,
+ Yspring_e, 6,
+ Yspring_wB, 0,
+ -1,
+ Yspring_eB, 5,
+ Yspring_w, 1,
+ -1,
+ Yspring_e, 5,
+ Yspring_wB, 1,
+ -1,
+ Yspring_eB, 4,
+ Yspring_w, 2,
+ -1,
+ Yspring_e, 4,
+ Yspring_wB, 2,
+ -1,
+ Yspring_eB, 3,
+ Yspring_w, 3,
+ -1,
+ Yspring_e, 3,
+ Yspring_wB, 3,
+ -1,
+ Yspring_eB, 2,
+ Yspring_w, 4,
+ -1,
+ Yspring_e, 2,
+ Yspring_wB, 4,
+ -1,
+ Yspring_eB, 1,
+ Yspring_w, 5,
+ -1,
+ Yspring_e, 1,
+ Yspring_wB, 5,
+ -1,
+ Yspring_eB, 0,
+ Yspring_w, 6,
+ -1,
+ Yspring_e, 0,
+ Yspring_wB, 6,
+ -1,
+ Yspring_kill_eB, 6,
+ -1,
+ Yspring_kill_e, 6,
+ -1,
+ Yspring_kill_eB, 5,
+ -1,
+ Yspring_kill_e, 5,
+ -1,
+ Yspring_kill_eB, 4,
+ -1,
+ Yspring_kill_e, 4,
+ -1,
+ Yspring_kill_eB, 3,
+ -1,
+ Yspring_kill_e, 3,
+ -1,
+ Yspring_kill_eB, 2,
+ -1,
+ Yspring_kill_e, 2,
+ -1,
+ Yspring_kill_eB, 1,
+ -1,
+ Yspring_kill_e, 1,
+ -1,
+ Yspring_kill_eB, 0,
+ -1,
+ Yspring_kill_e, 0,
+ -1,
+ Yspring_kill_w, 0,
+ -1,
+ Yspring_kill_wB, 0,
+ -1,
+ Yspring_kill_w, 1,
+ -1,
+ Yspring_kill_wB, 1,
+ -1,
+ Yspring_kill_w, 2,
+ -1,
+ Yspring_kill_wB, 2,
+ -1,
+ Yspring_kill_w, 3,
+ -1,
+ Yspring_kill_wB, 3,
+ -1,
+ Yspring_kill_w, 4,
+ -1,
+ Yspring_kill_wB, 4,
+ -1,
+ Yspring_kill_w, 5,
+ -1,
+ Yspring_kill_wB, 5,
+ -1,
+ Yspring_kill_w, 6,
+ -1,
+ Yspring_kill_wB, 6,
+ -1,
-Xemerald,0 ,
-Xemerald,1 ,
-Xemerald,2 ,
-Xemerald,3 ,
-Xemerald,4 ,
-Xemerald,5 ,
-Xemerald,6 ,
-Xemerald,7 ,
-Xemerald_pause,0 ,
-Xemerald_pause,1 ,
-Xemerald_pause,2 ,
-Xemerald_pause,3 ,
-Xemerald_pause,4 ,
-Xemerald_pause,5 ,
-Xemerald_pause,6 ,
-Xemerald_pause,7 ,
-Xemerald_fall,0 ,
-Xemerald_fall,1 ,
-Xemerald_fall,2 ,
-Xemerald_fall,3 ,
-Xemerald_fall,4 ,
-Xemerald_fall,5 ,
-Xemerald_fall,6 ,
-Xemerald_fall,7 ,
-#ifdef BAD_ROLL
-Xemerald_force_e,0 ,
-Xemerald_force_e,1 ,
-Xemerald_force_e,2 ,
-Xemerald_force_e,3 ,
-Xemerald_force_e,4 ,
-Xemerald_force_e,5 ,
-Xemerald_force_e,6 ,
-Xemerald_force_e,7 ,
-Xemerald_force_w,0 ,
-Xemerald_force_w,1 ,
-Xemerald_force_w,2 ,
-Xemerald_force_w,3 ,
-Xemerald_force_w,4 ,
-Xemerald_force_w,5 ,
-Xemerald_force_w,6 ,
-Xemerald_force_w,7 ,
-#endif
-Xemerald_shine,0 ,
-Xemerald_shine,7 ,
-Yemerald_stone,7 ,
-Yemerald_s,7 ,
-Yemerald_e,7 ,
-Yemerald_w,7 ,
--1,
-Xemerald_shine,1 ,
-Xemerald_shine,6 ,
--1,
-Xemerald_shine,2 ,
-Xemerald_shine,5 ,
--1,
-Xemerald_shine,3 ,
-Xemerald_shine,4 ,
--1,
-Yemerald_sB,6 ,
--1,
-Yemerald_s,6 ,
--1,
-Yemerald_sB,5 ,
--1,
-Yemerald_s,5 ,
--1,
-Yemerald_sB,4 ,
--1,
-Yemerald_s,4 ,
--1,
-Yemerald_sB,3 ,
--1,
-Yemerald_s,3 ,
--1,
-Yemerald_sB,2 ,
--1,
-Yemerald_s,2 ,
--1,
-Yemerald_sB,1 ,
--1,
-Yemerald_s,1 ,
--1,
-Yemerald_sB,0 ,
--1,
-Yemerald_s,0 ,
--1,
-Yemerald_eB,6 ,
-Yemerald_w,0 ,
--1,
-Yemerald_e,6 ,
-Yemerald_wB,0 ,
--1,
-Yemerald_eB,5 ,
-Yemerald_w,1 ,
--1,
-Yemerald_e,5 ,
-Yemerald_wB,1 ,
--1,
-Yemerald_eB,4 ,
-Yemerald_w,2 ,
--1,
-Yemerald_e,4 ,
-Yemerald_wB,2 ,
--1,
-Yemerald_eB,3 ,
-Yemerald_w,3 ,
--1,
-Yemerald_e,3 ,
-Yemerald_wB,3 ,
--1,
-Yemerald_eB,2 ,
-Yemerald_w,4 ,
--1,
-Yemerald_e,2 ,
-Yemerald_wB,4 ,
--1,
-Yemerald_eB,1 ,
-Yemerald_w,5 ,
--1,
-Yemerald_e,1 ,
-Yemerald_wB,5 ,
--1,
-Yemerald_eB,0 ,
-Yemerald_w,6 ,
--1,
-Yemerald_e,0 ,
-Yemerald_wB,6 ,
--1,
-Yemerald_eat,6 ,
--1,
-Yemerald_eat,5 ,
--1,
-Yemerald_eat,4 ,
--1,
-Yemerald_eat,3 ,
--1,
-Yemerald_eat,2 ,
--1,
-Yemerald_eat,1 ,
--1,
-Yemerald_eat,0 ,
--1,
-Yemerald_stone,0 ,
--1,
-Yemerald_stone,1 ,
--1,
-Yemerald_stone,2 ,
--1,
-Yemerald_stone,3 ,
--1,
-Yemerald_stone,4 ,
--1,
-Yemerald_stone,5 ,
--1,
-Yemerald_stone,6 ,
--1,
+ Xeater_n, 0,
+ Xeater_e, 0,
+ Xeater_w, 0,
+ Xeater_s, 0,
+ Xeater_n, 7,
+ Xeater_e, 7,
+ Xeater_s, 7,
+ Xeater_w, 7,
+ Yeater_n, 7,
+ Yeater_e, 7,
+ Yeater_s, 7,
+ Yeater_w, 7,
+ -1,
+ Xeater_n, 1,
+ Xeater_e, 1,
+ Xeater_w, 1,
+ Xeater_s, 1,
+ Xeater_n, 6,
+ Xeater_e, 6,
+ Xeater_w, 6,
+ Xeater_s, 6,
+ -1,
+ Xeater_n, 2,
+ Xeater_e, 2,
+ Xeater_w, 2,
+ Xeater_s, 2,
+ Xeater_n, 5,
+ Xeater_e, 5,
+ Xeater_w, 5,
+ Xeater_s, 5,
+ -1,
+ Xeater_n, 3,
+ Xeater_e, 3,
+ Xeater_w, 3,
+ Xeater_s, 3,
+ Xeater_n, 4,
+ Xeater_e, 4,
+ Xeater_w, 4,
+ Xeater_s, 4,
+ -1,
+ Yeater_n, 0,
+ Yeater_sB, 6,
+ -1,
+ Yeater_nB, 0,
+ Yeater_s, 6,
+ -1,
+ Yeater_n, 1,
+ Yeater_sB, 5,
+ -1,
+ Yeater_nB, 1,
+ Yeater_s, 5,
+ -1,
+ Yeater_n, 2,
+ Yeater_sB, 4,
+ -1,
+ Yeater_nB, 2,
+ Yeater_s, 4,
+ -1,
+ Yeater_n, 3,
+ Yeater_sB, 3,
+ -1,
+ Yeater_nB, 3,
+ Yeater_s, 3,
+ -1,
+ Yeater_n, 4,
+ Yeater_sB, 2,
+ -1,
+ Yeater_nB, 4,
+ Yeater_s, 2,
+ -1,
+ Yeater_n, 5,
+ Yeater_sB, 1,
+ -1,
+ Yeater_nB, 5,
+ Yeater_s, 1,
+ -1,
+ Yeater_n, 6,
+ Yeater_sB, 0,
+ -1,
+ Yeater_nB, 6,
+ Yeater_s, 0,
+ -1,
+ Yeater_eB, 6,
+ Yeater_w, 0,
+ -1,
+ Yeater_e, 6,
+ Yeater_wB, 0,
+ -1,
+ Yeater_eB, 5,
+ Yeater_w, 1,
+ -1,
+ Yeater_e, 5,
+ Yeater_wB, 1,
+ -1,
+ Yeater_eB, 4,
+ Yeater_w, 2,
+ -1,
+ Yeater_e, 4,
+ Yeater_wB, 2,
+ -1,
+ Yeater_eB, 3,
+ Yeater_w, 3,
+ -1,
+ Yeater_e, 3,
+ Yeater_wB, 3,
+ -1,
+ Yeater_eB, 2,
+ Yeater_w, 4,
+ -1,
+ Yeater_e, 2,
+ Yeater_wB, 4,
+ -1,
+ Yeater_eB, 1,
+ Yeater_w, 5,
+ -1,
+ Yeater_e, 1,
+ Yeater_wB, 5,
+ -1,
+ Yeater_eB, 0,
+ Yeater_w, 6,
+ -1,
+ Yeater_e, 0,
+ Yeater_wB, 6,
+ -1,
+ Yeater_stone, 0,
+ -1,
+ Yeater_stone, 1,
+ -1,
+ Yeater_stone, 2,
+ -1,
+ Yeater_stone, 3,
+ -1,
+ Yeater_stone, 4,
+ -1,
+ Yeater_stone, 5,
+ -1,
+ Yeater_stone, 6,
+ -1,
+ Yeater_spring, 0,
+ -1,
+ Yeater_spring, 1,
+ -1,
+ Yeater_spring, 2,
+ -1,
+ Yeater_spring, 3,
+ -1,
+ Yeater_spring, 4,
+ -1,
+ Yeater_spring, 5,
+ -1,
+ Yeater_spring, 6,
+ -1,
-Xdiamond,0 ,
-Xdiamond,1 ,
-Xdiamond,2 ,
-Xdiamond,3 ,
-Xdiamond,4 ,
-Xdiamond,5 ,
-Xdiamond,6 ,
-Xdiamond,7 ,
-Xdiamond_pause,0 ,
-Xdiamond_pause,1 ,
-Xdiamond_pause,2 ,
-Xdiamond_pause,3 ,
-Xdiamond_pause,4 ,
-Xdiamond_pause,5 ,
-Xdiamond_pause,6 ,
-Xdiamond_pause,7 ,
-Xdiamond_fall,0 ,
-Xdiamond_fall,1 ,
-Xdiamond_fall,2 ,
-Xdiamond_fall,3 ,
-Xdiamond_fall,4 ,
-Xdiamond_fall,5 ,
-Xdiamond_fall,6 ,
-Xdiamond_fall,7 ,
-#ifdef BAD_ROLL
-Xdiamond_force_e,0 ,
-Xdiamond_force_e,1 ,
-Xdiamond_force_e,2 ,
-Xdiamond_force_e,3 ,
-Xdiamond_force_e,4 ,
-Xdiamond_force_e,5 ,
-Xdiamond_force_e,6 ,
-Xdiamond_force_e,7 ,
-Xdiamond_force_w,0 ,
-Xdiamond_force_w,1 ,
-Xdiamond_force_w,2 ,
-Xdiamond_force_w,3 ,
-Xdiamond_force_w,4 ,
-Xdiamond_force_w,5 ,
-Xdiamond_force_w,6 ,
-Xdiamond_force_w,7 ,
-#endif
-Xdiamond_shine,0 ,
-Xdiamond_shine,7 ,
-Ydiamond_s,7 ,
-Ydiamond_e,7 ,
-Ydiamond_w,7 ,
--1,
-Xdiamond_shine,1 ,
-Xdiamond_shine,6 ,
--1,
-Xdiamond_shine,2 ,
-Xdiamond_shine,5 ,
--1,
-Xdiamond_shine,3 ,
-Xdiamond_shine,4 ,
--1,
-Ydiamond_sB,6 ,
--1,
-Ydiamond_s,6 ,
--1,
-Ydiamond_sB,5 ,
--1,
-Ydiamond_s,5 ,
--1,
-Ydiamond_sB,4 ,
--1,
-Ydiamond_s,4 ,
--1,
-Ydiamond_sB,3 ,
--1,
-Ydiamond_s,3 ,
--1,
-Ydiamond_sB,2 ,
--1,
-Ydiamond_s,2 ,
--1,
-Ydiamond_sB,1 ,
--1,
-Ydiamond_s,1 ,
--1,
-Ydiamond_sB,0 ,
--1,
-Ydiamond_s,0 ,
--1,
-Ydiamond_eB,6 ,
-Ydiamond_w,0 ,
--1,
-Ydiamond_e,6 ,
-Ydiamond_wB,0 ,
--1,
-Ydiamond_eB,5 ,
-Ydiamond_w,1 ,
--1,
-Ydiamond_e,5 ,
-Ydiamond_wB,1 ,
--1,
-Ydiamond_eB,4 ,
-Ydiamond_w,2 ,
--1,
-Ydiamond_e,4 ,
-Ydiamond_wB,2 ,
--1,
-Ydiamond_eB,3 ,
-Ydiamond_w,3 ,
--1,
-Ydiamond_e,3 ,
-Ydiamond_wB,3 ,
--1,
-Ydiamond_eB,2 ,
-Ydiamond_w,4 ,
--1,
-Ydiamond_e,2 ,
-Ydiamond_wB,4 ,
--1,
-Ydiamond_eB,1 ,
-Ydiamond_w,5 ,
--1,
-Ydiamond_e,1 ,
-Ydiamond_wB,5 ,
--1,
-Ydiamond_eB,0 ,
-Ydiamond_w,6 ,
--1,
-Ydiamond_e,0 ,
-Ydiamond_wB,6 ,
--1,
-Ydiamond_eat,6 ,
--1,
-Ydiamond_eat,5 ,
--1,
-Ydiamond_eat,4 ,
--1,
-Ydiamond_eat,3 ,
--1,
-Ydiamond_eat,2 ,
--1,
-Ydiamond_eat,1 ,
--1,
-Ydiamond_eat,0 ,
--1,
-Ydiamond_stone,0 ,
--1,
-Ydiamond_stone,1 ,
--1,
-Ydiamond_stone,2 ,
--1,
-Ydiamond_stone,3 ,
--1,
-Ydiamond_stone,4 ,
--1,
-Ydiamond_stone,5 ,
--1,
-Ydiamond_stone,6 ,
--1,
+ Xalien, 0,
+ Xalien_pause, 0,
+ Xalien, 7,
+ Xalien_pause, 7,
+ Yalien_n, 7,
+ Yalien_e, 7,
+ Yalien_s, 7,
+ Yalien_w, 7,
+ -1,
+ Xalien, 1,
+ Xalien_pause, 1,
+ Xalien, 6,
+ Xalien_pause, 6,
+ -1,
+ Xalien, 2,
+ Xalien_pause, 2,
+ Xalien, 5,
+ Xalien_pause, 5,
+ -1,
+ Xalien, 3,
+ Xalien_pause, 3,
+ Xalien, 4,
+ Xalien_pause, 4,
+ -1,
+ Yalien_n, 0,
+ Yalien_sB, 6,
+ -1,
+ Yalien_nB, 0,
+ Yalien_s, 6,
+ -1,
+ Yalien_n, 1,
+ Yalien_sB, 5,
+ -1,
+ Yalien_nB, 1,
+ Yalien_s, 5,
+ -1,
+ Yalien_n, 2,
+ Yalien_sB, 4,
+ -1,
+ Yalien_nB, 2,
+ Yalien_s, 4,
+ -1,
+ Yalien_n, 3,
+ Yalien_sB, 3,
+ -1,
+ Yalien_nB, 3,
+ Yalien_s, 3,
+ -1,
+ Yalien_n, 4,
+ Yalien_sB, 2,
+ -1,
+ Yalien_nB, 4,
+ Yalien_s, 2,
+ -1,
+ Yalien_n, 5,
+ Yalien_sB, 1,
+ -1,
+ Yalien_nB, 5,
+ Yalien_s, 1,
+ -1,
+ Yalien_n, 6,
+ Yalien_sB, 0,
+ -1,
+ Yalien_nB, 6,
+ Yalien_s, 0,
+ -1,
+ Yalien_eB, 6,
+ Yalien_w, 0,
+ -1,
+ Yalien_e, 6,
+ Yalien_wB, 0,
+ -1,
+ Yalien_eB, 5,
+ Yalien_w, 1,
+ -1,
+ Yalien_e, 5,
+ Yalien_wB, 1,
+ -1,
+ Yalien_eB, 4,
+ Yalien_w, 2,
+ -1,
+ Yalien_e, 4,
+ Yalien_wB, 2,
+ -1,
+ Yalien_eB, 3,
+ Yalien_w, 3,
+ -1,
+ Yalien_e, 3,
+ Yalien_wB, 3,
+ -1,
+ Yalien_eB, 2,
+ Yalien_w, 4,
+ -1,
+ Yalien_e, 2,
+ Yalien_wB, 4,
+ -1,
+ Yalien_eB, 1,
+ Yalien_w, 5,
+ -1,
+ Yalien_e, 1,
+ Yalien_wB, 5,
+ -1,
+ Yalien_eB, 0,
+ Yalien_w, 6,
+ -1,
+ Yalien_e, 0,
+ Yalien_wB, 6,
+ -1,
+ Yalien_stone, 0,
+ -1,
+ Yalien_stone, 1,
+ -1,
+ Yalien_stone, 2,
+ -1,
+ Yalien_stone, 3,
+ -1,
+ Yalien_stone, 4,
+ -1,
+ Yalien_stone, 5,
+ -1,
+ Yalien_stone, 6,
+ -1,
+ Yalien_spring, 0,
+ -1,
+ Yalien_spring, 1,
+ -1,
+ Yalien_spring, 2,
+ -1,
+ Yalien_spring, 3,
+ -1,
+ Yalien_spring, 4,
+ -1,
+ Yalien_spring, 5,
+ -1,
+ Yalien_spring, 6,
+ -1,
-Xdrip_fall,0 ,
-Xdrip_fall,1 ,
-Xdrip_fall,2 ,
-Xdrip_fall,3 ,
-Xdrip_fall,4 ,
-Xdrip_fall,5 ,
-Xdrip_fall,6 ,
-Xdrip_fall,7 ,
-Xdrip_eat,7 ,
-Ydrip_s2,7 ,
--1,
-Ydrip_s2B,6 ,
--1,
-Ydrip_s2,6 ,
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erald, 6,
+ Xemerald, 7,
+ Xemerald_pause, 0,
+ Xemerald_pause, 1,
+ Xemerald_pause, 2,
+ Xemerald_pause, 3,
+ Xemerald_pause, 4,
+ Xemerald_pause, 5,
+ Xemerald_pause, 6,
+ Xemerald_pause, 7,
+ Xemerald_fall, 0,
+ Xemerald_fall, 1,
+ Xemerald_fall, 2,
+ Xemerald_fall, 3,
+ Xemerald_fall, 4,
+ Xemerald_fall, 5,
+ Xemerald_fall, 6,
+ Xemerald_fall, 7,
-Xbomb,0 ,
-Xbomb,1 ,
-Xbomb,2 ,
-Xbomb,3 ,
-Xbomb,4 ,
-Xbomb,5 ,
-Xbomb,6 ,
-Xbomb,7 ,
-Xbomb_pause,0 ,
-Xbomb_pause,1 ,
-Xbomb_pause,2 ,
-Xbomb_pause,3 ,
-Xbomb_pause,4 ,
-Xbomb_pause,5 ,
-Xbomb_pause,6 ,
-Xbomb_pause,7 ,
-Xbomb_fall,0 ,
-Xbomb_fall,1 ,
-Xbomb_fall,2 ,
-Xbomb_fall,3 ,
-Xbomb_fall,4 ,
-Xbomb_fall,5 ,
-Xbomb_fall,6 ,
-Xbomb_fall,7 ,
#ifdef BAD_ROLL
-Xbomb_force_e,0 ,
-Xbomb_force_e,1 ,
-Xbomb_force_e,2 ,
-Xbomb_force_e,3 ,
-Xbomb_force_e,4 ,
-Xbomb_force_e,5 ,
-Xbomb_force_e,6 ,
-Xbomb_force_e,7 ,
-Xbomb_force_w,0 ,
-Xbomb_force_w,1 ,
-Xbomb_force_w,2 ,
-Xbomb_force_w,3 ,
-Xbomb_force_w,4 ,
-Xbomb_force_w,5 ,
-Xbomb_force_w,6 ,
-Xbomb_force_w,7 ,
+ Xemerald_force_e, 0,
+ Xemerald_force_e, 1,
+ Xemerald_force_e, 2,
+ Xemerald_force_e, 3,
+ Xemerald_force_e, 4,
+ Xemerald_force_e, 5,
+ Xemerald_force_e, 6,
+ Xemerald_force_e, 7,
+ Xemerald_force_w, 0,
+ Xemerald_force_w, 1,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e,7 ,
-Yballoon_s,7 ,
-Yballoon_w,7 ,
-Xballoon,0 ,
-Xballoon,1 ,
-Xballoon,2 ,
-Xballoon,3 ,
-Xballoon,4 ,
-Xballoon,5 ,
-Xballoon,6 ,
-Xballoon,7 ,
--1,
-Yballoon_n,0 ,
-Yballoon_sB,6 ,
--1,
-Yballoon_nB,0 ,
-Yballoon_s,6 ,
--1,
-Yballoon_n,1 ,
-Yballoon_sB,5 ,
--1,
-Yballoon_nB,1 ,
-Yballoon_s,5 ,
--1,
-Yballoon_n,2 ,
-Yballoon_sB,4 ,
--1,
-Yballoon_nB,2 ,
-Yballoon_s,4 ,
--1,
-Yballoon_n,3 ,
-Yballoon_sB,3 ,
--1,
-Yballoon_nB,3 ,
-Yballoon_s,3 ,
--1,
-Yballoon_n,4 ,
-Yballoon_sB,2 ,
--1,
-Yballoon_nB,4 ,
-Yballoon_s,2 ,
--1,
-Yballoon_n,5 ,
-Yballoon_sB,1 ,
--1,
-Yballoon_nB,5 ,
-Yballoon_s,1 ,
--1,
-Yballoon_n,6 ,
-Yballoon_sB,0 ,
--1,
-Yballoon_nB,6 ,
-Yballoon_s,0 ,
--1,
-Yballoon_eB,6 ,
-Yballoon_w,0 ,
--1,
-Yballoon_e,6 ,
-Yballoon_wB,0 ,
--1,
-Yballoon_eB,5 ,
-Yballoon_w,1 ,
--1,
-Yballoon_e,5 ,
-Yballoon_wB,1 ,
--1,
-Yballoon_eB,4 ,
-Yballoon_w,2 ,
--1,
-Yballoon_e,4 ,
-Yballoon_wB,2 ,
--1,
-Yballoon_eB,3 ,
-Yballoon_w,3 ,
--1,
-Yballoon_e,3 ,
-Yballoon_wB,3 ,
--1,
-Yballoon_eB,2 ,
-Yballoon_w,4 ,
--1,
-Yballoon_e,2 ,
-Yballoon_wB,4 ,
--1,
-Yballoon_eB,1 ,
-Yballoon_w,5 ,
--1,
-Yballoon_e,1 ,
-Yballoon_wB,5 ,
--1,
-Yballoon_eB,0 ,
-Yballoon_w,6 ,
--1,
-Yballoon_e,0 ,
-Yballoon_wB,6 ,
--1,
-Xgrass,0 ,
-Xgrass,1 ,
-Xgrass,2 ,
-Xgrass,3 ,
-Xgrass,4 ,
-Xgrass,5 ,
-Xgrass,6 ,
-Xgrass,7 ,
-Xfake_grass,0 ,
-Xfake_grass,1 ,
-Xfake_grass,2 ,
-Xfake_grass,3 ,
-Xfake_grass,4 ,
-Xfake_grass,5 ,
-Xfake_grass,6 ,
-Xfake_grass,7 ,
--1,
-Ygrass_nB,6 ,
--1,
-Ygrass_nB,5 ,
--1,
-Ygrass_nB,4 ,
--1,
-Ygrass_nB,3 ,
--1,
-Ygrass_nB,2 ,
--1,
-Ygrass_nB,1 ,
--1,
-Ygrass_nB,0 ,
--1,
-Ygrass_eB,6 ,
--1,
-Ygrass_eB,5 ,
--1,
-Ygrass_eB,4 ,
--1,
-Ygrass_eB,3 ,
--1,
-Ygrass_eB,2 ,
--1,
-Ygrass_eB,1 ,
--1,
-Ygrass_eB,0 ,
--1,
-Ygrass_sB,6 ,
--1,
-Ygrass_sB,5 ,
--1,
-Ygrass_sB,4 ,
--1,
-Ygrass_sB,3 ,
--1,
-Ygrass_sB,2 ,
--1,
-Ygrass_sB,1 ,
--1,
-Ygrass_sB,0 ,
--1,
-Ygrass_wB,6 ,
--1,
-Ygrass_wB,5 ,
--1,
-Ygrass_wB,4 ,
--1,
-Ygrass_wB,3 ,
--1,
-Ygrass_wB,2 ,
--1,
-Ygrass_wB,1 ,
--1,
-Ygrass_wB,0 ,
--1,
+ Xemerald_shine, 0,
+ Xemerald_shine, 7,
+ Yemerald_stone, 7,
+ Yemerald_s, 7,
+ Yemerald_e, 7,
+ Yemerald_w, 7,
+ -1,
+ Xemerald_shine, 1,
+ Xemerald_shine, 6,
+ -1,
+ Xemerald_shine, 2,
+ Xemerald_shine, 5,
+ -1,
+ Xemerald_shine, 3,
+ Xemerald_shine, 4,
+ -1,
+ Yemerald_sB, 6,
+ -1,
+ Yemerald_s, 6,
+ -1,
+ Yemerald_sB, 5,
+ -1,
+ Yemerald_s, 5,
+ -1,
+ Yemerald_sB, 4,
+ -1,
+ Yemerald_s, 4,
+ -1,
+ Yemerald_sB, 3,
+ -1,
+ Yemerald_s, 3,
+ -1,
+ Yemerald_sB, 2,
+ -1,
+ Yemerald_s, 2,
+ -1,
+ Yemerald_sB, 1,
+ -1,
+ Yemerald_s, 1,
+ -1,
+ Yemerald_sB, 0,
+ -1,
+ Yemerald_s, 0,
+ -1,
+ Yemerald_eB, 6,
+ Yemerald_w, 0,
+ -1,
+ Yemerald_e, 6,
+ Yemerald_wB, 0,
+ -1,
+ Yemerald_eB, 5,
+ Yemerald_w, 1,
+ -1,
+ Yemerald_e, 5,
+ Yemerald_wB, 1,
+ -1,
+ Yemerald_eB, 4,
+ Yemerald_w, 2,
+ -1,
+ Yemerald_e, 4,
+ Yemerald_wB, 2,
+ -1,
+ Yemerald_eB, 3,
+ Yemerald_w, 3,
+ -1,
+ Yemerald_e, 3,
+ Yemerald_wB, 3,
+ -1,
+ Yemerald_eB, 2,
+ Yemerald_w, 4,
+ -1,
+ Yemerald_e, 2,
+ Yemerald_wB, 4,
+ -1,
+ Yemerald_eB, 1,
+ Yemerald_w, 5,
+ -1,
+ Yemerald_e, 1,
+ Yemerald_wB, 5,
+ -1,
+ Yemerald_eB, 0,
+ Yemerald_w, 6,
+ -1,
+ Yemerald_e, 0,
+ Yemerald_wB, 6,
+ -1,
+ Yemerald_eat, 6,
+ -1,
+ Yemerald_eat, 5,
+ -1,
+ Yemerald_eat, 4,
+ -1,
+ Yemerald_eat, 3,
+ -1,
+ Yemerald_eat, 2,
+ -1,
+ Yemerald_eat, 1,
+ -1,
+ Yemerald_eat, 0,
+ -1,
+ Yemerald_stone, 0,
+ -1,
+ Yemerald_stone, 1,
+ -1,
+ Yemerald_stone, 2,
+ -1,
+ Yemerald_stone, 3,
+ -1,
+ Yemerald_stone, 4,
+ -1,
+ Yemerald_stone, 5,
+ -1,
+ Yemerald_stone, 6,
+ -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,
--1,
-Xdynamite_2,0 ,
-Xdynamite_2,1 ,
-Xdynamite_2,2 ,
-Xdynamite_2,3 ,
-Xdynamite_2,4 ,
-Xdynamite_2,5 ,
-Xdynamite_2,6 ,
-Xdynamite_2,7 ,
--1,
-Xdynamite_1,0 ,
-Xdynamite_1,1 ,
-Xdynamite_1,2 ,
-Xdynamite_1,3 ,
-Xdynamite_1,4 ,
-Xdynamite_1,5 ,
-Xdynamite_1,6 ,
-Xdynamite_1,7 ,
--1,
-
-Xbumper,0 ,
-Xbumper,1 ,
-Xbumper,2 ,
-Xbumper,3 ,
-Xbumper,4 ,
-Xbumper,5 ,
-Xbumper,6 ,
-Xbumper,7 ,
-XbumperB,0 ,
-XbumperB,7 ,
--1,
-XbumperB,1 ,
-XbumperB,6 ,
--1,
-XbumperB,2 ,
-XbumperB,5 ,
--1,
-XbumperB,3 ,
-XbumperB,4 ,
--1,
-
-Xwheel,0 ,
-Xwheel,1 ,
-Xwheel,2 ,
-Xwheel,3 ,
-Xwheel,4 ,
-Xwheel,5 ,
-Xwheel,6 ,
-Xwheel,7 ,
-XwheelB,7 ,
-XwheelB,6 ,
-XwheelB,5 ,
-XwheelB,4 ,
--1,
-XwheelB,3 ,
-XwheelB,2 ,
-XwheelB,1 ,
-XwheelB,0 ,
--1,
+#ifdef BAD_ROLL
+ Xdiamond_force_e, 0,
+ Xdiamond_force_e, 1,
+ Xdiamond_force_e, 2,
+ Xdiamond_force_e, 3,
+ Xdiamond_force_e, 4,
+ Xdiamond_force_e, 5,
+ Xdiamond_force_e, 6,
+ Xdiamond_force_e, 7,
+ Xdiamond_force_w, 0,
+ Xdiamond_force_w, 1,
+ Xdiamond_force_w, 2,
+ Xdiamond_force_w, 3,
+ Xdiamond_force_w, 4,
+ Xdiamond_force_w, 5,
+ Xdiamond_force_w, 6,
+ Xdiamond_force_w, 7,
+#endif
-XswitchB,0 ,
-XswitchB,1 ,
-XswitchB,2 ,
-XswitchB,3 ,
-XswitchB,4 ,
-XswitchB,5 ,
-XswitchB,6 ,
-XswitchB,7 ,
--1,
-Xswitch,0 ,
-Xswitch,1 ,
-Xswitch,2 ,
-Xswitch,3 ,
-Xswitch,4 ,
-Xswitch,5 ,
-Xswitch,6 ,
-Xswitch,7 ,
--1,
+ Xdiamond_shine, 0,
+ Xdiamond_shine, 7,
+ Ydiamond_s, 7,
+ Ydiamond_e, 7,
+ Ydiamond_w, 7,
+ -1,
+ Xdiamond_shine, 1,
+ Xdiamond_shine, 6,
+ -1,
+ Xdiamond_shine, 2,
+ Xdiamond_shine, 5,
+ -1,
+ Xdiamond_shine, 3,
+ Xdiamond_shine, 4,
+ -1,
+ Ydiamond_sB, 6,
+ -1,
+ Ydiamond_s, 6,
+ -1,
+ Ydiamond_sB, 5,
+ -1,
+ Ydiamond_s, 5,
+ -1,
+ Ydiamond_sB, 4,
+ -1,
+ Ydiamond_s, 4,
+ -1,
+ Ydiamond_sB, 3,
+ -1,
+ Ydiamond_s, 3,
+ -1,
+ Ydiamond_sB, 2,
+ -1,
+ Ydiamond_s, 2,
+ -1,
+ Ydiamond_sB, 1,
+ -1,
+ Ydiamond_s, 1,
+ -1,
+ Ydiamond_sB, 0,
+ -1,
+ Ydiamond_s, 0,
+ -1,
+ Ydiamond_eB, 6,
+ Ydiamond_w, 0,
+ -1,
+ Ydiamond_e, 6,
+ Ydiamond_wB, 0,
+ -1,
+ Ydiamond_eB, 5,
+ Ydiamond_w, 1,
+ -1,
+ Ydiamond_e, 5,
+ Ydiamond_wB, 1,
+ -1,
+ Ydiamond_eB, 4,
+ Ydiamond_w, 2,
+ -1,
+ Ydiamond_e, 4,
+ Ydiamond_wB, 2,
+ -1,
+ Ydiamond_eB, 3,
+ Ydiamond_w, 3,
+ -1,
+ Ydiamond_e, 3,
+ Ydiamond_wB, 3,
+ -1,
+ Ydiamond_eB, 2,
+ Ydiamond_w, 4,
+ -1,
+ Ydiamond_e, 2,
+ Ydiamond_wB, 4,
+ -1,
+ Ydiamond_eB, 1,
+ Ydiamond_w, 5,
+ -1,
+ Ydiamond_e, 1,
+ Ydiamond_wB, 5,
+ -1,
+ Ydiamond_eB, 0,
+ Ydiamond_w, 6,
+ -1,
+ Ydiamond_e, 0,
+ Ydiamond_wB, 6,
+ -1,
+ Ydiamond_eat, 6,
+ -1,
+ Ydiamond_eat, 5,
+ -1,
+ Ydiamond_eat, 4,
+ -1,
+ Ydiamond_eat, 3,
+ -1,
+ Ydiamond_eat, 2,
+ -1,
+ Ydiamond_eat, 1,
+ -1,
+ Ydiamond_eat, 0,
+ -1,
+ Ydiamond_stone, 0,
+ -1,
+ Ydiamond_stone, 1,
+ -1,
+ Ydiamond_stone, 2,
+ -1,
+ Ydiamond_stone, 3,
+ -1,
+ Ydiamond_stone, 4,
+ -1,
+ Ydiamond_stone, 5,
+ -1,
+ Ydiamond_stone, 6,
+ -1,
-Xsand,0 ,
-Xsand,1 ,
-Xsand,2 ,
-Xsand,3 ,
-Xsand,4 ,
-Xsand,5 ,
-Xsand,6 ,
-Xsand,7 ,
-Xsand_stone,0 ,
-Xsand_stone,1 ,
-Xsand_stone,2 ,
-Xsand_stone,3 ,
-Xsand_stone,4 ,
-Xsand_stone,5 ,
-Xsand_stone,6 ,
-Xsand_stone,7 ,
-Xsand_stonesand_1,0 ,
-Xsand_stonesand_1,1 ,
-Xsand_stonesand_1,2 ,
-Xsand_stonesand_1,3 ,
-Xsand_stonesand_1,4 ,
-Xsand_stonesand_1,5 ,
-Xsand_stonesand_1,6 ,
-Xsand_stonesand_1,7 ,
-Xsand_stonesand_2,0 ,
-Xsand_stonesand_2,1 ,
-Xsand_stonesand_2,2 ,
-Xsand_stonesand_2,3 ,
-Xsand_stonesand_2,4 ,
-Xsand_stonesand_2,5 ,
-Xsand_stonesand_2,6 ,
-Xsand_stonesand_2,7 ,
-Xsand_stonesand_3,0 ,
-Xsand_stonesand_3,1 ,
-Xsand_stonesand_3,2 ,
-Xsand_stonesand_3,3 ,
-Xsand_stonesand_3,4 ,
-Xsand_stonesand_3,5 ,
-Xsand_stonesand_3,6 ,
-Xsand_stonesand_3,7 ,
-Xsand_stonesand_4,0 ,
-Xsand_stonesand_4,1 ,
-Xsand_stonesand_4,2 ,
-Xsand_stonesand_4,3 ,
-Xsand_stonesand_4,4 ,
-Xsand_stonesand_4,5 ,
-Xsand_stonesand_4,6 ,
-Xsand_stonesand_4,7 ,
-Xsand_sandstone_1,0 ,
-Xsand_sandstone_1,1 ,
-Xsand_sandstone_1,2 ,
-Xsand_sandstone_1,3 ,
-Xsand_sandstone_1,4 ,
-Xsand_sandstone_1,5 ,
-Xsand_sandstone_1,6 ,
-Xsand_sandstone_1,7 ,
-Xsand_sandstone_2,0 ,
-Xsand_sandstone_2,1 ,
-Xsand_sandstone_2,2 ,
-Xsand_sandstone_2,3 ,
-Xsand_sandstone_2,4 ,
-Xsand_sandstone_2,5 ,
-Xsand_sandstone_2,6 ,
-Xsand_sandstone_2,7 ,
-Xsand_sandstone_3,0 ,
-Xsand_sandstone_3,1 ,
-Xsand_sandstone_3,2 ,
-Xsand_sandstone_3,3 ,
-Xsand_sandstone_3,4 ,
-Xsand_sandstone_3,5 ,
-Xsand_sandstone_3,6 ,
-Xsand_sandstone_3,7 ,
-Xsand_sandstone_4,0 ,
-Xsand_sandstone_4,1 ,
-Xsand_sandstone_4,2 ,
-Xsand_sandstone_4,3 ,
-Xsand_sandstone_4,4 ,
-Xsand_sandstone_4,5 ,
-Xsand_sandstone_4,6 ,
-Xsand_sandstone_4,7 ,
--1,
+ Xdrip_fall, 0,
+ Xdrip_fall, 1,
+ Xdrip_fall, 2,
+ Xdrip_fall, 3,
+ Xdrip_fall, 4,
+ Xdrip_fall, 5,
+ Xdrip_fall, 6,
+ Xdrip_fall, 7,
+ Xdrip_eat, 7,
+ Ydrip_s2, 7,
+ -1,
+ Ydrip_s2B, 6,
+ -1,
+ Ydrip_s2, 6,
+ -1,
+ Ydrip_s2B, 5,
+ -1,
+ Ydrip_s2, 5,
+ -1,
+ Ydrip_s2B, 4,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plant,6 ,
-Xplant,7 ,
-Yplant,0 ,
-Yplant,1 ,
-Yplant,2 ,
-Yplant,3 ,
-Yplant,4 ,
-Yplant,5 ,
-Yplant,6 ,
-Yplant,7 ,
--1,
+ Xbomb, 0,
+ Xbomb, 1,
+ Xbomb, 2,
+ Xbomb, 3,
+ Xbomb, 4,
+ Xbomb, 5,
+ Xbomb, 6,
+ Xbomb, 7,
+ Xbomb_pause, 0,
+ Xbomb_pause, 1,
+ Xbomb_pause, 2,
+ Xbomb_pause, 3,
+ Xbomb_pause, 4,
+ Xbomb_pause, 5,
+ Xbomb_pause, 6,
+ Xbomb_pause, 7,
+ Xbomb_fall, 0,
+ Xbomb_fall, 1,
+ Xbomb_fall, 2,
+ Xbomb_fall, 3,
+ Xbomb_fall, 4,
+ Xbomb_fall, 5,
+ Xbomb_fall, 6,
+ Xbomb_fall, 7,
-Xlenses,0 ,
-Xlenses,1 ,
-Xlenses,2 ,
-Xlenses,3 ,
-Xlenses,4 ,
-Xlenses,5 ,
-Xlenses,6 ,
-Xlenses,7 ,
--1,
+#ifdef BAD_ROLL
+ Xbomb_force_e, 0,
+ Xbomb_force_e, 1,
+ Xbomb_force_e, 2,
+ Xbomb_force_e, 3,
+ Xbomb_force_e, 4,
+ Xbomb_force_e, 5,
+ Xbomb_force_e, 6,
+ Xbomb_force_e, 7,
+ Xbomb_force_w, 0,
+ Xbomb_force_w, 1,
+ Xbomb_force_w, 2,
+ Xbomb_force_w, 3,
+ Xbomb_force_w, 4,
+ Xbomb_force_w, 5,
+ Xbomb_force_w, 6,
+ Xbomb_force_w, 7,
+#endif
-Xmagnify,0 ,
-Xmagnify,1 ,
-Xmagnify,2 ,
-Xmagnify,3 ,
-Xmagnify,4 ,
-Xmagnify,5 ,
-Xmagnify,6 ,
-Xmagnify,7 ,
--1,
+ Ybomb_s, 7,
+ Ybomb_e, 7,
+ Ybomb_w, 7,
+ -1,
+ Ybomb_sB, 6,
+ -1,
+ Ybomb_s, 6,
+ -1,
+ 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yballoon_w, 7,
+ Xballoon, 0,
+ Xballoon, 1,
+ Xballoon, 2,
+ Xballoon, 3,
+ Xballoon, 4,
+ Xballoon, 5,
+ Xballoon, 6,
+ Xballoon, 7,
+ -1,
+ Yballoon_n, 0,
+ Yballoon_sB, 6,
+ -1,
+ Yballoon_nB, 0,
+ Yballoon_s, 6,
+ -1,
+ Yballoon_n, 1,
+ Yballoon_sB, 5,
+ -1,
+ Yballoon_nB, 1,
+ Yballoon_s, 5,
+ -1,
+ Yballoon_n, 2,
+ Yballoon_sB, 4,
+ -1,
+ Yballoon_nB, 2,
+ Yballoon_s, 4,
+ -1,
+ Yballoon_n, 3,
+ Yballoon_sB, 3,
+ -1,
+ Yballoon_nB, 3,
+ Yballoon_s, 3,
+ -1,
+ Yballoon_n, 4,
+ Yballoon_sB, 2,
+ -1,
+ Yballoon_nB, 4,
+ Yballoon_s, 2,
+ -1,
+ Yballoon_n, 5,
+ Yballoon_sB, 1,
+ -1,
+ Yballoon_nB, 5,
+ Yballoon_s, 1,
+ -1,
+ Yballoon_n, 6,
+ Yballoon_sB, 0,
+ -1,
+ Yballoon_nB, 6,
+ Yballoon_s, 0,
+ -1,
+ Yballoon_eB, 6,
+ Yballoon_w, 0,
+ -1,
+ Yballoon_e, 6,
+ Yballoon_wB, 0,
+ -1,
+ Yballoon_eB, 5,
+ Yballoon_w, 1,
+ -1,
+ Yballoon_e, 5,
+ Yballoon_wB, 1,
+ -1,
+ Yballoon_eB, 4,
+ Yballoon_w, 2,
+ -1,
+ Yballoon_e, 4,
+ Yballoon_wB, 2,
+ -1,
+ Yballoon_eB, 3,
+ Yballoon_w, 3,
+ -1,
+ Yballoon_e, 3,
+ Yballoon_wB, 3,
+ -1,
+ Yballoon_eB, 2,
+ Yballoon_w, 4,
+ -1,
+ Yballoon_e, 2,
+ Yballoon_wB, 4,
+ -1,
+ Yballoon_eB, 1,
+ Yballoon_w, 5,
+ -1,
+ Yballoon_e, 1,
+ Yballoon_wB, 5,
+ -1,
+ Yballoon_eB, 0,
+ Yballoon_w, 6,
+ -1,
+ Yballoon_e, 0,
+ Yballoon_wB, 6,
+ -1,
-Xfake_blankB,0 ,
-Xfake_blankB,1 ,
-Xfake_blankB,2 ,
-Xfake_blankB,3 ,
-Xfake_blankB,4 ,
-Xfake_blankB,5 ,
-Xfake_blankB,6 ,
-Xfake_blankB,7 ,
--1,
+ Xgrass, 0,
+ Xgrass, 1,
+ Xgrass, 2,
+ Xgrass, 3,
+ Xgrass, 4,
+ Xgrass, 5,
+ Xgrass, 6,
+ Xgrass, 7,
+ Xfake_grass, 0,
+ Xfake_grass, 1,
+ Xfake_grass, 2,
+ Xfake_grass, 3,
+ Xfake_grass, 4,
+ Xfake_grass, 5,
+ Xfake_grass, 6,
+ Xfake_grass, 7,
+ -1,
+ Ygrass_nB, 6,
+ -1,
+ Ygrass_nB, 5,
+ -1,
+ Ygrass_nB, 4,
+ -1,
+ Ygrass_nB, 3,
+ -1,
+ Ygrass_nB, 2,
+ -1,
+ Ygrass_nB, 1,
+ -1,
+ Ygrass_nB, 0,
+ -1,
+ Ygrass_eB, 6,
+ -1,
+ Ygrass_eB, 5,
+ -1,
+ Ygrass_eB, 4,
+ -1,
+ Ygrass_eB, 3,
+ -1,
+ Ygrass_eB, 2,
+ -1,
+ Ygrass_eB, 1,
+ -1,
+ Ygrass_eB, 0,
+ -1,
+ Ygrass_sB, 6,
+ -1,
+ Ygrass_sB, 5,
+ -1,
+ Ygrass_sB, 4,
+ -1,
+ Ygrass_sB, 3,
+ -1,
+ Ygrass_sB, 2,
+ -1,
+ Ygrass_sB, 1,
+ -1,
+ Ygrass_sB, 0,
+ -1,
+ Ygrass_wB, 6,
+ -1,
+ Ygrass_wB, 5,
+ -1,
+ Ygrass_wB, 4,
+ -1,
+ Ygrass_wB, 3,
+ -1,
+ Ygrass_wB, 2,
+ -1,
+ Ygrass_wB, 1,
+ -1,
+ Ygrass_wB, 0,
+ -1,
-Xfake_grassB,0 ,
-Xfake_grassB,1 ,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
-Xfake_door_3,0 ,
-Xfake_door_3,1 ,
-Xfake_door_3,2 ,
-Xfake_door_3,3 ,
-Xfake_door_3,4 ,
-Xfake_door_3,5 ,
-Xfake_door_3,6 ,
-Xfake_door_3,7 ,
-Xfake_door_4,0 ,
-Xfake_door_4,1 ,
-Xfake_door_4,2 ,
-Xfake_door_4,3 ,
-Xfake_door_4,4 ,
-Xfake_door_4,5 ,
-Xfake_door_4,6 ,
-Xfake_door_4,7 ,
-Xfake_door_5,0 ,
-Xfake_door_5,1 ,
-Xfake_door_5,2 ,
-Xfake_door_5,3 ,
-Xfake_door_5,4 ,
-Xfake_door_5,5 ,
-Xfake_door_5,6 ,
-Xfake_door_5,7 ,
-Xfake_door_6,0 ,
-Xfake_door_6,1 ,
-Xfake_door_6,2 ,
-Xfake_door_6,3 ,
-Xfake_door_6,4 ,
-Xfake_door_6,5 ,
-Xfake_door_6,6 ,
-Xfake_door_6,7 ,
-Xfake_door_7,0 ,
-Xfake_door_7,1 ,
-Xfake_door_7,2 ,
-Xfake_door_7,3 ,
-Xfake_door_7,4 ,
-Xfake_door_7,5 ,
-Xfake_door_7,6 ,
-Xfake_door_7,7 ,
-Xfake_door_8,0 ,
-Xfake_door_8,1 ,
-Xfake_door_8,2 ,
-Xfake_door_8,3 ,
-Xfake_door_8,4 ,
-Xfake_door_8,5 ,
-Xfake_door_8,6 ,
-Xfake_door_8,7 ,
--1,
+ Xacid_nw, 0,
+ Xacid_nw, 1,
+ Xacid_nw, 2,
+ Xacid_nw, 3,
+ Xacid_nw, 4,
+ Xacid_nw, 5,
+ Xacid_nw, 6,
+ Xacid_nw, 7,
+ -1,
+ Xacid_ne, 0,
+ Xacid_ne, 1,
+ Xacid_ne, 2,
+ Xacid_ne, 3,
+ Xacid_ne, 4,
+ Xacid_ne, 5,
+ Xacid_ne, 6,
+ Xacid_ne, 7,
+ -1,
+ Xacid_sw, 0,
+ Xacid_sw, 1,
+ Xacid_sw, 2,
+ Xacid_sw, 3,
+ Xacid_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wall_2,6 ,
-Xwall_2,7 ,
--1,
-Xwall_3,0 ,
-Xwall_3,1 ,
-Xwall_3,2 ,
-Xwall_3,3 ,
-Xwall_3,4 ,
-Xwall_3,5 ,
-Xwall_3,6 ,
-Xwall_3,7 ,
--1,
-Xwall_4,0 ,
-Xwall_4,1 ,
-Xwall_4,2 ,
-Xwall_4,3 ,
-Xwall_4,4 ,
-Xwall_4,5 ,
-Xwall_4,6 ,
-Xwall_4,7 ,
--1,
-Xround_wall_1,0 ,
-Xround_wall_1,1 ,
-Xround_wall_1,2 ,
-Xround_wall_1,3 ,
-Xround_wall_1,4 ,
-Xround_wall_1,5 ,
-Xround_wall_1,6 ,
-Xround_wall_1,7 ,
--1,
-Xround_wall_2,0 ,
-Xround_wall_2,1 ,
-Xround_wall_2,2 ,
-Xround_wall_2,3 ,
-Xround_wall_2,4 ,
-Xround_wall_2,5 ,
-Xround_wall_2,6 ,
-Xround_wall_2,7 ,
--1,
-Xround_wall_3,0 ,
-Xround_wall_3,1 ,
-Xround_wall_3,2 ,
-Xround_wall_3,3 ,
-Xround_wall_3,4 ,
-Xround_wall_3,5 ,
-Xround_wall_3,6 ,
-Xround_wall_3,7 ,
--1,
-Xround_wall_4,0 ,
-Xround_wall_4,1 ,
-Xround_wall_4,2 ,
-Xround_wall_4,3 ,
-Xround_wall_4,4 ,
-Xround_wall_4,5 ,
-Xround_wall_4,6 ,
-Xround_wall_4,7 ,
--1,
-Xdecor_1,0 ,
-Xdecor_1,1 ,
-Xdecor_1,2 ,
-Xdecor_1,3 ,
-Xdecor_1,4 ,
-Xdecor_1,5 ,
-Xdecor_1,6 ,
-Xdecor_1,7 ,
--1,
-Xdecor_2,0 ,
-Xdecor_2,1 ,
-Xdecor_2,2 ,
-Xdecor_2,3 ,
-Xdecor_2,4 ,
-Xdecor_2,5 ,
-Xdecor_2,6 ,
-Xdecor_2,7 ,
--1,
-Xdecor_3,0 ,
-Xdecor_3,1 ,
-Xdecor_3,2 ,
-Xdecor_3,3 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or_12,2 ,
-Xdecor_12,3 ,
-Xdecor_12,4 ,
-Xdecor_12,5 ,
-Xdecor_12,6 ,
-Xdecor_12,7 ,
--1,
-Xalpha_excla,0 ,
-Xalpha_excla,1 ,
-Xalpha_excla,2 ,
-Xalpha_excla,3 ,
-Xalpha_excla,4 ,
-Xalpha_excla,5 ,
-Xalpha_excla,6 ,
-Xalpha_excla,7 ,
--1,
-Xalpha_quote,0 ,
-Xalpha_quote,1 ,
-Xalpha_quote,2 ,
-Xalpha_quote,3 ,
-Xalpha_quote,4 ,
-Xalpha_quote,5 ,
-Xalpha_quote,6 ,
-Xalpha_quote,7 ,
--1,
-Xalpha_comma,0 ,
-Xalpha_comma,1 ,
-Xalpha_comma,2 ,
-Xalpha_comma,3 ,
-Xalpha_comma,4 ,
-Xalpha_comma,5 ,
-Xalpha_comma,6 ,
-Xalpha_comma,7 ,
--1,
-Xalpha_minus,0 ,
-Xalpha_minus,1 ,
-Xalpha_minus,2 ,
-Xalpha_minus,3 ,
-Xalpha_minus,4 ,
-Xalpha_minus,5 ,
-Xalpha_minus,6 ,
-Xalpha_minus,7 ,
--1,
-Xalpha_perio,0 ,
-Xalpha_perio,1 ,
-Xalpha_perio,2 ,
-Xalpha_perio,3 ,
-Xalpha_perio,4 ,
-Xalpha_perio,5 ,
-Xalpha_perio,6 ,
-Xalpha_perio,7 ,
--1,
-Xalpha_0,0 ,
-Xalpha_0,1 ,
-Xalpha_0,2 ,
-Xalpha_0,3 ,
-Xalpha_0,4 ,
-Xalpha_0,5 ,
-Xalpha_0,6 ,
-Xalpha_0,7 ,
--1,
-Xalpha_1,0 ,
-Xalpha_1,1 ,
-Xalpha_1,2 ,
-Xalpha_1,3 ,
-Xalpha_1,4 ,
-Xalpha_1,5 ,
-Xalpha_1,6 ,
-Xalpha_1,7 ,
--1,
-Xalpha_2,0 ,
-Xalpha_2,1 ,
-Xalpha_2,2 ,
-Xalpha_2,3 ,
-Xalpha_2,4 ,
-Xalpha_2,5 ,
-Xalp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,
+ Xgrow_ns, 5,
+ Xgrow_ns, 6,
+ Xgrow_ns, 7,
+ -1,
+ Ygrow_ns_eat, 0,
+ -1,
+ Ygrow_ns_eat, 1,
+ -1,
+ Ygrow_ns_eat, 2,
+ -1,
+ Ygrow_ns_eat, 3,
+ -1,
+ Ygrow_ns_eat, 4,
+ -1,
+ Ygrow_ns_eat, 5,
+ -1,
+ Ygrow_ns_eat, 6,
+ -1,
-int spr_map[] = {
-SPR_walk+0,0, 0,1,2,3,4,5,6,7,
-SPR_walk+1,0, 8,9,10,11,12,13,14,15,
-SPR_walk+2,0, 16,17,18,19,20,21,22,23,
-SPR_walk+3,0, 24,25,26,27,28,29,30,31,
-SPR_push+0,0, 32,33,34,35,36,35,34,33,
-SPR_push+1,0, 37,38,39,40,41,40,39,38,
-SPR_push+2,0, 42,43,44,45,46,45,44,43,
-SPR_push+3,0, 47,48,49,50,51,50,49,48,
-SPR_spray+0,0, 52,52,52,52,52,52,52,52,
-SPR_spray+1,0, 53,53,53,53,53,53,53,53,
-SPR_spray+2,0, 54,54,54,54,54,54,54,54,
-SPR_spray+3,0, 55,55,55,55,55,55,55,55,
-SPR_walk+0,1, 56,57,58,59,60,61,62,63,
-SPR_walk+1,1, 64,65,66,67,68,69,70,71,
-SPR_walk+2,1, 72,73,74,75,76,77,78,79,
-SPR_walk+3,1, 80,81,82,83,84,85,86,87,
-SPR_push+0,1, 88,89,90,91,92,91,90,89,
-SPR_push+1,1, 93,94,95,96,97,96,95,94,
-SPR_push+2,1, 98,99,100,101,102,101,100,99,
-SPR_push+3,1, 103,104,105,106,107,106,105,104,
-SPR_spray+0,1, 108,108,108,108,108,108,108,108,
-SPR_spray+1,1, 109,109,109,109,109,109,109,109,
-SPR_spray+2,1, 110,110,110,110,110,110,110,110,
-SPR_spray+3,1, 111,111,111,111,111,111,111,111,
-SPR_still,0, 112,112,112,112,112,112,112,112,
-SPR_still,1, 113,113,113,113,113,113,113,113,
-SPR_MAX
-};
+ XwonderwallB, 7,
+ Xwonderwall, 0,
+ Xwonderwall, 1,
+ Xwonderwall, 2,
+ Xwonderwall, 3,
+ Xwonderwall, 4,
+ Xwonderwall, 5,
+ Xwonderwall, 6,
+ Xwonderwall, 7,
+ -1,
+ XwonderwallB, 0,
+ -1,
+ XwonderwallB, 1,
+ -1,
+ XwonderwallB, 2,
+ -1,
+ XwonderwallB, 3,
+ -1,
+ XwonderwallB, 4,
+ -1,
+ XwonderwallB, 5,
+ -1,
+ XwonderwallB, 6,
+ -1,
-#if 0
-int ttl_map[] = {
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,0,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,2,3,4,-1, /* !',-. */
-5,6,7,8,9,10,11,12,13,14,15,-1,-1,-1,-1,16, /* 0123456789:? */
--1,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31, /* ABCDEFGHIJKLMNO */
-32,33,34,35,36,37,38,39,40,41,42,-1,-1,-1,-1,-1, /* PQRSTUVWXYZ */
--1,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31, /* abcdefghijklmno */
-32,33,34,35,36,37,38,39,40,41,42,-1,-1,-1,-1,-1 /* pqrstuvwxyz */
-};
-#endif
+ Xameuba_1, 0,
+ Xameuba_1, 1,
+ Xameuba_1, 2,
+ Xameuba_1, 3,
+ Xameuba_1, 4,
+ Xameuba_1, 5,
+ Xameuba_1, 6,
+ Xameuba_1, 7,
+ -1,
+ Xameuba_2, 0,
+ Xameuba_2, 1,
+ Xameuba_2, 2,
+ Xameuba_2, 3,
+ Xameuba_2, 4,
+ Xameuba_2, 5,
+ Xameuba_2, 6,
+ Xameuba_2, 7,
+ -1,
+ Xameuba_3, 0,
+ Xameuba_3, 1,
+ Xameuba_3, 2,
+ Xameuba_3, 3,
+ Xameuba_3, 4,
+ Xameuba_3, 5,
+ Xameuba_3, 6,
+ Xameuba_3, 7,
+ -1,
+ Xameuba_4, 0,
+ Xameuba_4, 1,
+ Xameuba_4, 2,
+ Xameuba_4, 3,
+ Xameuba_4, 4,
+ Xameuba_4, 5,
+ Xameuba_4, 6,
+ Xameuba_4, 7,
+ -1,
+ Xameuba_5, 0,
+ Xameuba_5, 1,
+ Xameuba_5, 2,
+ Xameuba_5, 3,
+ Xameuba_5, 4,
+ Xameuba_5, 5,
+ Xameuba_5, 6,
+ Xameuba_5, 7,
+ -1,
+ Xameuba_6, 0,
+ Xameuba_6, 1,
+ Xameuba_6, 2,
+ Xameuba_6, 3,
+ Xameuba_6, 4,
+ Xameuba_6, 5,
+ Xameuba_6, 6,
+ Xameuba_6, 7,
+ -1,
+ Xameuba_7, 0,
+ Xameuba_7, 1,
+ Xameuba_7, 2,
+ Xameuba_7, 3,
+ Xameuba_7, 4,
+ Xameuba_7, 5,
+ Xameuba_7, 6,
+ Xameuba_7, 7,
+ -1,
+ Xameuba_8, 0,
+ Xameuba_8, 1,
+ Xameuba_8, 2,
+ Xameuba_8, 3,
+ Xameuba_8, 4,
+ Xameuba_8, 5,
+ Xameuba_8, 6,
+ Xameuba_8, 7,
+ -1,
-/* ---------------------------------------------------------------------- */
+ Xdoor_1, 0,
+ Xdoor_1, 1,
+ Xdoor_1, 2,
+ Xdoor_1, 3,
+ Xdoor_1, 4,
+ Xdoor_1, 5,
+ Xdoor_1, 6,
+ Xdoor_1, 7,
+ -1,
+ Xdoor_2, 0,
+ Xdoor_2, 1,
+ Xdoor_2, 2,
+ Xdoor_2, 3,
+ Xdoor_2, 4,
+ Xdoor_2, 5,
+ Xdoor_2, 6,
+ Xdoor_2, 7,
+ -1,
+ Xdoor_3, 0,
+ Xdoor_3, 1,
+ Xdoor_3, 2,
+ Xdoor_3, 3,
+ Xdoor_3, 4,
+ Xdoor_3, 5,
+ Xdoor_3, 6,
+ Xdoor_3, 7,
+ -1,
+ Xdoor_4, 0,
+ Xdoor_4, 1,
+ Xdoor_4, 2,
+ X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 3,
+ Xwind_stop, 4,
+ Xwind_stop, 5,
+ Xwind_stop, 6,
+ Xwind_stop, 7,
+ -1,
-/* quick and dirty code to format the data semi nicely */
+ Xexit, 0,
+ Xexit, 1,
+ Xexit, 2,
+ Xexit, 3,
+ Xexit, 4,
+ Xexit, 5,
+ Xexit, 6,
+ Xexit, 7,
+ -1,
+ Xexit_1, 0,
+ Xexit_1, 1,
+ Xexit_1, 2,
+ -1,
+ Xexit_1, 3,
+ Xexit_1, 4,
+ Xexit_1, 5,
+ Xexit_3, 7,
+ Xexit_3, 6,
+ Xexit_3, 5,
+ -1,
+ Xexit_1, 6,
+ Xexit_1, 7,
+ Xexit_2, 0,
+ Xexit_3, 4,
+ Xexit_3, 3,
+ Xexit_3, 2,
+ -1,
+ Xexit_2, 1,
+ Xexit_2, 2,
+ Xexit_2, 3,
+ Xexit_3, 1,
+ Xexit_3, 0,
+ Xexit_2, 7,
+ -1,
+ Xexit_2, 4,
+ Xexit_2, 5,
+ Xexit_2, 6,
+ -1,
-void print_buffer(int *buffer, int count)
-{
- int i,j;
- j = 0;
- for(i = 0; i < count;) {
- if(j > 80) { j=0; printf("\n"); }
- if(j == 0) printf("\t");
- j += printf("%d", buffer[i]);
- j += printf("%s", ++i == count ? "" : ",");
- }
- if(j) printf("\n");
-}
-void print_tab(int *invert, char *varname, char *comment)
-{
- int i;
- int buffer[TILE_MAX];
+ Ydynamite_eat, 0,
+ Ydynamite_eat, 1,
+ Ydynamite_eat, 2,
+ Xdynamite, 0,
+ Xdynamite, 1,
+ Xdynamite, 2,
+ Xdynamite, 3,
+ Xdynamite, 4,
+ Xdynamite, 5,
+ Xdynamite, 6,
+ Xdynamite, 7,
+ -1,
+ Xdynamite_4, 0,
+ Xdynamite_4, 1,
+ Xdynamite_4, 2,
+ Xdynamite_4, 3,
+ Xdynamite_4, 4,
+ Xdynamite_4, 5,
+ Xdynamite_4, 6,
+ Xdynamite_4, 7,
+ -1,
+ Xdynamite_3, 0,
+ Xdynamite_3, 1,
+ Xdynamite_3, 2,
+ Xdynamite_3, 3,
+ Xdynamite_3, 4,
+ Xdynamite_3, 5,
+ Xdynamite_3, 6,
+ Xdynamite_3, 7,
+ -1,
+ Xdynamite_2, 0,
+ Xdynamite_2, 1,
+ Xdynamite_2, 2,
+ Xdynamite_2, 3,
+ Xdynamite_2, 4,
+ Xdynamite_2, 5,
+ Xdynamite_2, 6,
+ Xdynamite_2, 7,
+ -1,
+ Xdynamite_1, 0,
+ Xdynamite_1, 1,
+ Xdynamite_1, 2,
+ Xdynamite_1, 3,
+ Xdynamite_1, 4,
+ Xdynamite_1, 5,
+ Xdynamite_1, 6,
+ Xdynamite_1, 7,
+ -1,
- for(i = 0; i < TILE_MAX; i++) buffer[i] = 0;
- for(;invert[0] < TILE_MAX; invert += 2) buffer[invert[0]] = invert[1];
+ Xbumper, 0,
+ Xbumper, 1,
+ Xbumper, 2,
+ Xbumper, 3,
+ Xbumper, 4,
+ Xbumper, 5,
+ Xbumper, 6,
+ Xbumper, 7,
+ XbumperB, 0,
+ XbumperB, 7,
+ -1,
+ XbumperB, 1,
+ XbumperB, 6,
+ -1,
+ XbumperB, 2,
+ XbumperB, 5,
+ -1,
+ XbumperB, 3,
+ XbumperB, 4,
+ -1,
- printf("/* %s */\n", comment);
- printf("const unsigned char %s[%d] = {\n", varname, TILE_MAX);
- print_buffer(buffer, TILE_MAX);
- printf("};\n");
-}
-void print_explode(void)
-{
- int i;
- int *tile = tile_explode;
- int buffer[TILE_MAX];
+ Xwheel, 0,
+ Xwheel, 1,
+ Xwheel, 2,
+ Xwheel, 3,
+ Xwheel, 4,
+ Xwheel, 5,
+ Xwheel, 6,
+ Xwheel, 7,
+ XwheelB, 7,
+ XwheelB, 6,
+ XwheelB, 5,
+ XwheelB, 4,
+ -1,
+ XwheelB, 3,
+ XwheelB, 2,
+ XwheelB, 1,
+ XwheelB, 0,
+ -1,
- for(i = 0; i < TILE_MAX; i++) buffer[i] = Xboom_1;
- while((i = *tile++) < TILE_MAX) buffer[i] = i; /* these tiles are indestructable */
- while((i = *tile++) < TILE_MAX) buffer[i] = *tile++; /* these tiles are special */
+ XswitchB, 0,
+ XswitchB, 1,
+ XswitchB, 2,
+ XswitchB, 3,
+ XswitchB, 4,
+ XswitchB, 5,
+ XswitchB, 6,
+ XswitchB, 7,
+ -1,
+ Xswitch, 0,
+ Xswitch, 1,
+ Xswitch, 2,
+ Xswitch, 3,
+ Xswitch, 4,
+ Xswitch, 5,
+ Xswitch, 6,
+ Xswitch, 7,
+ -1,
- printf("/* normal explosion */\n");
- printf("const unsigned short tab_explode_normal[%d] = {\n", TILE_MAX);
- print_buffer(buffer, TILE_MAX);
- printf("};\n");
+ Xsand, 0,
+ Xsand, 1,
+ Xsand, 2,
+ Xsand, 3,
+ Xsand, 4,
+ Xsand, 5,
+ Xsand, 6,
+ Xsand, 7,
+ Xsand_stone, 0,
+ Xsand_stone, 1,
+ Xsand_stone, 2,
+ Xsand_stone, 3,
+ Xsand_stone, 4,
+ Xsand_stone, 5,
+ Xsand_stone, 6,
+ Xsand_stone, 7,
+ Xsand_stonesand_1, 0,
+ Xsand_stonesand_1, 1,
+ Xsand_stonesand_1, 2,
+ Xsand_stonesand_1, 3,
+ Xsand_stonesand_1, 4,
+ Xsand_stonesand_1, 5,
+ Xsand_stonesand_1, 6,
+ Xsand_stonesand_1, 7,
+ Xsand_stonesand_2, 0,
+ Xsand_stonesand_2, 1,
+ Xsand_stonesand_2, 2,
+ Xsand_stonesand_2, 3,
+ Xsand_stonesand_2, 4,
+ Xsand_stonesand_2, 5,
+ Xsand_stonesand_2, 6,
+ Xsand_stonesand_2, 7,
+ Xsand_stonesand_3, 0,
+ Xsand_stonesand_3, 1,
+ Xsand_stonesand_3, 2,
+ Xsand_stonesand_3, 3,
+ Xsand_stonesand_3, 4,
+ Xsand_stonesand_3, 5,
+ Xsand_stonesand_3, 6,
+ Xsand_stonesand_3, 7,
+ Xsand_stonesand_4, 0,
+ Xsand_stonesand_4, 1,
+ Xsand_stonesand_4, 2,
+ Xsand_stonesand_4, 3,
+ Xsand_stonesand_4, 4,
+ Xsand_stonesand_4, 5,
+ Xsand_stonesand_4, 6,
+ Xsand_stonesand_4, 7,
+ Xsand_sandstone_1, 0,
+ Xsand_sandstone_1, 1,
+ Xsand_sandstone_1, 2,
+ Xsand_sandstone_1, 3,
+ Xsand_sandstone_1, 4,
+ Xsand_sandstone_1, 5,
+ Xsand_sandstone_1, 6,
+ Xsand_sandstone_1, 7,
+ Xsand_sandstone_2, 0,
+ Xsand_sandstone_2, 1,
+ Xsand_sandstone_2, 2,
+ Xsand_sandstone_2, 3,
+ Xsand_sandstone_2, 4,
+ Xsand_sandstone_2, 5,
+ Xsand_sandstone_2, 6,
+ Xsand_sandstone_2, 7,
+ Xsand_sandstone_3, 0,
+ Xsand_sandstone_3, 1,
+ Xsand_sandstone_3, 2,
+ Xsand_sandstone_3, 3,
+ Xsand_sandstone_3, 4,
+ Xsand_sandstone_3, 5,
+ Xsand_sandstone_3, 6,
+ Xsand_sandstone_3, 7,
+ Xsand_sandstone_4, 0,
+ Xsand_sandstone_4, 1,
+ Xsand_sandstone_4, 2,
+ Xsand_sandstone_4, 3,
+ Xsand_sandstone_4, 4,
+ Xsand_sandstone_4, 5,
+ Xsand_sandstone_4, 6,
+ Xsand_sandstone_4, 7,
+ -1,
- while((i = *tile++) < TILE_MAX) buffer[i] = *tile++; /* these tiles for dynamite */
+ Xplant, 0,
+ Xplant, 1,
+ Xplant, 2,
+ Xplant, 3,
+ Xplant, 4,
+ Xplant, 5,
+ Xplant, 6,
+ Xplant, 7,
+ Yplant, 0,
+ Yplant, 1,
+ Yplant, 2,
+ Yplant, 3,
+ Yplant, 4,
+ Yplant, 5,
+ Yplant, 6,
+ Yplant, 7,
+ -1,
- printf("/* dynamite explosion */\n");
- printf("const unsigned short tab_explode_dynamite[%d] = {\n", TILE_MAX);
- print_buffer(buffer, TILE_MAX);
- printf("};\n");
-}
-void print_obj(void)
-{
- int i,j;
- int *map = obj_map;
- int buffer[8][TILE_MAX];
+ Xlenses, 0,
+ Xlenses, 1,
+ Xlenses, 2,
+ Xlenses, 3,
+ Xlenses, 4,
+ Xlenses, 5,
+ Xlenses, 6,
+ Xlenses, 7,
+ -1,
-#if 0
- int debug=0;
- for(i = 0; i < 8; i++) for(j = 0; j < TILE_MAX; j++) buffer[i][j] = 0;
- for(i = 0; i < 64; i++) {
- for(;*map != -1; map += 2) {
- if(map[0] < 0 || map[0] >= TILE_MAX || map[1] < 0 || map[1] >= 8) { fprintf(stderr, "obj_map: bad tile (%d,%d) @ %d+%d\n", map[0], map[1], i / 16, i % 16); debug = 1; continue; }
- buffer[map[1]][map[0]]++;
- }
- map++;
- }
- for(i = 0; i < 896; i++) {
- for(;*map != -1; map += 2) {
- if(map[0] < 0 || map[0] >= TILE_MAX || map[1] < 0 || map[1] >= 8) { fprintf(stderr, "obj_map: bad tile (%d,%d) @ %d\n", map[0], map[1], i); debug = 1; continue; }
- buffer[map[1]][map[0]]++;
- }
- map++;
- }
- for(i = 0; i < TILE_MAX; i++) for(j = 0; j < 8; j++) {
- switch(buffer[j][i]) {
- case 0: fprintf(stderr, "obj_map: uninitialized (%d,%d)\n", i, j); debug = 1; break;
- case 1: break; /* good */
- default: fprintf(stderr, "obj_map: duplicate (%d,%d)\n", i, j); debug = 1; break;
- }
- }
- if(sizeof(obj_map) / sizeof(*obj_map) != map - obj_map) { fprintf(stderr, "obj_map: bad end (%d != %d)\n", sizeof(obj_map) / sizeof(*obj_map), map - obj_map); debug = 1; }
- if(debug == 0) fprintf(stderr, "obj_map: looks good, now disable debug code\n");
- abort();
-#else
+ Xmagnify, 0,
+ Xmagnify, 1,
+ Xmagnify, 2,
+ Xmagnify, 3,
+ Xmagnify, 4,
+ Xmagnify, 5,
+ Xmagnify, 6,
+ Xmagnify, 7,
+ -1,
- for(i = 0; i < 8; i++) for(j = 0; j < TILE_MAX; j++) buffer[i][j] = Xblank;
+ XdripperB, 0,
+ XdripperB, 1,
+ XdripperB, 2,
+ XdripperB, 3,
+ XdripperB, 4,
+ XdripperB, 5,
+ XdripperB, 6,
+ XdripperB, 7,
+ -1,
-/* special case for first 64 entries */
- for(i = 0; i < 64; i++) {
- for(;*map != -1; map += 2) buffer[map[1]][map[0]] = i;
- map++;
- }
+ Xfake_blankB, 0,
+ Xfake_blankB, 1,
+ Xfake_blankB, 2,
+ Xfake_blankB, 3,
+ Xfake_blankB, 4,
+ Xfake_blankB, 5,
+ Xfake_blankB, 6,
+ Xfake_blankB, 7,
+ -1,
-/* now regular entries */
- for(i = 0; i < 896 * 16; i += 16) {
- for(;*map != -1; map += 2) buffer[map[1]][map[0]] = i;
- map++;
- }
+ Xfake_grassB, 0,
+ Xfake_grassB, 1,
+ Xfake_grassB, 2,
+ Xfake_grassB, 3,
+ Xfake_grassB, 4,
+ Xfake_grassB, 5,
+ Xfake_grassB, 6,
+ Xfake_grassB, 7,
+ -1,
- printf("/* map tiles to coords */\n");
- printf("const unsigned short map_obj[8][%d] = {\n", TILE_MAX);
- for(i = 0; i < 8;) {
- printf("{\n");
- print_buffer(buffer[7 - i], TILE_MAX);
- printf("}%s", ++i == 8 ? "\n" : ",");
- }
- printf("};\n");
-#endif
-}
-void print_spr(void)
-{
- int i,j,k;
- int *map = spr_map;
- int buffer[2][8][SPR_MAX];
+ Xfake_door_1, 0,
+ Xfake_door_1, 1,
+ Xfake_door_1, 2,
+ Xfake_door_1, 3,
+ Xfake_door_1, 4,
+ Xfake_door_1, 5,
+ Xfake_door_1, 6,
+ Xfake_door_1, 7,
+ Xfake_door_2, 0,
+ Xfake_door_2, 1,
+ Xfake_door_2, 2,
+ Xfake_door_2, 3,
+ Xfake_door_2, 4,
+ Xfake_door_2, 5,
+ Xfake_door_2, 6,
+ Xfake_door_2, 7,
+ Xfake_door_3, 0,
+ Xfake_door_3, 1,
+ Xfake_door_3, 2,
+ Xfake_door_3, 3,
+ Xfake_door_3, 4,
+ Xfake_door_3, 5,
+ Xfake_door_3, 6,
+ Xfake_door_3, 7,
+ Xfake_door_4, 0,
+ Xfake_door_4, 1,
+ Xfake_door_4, 2,
+ Xfake_door_4, 3,
+ Xfake_door_4, 4,
+ Xfake_door_4, 5,
+ Xfake_door_4, 6,
+ Xfake_door_4, 7,
+ Xfake_door_5, 0,
+ Xfake_door_5, 1,
+ Xfake_door_5, 2,
+ Xfake_door_5, 3,
+ Xfake_door_5, 4,
+ Xfake_door_5, 5,
+ Xfake_door_5, 6,
+ Xfake_door_5, 7,
+ Xfake_door_6, 0,
+ Xfake_door_6, 1,
+ Xfake_door_6, 2,
+ Xfake_door_6, 3,
+ Xfake_door_6, 4,
+ Xfake_door_6, 5,
+ Xfake_door_6, 6,
+ Xfake_door_6, 7,
+ Xfake_door_7, 0,
+ Xfake_door_7, 1,
+ Xfake_door_7, 2,
+ Xfake_door_7, 3,
+ Xfake_door_7, 4,
+ Xfake_door_7, 5,
+ Xfake_door_7, 6,
+ Xfake_door_7, 7,
+ Xfake_door_8, 0,
+ Xfake_door_8, 1,
+ Xfake_door_8, 2,
+ Xfake_door_8, 3,
+ Xfake_door_8, 4,
+ Xfake_door_8, 5,
+ Xfake_door_8, 6,
+ Xfake_door_8, 7,
+ -1,
- while(*map < SPR_MAX) {
- i = *map++;
- j = *map++;
- for(k = 0; k < 8; k++) buffer[j][k][i] = *map++;
- }
+ Xsteel_1, 0,
+ Xsteel_1, 1,
+ Xsteel_1, 2,
+ Xsteel_1, 3,
+ Xsteel_1, 4,
+ Xsteel_1, 5,
+ Xsteel_1, 6,
+ Xsteel_1, 7,
+ -1,
+ Xsteel_2, 0,
+ Xsteel_2, 1,
+ Xsteel_2, 2,
+ Xsteel_2, 3,
+ Xsteel_2, 4,
+ Xsteel_2, 5,
+ Xsteel_2, 6,
+ Xsteel_2, 7,
+ -1,
+ Xsteel_3, 0,
+ Xsteel_3, 1,
+ Xsteel_3, 2,
+ Xsteel_3, 3,
+ Xsteel_3, 4,
+ Xsteel_3, 5,
+ Xsteel_3, 6,
+ Xsteel_3, 7,
+ -1,
+ Xsteel_4, 0,
+ Xsteel_4, 1,
+ Xsteel_4, 2,
+ Xsteel_4, 3,
+ Xsteel_4, 4,
+ Xsteel_4, 5,
+ Xsteel_4, 6,
+ Xsteel_4, 7,
+ -1,
+ Xwall_1, 0,
+ Xwall_1, 1,
+ Xwall_1, 2,
+ Xwall_1, 3,
+ Xwall_1, 4,
+ Xwall_1, 5,
+ Xwall_1, 6,
+ Xwall_1, 7,
+ -1,
+ Xwall_2, 0,
+ Xwall_2, 1,
+ Xwall_2, 2,
+ Xwall_2, 3,
+ Xwall_2, 4,
+ Xwall_2, 5,
+ Xwall_2, 6,
+ Xwall_2, 7,
+ -1,
+ Xwall_3, 0,
+ Xwall_3, 1,
+ Xwall_3, 2,
+ Xwall_3, 3,
+ Xwall_3, 4,
+ Xwall_3, 5,
+ Xwall_3, 6,
+ Xwall_3, 7,
+ -1,
+ Xwall_4, 0,
+ Xwall_4, 1,
+ Xwall_4, 2,
+ Xwall_4, 3,
+ Xwall_4, 4,
+ Xwall_4, 5,
+ Xwall_4, 6,
+ Xwall_4, 7,
+ -1,
+ Xround_wall_1, 0,
+ Xround_wall_1, 1,
+ Xround_wall_1, 2,
+ Xround_wall_1, 3,
+ Xround_wall_1, 4,
+ Xround_wall_1, 5,
+ Xround_wall_1, 6,
+ Xround_wall_1, 7,
+ -1,
+ Xround_wall_2, 0,
+ Xround_wall_2, 1,
+ Xround_wall_2, 2,
+ Xround_wall_2, 3,
+ Xround_wall_2, 4,
+ Xround_wall_2, 5,
+ Xround_wall_2, 6,
+ Xround_wall_2, 7,
+ -1,
+ Xround_wall_3, 0,
+ Xround_wall_3, 1,
+ Xround_wall_3, 2,
+ Xround_wall_3, 3,
+ Xround_wall_3, 4,
+ Xround_wall_3, 5,
+ Xround_wall_3, 6,
+ Xround_wall_3, 7,
+ -1,
+ Xround_wall_4, 0,
+ Xround_wall_4, 1,
+ Xround_wall_4, 2,
+ Xround_wall_4, 3,
+ Xround_wall_4, 4,
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 Xdecor_9, 2,
+ Xdecor_9, 3,
+ Xdecor_9, 4,
+ Xdecor_9, 5,
+ Xdecor_9, 6,
+ Xdecor_9, 7,
+ -1,
+ Xdecor_10, 0,
+ Xdecor_10, 1,
+ Xdecor_10, 2,
+ Xdecor_10, 3,
+ Xdecor_10, 4,
+ Xdecor_10, 5,
+ Xdecor_10, 6,
+ Xdecor_10, 7,
+ -1,
+ Xdecor_11, 0,
+ Xdecor_11, 1,
+ Xdecor_11, 2,
+ Xdecor_11, 3,
+ Xdecor_11, 4,
+ Xdecor_11, 5,
+ Xdecor_11, 6,
+ Xdecor_11, 7,
+ -1,
+ Xdecor_12, 0,
+ Xdecor_12, 1,
+ Xdecor_12, 2,
+ Xdecor_12, 3,
+ Xdecor_12, 4,
+ Xdecor_12, 5,
+ Xdecor_12, 6,
+ Xdecor_12, 7,
+ -1,
+ Xalpha_excla, 0,
+ Xalpha_excla, 1,
+ Xalpha_excla, 2,
+ Xalpha_excla, 3,
+ Xalpha_excla, 4,
+ Xalpha_excla, 5,
+ Xalpha_excla, 6,
+ Xalpha_excla, 7,
+ -1,
+ Xalpha_quote, 0,
+ Xalpha_quote, 1,
+ Xalpha_quote, 2,
+ Xalpha_quote, 3,
+ Xalpha_quote, 4,
+ Xalpha_quote, 5,
+ Xalpha_quote, 6,
+ Xalpha_quote, 7,
+ -1,
+ Xalpha_comma, 0,
+ Xalpha_comma, 1,
+ Xalpha_comma, 2,
+ Xalpha_comma, 3,
+ Xalpha_comma, 4,
+ Xalpha_comma, 5,
+ Xalpha_comma, 6,
+ Xalpha_comma, 7,
+ -1,
+ Xalpha_minus, 0,
+ Xalpha_minus, 1,
+ Xalpha_minus, 2,
+ Xalpha_minus, 3,
+ Xalpha_minus, 4,
+ Xalpha_minus, 5,
+ Xalpha_minus, 6,
+ Xalpha_minus, 7,
+ -1,
+ Xalpha_perio, 0,
+ Xalpha_perio, 1,
+ Xalpha_perio, 2,
+ Xalpha_perio, 3,
+ Xalpha_perio, 4,
+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xalpha_8, 2,
+ Xalpha_8, 3,
+ Xalpha_8, 4,
+ Xalpha_8, 5,
+ Xalpha_8, 6,
+ Xalpha_8, 7,
+ -1,
+ Xalpha_9, 0,
+ Xalpha_9, 1,
+ Xalpha_9, 2,
+ Xalpha_9, 3,
+ Xalpha_9, 4,
+ Xalpha_9, 5,
+ Xalpha_9, 6,
+ Xalpha_9, 7,
+ -1,
+ Xalpha_colon, 0,
+ Xalpha_colon, 1,
+ Xalpha_colon, 2,
+ Xalpha_colon, 3,
+ Xalpha_colon, 4,
+ Xalpha_colon, 5,
+ Xalpha_colon, 6,
+ Xalpha_colon, 7,
+ -1,
+ Xalpha_arrow_w, 0,
+ Xalpha_arrow_w, 1,
+ Xalpha_arrow_w, 2,
+ Xalpha_arrow_w, 3,
+ Xalpha_arrow_w, 4,
+ Xalpha_arrow_w, 5,
+ Xalpha_arrow_w, 6,
+ Xalpha_arrow_w, 7,
+ -1,
+ Xalpha_arrow_e, 0,
+ Xalpha_arrow_e, 1,
+ Xalpha_arrow_e, 2,
+ Xalpha_arrow_e, 3,
+ Xalpha_arrow_e, 4,
+ Xalpha_arrow_e, 5,
+ Xalpha_arrow_e, 6,
+ Xalpha_arrow_e, 7,
+ -1,
+ Xalpha_quest, 0,
+ Xalpha_quest, 1,
+ Xalpha_quest, 2,
+ Xalpha_quest, 3,
+ Xalpha_quest, 4,
+ Xalpha_quest, 5,
+ Xalpha_quest, 6,
+ Xalpha_quest, 7,
+ -1,
+ Xalpha_a, 0,
+ Xalpha_a, 1,
+ Xalpha_a, 2,
+ Xalpha_a, 3,
+ Xalpha_a, 4,
+ Xalpha_a, 5,
+ Xalpha_a, 6,
+ Xalpha_a, 7,
+ -1,
+ Xalpha_b, 0,
+ Xalpha_b, 1,
+ Xalpha_b, 2,
+ Xalpha_b, 3,
+ Xalpha_b, 4,
+ Xalpha_b, 5,
+ Xalpha_b, 6,
+ Xalpha_b, 7,
+ -1,
+ Xalpha_c, 0,
+ Xalpha_c, 1,
+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xalpha_t, 5,
+ Xalpha_t, 6,
+ Xalpha_t, 7,
+ -1,
+ Xalpha_u, 0,
+ Xalpha_u, 1,
+ Xalpha_u, 2,
+ Xalpha_u, 3,
+ Xalpha_u, 4,
+ Xalpha_u, 5,
+ Xalpha_u, 6,
+ Xalpha_u, 7,
+ -1,
+ Xalpha_v, 0,
+ Xalpha_v, 1,
+ Xalpha_v, 2,
+ Xalpha_v, 3,
+ Xalpha_v, 4,
+ Xalpha_v, 5,
+ Xalpha_v, 6,
+ Xalpha_v, 7,
+ -1,
+ Xalpha_w, 0,
+ Xalpha_w, 1,
+ Xalpha_w, 2,
+ Xalpha_w, 3,
+ Xalpha_w, 4,
+ Xalpha_w, 5,
+ Xalpha_w, 6,
+ Xalpha_w, 7,
+ -1,
+ Xalpha_x, 0,
+ Xalpha_x, 1,
+ Xalpha_x, 2,
+ Xalpha_x, 3,
+ Xalpha_x, 4,
+ Xalpha_x, 5,
+ Xalpha_x, 6,
+ Xalpha_x, 7,
+ -1,
+ Xalpha_y, 0,
+ Xalpha_y, 1,
+ Xalpha_y, 2,
+ Xalpha_y, 3,
+ Xalpha_y, 4,
+ Xalpha_y, 5,
+ Xalpha_y, 6,
+ Xalpha_y, 7,
+ -1,
+ Xalpha_z, 0,
+ Xalpha_z, 1,
+ Xalpha_z, 2,
+ Xalpha_z, 3,
+ Xalpha_z, 4,
+ Xalpha_z, 5,
+ Xalpha_z, 6,
+ Xalpha_z, 7,
+ -1,
+ Xalpha_copyr, 0,
+ Xalpha_copyr, 1,
+ Xalpha_copyr, 2,
+ Xalpha_copyr, 3,
+ Xalpha_copyr, 4,
+ Xalpha_copyr, 5,
+ Xalpha_copyr, 6,
+ Xalpha_copyr, 7,
+ -1,
- printf("/* map sprites to coords */\n");
- printf("const unsigned short map_spr[2][8][%d] = {\n", SPR_MAX);
- for(i = 0; i < 2;) {
- printf("{\n");
- for(j = 0; j < 8;) {
- printf("\t{ ");
- for(k = 0; k < SPR_MAX;) {
- printf("%d", buffer[i][7 - j][k]);
- printf("%s", ++k == SPR_MAX ? "" : ",");
- }
- printf(" }%s\n", ++j == 8 ? "" : ",");
- }
- printf("}%s", ++i == 2 ? "\n" : ",");
- }
- printf("};\n");
-}
-void print_ttl(void)
-{
- int i,j,k;
- int buffer[128];
+ Yball_eat, 7,
+ Yball_eat, 6,
+ Yball_eat, 5,
+ Xboom_2, 7,
+ Xboom_2, 6,
+ Xboom_2, 5,
+ -1,
+ Yball_eat, 4,
+ Yball_eat, 3,
+ Yball_eat, 2,
+ Xboom_2, 4,
+ Xboom_2, 3,
+ Xboom_2, 2,
+ -1,
+ Yball_eat, 1,
+ Yball_eat, 0,
+ Xboom_2, 1,
+ Xboom_2, 0,
+ Xboom_1, 7,
+ -1,
+ Xboom_1, 6,
+ Xboom_1, 5,
+ Xboom_android, 7,
+ -1,
+ Xboom_1, 4,
+ Xboom_1, 3,
+ Xboom_bug, 4,
+ Xboom_bomb, 4,
+ Xboom_bug, 3,
+ Xboom_bomb, 3,
+ -1,
+ Xboom_1, 2,
+ Xboom_1, 1,
+ Xboom_bug, 6,
+ Xboom_bomb, 6,
+ Xboom_bug, 5,
+ Xboom_bomb, 5,
+ Xboom_bug, 2,
+ Xboom_bomb, 2,
+ Xboom_bug, 1,
+ Xboom_bomb, 1,
+ -1,
+ Xboom_bug, 0,
+ Xboom_bug, 7,
+ Xboom_bomb, 0,
+ Xboom_bomb, 7,
+ Xboom_1, 0,
+ Ybug_stone, 7,
+ Ybug_spring, 7,
+ Ytank_stone, 7,
+ Ytank_spring, 7,
+ Yeater_stone, 7,
+ Yeater_spring, 7,
+ Yalien_stone, 7,
+ Yalien_spring, 7,
+ Ybomb_eat, 7,
+ -1
+};
- for(i = 0; i < 128; i++) {
- if(ttl_map[i] == -1) {
- buffer[i] = -1;
- } else {
- j = (ttl_map[i] % 22) * 14;
- k = (ttl_map[i] / 22);
- buffer[i] = k * 320 + j;
- }
- }
- printf("/* map ascii to coords */\n");
- printf("const unsigned short map_ttl[128] = {\n");
- print_buffer(buffer, 128);
- printf("};\n");
-}
-int main_OLD(void)
+int spr_map[] =
{
- printf("/* THIS FILE AUTOMATICALLY GENERATED */\n\n");
- print_tab(tile_blank, "tab_blank", "0=stop 1=blank");
- print_tab(tile_acid, "tab_acid", "0=stop 1=acid");
- print_tab(tile_ameuba, "tab_ameuba", "0=stop 1=ameuba");
- print_tab(tile_android_move, "tab_android_move", "0=stop 1=move");
- print_explode();
- print_obj();
- print_spr();
- print_ttl();
- return(0);
-}
-
-#endif
+ SPR_walk + 0, 0, 0, 1, 2, 3, 4, 5, 6, 7,
+ SPR_walk + 1, 0, 8, 9, 10, 11, 12, 13, 14, 15,
+ SPR_walk + 2, 0, 16, 17, 18, 19, 20, 21, 22, 23,
+ SPR_walk + 3, 0, 24, 25, 26, 27, 28, 29, 30, 31,
+ SPR_push+0, 0, 32, 33, 34, 35, 36, 35, 34, 33,
+ SPR_push+1, 0, 37, 38, 39, 40, 41, 40, 39, 38,
+ SPR_push+2, 0, 42, 43, 44, 45, 46, 45, 44, 43,
+ SPR_push+3, 0, 47, 48, 49, 50, 51, 50, 49, 48,
+ SPR_spray+0, 0, 52, 52, 52, 52, 52, 52, 52, 52,
+ SPR_spray+1, 0, 53, 53, 53, 53, 53, 53, 53, 53,
+ SPR_spray+2, 0, 54, 54, 54, 54, 54, 54, 54, 54,
+ SPR_spray+3, 0, 55, 55, 55, 55, 55, 55, 55, 55,
+ SPR_walk + 0, 1, 56, 57, 58, 59, 60, 61, 62, 63,
+ SPR_walk + 1, 1, 64, 65, 66, 67, 68, 69, 70, 71,
+ SPR_walk + 2, 1, 72, 73, 74, 75, 76, 77, 78, 79,
+ SPR_walk + 3, 1, 80, 81, 82, 83, 84, 85, 86, 87,
+ SPR_push + 0, 1, 88, 89, 90, 91, 92, 91, 90, 89,
+ SPR_push + 1, 1, 93, 94, 95, 96, 97, 96, 95, 94,
+ SPR_push + 2, 1, 98, 99, 100, 101, 102, 101, 100, 99,
+ SPR_push + 3, 1, 103, 104, 105, 106, 107, 106, 105, 104,
+ SPR_spray + 0, 1, 108, 108, 108, 108, 108, 108, 108, 108,
+ SPR_spray + 1, 1, 109, 109, 109, 109, 109, 109, 109, 109,
+ SPR_spray + 2, 1, 110, 110, 110, 110, 110, 110, 110, 110,
+ SPR_spray + 3, 1, 111, 111, 111, 111, 111, 111, 111, 111,
+ SPR_still, 0, 112, 112, 112, 112, 112, 112, 112, 112,
+ SPR_still, 1, 113, 113, 113, 113, 113, 113, 113, 113,
+ SPR_MAX
+};
-/* ------------------------------------------------------------------------- */
/* 0=stop 1=blank */
unsigned char tab_blank[TILE_MAX];
#if 0
int debug = 0;
+
for(i = 0; i < 8; i++)
for(j = 0; j < TILE_MAX; j++)
buffer[i][j] = 0;
+
for(i = 0; i < 64; i++)
{
for(;*map != -1; map += 2)
{
if (map[0] < 0 || map[0] >= TILE_MAX || map[1] < 0 || map[1] >= 8)
{
- fprintf(stderr, "obj_map: bad tile (%d,%d) @ %d+%d\n",
+ fprintf(stderr, "obj_map: bad tile (%d, %d) @ %d+%d\n",
map[0], map[1], i / 16, i % 16);
debug = 1;
continue;
}
map++;
}
+
for(i = 0; i < 896; i++)
{
for(;*map != -1; map += 2)
{
if (map[0] < 0 || map[0] >= TILE_MAX || map[1] < 0 || map[1] >= 8)
{
- fprintf(stderr, "obj_map: bad tile (%d,%d) @ %d\n", map[0], map[1], i);
+ fprintf(stderr, "obj_map: bad tile (%d, %d) @ %d\n", map[0], map[1], i);
debug = 1;
continue;
}
}
map++;
}
+
for(i = 0; i < TILE_MAX; i++)
{
for(j = 0; j < 8; j++)
switch(buffer[j][i])
{
case 0:
- fprintf(stderr, "obj_map: uninitialized (%d,%d)\n", i, j);
+ fprintf(stderr, "obj_map: uninitialized (%d, %d)\n", i, j);
debug = 1;
break;
case 1:
break; /* good */
default:
- fprintf(stderr, "obj_map: duplicate (%d,%d)\n", i, j);
+ fprintf(stderr, "obj_map: duplicate (%d, %d)\n", i, j);
debug = 1;
break;
}
if(sizeof(obj_map) / sizeof(*obj_map) != map - obj_map)
{
- fprintf(stderr, "obj_map: bad end (%d != %d)\n",
+ fprintf(stderr, "obj_map: bad end (%d != %d)\n",
sizeof(obj_map) / sizeof(*obj_map), map - obj_map);
debug = 1;
}
+
if(debug == 0)
fprintf(stderr, "obj_map: looks good, now disable debug code\n");
+
abort();
#else
map_spr[i][j][k] = buffer[i][7 - j][k];
}
-void create_ttl()
-{
-#if 0
- int i, j, k;
- int buffer[128];
-
- for(i = 0; i < 128; i++)
- {
- if(ttl_map[i] == -1)
- {
- buffer[i] = -1;
- }
- else
- {
-#if 1
- j = (ttl_map[i] % 22) * (14 * 2);
- k = (ttl_map[i] / 22);
- buffer[i] = k * (320 * 2) + j;
-#else
- j = (ttl_map[i] % 22) * 14;
- k = (ttl_map[i] / 22);
- buffer[i] = k * 320 + j;
-#endif
- }
- }
-
- for (i = 0; i < 128; i++)
- map_ttl[i] = buffer[i];
-#endif
-}
-
void tab_generate()
{
create_tab(tile_blank, tab_blank);
create_explode();
create_obj();
create_spr();
- create_ttl();
}
#endif
int buffer[65536];
-#if 0
-
-void print_buffer(int *buffer, int count)
-{
- int i,j;
- j = 0;
- for(i = 0; i < count;) {
- if(j > 80) { j=0; printf("\n"); }
- if(j == 0) printf("\t");
- j += printf("%d", buffer[i]);
- j += printf("%s", ++i == count ? "" : ",");
- }
- if(j) printf("\n");
-}
-int main_OLD(void)
-{
- int i;
- printf("/* THIS FILE AUTOMATICALLY GENERATED */\n");
- printf("\n#if defined(LINUX) || defined(BSD)\n");
- printf("\n/* convert from 8 bit ulaw to signed 16 bit linear */\n");
- printf("const short ulaw_to_linear[256] = {\n");
- for(i = 0; i < 256; i++) {
- buffer[i] = calc_ulaw_to_linear(i);
- }
- print_buffer(buffer, 256);
- printf("};\n");
- printf("\n/* convert from signed 16 bit linear to 8 bit ulaw */\n");
- printf("const unsigned char linear_to_ulaw[65536] = {\n");
- for(i = -32768; i < 32768; i++) {
- buffer[i + 32768] = calc_linear_to_ulaw(i);
- }
- print_buffer(buffer, 65536);
- printf("};\n");
- printf("\n#endif /* defined(LINUX) || defined(BSD) */\n");
- return(0);
-}
-
-#endif
-
/* convert from 8 bit ulaw to signed 16 bit linear */
short ulaw_to_linear[256];
int calc_ulaw_to_linear(unsigned char ulawbyte)
{
- static int exp_lut[8] = { 0, 132, 396, 924, 1980, 4092, 8316, 16764 };
- int sign, exponent, mantissa, sample;
-
- ulawbyte = ~ ulawbyte;
- sign = ( ulawbyte & 0x80 );
- exponent = ( ulawbyte >> 4 ) & 0x07;
- mantissa = ulawbyte & 0x0F;
- sample = exp_lut[exponent] + ( mantissa << ( exponent + 3 ) );
- if (sign != 0)
- sample = -sample;
-
- return(sample);
+ static int exp_lut[8] = { 0, 132, 396, 924, 1980, 4092, 8316, 16764 };
+ int sign, exponent, mantissa, sample;
+
+ ulawbyte = ~ ulawbyte;
+ sign = ( ulawbyte & 0x80 );
+ exponent = ( ulawbyte >> 4 ) & 0x07;
+ mantissa = ulawbyte & 0x0F;
+ sample = exp_lut[exponent] + ( mantissa << ( exponent + 3 ) );
+ if (sign != 0)
+ sample = -sample;
+
+ return(sample);
}
/*
unsigned char calc_linear_to_ulaw(int sample)
{
- static int exp_lut[256] =
- {
- 0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,
- 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
- 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
- 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
- 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
- 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
- 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
- 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
- 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
- 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
- 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
- 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
- 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
- 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
- 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
- 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7
- };
-
- int sign, exponent, mantissa;
- unsigned char ulawbyte;
+ static int exp_lut[256] =
+ {
+ 0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,
+ 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
+ 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
+ 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
+ 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
+ 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
+ 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
+ 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
+ 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
+ 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
+ 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
+ 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
+ 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
+ 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
+ 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
+ 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7
+ };
+
+ int sign, exponent, mantissa;
+ unsigned char ulawbyte;
/* Get the sample into sign-magnitude. */
- sign = (sample >> 8) & 0x80; /* set aside the sign */
- if (sign != 0)
- sample = -sample; /* get magnitude */
- if (sample > CLIP)
- sample = CLIP; /* clip the magnitude */
+ sign = (sample >> 8) & 0x80; /* set aside the sign */
+ if (sign != 0)
+ sample = -sample; /* get magnitude */
+ if (sample > CLIP)
+ sample = CLIP; /* clip the magnitude */
/* Convert from 16 bit linear to ulaw. */
- sample = sample + BIAS;
- exponent = exp_lut[( sample >> 7 ) & 0xFF];
- mantissa = ( sample >> ( exponent + 3 ) ) & 0x0F;
- ulawbyte = ~ ( sign | ( exponent << 4 ) | mantissa );
+ sample = sample + BIAS;
+ exponent = exp_lut[( sample >> 7 ) & 0xFF];
+ mantissa = ( sample >> ( exponent + 3 ) ) & 0x0F;
+ ulawbyte = ~ ( sign | ( exponent << 4 ) | mantissa );
#ifdef ZEROTRAP
- if (ulawbyte == 0)
- ulawbyte = 0x02; /* optional CCITT trap */
+ if (ulawbyte == 0)
+ ulawbyte = 0x02; /* optional CCITT trap */
#endif
- return(ulawbyte);
+ return(ulawbyte);
}
#endif /* defined(PLATFORM_LINUX) || defined(PLATFORM_BSD) */