projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rnd-20040612-2-src
[rocksndiamonds.git]
/
src
/
tape.c
diff --git
a/src/tape.c
b/src/tape.c
index d3fdd45729a3bbd03f34a80020b7b281ffe965d2..e6fbcdab528e3082dcaca4c7d1cd11b58986d8e0 100644
(file)
--- a/
src/tape.c
+++ b/
src/tape.c
@@
-776,8
+776,10
@@
void TapeHaltRecording()
void TapeStopRecording()
{
void TapeStopRecording()
{
+#if 0
if (!tape.recording)
return;
if (!tape.recording)
return;
+#endif
TapeHaltRecording();
TapeHaltRecording();
@@
-923,8
+925,10
@@
static void TapeStartGamePlaying()
void TapeStopPlaying()
{
void TapeStopPlaying()
{
+#if 0
if (!tape.playing)
return;
if (!tape.playing)
return;
+#endif
tape.playing = FALSE;
tape.pausing = FALSE;
tape.playing = FALSE;
tape.pausing = FALSE;
@@
-962,7
+966,7
@@
byte *TapePlayAction()
DrawVideoDisplay(VIDEO_STATE_WARP2_ON, VIDEO_DISPLAY_SYMBOL_ONLY);
}
DrawVideoDisplay(VIDEO_STATE_WARP2_ON, VIDEO_DISPLAY_SYMBOL_ONLY);
}
- if (T
imePlayed
> tape.length_seconds - TAPE_PAUSE_SECONDS_BEFORE_DEATH)
+ if (T
apeTime
> tape.length_seconds - TAPE_PAUSE_SECONDS_BEFORE_DEATH)
{
TapeTogglePause(TAPE_TOGGLE_MANUAL);
return NULL;
{
TapeTogglePause(TAPE_TOGGLE_MANUAL);
return NULL;
@@
-1152,13
+1156,19
@@
void TapeQuickSave()
void TapeQuickLoad()
{
void TapeQuickLoad()
{
+ char *filename = getTapeFilename(level_nr);
+
+ if (!fileExists(filename))
+ {
+ Request("No tape for this level !", REQ_CONFIRM);
+
+ return;
+ }
+
if (tape.recording && !Request("Stop recording and load tape ?",
REQ_ASK | REQ_STAY_CLOSED))
{
if (tape.recording && !Request("Stop recording and load tape ?",
REQ_ASK | REQ_STAY_CLOSED))
{
- BlitBitmap(bitmap_db_door, bitmap_db_door,
- DOOR_GFX_PAGEX2, DOOR_GFX_PAGEY1, DXSIZE, DYSIZE,
- DOOR_GFX_PAGEX1, DOOR_GFX_PAGEY1);
- OpenDoor(DOOR_OPEN_1);
+ OpenDoor(DOOR_OPEN_1 | DOOR_COPY_BACK);
return;
}
return;
}
@@
-1176,8
+1186,12
@@
void TapeQuickLoad()
tape.quick_resume = TRUE;
}
tape.quick_resume = TRUE;
}
- else
- Request("No tape for this level !", REQ_CONFIRM);
+ else /* this should not happen (basically checked above) */
+ {
+ int reopen_door = (game_status == GAME_MODE_PLAYING ? REQ_REOPEN : 0);
+
+ Request("No tape for this level !", REQ_CONFIRM | reopen_door);
+ }
}
}
}
}
@@
-1304,6
+1318,7
@@
void AutoPlayTape()
printf("LEVELDIR '%s', SOLVED %d/%d (%d%%)",
autoplay_leveldir->identifier, num_levels_solved, num_levels_played,
(num_levels_played ? num_levels_solved * 100 / num_levels_played :0));
printf("LEVELDIR '%s', SOLVED %d/%d (%d%%)",
autoplay_leveldir->identifier, num_levels_solved, num_levels_played,
(num_levels_played ? num_levels_solved * 100 / num_levels_played :0));
+
if (num_levels_played != num_levels_solved)
{
printf(", FAILED:");
if (num_levels_played != num_levels_solved)
{
printf(", FAILED:");
@@
-1311,6
+1326,7
@@
void AutoPlayTape()
if (levels_failed[i])
printf(" %03d", i);
}
if (levels_failed[i])
printf(" %03d", i);
}
+
printf("\n");
printf_line("=", 79);
printf("\n");
printf_line("=", 79);
@@
-1558,9
+1574,15
@@
static void HandleTapeButtons(struct GadgetInfo *gi)
}
else /* AUTO PAUSE -> NORMAL PLAY */
{
}
else /* AUTO PAUSE -> NORMAL PLAY */
{
+#if 1
+ if (tape.warp_forward)
+ TapeStopWarpForward();
+#else
+ tape.warp_forward = FALSE;
+#endif
tape.fast_forward = FALSE;
tape.pause_before_death = FALSE;
tape.fast_forward = FALSE;
tape.pause_before_death = FALSE;
- tape.warp_forward = FALSE;
+
#if 1
DrawVideoDisplay(VIDEO_STATE_PBEND_OFF | VIDEO_STATE_PLAY_ON, 0);
#else
#if 1
DrawVideoDisplay(VIDEO_STATE_PBEND_OFF | VIDEO_STATE_PLAY_ON, 0);
#else