projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed and extended auto-replay modes from command line
[rocksndiamonds.git]
/
src
/
tape.c
diff --git
a/src/tape.c
b/src/tape.c
index 8087860ba5b33d4a7fd2f7ec4396a3f6a7910e06..6d90ca96e093b9a3b9c5cfd3a8edcd9a2f2ddc76 100644
(file)
--- a/
src/tape.c
+++ b/
src/tape.c
@@
-889,15
+889,16
@@
unsigned int GetTapeLengthSeconds()
return (GetTapeLengthFrames() * GAME_FRAME_DELAY / 1000);
}
return (GetTapeLengthFrames() * GAME_FRAME_DELAY / 1000);
}
-static void TapeStartWarpForward()
+static void TapeStartWarpForward(
int mode
)
{
{
- tape.fast_forward =
TRUE
;
- tape.warp_forward =
TRUE
;
- tape.deactivate_display =
TRUE
;
+ tape.fast_forward =
(mode & AUTOPLAY_FFWD)
;
+ tape.warp_forward =
(mode & AUTOPLAY_WARP)
;
+ tape.deactivate_display =
(mode & AUTOPLAY_WARP_NO_DISPLAY)
;
tape.pausing = FALSE;
tape.pausing = FALSE;
- TapeDeactivateDisplayOn();
+ if (tape.deactivate_display)
+ TapeDeactivateDisplayOn();
DrawVideoDisplayCurrentState();
}
DrawVideoDisplayCurrentState();
}
@@
-1005,7
+1006,7
@@
void TapeQuickLoad()
if (!TAPE_IS_EMPTY(tape))
{
TapeStartGamePlaying();
if (!TAPE_IS_EMPTY(tape))
{
TapeStartGamePlaying();
- TapeStartWarpForward();
+ TapeStartWarpForward(
AUTOPLAY_MODE_WARP_NO_DISPLAY
);
tape.quick_resume = TRUE;
}
tape.quick_resume = TRUE;
}
@@
-1135,12
+1136,7
@@
void AutoPlayTape()
printf("playing tape ... ");
TapeStartGamePlaying();
printf("playing tape ... ");
TapeStartGamePlaying();
-
- if (global.autoplay_mode == AUTOPLAY_FFWD)
- tape.fast_forward = TRUE;
-
- if (global.autoplay_mode != AUTOPLAY_PLAY)
- TapeStartWarpForward();
+ TapeStartWarpForward(global.autoplay_mode);
return;
}
return;
}