#define PIX_DOOR 1
#define PIX_HEROES 2
#define PIX_TOONS 3
-#define PIX_BIGFONT 4
-#define PIX_SMALLFONT 5
+#define PIX_MORE 4
+#define PIX_BIGFONT 5
+#define PIX_SMALLFONT 6
/* Pixmaps without them */
-#define PIX_DB_BACK 6
-#define PIX_DB_DOOR 7
-#define PIX_DB_FIELD 8
+#define PIX_DB_BACK 7
+#define PIX_DB_DOOR 8
+#define PIX_DB_FIELD 9
-#define NUM_PICTURES 6
-#define NUM_PIXMAPS 9
+#define NUM_PICTURES 7
+#define NUM_PIXMAPS 10
/* boundaries of arrays etc. */
#define MAX_NAMELEN (10+1)
#define MINI_GFX_PER_LINE 32
#define MICRO_GFX_PER_LINE 128
#define HEROES_PER_LINE 16
+#define MINI_MORE_STARTX 0
+#define MINI_MORE_STARTY 160
+#define MICRO_MORE_STARTX 0
+#define MICRO_MORE_STARTY 208
+#define MORE_PER_LINE 8
+#define MINI_MORE_PER_LINE 16
+#define MICRO_MORE_PER_LINE 16
#define FONT_CHARS_PER_LINE 16
#define FONT_LINES_PER_FONT 4
#define EL_MAUER_Y 201
#define EL_MAUER_XY 202
-#define EL_UNUSED_200 203
-/* ... */
+#define EL_UNUSED_203 203
+#define EL_UNUSED_204 204
+#define EL_UNUSED_205 205
+#define EL_UNUSED_206 206
+#define EL_UNUSED_207 207
+#define EL_UNUSED_208 208
+#define EL_UNUSED_209 209
+
+#define EL_SP_START 210
+#define EL_SP_EMPTY (EL_SP_START + 0)
+#define EL_SP_ZONK (EL_SP_START + 1)
+#define EL_SP_BASE (EL_SP_START + 2)
+#define EL_SP_MURPHY (EL_SP_START + 3)
+#define EL_SP_INFOTRON (EL_SP_START + 4)
+#define EL_SP_CHIP_SINGLE (EL_SP_START + 5)
+#define EL_SP_HARD_GRAY (EL_SP_START + 6)
+#define EL_SP_EXIT (EL_SP_START + 7)
+#define EL_SP_DISK_ORANGE (EL_SP_START + 8)
+#define EL_SP_PORT1_RIGHT (EL_SP_START + 9)
+#define EL_SP_PORT1_DOWN (EL_SP_START + 10)
+#define EL_SP_PORT1_LEFT (EL_SP_START + 11)
+#define EL_SP_PORT1_UP (EL_SP_START + 12)
+#define EL_SP_PORT2_RIGHT (EL_SP_START + 13)
+#define EL_SP_PORT2_DOWN (EL_SP_START + 14)
+#define EL_SP_PORT2_LEFT (EL_SP_START + 15)
+#define EL_SP_PORT2_UP (EL_SP_START + 16)
+#define EL_SP_SNIKSNAK (EL_SP_START + 17)
+#define EL_SP_DISK_YELLOW (EL_SP_START + 18)
+#define EL_SP_TERMINAL (EL_SP_START + 19)
+#define EL_SP_DISK_RED (EL_SP_START + 20)
+#define EL_SP_PORT_Y (EL_SP_START + 21)
+#define EL_SP_PORT_X (EL_SP_START + 22)
+#define EL_SP_PORT_XY (EL_SP_START + 23)
+#define EL_SP_ELECTRON (EL_SP_START + 24)
+#define EL_SP_BUG (EL_SP_START + 25)
+#define EL_SP_CHIP_LEFT (EL_SP_START + 26)
+#define EL_SP_CHIP_RIGHT (EL_SP_START + 27)
+#define EL_SP_HARD_BASE1 (EL_SP_START + 28)
+#define EL_SP_HARD_GREEN (EL_SP_START + 29)
+#define EL_SP_HARD_BLUE (EL_SP_START + 30)
+#define EL_SP_HARD_RED (EL_SP_START + 31)
+#define EL_SP_HARD_YELLOW (EL_SP_START + 32)
+#define EL_SP_HARD_BASE2 (EL_SP_START + 33)
+#define EL_SP_HARD_BASE3 (EL_SP_START + 34)
+#define EL_SP_HARD_BASE4 (EL_SP_START + 35)
+#define EL_SP_HARD_BASE5 (EL_SP_START + 36)
+#define EL_SP_HARD_BASE6 (EL_SP_START + 37)
+#define EL_SP_CHIP_UPPER (EL_SP_START + 38)
+#define EL_SP_CHIP_LOWER (EL_SP_START + 39)
+#define EL_SP_END (EL_SP_START + 39)
+
+#define EL_UNUSED_250 250
+#define EL_UNUSED_251 251
+#define EL_UNUSED_252 252
+#define EL_UNUSED_253 253
+#define EL_UNUSED_254 254
#define EL_UNUSED_255 255
/* "unreal" runtime elements */
#define EL_PLAYER_IS_LEAVING 308
/* game graphics:
-** 0 - 255: graphics from "RocksScreen"
+** 0 - 209: graphics from "RocksScreen"
+** 210 - 255: graphics from "RocksMore"
** 256 - 511: graphics from "RocksFont"
** 512 - 767: graphics from "RocksHeroes"
*/
#define GFX_START_ROCKSSCREEN 0
-#define GFX_END_ROCKSSCREEN 255
+#define GFX_END_ROCKSSCREEN 209
+#define GFX_START_ROCKSMORE 210
+#define GFX_END_ROCKSMORE 255
#define GFX_START_ROCKSFONT 256
#define GFX_END_ROCKSFONT 511
#define GFX_START_ROCKSHEROES 512
#define GFX_SCHLUESSEL GFX_SCHLUESSEL1
#define GFX_SPIELFIGUR GFX_SPIELER1
-
/* graphics from "RocksHeroes" */
-
#define GFX_SPIELER1_DOWN (GFX_START_ROCKSHEROES + 0*HEROES_PER_LINE + 0)
#define GFX_SPIELER1_UP (GFX_START_ROCKSHEROES + 0*HEROES_PER_LINE + 4)
#define GFX_SPIELER1_LEFT (GFX_START_ROCKSHEROES + 1*HEROES_PER_LINE + 0)
#define GFX_FLAMMEN_UP (GFX_START_ROCKSHEROES +14*HEROES_PER_LINE + 8)
#define GFX_FLAMMEN_DOWN (GFX_START_ROCKSHEROES +15*HEROES_PER_LINE + 8)
+/* graphics from "RocksMore" */
+#define GFX_SP_EMPTY (GFX_START_ROCKSMORE + 0 * MORE_PRE_LINE + 0)
+#define GFX_SP_ZONK (GFX_START_ROCKSMORE + 0 * MORE_PRE_LINE + 1)
+#define GFX_SP_BASE (GFX_START_ROCKSMORE + 0 * MORE_PRE_LINE + 2)
+#define GFX_SP_MURPHY (GFX_START_ROCKSMORE + 0 * MORE_PRE_LINE + 3)
+#define GFX_SP_INFOTRON (GFX_START_ROCKSMORE + 0 * MORE_PRE_LINE + 4)
+#define GFX_SP_CHIP_SINGLE (GFX_START_ROCKSMORE + 0 * MORE_PRE_LINE + 5)
+#define GFX_SP_HARD_GRAY (GFX_START_ROCKSMORE + 0 * MORE_PRE_LINE + 6)
+#define GFX_SP_EXIT (GFX_START_ROCKSMORE + 0 * MORE_PRE_LINE + 7)
+#define GFX_SP_DISK_ORANGE (GFX_START_ROCKSMORE + 1 * MORE_PRE_LINE + 0)
+#define GFX_SP_PORT1_RIGHT (GFX_START_ROCKSMORE + 1 * MORE_PRE_LINE + 1)
+#define GFX_SP_PORT1_DOWN (GFX_START_ROCKSMORE + 1 * MORE_PRE_LINE + 2)
+#define GFX_SP_PORT1_LEFT (GFX_START_ROCKSMORE + 1 * MORE_PRE_LINE + 3)
+#define GFX_SP_PORT1_UP (GFX_START_ROCKSMORE + 1 * MORE_PRE_LINE + 4)
+#define GFX_SP_PORT2_RIGHT (GFX_START_ROCKSMORE + 1 * MORE_PRE_LINE + 5)
+#define GFX_SP_PORT2_DOWN (GFX_START_ROCKSMORE + 1 * MORE_PRE_LINE + 6)
+#define GFX_SP_PORT2_LEFT (GFX_START_ROCKSMORE + 1 * MORE_PRE_LINE + 7)
+#define GFX_SP_PORT2_UP (GFX_START_ROCKSMORE + 2 * MORE_PRE_LINE + 0)
+#define GFX_SP_SNIKSNAK (GFX_START_ROCKSMORE + 2 * MORE_PRE_LINE + 1)
+#define GFX_SP_DISK_YELLOW (GFX_START_ROCKSMORE + 2 * MORE_PRE_LINE + 2)
+#define GFX_SP_TERMINAL (GFX_START_ROCKSMORE + 2 * MORE_PRE_LINE + 3)
+#define GFX_SP_DISK_RED (GFX_START_ROCKSMORE + 2 * MORE_PRE_LINE + 4)
+#define GFX_SP_PORT_Y (GFX_START_ROCKSMORE + 2 * MORE_PRE_LINE + 5)
+#define GFX_SP_PORT_X (GFX_START_ROCKSMORE + 2 * MORE_PRE_LINE + 6)
+#define GFX_SP_PORT_XY (GFX_START_ROCKSMORE + 2 * MORE_PRE_LINE + 7)
+#define GFX_SP_ELECTRON (GFX_START_ROCKSMORE + 3 * MORE_PRE_LINE + 0)
+#define GFX_SP_BUG (GFX_START_ROCKSMORE + 3 * MORE_PRE_LINE + 1)
+#define GFX_SP_CHIP_LEFT (GFX_START_ROCKSMORE + 3 * MORE_PRE_LINE + 2)
+#define GFX_SP_CHIP_RIGHT (GFX_START_ROCKSMORE + 3 * MORE_PRE_LINE + 3)
+#define GFX_SP_HARD_BASE1 (GFX_START_ROCKSMORE + 3 * MORE_PRE_LINE + 4)
+#define GFX_SP_HARD_GREEN (GFX_START_ROCKSMORE + 3 * MORE_PRE_LINE + 5)
+#define GFX_SP_HARD_BLUE (GFX_START_ROCKSMORE + 3 * MORE_PRE_LINE + 6)
+#define GFX_SP_HARD_RED (GFX_START_ROCKSMORE + 3 * MORE_PRE_LINE + 7)
+#define GFX_SP_HARD_YELLOW (GFX_START_ROCKSMORE + 4 * MORE_PRE_LINE + 0)
+#define GFX_SP_HARD_BASE2 (GFX_START_ROCKSMORE + 4 * MORE_PRE_LINE + 1)
+#define GFX_SP_HARD_BASE3 (GFX_START_ROCKSMORE + 4 * MORE_PRE_LINE + 2)
+#define GFX_SP_HARD_BASE4 (GFX_START_ROCKSMORE + 4 * MORE_PRE_LINE + 3)
+#define GFX_SP_HARD_BASE5 (GFX_START_ROCKSMORE + 4 * MORE_PRE_LINE + 4)
+#define GFX_SP_HARD_BASE6 (GFX_START_ROCKSMORE + 4 * MORE_PRE_LINE + 5)
+#define GFX_SP_CHIP_UPPER (GFX_START_ROCKSMORE + 4 * MORE_PRE_LINE + 6)
+#define GFX_SP_CHIP_LOWER (GFX_START_ROCKSMORE + 4 * MORE_PRE_LINE + 7)
+
/* graphics from "RocksFont" */
#define GFX_CHAR_START (GFX_START_ROCKSFONT)
#define GFX_CHAR_ASCII0 (GFX_CHAR_START-32)
SY + (graphic / GFX_PER_LINE) * TILEY,
TILEX, TILEY, x, y);
}
+ else if (graphic >= GFX_START_ROCKSMORE && graphic <= GFX_END_ROCKSMORE)
+ {
+ graphic -= GFX_START_ROCKSMORE;
+ XCopyArea(display, pix[PIX_MORE], d, gc,
+ (graphic % MORE_PER_LINE) * TILEX,
+ (graphic / MORE_PER_LINE) * TILEY,
+ TILEX, TILEY, x, y);
+ }
else if (graphic >= GFX_START_ROCKSHEROES && graphic <= GFX_END_ROCKSHEROES)
{
graphic -= GFX_START_ROCKSHEROES;
src_x = SX + (graphic % GFX_PER_LINE) * TILEX;
src_y = SY + (graphic / GFX_PER_LINE) * TILEY;
}
+ else if (graphic >= GFX_START_ROCKSMORE && graphic <= GFX_END_ROCKSMORE)
+ {
+ src_pixmap = pix[PIX_MORE];
+ drawing_gc = clip_gc[PIX_MORE];
+ graphic -= GFX_START_ROCKSMORE;
+ src_x = (graphic % MORE_PER_LINE) * TILEX;
+ src_y = (graphic / MORE_PER_LINE) * TILEY;
+ }
else if (graphic >= GFX_START_ROCKSHEROES && graphic <= GFX_END_ROCKSHEROES)
{
src_pixmap = pix[PIX_HEROES];
MINI_GFX_STARTY + (graphic / MINI_GFX_PER_LINE) * MINI_TILEY,
MINI_TILEX, MINI_TILEY, x, y);
}
+ else if (graphic >= GFX_START_ROCKSMORE && graphic <= GFX_END_ROCKSMORE)
+ {
+ graphic -= GFX_START_ROCKSMORE;
+ XCopyArea(display, pix[PIX_MORE], d, gc,
+ MINI_MORE_STARTX + (graphic % MINI_MORE_PER_LINE) * MINI_TILEX,
+ MINI_MORE_STARTY + (graphic / MINI_MORE_PER_LINE) * MINI_TILEY,
+ MINI_TILEX, MINI_TILEY, x, y);
+ }
else if (graphic >= GFX_START_ROCKSFONT && graphic <= GFX_END_ROCKSFONT)
{
graphic -= GFX_START_ROCKSFONT;
src_x = SX + (graphic % GFX_PER_LINE) * TILEX + cx;
src_y = SY + (graphic / GFX_PER_LINE) * TILEY + cy;
}
+ else if (graphic >= GFX_START_ROCKSMORE && graphic <= GFX_END_ROCKSMORE)
+ {
+ src_pixmap = pix[PIX_MORE];
+ drawing_gc = clip_gc[PIX_MORE];
+ graphic -= GFX_START_ROCKSMORE;
+ src_x = (graphic % MORE_PER_LINE) * TILEX + cx;
+ src_y = (graphic / MORE_PER_LINE) * TILEY + cy;
+ }
else if (graphic >= GFX_START_ROCKSHEROES && graphic <= GFX_END_ROCKSHEROES)
{
src_pixmap = pix[PIX_HEROES];
graphic = el2gfx(element);
- XCopyArea(display, pix[PIX_BACK], drawto, gc,
- MICRO_GFX_STARTX + (graphic % MICRO_GFX_PER_LINE) * MICRO_TILEX,
- MICRO_GFX_STARTY + (graphic / MICRO_GFX_PER_LINE) * MICRO_TILEY,
- MICRO_TILEX, MICRO_TILEY, xpos, ypos);
+ if (graphic >= GFX_START_ROCKSMORE && graphic <= GFX_END_ROCKSMORE)
+ XCopyArea(display, pix[PIX_MORE], drawto, gc,
+ MICRO_MORE_STARTX + (graphic % MICRO_MORE_PER_LINE) *MICRO_TILEX,
+ MICRO_MORE_STARTY + (graphic / MICRO_MORE_PER_LINE) *MICRO_TILEY,
+ MICRO_TILEX, MICRO_TILEY, xpos, ypos);
+ else
+ XCopyArea(display, pix[PIX_BACK], drawto, gc,
+ MICRO_GFX_STARTX + (graphic % MICRO_GFX_PER_LINE) * MICRO_TILEX,
+ MICRO_GFX_STARTY + (graphic / MICRO_GFX_PER_LINE) * MICRO_TILEY,
+ MICRO_TILEX, MICRO_TILEY, xpos, ypos);
}
void DrawLevel()
{
if (IS_CHAR(element))
return GFX_CHAR_START + (element - EL_CHAR_START);
+ else if (element >= EL_SP_START && element <= EL_SP_END)
+ return GFX_START_ROCKSMORE + (element - EL_SP_START);
else
return -1;
}