* added page fading effects for remaining info sub-screens
* fixed small bug that caused some delays when answering door request
+2006-10-13
+ * added page fading effects for remaining info sub-screens
+ * fixed small bug that caused some delays when answering door request
+
2006-10-12
* added directives "border.draw_masked.*" for menu/playfield area and
door areas to display overlapping/masked borders from "global.border"
2006-10-12
* added directives "border.draw_masked.*" for menu/playfield area and
door areas to display overlapping/masked borders from "global.border"
-#define COMPILE_DATE_STRING "[2006-10-13 03:06]"
+#define COMPILE_DATE_STRING "[2006-10-13 20:20]"
static void DrawChooseLevel(void);
static void DrawInfoScreen(void);
static void DrawChooseLevel(void);
static void DrawInfoScreen(void);
+static void DrawAndFadeInInfoScreen(int);
static void DrawSetupScreen(void);
static void DrawSetupScreen(void);
-static void DrawInfoScreenExt(int);
+static void DrawInfoScreenExt(int, int);
static void DrawInfoScreen_NotAvailable(char *, char *);
static void DrawInfoScreen_HelpAnim(int, int, boolean);
static void DrawInfoScreen_HelpText(int, int, int, int);
static void DrawInfoScreen_NotAvailable(char *, char *);
static void DrawInfoScreen_HelpAnim(int, int, boolean);
static void DrawInfoScreen_HelpText(int, int, int, int);
OpenDoor(DOOR_CLOSE_1 | DOOR_CLOSE_2 | DOOR_NO_DELAY | DOOR_FORCE_REDRAW);
info_mode = INFO_MODE_MAIN;
OpenDoor(DOOR_CLOSE_1 | DOOR_CLOSE_2 | DOOR_NO_DELAY | DOOR_FORCE_REDRAW);
info_mode = INFO_MODE_MAIN;
- DrawInfoScreenExt(use_fading_main_menu);
+ DrawInfoScreenExt(REDRAW_ALL, use_fading_main_menu);
}
else /* default: return to main menu */
{
}
else /* default: return to main menu */
{
-static void DrawInfoScreen_Main(boolean do_fading)
+static void DrawInfoScreen_Main(int redraw_mask, boolean do_fading)
DrawMaskedBorder(REDRAW_ALL);
if (do_fading)
DrawMaskedBorder(REDRAW_ALL);
if (do_fading)
{
SetMainBackgroundImageIfDefined(IMG_BACKGROUND_INFO_ELEMENTS);
{
SetMainBackgroundImageIfDefined(IMG_BACKGROUND_INFO_ELEMENTS);
+ FadeOut(REDRAW_FIELD);
+
LoadHelpAnimInfo();
LoadHelpTextInfo();
HandleInfoScreen_Elements(MB_MENU_INITIALIZE);
LoadHelpAnimInfo();
LoadHelpTextInfo();
HandleInfoScreen_Elements(MB_MENU_INITIALIZE);
+ FadeIn(REDRAW_FIELD);
+
if (page >= num_pages)
{
FadeSoundsAndMusic();
if (page >= num_pages)
{
FadeSoundsAndMusic();
info_mode = INFO_MODE_MAIN;
info_mode = INFO_MODE_MAIN;
+ DrawAndFadeInInfoScreen(REDRAW_FIELD);
+ if (button != MB_MENU_INITIALIZE)
+ FadeCrossSaveBackbuffer();
+
DrawInfoScreen_HelpAnim(page * anims_per_page, num_anims, TRUE);
DrawInfoScreen_HelpAnim(page * anims_per_page, num_anims, TRUE);
+
+ if (button != MB_MENU_INITIALIZE)
+ FadeCross(REDRAW_FIELD);
{
SetMainBackgroundImageIfDefined(IMG_BACKGROUND_INFO_MUSIC);
{
SetMainBackgroundImageIfDefined(IMG_BACKGROUND_INFO_MUSIC);
+ FadeOut(REDRAW_FIELD);
+
ClearWindow();
DrawHeadline();
LoadMusicInfo();
HandleInfoScreen_Music(MB_MENU_INITIALIZE);
ClearWindow();
DrawHeadline();
LoadMusicInfo();
HandleInfoScreen_Music(MB_MENU_INITIALIZE);
+
+ FadeIn(REDRAW_FIELD);
}
void HandleInfoScreen_Music(int button)
}
void HandleInfoScreen_Music(int button)
+ FadeSoundsAndMusic();
+ FadeOut(REDRAW_FIELD);
+
info_mode = INFO_MODE_MAIN;
info_mode = INFO_MODE_MAIN;
+ DrawAndFadeInInfoScreen(REDRAW_FIELD);
int ystart = 150, ystep = 30;
int ybottom = SYSIZE - 20;
int ystart = 150, ystep = 30;
int ybottom = SYSIZE - 20;
+ if (screen_nr > 8)
+ return FALSE;
+
ClearWindow();
DrawHeadline();
ClearWindow();
DrawHeadline();
DrawTextSCentered(ystart + 4 * ystep, FONT_TEXT_3,
"since 1995");
}
DrawTextSCentered(ystart + 4 * ystep, FONT_TEXT_3,
"since 1995");
}
DrawTextSCentered(ybottom, FONT_TEXT_4,
"Press any key or button for next page");
DrawTextSCentered(ybottom, FONT_TEXT_4,
"Press any key or button for next page");
+ FadeOut(REDRAW_FIELD);
+
HandleInfoScreen_Credits(MB_MENU_INITIALIZE);
HandleInfoScreen_Credits(MB_MENU_INITIALIZE);
+
+ FadeIn(REDRAW_FIELD);
}
void HandleInfoScreen_Credits(int button)
}
void HandleInfoScreen_Credits(int button)
else
{
FadeSoundsAndMusic();
else
{
FadeSoundsAndMusic();
info_mode = INFO_MODE_MAIN;
info_mode = INFO_MODE_MAIN;
+ DrawAndFadeInInfoScreen(REDRAW_FIELD);
SetMainBackgroundImageIfDefined(IMG_BACKGROUND_INFO_PROGRAM);
SetMainBackgroundImageIfDefined(IMG_BACKGROUND_INFO_PROGRAM);
+ FadeOut(REDRAW_FIELD);
+
ClearWindow();
DrawHeadline();
ClearWindow();
DrawHeadline();
DrawTextSCentered(ybottom, FONT_TEXT_4,
"Press any key or button for info menu");
DrawTextSCentered(ybottom, FONT_TEXT_4,
"Press any key or button for info menu");
+
+ FadeIn(REDRAW_FIELD);
}
void HandleInfoScreen_Program(int button)
}
void HandleInfoScreen_Program(int button)
if (button_released)
{
FadeSoundsAndMusic();
if (button_released)
{
FadeSoundsAndMusic();
info_mode = INFO_MODE_MAIN;
info_mode = INFO_MODE_MAIN;
+ DrawAndFadeInInfoScreen(REDRAW_FIELD);
SetMainBackgroundImageIfDefined(IMG_BACKGROUND_INFO_LEVELSET);
SetMainBackgroundImageIfDefined(IMG_BACKGROUND_INFO_LEVELSET);
+ FadeOut(REDRAW_FIELD);
+
ClearWindow();
DrawHeadline();
ClearWindow();
DrawHeadline();
else
DrawTextSCentered(ystart, FONT_TEXT_2,
"No information for this level set.");
else
DrawTextSCentered(ystart, FONT_TEXT_2,
"No information for this level set.");
+
+ FadeIn(REDRAW_FIELD);
}
void HandleInfoScreen_LevelSet(int button)
}
void HandleInfoScreen_LevelSet(int button)
if (button_released)
{
FadeSoundsAndMusic();
if (button_released)
{
FadeSoundsAndMusic();
info_mode = INFO_MODE_MAIN;
info_mode = INFO_MODE_MAIN;
+ DrawAndFadeInInfoScreen(REDRAW_FIELD);
-static void DrawInfoScreenExt(boolean do_fading)
+static void DrawInfoScreenExt(int redraw_mask, boolean do_fading)
{
SetMainBackgroundImage(IMG_BACKGROUND_INFO);
{
SetMainBackgroundImage(IMG_BACKGROUND_INFO);
else if (info_mode == INFO_MODE_LEVELSET)
DrawInfoScreen_LevelSet();
else
else if (info_mode == INFO_MODE_LEVELSET)
DrawInfoScreen_LevelSet();
else
- DrawInfoScreen_Main(do_fading);
+ DrawInfoScreen_Main(redraw_mask, do_fading);
if (info_mode != INFO_MODE_MAIN &&
info_mode != INFO_MODE_TITLE &&
if (info_mode != INFO_MODE_MAIN &&
info_mode != INFO_MODE_TITLE &&
+void DrawAndFadeInInfoScreen(int redraw_mask)
+{
+ DrawInfoScreenExt(redraw_mask, TRUE);
+}
+
+ DrawInfoScreenExt(REDRAW_ALL, FALSE);
}
void HandleInfoScreen(int mx, int my, int dx, int dy, int button)
}
void HandleInfoScreen(int mx, int my, int dx, int dy, int button)
if (redraw_mask == REDRAW_NONE)
return;
if (redraw_mask == REDRAW_NONE)
return;
+ if (redraw_mask & REDRAW_TILES &&
+ game_status == GAME_MODE_PLAYING &&
+ border.draw_masked[game_status])
+ redraw_mask |= REDRAW_FIELD;
+
if (global.fps_slowdown && game_status == GAME_MODE_PLAYING)
{
static boolean last_frame_skipped = FALSE;
if (global.fps_slowdown && game_status == GAME_MODE_PLAYING)
{
static boolean last_frame_skipped = FALSE;
+#if 1
+ DrawMaskedBorder(redraw_mask);
+#endif
+
if (redraw_mask & REDRAW_ALL)
{
if (redraw_mask & REDRAW_ALL)
{
+#if 0
+ DrawMaskedBorder(REDRAW_ALL);
+#endif
BlitBitmap(backbuffer, window, 0, 0, WIN_XSIZE, WIN_YSIZE, 0, 0);
redraw_mask = REDRAW_NONE;
BlitBitmap(backbuffer, window, 0, 0, WIN_XSIZE, WIN_YSIZE, 0, 0);
redraw_mask = REDRAW_NONE;
if (game_status != GAME_MODE_PLAYING ||
redraw_mask & REDRAW_FROM_BACKBUFFER)
{
if (game_status != GAME_MODE_PLAYING ||
redraw_mask & REDRAW_FROM_BACKBUFFER)
{
DrawMaskedBorder(REDRAW_FIELD);
DrawMaskedBorder(REDRAW_FIELD);
BlitBitmap(backbuffer, window,
REAL_SX, REAL_SY, FULL_SXSIZE, FULL_SYSIZE, REAL_SX, REAL_SY);
}
BlitBitmap(backbuffer, window,
REAL_SX, REAL_SY, FULL_SXSIZE, FULL_SYSIZE, REAL_SX, REAL_SY);
}
{
if (redraw_mask & REDRAW_DOOR_1)
{
{
if (redraw_mask & REDRAW_DOOR_1)
{
DrawMaskedBorder(REDRAW_DOOR_1);
DrawMaskedBorder(REDRAW_DOOR_1);
BlitBitmap(backbuffer, window, DX, DY, DXSIZE, DYSIZE, DX, DY);
}
if (redraw_mask & REDRAW_DOOR_2)
{
BlitBitmap(backbuffer, window, DX, DY, DXSIZE, DYSIZE, DX, DY);
}
if (redraw_mask & REDRAW_DOOR_2)
{
DrawMaskedBorder(REDRAW_DOOR_2);
DrawMaskedBorder(REDRAW_DOOR_2);
BlitBitmap(backbuffer, window, VX, VY, VXSIZE, VYSIZE, VX, VY);
}
if (redraw_mask & REDRAW_DOOR_3)
{
BlitBitmap(backbuffer, window, VX, VY, VXSIZE, VYSIZE, VX, VY);
}
if (redraw_mask & REDRAW_DOOR_3)
{
DrawMaskedBorder(REDRAW_DOOR_3);
DrawMaskedBorder(REDRAW_DOOR_3);
BlitBitmap(backbuffer, window, EX, EY, EXSIZE, EYSIZE, EX, EY);
}
BlitBitmap(backbuffer, window, EX, EY, EXSIZE, EYSIZE, EX, EY);
}
+#if 1
+ if (!PendingEvent()) /* delay only if no pending events */
+ Delay(10);
+#else
/* don't eat all CPU time */
Delay(10);
/* don't eat all CPU time */
Delay(10);
}
if (game_status != GAME_MODE_MAIN)
}
if (game_status != GAME_MODE_MAIN)