[Scummvm-git-logs] scummvm master -> b09d373f1a34f07a1afe0849ac7fa021dda393a6

dreammaster noreply at scummvm.org
Sun Apr 26 22:35:05 UTC 2026


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .

Summary:
949d01e0c2 MADS: PHANTOM: Remove animated interface/inventory gui options
b09d373f1a MADS: PHANTOM: Add init functions for globals for RTL, restart works


Commit: 949d01e0c2a04ebe7e87b40b5b900c6b4b2ec153
    https://github.com/scummvm/scummvm/commit/949d01e0c2a04ebe7e87b40b5b900c6b4b2ec153
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-04-27T08:34:48+10:00

Commit Message:
MADS: PHANTOM: Remove animated interface/inventory gui options

Changed paths:
    engines/mads/detection_tables.h


diff --git a/engines/mads/detection_tables.h b/engines/mads/detection_tables.h
index 8b42f54a399..b22744dd7c8 100644
--- a/engines/mads/detection_tables.h
+++ b/engines/mads/detection_tables.h
@@ -156,7 +156,7 @@ static const MADSGameDescription gameDescriptions[] = {
 			Common::EN_ANY,
 			Common::kPlatformDOS,
 			ADGF_UNSTABLE,
-			GUIO8(GUIO_NOMIDI, GUIO_NOSPEECH, GAMEOPTION_EASY_MOUSE, GAMEOPTION_ANIMATED_INVENTORY, GAMEOPTION_ANIMATED_INTERFACE, GAMEOPTION_NAUGHTY_MODE, GAMEOPTION_COPY_PROTECTION, GAMEOPTION_ORIGINAL_SAVELOAD)
+			GUIO4(GUIO_NOMIDI, GAMEOPTION_EASY_MOUSE, GAMEOPTION_COPY_PROTECTION, GAMEOPTION_ORIGINAL_SAVELOAD)
 		},
 		GType_Phantom,
 		0
@@ -171,7 +171,7 @@ static const MADSGameDescription gameDescriptions[] = {
 			Common::EN_ANY,
 			Common::kPlatformDOS,
 			ADGF_UNSTABLE | ADGF_CD,
-			GUIO7(GUIO_NOMIDI, GAMEOPTION_EASY_MOUSE, GAMEOPTION_ANIMATED_INVENTORY, GAMEOPTION_ANIMATED_INTERFACE, GAMEOPTION_NAUGHTY_MODE, GAMEOPTION_COPY_PROTECTION, GAMEOPTION_ORIGINAL_SAVELOAD)
+			GUIO4(GUIO_NOMIDI, GAMEOPTION_EASY_MOUSE, GAMEOPTION_COPY_PROTECTION, GAMEOPTION_ORIGINAL_SAVELOAD)
 		},
 		GType_Phantom,
 		0
@@ -186,7 +186,7 @@ static const MADSGameDescription gameDescriptions[] = {
 			Common::EN_ANY,
 			Common::kPlatformDOS,
 			ADGF_UNSTABLE | ADGF_DEMO,
-			GUIO8(GUIO_NOMIDI, GUIO_NOSPEECH, GAMEOPTION_EASY_MOUSE, GAMEOPTION_ANIMATED_INVENTORY, GAMEOPTION_ANIMATED_INTERFACE, GAMEOPTION_NAUGHTY_MODE, GAMEOPTION_COPY_PROTECTION, GAMEOPTION_ORIGINAL_SAVELOAD)
+			GUIO5(GUIO_NOMIDI, GAMEOPTION_EASY_MOUSE, GAMEOPTION_NAUGHTY_MODE, GAMEOPTION_COPY_PROTECTION, GAMEOPTION_ORIGINAL_SAVELOAD)
 		},
 		GType_Phantom,
 		0


Commit: b09d373f1a34f07a1afe0849ac7fa021dda393a6
    https://github.com/scummvm/scummvm/commit/b09d373f1a34f07a1afe0849ac7fa021dda393a6
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-04-27T08:34:49+10:00

Commit Message:
MADS: PHANTOM: Add init functions for globals for RTL, restart works

Changed paths:
    engines/mads/madsv2/core/anim.cpp
    engines/mads/madsv2/core/anim.h
    engines/mads/madsv2/core/attr.cpp
    engines/mads/madsv2/core/attr.h
    engines/mads/madsv2/core/camera.cpp
    engines/mads/madsv2/core/camera.h
    engines/mads/madsv2/core/conv.cpp
    engines/mads/madsv2/core/conv.h
    engines/mads/madsv2/core/cursor.cpp
    engines/mads/madsv2/core/cursor.h
    engines/mads/madsv2/core/cycle.cpp
    engines/mads/madsv2/core/cycle.h
    engines/mads/madsv2/core/dialog.cpp
    engines/mads/madsv2/core/dialog.h
    engines/mads/madsv2/core/font.cpp
    engines/mads/madsv2/core/font.h
    engines/mads/madsv2/core/game.cpp
    engines/mads/madsv2/core/game.h
    engines/mads/madsv2/core/global.cpp
    engines/mads/madsv2/core/global.h
    engines/mads/madsv2/core/hspot.cpp
    engines/mads/madsv2/core/hspot.h
    engines/mads/madsv2/core/inter.cpp
    engines/mads/madsv2/core/inter.h
    engines/mads/madsv2/core/kernel.cpp
    engines/mads/madsv2/core/kernel.h
    engines/mads/madsv2/core/keys.cpp
    engines/mads/madsv2/core/keys.h
    engines/mads/madsv2/core/matte.cpp
    engines/mads/madsv2/core/matte.h
    engines/mads/madsv2/core/object.cpp
    engines/mads/madsv2/core/object.h
    engines/mads/madsv2/core/pal.cpp
    engines/mads/madsv2/core/pal.h
    engines/mads/madsv2/core/quote.cpp
    engines/mads/madsv2/core/quote.h
    engines/mads/madsv2/core/rail.cpp
    engines/mads/madsv2/core/rail.h
    engines/mads/madsv2/core/room.cpp
    engines/mads/madsv2/core/room.h
    engines/mads/madsv2/core/speech.cpp
    engines/mads/madsv2/core/speech.h
    engines/mads/madsv2/core/sprite.cpp
    engines/mads/madsv2/core/sprite.h
    engines/mads/madsv2/core/timer.cpp
    engines/mads/madsv2/core/timer.h
    engines/mads/madsv2/core/vocab.cpp
    engines/mads/madsv2/core/vocab.h
    engines/mads/madsv2/engine.cpp


