From: Holger Schemel Date: Thu, 28 May 2020 15:24:11 +0000 (+0200) Subject: moved functions for correcting playfield buffer position to EM engine X-Git-Tag: 4.2.0.0~30 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=476df02707a263f71b8b91f7c6947e8033d20f5e;p=rocksndiamonds.git moved functions for correcting playfield buffer position to EM engine --- 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);