From: Holger Schemel Date: Tue, 4 Feb 2020 23:04:14 +0000 (+0100) Subject: cleanup of EM engine initialization X-Git-Tag: 4.2.0.0~147 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=96c2871c2efdc7f3e6edf49841409eb8e38a78e1;p=rocksndiamonds.git cleanup of EM engine initialization --- diff --git a/src/game_em/export.h b/src/game_em/export.h index f6da8426..12838297 100644 --- a/src/game_em/export.h +++ b/src/game_em/export.h @@ -119,7 +119,4 @@ void SaveEngineSnapshotValues_EM(void); boolean checkIfAllPlayersFitToScreen(void); -void tab_generate(void); -void tab_generate_graphics_info_em(void); - #endif // EXPORT_H diff --git a/src/game_em/global.h b/src/game_em/global.h index 9789ffb7..70f240ec 100644 --- a/src/game_em/global.h +++ b/src/game_em/global.h @@ -7,11 +7,10 @@ extern int frame; /* all global function prototypes */ -int open_all(void); -void close_all(void); - void readjoy(byte, struct PLAYER *); +void tab_generate(void); + void game_initscreen(void); void game_init_random(void); void game_init_cave_buffers(void); diff --git a/src/game_em/init.c b/src/game_em/init.c index 8876c952..9549b836 100644 --- a/src/game_em/init.c +++ b/src/game_em/init.c @@ -5,19 +5,12 @@ #include "main_em.h" -#include - Bitmap *screenBitmap; struct GlobalInfo_EM global_em_info; struct GameInfo_EM game_em; -int open_all(void) -{ - return 0; -} - void InitGfxBuffers_EM(void) { ReCreateBitmap(&screenBitmap, MAX_BUF_XSIZE * TILEX, MAX_BUF_YSIZE * TILEY); @@ -30,11 +23,8 @@ void em_open_all(void) /* pre-calculate some data */ tab_generate(); - if (open_all() != 0) - Error(ERR_EXIT, "em_open_all(): open_all() failed"); - - /* after "open_all()", because we need the graphic bitmaps to be defined */ - tab_generate_graphics_info_em(); + /* initialize graphics */ + InitGraphicInfo_EM(); game_init_random(); game_init_cave_buffers(); diff --git a/src/game_em/tab_generate.c b/src/game_em/tab_generate.c index c75f44bb..f71aaffe 100644 --- a/src/game_em/tab_generate.c +++ b/src/game_em/tab_generate.c @@ -268,8 +268,3 @@ void tab_generate(void) create_tab(tile_android_move, tab_android_move); create_explode(); } - -void tab_generate_graphics_info_em(void) -{ - InitGraphicInfo_EM(); -}