diff --git a/engines/mads/madsv2/core/anim.cpp b/engines/mads/madsv2/core/anim.cpp
index 81fb77d7c97..75fff4c3b5f 100644
--- a/engines/mads/madsv2/core/anim.cpp
+++ b/engines/mads/madsv2/core/anim.cpp
@@ -1,4 +1,4 @@
-/* ScummVM - Graphic Adventure Engine
+/* ScummVM - Graphic Adventure Engine
  *
  * ScummVM is the legal property of its developers, whose names
  * are too numerous to list here. Please refer to the COPYRIGHT
@@ -599,5 +599,10 @@ done:
 	return error_flag;
 }
 
+void init_anim() {
+	memset(&anim_shadow, 0, sizeof(ShadowList));
+	anim_error = 0;
+}
+
 } // namespace MADSV2
 } // namespace MADS
diff --git a/engines/mads/madsv2/core/anim.h b/engines/mads/madsv2/core/anim.h
index 1a1f51527ed..bb33f888059 100644
--- a/engines/mads/madsv2/core/anim.h
+++ b/engines/mads/madsv2/core/anim.h
@@ -1,4 +1,4 @@
-/* ScummVM - Graphic Adventure Engine
+/* ScummVM - Graphic Adventure Engine
  *
  * ScummVM is the legal property of its developers, whose names
  * are too numerous to list here. Please refer to the COPYRIGHT
@@ -458,6 +458,8 @@ int anim_get_header_info(char *file_name,
 
 int anim_himem_preload(char *name, int level);
 
+extern void init_anim();
+
 } // namespace MADSV2
 } // namespace MADS
 
diff --git a/engines/mads/madsv2/core/attr.cpp b/engines/mads/madsv2/core/attr.cpp
index a13e7af68c8..f76343e06f5 100644
--- a/engines/mads/madsv2/core/attr.cpp
+++ b/engines/mads/madsv2/core/attr.cpp
@@ -1,4 +1,4 @@
-/* ScummVM - Graphic Adventure Engine
+/* ScummVM - Graphic Adventure Engine
  *
  * ScummVM is the legal property of its developers, whose names
  * are too numerous to list here. Please refer to the COPYRIGHT
@@ -175,5 +175,9 @@ done:
 	return error_flag;
 }
 
+void init_attr() {
+	attr_load_error = 0;
+}
+
 } // namespace MADSV2
 } // namespace MADS
diff --git a/engines/mads/madsv2/core/attr.h b/engines/mads/madsv2/core/attr.h
index 4a5c306cfa5..56ea5c8f7dd 100644
--- a/engines/mads/madsv2/core/attr.h
+++ b/engines/mads/madsv2/core/attr.h
@@ -1,4 +1,4 @@
-/* ScummVM - Graphic Adventure Engine
+/* ScummVM - Graphic Adventure Engine
  *
  * ScummVM is the legal property of its developers, whose names
  * are too numerous to list here. Please refer to the COPYRIGHT
@@ -48,6 +48,8 @@ extern int attr_load(char *base_name, int item_type, int variant,
 
 extern int attr_load_error;
 
+extern void init_attr();
+
 } // namespace MADSV2
 } // namespace MADS
 
diff --git a/engines/mads/madsv2/core/camera.cpp b/engines/mads/madsv2/core/camera.cpp
index bb2482f8cdd..9415a5f3869 100644
--- a/engines/mads/madsv2/core/camera.cpp
+++ b/engines/mads/madsv2/core/camera.cpp
@@ -1,4 +1,4 @@
-/* ScummVM - Graphic Adventure Engine
+/* ScummVM - Graphic Adventure Engine
  *
  * ScummVM is the legal property of its developers, whose names
  * are too numerous to list here. Please refer to the COPYRIGHT
@@ -209,5 +209,12 @@ void camera_update() {
 	}
 }
 
+void init_camera() {
+	memset(&camera_x, 0, sizeof(Camera));
+	memset(&camera_y, 0, sizeof(Camera));
+	camera_old_x_target = 0;
+	camera_old_y_target = 0;
+}
+
 } // namespace MADSV2
 } // namespace MADS
diff --git a/engines/mads/madsv2/core/camera.h b/engines/mads/madsv2/core/camera.h
index 250ddd7352c..b46e9bb46af 100644
--- a/engines/mads/madsv2/core/camera.h
+++ b/engines/mads/madsv2/core/camera.h
@@ -1,4 +1,4 @@
-/* ScummVM - Graphic Adventure Engine
+/* ScummVM - Graphic Adventure Engine
  *
  * ScummVM is the legal property of its developers, whose names
  * are too numerous to list here. Please refer to the COPYRIGHT
@@ -69,6 +69,8 @@ extern void camera_jump_to(int x, int y);
 extern void camera_pan_to(Camera *camera, int target);
 extern void camera_update();
 
+extern void init_camera();
+
 } // namespace MADSV2
 } // namespace MADS
 
diff --git a/engines/mads/madsv2/core/conv.cpp b/engines/mads/madsv2/core/conv.cpp
index 303969565c1..2f2e42ca8dd 100644
--- a/engines/mads/madsv2/core/conv.cpp
+++ b/engines/mads/madsv2/core/conv.cpp
@@ -1,4 +1,4 @@
-/* ScummVM - Graphic Adventure Engine
+/* ScummVM - Graphic Adventure Engine
  *
  * ScummVM is the legal property of its developers, whose names
  * are too numerous to list here. Please refer to the COPYRIGHT
@@ -1749,5 +1749,25 @@ int conv_expand(Common::SeekableReadStream *handle) {
 	return 0;
 }
 
+void init_conv() {
+	conv_system_cleanup();
+	active_conv = NULL;
+	active_conv_data = NULL;
+	conv_imports = NULL;
+	conv_entry_flags = NULL;
+	conv_varsDataPtr = NULL;
+	conv_vars0ValPtr = NULL;
+	conv_restore_running = -1;
+	Common::fill((byte *)&conv_control, (byte *)&conv_control + sizeof(ConvControl), 0);
+	conv_control.running = -1;
+	memset(&conv_box, 0, sizeof(Box));
+	conv_my_next_start = NULL;
+	conv_error_code = 0;
+	conv_dlg_script_ptr = 0;
+	conv_dlg_script_end = 0;
+	Common::fill(conv, conv + CONV_MAX_DATA, (Conv *)nullptr);
+	Common::fill(conv_data, conv_data + CONV_MAX_DATA, (ConvData *)nullptr);
+}
+
 } // namespace MADSV2
 } // namespace MADS
diff --git a/engines/mads/madsv2/core/conv.h b/engines/mads/madsv2/core/conv.h
index 9e1554fd2ed..9d4c7c9d3c8 100644
--- a/engines/mads/madsv2/core/conv.h
+++ b/engines/mads/madsv2/core/conv.h
@@ -1,4 +1,4 @@
-/* ScummVM - Graphic Adventure Engine
+/* ScummVM - Graphic Adventure Engine
  *
  * ScummVM is the legal property of its developers, whose names
  * are too numerous to list here. Please refer to the COPYRIGHT
@@ -229,6 +229,8 @@ extern void conv_flush();
 extern int conv_append(Common::WriteStream *handle);
 extern int conv_expand(Common::SeekableReadStream *handle);
 
+extern void init_conv();
+
 } // namespace MADSV2
 } // namespace MADS
 
diff --git a/engines/mads/madsv2/core/cursor.cpp b/engines/mads/madsv2/core/cursor.cpp
index 5280a839e04..540da873791 100644
--- a/engines/mads/madsv2/core/cursor.cpp
+++ b/engines/mads/madsv2/core/cursor.cpp
@@ -1,4 +1,4 @@
-/* ScummVM - Graphic Adventure Engine
+/* ScummVM - Graphic Adventure Engine
  *
  * ScummVM is the legal property of its developers, whose names
  * are too numerous to list here. Please refer to the COPYRIGHT
@@ -57,5 +57,12 @@ void cursor_set_follow(int follow) {
 	cursor_follow = follow;
 }
 
+void init_cursor() {
+	cursor_mode = 0;
+	cursor_follow = false;
+	text_x = 0;
+	text_y = 0;
+}
+
 } // namespace MADSV2
 } // namespace MADS
diff --git a/engines/mads/madsv2/core/cursor.h b/engines/mads/madsv2/core/cursor.h
index 234f9c636ac..0c8df125f17 100644
--- a/engines/mads/madsv2/core/cursor.h
+++ b/engines/mads/madsv2/core/cursor.h
@@ -1,4 +1,4 @@
-/* ScummVM - Graphic Adventure Engine
+/* ScummVM - Graphic Adventure Engine
  *
  * ScummVM is the legal property of its developers, whose names
  * are too numerous to list here. Please refer to the COPYRIGHT
@@ -50,6 +50,8 @@ extern void cursor_set_mode(int my_type);
 extern void cursor_toggle_insert();
 extern void cursor_set_follow(int follow);
 
+extern void init_cursor();
+
 } // namespace MADSV2
 } // namespace MADS
 
diff --git a/engines/mads/madsv2/core/cycle.cpp b/engines/mads/madsv2/core/cycle.cpp
index c8c4b3fe651..014a490d2c3 100644
--- a/engines/mads/madsv2/core/cycle.cpp
+++ b/engines/mads/madsv2/core/cycle.cpp
@@ -1,4 +1,4 @@
-/* ScummVM - Graphic Adventure Engine
+/* ScummVM - Graphic Adventure Engine
  *
  * ScummVM is the legal property of its developers, whose names
  * are too numerous to list here. Please refer to the COPYRIGHT
@@ -125,5 +125,15 @@ void cycle_colors(void) {
 	cycling_delay = 0;
 }
 
+void init_cycle() {
+	memset(&cycling_palette, 0, sizeof(Palette));
+	memset(&cycle_list, 0, sizeof(CycleList));
+	cycling_active = false;
+	cycling_delay = 0;
+	cycling_threshold = 0;
+	total_cycle_colors = 0;
+	memset(cycle_timing, 0, sizeof(cycle_timing));
+}
+
 } // namespace MADSV2
 } // namespace MADS
diff --git a/engines/mads/madsv2/core/cycle.h b/engines/mads/madsv2/core/cycle.h
index 6335c5ea360..87cf96eaf77 100644
--- a/engines/mads/madsv2/core/cycle.h
+++ b/engines/mads/madsv2/core/cycle.h
@@ -1,4 +1,4 @@
-/* ScummVM - Graphic Adventure Engine
+/* ScummVM - Graphic Adventure Engine
  *
  * ScummVM is the legal property of its developers, whose names
  * are too numerous to list here. Please refer to the COPYRIGHT
@@ -40,6 +40,8 @@ extern long cycle_timing[COLOR_MAX_CYCLES];     /* Timing for each cycle  */
 void cycle_init(CycleListPtr new_cycle_list, int activate);
 void cycle_colors(void);
 
