X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Finit.c;h=922fc11afb2cd0d70f112d3fd8a6b5a37754f38e;hb=ec5f4027a019ebf435b41577ab1234849c77a059;hp=fbfad6103ac283a5270d040fcfde7107735b286f;hpb=bfe3ef29da6539dffdd8674a67c3144f6a3cdddc;p=rocksndiamonds.git diff --git a/src/init.c b/src/init.c index fbfad610..922fc11a 100644 --- a/src/init.c +++ b/src/init.c @@ -1136,6 +1136,7 @@ static void set_graphic_parameters_ext(int graphic, int *parameter, g->anim_delay_random = 0; g->post_delay_fixed = 0; g->post_delay_random = 0; + g->draw_order = 0; g->fade_mode = FADE_MODE_DEFAULT; g->fade_delay = -1; g->post_delay = -1; @@ -1369,7 +1370,8 @@ static void set_graphic_parameters_ext(int graphic, int *parameter, g->draw_masked = parameter[GFX_ARG_DRAW_MASKED]; /* used for toon animations and global animations */ - g->draw_order = parameter[GFX_ARG_DRAW_ORDER]; + if (parameter[GFX_ARG_DRAW_ORDER] != ARG_UNDEFINED_VALUE) + g->draw_order = parameter[GFX_ARG_DRAW_ORDER]; /* optional graphic for cloning all graphics settings */ if (parameter[GFX_ARG_CLONE_FROM] != ARG_UNDEFINED_VALUE) @@ -2059,6 +2061,7 @@ static void ReinitializeGraphics() InitGadgets(); print_timestamp_time("InitGadgets"); InitToons(); + InitGlobalAnimations(); print_timestamp_time("InitToons"); InitDoors(); print_timestamp_time("InitDoors"); @@ -4665,7 +4668,8 @@ static void InitGlobal() global.frames_per_second = 0; - global.border_status = GAME_MODE_MAIN; + global.border_status = GAME_MODE_LOADING; + global.anim_status = global.anim_status_next = GAME_MODE_LOADING; global.use_envelope_request = FALSE; } @@ -5321,7 +5325,11 @@ void InitGfx() InitGfxDrawBusyAnimFunction(DrawInitAnim); InitGfxDrawGlobalAnimFunction(DrawGlobalAnim); - InitGfxDrawGlobalBorderFunction(DrawMaskedBorderToScreen); + InitGfxDrawGlobalBorderFunction(DrawMaskedBorderToTarget); + + gfx.fade_border_source_status = global.border_status; + gfx.fade_border_target_status = global.border_status; + gfx.masked_border_bitmap_ptr = backbuffer; /* use copy of busy animation to prevent change while reloading artwork */ init_last = init; @@ -5698,7 +5706,7 @@ void ReloadCustomArtwork(int force_reload) print_timestamp_init("ReloadCustomArtwork"); - game_status = GAME_MODE_LOADING; + SetGameStatus(GAME_MODE_LOADING); FadeOut(REDRAW_ALL); @@ -5733,7 +5741,7 @@ void ReloadCustomArtwork(int force_reload) print_timestamp_time("InitMusic"); } - game_status = last_game_status; /* restore current game status */ + SetGameStatus(last_game_status); /* restore current game status */ init_last = init; /* switch to new busy animation */ @@ -5828,7 +5836,7 @@ void OpenAll() { print_timestamp_init("OpenAll"); - game_status = GAME_MODE_LOADING; + SetGameStatus(GAME_MODE_LOADING); InitCounter(); @@ -5928,7 +5936,7 @@ void OpenAll() return; } - game_status = GAME_MODE_MAIN; + SetGameStatus(GAME_MODE_MAIN); FadeSetEnterScreen(); if (!(fading.fade_mode & FADE_TYPE_TRANSFORM))