projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
476df02
)
added correcting playfield scroll position for EM engine
author
Holger Schemel
<info@artsoft.org>
Thu, 28 May 2020 15:35:22 +0000
(17:35 +0200)
committer
Holger Schemel
<info@artsoft.org>
Thu, 28 May 2020 16:16:58 +0000
(18:16 +0200)
src/game.c
patch
|
blob
|
history
src/tools.c
patch
|
blob
|
history
diff --git
a/src/game.c
b/src/game.c
index 08b787fdc83c4f489ddf25ad467ad780825c5347..f4ae9303776da68ac2be4439c6b5ff651be2fe59 100644
(file)
--- a/
src/game.c
+++ b/
src/game.c
@@
-4396,6
+4396,9
@@
void UpdateEngineValues(int actual_scroll_x, int actual_scroll_y,
if (level.game_engine_type == GAME_ENGINE_TYPE_EM)
{
if (level.game_engine_type == GAME_ENGINE_TYPE_EM)
{
+ actual_scroll_x = correctLevelPosX_EM(actual_scroll_x);
+ actual_scroll_y = correctLevelPosY_EM(actual_scroll_y);
+
actual_player_x = correctLevelPosX_EM(actual_player_x);
actual_player_y = correctLevelPosY_EM(actual_player_y);
}
actual_player_x = correctLevelPosX_EM(actual_player_x);
actual_player_y = correctLevelPosY_EM(actual_player_y);
}
diff --git
a/src/tools.c
b/src/tools.c
index 2bc7d4fe9c000c06b4b429559be9aded895a52cc..70441d1c649eb06074c3fe77ef482de307668ac8 100644
(file)
--- a/
src/tools.c
+++ b/
src/tools.c
@@
-291,8
+291,6
@@
static int getLevelFromScreenX_EM(int sx)
int px = sx - SX;
int lx = LEVELX((px + dx) / TILESIZE_VAR);
int px = sx - SX;
int lx = LEVELX((px + dx) / TILESIZE_VAR);
- lx = correctLevelPosX_EM(lx);
-
return lx;
}
return lx;
}
@@
-308,8
+306,6
@@
static int getLevelFromScreenY_EM(int sy)
int py = sy - SY;
int ly = LEVELY((py + dy) / TILESIZE_VAR);
int py = sy - SY;
int ly = LEVELY((py + dy) / TILESIZE_VAR);
- ly = correctLevelPosY_EM(ly);
-
return ly;
}
return ly;
}