+extern void init_cycle();
+
 } // namespace MADSV2
 } // namespace MADS
 
diff --git a/engines/mads/madsv2/core/dialog.cpp b/engines/mads/madsv2/core/dialog.cpp
index 486cd1f758e..288fa14d1cc 100644
--- a/engines/mads/madsv2/core/dialog.cpp
+++ b/engines/mads/madsv2/core/dialog.cpp
@@ -1,4 +1,4 @@
-/* ScummVM - Graphic Adventure Engine
+/* ScummVM - Graphic Adventure Engine
  *
  * ScummVM is the legal property of its developers, whose names
  * are too numerous to list here. Please refer to the COPYRIGHT
@@ -3710,5 +3710,16 @@ void dialog_trap_critical() {
 void dialog_restore_critical(void) {
 }
 
+void init_dialog() {
+	dialog_error = 0;
+	dialog_quicksearch_flag = true;
+	dialog_wildcard_exits = false;
+	dialog_timeout = 0;
+	dialog_language = DIALOG_ENGLISH;
+	alert_normal_color = DD_DEFAULT_NORMAL_COLOR;
+	alert_select_color = DD_DEFAULT_SELECT_COLOR;
+	alert_hilite_color = DD_DEFAULT_HILITE_COLOR;
+}
+
 } // namespace MADSV2
 } // namespace MADS
diff --git a/engines/mads/madsv2/core/dialog.h b/engines/mads/madsv2/core/dialog.h
index cb3f3796397..4805b7fe91b 100644
--- a/engines/mads/madsv2/core/dialog.h
+++ b/engines/mads/madsv2/core/dialog.h
@@ -1,4 +1,4 @@
-/* ScummVM - Graphic Adventure Engine
+/* ScummVM - Graphic Adventure Engine
  *
  * ScummVM is the legal property of its developers, whose names
  * are too numerous to list here. Please refer to the COPYRIGHT
@@ -455,6 +455,8 @@ extern void dialog_restore_critical();
 
 extern void dialog_watch_point(const char *string, long x, long y);
 
+extern void init_dialog();
+
 } // namespace MADSV2
 } // namespace MADS
 
diff --git a/engines/mads/madsv2/core/font.cpp b/engines/mads/madsv2/core/font.cpp
index 3eed447ac54..925c4714c36 100644
--- a/engines/mads/madsv2/core/font.cpp
+++ b/engines/mads/madsv2/core/font.cpp
@@ -1,4 +1,4 @@
-/* ScummVM - Graphic Adventure Engine
+/* ScummVM - Graphic Adventure Engine
  *
  * ScummVM is the legal property of its developers, whose names
  * are too numerous to list here. Please refer to the COPYRIGHT
@@ -247,5 +247,13 @@ int font_string_width(FontPtr font, const char *out_string, int auto_spacing) {
 	return (width);
 }
 
+void init_font() {
+	font_inter = NULL;
+	font_main = NULL;
+	font_conv = NULL;
+	font_menu = NULL;
+	font_misc = NULL;
+}
+
 } // namespace MADSV2
 } // namespace MADS
diff --git a/engines/mads/madsv2/core/font.h b/engines/mads/madsv2/core/font.h
index 402ab9ce41b..3980c215ec7 100644
--- a/engines/mads/madsv2/core/font.h
+++ b/engines/mads/madsv2/core/font.h
@@ -1,4 +1,4 @@
-/* ScummVM - Graphic Adventure Engine
+/* ScummVM - Graphic Adventure Engine
  *
  * ScummVM is the legal property of its developers, whose names
  * are too numerous to list here. Please refer to the COPYRIGHT
@@ -57,6 +57,8 @@ extern int font_write(FontPtr font, Buffer *target, const char *out_string,
 extern void font_set_colors(int background, int high_intense, int med_intense, int low_intense);
 extern int font_string_width(FontPtr font, const char *out_string, int auto_spacing);
 
+extern void init_font();
+
 } // namespace MADSV2
 } // namespace MADS
 
diff --git a/engines/mads/madsv2/core/game.cpp b/engines/mads/madsv2/core/game.cpp
index c51a9a44f1f..2e4bba41517 100644
--- a/engines/mads/madsv2/core/game.cpp
+++ b/engines/mads/madsv2/core/game.cpp
@@ -1,4 +1,4 @@
-/* ScummVM - Graphic Adventure Engine
+/* ScummVM - Graphic Adventure Engine
  *
  * ScummVM is the legal property of its developers, whose names
  * are too numerous to list here. Please refer to the COPYRIGHT
@@ -3014,5 +3014,72 @@ int main_copy_verify() {
 	return g_engine->main_copy_verify();
 }
 
+void init_game() {
+	win_status = WIN_NOTHING;
+	game_restore_flag = false;
+	game_autosaved = false;
+	game_mouse_cursor_fix = false;
+	abort_value = 0;
+	abort_clock = 0;
+	memset(chain_line, 0, sizeof(chain_line));
+	chain_flag = false;
+	force_chain = false;
+	key_abort_level = 0;
+	report_version = false;
+	game_menu_routine = NULL;
+	game_menu_init = NULL;
+	game_menu_exit = NULL;
+	game_emergency_save = NULL;
+	debugger = false;
+	debugger_state = DEBUGGER_MAIN;
+	debugger_matte_before = false;
+	debugger_memory_skip = 0;
+	debugger_memory_all = false;
+	debugger_memory_keywait = false;
+	debugger_reset = NULL;
+	debugger_update = NULL;
+	memset(int_sprite, 0, sizeof(int_sprite));
+	selected_intro = false;
+	correction_clock = 0;
+	memset(save_game_key, 0, sizeof(save_game_key));
+	memset(restart_game_key, 0, sizeof(restart_game_key));
+	memset(save_game_buf, 0, sizeof(save_game_buf));
+	last_keypressed = -1;
+	section_preload_code_pointer = NULL;
+	section_init_code_pointer = NULL;
+	section_room_constructor = NULL;
+	section_daemon_code_pointer = NULL;
+	section_pre_parser_code_pointer = NULL;
+	section_parser_code_pointer = NULL;
+	section_error_code_pointer = NULL;
+	section_music_reset_pointer = NULL;
+	room_preload_code_pointer = NULL;
+	room_init_code_pointer = NULL;
+	room_daemon_code_pointer = NULL;
+	room_pre_parser_code_pointer = NULL;
+	room_parser_code_pointer = NULL;
+	room_error_code_pointer = NULL;
+	room_shutdown_code_pointer = NULL;
+	game_any_emergency = false;
+	game_keystroke = 0;
+	game_any_keystroke = 0;
+	lets_get_a_move_on_anim = true;
+	noise_clock = 0;
+	noise_timer = 0;
+	noise_length = -1;
+	move_your_butt_enabled = 1;
+	move_your_butt_clock = 0;
+	move_your_butt_timer = 0;
+	move_your_butt_anim_handle = -1;
+	move_your_butt_anim_frame = -1;
+	last_bird_sound = (byte)-1;
+	Common::strcpy_s(game_save_file, "SAVES.DIR");
+	game_save_directory = NULL;
+	game_preserve_handle = 0;
+	debugger_previous = DEBUGGER_NONE;
+	debugger_watch = 0;
+	memset(debugger_watch_index, 0, sizeof(debugger_watch_index));
+}
+
 } // namespace MADSV2
 } // namespace MADS
diff --git a/engines/mads/madsv2/core/game.h b/engines/mads/madsv2/core/game.h
index 3eb70f643e0..f630692f230 100644
--- a/engines/mads/madsv2/core/game.h
+++ b/engines/mads/madsv2/core/game.h
@@ -1,4 +1,4 @@
-/* ScummVM - Graphic Adventure Engine
+/* ScummVM - Graphic Adventure Engine
  *
  * ScummVM is the legal property of its developers, whose names
  * are too numerous to list here. Please refer to the COPYRIGHT
@@ -277,6 +277,8 @@ extern void flag_parse(const char **myscan);
 extern void show_logo();
 extern void show_version();
 
+extern void init_game();
+
 } // namespace MADSV2
 } // namespace MADS
 
diff --git a/engines/mads/madsv2/core/global.cpp b/engines/mads/madsv2/core/global.cpp
index 54d17ae20a6..4c4821d404c 100644
--- a/engines/mads/madsv2/core/global.cpp
+++ b/engines/mads/madsv2/core/global.cpp
@@ -1,4 +1,4 @@
-/* ScummVM - Graphic Adventure Engine
+/* ScummVM - Graphic Adventure Engine
  *
  * ScummVM is the legal property of its developers, whose names
  * are too numerous to list here. Please refer to the COPYRIGHT
@@ -76,5 +76,9 @@ void global_write_config_file() {
 	write_config_file();
 }
 
+void init_global() {
+	memset(global, 0, sizeof(global));
+}
+
 } // namespace MADSV2
 } // namespace MADS
diff --git a/engines/mads/madsv2/core/global.h b/engines/mads/madsv2/core/global.h
index cb436efa363..a0c54948282 100644
--- a/engines/mads/madsv2/core/global.h
+++ b/engines/mads/madsv2/core/global.h
@@ -1,4 +1,4 @@
-/* ScummVM - Graphic Adventure Engine
+/* ScummVM - Graphic Adventure Engine
  *
  * ScummVM is the legal property of its developers, whose names
  * are too numerous to list here. Please refer to the COPYRIGHT
@@ -122,6 +122,8 @@ void global_write_config_file(void);
 void global_load_config_parameters(void);
 void global_unload_config_parameters(void);
 
+extern void init_global();
+
 } // namespace MADSV2
 } // namespace MADS
 
diff --git a/engines/mads/madsv2/core/hspot.cpp b/engines/mads/madsv2/core/hspot.cpp
index 966661f4085..e7f7b103a3a 100644
--- a/engines/mads/madsv2/core/hspot.cpp
+++ b/engines/mads/madsv2/core/hspot.cpp
@@ -1,4 +1,4 @@
-/* ScummVM - Graphic Adventure Engine
+/* ScummVM - Graphic Adventure Engine
  *
  * ScummVM is the legal property of its developers, whose names
  * are too numerous to list here. Please refer to the COPYRIGHT
@@ -224,5 +224,13 @@ int hspot_which_reverse(int coord_x, int coord_y, int video_mode) {
 	return 0;
 }
 
+void init_hspot() {
+	memset(spot, 0, sizeof(spot));
+	numspots = 0;
+	memset(hs_stack, 0, sizeof(hs_stack));
+	hs_stack_pointer = 0;
+	memset(hotkeys, 0, sizeof(hotkeys));
+}
+
 } // namespace MADSV2
 } // namespace MADS
diff --git a/engines/mads/madsv2/core/hspot.h b/engines/mads/madsv2/core/hspot.h
index 86341d22016..0b4a5b64649 100644
--- a/engines/mads/madsv2/core/hspot.h
+++ b/engines/mads/madsv2/core/hspot.h
@@ -1,4 +1,4 @@
-/* ScummVM - Graphic Adventure Engine
+/* ScummVM - Graphic Adventure Engine
  *
  * ScummVM is the legal property of its developers, whose names
  * are too numerous to list here. Please refer to the COPYRIGHT
@@ -94,6 +94,8 @@ extern int hspot_which(int x, int y, int video_mode);
  */
 extern int hspot_which_reverse(int x, int y, int video_mode);
 
