From: Holger Schemel Date: Fri, 29 Nov 2002 23:18:49 +0000 (+0100) Subject: rnd-20021130-1-src X-Git-Tag: 3.0.0^2~207 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=fe0d059d4646a35d85ef508c70eaaaae393302f2;p=rocksndiamonds.git rnd-20021130-1-src --- diff --git a/src/conftime.h b/src/conftime.h index 7dadbdca..90d054cb 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "[2002-11-29 21:30]" +#define COMPILE_DATE_STRING "[2002-11-30 00:17]" diff --git a/src/init.c b/src/init.c index 5dea5dfc..88806e9e 100644 --- a/src/init.c +++ b/src/init.c @@ -55,6 +55,8 @@ static char *image_filename[NUM_PICTURES] = #endif }; +static Bitmap *bitmap_font_initial = NULL; + static void InitSetup(void); static void InitPlayerInfo(void); static void InitLevelInfo(void); @@ -113,12 +115,14 @@ void OpenAll(void) InitEventFilter(FilterMouseMotionEvents); - InitGfx(); InitElementProperties(); /* initializes IS_CHAR() for el2gfx() */ InitElementInfo(); + InitGfx(); + InitLevelInfo(); InitLevelArtworkInfo(); + InitImages(); /* needs to know current level directory */ InitSound(); /* needs to know current level directory */ InitGadgets(); /* needs images + number of level series */ @@ -199,6 +203,12 @@ static void ReinitializeGraphics() new_graphic_info[IMG_MENU_FONT_MEDIUM].bitmap, new_graphic_info[IMG_MENU_FONT_SMALL].bitmap, new_graphic_info[IMG_MENU_FONT_EM].bitmap); + + if (bitmap_font_initial) + { + FreeBitmap(bitmap_font_initial); + bitmap_font_initial = NULL; + } } static void InitImages() @@ -398,7 +408,9 @@ void FreeTileClipmasks() void InitGfx() { +#if 0 int i; +#endif /* initialize some global variables */ global.frames_per_second = 0; @@ -415,32 +427,40 @@ void InitGfx() /* create additional image buffers for double-buffering */ bitmap_db_field = CreateBitmap(FXSIZE, FYSIZE, DEFAULT_DEPTH); bitmap_db_door = CreateBitmap(3 * DXSIZE, DYSIZE + VYSIZE, DEFAULT_DEPTH); -#if 1 - pix[PIX_DB_FIELD] = bitmap_db_field; - pix[PIX_DB_DOOR] = bitmap_db_door; -#endif +#if 0 pix[PIX_FONT_SMALL] = LoadCustomImage(image_filename[PIX_FONT_SMALL]); InitFontInfo(NULL, NULL, pix[PIX_FONT_SMALL], NULL); +#else + bitmap_font_initial = LoadCustomImage(image_filename[PIX_FONT_SMALL]); + + InitFontInfo(NULL, NULL, bitmap_font_initial, NULL); +#endif DrawInitText(WINDOW_TITLE_STRING, 20, FC_YELLOW); DrawInitText(WINDOW_SUBTITLE_STRING, 50, FC_RED); DrawInitText("Loading graphics:", 120, FC_GREEN); +#if 0 for (i=0; i