From: Holger Schemel Date: Fri, 6 Sep 2002 17:51:00 +0000 (+0200) Subject: rnd-20020906-2-src X-Git-Tag: 3.0.0^2~251 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=727c32da2353e1f688c4636b86a1ab6e8a71f8d6;p=rocksndiamonds.git rnd-20020906-2-src --- diff --git a/src/conftime.h b/src/conftime.h index b2606371..bd4614a2 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "[2002-09-06 18:36]" +#define COMPILE_DATE_STRING "[2002-09-06 19:21]" diff --git a/src/init.c b/src/init.c index 8f957e30..cef28a30 100644 --- a/src/init.c +++ b/src/init.c @@ -100,7 +100,6 @@ void OpenAll(void) InitGfx(); InitElementProperties(); /* initializes IS_CHAR() for el2gfx() */ InitElementInfo(); - InitGraphicInfo(); InitLevelInfo(); InitLevelArtworkInfo(); @@ -180,6 +179,7 @@ static void InitImages() /* load custom images */ ReloadCustomImages(); + InitGraphicInfo(); } static void InitMixer() @@ -497,6 +497,7 @@ void ReloadCustomArtwork() } ReloadCustomImages(); + InitGraphicInfo(); FreeTileClipmasks(); InitTileClipmasks(); @@ -855,17 +856,16 @@ void InitGraphicInfo() /* always start with reliable default values */ for(i=0; i= GFX_START_ROCKSSCREEN && graphic <= GFX_END_ROCKSSCREEN) + if (graphic >= 0 && graphic_info[graphic].bitmap != NULL) + { + *bitmap = graphic_info[graphic].bitmap; + *x = graphic_info[graphic].src_x; + *y = graphic_info[graphic].src_y; + } + else if (graphic >= GFX_START_ROCKSSCREEN && graphic <= GFX_END_ROCKSSCREEN) { graphic -= GFX_START_ROCKSSCREEN; *bitmap = pix[PIX_BACK]; @@ -2713,9 +2719,11 @@ int el2gfx_OLD(int element) int el2gfx(int element) { - int graphic_OLD = el2gfx_OLD(element); int graphic_NEW = element_info[element].graphic; +#if DEBUG + int graphic_OLD = el2gfx_OLD(element); + if (element >= MAX_ELEMENTS) { Error(ERR_WARN, "el2gfx: element == %d >= MAX_ELEMENTS", element); @@ -2726,6 +2734,7 @@ int el2gfx(int element) Error(ERR_WARN, "el2gfx: graphic_NEW (%d) != graphic_OLD (%d)", graphic_NEW, graphic_OLD); } +#endif return graphic_NEW; }