[Scummvm-git-logs] scummvm master -> 20f6cc3eae81a825e7f3ea077839a06deda2b04e

dreammaster noreply at scummvm.org
Wed Jun 3 11:17:46 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:
fb9409e7c9 MADS: DRAGONSPHERE: Parser cleanup in room 116
20f6cc3eae MADS: DRAGONSPHERE: Fixes for rescuing king from ice


Commit: fb9409e7c924c53a6fcc0232afaa45647a910627
    https://github.com/scummvm/scummvm/commit/fb9409e7c924c53a6fcc0232afaa45647a910627
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-06-03T21:17:36+10:00

Commit Message:
MADS: DRAGONSPHERE: Parser cleanup in room 116

Changed paths:
    engines/mads/madsv2/dragonsphere/mads/conv.h
    engines/mads/madsv2/dragonsphere/rooms/room116.cpp
    engines/mads/madsv2/dragonsphere/rooms/room405.cpp


diff --git a/engines/mads/madsv2/dragonsphere/mads/conv.h b/engines/mads/madsv2/dragonsphere/mads/conv.h
index 173e1cc728f..559a9d968f8 100644
--- a/engines/mads/madsv2/dragonsphere/mads/conv.h
+++ b/engines/mads/madsv2/dragonsphere/mads/conv.h
@@ -417,10 +417,10 @@ enum {
 };
 
 enum {
-	conv044_repeater         =  0,
-	conv044_greet            =  2,
-	conv044_leave_b_b        =  7,
-	conv044_enter_b_b        =  9
+	conv044_greet            =  0,
+	conv044_repeater         =  2,
+	conv044_enter_b_b        =  7,
+	conv044_leave_b_b        =  9
 };
 
 enum {
diff --git a/engines/mads/madsv2/dragonsphere/rooms/room116.cpp b/engines/mads/madsv2/dragonsphere/rooms/room116.cpp
index 32927ceac90..d346f210b46 100644
--- a/engines/mads/madsv2/dragonsphere/rooms/room116.cpp
+++ b/engines/mads/madsv2/dragonsphere/rooms/room116.cpp
@@ -391,15 +391,15 @@ static void room_116_daemon() {
 }
 
 static void room_116_pre_parser() {
-	if (!player_parse(words_look, 0) &&
-	    !player_parse(words_push, words_king, 0) &&
-	    !player_parse(7, words_king, words_cave_floor, 0) &&
-	    !player_parse(words_pull, words_king, 0) &&
-	    !player_parse(words_take, words_king, 0) &&
-	    !player_parse(words_walk_to, words_king, 0) &&
+	if (!player_said_1(look) &&
+	    !player_said_2(push, king) &&
+	    !player_said_3(put, king, cave_floor) &&
+	    !player_said_2(pull, king) &&
+	    !player_said_2(take, king) &&
+	    !player_said_2(walk_to, king) &&
 	    (local->bear_status == FIRST_TIME_BEAR || local->bear_status == IS_A_BEAR_AGAIN) &&
 	    global[king_status] == KING_CAPTIVE &&
-	    (player.need_to_walk || player_parse(words_revert, 0))) {
+	    (player.need_to_walk || player_said_1(revert))) {
 
 		switch (kernel.trigger) {
 		case 0:
@@ -415,7 +415,7 @@ static void room_116_pre_parser() {
 			local->bear_status = IS_PID_AGAIN;
 			player.walker_visible = true;
 			player.commands_allowed = true;
-			if (!player_parse(words_revert, 0)) {
+			if (!player_said_1(revert)) {
 				player.ready_to_walk = true;
 			}
 			kernel_synch(KERNEL_PLAYER, 0, KERNEL_SERIES, seq[fx_bear_morph]);
@@ -423,7 +423,7 @@ static void room_116_pre_parser() {
 		}
 	}
 
-	if (player_parse(words_invoke_power_of, words_crystal_ball, 0)) {
+	if (player_said_2(invoke_power_of, crystal_ball)) {
 		if (local->bear_status == HAS_NEVER_BEEN_A_BEAR ||
 		    local->bear_status == IS_PID_AGAIN) {
 			if (global[king_status] == KING_CAPTIVE ||
@@ -466,7 +466,7 @@ static void room_116_parser() {
 		goto handled;
 	}
 
-	if (player_parse(words_revert, 0) &&
+	if (player_said_1(revert) &&
 	    (local->bear_status == FIRST_TIME_BEAR || local->bear_status == IS_A_BEAR_AGAIN)) {
 		goto handled;
 	}
@@ -476,7 +476,7 @@ static void room_116_parser() {
 		goto handled;
 	}
 
-	if (player_parse(words_talk_to, words_king, 0)) {
+	if (player_said_2(talk_to, king)) {
 		if (global[king_status] == KING_CAPTIVE) {
 			text_show(11626);
 		} else {
@@ -487,9 +487,9 @@ static void room_116_parser() {
 		goto handled;
 	}
 
-	if (player_parse(words_walk_through, words_door_to_north, 0) ||
-	    player_parse(words_open, words_door_to_north, 0) ||
-	    player_parse(words_pull, words_door_to_north, 0)) {
+	if (player_said_2(walk_through, door_to_north) ||
+	    player_said_2(open, door_to_north) ||
+	    player_said_2(pull, door_to_north)) {
 		switch (kernel.trigger) {
 		case 0:
 			player.commands_allowed = false;
@@ -555,9 +555,9 @@ static void room_116_parser() {
 		goto handled;
 	}
 
-	if (player_parse(words_walk_through, words_doorway_to_south, 0) ||
-			player_parse(words_open, words_doorway_to_south, 0) ||
-			player_parse(words_pull, words_doorway_to_south, 0)) {
+	if (player_said_2(walk_through, doorway_to_south) ||
+			player_said_2(open, doorway_to_south) ||
+			player_said_2(pull, doorway_to_south)) {
 		if (global[king_status] == KING_WITH_SOUL && !global[king_is_in_stairwell]) {
 			conv_run(CONVERSATION_WITH_KING);
 			conv_export_value(global[king_status] == KING_WITH_SOUL ? 1 : 0);
@@ -569,16 +569,16 @@ static void room_116_parser() {
 	}
 
 	// Can't shift into seal/snake while a bear
-	if ((player_parse(words_shift_into_seal, 0) || player_parse(words_shift_into_snake, 0)) &&
+	if ((player_said_1(shift_into_seal) || player_said_1(shift_into_snake)) &&
 	    (local->bear_status == FIRST_TIME_BEAR || local->bear_status == IS_A_BEAR_AGAIN)) {
 		text_show(990);
 		goto handled;
 	}
 
 	// Shift into bear / invoke crystal ball (bear transformation)
-	if (player_parse(words_shift_into_bear, 0) ||
-	    player_parse(words_invoke_power_of, words_crystal_ball, 0)) {
-		if (player_parse(words_shift_into_bear, 0) &&
+	if (player_said_1(shift_into_bear) ||
+	    player_said_2(invoke_power_of, crystal_ball)) {
+		if (player_said_1(shift_into_bear) &&
 				(local->bear_status == FIRST_TIME_BEAR || local->bear_status == IS_A_BEAR_AGAIN)) {
 			text_show(11629);
 			goto handled;
@@ -592,7 +592,7 @@ static void room_116_parser() {
 				break;
 
 			case 1:
-				if (player_parse(words_invoke_power_of, 0))
+				if (player_said_1(invoke_power_of))
 					sound_play(N_InvokeCrystalBall);
 
 				player.walker_visible = false;
@@ -606,7 +606,7 @@ static void room_116_parser() {
 			case 2:
 				local->temp = seq[fx_bear_morph];
 
-				if (player_parse(words_crystal_ball, 0)) {
+				if (player_said_1(crystal_ball)) {
 					aa[fx_open_door] = kernel_run_animation(kernel_name('a', -1), 0);
 					local->anim_2_running = true;
 					global[crystal_ball_dead] = true;
@@ -636,11 +636,11 @@ static void room_116_parser() {
 	}
 
 	// Bear grabs king / gives soul to king
-	if ((player_parse(words_push, words_king, 0) ||
-		player_parse(words_pull, words_king, 0) ||
-		player_parse(words_take, words_king, 0) ||
-		player_parse(words_put, words_king, words_cave_floor)) &&
-		global[king_status] == KING_CAPTIVE) {
+	if ((player_said_2(push, king) ||
+			player_said_2(pull, king) ||
+			player_said_2(take, king) ||
+			player_said_3(put, king, cave_floor)) &&
+			global[king_status] == KING_CAPTIVE) {
 		if (local->bear_status == HAS_NEVER_BEEN_A_BEAR) {
 			kernel_seq_delete(seq[fx_bear_morph]);
 			player.commands_allowed = false;
@@ -678,16 +678,16 @@ static void room_116_parser() {
 		goto handled;
 	}
 
-	if (player_parse(words_give, 82, words_king) ||
-			player_parse(words_invoke_power_of, words_crystal_ball) ||
-			player_parse(words_put, 82, words_king))  {
-		if ((player_parse(words_give, 82, words_king) || player_parse(words_put, 82, words_king)) &&
+	if (player_said_3(give, soul_egg, king) ||
+			player_said_2(invoke_power_of, crystal_ball) ||
+			player_said_3(put, soul_egg, king))  {
+		if ((player_said_3(give, soul_egg, king) || player_said_3(put, soul_egg, king)) &&
 				global[king_status] == KING_CAPTIVE) {
 			text_show(11630);
 		} else if (global[king_status] == KING_WITHOUT_SOUL) {
 			switch (kernel.trigger) {
 			case 0:
-				if (player_parse(words_crystal_ball, 0)) {
+				if (player_said_1(crystal_ball)) {
 					sound_play(N_InvokeCrystalBall);
 					kernel_timing_trigger(1, 3);
 				} else {
@@ -698,7 +698,7 @@ static void room_116_parser() {
 				break;
 
 			case 1:
-				if (!player_parse(words_crystal_ball, 0)) {
+				if (!player_said_1(crystal_ball)) {
 					player.walker_visible = false;
 					seq[fx_give_soul] = kernel_seq_pingpong(ss[fx_give_soul], -1, 8, 0, 0, 2);
 					kernel_seq_player(seq[fx_give_soul], -1);
@@ -717,7 +717,7 @@ static void room_116_parser() {
 				break;
 
 			case 3:
-				if (player_parse(109, 0)) {
+				if (player_said_1(crystal_ball)) {
 					text_show(11618);
 					inter_move_object(crystal_ball, NOWHERE);
 					text_show(970);
@@ -738,7 +738,7 @@ static void room_116_parser() {
 				break;
 
 			case 6:
-				if (!player_parse(crystal_ball, 0)) {
+				if (!player_said_1(crystal_ball)) {
 					inter_move_object(soul_egg, NOWHERE);
 					text_show(11614);
 				}
@@ -756,7 +756,7 @@ static void room_116_parser() {
 		goto handled;
 	}
 
-	if (player_parse(words_invoke, words_signet_ring, 0)) {
+	if (player_said_2(invoke, signet_ring)) {
 		if (global[king_status] == KING_WITH_SOUL && !global[king_is_in_stairwell]) {
 			conv_run(CONVERSATION_WITH_KING);
 			conv_export_value(global[king_status] == KING_WITH_SOUL ? 1 : 0);
@@ -769,73 +769,73 @@ static void room_116_parser() {
 		goto handled;
 	}
 
-	if (player_parse(words_look, 0) || player_parse(words_look_at, 0)) {
-		if (player_parse(words_cave_floor, 0)) {
+	if (player_said_1(look) || player_said_1(look_at)) {
+		if (player_said_1(cave_floor)) {
 			text_show(11602);
 			goto handled;
-		} else if (player_parse(words_cave_wall, 0)) {
+		} else if (player_said_1(cave_wall)) {
 			text_show(11603);
 			goto handled;
-		} else if (player_parse(229, 0)) {
+		} else if (player_said_1(pedestal)) {
 			text_show(global[king_status] == KING_CAPTIVE ? 11604 : 11609);
 			goto handled;
-		} else if (player_parse(words_door_to_north, 0)) {
+		} else if (player_said_1(door_to_north)) {
 			text_show(11605);
 			goto handled;
-		} else if (player_parse(words_doorway_to_south, 0)) {
+		} else if (player_said_1(doorway_to_south)) {
 			text_show(11606);
 			goto handled;
-		} else if (player_parse(words_king, 0) && global[king_status] == KING_CAPTIVE) {
+		} else if (player_said_1(king) && global[king_status] == KING_CAPTIVE) {
 			text_show(11607);
 			goto handled;
-		} else if (player_parse(words_king, 0) && global[king_status] == KING_OFF_ICE) {
+		} else if (player_said_1(king) && global[king_status] == KING_OFF_ICE) {
 			text_show(11610);
 			goto handled;
-		} else if (player_parse(words_king, 0) && conv_control.running != 13) {
+		} else if (player_said_1(king) && conv_control.running != 13) {
 			text_show(11611);
 			goto handled;
 		}
 	}
 
-	if (player_parse(words_gaze_into, words_crystal_ball, 0) && global[king_status] == KING_CAPTIVE) {
+	if (player_said_2(gaze_into, crystal_ball) && global[king_status] == KING_CAPTIVE) {
 		text_show(11615);
 		goto handled;
 	}
-	if (player_parse(words_gaze_into, words_crystal_ball, 0) && global[king_status] == KING_WITHOUT_SOUL) {
+	if (player_said_2(gaze_into, crystal_ball) && global[king_status] == KING_WITHOUT_SOUL) {
 		text_show(11616);
 		goto handled;
 	}
 
-	if (player_parse(words_close, words_door_to_north, 0)) {
+	if (player_said_2(close, door_to_north)) {
 		text_show(42);
 		goto handled;
 	}
 
-	if ((local->bear_status != FIRST_TIME_BEAR || local->bear_status != IS_A_BEAR_AGAIN) &&
-			!player_parse(words_look, 0) &&
-			!player_parse(words_take, 0) &&
-			!player_parse(words_push, 0) &&
-			!player_parse(words_open, 0) &&
-			!player_parse(words_put, 0) &&
-			!player_parse(words_talk_to, 0) &&
-			!player_parse(words_give, 0) &&
-			!player_parse(words_pull, 0) &&
-			!player_parse(words_close, 0) &&
-			!player_parse(words_throw, 0) &&
-			!player_parse(words_swim_to, 0) &&
-			!player_parse(words_swim_towards, 0)) {
+	if ((local->bear_status == FIRST_TIME_BEAR || local->bear_status == IS_A_BEAR_AGAIN) &&
+			!player_said_1(look) &&
+			!player_said_1(take) &&
+			!player_said_1(push) &&
+			!player_said_1(open) &&
+			!player_said_1(put) &&
+			!player_said_1(talk_to) &&
+			!player_said_1(give) &&
+			!player_said_1(pull) &&
+			!player_said_1(close) &&
+			!player_said_1(throw) &&
+			!player_said_1(swim_to) &&
+			!player_said_1(swim_towards)) {
 		text_show(32);
 		goto handled;
 	}
 
-	if (player_parse(words_heal, words_king) && global[king_status] != KING_WITH_SOUL) {
+	if (player_said_2(heal, king) && global[king_status] != KING_WITH_SOUL) {
 		text_show(11622);
 		goto handled;
 	}
 
-	if (player_parse(words_sword, words_attack, words_king, 0) ||
-			player_parse(words_sword, words_carve_up, words_king, 0) ||
-			player_parse(words_sword, words_thrust, words_king, 0)) {
+	if (player_said_3(sword, attack, king) ||
+			player_said_3(sword, carve_up, king) ||
+			player_said_3(sword, thrust, king)) {
 		if (global[king_status] == KING_CAPTIVE) {
 			text_show(11621);
 			goto handled;
diff --git a/engines/mads/madsv2/dragonsphere/rooms/room405.cpp b/engines/mads/madsv2/dragonsphere/rooms/room405.cpp
index 6282984f07d..8984a6cc692 100644
--- a/engines/mads/madsv2/dragonsphere/rooms/room405.cpp
+++ b/engines/mads/madsv2/dragonsphere/rooms/room405.cpp
@@ -1078,18 +1078,18 @@ static void process_conv_pid_guard() {
 	int me_trig_flag   = false;
 
 	switch (player_verb) {
-	case conv044_leave_b_b:
-		*conv_my_next_start = conv044_greet;
+	case conv044_enter_b_b:
+		*conv_my_next_start = conv044_repeater;
 		conv_abort();
-		local->pid_tent_action = LEAVE;
+		local->guard_action = OPEN_TENT;
 		you_trig_flag = true;
-		me_trig_flag  = true;
+		me_trig_flag = true;
 		break;
 
-	case conv044_enter_b_b:
-		*conv_my_next_start = conv044_repeater;
+	case conv044_leave_b_b:
+		*conv_my_next_start = conv044_greet;
 		conv_abort();
-		local->guard_action = OPEN_TENT;
+		local->pid_tent_action = LEAVE;
 		you_trig_flag = true;
 		me_trig_flag  = true;
 		break;


Commit: 20f6cc3eae81a825e7f3ea077839a06deda2b04e
    https://github.com/scummvm/scummvm/commit/20f6cc3eae81a825e7f3ea077839a06deda2b04e
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-06-03T21:17:36+10:00

Commit Message:
MADS: DRAGONSPHERE: Fixes for rescuing king from ice

Changed paths:
    engines/mads/madsv2/core/kernel.cpp
    engines/mads/madsv2/dragonsphere/rooms/room116.cpp


diff --git a/engines/mads/madsv2/core/kernel.cpp b/engines/mads/madsv2/core/kernel.cpp
index 2b30b0f0f28..401776fde6e 100644
--- a/engines/mads/madsv2/core/kernel.cpp
+++ b/engines/mads/madsv2/core/kernel.cpp
@@ -1805,15 +1805,14 @@ static void kernel_process_animation(int handle, int asynchronous) {
 
 				seg_id = image_list[id].segment_id;
 
-				// image_list[id].segment_id += KERNEL_SEGMENT_ANIMATION;
 				image_list[id].segment_id = (byte)(KERNEL_SEGMENT_ANIMATION + handle);
-				image_list[id].flags = series_list[image_list[id].series_id]->delta_series ? IMAGE_DELTA : IMAGE_UPDATE;
-				// if (kernel_anim[handle].anim->misc_any_packed) {
-				// if (image_list[id].series_id == (byte)kernel_anim[handle].anim->series_id[kernel_anim[handle].anim->misc_packed_series]) {
-				// series_id = image_list[id].series_id;
-				// sprite_data_load (series_list[series_id], image_list[id].sprite_id, series_list[series_id]->arena);
-				// }
-				// }
+				if (image_list[id].series_id < (SERIES_LIST_SIZE + SERIES_BONUS_SIZE) && series_list[image_list[id].series_id])
+					image_list[id].flags = series_list[image_list[id].series_id]->delta_series ? IMAGE_DELTA : IMAGE_UPDATE;
+				else
+					// WORKAROUND: For invalid series_id. This at least happens when rescuing the king from ice
+					// in Dragonsphere whilst in bear form - the series_id == 0xff
+					image_list[id].flags = IMAGE_ERASE;
+
 				if (hot >= 0) {
 					kernel_hot_check(hot, id, seg_id);
 				}
diff --git a/engines/mads/madsv2/dragonsphere/rooms/room116.cpp b/engines/mads/madsv2/dragonsphere/rooms/room116.cpp
index d346f210b46..347a79d569e 100644
--- a/engines/mads/madsv2/dragonsphere/rooms/room116.cpp
+++ b/engines/mads/madsv2/dragonsphere/rooms/room116.cpp
@@ -406,7 +406,7 @@ static void room_116_pre_parser() {
 			player.commands_allowed = false;
 			player.ready_to_walk = false;
 			kernel_seq_delete(seq[fx_bear_morph]);
-			seq[fx_bear_morph] = kernel_seq_backward(ss[fx_bear_morph], false, 8, 1, 0, 0);
+			seq[fx_bear_morph] = kernel_seq_backward(ss[fx_bear_morph], false, 8, 0, 0, 1);
 			kernel_seq_depth(seq[fx_bear_morph], 4);
 			kernel_seq_trigger(seq[fx_bear_morph], KERNEL_TRIGGER_EXPIRE, 0, 1);
 			break;
@@ -502,7 +502,7 @@ static void room_116_parser() {
 			}
 
 			player.walker_visible = false;
-			seq[fx_open_door] = kernel_seq_pingpong(ss[fx_open_door], false, 8, 2, 0, 0);
+			seq[fx_open_door] = kernel_seq_pingpong(ss[fx_open_door], false, 8, 0, 0, 2);
 			kernel_seq_player(seq[fx_open_door], -1);
 			kernel_seq_trigger(seq[fx_open_door], KERNEL_TRIGGER_SPRITE, 2, 1);
 			kernel_seq_trigger(seq[fx_open_door], KERNEL_TRIGGER_EXPIRE, 0, 3);
@@ -511,7 +511,7 @@ static void room_116_parser() {
 		case 1:
 			kernel_seq_delete(seq[fx_door]);
 			sound_play(N_DoorOpens);
-			seq[fx_open_door] = kernel_seq_forward(ss[fx_door], false, 7, 0, 0, 0);
+			seq[fx_open_door] = kernel_seq_forward(ss[fx_door], false, 7, 0, 0, 1);
 			kernel_seq_depth(seq[fx_door], 14);
 			kernel_seq_trigger(seq[fx_door], KERNEL_TRIGGER_EXPIRE, 0, 2);
 			break;
@@ -529,7 +529,7 @@ static void room_116_parser() {
 		case 4:
 			player_walk(START_X_ROOM_119, START_Y_ROOM_119, FACING_EAST);
 
-			if (global[king_status] == KING_WITH_SOUL && global[king_is_in_stairwell])
+			if (global[king_status] != KING_WITH_SOUL || global[king_is_in_stairwell])
 				player_walk_trigger(5);
 			break;
 		case 5:
@@ -637,11 +637,11 @@ static void room_116_parser() {
 
 	// Bear grabs king / gives soul to king
 	if ((player_said_2(push, king) ||
-			player_said_2(pull, king) ||
-			player_said_2(take, king) ||
-			player_said_3(put, king, cave_floor)) &&
-			global[king_status] == KING_CAPTIVE) {
-		if (local->bear_status == HAS_NEVER_BEEN_A_BEAR) {
+				player_said_2(pull, king) ||
+				player_said_2(take, king) ||
+				player_said_3(put, king, cave_floor)) &&
+				global[king_status] == KING_CAPTIVE) {
+		if (local->bear_status != HAS_NEVER_BEEN_A_BEAR) {
 			kernel_seq_delete(seq[fx_bear_morph]);
 			player.commands_allowed = false;
 			local->anim_2_running = true;
@@ -658,12 +658,12 @@ static void room_116_parser() {
 				player.walker_visible = false;
 				seq[fx_open_door] = kernel_seq_pingpong(ss[fx_open_door], 0, 9, 0, 0, 2);
 				kernel_seq_player(seq[fx_open_door], -1);
-				kernel_seq_trigger(seq[fx_open_door], 0, 0, 8);
+				kernel_seq_trigger(seq[fx_open_door], 0, 0, 2);
 				break;
 
 			case 2:
 				player.walker_visible = true;
-				kernel_synch(2, 0, 1, seq[fx_open_door]);
+				kernel_synch(KERNEL_PLAYER, 0, KERNEL_SERIES, seq[fx_open_door]);
 				kernel_timing_trigger(12, 3);
 				sound_play(N_GrabKing);
 				break;




More information about the Scummvm-git-logs mailing list