2006-10-03
* fixed bug with not unmapping main menu screen gadgets on other screens
+ * fixed bug with un-pausing a paused game by releasing still pressed key
+ * fixed bug with not redrawing screen when toggling to/from fullscreen
+ mode while fast reloading tape (without redrawing playfield contents)
+ * fixed bug with quick-saving tape snapshot despite answering with "no"
2006-08-30
* version number set to 3.2.3
-#define COMPILE_DATE_STRING "[2006-10-03 09:59]"
+#define COMPILE_DATE_STRING "[2006-10-03 15:21]"
element_dropped[pnr] = FALSE;
}
}
+#if 1
+ else if (tape.recording && tape.pausing)
+ {
+ /* prevent key release events from un-pausing a paused game */
+ if (key_status == KEY_PRESSED &&
+ (key_action & KEY_ACTION))
+ TapeTogglePause(TAPE_TOGGLE_MANUAL);
+ }
+#else
else if (tape.recording && tape.pausing && (key_action & KEY_ACTION))
TapeTogglePause(TAPE_TOGGLE_MANUAL);
+#endif
}
}
else
SaveLevelFromFilename(&level, filename);
}
+boolean SaveLevelChecked(int nr)
+{
+ char *filename = getDefaultLevelFilename(nr);
+ boolean new_level = !fileExists(filename);
+ boolean level_saved = FALSE;
+
+ if (new_level || Request("Save this level and kill the old ?", REQ_ASK))
+ {
+ SaveLevel(nr);
+
+ if (new_level)
+ Request("Level saved !", REQ_CONFIRM);
+
+ level_saved = TRUE;
+ }
+
+ return level_saved;
+}
+
void DumpLevel(struct LevelInfo *level)
{
if (level->no_valid_file)
{
char *filename = getTapeFilename(nr);
FILE *file;
+#if 0
boolean new_tape = TRUE;
+#endif
int num_participating_players = 0;
int info_chunk_size;
int body_chunk_size;
InitTapeDirectory(leveldir_current->subdir);
+#if 0
/* if a tape still exists, ask to overwrite it */
if (fileExists(filename))
{
if (!Request("Replace old tape ?", REQ_ASK))
return;
}
+#endif
if (!(file = fopen(filename, MODE_WRITE)))
{
tape.changed = FALSE;
+#if 0
if (new_tape)
Request("Tape saved !", REQ_CONFIRM);
+#endif
+}
+
+boolean SaveTapeChecked(int nr)
+{
+ char *filename = getTapeFilename(nr);
+ boolean new_tape = !fileExists(filename);
+ boolean tape_saved = FALSE;
+
+ if (new_tape || Request("Replace old tape ?", REQ_ASK))
+ {
+ SaveTape(nr);
+
+ if (new_tape)
+ Request("Tape saved !", REQ_CONFIRM);
+
+ tape_saved = TRUE;
+ }
+
+ return tape_saved;
}
void DumpTape(struct TapeInfo *tape)
void SaveLevel(int);
void SaveLevelTemplate();
void DumpLevel(struct LevelInfo *);
+boolean SaveLevelChecked(int);
void CopyNativeLevel_RND_to_Native(struct LevelInfo *);
void CopyNativeLevel_Native_to_RND(struct LevelInfo *);
void LoadSolutionTape(int);
void SaveTape(int);
void DumpTape(struct TapeInfo *);
+boolean SaveTapeChecked(int);
void LoadScore(int);
void SaveScore(int);
TapeStop();
#endif
+#if 1
+ SaveTapeChecked(tape.level_nr); /* ask to save tape */
+#else
SaveTape(tape.level_nr); /* ask to save tape */
+#endif
}
if (level_editor_test_game)
if (draw_mask & REDRAW_ALL)
return TRUE;
- if ((draw_mask & REDRAW_FIELD) && x < gfx.real_sx + gfx.full_sxsize)
+ if ((draw_mask & REDRAW_FIELD) &&
+ x >= gfx.real_sx && x < gfx.real_sx + gfx.full_sxsize)
return TRUE;
- if ((draw_mask & REDRAW_DOOR_1) && x >= gfx.dx && y < gfx.dy + gfx.dysize)
+ if ((draw_mask & REDRAW_DOOR_1) &&
+ x >= gfx.dx && y < gfx.dy + gfx.dysize)
return TRUE;
- if ((draw_mask & REDRAW_DOOR_2) && x >= gfx.dx && y >= gfx.vy)
+ if ((draw_mask & REDRAW_DOOR_2) &&
+ x >= gfx.dx && y >= gfx.vy)
return TRUE;
return FALSE;
TapeHaltRecording(); /* prepare tape for saving on-the-fly */
if (TAPE_IS_EMPTY(tape))
+ {
Request("No tape that can be saved !", REQ_CONFIRM);
- else
- SaveTape(tape.level_nr);
- SaveEngineSnapshot();
+ return;
+ }
+
+ if (SaveTapeChecked(tape.level_nr))
+ SaveEngineSnapshot();
}
void TapeQuickLoad()
LoadEngineSnapshot();
+ DrawCompleteVideoDisplay();
+
tape.playing = TRUE;
tape.pausing = TRUE;
{
case TAPE_CTRL_ID_EJECT:
TapeStop();
+
if (TAPE_IS_EMPTY(tape))
{
LoadTape(level_nr);
+
if (TAPE_IS_EMPTY(tape))
Request("No tape for this level !", REQ_CONFIRM);
}
else
{
if (tape.changed)
- SaveTape(tape.level_nr);
+ SaveTapeChecked(tape.level_nr);
+
TapeErase();
}
+
DrawCompleteVideoDisplay();
break;
}
else if (tape.recording)
TapeSingleStep();
+
break;
case TAPE_CTRL_ID_STOP:
FreeBitmap(tmp_backbuffer);
+#if 1
+ /* update visible window/screen */
+ BlitBitmap(backbuffer, window, 0, 0, WIN_XSIZE, WIN_YSIZE, 0, 0);
+#else
redraw_mask = REDRAW_ALL;
+#endif
}
}