static int get_graphic_parameter_value(char *, char *, int);
-static Bitmap *getLoadingBackgroundBitmap(int graphic)
+static int getLoadingBackgroundImage(int graphic)
{
- return getBitmapFromGraphicOrDefault(graphic, INITIAL_IMG_BACKGROUND);
+ return getImageFromGraphicOrDefault(graphic, INITIAL_IMG_BACKGROUND);
}
static void SetLoadingWindowBackgroundImage(int graphic)
{
- SetWindowBackgroundBitmap(getLoadingBackgroundBitmap(graphic));
+ SetBackgroundImage(getLoadingBackgroundImage(graphic), REDRAW_ALL);
}
static void SetLoadingBackgroundImage(void)
CreateImageTextures(texture_graphics[i]);
}
-static int getFontBitmapID(int font_nr)
+static int getFontSpecialSuffix(void)
{
int special = -1;
else if (game_status == GAME_MODE_PSEUDO_TYPENAMES)
special = GFX_SPECIAL_ARG_NAMES;
+ return special;
+}
+
+static int getFontBitmapID(int font_nr)
+{
+ int special = getFontSpecialSuffix();
+
if (special != -1)
return font_info[font_nr].special_bitmap_id[special];
else
return FONT_INITIAL_1;
}
+static char *getTokenFromFont(int font_nr)
+{
+ static char *token = NULL;
+ int special = getFontSpecialSuffix();
+
+ checked_free(token);
+
+ if (special != -1)
+ token = getStringCat2(font_info[font_nr].token_name,
+ special_suffix_info[special].suffix);
+ else
+ token = getStringCopy(font_info[font_nr].token_name);
+
+ return token;
+}
+
static void InitFontGraphicInfo(void)
{
static struct FontBitmapInfo *font_bitmap_info = NULL;
if (graphic_info == NULL) // still at startup phase
{
InitFontInfo(font_initial, NUM_INITIAL_FONTS,
- getFontBitmapID, getFontFromToken);
+ getFontBitmapID, getFontFromToken, getTokenFromFont);
return;
}
}
InitFontInfo(font_bitmap_info, num_font_bitmaps,
- getFontBitmapID, getFontFromToken);
+ getFontBitmapID, getFontFromToken, getTokenFromFont);
}
static void InitGlobalAnimGraphicInfo(void)
g->active_yoffset = parameter[GFX_ARG_ACTIVE_YOFFSET];
g->pressed_xoffset = parameter[GFX_ARG_PRESSED_XOFFSET];
g->pressed_yoffset = parameter[GFX_ARG_PRESSED_YOFFSET];
+
+ // this is only used for drawing stacked global animations
+ g->stacked_xfactor = parameter[GFX_ARG_STACKED_XFACTOR];
+ g->stacked_yfactor = parameter[GFX_ARG_STACKED_YFACTOR];
+ g->stacked_xoffset = parameter[GFX_ARG_STACKED_XOFFSET];
+ g->stacked_yoffset = parameter[GFX_ARG_STACKED_YOFFSET];
}
static void set_graphic_parameters(int graphic)
if (setup.options.verbose)
options.verbose = TRUE;
+ if (setup.options.debug)
+ options.debug = TRUE;
+
+ if (!strEqual(setup.options.debug_mode, ARG_UNDEFINED_STRING))
+ options.debug_mode = getStringCopy(setup.options.debug_mode);
+
if (setup.debug.show_frames_per_second)
global.show_frames_per_second = TRUE;
}
}
ReCreateBitmap(&bitmap_db_field, FXSIZE, FYSIZE);
- ReCreateBitmap(&bitmap_db_panel, DXSIZE, DYSIZE);
ReCreateBitmap(&bitmap_db_door_1, 3 * DXSIZE, DYSIZE);
ReCreateBitmap(&bitmap_db_door_2, 3 * VXSIZE, VYSIZE);
sy += 3 * font_height;
num_lines_printed =
- DrawTextBuffer(sx, sy, program.log_filename[LOG_ERR_ID], font_2,
+ DrawTextBuffer(sx, sy, program.log_filename, font_2,
line_length, line_length, max_lines,
0, BLIT_ON_BACKGROUND, TRUE, TRUE, FALSE);