gfx.vxsize, gfx.vysize, gfx.vx, gfx.vy);
/* draw tape buttons (forced) */
- UnmapTapeButtons();
- MapTapeButtons();
+ RedrawOrRemapTapeButtons();
DrawVideoDisplay(VIDEO_ALL_OFF, 0);
// restart step/move snapshots after quick loading tape
SaveEngineSnapshotToListInitial();
+
+ // do not map undo/redo buttons after quick loading tape
+ return;
}
if (setup.show_snapshot_buttons &&
Print("Level %03d: ", level_nr);
LoadLevel(level_nr);
- if (level.no_valid_file)
+ if (level.no_level_file || level.no_valid_file)
{
Print("(no level)\n");
continue;
UnmapGameButtons();
}
+void RedrawTapeButtons()
+{
+ int i;
+
+ for (i = 0; i < NUM_TAPE_BUTTONS; i++)
+ RedrawGadget(tape_gadget[i]);
+
+ if (tape.show_game_buttons)
+ RedrawGameButtons();
+
+ // RedrawGadget() may have set REDRAW_ALL if buttons are defined off-area
+ redraw_mask &= ~REDRAW_ALL;
+}
+
+void RedrawOrRemapTapeButtons()
+{
+ if (tape_gadget[TAPE_CTRL_ID_PLAY]->mapped)
+ {
+ // tape buttons already mapped
+ RedrawTapeButtons();
+ }
+ else
+ {
+ UnmapTapeButtons();
+ MapTapeButtons();
+ }
+}
+
static void HandleTapeButtonsExt(int id)
{
if (game_status != GAME_MODE_MAIN && game_status != GAME_MODE_PLAYING)