/* forward declaration for internal use */
static void HandleTapeButtons(struct GadgetInfo *);
-static void TapeStopWarpForward();
-static float GetTapeLengthSecondsFloat();
+static void TapeStopWarpForward(void);
+static float GetTapeLengthSecondsFloat(void);
static struct GadgetInfo *tape_gadget[NUM_TAPE_BUTTONS];
DrawVideoDisplay_DateTime(state, value);
}
-void DrawVideoDisplayLabel(unsigned int state)
+static void DrawVideoDisplayLabel(unsigned int state)
{
DrawVideoDisplay(state, VIDEO_DISPLAY_LABEL_ONLY);
}
-void DrawVideoDisplaySymbol(unsigned int state)
+static void DrawVideoDisplaySymbol(unsigned int state)
{
DrawVideoDisplay(state, VIDEO_DISPLAY_SYMBOL_ONLY);
}
-void DrawVideoDisplayCurrentState()
+static void DrawVideoDisplayCurrentState(void)
{
int state = 0;
DrawVideoDisplaySymbol(state);
}
-void DrawCompleteVideoDisplay()
+void DrawCompleteVideoDisplay(void)
{
struct GraphicInfo *g_tape = &graphic_info[IMG_BACKGROUND_TAPE];
0, 0);
}
-void TapeDeactivateDisplayOn()
+void TapeDeactivateDisplayOn(void)
{
SetDrawDeactivationMask(REDRAW_FIELD);
audio.sound_deactivated = TRUE;
/* tape logging functions */
/* ========================================================================= */
-void PrintTapeReplayProgress(boolean replay_finished)
+static void PrintTapeReplayProgress(boolean replay_finished)
{
static unsigned int counter_last = -1;
unsigned int counter = Counter();
tape.date = 10000 * (lt->tm_year % 100) + 100 * lt->tm_mon + lt->tm_mday;
}
-void TapeSetDateFromNow()
+void TapeSetDateFromNow(void)
{
TapeSetDateFromEpochSeconds(time(NULL));
}
-void TapeErase()
+void TapeErase(void)
{
int i;
tape.use_mouse = (level.game_engine_type == GAME_ENGINE_TYPE_MM);
}
-static void TapeRewind()
+static void TapeRewind(void)
{
tape.counter = 0;
tape.delay_played = 0;
audio.sound_deactivated = FALSE;
}
-static void TapeStartGameRecording()
+static void TapeStartGameRecording(void)
{
- StartGameActions(options.network, TRUE, level.random_seed);
+ StartGameActions(network.enabled, TRUE, level.random_seed);
}
-static void TapeAppendRecording()
+static void TapeAppendRecording(void)
{
if (!tape.playing || !tape.pausing)
return;
UpdateAndDisplayGameControlValues();
}
-void TapeHaltRecording()
+void TapeHaltRecording(void)
{
tape.counter++;
tape.length_seconds = GetTapeLengthSeconds();
}
-void TapeStopRecording()
+void TapeStopRecording(void)
{
if (tape.recording)
TapeHaltRecording();
}
}
-void TapeStartPlaying()
+void TapeStartPlaying(void)
{
if (TAPE_IS_EMPTY(tape))
return;
audio.sound_deactivated = FALSE;
}
-static void TapeStartGamePlaying()
+static void TapeStartGamePlaying(void)
{
TapeStartPlaying();
InitGame();
}
-void TapeStopPlaying()
+void TapeStopPlaying(void)
{
tape.playing = FALSE;
tape.pausing = FALSE;
MapTapeEjectButton();
}
-byte *TapePlayAction()
+byte *TapePlayAction(void)
{
int update_delay = FRAMES_PER_SECOND / 2;
boolean update_video_display = (FrameCounter % update_delay == 0);
return action;
}
-void TapeStop()
+void TapeStop(void)
{
if (tape.pausing)
TapeTogglePause(TAPE_TOGGLE_MANUAL);
}
}
-unsigned int GetTapeLengthFrames()
+unsigned int GetTapeLengthFrames(void)
{
unsigned int tape_length_frames = 0;
int i;
return tape_length_frames;
}
-unsigned int GetTapeLengthSeconds()
+unsigned int GetTapeLengthSeconds(void)
{
return (GetTapeLengthFrames() * GAME_FRAME_DELAY / 1000);
}
-static float GetTapeLengthSecondsFloat()
+static float GetTapeLengthSecondsFloat(void)
{
return ((float)GetTapeLengthFrames() * GAME_FRAME_DELAY / 1000);
}
DrawVideoDisplayCurrentState();
}
-static void TapeStopWarpForward()
+static void TapeStopWarpForward(void)
{
tape.fast_forward = FALSE;
tape.warp_forward = FALSE;
DrawVideoDisplayCurrentState();
}
-static void TapeSingleStep()
+static void TapeSingleStep(void)
{
- if (options.network)
+ if (network.enabled)
return;
if (!tape.pausing)
DrawVideoDisplay(VIDEO_STATE_1STEP(tape.single_step), 0);
}
-void TapeQuickSave()
+void TapeQuickSave(void)
{
if (game_status == GAME_MODE_MAIN)
{
SaveEngineSnapshotSingle();
}
-void TapeQuickLoad()
+void TapeQuickLoad(void)
{
char *filename = getTapeFilename(level_nr);
}
}
-boolean InsertSolutionTape()
+boolean hasSolutionTape(void)
{
+ boolean tape_file_exists = fileExists(getSolutionTapeFilename(level_nr));
boolean level_has_tape = (level.game_engine_type == GAME_ENGINE_TYPE_SP &&
level.native_sp_level->demo.is_available);
- if (!fileExists(getSolutionTapeFilename(level_nr)) && !level_has_tape)
+ return (tape_file_exists || level_has_tape);
+}
+
+boolean InsertSolutionTape(void)
+{
+ if (!hasSolutionTape())
{
Request("No solution tape for this level!", REQ_CONFIRM);
return TRUE;
}
-boolean PlaySolutionTape()
+boolean PlaySolutionTape(void)
{
if (!InsertSolutionTape())
return FALSE;
* tape autoplay functions
* ------------------------------------------------------------------------- */
-void AutoPlayTape()
+void AutoPlayTape(void)
{
static LevelDirTree *autoplay_leveldir = NULL;
static boolean autoplay_initialized = FALSE;
}
};
-void CreateTapeButtons()
+void CreateTapeButtons(void)
{
int i;
for (i = 0; i < NUM_TAPE_BUTTONS; i++)
{
- struct GraphicInfo *gfx = &graphic_info[tapebutton_info[i].graphic];
+ int graphic = tapebutton_info[i].graphic;
+ struct GraphicInfo *gfx = &graphic_info[graphic];
struct XY *pos = tapebutton_info[i].pos;
struct GadgetInfo *gi;
int gd_x = gfx->src_x;
int id = i;
gi = CreateGadget(GDI_CUSTOM_ID, id,
+ GDI_IMAGE_ID, graphic,
GDI_INFO_TEXT, tapebutton_info[i].infotext,
GDI_X, VX + pos->x,
GDI_Y, VY + pos->y,
}
}
-void FreeTapeButtons()
+void FreeTapeButtons(void)
{
int i;
FreeGadget(tape_gadget[i]);
}
-void MapTapeEjectButton()
+void MapTapeEjectButton(void)
{
UnmapGadget(tape_gadget[TAPE_CTRL_ID_EXTRA]);
MapGadget(tape_gadget[TAPE_CTRL_ID_EJECT]);
}
-void MapTapeWarpButton()
+void MapTapeWarpButton(void)
{
UnmapGadget(tape_gadget[TAPE_CTRL_ID_EJECT]);
MapGadget(tape_gadget[TAPE_CTRL_ID_EXTRA]);
}
-void MapTapeButtons()
+void MapTapeButtons(void)
{
int i;
MapGameButtonsOnTape();
}
-void UnmapTapeButtons()
+void UnmapTapeButtons(void)
{
int i;
UnmapGameButtonsOnTape();
}
-void RedrawTapeButtons()
+void RedrawTapeButtons(void)
{
int i;
redraw_mask &= ~REDRAW_ALL;
}
-void RedrawOrRemapTapeButtons()
+void RedrawOrRemapTapeButtons(void)
{
if (tape_gadget[TAPE_CTRL_ID_PLAY]->mapped)
{