cleanup of EM engine initialization
authorHolger Schemel <info@artsoft.org>
Tue, 4 Feb 2020 23:04:14 +0000 (00:04 +0100)
committerHolger Schemel <info@artsoft.org>
Tue, 19 May 2020 16:12:59 +0000 (18:12 +0200)
src/game_em/export.h
src/game_em/global.h
src/game_em/init.c
src/game_em/tab_generate.c

index f6da842620210872f6e12a58cf68124d66565a11..1283829754c77f85527423c44595da22ba9bce5e 100644 (file)
@@ -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
index 9789ffb738f57854fa61b0baa6ba3aafda09860a..70f240ecbcf17c16eeb71bbffee9886c4a3f2fea 100644 (file)
@@ -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);
index 8876c9527ee758993e0fc1ba70cb881769547cc7..9549b836d48f8c62d1d06afd3cb61f3030115ab8 100644 (file)
@@ -5,19 +5,12 @@
 
 #include "main_em.h"
 
-#include <signal.h>
-
 
 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();
index c75f44bbaf97aee531cbf8b64fe19ef4cfd2aa53..f71aaffe213a1f8b7a2b3573af1ca79fc288cb23 100644 (file)
@@ -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();
-}