X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Finit.c;h=2ebf076c47e8402ed417236cb36957563fe70735;hb=c71f734c9f306daaca1a262d9f07ddae5bc71073;hp=0ef4dc379c009b2a7d13122b488306f1faf12399;hpb=1264abe158bef8419451c95e6db9a738eeec76f8;p=rocksndiamonds.git diff --git a/src/init.c b/src/init.c index 0ef4dc37..2ebf076c 100644 --- a/src/init.c +++ b/src/init.c @@ -974,10 +974,18 @@ static void set_graphic_parameters(int graphic) graphic_info[graphic].post_delay = -1; graphic_info[graphic].auto_delay = -1; +#if 1 + /* optional zoom factor for scaling up the image to a larger size */ + if (parameter[GFX_ARG_SCALE_UP_FACTOR] != ARG_UNDEFINED_VALUE) + graphic_info[graphic].scale_up_factor = parameter[GFX_ARG_SCALE_UP_FACTOR]; + if (graphic_info[graphic].scale_up_factor < 1) + graphic_info[graphic].scale_up_factor = 1; /* no scaling */ +#endif + #if 1 if (graphic_info[graphic].use_image_size) { - /* set default bitmap size (with scaling, but without small images) */ + /* set new default bitmap size (with scaling, but without small images) */ graphic_info[graphic].width = get_scaled_graphic_width(graphic); graphic_info[graphic].height = get_scaled_graphic_height(graphic); } @@ -1001,11 +1009,13 @@ static void set_graphic_parameters(int graphic) if (parameter[GFX_ARG_HEIGHT] != ARG_UNDEFINED_VALUE) graphic_info[graphic].height = parameter[GFX_ARG_HEIGHT]; +#if 0 /* optional zoom factor for scaling up the image to a larger size */ if (parameter[GFX_ARG_SCALE_UP_FACTOR] != ARG_UNDEFINED_VALUE) graphic_info[graphic].scale_up_factor = parameter[GFX_ARG_SCALE_UP_FACTOR]; if (graphic_info[graphic].scale_up_factor < 1) graphic_info[graphic].scale_up_factor = 1; /* no scaling */ +#endif if (src_bitmap) { @@ -4562,11 +4572,15 @@ void InitGfx() font_height = getFontHeight(FC_RED); +#if 1 + DrawInitText(getWindowTitleString(), 20, FC_YELLOW); +#else DrawInitText(getProgramInitString(), 20, FC_YELLOW); +#endif DrawInitText(PROGRAM_COPYRIGHT_STRING, 50, FC_RED); DrawInitText(PROGRAM_WEBSITE_STRING, WIN_YSIZE - 20 - font_height, FC_RED); - DrawInitText("Loading graphics:", 120, FC_GREEN); + DrawInitText("Loading graphics", 120, FC_GREEN); } void RedrawBackground() @@ -4581,7 +4595,6 @@ void InitGfxBackground() { int x, y; - drawto = backbuffer; fieldbuffer = bitmap_db_field; SetDrawtoField(DRAW_BACKBUFFER); @@ -4896,8 +4909,7 @@ void OpenAll() InitJoysticks(); InitVideoDisplay(); - InitVideoBuffer(&backbuffer, &window, WIN_XSIZE, WIN_YSIZE, DEFAULT_DEPTH, - setup.fullscreen); + InitVideoBuffer(WIN_XSIZE, WIN_YSIZE, DEFAULT_DEPTH, setup.fullscreen); InitEventFilter(FilterMouseMotionEvents); @@ -4906,8 +4918,11 @@ void OpenAll() InitGfx(); + // debug_print_timestamp(0, "INIT"); InitLevelInfo(); + // debug_print_timestamp(0, "TIME InitLevelInfo: "); InitLevelArtworkInfo(); + // debug_print_timestamp(0, "TIME InitLevelArtworkInfo: "); InitImages(); /* needs to know current level directory */ InitSound(NULL); /* needs to know current level directory */