+extern void init_hspot();
+
 } // namespace MADSV2
 } // namespace MADS
 
diff --git a/engines/mads/madsv2/core/inter.cpp b/engines/mads/madsv2/core/inter.cpp
index 1f074b53120..4519b1484f4 100644
--- a/engines/mads/madsv2/core/inter.cpp
+++ b/engines/mads/madsv2/core/inter.cpp
@@ -1,4 +1,4 @@
-/* ScummVM - Graphic Adventure Engine
+/* ScummVM - Graphic Adventure Engine
  *
  * ScummVM is the legal property of its developers, whose names
  * are too numerous to list here. Please refer to the COPYRIGHT
@@ -2155,5 +2155,82 @@ done:
 	return error_flag;
 }
 
+void init_inter() {
+	stroke_type = STROKE_NONE;
+	inter_auxiliary_click = 0;
+	inter_anim = NULL;
+	inter_mouse_x = 0;
+	inter_mouse_y = 0;
+	inter_mouse_type = 0;
+	inter_object_sprite = 1;
+	inter_object_series = -1;
+	inter_spinning_objects = true;
+	inter_animation_running = true;
+	inter_objects_block = NULL;
+	inter_objects_block_size = 0;
+	inter_input_mode = INTER_BUILDING_SENTENCES;
+	memset(inter_dialog_strings, 0, sizeof(inter_dialog_strings));
+	memset(inter_dialog_results, 0, sizeof(inter_dialog_results));
+	memset(inven, 0, sizeof(inven));
+	inven_num_objects = 0;
+	right_command = 0;
+	left_command = -1;
+	left_inven = -1;
+	left_action = -1;
+	right_action = -1;
+	active_inven = -1;
+	first_inven = 0;
+	scroll_base_time = 0;
+	scroll_active = false;
+	scroll_quickly = false;
+	first_inven_changed = false;
+	picked_word = 0;
+	memset(inter_sentence, 0, sizeof(inter_sentence));
+	inter_sentence_handle = -1;
+	inter_sentence_changed = false;
+	inter_look_around = 0;
+	inter_command = 0;
+	inter_main_object = 0;
+	inter_second_object = 0;
+	inter_prep = 0;
+	inter_main_syntax = 0;
+	inter_second_syntax = 0;
+	inter_verb_type = 0;
+	inter_prep_type = 0;
+	inter_command_source = 0;
+	inter_main_object_source = 0;
+	inter_second_object_source = 0;
+	memset(inter_words, 0, sizeof(inter_words));
+	inter_point_established = 0;
+	inter_point_x = 0;
+	inter_point_y = 0;
+	inter_recent_command = 0;
+	inter_recent_command_source = 0;
+	inter_sentence_ready = false;
+	inter_awaiting = AWAITING_COMMAND;
+	inter_report_hotspots = false;
+	inter_force_rescan = false;
+	inter_base_hotspots = 0;
+	inter_no_segments_active = true;
+	inter_some_segments_active = false;
+	inter_spot_class = 0;
+	inter_spot_index = 0;
+	inter_spot_id = 0;
+	inter_base_time = 0;
+	end_of_selection = false;
+	memset(spot_base, 0, sizeof(spot_base));
+	scrollbar_active = 0;
+	scrollbar_elevator = 0;
+	scrollbar_old_active = -1;
+	scrollbar_old_elevator = -1;
+	scrollbar_stroke_type = 0;
+	scrollbar_quickly = false;
+	scrollbar_base_timing = 0;
+	inter_object_id = 0;
+	memset(inter_object_buf, 0, sizeof(inter_object_buf));
+	inter_object_routine = NULL;
+	paul_object_showing = -1;
+}
+
 } // namespace MADSV2
 } // namespace MADS
diff --git a/engines/mads/madsv2/core/inter.h b/engines/mads/madsv2/core/inter.h
index c268f79b118..28f26fc4d1b 100644
--- a/engines/mads/madsv2/core/inter.h
+++ b/engines/mads/madsv2/core/inter.h
@@ -1,4 +1,4 @@
-/* ScummVM - Graphic Adventure Engine
+/* ScummVM - Graphic Adventure Engine
  *
  * ScummVM is the legal property of its developers, whose names
  * are too numerous to list here. Please refer to the COPYRIGHT
@@ -334,6 +334,8 @@ extern int inter_add_dialog(char *string, int result);
 
 extern int inter_load_background(const char *name, Buffer *target);
 
+extern void init_inter();
+
 } // namespace MADSV2
 } // namespace MADS
 
diff --git a/engines/mads/madsv2/core/kernel.cpp b/engines/mads/madsv2/core/kernel.cpp
index 0d9a4b72095..7763969a624 100644
--- a/engines/mads/madsv2/core/kernel.cpp
+++ b/engines/mads/madsv2/core/kernel.cpp
@@ -1,4 +1,4 @@
-/* ScummVM - Graphic Adventure Engine
+/* ScummVM - Graphic Adventure Engine
  *
  * ScummVM is the legal property of its developers, whose names
  * are too numerous to list here. Please refer to the COPYRIGHT
@@ -2877,5 +2877,65 @@ done:
 	return error_flag;
 }
 
+void init_kernel() {
+	memset(room_state, 0, sizeof(room_state));
+	video_mode = 0;
+	room = NULL;
+	room_id = KERNEL_STARTING_GAME;
+	section_id = KERNEL_STARTING_GAME;
+	room_variant = 0;
+	new_room = 101;
+	new_section = 1;
+	previous_room = 0;
+	previous_section = 0;
+	kernel_initial_variant = 0;
+	room_spots = NULL;
+	room_num_spots = 0;
+	kernel_room_series_marker = 0;
+	kernel_room_bound_dif = 0;
+	kernel_room_scale_dif = 0;
+	kernel_allow_peel = false;
+	kernel_panning_speed = 0;
+	kernel_screen_fade = 0;
+	memset(kernel_anim, 0, sizeof(kernel_anim));
+	memset(&kernel_shadow_main, 0, sizeof(ShadowList));
+	memset(&kernel_shadow_inter, 0, sizeof(ShadowList));
+	kernel_shadow_inter.num_shadow_colors = 1;
+	kernel_shadow_inter.shadow_color[0] = 15;
+	kernel_ok_to_fail_load = false;
+	kernel_mode = KERNEL_GAME_LOAD;
+	memset(kernel_cheating_password, 0, sizeof(kernel_cheating_password));
+	kernel_cheating_allowed = 0;
+	kernel_cheating_forbidden = 0;
+	memset(kernel_dynamic_hot, 0, sizeof(kernel_dynamic_hot));
+	kernel_num_dynamic = 0;
+	kernel_dynamic_changed = 0;
+	cursor = NULL;
+	cursor_id = 1;
+	cursor_last = -1;
+	memset(&kernel, 0, sizeof(Kernel));
+	memset(&game, 0, sizeof(KernelGame));
+	memset(sequence_list, 0, sizeof(sequence_list));
+	stop_speech_on_run_anim = true;
+	memset(kernel_message, 0, sizeof(kernel_message));
+	kernel_message_font = NULL;
+	kernel_message_spacing = 0;
+	kernel_sound_handle = 0;
+	memset(random_message_handle, 0, sizeof(random_message_handle));
+	memset(random_message_quote, 0, sizeof(random_message_quote));
+	random_max_messages = 1;
+	memset(random_quote_list, 0, sizeof(random_quote_list));
+	random_quote_list_size = 0;
+	random_min_x = 0;
+	random_max_x = video_x;
+	random_min_y = 0;
+	random_max_y = display_y;
+	random_spacing = 0;
+	random_teletype_rate = 0;
+	random_message_color = 0;
+	random_message_duration = 0;
+	memset(kernel_interface_loaded, 0, sizeof(kernel_interface_loaded));
+}
+
 } // namespace MADSV2
 } // namespace MADS
diff --git a/engines/mads/madsv2/core/kernel.h b/engines/mads/madsv2/core/kernel.h
index 8362eeafb2f..e2112425303 100644
--- a/engines/mads/madsv2/core/kernel.h
+++ b/engines/mads/madsv2/core/kernel.h
@@ -1,4 +1,4 @@
-/* ScummVM - Graphic Adventure Engine
+/* ScummVM - Graphic Adventure Engine
  *
  * ScummVM is the legal property of its developers, whose names
  * are too numerous to list here. Please refer to the COPYRIGHT
@@ -623,6 +623,8 @@ extern void kernel_room_scale(int front_y, int front_scale, int back_y, int back
 extern void kernel_background_shutdown();
 extern int kernel_background_startup(int new_room, int initial_variant);
 
+extern void init_kernel();
+
 } // namespace MADSV2
 } // namespace MADS
 
diff --git a/engines/mads/madsv2/core/keys.cpp b/engines/mads/madsv2/core/keys.cpp
index 88870e0c9d0..36d7101652e 100644
--- a/engines/mads/madsv2/core/keys.cpp
+++ b/engines/mads/madsv2/core/keys.cpp
@@ -1,4 +1,4 @@
-/* ScummVM - Graphic Adventure Engine
+/* ScummVM - Graphic Adventure Engine
  *
  * ScummVM is the legal property of its developers, whose names
  * are too numerous to list here. Please refer to the COPYRIGHT
@@ -149,5 +149,9 @@ int keys_fix_alt(int target) {
 	}
 }
 
+void init_keys() {
+	keys_special_button = 0;
+}
+
 } // namespace MADSV2
 } // namespace MADS
diff --git a/engines/mads/madsv2/core/keys.h b/engines/mads/madsv2/core/keys.h
index f50a0bd50f8..06a21b4775b 100644
--- a/engines/mads/madsv2/core/keys.h
+++ b/engines/mads/madsv2/core/keys.h
@@ -1,4 +1,4 @@
-/* ScummVM - Graphic Adventure Engine
+/* ScummVM - Graphic Adventure Engine
  *
  * ScummVM is the legal property of its developers, whose names
  * are too numerous to list here. Please refer to the COPYRIGHT
@@ -271,6 +271,8 @@ extern int keys_check_install();
 extern void keys_enable();
 extern void keys_disable();
 
+extern void init_keys();
+
 } // namespace MADSV2
 } // namespace MADS
 
diff --git a/engines/mads/madsv2/core/matte.cpp b/engines/mads/madsv2/core/matte.cpp
index d178ffe3d3f..185e6c1b2fd 100644
--- a/engines/mads/madsv2/core/matte.cpp
+++ b/engines/mads/madsv2/core/matte.cpp
@@ -1,4 +1,4 @@
-/* ScummVM - Graphic Adventure Engine
+/* ScummVM - Graphic Adventure Engine
  *
  * ScummVM is the legal property of its developers, whose names
  * are too numerous to list here. Please refer to the COPYRIGHT
@@ -1330,5 +1330,34 @@ void matte_inter_frame(int update_live, int clear_chaff) {
 	image_inter_marker = new_marker;
 }
 
+void init_matte() {
+	memset(series_list, 0, sizeof(series_list));
+	memset(series_name, 0, sizeof(series_name));
+	memset(series_user, 0, sizeof(series_user));
+	memset(image_list, 0, sizeof(image_list));
+	memset(matte_list, 0, sizeof(matte_list));
+	memset(depth_list_id, 0, sizeof(depth_list_id));
+	memset(depth_list, 0, sizeof(depth_list));
+	memset(message_list, 0, sizeof(message_list));
+	series_list_marker = 0;
+	picture_view_x = 0;
+	picture_view_y = 0;
+	viewing_at_x = 0;
+	viewing_at_y = 0;
+	matte_disable_screen_update = false;
+	attr_packed = false;
+	image_marker = 0;
+	matte_guard_depth_0 = false;
+	work_screen_ems_handle = -1;
+	memset(&picture_map, 0, sizeof(TileMapHeader));
+	memset(&depth_map, 0, sizeof(TileMapHeader));
+	memset(&picture_resource, 0, sizeof(TileResource));
+	memset(&depth_resource, 0, sizeof(TileResource));
+	memset(image_inter_list, 0, sizeof(image_inter_list));
+	memset(matte_inter_list, 0, sizeof(matte_inter_list));
+	inter_viewing_at_y = 0;
+	image_inter_marker = 0;
+}
+
 } // namespace MADSV2
 } // namespace MADS
diff --git a/engines/mads/madsv2/core/matte.h b/engines/mads/madsv2/core/matte.h
index 48e3d0cf922..6480e28ad78 100644
--- a/engines/mads/madsv2/core/matte.h
+++ b/engines/mads/madsv2/core/matte.h
@@ -1,4 +1,4 @@
-/* ScummVM - Graphic Adventure Engine
+/* ScummVM - Graphic Adventure Engine
  *
  * ScummVM is the legal property of its developers, whose names
  * are too numerous to list here. Please refer to the COPYRIGHT
@@ -151,6 +151,8 @@ void matte_inter_frame(int update_live, int clear_chaff);
 int  matte_allocate_inter_image(void);
 void matte_refresh_inter(void);
 
+extern void init_matte();
+
 } // namespace MADSV2
 } // namespace MADS
 
diff --git a/engines/mads/madsv2/core/object.cpp b/engines/mads/madsv2/core/object.cpp
index 592a8e97d21..6f1cd0d26e3 100644
--- a/engines/mads/madsv2/core/object.cpp
+++ b/engines/mads/madsv2/core/object.cpp
@@ -1,4 +1,4 @@
-/* ScummVM - Graphic Adventure Engine
+/* ScummVM - Graphic Adventure Engine
  *
  * ScummVM is the legal property of its developers, whose names
  * are too numerous to list here. Please refer to the COPYRIGHT
@@ -452,5 +452,11 @@ int object_examine(int number, long message, int speech) {
 	return (restored_screen);
 }
 
+void init_object() {
+	object = NULL;
+	num_objects = 0;
+	object_ems_handle = BUFFER_PRESERVE;
+}
+
 } // namespace MADSV2
 } // namespace MADS
diff --git a/engines/mads/madsv2/core/object.h b/engines/mads/madsv2/core/object.h
index db5f77c6661..c935885cea5 100644
--- a/engines/mads/madsv2/core/object.h
+++ b/engines/mads/madsv2/core/object.h
@@ -1,4 +1,4 @@
-/* ScummVM - Graphic Adventure Engine
+/* ScummVM - Graphic Adventure Engine
  *
  * ScummVM is the legal property of its developers, whose names
  * are too numerous to list here. Please refer to the COPYRIGHT
@@ -116,6 +116,8 @@ extern void object_set_quality(int object_id, int quality_id, long quality_value
  */
 extern int object_examine(int number, long message, int speech);
 
