From: Holger Schemel Date: Sun, 8 Sep 2002 12:53:32 +0000 (+0200) Subject: rnd-20020908-2-src X-Git-Tag: 3.0.0^2~246 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=1f877ca17e3eee9b2ea66fe2d7378be88fec3501;p=rocksndiamonds.git rnd-20020908-2-src --- diff --git a/src/conftime.h b/src/conftime.h index 23db0bd8..0a421ef7 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "[2002-09-08 11:38]" +#define COMPILE_DATE_STRING "[2002-09-08 14:51]" diff --git a/src/init.c b/src/init.c index f2d07f41..93e2958f 100644 --- a/src/init.c +++ b/src/init.c @@ -29,6 +29,7 @@ static char *image_filename[NUM_PICTURES] = { "RocksScreen.pcx", + "RocksElements.pcx", "RocksDoor.pcx", "RocksHeroes.pcx", "RocksToons.pcx", diff --git a/src/main.h b/src/main.h index aa5f6296..986b53a0 100644 --- a/src/main.h +++ b/src/main.h @@ -158,20 +158,21 @@ /* Bitmaps with graphic file */ #define PIX_BACK 0 -#define PIX_DOOR 1 -#define PIX_HEROES 2 -#define PIX_TOONS 3 -#define PIX_SP 4 -#define PIX_DC 5 -#define PIX_MORE 6 -#define PIX_BIGFONT 7 -#define PIX_SMALLFONT 8 -#define PIX_MEDIUMFONT 9 +#define PIX_ELEMENTS 1 +#define PIX_DOOR 2 +#define PIX_HEROES 3 +#define PIX_TOONS 4 +#define PIX_SP 5 +#define PIX_DC 6 +#define PIX_MORE 7 +#define PIX_BIGFONT 8 +#define PIX_SMALLFONT 9 +#define PIX_MEDIUMFONT 10 /* Bitmaps without graphic file */ -#define PIX_DB_DOOR 10 -#define PIX_DB_FIELD 11 +#define PIX_DB_DOOR 11 +#define PIX_DB_FIELD 12 -#define NUM_PICTURES 10 +#define NUM_PICTURES 11 #define NUM_BITMAPS 12 /* boundaries of arrays etc. */ @@ -456,12 +457,10 @@ extern struct FileInfo *image_files, *sound_files; #define MICROLEV_YPOS (SX + 12 * TILEY - MICRO_TILEY) #define MICROLABEL_YPOS (MICROLEV_YPOS + MICROLEV_YSIZE + 7) -#define GFX_STARTX SX -#define GFX_STARTY SY -#define MINI_GFX_STARTX SX -#define MINI_GFX_STARTY 424 -#define MICRO_GFX_STARTX SX -#define MICRO_GFX_STARTY 536 +#define MINI_GFX_STARTX 0 +#define MINI_GFX_STARTY 416 +#define MICRO_GFX_STARTX 0 +#define MICRO_GFX_STARTY 528 #define GFX_PER_LINE 16 #define MINI_GFX_PER_LINE 32 #define MICRO_GFX_PER_LINE 128 @@ -894,7 +893,7 @@ extern struct FileInfo *image_files, *sound_files; #define EL_MAGIC_WALL_BD_FILLING 612 /* game graphics: -** 0 - 255: graphics from "RocksScreen" +** 0 - 255: graphics from "RocksElements" ** 256 - 511: graphics from "RocksFont" ** 512 - 767: graphics from "RocksHeroes" ** 768 - 1023: graphics from "RocksSP" @@ -902,8 +901,8 @@ extern struct FileInfo *image_files, *sound_files; ** 1280 - 1535: graphics from "RocksMore" */ -#define GFX_START_ROCKSSCREEN 0 -#define GFX_END_ROCKSSCREEN 255 +#define GFX_START_ROCKSELEMENTS 0 +#define GFX_END_ROCKSELEMENTS 255 #define GFX_START_ROCKSFONT 256 #define GFX_END_ROCKSFONT 511 #define GFX_START_ROCKSHEROES 512 diff --git a/src/tools.c b/src/tools.c index 7888e606..8a0ca336 100644 --- a/src/tools.c +++ b/src/tools.c @@ -750,12 +750,13 @@ void getGraphicSource(int graphic, Bitmap **bitmap, int *x, int *y) *x = graphic_info[graphic].src_x; *y = graphic_info[graphic].src_y; } - else if (graphic >= GFX_START_ROCKSSCREEN && graphic <= GFX_END_ROCKSSCREEN) + else if (graphic >= GFX_START_ROCKSELEMENTS && + graphic <= GFX_END_ROCKSELEMENTS) { - graphic -= GFX_START_ROCKSSCREEN; - *bitmap = pix[PIX_BACK]; - *x = SX + (graphic % GFX_PER_LINE) * TILEX; - *y = SY + (graphic / GFX_PER_LINE) * TILEY; + graphic -= GFX_START_ROCKSELEMENTS; + *bitmap = pix[PIX_ELEMENTS]; + *x = (graphic % GFX_PER_LINE) * TILEX; + *y = (graphic / GFX_PER_LINE) * TILEY; } else if (graphic >= GFX_START_ROCKSHEROES && graphic <= GFX_END_ROCKSHEROES) { @@ -882,10 +883,10 @@ void DrawMiniGraphic(int x, int y, int graphic) void getMiniGraphicSource(int graphic, Bitmap **bitmap, int *x, int *y) { - if (graphic >= GFX_START_ROCKSSCREEN && graphic <= GFX_END_ROCKSSCREEN) + if (graphic >= GFX_START_ROCKSELEMENTS && graphic <= GFX_END_ROCKSELEMENTS) { - graphic -= GFX_START_ROCKSSCREEN; - *bitmap = pix[PIX_BACK]; + graphic -= GFX_START_ROCKSELEMENTS; + *bitmap = pix[PIX_ELEMENTS]; *x = MINI_GFX_STARTX + (graphic % MINI_GFX_PER_LINE) * MINI_TILEX; *y = MINI_GFX_STARTY + (graphic / MINI_GFX_PER_LINE) * MINI_TILEY; } @@ -1573,7 +1574,7 @@ void DrawMicroElement(int xpos, int ypos, int element) MICRO_TILEX, MICRO_TILEY, xpos, ypos); } else - BlitBitmap(pix[PIX_BACK], drawto, + BlitBitmap(pix[PIX_ELEMENTS], drawto, 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);