projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed calculating position of global animations triggered by CE change
[rocksndiamonds.git]
/
src
/
tape.c
diff --git
a/src/tape.c
b/src/tape.c
index c0939acd8dbd87c752c4aa143dfa203d37d60182..f16e7ec9451a20ab68068add00155ed01870088a 100644
(file)
--- a/
src/tape.c
+++ b/
src/tape.c
@@
-779,7
+779,9
@@
static void TapeAppendRecording(void)
void TapeHaltRecording(void)
{
void TapeHaltRecording(void)
{
- tape.counter++;
+ // only advance tape counter if any input events have been recorded
+ if (tape.pos[tape.counter].delay > 0)
+ tape.counter++;
// initialize delay for next tape entry (to be able to continue recording)
if (tape.counter < MAX_TAPE_LEN)
// initialize delay for next tape entry (to be able to continue recording)
if (tape.counter < MAX_TAPE_LEN)
@@
-834,6
+836,8
@@
boolean TapeAddAction(byte action[MAX_TAPE_ACTIONS])
tape.pos[tape.counter].delay++;
}
tape.pos[tape.counter].delay++;
}
+ tape.changed = TRUE;
+
return TRUE;
}
return TRUE;
}
@@
-932,6
+936,10
@@
void TapeTogglePause(boolean toggle_mode)
ModifyPauseButtons();
}
ModifyPauseButtons();
}
+
+ // stop tape when leaving auto-pause after completely replaying tape
+ if (tape.playing && !tape.pausing && tape.counter >= tape.length)
+ TapeStop();
}
void TapeStartPlaying(void)
}
void TapeStartPlaying(void)
@@
-1199,8
+1207,7
@@
void TapeQuickSave(void)
return;
}
return;
}
- if (tape.recording)
- TapeHaltRecording(); // prepare tape for saving on-the-fly
+ TapeHaltRecording(); // prepare tape for saving on-the-fly
if (TAPE_IS_EMPTY(tape))
{
if (TAPE_IS_EMPTY(tape))
{