+extern void init_object();
+
 } // namespace MADSV2
 } // namespace MADS
 
diff --git a/engines/mads/madsv2/core/pal.cpp b/engines/mads/madsv2/core/pal.cpp
index f3690c5af63..15122785e83 100644
--- a/engines/mads/madsv2/core/pal.cpp
+++ b/engines/mads/madsv2/core/pal.cpp
@@ -1,4 +1,4 @@
-/* ScummVM - Graphic Adventure Engine
+/* ScummVM - Graphic Adventure Engine
  *
  * ScummVM is the legal property of its developers, whose names
  * are too numerous to list here. Please refer to the COPYRIGHT
@@ -674,5 +674,21 @@ void pal_change_color(int color, int r, int g, int b) {
 	mcga_setpal_range((Palette *)master_palette, color, 1);
 }
 
+void init_pal() {
+	memset(&master_palette, 0, sizeof(Palette));
+	master_shadow = NULL;
+	memset(color_status, 0, sizeof(color_status));
+	memset(flag_used, 0, sizeof(flag_used));
+	palette_locked = false;
+	palette_ever_initialized = false;
+	palette_reserved_bottom = 0;
+	palette_reserved_top = 0;
+	palette_low_search_limit = 0;
+	palette_high_search_limit = 0;
+	pal_manager_update = NULL;
+	pal_manager_active = false;
+	pal_manager_colors = 0;
+}
+
 } // namespace MADSV2
 } // namespace MADS
diff --git a/engines/mads/madsv2/core/pal.h b/engines/mads/madsv2/core/pal.h
index 3d020579d84..dfe8eacb66c 100644
--- a/engines/mads/madsv2/core/pal.h
+++ b/engines/mads/madsv2/core/pal.h
@@ -1,4 +1,4 @@
-/* ScummVM - Graphic Adventure Engine
+/* ScummVM - Graphic Adventure Engine
  *
  * ScummVM is the legal property of its developers, whose names
  * are too numerous to list here. Please refer to the COPYRIGHT
@@ -164,6 +164,8 @@ extern int pal_get_color(RGBcolor color, int color_handle,
 	int override_reserved, int *color_number);
 extern void pal_change_color(int color, int r, int g, int b);
 
+extern void init_pal();
+
 } // namespace MADSV2
 } // namespace MADS
 
diff --git a/engines/mads/madsv2/core/quote.cpp b/engines/mads/madsv2/core/quote.cpp
index fc6ccb7ff78..a693f85274c 100644
--- a/engines/mads/madsv2/core/quote.cpp
+++ b/engines/mads/madsv2/core/quote.cpp
@@ -1,4 +1,4 @@
-/* ScummVM - Graphic Adventure Engine
+/* ScummVM - Graphic Adventure Engine
  *
  * ScummVM is the legal property of its developers, whose names
  * are too numerous to list here. Please refer to the COPYRIGHT
@@ -167,5 +167,9 @@ void quote_split_string(const char *source, char *target1, char *target2) {
 	} while (*(mark++));
 }
 
+void init_quote() {
+	quote_emergency = false;
+}
+
 } // namespace MADSV2
 } // namespace MADS
diff --git a/engines/mads/madsv2/core/quote.h b/engines/mads/madsv2/core/quote.h
index 7bfdabcd048..ea371e8b0c3 100644
--- a/engines/mads/madsv2/core/quote.h
+++ b/engines/mads/madsv2/core/quote.h
@@ -1,4 +1,4 @@
-/* ScummVM - Graphic Adventure Engine
+/* ScummVM - Graphic Adventure Engine
  *
  * ScummVM is the legal property of its developers, whose names
  * are too numerous to list here. Please refer to the COPYRIGHT
@@ -35,6 +35,8 @@ char *quote_load(int quote_id, ...);
 char *quote_string(char *quote_list, int quote_id);
 void quote_split_string(const char *source, char *target1, char *target2);
 
+extern void init_quote();
+
 } // namespace MADSV2
 } // namespace MADS
 
diff --git a/engines/mads/madsv2/core/rail.cpp b/engines/mads/madsv2/core/rail.cpp
index 0f5b840909b..b6a3fab8f45 100644
--- a/engines/mads/madsv2/core/rail.cpp
+++ b/engines/mads/madsv2/core/rail.cpp
@@ -1,4 +1,4 @@
-/* ScummVM - Graphic Adventure Engine
+/* ScummVM - Graphic Adventure Engine
  *
  * ScummVM is the legal property of its developers, whose names
  * are too numerous to list here. Please refer to the COPYRIGHT
@@ -250,5 +250,16 @@ void rail_check_path(int allow_one_illegal) {
 	recursive_check_path(start_node, 0, allow_mode, 0);
 }
 
+void init_rail() {
+	rail_solution_stack_pointer = 0;
+	rail_solution_stack_weight = 0;
+	memset(rail_visited, 0, sizeof(rail_visited));
+	memset(rail_working_stack, 0, sizeof(rail_working_stack));
+	memset(rail_solution_stack, 0, sizeof(rail_solution_stack));
+	rail_num_nodes = 0;
+	rail_base = NULL;
+	memset(rail_active, 0, sizeof(rail_active));
+}
+
 } // namespace MADSV2
 } // namespace MADS
diff --git a/engines/mads/madsv2/core/rail.h b/engines/mads/madsv2/core/rail.h
index da00857e492..cdbfec0c054 100644
--- a/engines/mads/madsv2/core/rail.h
+++ b/engines/mads/madsv2/core/rail.h
@@ -1,4 +1,4 @@
-/* ScummVM - Graphic Adventure Engine
+/* ScummVM - Graphic Adventure Engine
  *
  * ScummVM is the legal property of its developers, whose names
  * are too numerous to list here. Please refer to the COPYRIGHT
@@ -62,5 +62,7 @@ extern void rail_disconnect_node(int id);
  */
 extern void rail_check_path(int allow_one_illegal);
 
