projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
d403419
)
cleanup of tape recorder warp start/stop handling
author
Holger Schemel
<info@artsoft.org>
Thu, 2 Jun 2016 06:43:58 +0000
(08:43 +0200)
committer
Holger Schemel
<info@artsoft.org>
Thu, 2 Jun 2016 06:43:58 +0000
(08:43 +0200)
src/tape.c
patch
|
blob
|
history
diff --git
a/src/tape.c
b/src/tape.c
index 2ddd754ddbdfeb49c51b2336a2b22606233062d4..0c13baa662c32516b02d2f677a34a3a30928f7aa 100644
(file)
--- a/
src/tape.c
+++ b/
src/tape.c
@@
-765,9
+765,6
@@
byte *TapePlayAction()
{
if (TapeTime > tape.length_seconds - TAPE_PAUSE_SECONDS_BEFORE_DEATH)
{
{
if (TapeTime > tape.length_seconds - TAPE_PAUSE_SECONDS_BEFORE_DEATH)
{
- tape.fast_forward = FALSE;
- tape.pause_before_end = FALSE;
-
TapeStopWarpForward();
TapeTogglePause(TAPE_TOGGLE_MANUAL);
TapeStopWarpForward();
TapeTogglePause(TAPE_TOGGLE_MANUAL);
@@
-778,9
+775,14
@@
byte *TapePlayAction()
if (tape.counter >= tape.length) /* end of tape reached */
{
if (tape.warp_forward && !tape.auto_play)
if (tape.counter >= tape.length) /* end of tape reached */
{
if (tape.warp_forward && !tape.auto_play)
+ {
+ TapeStopWarpForward();
TapeTogglePause(TAPE_TOGGLE_MANUAL);
TapeTogglePause(TAPE_TOGGLE_MANUAL);
+ }
else
else
+ {
TapeStop();
TapeStop();
+ }
return NULL;
}
return NULL;
}
@@
-873,28
+875,25
@@
unsigned int GetTapeLengthSeconds()
static void TapeStartWarpForward()
{
static void TapeStartWarpForward()
{
+ tape.fast_forward = TRUE;
tape.warp_forward = TRUE;
tape.warp_forward = TRUE;
+ tape.deactivate_display = TRUE;
- if (!tape.fast_forward && !tape.pause_before_end)
- {
- tape.pausing = FALSE;
- tape.pause_before_end = TRUE;
- tape.deactivate_display = TRUE;
+ tape.pausing = FALSE;
- TapeDeactivateDisplayOn();
- }
+ TapeDeactivateDisplayOn();
DrawVideoDisplayPlayState();
}
static void TapeStopWarpForward()
{
DrawVideoDisplayPlayState();
}
static void TapeStopWarpForward()
{
- if (tape.deactivate_display)
- tape.pause_before_end = FALSE;
-
+ tape.fast_forward = FALSE;
tape.warp_forward = FALSE;
tape.deactivate_display = FALSE;
tape.warp_forward = FALSE;
tape.deactivate_display = FALSE;
+ tape.pause_before_end = FALSE;
+
TapeDeactivateDisplayOff(game_status == GAME_MODE_PLAYING);
DrawVideoDisplayPlayState();
TapeDeactivateDisplayOff(game_status == GAME_MODE_PLAYING);
DrawVideoDisplayPlayState();