projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added single-step mode (well, sort of) to MM game engine
[rocksndiamonds.git]
/
src
/
tools.c
diff --git
a/src/tools.c
b/src/tools.c
index 3c301a3912f9b03461885a1102dfafe0807dee71..777a1a08c833bcde707f13a322b04767195a82f3 100644
(file)
--- a/
src/tools.c
+++ b/
src/tools.c
@@
-654,10
+654,9
@@
void DrawTileCursor(int draw_target)
!tile_cursor.active)
return;
!tile_cursor.active)
return;
- if (tile_cursor.x != tile_cursor.target_x ||
- tile_cursor.y != tile_cursor.target_y)
+ if (tile_cursor.moving)
{
{
- int step = TILESIZE_VAR /
(GADGET_FRAME_DELAY / video.frame_delay_value)
;
+ int step = TILESIZE_VAR /
4
;
int dx = tile_cursor.target_x - tile_cursor.x;
int dy = tile_cursor.target_y - tile_cursor.y;
int dx = tile_cursor.target_x - tile_cursor.x;
int dy = tile_cursor.target_y - tile_cursor.y;
@@
-670,6
+669,10
@@
void DrawTileCursor(int draw_target)
tile_cursor.y = tile_cursor.target_y;
else
tile_cursor.y += SIGN(dy) * step;
tile_cursor.y = tile_cursor.target_y;
else
tile_cursor.y += SIGN(dy) * step;
+
+ if (tile_cursor.x == tile_cursor.target_x &&
+ tile_cursor.y == tile_cursor.target_y)
+ tile_cursor.moving = FALSE;
}
dst_x = tile_cursor.x;
}
dst_x = tile_cursor.x;
@@
-8744,6
+8747,11
@@
void CheckSaveEngineSnapshot_SP(boolean murphy_is_waiting,
}
}
}
}
+void CheckSaveEngineSnapshot_MM(boolean button_released)
+{
+ CheckSaveEngineSnapshotToList();
+}
+
void CheckSingleStepMode_EM(byte action[MAX_PLAYERS], int frame,
boolean any_player_moving,
boolean any_player_snapping,
void CheckSingleStepMode_EM(byte action[MAX_PLAYERS], int frame,
boolean any_player_moving,
boolean any_player_snapping,
@@
-8774,6
+8782,15
@@
void CheckSingleStepMode_SP(boolean murphy_is_waiting,
CheckSaveEngineSnapshot_SP(murphy_is_waiting, murphy_is_dropping);
}
CheckSaveEngineSnapshot_SP(murphy_is_waiting, murphy_is_dropping);
}
+void CheckSingleStepMode_MM(boolean button_released)
+{
+ if (tape.single_step && tape.recording && !tape.pausing)
+ if (button_released)
+ TapeTogglePause(TAPE_TOGGLE_AUTOMATIC);
+
+ CheckSaveEngineSnapshot_MM(button_released);
+}
+
void getGraphicSource_SP(struct GraphicInfo_SP *g_sp,
int graphic, int sync_frame, int x, int y)
{
void getGraphicSource_SP(struct GraphicInfo_SP *g_sp,
int graphic, int sync_frame, int x, int y)
{