+extern void init_rail();
+
 } // namespace MADSV2
 } // namespace MADS
diff --git a/engines/mads/madsv2/core/room.cpp b/engines/mads/madsv2/core/room.cpp
index 4994f72fd97..18e0e28f697 100644
--- a/engines/mads/madsv2/core/room.cpp
+++ b/engines/mads/madsv2/core/room.cpp
@@ -1,4 +1,4 @@
-/* ScummVM - Graphic Adventure Engine
+/* ScummVM - Graphic Adventure Engine
  *
  * ScummVM is the legal property of its developers, whose names
  * are too numerous to list here. Please refer to the COPYRIGHT
@@ -711,5 +711,14 @@ done:
 	return error_flag;
 }
 
+void init_room() {
+	memset(&roomdef, 0, sizeof(RoomDef));
+	room_load_error = 0;
+	room_loaded_depth = false;
+	room_loaded_walk = false;
+	room_loaded_special = false;
+	memset(&roompict, 0, sizeof(RoomPict));
+}
+
 } // namespace MADSV2
 } // namespace MADS
diff --git a/engines/mads/madsv2/core/room.h b/engines/mads/madsv2/core/room.h
index 31b67a8e558..0dd9c757224 100644
--- a/engines/mads/madsv2/core/room.h
+++ b/engines/mads/madsv2/core/room.h
@@ -1,4 +1,4 @@
-/* ScummVM - Graphic Adventure Engine
+/* ScummVM - Graphic Adventure Engine
  *
  * ScummVM is the legal property of its developers, whose names
  * are too numerous to list here. Please refer to the COPYRIGHT
@@ -279,6 +279,8 @@ extern int room_picture_load(int room_id, Buffer *picture, int load_flags);
 extern void room_resolve_base(char *base, char *file, int id, const char *base_path);
 extern int room_invert(void);
 
+extern void init_room();
+
 } // namespace MADSV2
 } // namespace MADS
 
diff --git a/engines/mads/madsv2/core/speech.cpp b/engines/mads/madsv2/core/speech.cpp
index fb9296e942c..216c5bd83f5 100644
--- a/engines/mads/madsv2/core/speech.cpp
+++ b/engines/mads/madsv2/core/speech.cpp
@@ -1,4 +1,4 @@
-/* ScummVM - Graphic Adventure Engine
+/* ScummVM - Graphic Adventure Engine
  *
  * ScummVM is the legal property of its developers, whose names
  * are too numerous to list here. Please refer to the COPYRIGHT
@@ -178,5 +178,13 @@ void global_speech_go(int id) {
 	}
 }
 
+void init_speech() {
+	speech_system_active = false;
+	speech_on = false;
+	Common::strlcpy(global_speech_resource, "*PHAN009.DSR", sizeof(global_speech_resource));
+	global_speech_ready = -1;
+	speech_stream = nullptr;
+}
+
 } // namespace MADSV2
 } // namespace MADS
diff --git a/engines/mads/madsv2/core/speech.h b/engines/mads/madsv2/core/speech.h
index 4767081080e..87826d8f5a7 100644
--- a/engines/mads/madsv2/core/speech.h
+++ b/engines/mads/madsv2/core/speech.h
@@ -1,4 +1,4 @@
-/* ScummVM - Graphic Adventure Engine
+/* ScummVM - Graphic Adventure Engine
  *
  * ScummVM is the legal property of its developers, whose names
  * are too numerous to list here. Please refer to the COPYRIGHT
@@ -44,6 +44,8 @@ extern void global_speech_load(int id);
 extern void global_speech_go(int id);
 extern void global_speech(int id);
 
+extern void init_speech();
+
 } // namespace MADSV2
 } // namespace MADS
 
diff --git a/engines/mads/madsv2/core/sprite.cpp b/engines/mads/madsv2/core/sprite.cpp
index ea5fd004ae3..89857a23fae 100644
--- a/engines/mads/madsv2/core/sprite.cpp
+++ b/engines/mads/madsv2/core/sprite.cpp
@@ -1,4 +1,4 @@
-/* ScummVM - Graphic Adventure Engine
+/* ScummVM - Graphic Adventure Engine
  *
  * ScummVM is the legal property of its developers, whose names
  * are too numerous to list here. Please refer to the COPYRIGHT
@@ -1202,5 +1202,12 @@ done:
 	;
 }
 
+void init_sprite() {
+	sprite_error = 0;
+	sprite_force_memory = NULL;
+	sprite_force_size = 0;
+	kidney = false;
+}
+
 } // namespace MADSV2
 } // namespace MADS
diff --git a/engines/mads/madsv2/core/sprite.h b/engines/mads/madsv2/core/sprite.h
index 00c90363dcf..6a7c3859a7d 100644
--- a/engines/mads/madsv2/core/sprite.h
+++ b/engines/mads/madsv2/core/sprite.h
@@ -1,4 +1,4 @@
-/* ScummVM - Graphic Adventure Engine
+/* ScummVM - Graphic Adventure Engine
  *
  * ScummVM is the legal property of its developers, whose names
  * are too numerous to list here. Please refer to the COPYRIGHT
@@ -388,6 +388,8 @@ void dont_frag_the_palette();
 void go_ahead_and_frag_the_palette();
 void sprite_free(SeriesPtr *series, int free_memory);
 
+extern void init_sprite();
+
 } // namespace MADSV2
 } // namespace MADS
 
diff --git a/engines/mads/madsv2/core/timer.cpp b/engines/mads/madsv2/core/timer.cpp
index a2cf90fa967..84d12cd355f 100644
--- a/engines/mads/madsv2/core/timer.cpp
+++ b/engines/mads/madsv2/core/timer.cpp
@@ -1,4 +1,4 @@
-/* ScummVM - Graphic Adventure Engine
+/* ScummVM - Graphic Adventure Engine
  *
  * ScummVM is the legal property of its developers, whose names
  * are too numerous to list here. Please refer to the COPYRIGHT
@@ -97,5 +97,18 @@ byte *timer_get_interrupt_stack() {
 	return _interrupt_stack;
 }
 
+void init_timer() {
+	_timer_clock = 0;
+	timer_service_active = false;
+	timer_sound_on = 0;
+	timer_noise_on = 0;
+	timer_copy_protect_in = 0;
+	timer_copy_protect_out = 0;
+	timer_low_priority = 0;
+	timer_low_semaphore = 0;
+	timer_low_stacking = 0;
+	timer_low_deferred = 0;
+}
+
 } // namespace MADSV2
 } // namespace MADS
diff --git a/engines/mads/madsv2/core/timer.h b/engines/mads/madsv2/core/timer.h
index 0c952a3a678..c87b0c5231b 100644
--- a/engines/mads/madsv2/core/timer.h
+++ b/engines/mads/madsv2/core/timer.h
@@ -1,4 +1,4 @@
-/* ScummVM - Graphic Adventure Engine
+/* ScummVM - Graphic Adventure Engine
  *
  * ScummVM is the legal property of its developers, whose names
  * are too numerous to list here. Please refer to the COPYRIGHT
@@ -85,6 +85,8 @@ byte *timer_get_interrupt_stack();
 int timer_set_copy_protect(int protect);
 int timer_get_copy_protect();
 
+extern void init_timer();
+
 } // namespace MADSV2
 } // namespace MADS
 
diff --git a/engines/mads/madsv2/core/vocab.cpp b/engines/mads/madsv2/core/vocab.cpp
index 69666afc1d9..39847b10aef 100644
--- a/engines/mads/madsv2/core/vocab.cpp
+++ b/engines/mads/madsv2/core/vocab.cpp
@@ -1,4 +1,4 @@
-/* ScummVM - Graphic Adventure Engine
+/* ScummVM - Graphic Adventure Engine
  *
  * ScummVM is the legal property of its developers, whose names
  * are too numerous to list here. Please refer to the COPYRIGHT
@@ -667,5 +667,15 @@ char *vocab_string(int vocab_id) {
 	return p;  // got_it
 }
 
+void init_vocab() {
+	vocab = NULL;
+	vocab_words = 0;
+	vocab_allocation = 0;
+	vocab_first_soft = 0;
+	vocab_longest = 0;
+	vocab_text = NULL;
+	vocab_size = 0;
+}
+
 } // namespace MADSV2
 } // namespace MADS
diff --git a/engines/mads/madsv2/core/vocab.h b/engines/mads/madsv2/core/vocab.h
index d14d79aee13..432668f9d02 100644
--- a/engines/mads/madsv2/core/vocab.h
+++ b/engines/mads/madsv2/core/vocab.h
@@ -1,4 +1,4 @@
-/* ScummVM - Graphic Adventure Engine
+/* ScummVM - Graphic Adventure Engine
  *
  * ScummVM is the legal property of its developers, whose names
  * are too numerous to list here. Please refer to the COPYRIGHT
@@ -92,6 +92,8 @@ extern int vocab_make_active(int id);
 extern int vocab_load_active(void);
 extern char *vocab_string(int vocab_id);
 
+extern void init_vocab();
+
 } // namespace MADSV2
 } // namespace MADS
 
diff --git a/engines/mads/madsv2/engine.cpp b/engines/mads/madsv2/engine.cpp
index fe044deff62..0f85f0cd9d8 100644
--- a/engines/mads/madsv2/engine.cpp
+++ b/engines/mads/madsv2/engine.cpp
@@ -24,17 +24,33 @@
 #include "engines/util.h"
 #include "mads/mads.h"
 #include "mads/madsv2/engine.h"
+#include "mads/madsv2/core/anim.h"
+#include "mads/madsv2/core/attr.h"
 #include "mads/madsv2/core/camera.h"
 #include "mads/madsv2/core/config.h"
 #include "mads/madsv2/core/conv.h"
+#include "mads/madsv2/core/cursor.h"
+#include "mads/madsv2/core/cycle.h"
+#include "mads/madsv2/core/dialog.h"
+#include "mads/madsv2/core/font.h"
 #include "mads/madsv2/core/game.h"
+#include "mads/madsv2/core/global.h"
+#include "mads/madsv2/core/hspot.h"
 #include "mads/madsv2/core/inter.h"
 #include "mads/madsv2/core/kernel.h"
+#include "mads/madsv2/core/keys.h"
 #include "mads/madsv2/core/matte.h"
 #include "mads/madsv2/core/object.h"
+#include "mads/madsv2/core/pal.h"
 #include "mads/madsv2/core/player.h"
 #include "mads/madsv2/core/popup.h"
+#include "mads/madsv2/core/quote.h"
+#include "mads/madsv2/core/rail.h"
+#include "mads/madsv2/core/room.h"
+#include "mads/madsv2/core/speech.h"
+#include "mads/madsv2/core/sprite.h"
 #include "mads/madsv2/core/timer.h"
+#include "mads/madsv2/core/vocab.h"
 #include "mads/madsv2/phantom/main.h"
 #include "mads/core/sound.h"
 
@@ -70,8 +86,32 @@ MADSV2Engine::~MADSV2Engine() {
 }
 
 void MADSV2Engine::initGlobals() {
+	init_anim();
+	init_attr();
+	init_camera();
+	init_conv();
+	init_cursor();
+	init_cycle();
+	init_dialog();
+	init_font();
+	init_game();
+	init_global();
+	init_hspot();
+	init_inter();
+	init_kernel();
+	init_keys();
+	init_matte();
+	init_object();
+	init_pal();
 	init_player();
 	init_popup();
+	init_quote();
+	init_rail();
+	init_room();
+	init_speech();
+	init_sprite();
+	init_timer();
+	init_vocab();
 }
 
 void MADSV2Engine::readConfigFile() {




More information about the Scummvm-git-logs mailing list