projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
replaced stop/play buttons in game panel with save/load buttons
[rocksndiamonds.git]
/
src
/
tape.c
diff --git
a/src/tape.c
b/src/tape.c
index 342f346df3703fabf00f668a17c19b528d67f162..efc8bcb4c26eca3fdf8189470d00319dbdb0dc02 100644
(file)
--- a/
src/tape.c
+++ b/
src/tape.c
@@
-195,7
+195,7
@@
static void DrawVideoDisplay_Graphics(unsigned int state, unsigned int value)
static struct
{
int graphic;
static struct
{
int graphic;
- struct
Rect
*pos;
+ struct
XY
*pos;
}
video_pos[NUM_TAPE_FUNCTIONS][NUM_TAPE_FUNCTION_PARTS] =
{
}
video_pos[NUM_TAPE_FUNCTIONS][NUM_TAPE_FUNCTION_PARTS] =
{
@@
-253,7
+253,7
@@
static void DrawVideoDisplay_Graphics(unsigned int state, unsigned int value)
for (j = 0; j < NUM_TAPE_FUNCTION_PARTS; j++) /* label or symbol */
{
int graphic = video_pos[i][j].graphic;
for (j = 0; j < NUM_TAPE_FUNCTION_PARTS; j++) /* label or symbol */
{
int graphic = video_pos[i][j].graphic;
- struct
Rect
*pos = video_pos[i][j].pos;
+ struct
XY
*pos = video_pos[i][j].pos;
if (graphic == -1 ||
pos->x == -1 ||
if (graphic == -1 ||
pos->x == -1 ||
@@
-739,10
+739,21
@@
void TapeTogglePause(boolean toggle_manual)
TapeAppendRecording();
TapeAppendRecording();
- if (!CheckEngineSnapshot())
- SaveEngineSnapshot();
+ if (!CheckEngineSnapshotSingle())
+ SaveEngineSnapshotSingle();
+
+ // restart step/move snapshots after quick loading tape
+ SaveEngineSnapshotToListInitial();
}
}
}
}
+
+ if (CheckEngineSnapshotList())
+ {
+ if (tape.pausing)
+ MapUndoRedoButtons();
+ else if (!tape.single_step)
+ UnmapUndoRedoButtons();
+ }
}
void TapeStartPlaying()
}
void TapeStartPlaying()
@@
-1002,7
+1013,7
@@
void TapeQuickSave()
}
if (SaveTapeChecked(tape.level_nr))
}
if (SaveTapeChecked(tape.level_nr))
- SaveEngineSnapshot();
+ SaveEngineSnapshot
Single
();
}
void TapeQuickLoad()
}
void TapeQuickLoad()
@@
-1027,11
+1038,11
@@
void TapeQuickLoad()
if (game_status != GAME_MODE_PLAYING && game_status != GAME_MODE_MAIN)
return;
if (game_status != GAME_MODE_PLAYING && game_status != GAME_MODE_MAIN)
return;
- if (CheckEngineSnapshot())
+ if (CheckEngineSnapshot
Single
())
{
TapeStartGamePlaying();
{
TapeStartGamePlaying();
- LoadEngineSnapshot();
+ LoadEngineSnapshot
Single
();
DrawCompleteVideoDisplay();
DrawCompleteVideoDisplay();
@@
-1041,6
+1052,9
@@
void TapeQuickLoad()
TapeStopWarpForward();
TapeAppendRecording();
TapeStopWarpForward();
TapeAppendRecording();
+ // restart step/move snapshots after quick loading tape
+ SaveEngineSnapshotToListInitial();
+
if (FrameCounter > 0)
return;
}
if (FrameCounter > 0)
return;
}
@@
-1217,7
+1231,7
@@
void AutoPlayTape()
static struct
{
int graphic;
static struct
{
int graphic;
- struct
Rect
*pos;
+ struct
XY
*pos;
int gadget_id;
char *infotext;
} tapebutton_info[NUM_TAPE_BUTTONS] =
int gadget_id;
char *infotext;
} tapebutton_info[NUM_TAPE_BUTTONS] =
@@
-1256,7
+1270,7
@@
void CreateTapeButtons()
for (i = 0; i < NUM_TAPE_BUTTONS; i++)
{
struct GraphicInfo *gfx = &graphic_info[tapebutton_info[i].graphic];
for (i = 0; i < NUM_TAPE_BUTTONS; i++)
{
struct GraphicInfo *gfx = &graphic_info[tapebutton_info[i].graphic];
- struct
Rect
*pos = tapebutton_info[i].pos;
+ struct
XY
*pos = tapebutton_info[i].pos;
struct GadgetInfo *gi;
int gd_x = gfx->src_x;
int gd_y = gfx->src_y;
struct GadgetInfo *gi;
int gd_x = gfx->src_x;
int gd_y = gfx->src_y;