* changed end of game again: do not wait for the user to press a key
anymore, but directly ask/confirm tape saving and go to hall of fame
* re-enabled quitting of lost game by pressing space or return again
* improved handling of title text messages (initial and for level set)
* added new options "auto-wrap" and "centered" for DC2 style envelopes
+2007-02-07
+ * changed end of game again: do not wait for the user to press a key
+ anymore, but directly ask/confirm tape saving and go to hall of fame
+ * re-enabled quitting of lost game by pressing space or return again
+
+2007-02-05
+ * improved handling of title text messages (initial and for level set)
+
+2007-02-03
+ * added new options "auto-wrap" and "centered" for DC2 style envelopes
+
2007-01-31
* fixed displaying and typing of player name when it is centered
* added special characters to be allowed for player name (not only A-Z)
2007-01-31
* fixed displaying and typing of player name when it is centered
* added special characters to be allowed for player name (not only A-Z)
-#define COMPILE_DATE_STRING "2007-02-07 01:33"
+#define COMPILE_DATE_STRING "2007-02-07 23:23"
-#if 1
- if (game_status == GAME_MODE_PLAYING &&
- local_player->LevelSolved_GameEnd &&
+#if 0
+ if (game_status == GAME_MODE_PLAYING && local_player->LevelSolved_GameEnd &&
(key == KSYM_Return || key == setup.shortcut.toggle_pause))
#else
if (game_status == GAME_MODE_PLAYING && AllPlayersGone &&
(key == KSYM_Return || key == setup.shortcut.toggle_pause))
#else
if (game_status == GAME_MODE_PLAYING && AllPlayersGone &&
if (tape.playing || keyboard)
newbutton = ((joy & JOY_BUTTON) != 0);
if (tape.playing || keyboard)
newbutton = ((joy & JOY_BUTTON) != 0);
if (local_player->LevelSolved_GameEnd && newbutton)
#else
if (AllPlayersGone && newbutton)
if (local_player->LevelSolved_GameEnd && newbutton)
#else
if (AllPlayersGone && newbutton)
#define EX_TYPE_SINGLE_TILE (EX_TYPE_CENTER | EX_TYPE_BORDER)
#if 1
#define EX_TYPE_SINGLE_TILE (EX_TYPE_CENTER | EX_TYPE_BORDER)
#if 1
-#define PANEL_DEACTIVATED(p) ((p)->x < 0 || (p)->y < 0)
+#define PANEL_OFF() (local_player->LevelSolved_PanelOff)
+#define PANEL_DEACTIVATED(p) ((p)->x < 0 || (p)->y < 0 || PANEL_OFF())
#define PANEL_XPOS(p) (DX + ALIGNED_MENU_XPOS(p))
#define PANEL_YPOS(p) (DY + ALIGNED_MENU_YPOS(p))
#else
#define PANEL_XPOS(p) (DX + ALIGNED_MENU_XPOS(p))
#define PANEL_YPOS(p) (DY + ALIGNED_MENU_YPOS(p))
#else
player->LevelSolved = FALSE;
player->GameOver = FALSE;
player->LevelSolved = FALSE;
player->GameOver = FALSE;
+ player->LevelSolved_GameWon = FALSE;
player->LevelSolved_GameEnd = FALSE;
player->LevelSolved_GameEnd = FALSE;
+ player->LevelSolved_PanelOff = FALSE;
player->LevelSolved_SaveTape = FALSE;
player->LevelSolved_SaveScore = FALSE;
}
player->LevelSolved_SaveTape = FALSE;
player->LevelSolved_SaveScore = FALSE;
}
{
static int time, time_final;
static int score, score_final;
{
static int time, time_final;
static int score, score_final;
- static int game_over_delay = 0;
- int game_over_delay_value = 50;
+ static int game_over_delay_1 = 0;
+ static int game_over_delay_2 = 0;
+ int game_over_delay_value_1 = 50;
+ int game_over_delay_value_2 = 50;
- if (!local_player->LevelSolved_GameEnd)
+ if (!local_player->LevelSolved_GameWon)
if (local_player->MovPos)
return;
if (local_player->MovPos)
return;
- local_player->LevelSolved_GameEnd = TRUE;
+ local_player->LevelSolved_GameWon = TRUE;
local_player->LevelSolved_SaveTape = tape.recording;
local_player->LevelSolved_SaveScore = !tape.playing;
local_player->LevelSolved_SaveTape = tape.recording;
local_player->LevelSolved_SaveScore = !tape.playing;
- game_over_delay = game_over_delay_value;
+ game_over_delay_1 = game_over_delay_value_1;
+ game_over_delay_2 = game_over_delay_value_2;
time = time_final = (level.time == 0 ? TimePlayed : TimeLeft);
score = score_final = local_player->score_final;
time = time_final = (level.time == 0 ? TimePlayed : TimeLeft);
score = score_final = local_player->score_final;
PlaySound(SND_GAME_WINNING);
}
PlaySound(SND_GAME_WINNING);
}
- if (game_over_delay > 0)
+ if (game_over_delay_1 > 0)
PlaySoundLoop(SND_GAME_LEVELTIME_BONUS);
else
PlaySound(SND_GAME_LEVELTIME_BONUS);
PlaySoundLoop(SND_GAME_LEVELTIME_BONUS);
else
PlaySound(SND_GAME_LEVELTIME_BONUS);
+
+ return;
+ }
+
+ local_player->LevelSolved_PanelOff = TRUE;
+
+ if (game_over_delay_2 > 0)
+ {
+ game_over_delay_2--;
+
+ return;
+
+#if 1
+ GameEnd();
+#endif
int hi_pos;
boolean raise_level = FALSE;
int hi_pos;
boolean raise_level = FALSE;
+ local_player->LevelSolved_GameEnd = TRUE;
+
CloseDoor(DOOR_CLOSE_1);
if (local_player->LevelSolved_SaveTape)
CloseDoor(DOOR_CLOSE_1);
if (local_player->LevelSolved_SaveTape)
- if (local_player->LevelSolved)
+ if (local_player->LevelSolved && !local_player->LevelSolved_GameEnd)
GameWon();
if (AllPlayersGone && !TAPE_IS_STOPPED(tape))
GameWon();
if (AllPlayersGone && !TAPE_IS_STOPPED(tape))
boolean LevelSolved, GameOver;
boolean LevelSolved, GameOver;
+ boolean LevelSolved_GameWon;
boolean LevelSolved_GameEnd;
boolean LevelSolved_GameEnd;
+ boolean LevelSolved_PanelOff;
boolean LevelSolved_SaveTape;
boolean LevelSolved_SaveScore;
boolean LevelSolved_SaveTape;
boolean LevelSolved_SaveScore;
+#if 1
+
+ if (game_status == GAME_MODE_PLAYING && local_player->LevelSolved_GameEnd)
+ {
+ HandleGameActions();
+ BackToFront();
+ }
+ else
+ {
+ DoAnimation();
+
+ if (!PendingEvent()) /* delay only if no pending events */
+ Delay(10);
+ }
+
+#else
+
#else
/* don't eat all CPU time */
Delay(10);
#else
/* don't eat all CPU time */
Delay(10);