From: Holger Schemel Date: Sun, 16 May 2004 12:41:12 +0000 (+0200) Subject: rnd-20040516-1-src X-Git-Tag: 3.1.0^2~3 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=c5b6de1f19f2c87f70b208794375b284e035cb80;p=rocksndiamonds.git rnd-20040516-1-src * fixed bug with opaque font in envelope with background graphic when background graphic is not transparent itself --- diff --git a/ChangeLog b/ChangeLog index 2c909359..92099e87 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,11 @@ +2004-05-16 + * fixed bug with opaque font in envelope with background graphic when + background graphic is not transparent itself + 2004-05-12 * added "gravity on" and "gravity off" ports for Supaplex compatibility * corrected original Supaplex level loading code to use these new ports + * also corrected Supaplex loader to auto-count infotrons if set to zero 2004-05-10 * fixed bug with missing initialization of "modified" flag for GEs diff --git a/src/conftime.h b/src/conftime.h index 9855accd..853db5b9 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "[2004-05-13 02:00]" +#define COMPILE_DATE_STRING "[2004-05-16 14:32]" diff --git a/src/files.c b/src/files.c index a58442ee..956a8df4 100644 --- a/src/files.c +++ b/src/files.c @@ -1888,6 +1888,17 @@ static void LoadLevelFromFileStream_SP(FILE *file, struct LevelInfo *level, level->field[x][y] <= EL_SP_GRAVITY_PORT_UP) level->field[x][y] += EL_SP_PORT_RIGHT - EL_SP_GRAVITY_PORT_RIGHT; + /* auto-determine number of infotrons if it was stored as "0" -- see above */ + if (level->gems_needed == 0) + { + for (y = 0; y < SP_LEVEL_YSIZE; y++) + for (x = 0; x < SP_LEVEL_XSIZE; x++) + if (level->field[x][y] == EL_SP_INFOTRON) + level->gems_needed++; + + level->gems_needed &= 0xff; /* only use low byte -- see above */ + } + level->fieldx = SP_LEVEL_XSIZE; level->fieldy = SP_LEVEL_YSIZE; diff --git a/src/tools.c b/src/tools.c index 5ce30b1f..68bac2ef 100644 --- a/src/tools.c +++ b/src/tools.c @@ -1702,8 +1702,13 @@ void DrawEnvelopeBackground(int envelope_nr, int startx, int starty, void AnimateEnvelope(int envelope_nr, int anim_mode, int action) { int graphic = IMG_BACKGROUND_ENVELOPE_1 + envelope_nr; +#if 1 + Bitmap *src_bitmap = graphic_info[graphic].bitmap; + int mask_mode = (src_bitmap != NULL ? BLIT_MASKED : BLIT_ON_BACKGROUND); +#else boolean draw_masked = graphic_info[graphic].draw_masked; int mask_mode = (draw_masked ? BLIT_MASKED : BLIT_ON_BACKGROUND); +#endif boolean ffwd_delay = (tape.playing && tape.fast_forward); boolean no_delay = (tape.warp_forward); unsigned long anim_delay = 0;