From 476df02707a263f71b8b91f7c6947e8033d20f5e Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Thu, 28 May 2020 17:24:11 +0200 Subject: [PATCH] moved functions for correcting playfield buffer position to EM engine --- src/game_em/export.h | 3 +++ src/game_em/init.c | 14 ++++++++++++++ src/tools.c | 14 -------------- src/tools.h | 3 --- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/game_em/export.h b/src/game_em/export.h index 4766101b..37e11e1a 100644 --- a/src/game_em/export.h +++ b/src/game_em/export.h @@ -105,6 +105,9 @@ void InitGfxBuffers_EM(void); void InitGameEngine_EM(void); void GameActions_EM(byte *, boolean); +int correctLevelPosX_EM(int); +int correctLevelPosY_EM(int); + unsigned int InitEngineRandom_EM(int); void setLevelInfoToDefaults_EM(void); diff --git a/src/game_em/init.c b/src/game_em/init.c index d08d8db1..bd9cbc85 100644 --- a/src/game_em/init.c +++ b/src/game_em/init.c @@ -71,6 +71,20 @@ void play_sound(int x, int y, int sample) play_element_sound(x, y, sample, -1); } +int correctLevelPosX_EM(int lx) +{ + lx -= 1; + + return lx; +} + +int correctLevelPosY_EM(int ly) +{ + ly -= 1; + + return ly; +} + unsigned int InitEngineRandom_EM(int seed) { if (seed == NEW_RANDOMIZE) diff --git a/src/tools.c b/src/tools.c index 5513a17f..2bc7d4fe 100644 --- a/src/tools.c +++ b/src/tools.c @@ -193,20 +193,6 @@ static char *print_if_not_empty(int element) return s; } -int correctLevelPosX_EM(int lx) -{ - lx -= 1; - - return lx; -} - -int correctLevelPosY_EM(int ly) -{ - ly -= 1; - - return ly; -} - int getFieldbufferOffsetX_RND(int dir, int pos) { int full_lev_fieldx = lev_fieldx + (BorderElement != EL_EMPTY ? 2 : 0); diff --git a/src/tools.h b/src/tools.h index 937e27d3..ea8688db 100644 --- a/src/tools.h +++ b/src/tools.h @@ -69,9 +69,6 @@ int getFieldbufferOffsetX_RND(int, int); int getFieldbufferOffsetY_RND(int, int); -int correctLevelPosX_EM(int); -int correctLevelPosY_EM(int); - int getLevelFromScreenX(int); int getLevelFromScreenY(int); -- 2.34.1