From dd04ac635e8722c7f5de3b34fec011925b33808f Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Wed, 29 Jan 2020 22:34:11 +0100 Subject: [PATCH] split function --- src/game_em/global.h | 3 ++- src/game_em/init.c | 3 ++- src/game_em/input.c | 9 ++++++--- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/game_em/global.h b/src/game_em/global.h index 3040e315..9789ffb7 100644 --- a/src/game_em/global.h +++ b/src/game_em/global.h @@ -13,7 +13,8 @@ void close_all(void); void readjoy(byte, struct PLAYER *); void game_initscreen(void); -void game_init_vars(void); +void game_init_random(void); +void game_init_cave_buffers(void); void play_sound(int, int, int); void play_element_sound(int, int, int, int); diff --git a/src/game_em/init.c b/src/game_em/init.c index 9937110a..29d18fd2 100644 --- a/src/game_em/init.c +++ b/src/game_em/init.c @@ -46,7 +46,8 @@ void em_open_all(void) /* after "open_all()", because we need the graphic bitmaps to be defined */ tab_generate_graphics_info_em(); - game_init_vars(); + game_init_random(); + game_init_cave_buffers(); } void em_close_all(void) diff --git a/src/game_em/input.c b/src/game_em/input.c index 70106b1d..1df150a8 100644 --- a/src/game_em/input.c +++ b/src/game_em/input.c @@ -16,11 +16,14 @@ extern int screen_y; struct EngineSnapshotInfo_EM engine_snapshot_em; -void game_init_vars(void) +void game_init_random(void) { - int x, y; - RandomEM = 1684108901; +} + +void game_init_cave_buffers(void) +{ + int x, y; for (y = 0; y < CAVE_BUFFER_HEIGHT; y++) for (x = 0; x < CAVE_BUFFER_WIDTH; x++) -- 2.34.1