[Scummvm-git-logs] scummvm master -> 815ab673b680449b31c2049891deb9423fb0acb7
dreammaster
noreply at scummvm.org
Fri Jun 26 20:43:41 UTC 2026
This automated email contains information about 5 new commits which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
fdfb47356d MADS: FOREST: Fix crash opening backpack
2676b1e7d6 MADS: FOREST: Implement clear_selected_item
8c9f48730b MADS: FOREST: Setting multiple inter flags to be proper bool types
ef2c749710 MADS: FOREST: Fixes, clarification, cleanup of opening/closing backpack/journal
815ab673b6 MADS: FOREST: Fix crash exiting journal
Commit: fdfb47356d916c7e0d4a812dd1c0a1d35ddc6785
https://github.com/scummvm/scummvm/commit/fdfb47356d916c7e0d4a812dd1c0a1d35ddc6785
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-06-27T06:43:30+10:00
Commit Message:
MADS: FOREST: Fix crash opening backpack
Changed paths:
engines/mads/madsv2/forest/extra.cpp
diff --git a/engines/mads/madsv2/forest/extra.cpp b/engines/mads/madsv2/forest/extra.cpp
index 2ef89880ac5..5aadd55a679 100644
--- a/engines/mads/madsv2/forest/extra.cpp
+++ b/engines/mads/madsv2/forest/extra.cpp
@@ -74,6 +74,17 @@ void stamp_sprite_to_interface(int x, int y, int sprite, int series) {
void delete_sprite_in_interface(int series) {
matte_deallocate_series(series, false);
+
+ // WORKAROUND: Remove any pending interface entries referencing the now-freed series.
+ // This fixes a game crash when opening the inventory, since there were pending items
+ // in image_inter_list for the series_id that had been deallocated
+ for (int i = (int)image_inter_marker - 1; i >= 0; --i) {
+ if (image_inter_list[i].series_id == series) {
+ for (int j = i; j < (int)image_inter_marker - 1; ++j)
+ image_inter_list[j] = image_inter_list[j + 1];
+ --image_inter_marker;
+ }
+ }
}
void extra_change_animation(int handle, int x, int y, byte scale, byte depth) {
Commit: 2676b1e7d62bf3e80f95a36c4d46744c688e9a45
https://github.com/scummvm/scummvm/commit/2676b1e7d62bf3e80f95a36c4d46744c688e9a45
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-06-27T06:43:30+10:00
Commit Message:
MADS: FOREST: Implement clear_selected_item
Changed paths:
engines/mads/madsv2/forest/extra.cpp
engines/mads/madsv2/forest/extra.h
engines/mads/madsv2/forest/rooms/room203.cpp
engines/mads/madsv2/forest/rooms/room308.cpp
engines/mads/madsv2/forest/rooms/room403.cpp
engines/mads/madsv2/forest/rooms/room404.cpp
diff --git a/engines/mads/madsv2/forest/extra.cpp b/engines/mads/madsv2/forest/extra.cpp
index 5aadd55a679..a964fc01be8 100644
--- a/engines/mads/madsv2/forest/extra.cpp
+++ b/engines/mads/madsv2/forest/extra.cpp
@@ -20,6 +20,7 @@
*/
#include "common/textconsole.h"
+#include "mads/madsv2/core/buffer.h"
#include "mads/madsv2/core/game.h"
#include "mads/madsv2/core/global.h"
#include "mads/madsv2/core/inter.h"
@@ -27,6 +28,7 @@
#include "mads/madsv2/core/matte.h"
#include "mads/madsv2/core/mouse.h"
#include "mads/madsv2/core/player.h"
+#include "mads/madsv2/core/screen.h"
#include "mads/madsv2/forest/extra.h"
#include "mads/madsv2/forest/global.h"
#include "mads/madsv2/forest/journal.h"
@@ -45,11 +47,11 @@ void init_extra() {
paul_object_showing = -1;
}
-void display_interface() {
- error("TODO: display_interface");
+void clear_selected_item() {
+ inter_turn_off_object();
+ buffer_rect_copy_2(scr_inter_orig, scr_live, 138, 0, 138, 156, 55, 42);
}
-
void solve_me_selected(void) {
global[walker_converse_state] = -1;
open_journal(3);
diff --git a/engines/mads/madsv2/forest/extra.h b/engines/mads/madsv2/forest/extra.h
index fc2697d18c2..7123f61030e 100644
--- a/engines/mads/madsv2/forest/extra.h
+++ b/engines/mads/madsv2/forest/extra.h
@@ -65,7 +65,7 @@ inline void extra_blank_knothole() {
knuthole_flag = 0;
}
-extern void display_interface();
+extern void clear_selected_item();
extern void display_inventory();
extern void solve_me_selected();
extern void door_selected();
diff --git a/engines/mads/madsv2/forest/rooms/room203.cpp b/engines/mads/madsv2/forest/rooms/room203.cpp
index ce5c5030600..e9ce6f7b55b 100644
--- a/engines/mads/madsv2/forest/rooms/room203.cpp
+++ b/engines/mads/madsv2/forest/rooms/room203.cpp
@@ -855,7 +855,7 @@ static void room_203_anim4() {
} else if (frame < 63) {
if (frame == 34) {
digi_play_build(101, '_', 1, 2);
- display_interface();
+ clear_selected_item();
} else if (frame < 34) {
if (frame == 1) {
result = 0;
@@ -1355,7 +1355,7 @@ static void room_203_daemon() {
local->_9e = kernel_run_animation_disp('e', 3, 0);
kernel_position_anim(local->_9e, 105, 137, 90, 5);
close_journal(3);
- display_interface();
+ clear_selected_item();
global[g046] = -1;
if (local->_ac)
@@ -1429,7 +1429,7 @@ static void room_203_daemon() {
kernel_reset_animation(local->_a0, 1);
kernel_synch(KERNEL_ANIM, local->_a0, KERNEL_NOW, 0);
global[g143] = 0;
- display_interface();
+ clear_selected_item();
break;
case 42:
diff --git a/engines/mads/madsv2/forest/rooms/room308.cpp b/engines/mads/madsv2/forest/rooms/room308.cpp
index 9fa29185cff..6f080422dbe 100644
--- a/engines/mads/madsv2/forest/rooms/room308.cpp
+++ b/engines/mads/madsv2/forest/rooms/room308.cpp
@@ -1133,14 +1133,14 @@ static void room_308_daemon() {
case 7:
switch (scratch._b4) {
case 1:
- display_interface();
+ clear_selected_item();
aainfo[5]._val3 = 0;
scratch._b4 = -1;
player.commands_allowed = true;
scratch._c2 = 0;
break;
case 2:
- display_interface();
+ clear_selected_item();
aainfo[5]._val3 = 0;
aainfo[8]._frame = 0;
scratch._b4 = -1;
diff --git a/engines/mads/madsv2/forest/rooms/room403.cpp b/engines/mads/madsv2/forest/rooms/room403.cpp
index 53b1d795be8..e922c3b762d 100644
--- a/engines/mads/madsv2/forest/rooms/room403.cpp
+++ b/engines/mads/madsv2/forest/rooms/room403.cpp
@@ -622,7 +622,7 @@ static void room_403_daemon() {
global[g133] = 0;
kernel_flip_hotspot(words_wrench, false);
inter_move_object(13, PLAYER);
- display_interface();
+ clear_selected_item();
player.commands_allowed = true;
if (config_file.forest1 != 0)
kernel_timing_trigger(1, 105);
diff --git a/engines/mads/madsv2/forest/rooms/room404.cpp b/engines/mads/madsv2/forest/rooms/room404.cpp
index 00ca65ce7e0..a7531392ed2 100644
--- a/engines/mads/madsv2/forest/rooms/room404.cpp
+++ b/engines/mads/madsv2/forest/rooms/room404.cpp
@@ -711,7 +711,7 @@ static void room_404_daemon() {
kernel_flip_hotspot(words_hole, false);
object_set_quality(13, 0, 0L);
inter_move_object(13, NOWHERE);
- display_interface();
+ clear_selected_item();
if (global[walker_converse_state]) {
global[walker_converse_state] = 0;
close_journal(3);
@@ -849,7 +849,7 @@ static void room_404_parser() {
kernel.trigger_setup_mode = 1;
kernel_timing_trigger(2, 109);
} else {
- display_interface();
+ clear_selected_item();
}
} else {
player.commands_allowed = false;
Commit: 8c9f48730b92e5bceb707baef6f70c92b2f3a37e
https://github.com/scummvm/scummvm/commit/8c9f48730b92e5bceb707baef6f70c92b2f3a37e
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-06-27T06:43:30+10:00
Commit Message:
MADS: FOREST: Setting multiple inter flags to be proper bool types
Changed paths:
engines/mads/madsv2/core/inter.cpp
engines/mads/madsv2/core/inter.h
diff --git a/engines/mads/madsv2/core/inter.cpp b/engines/mads/madsv2/core/inter.cpp
index 641f5113e42..3534c2ca379 100644
--- a/engines/mads/madsv2/core/inter.cpp
+++ b/engines/mads/madsv2/core/inter.cpp
@@ -169,17 +169,17 @@ int inter_point_y;
int inter_recent_command; /* Allows cancellation */
int inter_recent_command_source;
-int inter_sentence_ready = false; /* Flag if a sentence ready to go */
+bool inter_sentence_ready = false; /* Flag if a sentence ready to go */
int inter_awaiting = AWAITING_COMMAND; /* Current awaiting status */
-int inter_report_hotspots = false; /* True = show hotspots even with no button pressed */
+bool inter_report_hotspots = false; /* True = show hotspots even with no button pressed */
-int inter_force_rescan = false; /* Force mouse rescan even if didnt change */
+bool inter_force_rescan = false; /* Force mouse rescan even if didnt change */
int inter_base_hotspots; /* Number of basic hotspots */
-int inter_no_segments_active = true;
-int inter_some_segments_active = false;
+bool inter_no_segments_active = true;
+bool inter_some_segments_active = false;
int inter_spot_class;
int inter_spot_index;
diff --git a/engines/mads/madsv2/core/inter.h b/engines/mads/madsv2/core/inter.h
index 9b0d6e02289..4425a4b93dc 100644
--- a/engines/mads/madsv2/core/inter.h
+++ b/engines/mads/madsv2/core/inter.h
@@ -229,10 +229,10 @@ extern int inter_awaiting; /* Current awaiting status */
extern int inter_words[3]; /* Vocabulary words for sentence */
extern char inter_sentence[64]; /* Sentence building buffer */
-extern int inter_sentence_ready; /* Flag if a sentence ready to go */
-extern int inter_report_hotspots; /* True = show hotspots even with no button pressed */
+extern bool inter_sentence_ready; /* Flag if a sentence ready to go */
+extern bool inter_report_hotspots; /* True = show hotspots even with no button pressed */
-extern int inter_force_rescan; /* Force mouse rescan even if not changed */
+extern bool inter_force_rescan; /* Force mouse rescan even if not changed */
extern int inter_base_hotspots; /* Number of basic room hotspots */
extern long inter_base_time; /* Timing marker for interface */
Commit: ef2c749710180de33c116d7c3502db02b4aa5521
https://github.com/scummvm/scummvm/commit/ef2c749710180de33c116d7c3502db02b4aa5521
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-06-27T06:43:30+10:00
Commit Message:
MADS: FOREST: Fixes, clarification, cleanup of opening/closing backpack/journal
Changed paths:
engines/mads/madsv2/forest/extra.cpp
engines/mads/madsv2/forest/extra.h
engines/mads/madsv2/forest/inventory.cpp
engines/mads/madsv2/forest/journal.cpp
engines/mads/madsv2/forest/journal.h
engines/mads/madsv2/forest/rooms/room101.cpp
engines/mads/madsv2/forest/rooms/room104.cpp
engines/mads/madsv2/forest/rooms/room106.cpp
engines/mads/madsv2/forest/rooms/room201.cpp
engines/mads/madsv2/forest/rooms/room203.cpp
engines/mads/madsv2/forest/rooms/room204.cpp
engines/mads/madsv2/forest/rooms/room205.cpp
engines/mads/madsv2/forest/rooms/room210.cpp
engines/mads/madsv2/forest/rooms/room301.cpp
engines/mads/madsv2/forest/rooms/room302.cpp
engines/mads/madsv2/forest/rooms/room303.cpp
engines/mads/madsv2/forest/rooms/room304.cpp
engines/mads/madsv2/forest/rooms/room305.cpp
engines/mads/madsv2/forest/rooms/room306.cpp
engines/mads/madsv2/forest/rooms/room307.cpp
engines/mads/madsv2/forest/rooms/room308.cpp
engines/mads/madsv2/forest/rooms/room321.cpp
engines/mads/madsv2/forest/rooms/room322.cpp
engines/mads/madsv2/forest/rooms/room401.cpp
engines/mads/madsv2/forest/rooms/room402.cpp
engines/mads/madsv2/forest/rooms/room403.cpp
engines/mads/madsv2/forest/rooms/room404.cpp
engines/mads/madsv2/forest/rooms/room405.cpp
engines/mads/madsv2/forest/rooms/room501.cpp
diff --git a/engines/mads/madsv2/forest/extra.cpp b/engines/mads/madsv2/forest/extra.cpp
index a964fc01be8..540f436a56e 100644
--- a/engines/mads/madsv2/forest/extra.cpp
+++ b/engines/mads/madsv2/forest/extra.cpp
@@ -29,9 +29,12 @@
#include "mads/madsv2/core/mouse.h"
#include "mads/madsv2/core/player.h"
#include "mads/madsv2/core/screen.h"
+#include "mads/madsv2/core/timer.h"
+#include "mads/madsv2/forest/digi.h"
#include "mads/madsv2/forest/extra.h"
#include "mads/madsv2/forest/global.h"
#include "mads/madsv2/forest/journal.h"
+#include "mads/madsv2/forest/midi.h"
namespace MADS {
namespace MADSV2 {
@@ -54,12 +57,12 @@ void clear_selected_item() {
void solve_me_selected(void) {
global[walker_converse_state] = -1;
- open_journal(3);
+ open_interface(CANDLE_FLY);
game_exec_function(room_parser_code_pointer);
}
void door_selected(void) {
- open_journal(4);
+ open_interface(DOOR_FLY);
kernel.activate_menu = GAME_MAIN_MENU;
}
@@ -176,6 +179,130 @@ void inter_update_series(int series_id) {
}
}
+
+void open_interface(InterfaceButton button) {
+ mouse_hide();
+
+ int count = 0;
+ do {
+ digi_read_another_chunk();
+ if (global[g009])
+ midi_loop();
+
+ long current_time = timer_read();
+
+ buffer_rect_copy(scr_inter_orig, scr_inter, 0, 0, 165, 44);
+
+ if (button == JOURNAL_FLY) {
+ if (count != 23) {
+ int x = count * 2 + 46;
+ int clip_x = 100 - count * 9;
+ sprite_draw_clipped(series_list[0], 1, clip_x, &scr_inter, x, 30);
+ }
+ } else {
+ sprite_draw(series_list[0], 1, &scr_inter, JOURNAL_X, JOURNAL_Y);
+ }
+
+ if (button == BP_FLY) {
+ if (count != 23) {
+ int x = count * 2 + 40;
+ int clip_x = 100 - count * 9;
+ sprite_draw_clipped(series_list[1], 1, clip_x, &scr_inter, x, 96);
+ }
+ } else {
+ sprite_draw(series_list[1], 1, &scr_inter, BP_X, BP_Y);
+ }
+
+ buffer_rect_copy_2(scr_inter, scr_main, 0, 0, 0, 156, 165, 44);
+ buffer_rect_copy(scr_inter_orig, scr_inter, 168, 0, 152, 44);
+
+ if (button == CANDLE_FLY)
+ count = 24;
+
+ if (global[walker_converse_state])
+ sprite_draw(series_list[5], 1, &scr_inter, CANDLE_X, CANDLE_Y);
+ else
+ sprite_draw(series_list[2], 1, &scr_inter, CANDLE_X, CANDLE_Y);
+
+ if (button == DOOR_FLY) {
+ sprite_draw(series_list[4], 1, &scr_inter, DOOR_X, DOOR_Y);
+ count = 24;
+ } else {
+ sprite_draw(series_list[3], 1, &scr_inter, DOOR_X, DOOR_Y);
+ }
+
+ buffer_rect_copy_2(scr_inter, scr_main, 168, 0, 168, 156, 152, 44);
+
+ while (timer_read() - current_time < 2) {
+ }
+
+ count++;
+ } while (count < 24);
+
+ mouse_show();
+}
+
+void close_interface(InterfaceButton button) {
+ mouse_hide();
+
+ int count = 24;
+ do {
+ digi_read_another_chunk();
+ if (global[g009])
+ midi_loop();
+
+ long current_time = timer_read();
+
+ buffer_rect_copy(scr_inter_orig, scr_inter, 0, 0, 165, 44);
+
+ if (button == JOURNAL_FLY) {
+ if (count != 0) {
+ int x = count * 2 + 43;
+ int clip_x = 100 - count * 9;
+ sprite_draw_clipped(series_list[0], 1, clip_x, &scr_inter, x, 30);
+ } else {
+ sprite_draw(series_list[0], 1, &scr_inter, JOURNAL_X, JOURNAL_Y);
+ }
+ } else {
+ sprite_draw(series_list[0], 1, &scr_inter, JOURNAL_X, JOURNAL_Y);
+ }
+
+ if (button == BP_FLY) {
+ if (count != 0) {
+ int x = count * 2 + 37;
+ int clip_x = 100 - count * 9;
+ sprite_draw_clipped(series_list[1], 1, clip_x, &scr_inter, x, 96);
+ } else {
+ sprite_draw(series_list[1], 1, &scr_inter, BP_X, BP_Y);
+ }
+ } else {
+ sprite_draw(series_list[1], 1, &scr_inter, BP_X, BP_Y);
+ }
+
+ buffer_rect_copy_2(scr_inter, scr_main, 0, 0, 0, 156, 165, 44);
+ buffer_rect_copy(scr_inter_orig, scr_inter, 168, 0, 152, 44);
+
+ if (button == CANDLE_FLY)
+ count = 0;
+
+ if (global[walker_converse_state])
+ sprite_draw(series_list[5], 1, &scr_inter, CANDLE_X, CANDLE_Y);
+ else
+ sprite_draw(series_list[2], 1, &scr_inter, CANDLE_X, CANDLE_Y);
+
+ sprite_draw(series_list[3], 1, &scr_inter, DOOR_X, DOOR_Y);
+
+ buffer_rect_copy_2(scr_inter, scr_main, 168, 0, 168, 156, 152, 44);
+
+ while (timer_read() - current_time < 2) {
+ }
+
+ count--;
+ } while (count >= 0);
+
+ mouse_show();
+}
+
} // namespace Forest
} // namespace MADSV2
} // namespace MADS
diff --git a/engines/mads/madsv2/forest/extra.h b/engines/mads/madsv2/forest/extra.h
index 7123f61030e..fdfbd58e8ff 100644
--- a/engines/mads/madsv2/forest/extra.h
+++ b/engines/mads/madsv2/forest/extra.h
@@ -38,10 +38,12 @@ enum {
fx_int_candle_on = 5
};
-#define JOURNAL_FLY 1
-#define BP_FLY 2
-#define CANDLE_FLY 3
-#define DOOR_FLY 4
+enum InterfaceButton {
+ JOURNAL_FLY = 1,
+ BP_FLY = 2,
+ CANDLE_FLY = 3,
+ DOOR_FLY = 4
+};
/************** NOTE: *********************/
/** IF following values are changed, then recompile EXTRA.C & GAME_3.C **/
@@ -81,6 +83,8 @@ extern void extra_change_animation(int handle, int x, int y, byte scale, byte de
extern void extra_shift_animation(int handle, int x, int y, byte scale);
extern void extra_blank_knothole();
extern void inter_update_series(int series_id);
+extern void open_interface(InterfaceButton button);
+extern void close_interface(InterfaceButton button);
} // namespace Forest
} // namespace MADSV2
diff --git a/engines/mads/madsv2/forest/inventory.cpp b/engines/mads/madsv2/forest/inventory.cpp
index 82f71f25a52..ae20209fdcf 100644
--- a/engines/mads/madsv2/forest/inventory.cpp
+++ b/engines/mads/madsv2/forest/inventory.cpp
@@ -162,7 +162,7 @@ void display_inventory() {
inter_update_series(int_sprite[fx_int_exit]);
inven_set_interface_mode(-1);
- open_journal(2);
+ open_interface(BP_FLY);
cursor_id = 2;
if (cursor_last != 2) {
mouse_cursor_sprite(cursor, 2);
@@ -208,12 +208,13 @@ void display_inventory() {
mouse_show();
// Main event loop
- for (;;) {
+ while (!g_engine->shouldQuit()) {
digi_read_another_chunk();
if (global[g009])
midi_loop();
+
mouse_begin_cycle(0);
- // TODO: delay_to_expiry(0, -1) â not yet declared
+ mouse_end_cycle(false, true);
if (var_1E) {
long current = timer_read();
@@ -379,7 +380,7 @@ void display_inventory() {
exit_inventory:
global[inventory_is_displayed] = 0;
var_6 = var_20;
- close_journal(2);
+ close_interface(BP_FLY);
knuthole_flag = true;
inter_spin_object(object_id);
inter_move_object(object_id, PLAYER);
@@ -398,7 +399,7 @@ cancel_inventory:
mouse_cursor_sprite(cursor, 2);
global[inventory_is_displayed] = 0;
var_6 = var_20;
- close_journal(2);
+ close_interface(BP_FLY);
restore_interface:
stamp_sprite_to_interface(JOURNAL_X, JOURNAL_Y, 1, int_sprite[fx_int_journal]);
diff --git a/engines/mads/madsv2/forest/journal.cpp b/engines/mads/madsv2/forest/journal.cpp
index fe2fe02b8e5..cac612e40d5 100644
--- a/engines/mads/madsv2/forest/journal.cpp
+++ b/engines/mads/madsv2/forest/journal.cpp
@@ -20,17 +20,12 @@
*/
#include "mads/madsv2/forest/journal.h"
-#include "mads/madsv2/core/buffer.h"
+#include "mads/madsv2/forest/extra.h"
+#include "mads/madsv2/forest/global.h"
+#include "mads/madsv2/forest/midi.h"
#include "mads/madsv2/core/global.h"
#include "mads/madsv2/core/kernel.h"
-#include "mads/madsv2/core/matte.h"
-#include "mads/madsv2/core/mouse.h"
#include "mads/madsv2/core/player.h"
-#include "mads/madsv2/core/sprite.h"
-#include "mads/madsv2/core/timer.h"
-#include "mads/madsv2/forest/digi.h"
-#include "mads/madsv2/forest/global.h"
-#include "mads/madsv2/forest/midi.h"
namespace MADS {
namespace MADSV2 {
@@ -49,138 +44,17 @@ static int get_prior_room() {
}
void display_journal() {
- open_journal(1);
+ open_interface(JOURNAL_FLY);
change_to_journal();
}
void leave_journal() {
- close_journal(1);
+ close_interface(JOURNAL_FLY);
global[g009] = 0;
midi_stop();
new_room = get_prior_room();
}
-void open_journal(int mode) {
- mouse_hide();
-
- int count = 0;
- do {
- digi_read_another_chunk();
- if (global[g009])
- midi_loop();
-
- long current_time = timer_read();
-
- buffer_rect_copy(scr_inter_orig, scr_inter, 0, 0, 165, 44);
-
- if (mode == 1) {
- if (count != 23) {
- int x = count * 2 + 46;
- int clip_x = 100 - count * 9;
- sprite_draw_clipped(series_list[0], 1, clip_x, &scr_inter, x, 30);
- }
- } else {
- sprite_draw(series_list[0], 3, &scr_inter, 1, 8);
- }
-
- if (mode == 2) {
- if (count != 23) {
- int x = count * 2 + 40;
- int clip_x = 100 - count * 9;
- sprite_draw_clipped(series_list[1], 1, clip_x, &scr_inter, x, 96);
- }
- } else {
- sprite_draw(series_list[1], 1, &scr_inter, 1, 68);
- }
-
- buffer_rect_copy_2(scr_inter, scr_main, 0, 0, 0, 156, 165, 44);
- buffer_rect_copy(scr_inter_orig, scr_inter, 168, 0, 152, 44);
-
- if (mode == 3)
- count = 24;
-
- if (global[walker_converse_state])
- sprite_draw(series_list[5], 4, &scr_inter, 1, 194);
- else
- sprite_draw(series_list[2], 4, &scr_inter, 1, 194);
-
- if (mode == 4) {
- sprite_draw(series_list[4], 2, &scr_inter, 1, 264);
- count = 24;
- } else {
- sprite_draw(series_list[3], 2, &scr_inter, 1, 264);
- }
-
- buffer_rect_copy_2(scr_inter, scr_main, 168, 0, 168, 156, 152, 44);
-
- while (timer_read() - current_time < 2) {}
-
- count++;
- } while (count < 24);
-
- mouse_show();
-}
-
-void close_journal(int mode) {
- mouse_hide();
-
- int count = 24;
- do {
- digi_read_another_chunk();
- if (global[g009])
- midi_loop();
-
- long current_time = timer_read();
-
- buffer_rect_copy(scr_inter_orig, scr_inter, 0, 0, 165, 44);
-
- if (mode == 1) {
- if (count != 0) {
- int x = count * 2 + 43;
- int clip_x = 100 - count * 9;
- sprite_draw_clipped(series_list[0], 1, clip_x, &scr_inter, x, 30);
- } else {
- sprite_draw(series_list[0], 3, &scr_inter, 1, 8);
- }
- } else {
- sprite_draw(series_list[0], 3, &scr_inter, 1, 8);
- }
-
- if (mode == 2) {
- if (count != 0) {
- int x = count * 2 + 37;
- int clip_x = 100 - count * 9;
- sprite_draw_clipped(series_list[1], 1, clip_x, &scr_inter, x, 96);
- } else {
- sprite_draw(series_list[1], 1, &scr_inter, 1, 68);
- }
- } else {
- sprite_draw(series_list[1], 1, &scr_inter, 1, 68);
- }
-
- buffer_rect_copy_2(scr_inter, scr_main, 0, 0, 0, 156, 165, 44);
- buffer_rect_copy(scr_inter_orig, scr_inter, 168, 0, 152, 44);
-
- if (mode == 3)
- count = 0;
-
- if (global[walker_converse_state])
- sprite_draw(series_list[5], 4, &scr_inter, 1, 194);
- else
- sprite_draw(series_list[2], 4, &scr_inter, 1, 194);
-
- sprite_draw(series_list[3], 2, &scr_inter, 1, 264);
-
- buffer_rect_copy_2(scr_inter, scr_main, 168, 0, 168, 156, 152, 44);
-
- while (timer_read() - current_time < 2) {}
-
- count--;
- } while (count >= 0);
-
- mouse_show();
-}
-
} // namespace Forest
} // namespace MADSV2
} // namespace MADS
diff --git a/engines/mads/madsv2/forest/journal.h b/engines/mads/madsv2/forest/journal.h
index 0d1a0bc1804..d67d8c8d125 100644
--- a/engines/mads/madsv2/forest/journal.h
+++ b/engines/mads/madsv2/forest/journal.h
@@ -30,8 +30,6 @@ namespace Forest {
extern void display_journal();
extern void leave_journal();
-extern void open_journal(int num);
-extern void close_journal(int mode);
} // namespace Forest
} // namespace MADSV2
diff --git a/engines/mads/madsv2/forest/rooms/room101.cpp b/engines/mads/madsv2/forest/rooms/room101.cpp
index 6fd0b34d514..12fe5725463 100644
--- a/engines/mads/madsv2/forest/rooms/room101.cpp
+++ b/engines/mads/madsv2/forest/rooms/room101.cpp
@@ -24,8 +24,8 @@
#include "mads/madsv2/forest/mads/words.h"
#include "mads/madsv2/forest/rooms/section1.h"
#include "mads/madsv2/forest/digi.h"
+#include "mads/madsv2/forest/extra.h"
#include "mads/madsv2/forest/global.h"
-#include "mads/madsv2/forest/journal.h"
#include "mads/madsv2/forest/midi.h"
#include "mads/madsv2/core/game.h"
#include "mads/madsv2/core/imath.h"
@@ -638,7 +638,7 @@ static void room_101_daemon() {
break;
case 29:
global[walker_converse_state] = 0;
- close_journal(3);
+ close_interface(CANDLE_FLY);
player.commands_allowed = true;
break;
case 30:
diff --git a/engines/mads/madsv2/forest/rooms/room104.cpp b/engines/mads/madsv2/forest/rooms/room104.cpp
index 2780f4113d7..b707bba9220 100644
--- a/engines/mads/madsv2/forest/rooms/room104.cpp
+++ b/engines/mads/madsv2/forest/rooms/room104.cpp
@@ -24,8 +24,8 @@
#include "mads/madsv2/forest/mads/words.h"
#include "mads/madsv2/forest/rooms/section1.h"
#include "mads/madsv2/forest/digi.h"
+#include "mads/madsv2/forest/extra.h"
#include "mads/madsv2/forest/global.h"
-#include "mads/madsv2/forest/journal.h"
#include "mads/madsv2/forest/midi.h"
#include "mads/madsv2/core/game.h"
#include "mads/madsv2/core/imath.h"
@@ -811,7 +811,7 @@ static void room_104_daemon() {
case 7:
if (global[walker_converse_state] != 0) {
global[walker_converse_state] = 0;
- close_journal(3);
+ close_interface(CANDLE_FLY);
player.commands_allowed = true;
}
break;
diff --git a/engines/mads/madsv2/forest/rooms/room106.cpp b/engines/mads/madsv2/forest/rooms/room106.cpp
index 4094374e1f4..75ef4605129 100644
--- a/engines/mads/madsv2/forest/rooms/room106.cpp
+++ b/engines/mads/madsv2/forest/rooms/room106.cpp
@@ -24,8 +24,8 @@
#include "mads/madsv2/forest/mads/words.h"
#include "mads/madsv2/forest/rooms/section1.h"
#include "mads/madsv2/forest/digi.h"
+#include "mads/madsv2/forest/extra.h"
#include "mads/madsv2/forest/global.h"
-#include "mads/madsv2/forest/journal.h"
#include "mads/madsv2/forest/midi.h"
#include "mads/madsv2/core/config.h"
#include "mads/madsv2/core/game.h"
@@ -472,7 +472,7 @@ static void room_106_daemon() {
case 7:
if (global[walker_converse_state] != 0) {
global[walker_converse_state] = 0;
- close_journal(3);
+ close_interface(CANDLE_FLY);
player.commands_allowed = true;
} else if (scratch._ae == 75) {
kernel_timing_trigger(30, 106);
diff --git a/engines/mads/madsv2/forest/rooms/room201.cpp b/engines/mads/madsv2/forest/rooms/room201.cpp
index 9a97ccc5648..6c0234fb890 100644
--- a/engines/mads/madsv2/forest/rooms/room201.cpp
+++ b/engines/mads/madsv2/forest/rooms/room201.cpp
@@ -23,8 +23,8 @@
#include "mads/madsv2/forest/mads/inventory.h"
#include "mads/madsv2/forest/mads/words.h"
#include "mads/madsv2/forest/digi.h"
+#include "mads/madsv2/forest/extra.h"
#include "mads/madsv2/forest/global.h"
-#include "mads/madsv2/forest/journal.h"
#include "mads/madsv2/core/game.h"
#include "mads/madsv2/core/inter.h"
#include "mads/madsv2/core/kernel.h"
@@ -476,7 +476,7 @@ static void room_201_daemon() {
} else if (trigger == 7) {
if (global[walker_converse_state] != 0) {
global[walker_converse_state] = 0;
- close_journal(3);
+ close_interface(CANDLE_FLY);
player.commands_allowed = true;
} else {
switch (scratch._a4) {
diff --git a/engines/mads/madsv2/forest/rooms/room203.cpp b/engines/mads/madsv2/forest/rooms/room203.cpp
index e9ce6f7b55b..fa821aa3285 100644
--- a/engines/mads/madsv2/forest/rooms/room203.cpp
+++ b/engines/mads/madsv2/forest/rooms/room203.cpp
@@ -1150,7 +1150,7 @@ static void room_203_daemon() {
case 52:
global[walker_converse_state] = 0;
- close_journal(3);
+ close_interface(CANDLE_FLY);
player.commands_allowed = true;
local->_a4 = 0;
break;
@@ -1354,7 +1354,7 @@ static void room_203_daemon() {
kernel_position_anim(local->_a0, 132, 133, 88, 6);
local->_9e = kernel_run_animation_disp('e', 3, 0);
kernel_position_anim(local->_9e, 105, 137, 90, 5);
- close_journal(3);
+ close_interface(CANDLE_FLY);
clear_selected_item();
global[g046] = -1;
diff --git a/engines/mads/madsv2/forest/rooms/room204.cpp b/engines/mads/madsv2/forest/rooms/room204.cpp
index e4454481b08..4656a5715ea 100644
--- a/engines/mads/madsv2/forest/rooms/room204.cpp
+++ b/engines/mads/madsv2/forest/rooms/room204.cpp
@@ -22,8 +22,8 @@
#include "mads/madsv2/forest/rooms/section2.h"
#include "mads/madsv2/forest/mads/words.h"
#include "mads/madsv2/forest/digi.h"
+#include "mads/madsv2/forest/extra.h"
#include "mads/madsv2/forest/global.h"
-#include "mads/madsv2/forest/journal.h"
#include "mads/madsv2/forest/midi.h"
#include "mads/madsv2/core/game.h"
#include "mads/madsv2/core/global.h"
@@ -396,7 +396,7 @@ static void room_204_daemon() {
trigger_7:
if (global[walker_converse_state] != 0) {
global[walker_converse_state] = 0;
- close_journal(3);
+ close_interface(CANDLE_FLY);
player.commands_allowed = true;
goto bottom;
}
diff --git a/engines/mads/madsv2/forest/rooms/room205.cpp b/engines/mads/madsv2/forest/rooms/room205.cpp
index ea7d152251f..375df58abb8 100644
--- a/engines/mads/madsv2/forest/rooms/room205.cpp
+++ b/engines/mads/madsv2/forest/rooms/room205.cpp
@@ -22,8 +22,8 @@
#include "mads/madsv2/forest/rooms/section2.h"
#include "mads/madsv2/forest/mads/words.h"
#include "mads/madsv2/forest/digi.h"
+#include "mads/madsv2/forest/extra.h"
#include "mads/madsv2/forest/global.h"
-#include "mads/madsv2/forest/journal.h"
#include "mads/madsv2/forest/midi.h"
#include "mads/madsv2/core/game.h"
#include "mads/madsv2/core/global.h"
@@ -268,7 +268,7 @@ static void room_205_daemon() {
case 120:
if (global[walker_converse_state]) {
global[walker_converse_state] = 0;
- close_journal(3);
+ close_interface(CANDLE_FLY);
player.commands_allowed = true;
}
break;
diff --git a/engines/mads/madsv2/forest/rooms/room210.cpp b/engines/mads/madsv2/forest/rooms/room210.cpp
index dd54ee62433..6621f167225 100644
--- a/engines/mads/madsv2/forest/rooms/room210.cpp
+++ b/engines/mads/madsv2/forest/rooms/room210.cpp
@@ -24,8 +24,8 @@
#include "mads/madsv2/forest/mads/sounds.h"
#include "mads/madsv2/forest/mads/words.h"
#include "mads/madsv2/forest/digi.h"
+#include "mads/madsv2/forest/extra.h"
#include "mads/madsv2/forest/global.h"
-#include "mads/madsv2/forest/journal.h"
#include "mads/madsv2/forest/midi.h"
#include "mads/madsv2/core/config.h"
#include "mads/madsv2/core/game.h"
@@ -389,7 +389,7 @@ static void room_210_daemon() {
break;
case 4:
global[walker_converse_state] = 0;
- close_journal(3);
+ close_interface(CANDLE_FLY);
player.commands_allowed = true;
if (config_file.forest1 != 0) kernel_timing_trigger(1, 109);
break;
diff --git a/engines/mads/madsv2/forest/rooms/room301.cpp b/engines/mads/madsv2/forest/rooms/room301.cpp
index 7fef95d2949..96e98f98590 100644
--- a/engines/mads/madsv2/forest/rooms/room301.cpp
+++ b/engines/mads/madsv2/forest/rooms/room301.cpp
@@ -20,8 +20,8 @@
*/
#include "mads/madsv2/forest/digi.h"
+#include "mads/madsv2/forest/extra.h"
#include "mads/madsv2/forest/global.h"
-#include "mads/madsv2/forest/journal.h"
#include "mads/madsv2/forest/midi.h"
#include "mads/madsv2/forest/mads/words.h"
#include "mads/madsv2/core/game.h"
@@ -548,7 +548,7 @@ static void room_301_daemon() {
case 7:
if (global[walker_converse_state] != 0) {
global[walker_converse_state] = 0;
- close_journal(3);
+ close_interface(CANDLE_FLY);
player.commands_allowed = true;
} else if (scratch._a4 == 300) {
kernel_abort_animation(scratch._9e);
diff --git a/engines/mads/madsv2/forest/rooms/room302.cpp b/engines/mads/madsv2/forest/rooms/room302.cpp
index 983939bac9e..0638a47ecd3 100644
--- a/engines/mads/madsv2/forest/rooms/room302.cpp
+++ b/engines/mads/madsv2/forest/rooms/room302.cpp
@@ -24,8 +24,8 @@
#include "mads/madsv2/forest/mads/sounds.h"
#include "mads/madsv2/forest/mads/words.h"
#include "mads/madsv2/forest/digi.h"
+#include "mads/madsv2/forest/extra.h"
#include "mads/madsv2/forest/global.h"
-#include "mads/madsv2/forest/journal.h"
#include "mads/madsv2/forest/midi.h"
#include "mads/madsv2/core/game.h"
#include "mads/madsv2/core/imath.h"
@@ -536,7 +536,7 @@ static void room_302_daemon() {
case 7:
if (global[walker_converse_state] != 0) {
global[walker_converse_state] = 0;
- close_journal(3);
+ close_interface(CANDLE_FLY);
player.commands_allowed = true;
} else {
if (scratch._a4 == 200) {
diff --git a/engines/mads/madsv2/forest/rooms/room303.cpp b/engines/mads/madsv2/forest/rooms/room303.cpp
index 7de62b80815..c4d3ea98428 100644
--- a/engines/mads/madsv2/forest/rooms/room303.cpp
+++ b/engines/mads/madsv2/forest/rooms/room303.cpp
@@ -24,8 +24,8 @@
#include "mads/madsv2/forest/mads/sounds.h"
#include "mads/madsv2/forest/mads/words.h"
#include "mads/madsv2/forest/digi.h"
+#include "mads/madsv2/forest/extra.h"
#include "mads/madsv2/forest/global.h"
-#include "mads/madsv2/forest/journal.h"
#include "mads/madsv2/core/game.h"
#include "mads/madsv2/core/imath.h"
#include "mads/madsv2/core/inter.h"
@@ -689,7 +689,7 @@ static void room_303_daemon() {
case 7:
if (global[walker_converse_state] != 0) {
global[walker_converse_state] = 0;
- close_journal(3);
+ close_interface(CANDLE_FLY);
player.commands_allowed = true;
} else if (scratch._a8 == 123) {
dont_frag_the_palette();
diff --git a/engines/mads/madsv2/forest/rooms/room304.cpp b/engines/mads/madsv2/forest/rooms/room304.cpp
index c23c77a7f2a..ecf3ad7241e 100644
--- a/engines/mads/madsv2/forest/rooms/room304.cpp
+++ b/engines/mads/madsv2/forest/rooms/room304.cpp
@@ -24,6 +24,7 @@
#include "mads/madsv2/forest/mads/sounds.h"
#include "mads/madsv2/forest/mads/words.h"
#include "mads/madsv2/forest/digi.h"
+#include "mads/madsv2/forest/extra.h"
#include "mads/madsv2/forest/global.h"
#include "mads/madsv2/forest/journal.h"
#include "mads/madsv2/forest/midi.h"
@@ -489,7 +490,7 @@ static void room_304_daemon() {
kernel_synch(KERNEL_PLAYER, 0, KERNEL_NOW, 0);
player.commands_allowed = true;
global[walker_converse_state] = 0;
- close_journal(3);
+ close_interface(CANDLE_FLY);
break;
case 8:
global[g131] = -1;
diff --git a/engines/mads/madsv2/forest/rooms/room305.cpp b/engines/mads/madsv2/forest/rooms/room305.cpp
index 044892a869b..b8acbd7bbcf 100644
--- a/engines/mads/madsv2/forest/rooms/room305.cpp
+++ b/engines/mads/madsv2/forest/rooms/room305.cpp
@@ -23,8 +23,8 @@
#include "mads/madsv2/forest/mads/sounds.h"
#include "mads/madsv2/forest/mads/words.h"
#include "mads/madsv2/forest/digi.h"
+#include "mads/madsv2/forest/extra.h"
#include "mads/madsv2/forest/global.h"
-#include "mads/madsv2/forest/journal.h"
#include "mads/madsv2/core/config.h"
#include "mads/madsv2/core/game.h"
#include "mads/madsv2/core/imath.h"
@@ -778,7 +778,7 @@ static void room_305_daemon() {
case 7:
if (global[walker_converse_state] != 0) {
global[walker_converse_state] = 0;
- close_journal(3);
+ close_interface(CANDLE_FLY);
player.commands_allowed = true;
if (config_file.forest1 != 0)
kernel_timing_trigger(1, 109);
diff --git a/engines/mads/madsv2/forest/rooms/room306.cpp b/engines/mads/madsv2/forest/rooms/room306.cpp
index b7b970343bb..6a0f6322983 100644
--- a/engines/mads/madsv2/forest/rooms/room306.cpp
+++ b/engines/mads/madsv2/forest/rooms/room306.cpp
@@ -23,8 +23,8 @@
#include "mads/madsv2/forest/mads/sounds.h"
#include "mads/madsv2/forest/mads/words.h"
#include "mads/madsv2/forest/digi.h"
+#include "mads/madsv2/forest/extra.h"
#include "mads/madsv2/forest/global.h"
-#include "mads/madsv2/forest/journal.h"
#include "mads/madsv2/forest/midi.h"
#include "mads/madsv2/core/config.h"
#include "mads/madsv2/core/game.h"
@@ -684,7 +684,7 @@ static void room_306_daemon() {
case 7:
if (global[walker_converse_state] != 0) {
global[walker_converse_state] = 0;
- close_journal(3);
+ close_interface(CANDLE_FLY);
player.commands_allowed = true;
if (config_file.forest1 != 0) {
if (global[g066] == 3) {
diff --git a/engines/mads/madsv2/forest/rooms/room307.cpp b/engines/mads/madsv2/forest/rooms/room307.cpp
index 5e7d4bdddfa..8a185d078b1 100644
--- a/engines/mads/madsv2/forest/rooms/room307.cpp
+++ b/engines/mads/madsv2/forest/rooms/room307.cpp
@@ -24,8 +24,8 @@
#include "mads/madsv2/forest/mads/sounds.h"
#include "mads/madsv2/forest/mads/words.h"
#include "mads/madsv2/forest/digi.h"
+#include "mads/madsv2/forest/extra.h"
#include "mads/madsv2/forest/global.h"
-#include "mads/madsv2/forest/journal.h"
#include "mads/madsv2/forest/midi.h"
#include "mads/madsv2/core/config.h"
#include "mads/madsv2/core/game.h"
@@ -588,7 +588,7 @@ static void room_307_daemon() {
case 7: {
if (global[walker_converse_state] != 0) {
global[walker_converse_state] = 0;
- close_journal(3);
+ close_interface(CANDLE_FLY);
player.commands_allowed = true;
} else if (scratch._aa == 3) {
aainfo[3]._val3 = 2;
@@ -923,7 +923,7 @@ static void room_307_parser() {
if (global[walker_converse_state] != 0) {
global[walker_converse_state] = 0;
- close_journal(3);
+ close_interface(CANDLE_FLY);
goto handled;
}
diff --git a/engines/mads/madsv2/forest/rooms/room308.cpp b/engines/mads/madsv2/forest/rooms/room308.cpp
index 6f080422dbe..f572abb96b0 100644
--- a/engines/mads/madsv2/forest/rooms/room308.cpp
+++ b/engines/mads/madsv2/forest/rooms/room308.cpp
@@ -862,7 +862,7 @@ static void room_308_anim22() {
if (cur == 70) {
if (global[walker_converse_state] != 0) {
global[walker_converse_state] = 0;
- close_journal(3);
+ close_interface(CANDLE_FLY);
}
object_set_quality(5, -1, -1);
object_set_quality(1, -1, -1);
diff --git a/engines/mads/madsv2/forest/rooms/room321.cpp b/engines/mads/madsv2/forest/rooms/room321.cpp
index e7ad6f6e520..d3345e9daff 100644
--- a/engines/mads/madsv2/forest/rooms/room321.cpp
+++ b/engines/mads/madsv2/forest/rooms/room321.cpp
@@ -24,8 +24,8 @@
#include "mads/madsv2/forest/mads/sounds.h"
#include "mads/madsv2/forest/mads/words.h"
#include "mads/madsv2/forest/digi.h"
+#include "mads/madsv2/forest/extra.h"
#include "mads/madsv2/forest/global.h"
-#include "mads/madsv2/forest/journal.h"
#include "mads/madsv2/core/game.h"
#include "mads/madsv2/core/imath.h"
#include "mads/madsv2/core/inter.h"
@@ -542,7 +542,7 @@ static void room_321_daemon() {
switch (scratch._a8) {
case -666:
global[walker_converse_state] = 0;
- close_journal(3);
+ close_interface(CANDLE_FLY);
player.commands_allowed = true;
break;
diff --git a/engines/mads/madsv2/forest/rooms/room322.cpp b/engines/mads/madsv2/forest/rooms/room322.cpp
index 6da21147065..97abe1a68e2 100644
--- a/engines/mads/madsv2/forest/rooms/room322.cpp
+++ b/engines/mads/madsv2/forest/rooms/room322.cpp
@@ -24,8 +24,8 @@
#include "mads/madsv2/forest/mads/sounds.h"
#include "mads/madsv2/forest/mads/words.h"
#include "mads/madsv2/forest/digi.h"
+#include "mads/madsv2/forest/extra.h"
#include "mads/madsv2/forest/global.h"
-#include "mads/madsv2/forest/journal.h"
#include "mads/madsv2/forest/midi.h"
#include "mads/madsv2/core/game.h"
#include "mads/madsv2/core/imath.h"
@@ -421,7 +421,7 @@ static void room_322_daemon() {
case 7:
if (global[walker_converse_state]) {
global[walker_converse_state] = 0;
- close_journal(3);
+ close_interface(CANDLE_FLY);
player.commands_allowed = true;
} else if (scratch._b4 == 1) {
global[g150] = -1;
@@ -780,7 +780,7 @@ static void room_322_parser() {
if (global[walker_converse_state]) {
global[walker_converse_state] = 0;
- close_journal(3);
+ close_interface(CANDLE_FLY);
player.command_ready = 0;
}
}
diff --git a/engines/mads/madsv2/forest/rooms/room401.cpp b/engines/mads/madsv2/forest/rooms/room401.cpp
index 7940b6e96c0..9f44314250a 100644
--- a/engines/mads/madsv2/forest/rooms/room401.cpp
+++ b/engines/mads/madsv2/forest/rooms/room401.cpp
@@ -24,8 +24,8 @@
#include "mads/madsv2/forest/mads/sounds.h"
#include "mads/madsv2/forest/mads/words.h"
#include "mads/madsv2/forest/digi.h"
+#include "mads/madsv2/forest/extra.h"
#include "mads/madsv2/forest/global.h"
-#include "mads/madsv2/forest/journal.h"
#include "mads/madsv2/forest/midi.h"
#include "mads/madsv2/core/config.h"
#include "mads/madsv2/core/game.h"
@@ -469,7 +469,7 @@ static void room_401_daemon() {
if (scratch._a0 != 668)
break;
global[walker_converse_state] = 0;
- close_journal(3);
+ close_interface(CANDLE_FLY);
player.commands_allowed = true;
if (config_file.forest1)
kernel_timing_trigger(1, 106);
diff --git a/engines/mads/madsv2/forest/rooms/room402.cpp b/engines/mads/madsv2/forest/rooms/room402.cpp
index 813c5f4b4bb..cab7793e198 100644
--- a/engines/mads/madsv2/forest/rooms/room402.cpp
+++ b/engines/mads/madsv2/forest/rooms/room402.cpp
@@ -24,6 +24,7 @@
#include "mads/madsv2/forest/mads/sounds.h"
#include "mads/madsv2/forest/mads/words.h"
#include "mads/madsv2/forest/digi.h"
+#include "mads/madsv2/forest/extra.h"
#include "mads/madsv2/forest/global.h"
#include "mads/madsv2/forest/journal.h"
#include "mads/madsv2/forest/midi.h"
@@ -210,7 +211,7 @@ static void room_402_anim_case7() {
if (a2 == -668) {
global[walker_converse_state] = 0;
- close_journal(3);
+ close_interface(CANDLE_FLY);
player.commands_allowed = true;
} else if (a2 == 1) {
result = 14;
@@ -336,7 +337,7 @@ static void room_402_anim_state() {
scratch._98 = 15;
room_402_anim5();
global[walker_converse_state] = 0;
- close_journal(3);
+ close_interface(CANDLE_FLY);
kernel_flip_hotspot(words_rock, true);
kernel_flip_hotspot(words_room_401, false);
player.commands_allowed = true;
@@ -386,7 +387,7 @@ static void room_402_anim_state() {
kernel_synch(KERNEL_PLAYER, 0, KERNEL_NOW, 0);
player.commands_allowed = true;
global[walker_converse_state] = 0;
- close_journal(3);
+ close_interface(CANDLE_FLY);
global[player_score] = -1;
break;
case 20:
diff --git a/engines/mads/madsv2/forest/rooms/room403.cpp b/engines/mads/madsv2/forest/rooms/room403.cpp
index e922c3b762d..d3c8378c15c 100644
--- a/engines/mads/madsv2/forest/rooms/room403.cpp
+++ b/engines/mads/madsv2/forest/rooms/room403.cpp
@@ -460,7 +460,7 @@ static void room_403_daemon() {
case 7:
if (global[walker_converse_state] != 0) {
global[walker_converse_state] = 0;
- close_journal(3);
+ close_interface(CANDLE_FLY);
player.commands_allowed = true;
if (config_file.forest1 != 0)
kernel_timing_trigger(1, 105);
diff --git a/engines/mads/madsv2/forest/rooms/room404.cpp b/engines/mads/madsv2/forest/rooms/room404.cpp
index a7531392ed2..1282dea6a17 100644
--- a/engines/mads/madsv2/forest/rooms/room404.cpp
+++ b/engines/mads/madsv2/forest/rooms/room404.cpp
@@ -515,7 +515,7 @@ static void room_404_daemon() {
case 7:
if (global[walker_converse_state] && global[g081]) {
global[walker_converse_state] = 0;
- close_journal(3);
+ close_interface(CANDLE_FLY);
player.commands_allowed = true;
if (config_file.forest1)
kernel_timing_trigger(1, 110);
@@ -714,7 +714,7 @@ static void room_404_daemon() {
clear_selected_item();
if (global[walker_converse_state]) {
global[walker_converse_state] = 0;
- close_journal(3);
+ close_interface(CANDLE_FLY);
}
player.commands_allowed = true;
if (config_file.forest1)
diff --git a/engines/mads/madsv2/forest/rooms/room405.cpp b/engines/mads/madsv2/forest/rooms/room405.cpp
index 627bc558373..877132af830 100644
--- a/engines/mads/madsv2/forest/rooms/room405.cpp
+++ b/engines/mads/madsv2/forest/rooms/room405.cpp
@@ -278,7 +278,7 @@ static void room_405_daemon() {
case 7:
if (global[walker_converse_state]) {
global[walker_converse_state] = 0;
- close_journal(3);
+ close_interface(CANDLE_FLY);
player.commands_allowed = true;
if (config_file.forest1)
kernel_timing_trigger(1, 106);
diff --git a/engines/mads/madsv2/forest/rooms/room501.cpp b/engines/mads/madsv2/forest/rooms/room501.cpp
index efdf927b486..2ab5a5091ae 100644
--- a/engines/mads/madsv2/forest/rooms/room501.cpp
+++ b/engines/mads/madsv2/forest/rooms/room501.cpp
@@ -24,8 +24,8 @@
#include "mads/madsv2/forest/mads/sounds.h"
#include "mads/madsv2/forest/mads/words.h"
#include "mads/madsv2/forest/digi.h"
+#include "mads/madsv2/forest/extra.h"
#include "mads/madsv2/forest/global.h"
-#include "mads/madsv2/forest/journal.h"
#include "mads/madsv2/forest/midi.h"
#include "mads/madsv2/core/game.h"
#include "mads/madsv2/core/imath.h"
@@ -392,7 +392,7 @@ static void room_501_daemon() {
case 7:
if (global[walker_converse_state] != 0) {
global[walker_converse_state] = 0;
- close_journal(3);
+ close_interface(CANDLE_FLY);
}
player.commands_allowed = true;
break;
Commit: 815ab673b680449b31c2049891deb9423fb0acb7
https://github.com/scummvm/scummvm/commit/815ab673b680449b31c2049891deb9423fb0acb7
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-06-27T06:43:30+10:00
Commit Message:
MADS: FOREST: Fix crash exiting journal
Changed paths:
engines/mads/madsv2/core/game.cpp
diff --git a/engines/mads/madsv2/core/game.cpp b/engines/mads/madsv2/core/game.cpp
index d981a3e0212..fdbe0f7767f 100644
--- a/engines/mads/madsv2/core/game.cpp
+++ b/engines/mads/madsv2/core/game.cpp
@@ -65,8 +65,9 @@
#include "mads/madsv2/core/text.h"
#include "mads/madsv2/core/imath.h"
#include "mads/madsv2/core/screen.h"
-#include "mads/madsv2/forest/extra.h"
#include "mads/madsv2/forest/digi.h"
+#include "mads/madsv2/forest/extra.h"
+#include "mads/madsv2/forest/global.h"
namespace MADS {
namespace MADSV2 {
@@ -1522,20 +1523,22 @@ void game_control() {
if ((quote_emergency /* || vocab_emergency */) && !game_any_emergency) {
room_id = previous_room;
game_any_emergency = true;
- goto emergency;
} else {
game_any_emergency = false;
- }
- game_control_loop();
+ game_control_loop();
+
+ if (g_engine->getGameID() == GType_Forest)
+ global[Forest::g016] = 0;
+
+ if (speech_system_active && speech_on)
+ speech_all_off();
+ }
// **********************************************************************************************
// LEAVE ROOM
// **********************************************************************************************
- if (speech_system_active && speech_on)
- speech_all_off();
-emergency:
game_wait_cursor();
kernel_mode = KERNEL_ROOM_PRELOAD;
More information about the Scummvm-git-logs
mailing list