From 3aea1bbab99a3a8295184efabe1822e99a149a70 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Thu, 12 Sep 2002 01:08:42 +0200 Subject: [PATCH] rnd-20020912-1-src --- src/conftime.h | 2 +- src/main.h | 28 ++++++++++++++-------------- src/tools.c | 16 ++++++++-------- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/conftime.h b/src/conftime.h index 32c44154..e9f59dab 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "[2002-09-10 00:35]" +#define COMPILE_DATE_STRING "[2002-09-12 01:07]" diff --git a/src/main.h b/src/main.h index ddd7034b..d4ab4235 100644 --- a/src/main.h +++ b/src/main.h @@ -458,35 +458,35 @@ extern struct FileInfo *image_files, *sound_files; #define MICROLABEL_YPOS (MICROLEV_YPOS + MICROLEV_YSIZE + 7) #define MINI_GFX_STARTX 0 -#define MINI_GFX_STARTY 416 -#define MICRO_GFX_STARTX 0 -#define MICRO_GFX_STARTY 528 +#define MINI_GFX_STARTY 448 +#define MICRO_GFX_STARTX 384 +#define MICRO_GFX_STARTY 448 #define GFX_PER_LINE 16 -#define MINI_GFX_PER_LINE 32 -#define MICRO_GFX_PER_LINE 128 +#define MINI_GFX_PER_LINE 16 +#define MICRO_GFX_PER_LINE 16 #define HEROES_PER_LINE 16 #define MINI_SP_STARTX 0 -#define MINI_SP_STARTY 352 -#define MICRO_SP_STARTX 0 -#define MICRO_SP_STARTY 448 +#define MINI_SP_STARTY 512 +#define MICRO_SP_STARTX 384 +#define MICRO_SP_STARTY 512 #define SP_PER_LINE 16 #define MINI_SP_PER_LINE 16 -#define MICRO_SP_PER_LINE 64 +#define MICRO_SP_PER_LINE 16 -#define MINI_DC_STARTX 256 -#define MINI_DC_STARTY 256 +#define MINI_DC_STARTX 0 +#define MINI_DC_STARTY 512 #define MICRO_DC_STARTX 384 -#define MICRO_DC_STARTY 384 +#define MICRO_DC_STARTY 512 #define DC_PER_LINE 16 #define MINI_DC_PER_LINE 16 #define MICRO_DC_PER_LINE 16 -#define MINI_MORE_STARTX 256 +#define MINI_MORE_STARTX 0 #define MINI_MORE_STARTY 256 #define MICRO_MORE_STARTX 384 -#define MICRO_MORE_STARTY 384 +#define MICRO_MORE_STARTY 256 #define MORE_PER_LINE 16 #define MINI_MORE_PER_LINE 16 #define MICRO_MORE_PER_LINE 16 diff --git a/src/tools.c b/src/tools.c index 0ab4eec7..267668bc 100644 --- a/src/tools.c +++ b/src/tools.c @@ -894,7 +894,6 @@ void getMiniGraphicSource(int graphic, Bitmap **bitmap, int *x, int *y) else if (graphic >= GFX_START_ROCKSSP && graphic <= GFX_END_ROCKSSP) { graphic -= GFX_START_ROCKSSP; - graphic -= ((graphic / SP_PER_LINE) * SP_PER_LINE) / 2; *bitmap = pix[PIX_SP]; *x = MINI_SP_STARTX + (graphic % MINI_SP_PER_LINE) * MINI_TILEX; *y = MINI_SP_STARTY + (graphic / MINI_SP_PER_LINE) * MINI_TILEY; @@ -1255,6 +1254,8 @@ void DrawLevelFieldThruMask(int x, int y) void ErdreichAnbroeckeln(int x, int y) { + Bitmap *src_bitmap; + int src_x, src_y; int i, width, height, cx,cy; int ux = LEVELX(x), uy = LEVELY(y); int element, graphic; @@ -1282,6 +1283,8 @@ void ErdreichAnbroeckeln(int x, int y) graphic = GFX_ERDENRAND; + getGraphicSource(graphic, &src_bitmap, &src_x, &src_y); + for(i=0; i<4; i++) { int uxx, uyy; @@ -1314,9 +1317,7 @@ void ErdreichAnbroeckeln(int x, int y) cy = (i == 3 ? TILEY - snip : 0); } - BlitBitmap(pix[PIX_BACK], drawto_field, - SX + (graphic % GFX_PER_LINE) * TILEX + cx, - SY + (graphic / GFX_PER_LINE) * TILEY + cy, + BlitBitmap(src_bitmap, drawto_field, src_x + cx, src_y + cy, width, height, FX + x * TILEX + cx, FY + y * TILEY + cy); } @@ -1326,6 +1327,8 @@ void ErdreichAnbroeckeln(int x, int y) { graphic = GFX_ERDENRAND; + getGraphicSource(graphic, &src_bitmap, &src_x, &src_y); + for(i=0; i<4; i++) { int xx, yy, uxx, uyy; @@ -1358,9 +1361,7 @@ void ErdreichAnbroeckeln(int x, int y) cy = (i==0 ? TILEY-snip : 0); } - BlitBitmap(pix[PIX_BACK], drawto_field, - SX + (graphic % GFX_PER_LINE) * TILEX + cx, - SY + (graphic / GFX_PER_LINE) * TILEY + cy, + BlitBitmap(src_bitmap, drawto_field, src_x + cx, src_y + cy, width, height, FX + xx * TILEX + cx, FY + yy * TILEY + cy); MarkTileDirty(xx, yy); @@ -1552,7 +1553,6 @@ void DrawMicroElement(int xpos, int ypos, int element) if (graphic >= GFX_START_ROCKSSP && graphic <= GFX_END_ROCKSSP) { graphic -= GFX_START_ROCKSSP; - graphic -= ((graphic / SP_PER_LINE) * SP_PER_LINE) / 2; BlitBitmap(pix[PIX_SP], drawto, MICRO_SP_STARTX + (graphic % MICRO_SP_PER_LINE) * MICRO_TILEX, MICRO_SP_STARTY + (graphic / MICRO_SP_PER_LINE) * MICRO_TILEY, -- 2.34.1