{
int fade_mask = REDRAW_FIELD;
- StopAnimation();
-
CloseDoor(DOOR_CLOSE_ALL);
/* needed if different viewport properties defined for editor */
DrawEditModeWindow();
+ DrawMaskedBorder(fade_mask);
+
FadeIn(fade_mask);
/* copy actual editor door content to door double buffer for OpenDoor() */
int initial_move_dir = MV_DOWN;
int i, j, x, y;
- game_status = GAME_MODE_PLAYING;
+ // required here to update video display before fading (FIX THIS)
+ DrawMaskedBorder(REDRAW_DOOR_2);
- StopAnimation();
+ game_status = GAME_MODE_PLAYING;
if (!game.restart_level)
CloseDoor(DOOR_CLOSE_1);
BlitScreenToBitmap(backbuffer);
/* !!! FIX THIS (END) !!! */
+ DrawMaskedBorder(fade_mask);
+
FadeIn(fade_mask);
#if 1
OpenDoor(GetDoorState() | DOOR_NO_DELAY | DOOR_FORCE_REDRAW);
- DrawMaskedBorder(REDRAW_ALL);
+ DrawMaskedBorder(fade_mask);
FadeIn(fade_mask);
FadeSetEnterMenu();
}
else if (pos == MAIN_CONTROL_LEVEL_NUMBER && !button)
{
+ StopAnimation();
+
+ CloseDoor(DOOR_CLOSE_2);
+
game_status = GAME_MODE_LEVELNR;
ChangeViewportPropertiesIfNeeded();
{
if (leveldir_first)
{
+ StopAnimation();
+
+ CloseDoor(DOOR_CLOSE_2);
+
game_status = GAME_MODE_LEVELS;
SaveLevelSetup_LastSeries();
}
else if (pos == MAIN_CONTROL_SCORES)
{
+ StopAnimation();
+
+ CloseDoor(DOOR_CLOSE_2);
+
game_status = GAME_MODE_SCORES;
DrawHallOfFame(-1);
!strEqual(setup.player_name, "Artsoft"))
Request("This level is read only!", REQ_CONFIRM);
+ StopAnimation();
+
CloseDoor(DOOR_CLOSE_2);
game_status = GAME_MODE_EDITOR;
}
else if (pos == MAIN_CONTROL_INFO)
{
+ StopAnimation();
+
+ CloseDoor(DOOR_CLOSE_2);
+
game_status = GAME_MODE_INFO;
info_mode = INFO_MODE_MAIN;
}
else if (pos == MAIN_CONTROL_GAME)
{
+ StopAnimation();
+
StartGameActions(options.network, setup.autorecord, level.random_seed);
}
else if (pos == MAIN_CONTROL_SETUP)
{
+ StopAnimation();
+
+ CloseDoor(DOOR_CLOSE_2);
+
game_status = GAME_MODE_SETUP;
setup_mode = SETUP_MODE_MAIN;
HandleChooseTree(0, 0, 0, 0, MB_MENU_INITIALIZE, ti_ptr);
MapScreenTreeGadgets(*ti_ptr);
+ DrawMaskedBorder(fade_mask);
+
FadeIn(fade_mask);
InitAnimation();
HandleHallOfFame(highlight_position, 0, 0, 0, MB_MENU_INITIALIZE);
+ DrawMaskedBorder(fade_mask);
+
FadeIn(fade_mask);
}
if (redraw_all)
redraw_mask = fade_mask = REDRAW_ALL;
+ DrawMaskedBorder(fade_mask);
+
FadeIn(fade_mask);
InitAnimation();
void DrawMaskedBorder_Rect(int x, int y, int width, int height)
{
- Bitmap *bitmap = graphic_info[IMG_GLOBAL_BORDER].bitmap;
+ Bitmap *bitmap = getGlobalBorderBitmapFromGameStatus();
BlitBitmapMasked(bitmap, backbuffer, x, y, width, height, x, y);
}
Bitmap *getGlobalBorderBitmapFromGameStatus()
{
- int graphic = (game_status == GAME_MODE_MAIN ? IMG_GLOBAL_BORDER_MAIN :
- game_status == GAME_MODE_SCORES ? IMG_GLOBAL_BORDER_SCORES :
- game_status == GAME_MODE_EDITOR ? IMG_GLOBAL_BORDER_EDITOR :
- game_status == GAME_MODE_PLAYING ? IMG_GLOBAL_BORDER_PLAYING :
- IMG_GLOBAL_BORDER);
+ int graphic =
+ (game_status == GAME_MODE_MAIN ||
+ game_status == GAME_MODE_PSEUDO_TYPENAME ? IMG_GLOBAL_BORDER_MAIN :
+ game_status == GAME_MODE_SCORES ? IMG_GLOBAL_BORDER_SCORES :
+ game_status == GAME_MODE_EDITOR ? IMG_GLOBAL_BORDER_EDITOR :
+ game_status == GAME_MODE_PLAYING ? IMG_GLOBAL_BORDER_PLAYING :
+ IMG_GLOBAL_BORDER);
return getGlobalBorderBitmap(graphic);
}
{
boolean level_solved = (game_status == GAME_MODE_PLAYING &&
local_player->LevelSolved_GameEnd);
- int last_game_status = game_status; /* save current game status */
int width = request.width;
int height = request.height;
int sx, sy;
Delay(10);
}
- game_status = GAME_MODE_PSEUDO_DOOR;
-
BackToFront();
-
- game_status = last_game_status; /* restore current game status */
}
return result;
void FadeSkipNextFadeIn();
void FadeSkipNextFadeOut();
+Bitmap *getGlobalBorderBitmapFromGameStatus();
+
void ClearField();
void SetWindowBackgroundImageIfDefined(int);
void SetMainBackgroundImageIfDefined(int);