X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Finit.c;h=6d0b9501bb136d832991a1902ec20fd07ddc0e78;hb=f965a2a6e56dd5c1e91b306dfd52b38b1dd49537;hp=0d7dfe9359ded8e89ef18cc74ac6d7584785af8e;hpb=2d769736ea3634a55a88c1d792ffdbefb190d1f3;p=rocksndiamonds.git diff --git a/src/init.c b/src/init.c index 0d7dfe93..6d0b9501 100644 --- a/src/init.c +++ b/src/init.c @@ -39,7 +39,7 @@ #define CONFIG_TOKEN_GLOBAL_BUSY "global.busy" #define DEBUG_PRINT_INIT_TIMESTAMPS TRUE -#define DEBUG_PRINT_INIT_TIMESTAMPS_DEPTH 1 +#define DEBUG_PRINT_INIT_TIMESTAMPS_DEPTH 10 static struct FontBitmapInfo font_initial[NUM_INITIAL_FONTS]; @@ -329,7 +329,7 @@ void SetBitmaps_EM(Bitmap **em_bitmap) } #endif -#if 1 +#if 0 /* !!! FIX THIS (CHANGE TO USING NORMAL ELEMENT GRAPHIC DEFINITIONS) !!! */ void SetBitmaps_SP(Bitmap **sp_bitmap) { @@ -1306,6 +1306,8 @@ static void set_graphic_parameters_ext(int graphic, int *parameter, g->align = ALIGN_CENTER; /* default for title screens */ g->valign = VALIGN_MIDDLE; /* default for title screens */ g->sort_priority = 0; /* default for title screens */ + g->class = 0; + g->style = STYLE_DEFAULT; g->bitmap = src_bitmap; @@ -1506,6 +1508,11 @@ static void set_graphic_parameters_ext(int graphic, int *parameter, g->valign = parameter[GFX_ARG_VALIGN]; if (parameter[GFX_ARG_SORT_PRIORITY] != ARG_UNDEFINED_VALUE) g->sort_priority = parameter[GFX_ARG_SORT_PRIORITY]; + + if (parameter[GFX_ARG_CLASS] != ARG_UNDEFINED_VALUE) + g->class = parameter[GFX_ARG_CLASS]; + if (parameter[GFX_ARG_STYLE] != ARG_UNDEFINED_VALUE) + g->style = parameter[GFX_ARG_STYLE]; } static void set_graphic_parameters(int graphic) @@ -6164,8 +6171,14 @@ void OpenAll() game_status = GAME_MODE_LOADING; +#if 1 + InitCounter(); +#endif + InitGlobal(); /* initialize some global variables */ + print_timestamp_time("[init global stuff]"); + if (options.execute_command) Execute_Command(options.execute_command); @@ -6188,25 +6201,29 @@ void OpenAll() InitArtworkConfig(); /* needed before forking sound child process */ InitMixer(); +#if 0 InitCounter(); +#endif InitRND(NEW_RANDOMIZE); InitSimpleRandom(NEW_RANDOMIZE); InitJoysticks(); - print_timestamp_time("[pre-video]"); + print_timestamp_time("[init setup/config stuff]"); InitVideoDisplay(); InitVideoBuffer(WIN_XSIZE, WIN_YSIZE, DEFAULT_DEPTH, setup.fullscreen); InitEventFilter(FilterMouseMotionEvents); + print_timestamp_time("[init video stuff]"); + InitElementPropertiesStatic(); InitElementPropertiesEngine(GAME_VERSION_ACTUAL); InitElementPropertiesGfxElement(); - print_timestamp_time("[post-video]"); + print_timestamp_time("[init element properties stuff]"); InitGfx();