[Scummvm-git-logs] scummvm master -> 5b49c762cdde93ef44fb87c115d0e6f357b376df

dreammaster noreply at scummvm.org
Sun Jun 28 11:48:23 UTC 2026


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

Summary:
3f1a6463a6 MADS: FOREST: Added lilypad and stick inventory items
62af8fd8f0 MADS: FOREST: Properly reset flags array when starting new game
abee9f701e MADS: FOREST: Add missing daemon case in room 304
5b49c762cd MADS: FOREST: Add inventory constants to room 308


Commit: 3f1a6463a62e9bed6eed53d3a5c2b2342b3abd96
    https://github.com/scummvm/scummvm/commit/3f1a6463a62e9bed6eed53d3a5c2b2342b3abd96
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-06-28T21:48:11+10:00

Commit Message:
MADS: FOREST: Added lilypad and stick inventory items

Changed paths:
    engines/mads/madsv2/forest/mads/inventory.h
    engines/mads/madsv2/forest/rooms/room307.cpp


diff --git a/engines/mads/madsv2/forest/mads/inventory.h b/engines/mads/madsv2/forest/mads/inventory.h
index d68b6e587b8..179eda3b588 100644
--- a/engines/mads/madsv2/forest/mads/inventory.h
+++ b/engines/mads/madsv2/forest/mads/inventory.h
@@ -32,6 +32,7 @@ enum {
 	cogs           =  0,
 	rubber_band    =  1,
 	feather        =  2,
+	lily_pad       =  4,
 	pebbles        =  5,
 	reeds          =  6,
 	sticks         =  7,
@@ -40,6 +41,7 @@ enum {
 	web            = 10,
 	planks         = 11,
 	elm_leaves     = 12,
+	stick          = 14,
 	forked_stick   = 15
 };
 
diff --git a/engines/mads/madsv2/forest/rooms/room307.cpp b/engines/mads/madsv2/forest/rooms/room307.cpp
index 0e53d188361..aa93e5f53dc 100644
--- a/engines/mads/madsv2/forest/rooms/room307.cpp
+++ b/engines/mads/madsv2/forest/rooms/room307.cpp
@@ -197,13 +197,13 @@ static void room_307_anim3() {
 			int16 old = seq[1];
 			kernel_seq_delete(seq[1]);
 			kernel_synch(KERNEL_SERIES, old, KERNEL_ANIM, aa[2]);
-			inter_move_object(14, PLAYER);
+			inter_move_object(stick, PLAYER);
 			break;
 		}
 		case 22: {
 			int16 old = seq[0];
 			kernel_seq_delete(seq[0]);
-			inter_move_object(4, PLAYER);
+			inter_move_object(lily_pad, PLAYER);
 			kernel_synch(KERNEL_SERIES, old, KERNEL_ANIM, aa[2]);
 			kernel_flip_hotspot(words_lily_pad, false);
 			break;
@@ -518,8 +518,8 @@ static void room_307_anim10() {
 }
 
 static void room_307_init() {
-	object_set_quality(4, 0, -1);
-	object_set_quality(14, 0, -1);
+	object_set_quality(lily_pad, 0, -1);
+	object_set_quality(stick, 0, -1);
 
 	scratch._9a = -1;
 	scratch._9c = -1;
@@ -533,7 +533,7 @@ static void room_307_init() {
 
 	kernel_flip_hotspot(global[g075] != 0 ? 28 : 27, 0);
 
-	if (object_is_here(4)) {
+	if (object_is_here(lily_pad)) {
 		ss[0] = kernel_load_series(kernel_name('p', 1), 0);
 		seq[0] = kernel_seq_stamp(ss[0], false, -1);
 		kernel_seq_depth(seq[0], 10);
@@ -543,7 +543,7 @@ static void room_307_init() {
 		kernel_flip_hotspot(words_lily_pad, false);
 	}
 
-	if (object_is_here(14)) {
+	if (object_is_here(stick)) {
 		ss[1] = kernel_load_series(kernel_name('p', 2), 0);
 		seq[1] = kernel_seq_stamp(ss[1], false, -1);
 		kernel_seq_depth(seq[1], 9);
@@ -783,12 +783,12 @@ static void room_307_daemon() {
 		scratch._92 = 100;
 		player.walker_visible = false;
 		kernel_synch(KERNEL_PLAYER, 0, KERNEL_NOW, 0);
-		if (player_has(14)) {
+		if (player_has(stick)) {
 			kernel_synch(KERNEL_ANIM, aa[8], KERNEL_PLAYER, 0);
 		} else {
 			kernel_synch(KERNEL_ANIM, aa[9], KERNEL_NOW, 0);
-			inter_move_object(14, PLAYER);
-			inter_move_object(4, PLAYER);
+			inter_move_object(stick, PLAYER);
+			inter_move_object(lily_pad, PLAYER);
 		}
 		break;
 	}


Commit: 62af8fd8f0029cc82e5aa91ad02b9ebb14a2480b
    https://github.com/scummvm/scummvm/commit/62af8fd8f0029cc82e5aa91ad02b9ebb14a2480b
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-06-28T21:48:12+10:00

Commit Message:
MADS: FOREST: Properly reset flags array when starting new game

Changed paths:
    engines/mads/madsv2/forest/forest.cpp


diff --git a/engines/mads/madsv2/forest/forest.cpp b/engines/mads/madsv2/forest/forest.cpp
index 174a13c1e5d..df539385cf4 100644
--- a/engines/mads/madsv2/forest/forest.cpp
+++ b/engines/mads/madsv2/forest/forest.cpp
@@ -26,6 +26,7 @@
 #include "mads/madsv2/core/env.h"
 #include "mads/madsv2/core/game.h"
 #include "mads/madsv2/core/imath.h"
+#include "mads/madsv2/core/timer.h"
 #include "mads/madsv2/core/inter.h"
 #include "mads/madsv2/core/kernel.h"
 #include "mads/madsv2/core/matte.h"
@@ -90,12 +91,36 @@ Common::Error ForestEngine::run() {
 }
 
 void ForestEngine::global_init_code() {
-	int count;
-
-	for (count = 0; count < GLOBAL_LIST_SIZE; count++) {
-		global[count] = 0;
+	Common::fill(global, global + GLOBAL_LIST_SIZE, 0);
+	Common::fill(flags, flags + 40, 0);
+
+	flags[0] = flags[1] = flags[2] = flags[3] = -4;
+	flags[4] = flags[5] = 4;
+	flags[34] = flags[35] = flags[36] = 4;
+
+	global[g009] = -1;
+	global[player_score] = -1;
+	global[g022] = 0;
+
+	int16 table[5] = { 106, 203, 302, 305, 307 };
+
+	for (int16 *dest : { &global[g041], &global[g042], &global[g043], &global[g044], &global[g045] }) {
+		int pick;
+		do {
+			int index = imath_random(0, 4);
+			pick = table[index];
+			table[index] = 0;
+		} while (pick == 0);
+		*dest = pick;
 	}
 
+	global[player_selected_object] = -1;
+	global[g017] = -1;
+	global[intro] = 0;
+	global[outro] = 0;
+	global[g066] = 0;
+	global[walker_converse_now] = 0;
+
 	player.facing = FACING_NORTH;
 	player.turn_to_facing = FACING_NORTH;
 }


Commit: abee9f701e767a2cdd7ebd953ebe8a8d2a3a19ba
    https://github.com/scummvm/scummvm/commit/abee9f701e767a2cdd7ebd953ebe8a8d2a3a19ba
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-06-28T21:48:12+10:00

Commit Message:
MADS: FOREST: Add missing daemon case in room 304

Changed paths:
    engines/mads/madsv2/forest/rooms/room304.cpp


diff --git a/engines/mads/madsv2/forest/rooms/room304.cpp b/engines/mads/madsv2/forest/rooms/room304.cpp
index 179cb101fb6..26a12881587 100644
--- a/engines/mads/madsv2/forest/rooms/room304.cpp
+++ b/engines/mads/madsv2/forest/rooms/room304.cpp
@@ -56,7 +56,7 @@ static Scratch scratch;
 #define ss    local->sprite
 #define seq   local->sequence
 #define aa    local->animation
-#define aainfo scratch.animation_info
+#define aainfo local->animation_info
 
 
 static void room_304_init1() {
@@ -75,9 +75,9 @@ static void room_304_init1() {
 	} else {
 		kernel_timing_trigger(1, 107);
 		aa[4] = kernel_run_animation(kernel_name('n', 2), 105);
-		scratch.animation_info[4]._active = -1;
+		aainfo[4]._active = -1;
 		aa[5] = kernel_run_animation(kernel_name('n', 1), 106);
-		scratch.animation_info[5]._active = -1;
+		aainfo[5]._active = -1;
 	}
 
 	if (previous_room != KERNEL_RESTORING_GAME) {
@@ -88,7 +88,7 @@ static void room_304_init1() {
 
 	if (previous_room == 302) {
 		aa[0] = kernel_run_animation(kernel_name('y', 1), 100);
-		scratch.animation_info[0]._active = -1;
+		aainfo[0]._active = -1;
 		scratch._92 = 55;
 		return;
 	}
@@ -118,10 +118,10 @@ static void room_304_init() {
 		}
 
 		for (int i = 0; i < 10; i++) {
-			scratch.animation_info[i]._active = 0;
-			scratch.animation_info[i]._frame = 1;
-			scratch.animation_info[i]._val3 = 0;
-			scratch.animation_info[i]._val4 = 0;
+			aainfo[i]._active = 0;
+			aainfo[i]._frame = 1;
+			aainfo[i]._val3 = 0;
+			aainfo[i]._val4 = 0;
 		}
 
 		if (previous_room != 199 && flags[18] != 3)
@@ -152,61 +152,60 @@ static void room_304_restore() {
 }
 
 static void room_304_anim1() {
-	if (kernel_anim[aa[0]].frame != scratch.animation_info[0]._frame)
-		scratch.animation_info[0]._frame = kernel_anim[aa[0]].frame;
+	if (kernel_anim[aa[0]].frame != aainfo[0]._frame)
+		aainfo[0]._frame = kernel_anim[aa[0]].frame;
 
 	if (global[player_hyperwalked] == -1) {
-		scratch.animation_info[0]._frame = scratch._92 - 1;
-		kernel_reset_animation(aa[0], scratch.animation_info[0]._frame);
+		aainfo[0]._frame = scratch._92 - 1;
+		kernel_reset_animation(aa[0], aainfo[0]._frame);
 	}
 }
 
 static void room_304_anim2() {
-	int16 var_2 = -1;
-
-	if (kernel_anim[aa[1]].frame == scratch.animation_info[1]._frame)
-		return;
+	int16 result = -1;
 
-	scratch.animation_info[1]._frame = kernel_anim[aa[1]].frame;
+	if (kernel_anim[aa[1]].frame != aainfo[1]._frame) {
+		aainfo[1]._frame = kernel_anim[aa[1]].frame;
 
-	if (scratch._96 == 2) {
-		int16 frame = scratch.animation_info[1]._frame;
-		if (frame == 5) {
-			digi_play_build(304, 'e', 3, 1);
-			scratch._9e = 6;
-		} else if (frame == 10) {
-			var_2 = 5;
+		if (scratch._96 == 2) {
+			int16 frame = aainfo[1]._frame;
+			if (frame == 5) {
+				digi_play_build(304, 'e', 3, 1);
+				scratch._9e = 6;
+			} else if (frame == 10) {
+				result = 5;
+			}
 		}
-	}
 
-	if (var_2 >= 0) {
-		scratch.animation_info[1]._frame = var_2;
-		kernel_reset_animation(aa[1], var_2);
+		if (result >= 0) {
+			aainfo[1]._frame = result;
+			kernel_reset_animation(aa[1], result);
+		}
 	}
 }
 
 static void room_304_anim3() {
-	if (kernel_anim[aa[2]].frame != scratch.animation_info[2]._frame)
-		scratch.animation_info[2]._frame = kernel_anim[aa[2]].frame;
+	if (kernel_anim[aa[2]].frame != aainfo[2]._frame)
+		aainfo[2]._frame = kernel_anim[aa[2]].frame;
 }
 
 static void room_304_anim4() {
 	int16 var_2 = -1;
 
-	if (kernel_anim[aa[3]].frame == scratch.animation_info[3]._frame)
+	if (kernel_anim[aa[3]].frame == aainfo[3]._frame)
 		return;
 
 	int16 frame = kernel_anim[aa[3]].frame;
-	scratch.animation_info[3]._frame = frame;
+	aainfo[3]._frame = frame;
 
 	switch (scratch._98) {
 	case 1:
 		if (frame == 65) {
-			scratch.animation_info[3]._frame = 60;
+			aainfo[3]._frame = 60;
 			kernel_reset_animation(aa[3], 60);
 		} else if (frame < 65) {
 			if (frame == 34) {
-				scratch.animation_info[3]._frame = 33;
+				aainfo[3]._frame = 33;
 				kernel_reset_animation(aa[3], 33);
 			} else if (frame > 34) {
 				if (frame == 51) {
@@ -214,10 +213,10 @@ static void room_304_anim4() {
 					scratch._9e = 4;
 				} else if (frame > 51) {
 					if (frame == 56) {
-						scratch.animation_info[3]._frame = 51;
+						aainfo[3]._frame = 51;
 						kernel_reset_animation(aa[3], 51);
 					} else if (frame == 59) {
-						scratch.animation_info[3]._frame = 57;
+						aainfo[3]._frame = 57;
 						kernel_reset_animation(aa[3], 57);
 					} else if (frame == 60) {
 						digi_play_build(304, 'e', 2, 1);
@@ -228,7 +227,7 @@ static void room_304_anim4() {
 						digi_play_build(304, 'e', 1, 1);
 						scratch._9e = 3;
 					} else if (frame == 44) {
-						scratch.animation_info[3]._frame = 39;
+						aainfo[3]._frame = 39;
 						kernel_reset_animation(aa[3], 39);
 					}
 				}
@@ -237,17 +236,17 @@ static void room_304_anim4() {
 					digi_play_build(304, 'r', 1, 1);
 					scratch._9e = 1;
 				} else if (frame == 13) {
-					scratch.animation_info[3]._frame = 8;
+					aainfo[3]._frame = 8;
 					kernel_reset_animation(aa[3], 8);
 				} else if (frame == 23) {
 					digi_play_build(304, 'b', 1, 1);
 					scratch._9e = 2;
 					kernel_timing_trigger(240, 108);
 				} else if (frame == 25) {
-					scratch.animation_info[3]._frame = 23;
+					aainfo[3]._frame = 23;
 					kernel_reset_animation(aa[3], 23);
 				} else if (frame == 28) {
-					scratch.animation_info[3]._frame = 25;
+					aainfo[3]._frame = 25;
 					kernel_reset_animation(aa[3], 25);
 				}
 			}
@@ -307,42 +306,91 @@ static void room_304_anim4() {
 	}
 
 	if (var_2 >= 0) {
-		scratch.animation_info[3]._frame = var_2;
+		aainfo[3]._frame = var_2;
 		kernel_reset_animation(aa[3], var_2);
 	}
 }
 
 static void room_304_anim5() {
-	if (kernel_anim[aa[4]].frame == scratch.animation_info[4]._frame)
+	if (kernel_anim[aa[4]].frame == aainfo[4]._frame)
 		return;
 
 	int16 frame = kernel_anim[aa[4]].frame;
-	scratch.animation_info[4]._frame = frame;
+	aainfo[4]._frame = frame;
 
 	if (frame == 4) {
-		scratch.animation_info[4]._frame = 0;
+		aainfo[4]._frame = 0;
 		kernel_reset_animation(aa[4], 0);
 	}
 }
 
 static void room_304_anim6() {
-	if (kernel_anim[aa[5]].frame == scratch.animation_info[5]._frame)
+	if (kernel_anim[aa[5]].frame == aainfo[5]._frame)
 		return;
 
 	int16 frame = kernel_anim[aa[5]].frame;
-	scratch.animation_info[5]._frame = frame;
+	aainfo[5]._frame = frame;
 
 	if (frame == 2) {
-		scratch.animation_info[5]._frame = 0;
+		aainfo[5]._frame = 0;
 		kernel_reset_animation(aa[5], 0);
 	} else if (frame == 4) {
-		scratch.animation_info[5]._frame = 3;
+		aainfo[5]._frame = 3;
 		kernel_reset_animation(aa[5], 3);
 	}
 }
 
 static void room_304_daemon() {
 	switch (kernel.trigger) {
+	case 7:
+		switch (scratch._9e) {
+		case 1:
+			aainfo[3]._frame = 14;
+			kernel_reset_animation(aa[3], 14);
+			break;
+		case 2:
+			aainfo[3]._frame = 29;
+			kernel_reset_animation(aa[3], 29);
+			kernel_timing_trigger(70, 104);
+			break;
+		case 3:
+			aainfo[3]._frame = 45;
+			kernel_reset_animation(aa[3], 45);
+			break;
+		case 4:
+			aainfo[3]._frame = 51;
+			kernel_reset_animation(aa[3], 51);
+			kernel_timing_trigger(30, 104);
+			break;
+		case 5:
+			aainfo[3]._frame = 66;
+			kernel_reset_animation(aa[3], 66);
+			break;
+		case 6:
+			aainfo[1]._frame = 11;
+			kernel_reset_animation(aa[1], 11);
+			break;
+		case 7:
+			aainfo[3]._frame = 63;
+			kernel_reset_animation(aa[3], 63);
+			break;
+		case 8:
+		case 10:
+			aainfo[3]._frame = 10;
+			kernel_reset_animation(aa[3], 10);
+			break;
+		case 9:
+			global[walker_converse_state] = 0;
+			close_interface(CANDLE_FLY);
+			player.commands_allowed = -1;
+			if (config_file.forest1)
+				kernel_timing_trigger(1, 107);
+			break;
+		default:
+			break;
+		}
+		break;
+
 	case 8:
 		if (scratch._a0 == 4) {
 			digi_play_build(304, '_', 716, 2);
@@ -355,7 +403,7 @@ static void room_304_daemon() {
 	case 24:
 		if (scratch._8c == 2) {
 			aa[1] = kernel_run_animation(kernel_name('e', 1), 102);
-			scratch.animation_info[1]._active = -1;
+			aainfo[1]._active = -1;
 			scratch._96 = 2;
 			kernel_reset_animation(scratch._9a, 0);
 			kernel_synch(KERNEL_ANIM, aa[1], KERNEL_ANIM, scratch._9a);
@@ -374,11 +422,11 @@ static void room_304_daemon() {
 			global[g133] = 1;
 			dont_frag_the_palette();
 			kernel_abort_animation(aa[5]);
-			scratch.animation_info[5]._active = 0;
+			aainfo[5]._active = 0;
 			kernel_flip_hotspot(words_paint_can, false);
 			kernel_flip_hotspot(words_dam, false);
 			aa[3] = kernel_run_animation(kernel_name('e', 2), 103);
-			scratch.animation_info[3]._active = -1;
+			aainfo[3]._active = -1;
 			scratch._98 = 3;
 			kernel_timing_trigger(1, 107);
 		}
@@ -386,11 +434,11 @@ static void room_304_daemon() {
 
 	case 100:
 		kernel_abort_animation(aa[0]);
-		scratch.animation_info[0]._active = 0;
+		aainfo[0]._active = 0;
 		if (flags[18] == 1) {
 			aa[3] = kernel_run_animation(kernel_name('t', 1), 103);
-			scratch.animation_info[3]._active = -1;
-			scratch.animation_info[3]._frame = 0;
+			aainfo[3]._active = -1;
+			aainfo[3]._frame = 0;
 			scratch._98 = 1;
 			kernel_timing_trigger(1, 107);
 		} else if (global[g064]) {
@@ -403,8 +451,8 @@ static void room_304_daemon() {
 			global[g143] = 0;
 			kernel_synch(KERNEL_PLAYER, 0, KERNEL_NOW, 0);
 			aa[3] = kernel_run_animation(kernel_name('e', 1), 103);
-			scratch.animation_info[3]._active = -1;
-			scratch.animation_info[3]._frame = 0;
+			aainfo[3]._active = -1;
+			aainfo[3]._frame = 0;
 			scratch._98 = 8;
 			kernel_timing_trigger(1, 107);
 		}
@@ -412,7 +460,7 @@ static void room_304_daemon() {
 
 	case 101:
 		kernel_abort_animation(aa[scratch._94]);
-		scratch.animation_info[scratch._94]._active = 0;
+		aainfo[scratch._94]._active = 0;
 		kernel_reset_animation(scratch._9c, 1);
 		kernel_synch(KERNEL_ANIM, scratch._9c, KERNEL_NOW, 0);
 		global[g143] = 0;
@@ -422,7 +470,7 @@ static void room_304_daemon() {
 	case 102:
 		dont_frag_the_palette();
 		kernel_abort_animation(aa[1]);
-		scratch.animation_info[1]._active = 0;
+		aainfo[1]._active = 0;
 		if (scratch._96 == 2) {
 			global[g070] = -1;
 			display_journal();
@@ -436,32 +484,32 @@ static void room_304_daemon() {
 	case 103:
 		dont_frag_the_palette();
 		kernel_abort_animation(aa[3]);
-		scratch.animation_info[3]._active = 0;
+		aainfo[3]._active = 0;
 		switch (scratch._98) {
 		case 1:
 			room_304_restore();
 			break;
 		case 3:
 			aa[3] = kernel_run_animation(kernel_name('e', 3), 103);
-			scratch.animation_info[3]._active = -1;
-			scratch.animation_info[3]._frame = 0;
+			aainfo[3]._active = -1;
+			aainfo[3]._frame = 0;
 			scratch._98 = 4;
 			kernel_timing_trigger(1, 107);
 			break;
 		case 4:
 			dont_frag_the_palette();
 			kernel_abort_animation(aa[4]);
-			scratch.animation_info[4]._active = 0;
+			aainfo[4]._active = 0;
 			aa[3] = kernel_run_animation(kernel_name('e', 4), 103);
-			scratch.animation_info[3]._active = -1;
-			scratch.animation_info[3]._frame = 0;
+			aainfo[3]._active = -1;
+			aainfo[3]._frame = 0;
 			scratch._98 = 5;
 			kernel_timing_trigger(1, 107);
 			break;
 		case 5:
 			aa[3] = kernel_run_animation(kernel_name('e', 5), 103);
-			scratch.animation_info[3]._active = -1;
-			scratch.animation_info[3]._frame = 0;
+			aainfo[3]._active = -1;
+			aainfo[3]._frame = 0;
 			scratch._98 = 6;
 			kernel_timing_trigger(1, 107);
 			break;
@@ -472,8 +520,8 @@ static void room_304_daemon() {
 			player.walker_visible = false;
 			kernel_synch(KERNEL_PLAYER, 0, KERNEL_NOW, 0);
 			aa[3] = kernel_run_animation(kernel_name('b', 1), 103);
-			scratch.animation_info[3]._active = -1;
-			scratch.animation_info[3]._frame = 0;
+			aainfo[3]._active = -1;
+			aainfo[3]._frame = 0;
 			scratch._98 = 7;
 			kernel_timing_trigger(1, 107);
 			break;
@@ -507,11 +555,11 @@ static void room_304_daemon() {
 	case 104:
 		switch (scratch._9e) {
 		case 2:
-			scratch.animation_info[3]._frame = 37;
+			aainfo[3]._frame = 37;
 			kernel_reset_animation(aa[3], 37);
 			break;
 		case 4:
-			scratch.animation_info[3]._frame = 59;
+			aainfo[3]._frame = 59;
 			kernel_reset_animation(aa[3], 59);
 			break;
 		default:
@@ -520,7 +568,7 @@ static void room_304_daemon() {
 		break;
 
 	case 108:
-		scratch.animation_info[3]._frame = 25;
+		aainfo[3]._frame = 25;
 		kernel_reset_animation(aa[3], 25);
 		break;
 
@@ -531,12 +579,12 @@ static void room_304_daemon() {
 	global_anim1(9, scratch._9a, global[g131], &global[g132]);
 	global_anim2(3, scratch._9c, global[g141], &global[g142]);
 
-	if (scratch.animation_info[0]._active) room_304_anim1();
-	if (scratch.animation_info[3]._active) room_304_anim4();
-	if (scratch.animation_info[2]._active) room_304_anim3();
-	if (scratch.animation_info[1]._active) room_304_anim2();
-	if (scratch.animation_info[4]._active) room_304_anim5();
-	if (scratch.animation_info[5]._active) room_304_anim6();
+	if (aainfo[0]._active) room_304_anim1();
+	if (aainfo[3]._active) room_304_anim4();
+	if (aainfo[2]._active) room_304_anim3();
+	if (aainfo[1]._active) room_304_anim2();
+	if (aainfo[4]._active) room_304_anim5();
+	if (aainfo[5]._active) room_304_anim6();
 }
 
 static void room_304_pre_parser() {
@@ -584,7 +632,7 @@ void room_304_synchronize(Common::Serializer &s) {
 	for (int16 &v : scratch.sprite)    s.syncAsSint16LE(v);
 	for (int16 &v : scratch.sequence)  s.syncAsSint16LE(v);
 	for (int16 &v : scratch.animation) s.syncAsSint16LE(v);
-	for (auto &ai : scratch.animation_info) ai.synchronize(s);
+	for (auto &ai : aainfo) ai.synchronize(s);
 	s.syncAsSint16LE(scratch._8c);
 	s.syncAsSint16LE(scratch._8e);
 	s.syncAsSint16LE(scratch._90);


Commit: 5b49c762cdde93ef44fb87c115d0e6f357b376df
    https://github.com/scummvm/scummvm/commit/5b49c762cdde93ef44fb87c115d0e6f357b376df
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-06-28T21:48:12+10:00

Commit Message:
MADS: FOREST: Add inventory constants to room 308

Changed paths:
    engines/mads/madsv2/forest/rooms/room308.cpp


diff --git a/engines/mads/madsv2/forest/rooms/room308.cpp b/engines/mads/madsv2/forest/rooms/room308.cpp
index f572abb96b0..aaba2d2b23b 100644
--- a/engines/mads/madsv2/forest/rooms/room308.cpp
+++ b/engines/mads/madsv2/forest/rooms/room308.cpp
@@ -20,6 +20,7 @@
  */
 
 #include "mads/madsv2/forest/rooms/section3.h"
+#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"
@@ -864,13 +865,13 @@ static void room_308_anim22() {
 			global[walker_converse_state] = 0;
 			close_interface(CANDLE_FLY);
 		}
-		object_set_quality(5, -1, -1);
-		object_set_quality(1, -1, -1);
-		object_set_quality(15, -1, -1);
-		inter_move_object(1, NOWHERE);
-		inter_move_object(15, NOWHERE);
-		inter_move_object(4, PLAYER);
-		inter_move_object(14, PLAYER);
+		object_set_quality(pebbles, -1, -1);
+		object_set_quality(rubber_band, -1, -1);
+		object_set_quality(forked_stick, -1, -1);
+		inter_move_object(rubber_band, NOWHERE);
+		inter_move_object(forked_stick, NOWHERE);
+		inter_move_object(lily_pad, PLAYER);
+		inter_move_object(stick, PLAYER);
 		global[player_score] = -1;
 		new_room = 401;
 	}
@@ -891,11 +892,11 @@ static void room_308_anim23() {
 		digi_initial_volume(60);
 		digi_play_build(308, '_', 1, 2);
 	} else if (cur == 164) {
-		object_set_quality(5, -1, -1);
-		object_set_quality(1, -1, -1);
-		object_set_quality(15, -1, -1);
-		inter_move_object(4, PLAYER);
-		inter_move_object(14, PLAYER);
+		object_set_quality(pebbles, -1, -1);
+		object_set_quality(rubber_band, -1, -1);
+		object_set_quality(forked_stick, -1, -1);
+		inter_move_object(lily_pad, PLAYER);
+		inter_move_object(stick, PLAYER);
 		global[player_score] = -1;
 		if (global[g064] != 0)
 			new_room = 322;
@@ -947,24 +948,24 @@ static void room_308_anim25() {
 		digi_initial_volume(60);
 		digi_play_build(308, '_', 1, 2);
 	} else if (cur == 122) {
-		object_set_quality(5, -1, -1);
-		object_set_quality(1, -1, -1);
-		object_set_quality(15, -1, -1);
-		inter_move_object(1, NOWHERE);
-		inter_move_object(15, NOWHERE);
+		object_set_quality(pebbles, -1, -1);
+		object_set_quality(rubber_band, -1, -1);
+		object_set_quality(forked_stick, -1, -1);
+		inter_move_object(rubber_band, NOWHERE);
+		inter_move_object(forked_stick, NOWHERE);
 		kernel_timing_trigger(140, 112);
 	}
 }
 
 static void room_308_init() {
-	inter_move_object(4, NOWHERE);
-	inter_move_object(14, NOWHERE);
+	inter_move_object(lily_pad, NOWHERE);
+	inter_move_object(stick, NOWHERE);
 
 	if (!player_has_been_in_room(401)) {
 		if (previous_room == 307 || previous_room == 322) {
-			object_set_quality(5, 0, 0);
-			object_set_quality(1, 0, 0);
-			object_set_quality(15, 0, 0);
+			object_set_quality(pebbles, 0, 0);
+			object_set_quality(rubber_band, 0, 0);
+			object_set_quality(forked_stick, 0, 0);
 		}
 	}
 
@@ -1206,11 +1207,11 @@ static void room_308_daemon() {
 		break;
 
 	case 104:
-		object_set_quality(5, -1, -1);
-		object_set_quality(1, -1, -1);
-		object_set_quality(15, -1, -1);
-		inter_move_object(4, PLAYER);
-		inter_move_object(14, PLAYER);
+		object_set_quality(pebbles, -1, -1);
+		object_set_quality(rubber_band, -1, -1);
+		object_set_quality(forked_stick, -1, -1);
+		inter_move_object(lily_pad, PLAYER);
+		inter_move_object(stick, PLAYER);
 		global[player_score] = -1;
 		if (global[g064] != 0)
 			new_room = 322;
@@ -1250,8 +1251,8 @@ static void room_308_daemon() {
 		break;
 
 	case 112:
-		inter_move_object(4, PLAYER);
-		inter_move_object(14, PLAYER);
+		inter_move_object(lily_pad, PLAYER);
+		inter_move_object(stick, PLAYER);
 		global[player_score] = -1;
 		new_room = 401;
 		break;
@@ -1326,9 +1327,9 @@ static void room_308_parser() {
 
 	if (sel == 15 || sel == 1) {
 		inv_enable_command = false;
-		object_set_quality(1, 0, -1);
-		object_set_quality(15, 0, -1);
-		object_set_quality(5, 0, -1);
+		object_set_quality(rubber_band, 0, -1);
+		object_set_quality(forked_stick, 0, -1);
+		object_set_quality(pebbles, 0, -1);
 		scratch._b8 = 1;
 		aainfo[4]._val4 = 7;
 		aainfo[5]._val3 = 8;
@@ -1337,7 +1338,7 @@ static void room_308_parser() {
 
 	if (sel == 5) {
 		inv_enable_command = false;
-		object_set_quality(5, 0, -1);
+		object_set_quality(pebbles, 0, -1);
 		scratch._b8 = 0;
 		aainfo[4]._val4 = 6;
 		aainfo[5]._val3 = 8;




More information about the Scummvm-git-logs mailing list