[Scummvm-git-logs] scummvm master -> 1121310e3f152d45b61f9fc2778cd63e4b2187af
dreammaster
noreply at scummvm.org
Sun May 24 07:53:43 UTC 2026
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
86498a99a3 MADS: DRAGONSPHERE: Further room 101 cleanup
3803c7efef MADS: DRAGONSPHERE: Adding unique room 101 words to the words.h enum, parser cleanup
1121310e3f MADS: DRAGONSPHERE: Further room 101 fixes
Commit: 86498a99a37d22712f8bae43f121c599551380a4
https://github.com/scummvm/scummvm/commit/86498a99a37d22712f8bae43f121c599551380a4
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-05-24T17:53:31+10:00
Commit Message:
MADS: DRAGONSPHERE: Further room 101 cleanup
Changed paths:
engines/mads/madsv2/dragonsphere/mads/words.h
engines/mads/madsv2/dragonsphere/rooms/room101.cpp
diff --git a/engines/mads/madsv2/dragonsphere/mads/words.h b/engines/mads/madsv2/dragonsphere/mads/words.h
index 9fda1d1ce24..779ea420166 100644
--- a/engines/mads/madsv2/dragonsphere/mads/words.h
+++ b/engines/mads/madsv2/dragonsphere/mads/words.h
@@ -46,6 +46,7 @@ enum {
words_rug = 18,
words_carpet = 19,
words_wall = 20,
+ words_use = 21,
words_chest = 23,
words_window = 24,
words_tapestry = 26,
diff --git a/engines/mads/madsv2/dragonsphere/rooms/room101.cpp b/engines/mads/madsv2/dragonsphere/rooms/room101.cpp
index 7397afb1957..f4d221d1155 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/words.h"
#include "mads/madsv2/dragonsphere/rooms/section1.h"
#include "mads/madsv2/dragonsphere/rooms/room101.h"
@@ -141,7 +142,7 @@ struct Scratch {
static Scratch scratch;
-void room_101_init() {
+static void room_101_init() {
conv_get(0);
ss[fx_fire] = kernel_load_series(kernel_name('x', 0), 0);
@@ -282,249 +283,187 @@ static void room_101_anim2(int16 *ptr) {
*ptr = 'E';
}
-void room_101_daemon() {
- int16 var_4 = -1; // target frame for anim B (aa[0])
- int16 var_2 = -1; // target frame for anim C (aa[1])
- int frame_c = 0;
- int trig;
+static void room_101_daemon() {
+ int16 frame;
- // --- Block 1: Handle anim B (aa[0]) when queen_anim_mode == 1 (book) ---
- int bx = aa[0];
- if (kernel_anim[bx].anim != 0 && scratch.queen_anim_mode == 1) {
- if (kernel_anim[bx].frame != scratch.queen_prev_frame) {
- var_4 = -1;
- scratch.queen_prev_frame = kernel_anim[bx].frame;
+ if (kernel_anim[aa[0]].anim != 0 && scratch.queen_anim_mode == 1) {
+ if (kernel_anim[aa[0]].frame != scratch.queen_prev_frame) {
+ scratch.queen_prev_frame = kernel_anim[aa[0]].frame;
- if (kernel_anim[bx].frame - 9 == 0) {
+ if (kernel_anim[aa[0]].frame - 9 == 0) {
text_show(10107);
}
-
- if (var_4 >= 0 && kernel_anim[aa[0]].frame != var_4) {
- kernel_reset_animation(aa[0], var_4);
- scratch.queen_prev_frame = var_4;
- }
}
}
- // --- Block 2: Handle anim B (aa[0]) when queen_anim_mode == 2 (queen) ---
+ // Queen frame updates
if (scratch.queen_anim_mode == 2) {
- bx = aa[0];
- if (kernel_anim[bx].frame != scratch.queen_frame) {
- scratch.queen_frame = kernel_anim[bx].frame;
- var_4 = -1;
+ if (kernel_anim[aa[0]].frame != scratch.queen_frame) {
+ scratch.queen_frame = kernel_anim[aa[0]].frame;
if (scratch.pending_queen_action > 0) {
scratch.queen_action = scratch.pending_queen_action;
scratch.pending_queen_action = 0;
}
- int frame = scratch.queen_frame;
- if (frame == 69) {
- goto block_frame69;
- } else if (frame > 69) {
- goto block_frame_gt69;
- } else {
- // frame < 69
- frame -= 48;
- if (frame == 0) {
- // original frame was 48
+ frame = scratch.queen_frame;
+
+ if (frame < 69) {
+ if (frame == 48) {
if (scratch.queen_action == 1) {
scratch.queen_action = 3;
scratch.resume_conv = -1;
- var_4 = 'B';
+ frame = 66;
}
- } else {
- frame -= 18;
- if (frame == 0) {
- // original frame was 66
- if (scratch.queen_action == 2) {
- scratch.queen_action = 3;
- }
+ } else if (frame == 66) {
+ if (scratch.queen_action == 2) {
+ scratch.queen_action = 3;
}
- // else: default, fall through with var_4 == -1
}
+ } else if (frame == 69 || frame == 71) {
+ if (scratch.queen_action == 3 || scratch.queen_action == 4) {
+ if (scratch.resume_conv != 0) {
+ conv_run(0);
+ scratch.resume_conv = 0;
+ }
+ switch (scratch.queen_action) {
+ case 7:
+ player.commands_allowed = 0;
+ frame = 97;
+ break;
+ case 2:
+ frame = 48;
+ break;
+ case 5:
+ frame = 71;
+ break;
+ case 6:
+ room_101_anim1();
+ room_101_anim2(&frame);
+ break;
+ default:
+ break;
+ }
+ } else if (scratch.queen_action == 7) {
+ player.commands_allowed = 0;
+ frame = 97;
+ } else if (scratch.queen_action == 2) {
+ frame = 48;
+ } else if (scratch.queen_action == 5) {
+ frame = 71;
+ } else if (scratch.queen_action == 6) {
+ room_101_anim1();
+ room_101_anim2(&frame);
+ }
+ } else if (frame == 97) {
+ scratch.queen_action = 3;
+ frame = 66;
+ } else if (frame == 151) {
+ kernel_synch(1, seq[fx_door], 3, aa[0]);
+ player.commands_allowed = true;
+ scratch.queen_anim_mode = 0;
}
- // Apply var_4 to anim B if valid
- if (var_4 >= 0 && kernel_anim[aa[0]].frame != var_4) {
- kernel_reset_animation(aa[0], var_4);
- scratch.queen_frame = var_4;
+ // Change queen frame if valid new one set
+ if (frame >= 0 && kernel_anim[aa[0]].frame != frame) {
+ kernel_reset_animation(aa[0], frame);
+ scratch.queen_frame = frame;
}
}
}
- // --- Block 3: Handle anim C (aa[1]) when king_anim_mode == 3 ---
- bx = aa[1];
- if (kernel_anim[bx].anim == 0) goto check_trigger;
- if (scratch.king_anim_mode != 3) goto check_trigger;
- if (kernel_anim[bx].frame == scratch.king_frame) goto check_trigger;
+ // King frame updates
+ if (kernel_anim[aa[1]].anim != 0 &&
+ scratch.king_anim_mode == 3 &&
+ kernel_anim[aa[1]].frame != scratch.king_frame) {
- scratch.king_frame = kernel_anim[bx].frame;
- var_2 = -1;
+ scratch.king_frame = kernel_anim[aa[1]].frame;
+ frame = -1;
- if (scratch.pending_king_action > 0) {
- scratch.king_action = scratch.pending_king_action;
- scratch.pending_king_action = 0;
- }
+ if (scratch.pending_king_action > 0) {
+ scratch.king_action = scratch.pending_king_action;
+ scratch.pending_king_action = 0;
+ }
- frame_c = scratch.king_frame;
- switch (frame_c) {
- case 3:
- if (scratch.king_action == 1) var_2 = 0;
- if (scratch.king_action == 3) var_2 = 0x1D;
- break;
- case 29:
- conv_release();
- scratch.king_action = 1;
- var_2 = 0;
- break;
- case 64:
- global[player_score]++;
- sound_play(64);
- break;
- case 105:
- text_show(10116);
- break;
- case 148:
- seq[fx_draped_cape] = kernel_seq_stamp(ss[fx_draped_cape], 0, 8);
- kernel_seq_depth(seq[fx_draped_cape], 11);
- kernel_synch(1, seq[fx_draped_cape], 3, aa[1]);
- scratch.king_action = 0;
- player.x = 76;
- player.y = 100;
- player.walker_visible = -1;
- player_demand_facing(6);
- player_walk(109, 122, 3);
- player_walk_trigger(70);
- break;
- default:
- break;
- }
+ switch (scratch.king_frame) {
+ case 3:
+ if (scratch.king_action == 1)
+ frame = 0;
+ if (scratch.king_action == 3)
+ frame = 29;
+ break;
+ case 29:
+ conv_release();
+ scratch.king_action = 1;
+ frame = 0;
+ break;
+ case 64:
+ global[player_score]++;
+ sound_play(64);
+ break;
+ case 105:
+ text_show(10116);
+ break;
+ case 148:
+ seq[fx_draped_cape] = kernel_seq_stamp(ss[fx_draped_cape], 0, 8);
+ kernel_seq_depth(seq[fx_draped_cape], 11);
+ kernel_synch(1, seq[fx_draped_cape], 3, aa[1]);
+ scratch.king_action = 0;
+ player.x = 76;
+ player.y = 100;
+ player.walker_visible = true;
+ player_demand_facing(6);
+ player_walk(109, 122, 3);
+ player_walk_trigger(70);
+ break;
+ default:
+ break;
+ }
- // Apply var_2 to anim C if valid
- if (var_2 >= 0 && kernel_anim[aa[1]].frame != var_2) {
- kernel_reset_animation(aa[1], var_2);
- scratch.king_frame = var_2;
+ if (frame >= 0 && kernel_anim[aa[1]].frame != frame) {
+ kernel_reset_animation(aa[1], frame);
+ scratch.king_frame = frame;
+ }
}
-check_trigger:
- if (kernel.trigger == 'F') {
- player.commands_allowed = -1;
+ if (kernel.trigger == 70) {
+ player.commands_allowed = true;
scratch.king_anim_mode = 0;
text_show(10140);
}
- if (kernel.trigger < 'P') return;
-
- // trigger >= 'P' (0x50 = 80)
- trig = kernel.trigger - 80;
- if (trig == 0) {
- // trigger == 80: loc_3915E
+ switch (kernel.trigger) {
+ case 80:
kernel_seq_delete(seq[fx_door]);
sound_play(25);
seq[fx_door] = kernel_seq_backward(ss[fx_door], 0, 6, 1, 0, 0);
kernel_seq_depth(seq[fx_door], 14);
kernel_seq_range(seq[fx_door], 1, 4);
kernel_seq_trigger(seq[fx_door], 0, 0, 81);
- return;
- }
- if (trig == 1) {
- // trigger == 81: loc_391AA
+ break;
+
+ case 81:
scratch.prev_door_seq = seq[fx_door];
seq[fx_door] = kernel_seq_stamp(ss[fx_door], 0, -1);
kernel_seq_depth(seq[fx_door], 14);
kernel_synch(1, seq[fx_door], 1, scratch.prev_door_seq);
- player.commands_allowed = -1;
- return;
- }
-
- return;
-
- // --- frame == 69 block (called from block 2) ---
-block_frame69:
- if (scratch.queen_action == 3 || scratch.queen_action == 4) {
- if (scratch.resume_conv != 0) {
- conv_run(0);
- scratch.resume_conv = 0;
- }
- switch (scratch.queen_action) {
- case 7:
- player.commands_allowed = 0;
- var_4 = 'a';
- break;
- case 2:
- var_4 = '0';
- break;
- case 5:
- var_4 = 'G';
- break;
- case 6:
- room_101_anim1();
- room_101_anim2(&var_4);
- break;
- default:
- break;
- }
- } else if (scratch.queen_action == 7) {
- player.commands_allowed = 0;
- var_4 = 'a';
- } else if (scratch.queen_action == 2) {
- var_4 = '0';
- } else if (scratch.queen_action == 5) {
- var_4 = 'G';
- } else if (scratch.queen_action == 6) {
- room_101_anim1();
- room_101_anim2(&var_4);
- }
-
- // Apply var_4 and return to block 2 exit
- if (var_4 >= 0 && kernel_anim[aa[0]].frame != var_4) {
- kernel_reset_animation(aa[0], var_4);
- scratch.queen_frame = var_4;
- }
- return;
-
- // --- frame > 69 block ---
-block_frame_gt69:
- frame_c -= 0x47; // 'G'
- if (frame_c == 0) {
- // original was 'G' (71): loop back to frame69 block
- goto block_frame69;
- }
- frame_c -= 26;
- if (frame_c == 0) {
- // original was 97 ('a'): loc_3900C
- scratch.queen_action = 3;
- var_4 = 'B';
- goto apply_var4_and_continue;
- }
- frame_c -= 54;
- if (frame_c == 0) {
- // original was 177: loc_39016
- seq[fx_door] = kernel_seq_stamp(ss[fx_door], 0, -1);
- kernel_seq_depth(seq[fx_door], 14);
- kernel_synch(1, seq[fx_door], 3, aa[0]);
- player.commands_allowed = -1;
- scratch.queen_anim_mode = 0;
- }
- // fall through to apply var_4
+ player.commands_allowed = true;
+ break;
-apply_var4_and_continue:
- if (var_4 >= 0 && kernel_anim[aa[0]].frame != var_4) {
- kernel_reset_animation(aa[0], var_4);
- scratch.queen_frame = var_4;
+ default:
+ break;
}
}
-void room_101_pre_parser() {
- if (player_parse(3, 0) == 0 &&
- player_parse(30, 0) == 0 &&
- player_parse(9, 0) == 0 &&
- player_parse(8, 0) == 0 &&
- player_parse(7, 0) == 0 &&
- player_parse(12, 0) == 0 &&
+static void room_101_pre_parser() {
+ if (!player_said_1(look) &&
+ !player_said_1(look_at) &&
+ !player_said_1(give) &&
+ !player_said_1(talk_to) &&
+ !player_said_1(put) &&
+ !player_said_1(throw) &&
scratch.king_action == 1 &&
- player.need_to_walk != 0) {
+ player.need_to_walk) {
player.commands_allowed = 0;
player.ready_to_walk = 0;
scratch.pending_king_action = 3;
@@ -532,7 +471,7 @@ void room_101_pre_parser() {
scratch.suppress_command = -1;
}
- if (player_parse(47, 46, 0) != 0) {
+ if (player_said_2(invoke, signet_ring)) {
if (scratch.king_action == 1) {
player.commands_allowed = 0;
scratch.pending_king_action = 3;
@@ -669,14 +608,14 @@ void room_101_parser() {
global[player_score_flags] |= 2;
global[player_score] += 3;
}
- player.commands_allowed = -1;
+ player.commands_allowed = true;
goto handled;
}
goto handled;
}
// Look verbs: look(3), examine(30)
- if (player_parse(3, 0) || player_parse(30, 0)) {
+ if (player_said_1(look) || player_said_1(look_at)) {
if (player_parse(21, 0)) {
if (kernel_anim[aa[1]].anim != 0 && scratch.king_anim_mode == 3)
text_show(10139);
@@ -684,8 +623,14 @@ void room_101_parser() {
text_show(10102);
goto handled;
}
- if (player_parse(16, 0)) { text_show(10104); goto handled; }
- if (player_parse(33, 0)) { text_show(10105); goto handled; }
+ if (player_said_1(floor)) {
+ text_show(10104);
+ goto handled;
+ }
+ if (player_parse(33, 0)) {
+ text_show(10105);
+ goto handled;
+ }
if (player_parse(27, 0)) {
if (kernel_anim[aa[1]].anim != 0 && scratch.king_anim_mode == 3)
text_show(10108);
@@ -693,10 +638,22 @@ void room_101_parser() {
text_show(10109);
goto handled;
}
- if (player_parse(41, 0)) { text_show(10110); goto handled; }
- if (player_parse(40, 0)) { text_show(10111); goto handled; }
- if (player_parse(45, 0)) { text_show(10112); goto handled; }
- if (player_parse(329, 0)) { text_show(10113); goto handled; }
+ if (player_said_1(decoration)) {
+ text_show(10110);
+ goto handled;
+ }
+ if (player_said_1(wall_plaque)) {
+ text_show(10111);
+ goto handled;
+ }
+ if (player_parse(45, 0)) {
+ text_show(10112);
+ goto handled;
+ }
+ if (player_said_1(sconce)) {
+ text_show(10113);
+ goto handled;
+ }
if (player_parse(31, 0)) {
if (kernel_anim[aa[1]].anim != 0 && scratch.king_anim_mode == 3)
text_show(10114);
@@ -704,10 +661,22 @@ void room_101_parser() {
text_show(10115);
goto handled;
}
- if (player_parse(32, 0)) { text_show(10117); goto handled; }
- if (player_parse(34, 0)) { text_show(10118); goto handled; }
- if (player_parse(35, 0)) { text_show(10119); goto handled; }
- if (player_parse(38, 0)) { text_show(10121); goto handled; }
+ if (player_parse(32, 0)) {
+ text_show(10117);
+ goto handled;
+ }
+ if (player_said_1(fireplace)) {
+ text_show(10118);
+ goto handled;
+ }
+ if (player_said_1(fireplace_screen)) {
+ text_show(10119);
+ goto handled;
+ }
+ if (player_parse(38, 0)) {
+ text_show(10121);
+ goto handled;
+ }
if (player_parse(22, 0)) {
if ((kernel_anim[aa[1]].anim != 0 && scratch.king_anim_mode == 3) || scratch.fireplace_examined == 0) {
text_show(10123);
@@ -717,75 +686,98 @@ void room_101_parser() {
}
goto handled;
}
- if (player_parse(29, 0)) { text_show(10126); goto handled; }
- if (player_parse(44, 0)) { text_show(10127); goto handled; }
- if (player_parse(38, 0)) { text_show(10128); goto handled; } // dead code: noun 38 already matched above
- if (player_parse(18, 0)) { text_show(10129); goto handled; }
- if (player_parse(42, 0)) { text_show(10131); goto handled; }
- if (player_parse(25, 0)) { text_show(10133); goto handled; }
- if (player_parse(23, 0)) { text_show(10134); goto handled; }
- if (player_parse(273, 0) || player_parse(569, 0)) { text_show(10141); goto handled; }
- if (player_parse(24, 0)) { text_show(10136); goto handled; }
- if (player_parse(36, 0)) { text_show(10138); goto handled; }
+ if (player_parse(29, 0)) {
+ text_show(10126);
+ goto handled;
+ }
+ if (player_parse(44, 0)) {
+ text_show(10127);
+ goto handled;
+ }
+ if (player_parse(38, 0)) {
+ // dead code: noun 38 already matched above
+ text_show(10128);
+ goto handled;
+ }
+ if (player_said_1(rug)) {
+ text_show(10129);
+ goto handled;
+ }
+ if (player_parse(42, 0)) {
+ text_show(10131);
+ goto handled;
+ }
+ if (player_parse(25, 0)) {
+ text_show(10133);
+ goto handled;
+ }
+ if (player_said_1(chest)) {
+ text_show(10134);
+ goto handled;
+ }
+ if (player_said_1(crown) || player_parse(569, 0)) {
+ text_show(10141);
+ goto handled;
+ }
+ if (player_said_1(window)) {
+ text_show(10136);
+ goto handled;
+ }
+ if (player_parse(36, 0)) {
+ text_show(10138);
+ goto handled;
+ }
}
// Take/use/push/pull verbs â also reached by look fallthrough when no noun matched
- if ((player_parse(5, 0) || player_parse(10, 0)) && player_parse(21, 0)) {
- if (kernel_anim[aa[1]].anim != 0) goto handled;
- if (scratch.king_anim_mode == 3) goto handled;
- text_show(10103);
+ if ((player_said_1(push) || player_said_1(pull)) && player_parse(21, 0)) {
+ if (kernel_anim[aa[1]].anim == 0 && scratch.king_anim_mode != 3)
+ text_show(10103);
goto handled;
}
if (player_parse(4, 33, 0)) {
- if (kernel_anim[aa[1]].anim != 0) goto handled;
- if (scratch.king_anim_mode == 3) goto handled;
- text_show(10106);
+ if (kernel_anim[aa[1]].anim == 0 && scratch.king_anim_mode != 3)
+ text_show(10106);
goto handled;
}
- if ((player_parse(5, 0) || player_parse(10, 0)) && player_parse(35, 0)) {
- if (kernel_anim[aa[1]].anim != 0) goto handled;
- if (scratch.king_anim_mode == 3) goto handled;
- text_show(10120);
+ if ((player_said_1(push) || player_said_1(pull)) && player_said_1(fireplace_screen)) {
+ if (kernel_anim[aa[1]].anim == 0 && scratch.king_anim_mode != 3)
+ text_show(10120);
goto handled;
}
- if ((player_parse(4, 0) || player_parse(10, 0)) && player_parse(42, 0)) {
- if (kernel_anim[aa[1]].anim != 0) goto handled;
- if (scratch.king_anim_mode == 3) goto handled;
- text_show(10132);
+ if ((player_said_1(take) || player_said_1(pull)) && player_parse(42, 0)) {
+ if (kernel_anim[aa[1]].anim == 0 && scratch.king_anim_mode != 3)
+ text_show(10132);
goto handled;
}
- if (player_parse(6, 24, 0)) {
- if (kernel_anim[aa[1]].anim != 0) goto handled;
- if (scratch.king_anim_mode == 3) goto handled;
- text_show(10137);
+ if (player_said_2(open, window)) {
+ if (kernel_anim[aa[1]].anim == 0 && scratch.king_anim_mode != 3)
+ text_show(10137);
goto handled;
}
- if (player_parse(6, 23, 0)) {
- if (kernel_anim[aa[1]].anim != 0) goto handled;
- if (scratch.king_anim_mode == 3) goto handled;
- text_show(10135);
+ if (player_said_2(open, chest)) {
+ if (kernel_anim[aa[1]].anim == 0 && scratch.king_anim_mode != 3)
+ text_show(10135);
goto handled;
}
if (player_parse(6, 22, 0)) {
- if (kernel_anim[aa[1]].anim != 0) goto handled;
- if (scratch.king_anim_mode == 3) goto handled;
- text_show(10125);
+ if (kernel_anim[aa[1]].anim == 0 && scratch.king_anim_mode != 3)
+ text_show(10125);
goto handled;
}
- if ((player_parse(5, 0) || player_parse(10, 0)) && player_parse(38, 0)) {
- if (kernel_anim[aa[1]].anim != 0) goto handled;
- if (scratch.king_anim_mode == 3) goto handled;
- text_show(10122);
+ if ((player_said_1(push) || player_said_1(pull)) && player_parse(38, 0)) {
+ if (kernel_anim[aa[1]].anim == 0 && scratch.king_anim_mode != 3)
+ text_show(10122);
goto handled;
}
- if (player_parse(10, 18, 0)) {
+ if (player_said_2(pull, rug)) {
// Unlike other use-verb blocks, blocking here falls through rather than consuming command
if (kernel_anim[aa[1]].anim == 0 && scratch.king_anim_mode != 3) {
text_show(10130);
goto handled;
}
}
- if (player_parse(4, 569, 0) || player_parse(4, 273, 0)) {
+ if (player_parse(4, 569, 0) || player_said_2(take, crown)) {
text_show(10142);
goto handled;
}
Commit: 3803c7efefad365875076057d83e54cb779fabe2
https://github.com/scummvm/scummvm/commit/3803c7efefad365875076057d83e54cb779fabe2
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-05-24T17:53:32+10:00
Commit Message:
MADS: DRAGONSPHERE: Adding unique room 101 words to the words.h enum, parser cleanup
Changed paths:
engines/mads/madsv2/dragonsphere/mads/words.h
engines/mads/madsv2/dragonsphere/rooms/room101.cpp
diff --git a/engines/mads/madsv2/dragonsphere/mads/words.h b/engines/mads/madsv2/dragonsphere/mads/words.h
index 779ea420166..73a04c3d073 100644
--- a/engines/mads/madsv2/dragonsphere/mads/words.h
+++ b/engines/mads/madsv2/dragonsphere/mads/words.h
@@ -46,17 +46,30 @@ enum {
words_rug = 18,
words_carpet = 19,
words_wall = 20,
- words_use = 21,
+ words_bed = 21,
+ words_pillow = 22,
words_chest = 23,
words_window = 24,
+ words_nightstand = 25,
words_tapestry = 26,
+ words_dressing_screen = 27,
words_walk_behind = 28,
+ words_royal_crest = 29,
words_look_at = 30,
+ words_bedroom_wall = 31,
+ words_castle_walls = 32,
+ words_book = 33,
words_fireplace = 34,
+ words_queens_door = 36,
words_fireplace_screen = 35,
+ words_exit = 36,
words_walk_through = 37,
+ words_hall_doorway = 38,
words_wall_plaque = 40,
words_decoration = 41,
+ words_swords = 42,
+ words_bust = 44,
+ words_arch = 45,
words_signet_ring = 46,
words_invoke = 47,
words_polish = 48,
@@ -438,6 +451,7 @@ enum {
words_topiary_dragon = 566,
words_guardian = 567,
words_Butterfly_King = 568,
+ words_robe = 569,
words_Dragonsphere = 571,
words_path_to_Hightower = 572
};
diff --git a/engines/mads/madsv2/dragonsphere/rooms/room101.cpp b/engines/mads/madsv2/dragonsphere/rooms/room101.cpp
index f4d221d1155..cc00b02156c 100644
--- a/engines/mads/madsv2/dragonsphere/rooms/room101.cpp
+++ b/engines/mads/madsv2/dragonsphere/rooms/room101.cpp
@@ -140,7 +140,7 @@ struct Scratch {
#define RANDOM_HIGHEST_NUMBER 6
-static Scratch scratch;
+Scratch scratch;
static void room_101_init() {
conv_get(0);
@@ -149,7 +149,7 @@ static void room_101_init() {
ss[fx_fire_shadow] = kernel_load_series(kernel_name('x', 1), 0);
ss[fx_door] = kernel_load_series(kernel_name('x', 2), 0);
ss[fx_sconce_fire] = kernel_load_series(kernel_name('x', 3), 0);
- ss[fx_draped_cape] = kernel_load_series(kernel_name('a', 5), 0);
+ ss[fx_draped_cape] = kernel_load_series(kernel_name(97, 5), 0);
ss[fx_open_door] = kernel_load_series("*KGRD_6", 0);
seq[fx_fire] = kernel_seq_forward(ss[fx_fire], false, 7, 0, 0, 0);
@@ -178,7 +178,7 @@ static void room_101_init() {
scratch.queen_anim_mode = 2;
scratch.suppress_command = 0;
- aa[0] = kernel_run_animation(kernel_name('B', -1), 0);
+ aa[0] = kernel_run_animation(kernel_name(66, -1), 0);
if (conv_restore_running != 0) {
goto done;
@@ -254,12 +254,12 @@ static void room_101_anim2(int16 *ptr) {
if (target > scratch.tick_accum) {
if (scratch.queen_action == 7) {
player.commands_allowed = 0;
- } else if (scratch.queen_frame == 'E') {
- *ptr = 'B';
+ } else if (scratch.queen_frame == 69) {
+ *ptr = 66;
return;
}
- *ptr = 'E';
+ *ptr = 69;
return;
}
@@ -268,19 +268,19 @@ static void room_101_anim2(int16 *ptr) {
if (scratch.queen_action == 7) {
player.commands_allowed = 0;
- *ptr = 'a';
+ *ptr = 97;
return;
}
- if (scratch.queen_frame == 'E') {
+ if (scratch.queen_frame == 69) {
scratch.queen_action = 4;
} else {
- *ptr = 'B';
+ *ptr = 66;
scratch.queen_action = 3;
return;
}
- *ptr = 'E';
+ *ptr = 69;
}
static void room_101_daemon() {
@@ -308,23 +308,21 @@ static void room_101_daemon() {
frame = scratch.queen_frame;
- if (frame < 69) {
- if (frame == 48) {
- if (scratch.queen_action == 1) {
- scratch.queen_action = 3;
- scratch.resume_conv = -1;
- frame = 66;
- }
- } else if (frame == 66) {
- if (scratch.queen_action == 2) {
- scratch.queen_action = 3;
- }
+ if (frame == 48) {
+ if (scratch.queen_action == 1) {
+ scratch.queen_action = 3;
+ scratch.resume_conv = true;
+ frame = 66;
+ }
+ } else if (frame == 66) {
+ if (scratch.queen_action == 2) {
+ scratch.queen_action = 3;
}
} else if (frame == 69 || frame == 71) {
if (scratch.queen_action == 3 || scratch.queen_action == 4) {
- if (scratch.resume_conv != 0) {
+ if (scratch.resume_conv) {
conv_run(0);
- scratch.resume_conv = 0;
+ scratch.resume_conv = false;
}
switch (scratch.queen_action) {
case 7:
@@ -548,8 +546,9 @@ void room_101_parser() {
goto handled;
}
- // Door to queen's room: walk(37), open(6), use(10) + door(36)
- if (player_parse(37, 36, 0) || player_parse(6, 36, 0) || player_parse(10, 36, 0)) {
+ if (player_said_2(walk_through, queens_door) ||
+ player_said_2(open, queens_door) ||
+ player_said_2(pull, queens_door)) {
if (kernel_anim[aa[1]].anim != 0) goto done;
if (scratch.king_anim_mode == 3) goto done;
switch (kernel.trigger) {
@@ -584,22 +583,20 @@ void room_101_parser() {
goto handled;
}
- // Exit south to room 103: walk(39) + exit(38)
- if (player_parse(39, 38, 0)) {
+ 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;
}
- // Open/read book: open(6) + book(33)
- if (player_parse(6, 33, 0)) {
+ if (player_said_2(open, book)) {
switch (kernel.trigger) {
case 0:
player.commands_allowed = 0;
player.walker_visible = 0;
scratch.queen_anim_mode = 1;
- aa[0] = kernel_run_animation(kernel_name('A', -1), 1);
+ aa[0] = kernel_run_animation(kernel_name(97, -1), 1);
goto handled;
case 1:
player.walker_visible = -1;
@@ -614,9 +611,8 @@ void room_101_parser() {
goto handled;
}
- // Look verbs: look(3), examine(30)
if (player_said_1(look) || player_said_1(look_at)) {
- if (player_parse(21, 0)) {
+ if (player_said_1(bed)) {
if (kernel_anim[aa[1]].anim != 0 && scratch.king_anim_mode == 3)
text_show(10139);
else
@@ -627,11 +623,11 @@ void room_101_parser() {
text_show(10104);
goto handled;
}
- if (player_parse(33, 0)) {
+ if (player_said_1(book)) {
text_show(10105);
goto handled;
}
- if (player_parse(27, 0)) {
+ if (player_said_1(dressing_screen)) {
if (kernel_anim[aa[1]].anim != 0 && scratch.king_anim_mode == 3)
text_show(10108);
else
@@ -646,7 +642,7 @@ void room_101_parser() {
text_show(10111);
goto handled;
}
- if (player_parse(45, 0)) {
+ if (player_said_1(arch)) {
text_show(10112);
goto handled;
}
@@ -654,14 +650,14 @@ void room_101_parser() {
text_show(10113);
goto handled;
}
- if (player_parse(31, 0)) {
+ if (player_said_1(bedroom_wall)) {
if (kernel_anim[aa[1]].anim != 0 && scratch.king_anim_mode == 3)
text_show(10114);
else
text_show(10115);
goto handled;
}
- if (player_parse(32, 0)) {
+ if (player_said_1(castle_walls)) {
text_show(10117);
goto handled;
}
@@ -673,11 +669,11 @@ void room_101_parser() {
text_show(10119);
goto handled;
}
- if (player_parse(38, 0)) {
+ if (player_said_1(tapestry)) {
text_show(10121);
goto handled;
}
- if (player_parse(22, 0)) {
+ if (player_said_1(pillow)) {
if ((kernel_anim[aa[1]].anim != 0 && scratch.king_anim_mode == 3) || scratch.fireplace_examined == 0) {
text_show(10123);
scratch.fireplace_examined = -1;
@@ -686,16 +682,15 @@ void room_101_parser() {
}
goto handled;
}
- if (player_parse(29, 0)) {
+ if (player_said_1(royal_crest)) {
text_show(10126);
goto handled;
}
- if (player_parse(44, 0)) {
+ if (player_said_1(bust)) {
text_show(10127);
goto handled;
}
- if (player_parse(38, 0)) {
- // dead code: noun 38 already matched above
+ if (player_said_1(hall_doorway)) {
text_show(10128);
goto handled;
}
@@ -703,11 +698,11 @@ void room_101_parser() {
text_show(10129);
goto handled;
}
- if (player_parse(42, 0)) {
+ if (player_said_1(swords)) {
text_show(10131);
goto handled;
}
- if (player_parse(25, 0)) {
+ if (player_said_1(nightstand)) {
text_show(10133);
goto handled;
}
@@ -715,7 +710,7 @@ void room_101_parser() {
text_show(10134);
goto handled;
}
- if (player_said_1(crown) || player_parse(569, 0)) {
+ if (player_said_1(crown) || player_said_1(robe)) {
text_show(10141);
goto handled;
}
@@ -723,19 +718,18 @@ void room_101_parser() {
text_show(10136);
goto handled;
}
- if (player_parse(36, 0)) {
+ if (player_said_1(queens_door)) {
text_show(10138);
goto handled;
}
}
- // Take/use/push/pull verbs â also reached by look fallthrough when no noun matched
- if ((player_said_1(push) || player_said_1(pull)) && player_parse(21, 0)) {
+ if ((player_said_1(push) || player_said_1(pull)) && player_said_1(bed)) {
if (kernel_anim[aa[1]].anim == 0 && scratch.king_anim_mode != 3)
text_show(10103);
goto handled;
}
- if (player_parse(4, 33, 0)) {
+ if (player_said_2(take, book)) {
if (kernel_anim[aa[1]].anim == 0 && scratch.king_anim_mode != 3)
text_show(10106);
goto handled;
@@ -745,7 +739,7 @@ void room_101_parser() {
text_show(10120);
goto handled;
}
- if ((player_said_1(take) || player_said_1(pull)) && player_parse(42, 0)) {
+ if ((player_said_1(take) || player_said_1(pull)) && player_said_1(swords)) {
if (kernel_anim[aa[1]].anim == 0 && scratch.king_anim_mode != 3)
text_show(10132);
goto handled;
@@ -760,12 +754,12 @@ void room_101_parser() {
text_show(10135);
goto handled;
}
- if (player_parse(6, 22, 0)) {
+ if (player_said_2(open, pillow)) {
if (kernel_anim[aa[1]].anim == 0 && scratch.king_anim_mode != 3)
text_show(10125);
goto handled;
}
- if ((player_said_1(push) || player_said_1(pull)) && player_parse(38, 0)) {
+ if ((player_said_1(push) || player_said_1(pull)) && player_said_1(hall_doorway)) {
if (kernel_anim[aa[1]].anim == 0 && scratch.king_anim_mode != 3)
text_show(10122);
goto handled;
@@ -777,11 +771,11 @@ void room_101_parser() {
goto handled;
}
}
- if (player_parse(4, 569, 0) || player_said_2(take, crown)) {
+ if (player_said_2(take, robe) || player_said_2(take, crown)) {
text_show(10142);
goto handled;
}
- if (player_parse(28, 27, 0)) {
+ if (player_said_2(walk_behind, dressing_screen)) {
if (player.x == 76 && player.y == 100) {
text_show(10143);
goto handled;
@@ -795,9 +789,6 @@ done:
;
}
-void room_101_error() {
-}
-
void room_101_synchronize(Common::Serializer &s) {
for (int i = 0; i < 15; i++) s.syncAsSint16LE(local->sprite[i]);
for (int i = 0; i < 15; i++) s.syncAsSint16LE(local->sequence[i]);
Commit: 1121310e3f152d45b61f9fc2778cd63e4b2187af
https://github.com/scummvm/scummvm/commit/1121310e3f152d45b61f9fc2778cd63e4b2187af
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-05-24T17:53:32+10:00
Commit Message:
MADS: DRAGONSPHERE: Further room 101 fixes
Changed paths:
engines/mads/madsv2/dragonsphere/rooms/room101.cpp
diff --git a/engines/mads/madsv2/dragonsphere/rooms/room101.cpp b/engines/mads/madsv2/dragonsphere/rooms/room101.cpp
index cc00b02156c..25003a76ae9 100644
--- a/engines/mads/madsv2/dragonsphere/rooms/room101.cpp
+++ b/engines/mads/madsv2/dragonsphere/rooms/room101.cpp
@@ -178,16 +178,15 @@ static void room_101_init() {
scratch.queen_anim_mode = 2;
scratch.suppress_command = 0;
- aa[0] = kernel_run_animation(kernel_name(66, -1), 0);
+ aa[0] = kernel_run_animation(kernel_name('B', -1), 0);
- if (conv_restore_running != 0) {
- goto done;
+ if (!conv_restore_running) {
+ conv_run(0);
+ scratch.queen_action = 3;
+ scratch.king_action = 1;
+ kernel_reset_animation(aa[0], 69);
}
- conv_run(0);
- scratch.queen_action = 3;
- scratch.king_action = 1;
- kernel_reset_animation(aa[0], 69);
goto done;
}
@@ -254,6 +253,8 @@ static void room_101_anim2(int16 *ptr) {
if (target > scratch.tick_accum) {
if (scratch.queen_action == 7) {
player.commands_allowed = 0;
+ *ptr = 97;
+ return;
} else if (scratch.queen_frame == 69) {
*ptr = 66;
return;
@@ -324,24 +325,8 @@ static void room_101_daemon() {
conv_run(0);
scratch.resume_conv = false;
}
- switch (scratch.queen_action) {
- case 7:
- player.commands_allowed = 0;
- frame = 97;
- break;
- case 2:
- frame = 48;
- break;
- case 5:
- frame = 71;
- break;
- case 6:
- room_101_anim1();
- room_101_anim2(&frame);
- break;
- default:
- break;
- }
+ room_101_anim1();
+ room_101_anim2(&frame);
} else if (scratch.queen_action == 7) {
player.commands_allowed = 0;
frame = 97;
@@ -357,6 +342,8 @@ static void room_101_daemon() {
scratch.queen_action = 3;
frame = 66;
} else if (frame == 151) {
+ seq[fx_door] = kernel_seq_stamp(ss[fx_door], 0, -1);
+ kernel_seq_depth(seq[fx_door], 14);
kernel_synch(1, seq[fx_door], 3, aa[0]);
player.commands_allowed = true;
scratch.queen_anim_mode = 0;
More information about the Scummvm-git-logs
mailing list