projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added functions to get current player position for all game engines
[rocksndiamonds.git]
/
src
/
game.c
diff --git
a/src/game.c
b/src/game.c
index 09dc63fd73f158752a22eee66a69ac7ddeb717d1..3d2f055f27c88415dccb499d83d65932ad8a5f1e 100644
(file)
--- a/
src/game.c
+++ b/
src/game.c
@@
-4037,13
+4037,24
@@
void InitGame()
SaveEngineSnapshotToListInitial();
}
SaveEngineSnapshotToListInitial();
}
-void UpdateEngineValues(int actual_scroll_x, int actual_scroll_y)
+void UpdateEngineValues(int actual_scroll_x, int actual_scroll_y,
+ int actual_player_x, int actual_player_y)
{
/* this is used for non-R'n'D game engines to update certain engine values */
{
/* this is used for non-R'n'D game engines to update certain engine values */
+ if (level.game_engine_type == GAME_ENGINE_TYPE_EM)
+ {
+ actual_player_x = correctLevelPosX_EM(actual_player_x);
+ actual_player_y = correctLevelPosY_EM(actual_player_y);
+ }
+
/* needed to determine if sounds are played within the visible screen area */
scroll_x = actual_scroll_x;
scroll_y = actual_scroll_y;
/* needed to determine if sounds are played within the visible screen area */
scroll_x = actual_scroll_x;
scroll_y = actual_scroll_y;
+
+ /* needed to get player position for "follow finger" playing input method */
+ local_player->jx = actual_player_x;
+ local_player->jy = actual_player_y;
}
void InitMovDir(int x, int y)
}
void InitMovDir(int x, int y)