projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rnd-20020509-1-src
[rocksndiamonds.git]
/
src
/
tape.c
diff --git
a/src/tape.c
b/src/tape.c
index 73e73a7de5616c496ac0bebfd75d35325adaf3c7..3c39d5abc17c3c9e99ea3726d22c666ac004cc00 100644
(file)
--- a/
src/tape.c
+++ b/
src/tape.c
@@
-35,6
+35,7
@@
/* forward declaration for internal use */
static void HandleTapeButtons(struct GadgetInfo *);
/* forward declaration for internal use */
static void HandleTapeButtons(struct GadgetInfo *);
+static void TapeStopIndexSearch();
static struct GadgetInfo *tape_gadget[NUM_TAPE_BUTTONS];
static struct GadgetInfo *tape_gadget[NUM_TAPE_BUTTONS];
@@
-468,13
+469,7
@@
void TapeTogglePause(boolean toggle_manual)
if (tape.index_search)
{
if (tape.index_search)
{
- tape.index_search = FALSE;
-
- SetDrawDeactivationMask(REDRAW_NONE);
- audio.sound_deactivated = FALSE;
-
- RedrawPlayfield(TRUE, 0,0,0,0);
- DrawGameDoorValues();
+ TapeStopIndexSearch();
if (tape.quick_resume)
{
if (tape.quick_resume)
{
@@
-524,6
+519,9
@@
void TapeStopPlaying()
tape.playing = FALSE;
tape.pausing = FALSE;
tape.playing = FALSE;
tape.pausing = FALSE;
+ if (tape.index_search)
+ TapeStopIndexSearch();
+
DrawVideoDisplay(VIDEO_STATE_PLAY_OFF, 0);
MapTapeEjectButton();
}
DrawVideoDisplay(VIDEO_STATE_PLAY_OFF, 0);
MapTapeEjectButton();
}
@@
-603,7
+601,7
@@
unsigned int GetTapeLength()
return(tape_length * GAME_FRAME_DELAY / 1000);
}
return(tape_length * GAME_FRAME_DELAY / 1000);
}
-
void Tape
IndexSearch()
+
static void TapeStart
IndexSearch()
{
tape.index_search = TRUE;
{
tape.index_search = TRUE;
@@
-616,7
+614,18
@@
void TapeIndexSearch()
}
}
}
}
-void TapeSingleStep()
+static void TapeStopIndexSearch()
+{
+ tape.index_search = FALSE;
+
+ SetDrawDeactivationMask(REDRAW_NONE);
+ audio.sound_deactivated = FALSE;
+
+ RedrawPlayfield(TRUE, 0,0,0,0);
+ DrawGameDoorValues();
+}
+
+static void TapeSingleStep()
{
if (options.network)
return;
{
if (options.network)
return;
@@
-654,7
+663,7
@@
void TapeQuickLoad()
if (!TAPE_IS_EMPTY(tape))
{
TapeStartGamePlaying();
if (!TAPE_IS_EMPTY(tape))
{
TapeStartGamePlaying();
- TapeIndexSearch();
+ Tape
Start
IndexSearch();
tape.quick_resume = TRUE;
}
tape.quick_resume = TRUE;
}
@@
-823,7
+832,7
@@
static void HandleTapeButtons(struct GadgetInfo *gi)
case TAPE_CTRL_ID_INDEX:
if (tape.playing)
case TAPE_CTRL_ID_INDEX:
if (tape.playing)
- TapeIndexSearch();
+ Tape
Start
IndexSearch();
else if (tape.recording)
TapeSingleStep();
break;
else if (tape.recording)
TapeSingleStep();
break;