projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed bugs when drawing global borders when fading screens
[rocksndiamonds.git]
/
src
/
init.c
diff --git
a/src/init.c
b/src/init.c
index 96eefb31e38a97845effe5bed1ed39bef1ea794a..943839edba5acecd02e708e51bce2e444158806a 100644
(file)
--- a/
src/init.c
+++ b/
src/init.c
@@
-232,6
+232,9
@@
void InitImageTextures()
FreeAllImageTextures();
FreeAllImageTextures();
+ for (i = IMG_GLOBAL_BORDER_FIRST; i <= IMG_GLOBAL_BORDER_LAST; i++)
+ CreateImageTextures(i);
+
for (i = 0; i < MAX_NUM_TOONS; i++)
CreateImageTextures(IMG_TOON_1 + i);
for (i = 0; i < MAX_NUM_TOONS; i++)
CreateImageTextures(IMG_TOON_1 + i);
@@
-1352,7
+1355,6
@@
static void set_graphic_parameters_ext(int graphic, int *parameter,
g->step_offset = parameter[GFX_ARG_STEP_OFFSET];
g->step_xoffset = parameter[GFX_ARG_STEP_XOFFSET];
g->step_yoffset = parameter[GFX_ARG_STEP_YOFFSET];
g->step_offset = parameter[GFX_ARG_STEP_OFFSET];
g->step_xoffset = parameter[GFX_ARG_STEP_XOFFSET];
g->step_yoffset = parameter[GFX_ARG_STEP_YOFFSET];
- g->step_frames = parameter[GFX_ARG_STEP_FRAMES];
g->step_delay = parameter[GFX_ARG_STEP_DELAY];
g->direction = parameter[GFX_ARG_DIRECTION];
g->position = parameter[GFX_ARG_POSITION];
g->step_delay = parameter[GFX_ARG_STEP_DELAY];
g->direction = parameter[GFX_ARG_DIRECTION];
g->position = parameter[GFX_ARG_POSITION];
@@
-1366,6
+1368,9
@@
static void set_graphic_parameters_ext(int graphic, int *parameter,
/* this is only used for drawing envelope graphics */
g->draw_masked = parameter[GFX_ARG_DRAW_MASKED];
/* this is only used for drawing envelope graphics */
g->draw_masked = parameter[GFX_ARG_DRAW_MASKED];
+ /* used for toon animations and global animations */
+ g->draw_order = parameter[GFX_ARG_DRAW_ORDER];
+
/* optional graphic for cloning all graphics settings */
if (parameter[GFX_ARG_CLONE_FROM] != ARG_UNDEFINED_VALUE)
g->clone_from = parameter[GFX_ARG_CLONE_FROM];
/* optional graphic for cloning all graphics settings */
if (parameter[GFX_ARG_CLONE_FROM] != ARG_UNDEFINED_VALUE)
g->clone_from = parameter[GFX_ARG_CLONE_FROM];
@@
-2054,6
+2059,7
@@
static void ReinitializeGraphics()
InitGadgets();
print_timestamp_time("InitGadgets");
InitToons();
InitGadgets();
print_timestamp_time("InitGadgets");
InitToons();
+ InitGlobalAnimations();
print_timestamp_time("InitToons");
InitDoors();
print_timestamp_time("InitDoors");
print_timestamp_time("InitToons");
InitDoors();
print_timestamp_time("InitDoors");
@@
-4660,7
+4666,8
@@
static void InitGlobal()
global.frames_per_second = 0;
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;
}
global.use_envelope_request = FALSE;
}
@@
-5316,6
+5323,11
@@
void InitGfx()
InitGfxDrawBusyAnimFunction(DrawInitAnim);
InitGfxDrawGlobalAnimFunction(DrawGlobalAnim);
InitGfxDrawBusyAnimFunction(DrawInitAnim);
InitGfxDrawGlobalAnimFunction(DrawGlobalAnim);
+ 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;
/* use copy of busy animation to prevent change while reloading artwork */
init_last = init;
@@
-5692,7
+5704,7
@@
void ReloadCustomArtwork(int force_reload)
print_timestamp_init("ReloadCustomArtwork");
print_timestamp_init("ReloadCustomArtwork");
-
game_status = GAME_MODE_LOADING
;
+
SetGameStatus(GAME_MODE_LOADING)
;
FadeOut(REDRAW_ALL);
FadeOut(REDRAW_ALL);
@@
-5727,7
+5739,7
@@
void ReloadCustomArtwork(int force_reload)
print_timestamp_time("InitMusic");
}
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 */
init_last = init; /* switch to new busy animation */
@@
-5822,7
+5834,7
@@
void OpenAll()
{
print_timestamp_init("OpenAll");
{
print_timestamp_init("OpenAll");
-
game_status = GAME_MODE_LOADING
;
+
SetGameStatus(GAME_MODE_LOADING)
;
InitCounter();
InitCounter();
@@
-5922,7
+5934,7
@@
void OpenAll()
return;
}
return;
}
-
game_status = GAME_MODE_MAIN
;
+
SetGameStatus(GAME_MODE_MAIN)
;
FadeSetEnterScreen();
if (!(fading.fade_mode & FADE_TYPE_TRANSFORM))
FadeSetEnterScreen();
if (!(fading.fade_mode & FADE_TYPE_TRANSFORM))