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

dreammaster noreply at scummvm.org
Sun May 24 12:05:53 UTC 2026


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

Summary:
f682abd8c0 MADS: DRAGONSPHERE: Fixes for bedroom doorways


Commit: f682abd8c0107ce94738fc37a338716ee68263d6
    https://github.com/scummvm/scummvm/commit/f682abd8c0107ce94738fc37a338716ee68263d6
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-05-24T22:05:44+10:00

Commit Message:
MADS: DRAGONSPHERE: Fixes for bedroom doorways

Changed paths:
    engines/mads/madsv2/dragonsphere/mads/sounds.h
    engines/mads/madsv2/dragonsphere/mads/words.h
    engines/mads/madsv2/dragonsphere/rooms/room101.cpp
    engines/mads/madsv2/dragonsphere/rooms/room102.cpp
    engines/mads/madsv2/dragonsphere/rooms/room103.cpp


diff --git a/engines/mads/madsv2/dragonsphere/mads/sounds.h b/engines/mads/madsv2/dragonsphere/mads/sounds.h
index 29eeaf614ec..0a20ac83868 100644
--- a/engines/mads/madsv2/dragonsphere/mads/sounds.h
+++ b/engines/mads/madsv2/dragonsphere/mads/sounds.h
@@ -50,6 +50,7 @@ enum {
 	N_QueenMother        =  45,
 	N_WalkingMus         =  46,
 	N_RoyalDecreeMus     =  47,
+	N_ScoreIncreased     =  64,
 	N_TurnDiaryPage      =  65,
 	N_WallGrinds         =  67,
 	N_RushingWater       =  71,
diff --git a/engines/mads/madsv2/dragonsphere/mads/words.h b/engines/mads/madsv2/dragonsphere/mads/words.h
index e2e80e319d8..41c8190dfee 100644
--- a/engines/mads/madsv2/dragonsphere/mads/words.h
+++ b/engines/mads/madsv2/dragonsphere/mads/words.h
@@ -59,11 +59,11 @@ enum {
 	words_castle_walls         =  32,
 	words_book                 =  33,
 	words_fireplace            =  34,
-	words_queens_door          =  36,
+	words_door_to_queens_room  =  36,
 	words_fireplace_screen     =  35,
 	words_exit                 =  36,
 	words_walk_through         =  37,
-	words_hall_doorway         =  38,
+	words_hall_to_south        =  38,
 	words_walk_into            =  39,
 	words_wall_plaque          =  40,
 	words_decoration           =  41,
diff --git a/engines/mads/madsv2/dragonsphere/rooms/room101.cpp b/engines/mads/madsv2/dragonsphere/rooms/room101.cpp
index 25003a76ae9..62b718cd48e 100644
--- a/engines/mads/madsv2/dragonsphere/rooms/room101.cpp
+++ b/engines/mads/madsv2/dragonsphere/rooms/room101.cpp
@@ -26,6 +26,7 @@
 #include "mads/madsv2/core/sound.h"
 #include "mads/madsv2/core/text.h"
 #include "mads/madsv2/dragonsphere/global.h"
+#include "mads/madsv2/dragonsphere/mads/sounds.h"
 #include "mads/madsv2/dragonsphere/mads/words.h"
 #include "mads/madsv2/dragonsphere/rooms/section1.h"
 #include "mads/madsv2/dragonsphere/rooms/room101.h"
@@ -62,6 +63,8 @@ struct Scratch {
 	int16 suppress_command;     /* flag: -1 = silently consume next parser command (bed-exit interlock) */
 };
 
+Scratch scratch;
+
 #define local (&scratch)
 #define ss    local->sprite
 #define seq   local->sequence
@@ -140,8 +143,6 @@ struct Scratch {
 #define RANDOM_HIGHEST_NUMBER 6
 
 
-Scratch scratch;
-
 static void room_101_init() {
 	conv_get(0);
 
@@ -163,7 +164,7 @@ static void room_101_init() {
 
 	scratch.fireplace_examined = 0;
 
-	if (player.been_here_before == 0 || conv_restore_running == 0) {
+	if (!player.been_here_before || !conv_restore_running) {
 		scratch.king_action = 1;
 		player.walker_visible = 0;
 		player.commands_allowed = 0;
@@ -190,31 +191,30 @@ static void room_101_init() {
 		goto done;
 	}
 
-	// player.been_here_before != 0 && conv_restore_running != 0
 	if (previous_room == 103) {
-		player.x = 114;
-		player.y = 152;
+		player.x = START_X_ROOM_103;
+		player.y = START_Y_ROOM_103;
 		player.facing = 9;
 		seq[fx_door] = kernel_seq_stamp(ss[fx_door], 0, -1);
 		kernel_seq_depth(seq[fx_door], 12);
 		goto done;
 	}
 
-	if (previous_room != -2) {
+	if (previous_room != KERNEL_RESTORING_GAME) {
 		seq[fx_door] = kernel_seq_stamp(ss[fx_door], 0, -2);
 		kernel_seq_depth(seq[fx_door], 12);
-		player_first_walk(330, 126, 4, 4, 134, 297, 0);
-		player_walk_trigger(80);
+		player_first_walk(START_X_ROOM_102, START_Y_ROOM_102, FACING_WEST,
+			WALK_TO_X_FROM_102, WALK_TO_Y_FROM_102, FACING_WEST, 0);
+		player_walk_trigger(ROOM_101_DOOR_CLOSES);
 		goto done;
-	}
-
-	// previous_room == -2
-	seq[fx_door] = kernel_seq_stamp(ss[fx_door], 0, -1);
-	kernel_seq_depth(seq[fx_door], 12);
+	} else {
+		seq[fx_door] = kernel_seq_stamp(ss[fx_door], 0, -1);
+		kernel_seq_depth(seq[fx_door], 12);
 
-	if (scratch.king_action == 1) {
-		player.walker_visible = 0;
-		aa[1] = kernel_run_animation(kernel_name('C', -1), 0);
+		if (scratch.king_action == 1) {
+			player.walker_visible = 0;
+			aa[1] = kernel_run_animation(kernel_name('C', -1), 0);
+		}
 	}
 
 done:
@@ -384,7 +384,7 @@ static void room_101_daemon() {
 			break;
 		case 64:
 			global[player_score]++;
-			sound_play(64);
+			sound_play(N_ScoreIncreased);
 			break;
 		case 105:
 			text_show(10116);
@@ -411,27 +411,27 @@ static void room_101_daemon() {
 		}
 	}
 
-	if (kernel.trigger == 70) {
+	switch (kernel.trigger) {
+	case 70:
 		player.commands_allowed = true;
 		scratch.king_anim_mode = 0;
 		text_show(10140);
-	}
+		break;
 
-	switch (kernel.trigger) {
-	case 80:
+	case ROOM_101_DOOR_CLOSES:
 		kernel_seq_delete(seq[fx_door]);
-		sound_play(25);
-		seq[fx_door] = kernel_seq_backward(ss[fx_door], 0, 6, 1, 0, 0);
+		sound_play(N_DoorCloses);
+		seq[fx_door] = kernel_seq_backward(ss[fx_door], false, 6, 0, 0, 1);
 		kernel_seq_depth(seq[fx_door], 14);
 		kernel_seq_range(seq[fx_door], 1, 4);
 		kernel_seq_trigger(seq[fx_door], 0, 0, 81);
 		break;
 
-	case 81:
+	case ROOM_101_DOOR_CLOSES + 1:
 		scratch.prev_door_seq = seq[fx_door];
-		seq[fx_door] = kernel_seq_stamp(ss[fx_door], 0, -1);
+		seq[fx_door] = kernel_seq_stamp(ss[fx_door], false, KERNEL_FIRST);
 		kernel_seq_depth(seq[fx_door], 14);
-		kernel_synch(1, seq[fx_door], 1, scratch.prev_door_seq);
+		kernel_synch(KERNEL_SERIES, seq[fx_door], KERNEL_SERIES, scratch.prev_door_seq);
 		player.commands_allowed = true;
 		break;
 
@@ -517,7 +517,7 @@ static void process_conversation_queen() {
 	}
 }
 
-void room_101_parser() {
+static void room_101_parser() {
 	if (player.look_around) {
 		text_show(10101);
 		goto handled;
@@ -533,9 +533,9 @@ void room_101_parser() {
 		goto handled;
 	}
 
-	if (player_said_2(walk_through, queens_door) ||
-			player_said_2(open, queens_door) ||
-			player_said_2(pull, queens_door)) {
+	if (player_said_2(walk_through, door_to_queens_room) ||
+			player_said_2(open, door_to_queens_room) ||
+			player_said_2(pull, door_to_queens_room)) {
 		if (kernel_anim[aa[1]].anim != 0) goto done;
 		if (scratch.king_anim_mode == 3) goto done;
 		switch (kernel.trigger) {
@@ -549,7 +549,7 @@ void room_101_parser() {
 			goto handled;
 		case 1:
 			kernel_seq_delete(seq[fx_door]);
-			sound_play(24);
+			sound_play(N_DoorOpens);
 			seq[fx_door] = kernel_seq_forward(ss[fx_door], false, 7, 0, 0, 1);
 			kernel_seq_depth(seq[fx_door], 12);
 			kernel_seq_trigger(seq[fx_door], 0, 0, 2);
@@ -570,11 +570,11 @@ void room_101_parser() {
 		goto handled;
 	}
 
-	if (player_said_2(walk_through, exit)) {
-		if (kernel_anim[aa[1]].anim != 0) goto done;
-		if (scratch.king_anim_mode == 3) goto done;
-		new_room = 103;
-		goto handled;
+	if (player_said_2(walk_into, hall_to_south)) {
+		if (!kernel_anim[aa[0]].anim && scratch.king_anim_mode != 3) {
+			new_room = 103;
+			goto handled;
+		}
 	}
 
 	if (player_said_2(open, book)) {
@@ -677,7 +677,7 @@ void room_101_parser() {
 			text_show(10127);
 			goto handled;
 		}
-		if (player_said_1(hall_doorway)) {
+		if (player_said_1(hall_to_south)) {
 			text_show(10128);
 			goto handled;
 		}
@@ -705,7 +705,7 @@ void room_101_parser() {
 			text_show(10136);
 			goto handled;
 		}
-		if (player_said_1(queens_door)) {
+		if (player_said_1(door_to_queens_room)) {
 			text_show(10138);
 			goto handled;
 		}
@@ -746,7 +746,7 @@ void room_101_parser() {
 			text_show(10125);
 		goto handled;
 	}
-	if ((player_said_1(push) || player_said_1(pull)) && player_said_1(hall_doorway)) {
+	if ((player_said_1(push) || player_said_1(pull)) && player_said_1(hall_to_south)) {
 		if (kernel_anim[aa[1]].anim == 0 && scratch.king_anim_mode != 3)
 			text_show(10122);
 		goto handled;
diff --git a/engines/mads/madsv2/dragonsphere/rooms/room102.cpp b/engines/mads/madsv2/dragonsphere/rooms/room102.cpp
index 17ac6af5a28..4ba14504a8f 100644
--- a/engines/mads/madsv2/dragonsphere/rooms/room102.cpp
+++ b/engines/mads/madsv2/dragonsphere/rooms/room102.cpp
@@ -87,8 +87,6 @@ static Scratch scratch;
 #define DIARY1  1
 #define DIARY2  2
 
-// ---------------------------------------------------------------------------
-
 static void room_102_init() {
 	// Load sprite series (fx_reach_diaries / kgrh_9 is intentionally skipped)
 	ss[fx_diary1]      = kernel_load_series(kernel_name('p', 0), false);
@@ -217,7 +215,7 @@ static void room_102_daemon() {
 		case ROOM_102_DOOR_CLOSES + 1:
 			local->temp  = seq[fx_door];
 			seq[fx_door] = kernel_seq_stamp(ss[fx_door], false, KERNEL_FIRST);
-			kernel_seq_depth(seq[fx_door], KERNEL_LAST);
+			kernel_seq_depth(seq[fx_door], 14);
 			kernel_synch(KERNEL_SERIES, seq[fx_door], KERNEL_SERIES, local->temp);
 			player.commands_allowed = true;
 			break;
diff --git a/engines/mads/madsv2/dragonsphere/rooms/room103.cpp b/engines/mads/madsv2/dragonsphere/rooms/room103.cpp
index 5d980621557..3b028077b36 100644
--- a/engines/mads/madsv2/dragonsphere/rooms/room103.cpp
+++ b/engines/mads/madsv2/dragonsphere/rooms/room103.cpp
@@ -26,6 +26,7 @@
 #include "mads/madsv2/core/player.h"
 #include "mads/madsv2/core/sound.h"
 #include "mads/madsv2/dragonsphere/mads/sounds.h"
+#include "mads/madsv2/dragonsphere/mads/words.h"
 #include "mads/madsv2/core/text.h"
 #include "mads/madsv2/dragonsphere/global.h"
 #include "mads/madsv2/dragonsphere/rooms/section1.h"
@@ -42,6 +43,8 @@ struct Scratch {
 	int16 animation[4];  // aa[]  — animation handles (unused in room 103)
 };
 
+static Scratch scratch;
+
 #define local (&scratch)
 #define ss    local->sprite
 #define seq   local->sequence
@@ -59,7 +62,7 @@ struct Scratch {
 #define fx_fire_sconce_3    8  /* rm103y7 */
 #define fx_door_101         9  /* rm103x0 */
 #define fx_door_102        10  /* rm103x1 */
-#define fx_open_door       11  /* kgrd_8; aKgrd6+4 in disasm — TODO: confirm string */
+#define fx_open_door       11  /* kgrd_8 */
 
 /* ========================== Triggers ======================= */
 
@@ -88,9 +91,7 @@ struct Scratch {
 #define RIGHT_HALLWAY         320
 
 
-static Scratch scratch;
-
-void room_103_init() {
+static void room_103_init() {
 	kernel.disable_fastwalk = true;
 
 	// Load series in disassembly order: y0..y7, x0, x1, open_door
@@ -104,7 +105,7 @@ void room_103_init() {
 	ss[fx_fire_sconce_3]  = kernel_load_series(kernel_name('y', 7), 0);
 	ss[fx_door_101]       = kernel_load_series(kernel_name('x', 0), 0);
 	ss[fx_door_102]       = kernel_load_series(kernel_name('x', 1), 0);
-	ss[fx_open_door]      = kernel_load_series("kgrd_8", 0);
+	ss[fx_open_door]      = kernel_load_series("*kgrd_9", 0);
 
 	// Start ambient loops in disassembly order: y0..y7 with phase offsets
 	seq[fx_candle_flame_1] = kernel_seq_forward(ss[fx_candle_flame_1], false, 7, 0, 0, 0);
@@ -160,7 +161,7 @@ void room_103_init() {
 	section_1_music();
 }
 
-void room_103_daemon() {
+static void room_103_daemon() {
 	int16 temp;
 
 	switch (kernel.trigger) {
@@ -200,10 +201,10 @@ void room_103_daemon() {
 	}
 }
 
-void room_103_pre_parser() {
+static void room_103_pre_parser() {
 }
 
-void room_103_parser() {
+static void room_103_parser() {
 	int16 temp;
 
 	if (player.look_around) {
@@ -212,7 +213,9 @@ void room_103_parser() {
 		return;
 	}
 
-	if (player_parse(37, 245, 0) || player_parse(6, 245, 0) || player_parse(10, 245, 0)) {
+	if (player_said_2(walk_through, door_to_king_s_room) ||
+		player_said_2(open, door_to_king_s_room) ||
+		player_said_2(pull, door_to_king_s_room)) {
 		switch (kernel.trigger) {
 		case 0:
 			player.commands_allowed = false;




More information about the Scummvm-git-logs mailing list