/* fire_p.c (comment5.c) - Don Yang (uguu.org) Preprocessed version of fire.c. Variable translations: fire_p.c: fire.c: r Rnd() i i j RndIndex k RndTable a spark1 b spark2 s shift d dir w skip p Palette q AltPalette f Fire t Text o OldImage n Image x Screen Other than that, most constants are in decimal, and all other comments are removed. Some statements are rearranged/removed. 11/29/98: main */ #include #include #define r k[j = (j + 1) & 32767] int p[] = { 1024, 688, 2736, 2737, 10930, 11184, 16304, 12209, 16305, 12210, 16306, 32688, 32689, 32690, 20443, 20443, 20443}, *q, o[2000], n[2000], f[2162], s, d = 1, w, a = 20, b = 60, _far *x = (int _far *)0xb8000000L; char *t; unsigned i, j; unsigned char k[32768]; void cdecl main() { for(i = w = s = 0; i < 2000;) o[i++] = x[i]; for(i = 0; i < 32768;) k[i++] = (unsigned char)(rand() & 63); q = p + 1; t = (char *)&n[992]; while( !kbhit() ) { for(i = 0; i < 162;) f[2000 + i++] = r + s; f[2000 + a] = 255; f[2000 + b] = 0; if( r & 1 ) a++; else a += 79; if( r & 1 ) b++; else b += 79; a %= 80; b %= 80; w = (w + 1) & 3; if( !w ) { s += d; if( !s || s > 191 ) d = -d; } for(i = 0; i < 2000;) f[i++] = (f[i+80] * 16 + f[i+160] * 14 + f[i+161] + f[i+162]) >> 5; for(i = 0; i < 2000;) n[i++] = (f[i] & 15 > r & 15) ? p[f[i] >> 4] : q[f[i] >> 4]; *t = 68; t[4] = 79; t[8] = 78; t[16] = 89; t[20] = 65; t[24] = 78; t[28] = 71; while( inp(986) & 8 ); while( !(inp(986) & 8) ); for(i = 0; i < 2000;) x[i++] = n[i]; } if( !getch() ) getch(); for(i = 0; i < 2000;) x[i++] = o[i]; }