[Scummvm-git-logs] scummvm master -> 6878d3b44d85b9c0c5459150487c5b303f0219ce
dreammaster
noreply at scummvm.org
Sat Jun 6 22:22:54 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:
3a3d38bc9f MADS: FOREST: Implemented room 201
8d948d35db MADS: FOREST: Cleanup Scratch structs for pending rooms
6878d3b44d MADS: FOREST: Implemented room 203
Commit: 3a3d38bc9f82e6f7ea3ff233a0fe6e96a35bdfa5
https://github.com/scummvm/scummvm/commit/3a3d38bc9f82e6f7ea3ff233a0fe6e96a35bdfa5
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-06-07T08:21:16+10:00
Commit Message:
MADS: FOREST: Implemented room 201
Changed paths:
engines/mads/madsv2/forest/rooms/room201.cpp
diff --git a/engines/mads/madsv2/forest/rooms/room201.cpp b/engines/mads/madsv2/forest/rooms/room201.cpp
index 9fc82b87e5f..c34633d1139 100644
--- a/engines/mads/madsv2/forest/rooms/room201.cpp
+++ b/engines/mads/madsv2/forest/rooms/room201.cpp
@@ -1,4 +1,4 @@
-/* ScummVM - Graphic Adventure Engine
+/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
@@ -19,18 +19,15 @@
*
*/
-#include "mads/madsv2/core/conv.h"
+#include "mads/madsv2/core/digi.h"
#include "mads/madsv2/core/game.h"
-#include "mads/madsv2/core/imath.h"
#include "mads/madsv2/core/inter.h"
#include "mads/madsv2/core/kernel.h"
-#include "mads/madsv2/core/sound.h"
-#include "mads/madsv2/core/text.h"
-#include "mads/madsv2/forest/mads/inventory.h"
-#include "mads/madsv2/forest/mads/sounds.h"
-#include "mads/madsv2/forest/mads/words.h"
+#include "mads/madsv2/core/object.h"
+#include "mads/madsv2/core/player.h"
#include "mads/madsv2/forest/global.h"
-#include "mads/madsv2/forest/rooms/section1.h"
+#include "mads/madsv2/forest/journal.h"
+#include "mads/madsv2/forest/rooms/section2.h"
#include "mads/madsv2/forest/rooms/room201.h"
namespace MADS {
@@ -39,50 +36,663 @@ namespace Forest {
namespace Rooms {
struct Scratch {
- int16 sprite[15]; /* Sprite series handles */
- int16 sequence[15]; /* Sequence handles */
- int16 animation[4]; /* Animation handles */
-
- int16 dragon_frame; /* frame animation is on */
-
- int16 done_with_conv; /* T if done with conv */
- int16 prev_room;
+ int16 sprite[10]; /* 0x00 â sprite series handles */
+ int16 sequence[10]; /* 0x14 â sequence handles */
+ int16 animation[10]; /* 0x28 â animation handles */
+ AnimationInfo animation_info[10];/* 0x3C */
+ int16 _8c; /* 0x8C */
+ int16 _8e; /* 0x8E */
+ int16 _pad90; /* 0x90 */
+ int16 _92; /* 0x92 */
+ int16 _94; /* 0x94 â animation slot index for 'R' anim */
+ int16 _96; /* 0x96 â animation slot index for 'F' anim */
+ int16 _98; /* 0x98 */
+ int16 _9a; /* 0x9A â animation handle */
+ int16 _9c; /* 0x9C â animation handle */
+ int16 _pad9e; /* 0x9E */
+ int16 _a0; /* 0xA0 â talk animation handle */
+ int16 _a2; /* 0xA2 â animation handle for random-frame walk */
+ int16 _a4; /* 0xA4 */
+ int16 _a6; /* 0xA6 */
+ int16 _a8; /* 0xA8 */
+ int16 _aa; /* 0xAA â cached frame for anim5 */
+ int16 _ac; /* 0xAC */
+ int16 _ae; /* 0xAE â cached frame for anim6 */
+ int16 _b0; /* 0xB0 */
};
static Scratch scratch;
-#define local (&scratch)
-#define ss local->sprite
-#define seq local->sequence
-#define aa local->animation
+#define local (&scratch)
+#define ss local->sprite
+#define seq local->sequence
+#define aa local->animation
+#define aainfo scratch.animation_info
+
+
+static void room_201_init1() {
+ global[player_score] = -1;
+ global[g009] = -1;
+ global_digi_play(11);
+ global[g131] = 0;
+ global[g141] = 0;
+
+ if (object_is_here(12)) {
+ ss[0] = kernel_load_series(kernel_name('p', 2), 0);
+ seq[0] = kernel_seq_stamp(ss[0], false, KERNEL_FIRST);
+ kernel_seq_depth(seq[0], 2);
+ kernel_seq_loc(seq[0], 204, 153);
+ kernel_seq_scale(seq[0], 100);
+ } else {
+ kernel_flip_hotspot(93, false);
+ }
+
+ if (object_is_here(7)) {
+ ss[1] = kernel_load_series(kernel_name('p', 1), 0);
+ seq[1] = kernel_seq_stamp(ss[1], false, KERNEL_FIRST);
+ kernel_seq_depth(seq[1], 10);
+ kernel_seq_loc(seq[1], 46, 103);
+ kernel_seq_scale(seq[1], 69);
+ } else {
+ kernel_flip_hotspot(145, false);
+ }
+
+ scratch._9c = kernel_run_animation_disp('r', 1, 0);
+ kernel_position_anim(scratch._9c, 208, 116, 77, 7);
+ scratch._9a = kernel_run_animation_disp('e', 1, 0);
+ kernel_position_anim(scratch._9a, 186, 115, 76, 7);
+
+ if (previous_room != KERNEL_RESTORING_GAME) {
+ player.x = 155;
+ player.y = 115;
+ player.facing = 3;
+ }
+
+ switch (previous_room) {
+ case KERNEL_RESTORING_GAME:
+ global[g131] = -1;
+ global[g141] = -1;
+ kernel_reset_animation(scratch._9a, 2);
+ kernel_reset_animation(scratch._9c, 2);
+ global[g133] = 0;
+ global[g143] = 0;
+ return;
+ case 106:
+ aa[0] = kernel_run_animation(kernel_name('y', 1), 100);
+ aainfo[0]._val1 = -1;
+ scratch._92 = 65;
+ return;
+ case 203:
+ aa[0] = kernel_run_animation(kernel_name('y', 2), 100);
+ aainfo[0]._val1 = -1;
+ scratch._92 = 75;
+ return;
+ case 199:
+ global[g131] = -1;
+ global[g141] = -1;
+ kernel_reset_animation(scratch._9a, 2);
+ kernel_reset_animation(scratch._9c, 2);
+ global[g133] = 0;
+ global[g143] = 0;
+ restore_player();
+ player.commands_allowed = -1;
+ player.walker_visible = -1;
+ return;
+ default:
+ global[g131] = -1;
+ global[g141] = -1;
+ kernel_reset_animation(scratch._9a, 2);
+ kernel_reset_animation(scratch._9c, 2);
+ global[g133] = 0;
+ global[g143] = 0;
+ player.commands_allowed = -1;
+ player.walker_visible = -1;
+ return;
+ }
+}
+
+static void room_201_anim1() {
+ if (kernel_anim[aa[0]].frame != aainfo[0]._val2)
+ aainfo[0]._val2 = kernel_anim[aa[0]].frame;
+
+ if (global[player_hyperwalked] != -1)
+ return;
+
+ aainfo[0]._val2 = scratch._92 - 1;
+ kernel_reset_animation(aa[0], scratch._92 - 1);
+}
+
+static void room_201_anim2() {
+ if (kernel_anim[aa[0]].frame != aainfo[0]._val2)
+ aainfo[0]._val2 = kernel_anim[aa[0]].frame;
+
+ if (scratch._a4 != 0)
+ kernel_random_frame(scratch._a2, &global[g153], global[g156]);
+
+ if (scratch._a4 == 0)
+ return;
+
+ if (kernel.trigger != 7 && kernel.trigger != 28)
+ return;
+
+ switch (scratch._a4) {
+ case 1:
+ global[g156] = 0;
+ kernel_timing_trigger(10, 28);
+ scratch._a4 = 2;
+ return;
+ case 2:
+ kernel_abort_animation(scratch._a2);
+ scratch._a4 = -1;
+ player.commands_allowed = -1;
+ player.walker_visible = -1;
+ aainfo[1]._val1 = 0;
+ kernel_synch(KERNEL_PLAYER, 0, KERNEL_NOW, 0);
+ global[g131] = -1;
+ kernel_reset_animation(scratch._9a, 1);
+ kernel_synch(KERNEL_ANIM, scratch._9a, KERNEL_NOW, 0);
+ global[g133] = 0;
+ global[g143] = 0;
+ global[g017] = -1;
+ return;
+ default:
+ return;
+ }
+}
+
+static void room_201_anim3() {
+ if (kernel_anim[aa[3]].frame != aainfo[3]._val2)
+ aainfo[3]._val2 = kernel_anim[aa[3]].frame;
+ if (global[player_hyperwalked] == -1 && aainfo[3]._val2 <= 23) {
+ aainfo[3]._val2 = 23;
+ kernel_reset_animation(aa[3], 23);
+ kernel_synch(KERNEL_ANIM, aa[3], KERNEL_NOW, 0);
+ return;
+ }
+
+ if (global[player_hyperwalked] == -1 || aainfo[3]._val2 == 45) {
+ aainfo[3]._val2 = 44;
+ kernel_reset_animation(aa[3], 44);
+ kernel_synch(KERNEL_ANIM, aa[3], KERNEL_NOW, 0);
+ }
+}
+
+static void room_201_anim4() {
+ if (kernel_anim[aa[4]].frame != aainfo[4]._val2) {
+ aainfo[4]._val2 = kernel_anim[aa[4]].frame;
+ int16 frame = aainfo[4]._val2;
+
+ if (scratch._a8 == 1) {
+ if (frame == 10) {
+ if (aainfo[4]._val3 == 10) {
+ aainfo[4]._val2 = 9;
+ kernel_reset_animation(aa[4], 9);
+ }
+ } else if (frame <= 10) {
+ if (frame == 4) {
+ aainfo[4]._val3 = 9;
+ digi_play_build_ii('e', 2, 1);
+ scratch._a4 = 28;
+ } else if (frame == 8) {
+ if (aainfo[4]._val3 == 9) {
+ aainfo[4]._val2 = 4;
+ kernel_reset_animation(aa[4], 4);
+ }
+ }
+ }
+ } else if (scratch._a8 == 2) {
+ if (frame == 13) {
+ if (aainfo[4]._val3 == 10) {
+ aainfo[4]._val2 = 11;
+ kernel_reset_animation(aa[4], 11);
+ }
+ } else if (frame <= 13) {
+ if (frame == 5) {
+ aainfo[4]._val3 = 9;
+ digi_play_build_ii('e', 4, 1);
+ scratch._a4 = 450;
+ } else if (frame == 10) {
+ if (aainfo[4]._val3 == 9) {
+ aainfo[4]._val2 = 5;
+ kernel_reset_animation(aa[4], 5);
+ }
+ }
+ }
+ }
+ }
+
+ if (kernel.trigger != 7 && kernel.trigger != 28)
+ return;
+
+ switch (scratch._a4) {
+ case 28:
+ kernel_timing_trigger(30, 28);
+ aainfo[4]._val3 = 10;
+ scratch._a4 = 29;
+ return;
+ case 29:
+ aainfo[4]._val3 = 9;
+ aainfo[4]._val2 = 4;
+ kernel_reset_animation(aa[4], 4);
+ digi_play_build_ii('e', 10, 1);
+ scratch._a4 = 30;
+ return;
+ case 30:
+ aainfo[4]._val3 = 11;
+ aainfo[4]._val2 = 9;
+ kernel_reset_animation(aa[4], 9);
+ scratch._a4 = -1;
+ return;
+ case 450:
+ kernel_timing_trigger(30, 28);
+ aainfo[4]._val3 = 10;
+ scratch._a4 = 451;
+ return;
+ case 451:
+ aainfo[4]._val3 = 9;
+ aainfo[4]._val2 = 5;
+ kernel_reset_animation(aa[4], 5);
+ digi_play_build_ii('e', 10, 1);
+ scratch._a4 = 452;
+ return;
+ case 452:
+ aainfo[4]._val3 = 11;
+ aainfo[4]._val2 = 10;
+ kernel_reset_animation(aa[4], 10);
+ scratch._a4 = -1;
+ return;
+ default:
+ return;
+ }
+}
+
+static void room_201_anim5() {
+ if (kernel_anim[aa[3]].frame == scratch._aa)
+ return;
+
+ int16 var_2 = -1;
+ scratch._aa = kernel_anim[aa[3]].frame;
+
+ if (scratch._aa == 23)
+ digi_play_build(101, '_', 1, 2);
+
+ if (var_2 >= 0) {
+ kernel_reset_animation(aa[3], var_2);
+ scratch._aa = var_2;
+ }
+}
+
+static void room_201_anim6() {
+ if (kernel_anim[aa[3]].frame == scratch._ae)
+ return;
+
+ int16 var_2 = -1;
+ scratch._ae = kernel_anim[aa[3]].frame;
+
+ if (scratch._ae == 40)
+ digi_play_build(101, '_', 1, 2);
+
+ if (var_2 >= 0) {
+ kernel_reset_animation(aa[3], var_2);
+ scratch._ae = var_2;
+ }
+}
static void room_201_init() {
+ scratch._a6 = 0;
+ scratch._a4 = -1;
+
+ if (previous_room != KERNEL_RESTORING_GAME && previous_room != 199) {
+ player.walker_visible = 0;
+ player.commands_allowed = 0;
+ }
+
+ scratch._ac = 0;
+ scratch._b0 = 0;
+ for (int i = 0; i < 10; i++) {
+ aainfo[i]._val1 = 0;
+ aainfo[i]._val2 = 1;
+ aainfo[i]._val3 = 0;
+ aainfo[i]._val4 = 0;
+ }
+
+ if (previous_room != 199 && flags[7] != 3)
+ flags[7]++;
+
+ if (flags[7] == -3)
+ flags[7] = 1;
+ room_201_init1();
}
static void room_201_daemon() {
+ int16 trigger = kernel.trigger;
+
+ if (trigger == 106) {
+ kernel_abort_animation(aa[3]);
+ kernel_reset_animation(scratch._9c, 1);
+ scratch._b0 = 0;
+ kernel_synch(KERNEL_ANIM, scratch._9c, KERNEL_NOW, 0);
+ global[g143] = 0;
+ kernel_abort_animation(scratch._a2);
+ scratch._a6 = 0;
+ scratch._a4 = -1;
+ kernel_reset_animation(scratch._9a, 1);
+ kernel_synch(KERNEL_ANIM, scratch._9a, KERNEL_NOW, 0);
+ global[g133] = 0;
+ kernel_flip_hotspot(145, false);
+ inter_move_object(7, 2);
+ player.commands_allowed = -1;
+ } else if (trigger == 26) {
+ if (scratch._a8 == 1) {
+ kernel_reset_animation(scratch._9a, 0);
+ global[g133] = 1;
+ scratch._a2 = kernel_run_animation_talk('e', 2, 0);
+ kernel_position_anim(scratch._a2, 186, 115, 76, 7);
+ global[g156] = 2;
+ kernel_synch(KERNEL_ANIM, scratch._a2, KERNEL_ANIM, scratch._9a);
+ digi_play_build(201, 'E', 2, 1);
+ scratch._a4 = 1000;
+ scratch._a6 = -1;
+ } else if (scratch._a8 == 2) {
+ kernel_reset_animation(scratch._9a, 0);
+ global[g133] = 1;
+ scratch._a2 = kernel_run_animation_talk('e', 1, 0);
+ kernel_position_anim(scratch._a2, 186, 115, 76, 7);
+ global[g156] = 2;
+ kernel_synch(KERNEL_ANIM, scratch._a2, KERNEL_ANIM, scratch._9a);
+ digi_play_build(201, 'E', 3, 1);
+ scratch._a4 = 2000;
+ scratch._a6 = -1;
+ }
+ } else if (trigger > 26) {
+ if (trigger == 100) {
+ kernel_abort_animation(aa[0]);
+ aainfo[0]._val1 = 0;
+ if (flags[7] == 1) {
+ kernel_synch(KERNEL_PLAYER, 0, KERNEL_NOW, 0);
+ global[g141] = -1;
+ global[g017] = 0;
+ global[g154] = 0;
+ global[g143] = 0;
+ kernel_reset_animation(scratch._9c, 1);
+ kernel_synch(KERNEL_ANIM, scratch._9c, KERNEL_NOW, 0);
+ kernel_synch(KERNEL_ANIM, scratch._9a, KERNEL_NOW, 0);
+ global[g156] = 2;
+ global[g131] = -1;
+ player.walker_visible = -1;
+ aainfo[1]._val1 = -1;
+ global[g133] = 1;
+ scratch._a2 = kernel_run_animation_talk('e', 1, 0);
+ kernel_position_anim(scratch._a2, 186, 115, 76, 7);
+ kernel_synch(KERNEL_ANIM, scratch._a2, KERNEL_ANIM, scratch._9a);
+ kernel_synch(KERNEL_ANIM, scratch._a0, KERNEL_PLAYER, 0);
+ digi_play_build(201, 'e', 1, 1);
+ scratch._a4 = 1;
+ } else {
+ global[g131] = -1;
+ global[g141] = -1;
+ kernel_reset_animation(scratch._9a, 1);
+ kernel_synch(KERNEL_ANIM, scratch._9a, KERNEL_NOW, 0);
+ kernel_reset_animation(scratch._9c, 1);
+ kernel_synch(KERNEL_ANIM, scratch._9c, KERNEL_NOW, 0);
+ player.walker_visible = -1;
+ global[g133] = 0;
+ global[g143] = 0;
+ kernel_synch(KERNEL_PLAYER, 0, KERNEL_NOW, 0);
+ player.commands_allowed = -1;
+ }
+ } else if (trigger == 101) {
+ kernel_abort_animation(aa[scratch._94]);
+ aainfo[scratch._94]._val1 = 0;
+ kernel_reset_animation(scratch._9c, 1);
+ kernel_synch(KERNEL_ANIM, scratch._9c, KERNEL_NOW, 0);
+ global[g143] = 0;
+ player.commands_allowed = -1;
+ } else if (trigger == 102) {
+ kernel_abort_animation(aa[scratch._96]);
+ aainfo[scratch._96]._val1 = 0;
+ kernel_reset_animation(scratch._9a, 1);
+ kernel_synch(KERNEL_ANIM, scratch._9a, KERNEL_NOW, 0);
+ global[g133] = 0;
+ player.commands_allowed = -1;
+ } else if (trigger == 105) {
+ kernel_abort_animation(aa[3]);
+ kernel_reset_animation(scratch._9c, 1);
+ scratch._ac = 0;
+ kernel_synch(KERNEL_ANIM, scratch._9c, KERNEL_NOW, 0);
+ global[g143] = 0;
+ kernel_abort_animation(scratch._a2);
+ scratch._a6 = 0;
+ scratch._a4 = -1;
+ kernel_reset_animation(scratch._9a, 1);
+ kernel_synch(KERNEL_ANIM, scratch._9a, KERNEL_NOW, 0);
+ global[g133] = 0;
+ kernel_flip_hotspot(93, false);
+ inter_move_object(12, 2);
+ player.commands_allowed = -1;
+ }
+ } else if (trigger == 7) {
+ if (global[walker_converse_state] != 0) {
+ global[walker_converse_state] = 0;
+ close_journal(3);
+ player.commands_allowed = -1;
+ } else {
+ switch (scratch._a4) {
+ case 40:
+ kernel_abort_animation(scratch._a0);
+ scratch._a4 = -1;
+ scratch._a6 = 0;
+ kernel_synch(KERNEL_PLAYER, 0, KERNEL_NOW, 0);
+ player.walker_visible = -1;
+ global[g150] = -1;
+ scratch._a8 = 1;
+ break;
+ case 41:
+ kernel_abort_animation(scratch._a0);
+ scratch._a4 = -1;
+ scratch._a6 = 0;
+ kernel_synch(KERNEL_PLAYER, 0, KERNEL_NOW, 0);
+ player.walker_visible = -1;
+ global[g150] = -1;
+ scratch._a8 = 2;
+ break;
+ case 1000:
+ global[g156] = 0;
+ kernel_seq_delete(seq[0]);
+ kernel_reset_animation(scratch._9c, 0);
+ global[g143] = 1;
+ kernel_synch(KERNEL_ANIM, scratch._9c, KERNEL_NOW, 0);
+ aa[3] = kernel_run_animation(kernel_name('t', 1), 105);
+ scratch._ac = -1;
+ kernel_synch(KERNEL_ANIM, aa[3], KERNEL_NOW, 0);
+ break;
+ case 2000:
+ global[g156] = 0;
+ kernel_seq_delete(seq[1]);
+ kernel_reset_animation(scratch._9c, 0);
+ global[g143] = 1;
+ kernel_synch(KERNEL_ANIM, scratch._9c, KERNEL_NOW, 0);
+ aa[3] = kernel_run_animation(kernel_name('t', 2), 106);
+ scratch._b0 = -1;
+ kernel_synch(KERNEL_ANIM, aa[3], KERNEL_NOW, 0);
+ break;
+ default:
+ break;
+ }
+ }
+ } else if (trigger == 24) {
+ if (scratch._8c == 5) {
+ if (scratch._a8 == 1) {
+ aa[4] = kernel_run_animation(kernel_name('F', 1), 102);
+ aainfo[4]._val1 = -1;
+ scratch._96 = 4;
+ kernel_reset_animation(scratch._9a, 0);
+ kernel_synch(KERNEL_ANIM, aa[4], KERNEL_ANIM, scratch._9a);
+ global[g133] = 1;
+ } else if (scratch._a8 == 2) {
+ aa[4] = kernel_run_animation(kernel_name('F', 2), 102);
+ aainfo[4]._val1 = -1;
+ scratch._96 = 4;
+ kernel_reset_animation(scratch._9a, 0);
+ kernel_synch(KERNEL_ANIM, aa[4], KERNEL_ANIM, scratch._9a);
+ global[g133] = 1;
+ }
+ }
+ } else if (trigger == 25) {
+ if (scratch._8e == 2) {
+ aa[3] = kernel_run_animation(kernel_name('R', 1), 101);
+ aainfo[3]._val1 = -1;
+ scratch._94 = 3;
+ kernel_reset_animation(scratch._9c, 0);
+ kernel_synch(KERNEL_ANIM, aa[3], KERNEL_ANIM, scratch._9c);
+ global[g143] = 1;
+ }
+ }
+
+ if (scratch._a6 != 0) {
+ if (scratch._a4 == 40 || scratch._a4 == 41)
+ kernel_random_frame(scratch._a0, &global[g151], global[g154]);
+ else if (scratch._a4 == 1 || scratch._a4 == 2 || scratch._a4 == 1000 || scratch._a4 == 2000)
+ kernel_random_frame(scratch._a2, &global[g153], global[g156]);
+ }
+
+ global_anim1(1, scratch._9a, global[g131], &global[g132]);
+ global_anim2(1, scratch._9c, global[g141], &global[g142]);
+
+ if (aainfo[0]._val1 != 0) room_201_anim1();
+ if (aainfo[3]._val1 != 0) room_201_anim3();
+ if (aainfo[4]._val1 != 0) room_201_anim4();
+ if (aainfo[1]._val1 != 0) room_201_anim2();
+ if (scratch._ac != 0) room_201_anim5();
+ if (scratch._b0 != 0) room_201_anim6();
}
static void room_201_pre_parser() {
+ if (player_parse(13, 17, 0))
+ player.walk_off_edge_to_room = 106;
+ if (player_parse(13, 23, 0))
+ player.walk_off_edge_to_room = 203;
}
static void room_201_parser() {
+ if (global[walker_converse_state] != 0) {
+ player.commands_allowed = 0;
+ digi_play_build_ii('c', 1, 1);
+ player.command_ready = false;
+ return;
+ }
+
+ if (player_parse(93, 0)) {
+ global[g154] = 2;
+ player.commands_allowed = 0;
+ player.walker_visible = 0;
+ scratch._a0 = kernel_run_animation_talk(98, 3, 0);
+ kernel_position_anim(scratch._a0, player.x, player.y, player.scale, player.depth);
+ kernel_synch(KERNEL_ANIM, scratch._a0, KERNEL_PLAYER, 0);
+ digi_play_build_ii('b', 3, 1);
+ scratch._a4 = 40;
+ scratch._a6 = -1;
+ player.command_ready = false;
+ return;
+ }
+
+ if (player_parse(145, 0)) {
+ global[g154] = 2;
+ player.commands_allowed = 0;
+ player.walker_visible = 0;
+ scratch._a0 = kernel_run_animation_talk(98, 4, 0);
+ kernel_position_anim(scratch._a0, player.x, player.y, player.scale, player.depth);
+ kernel_synch(KERNEL_ANIM, scratch._a0, KERNEL_PLAYER, 0);
+ digi_play_build_ii('b', 3, 1);
+ scratch._a4 = 41;
+ scratch._a6 = -1;
+ player.command_ready = false;
+ return;
+ }
+
+ if (player_parse(114, 77, 0)) {
+ player.commands_allowed = 0;
+ global[g135] = -1;
+ scratch._8c = 5;
+ scratch._a8 = 1;
+ player.command_ready = false;
+ return;
+ }
+
+ if (player_parse(114, 103, 0)) {
+ player.commands_allowed = 0;
+ global[g135] = -1;
+ scratch._8c = 5;
+ scratch._a8 = 2;
+ player.command_ready = false;
+ return;
+ }
+
+ if (global[player_selected_object] >= 0) {
+ player.command_ready = false;
+ return;
+ }
+
+ if (player_parse(114, 116, 0)) {
+ player.commands_allowed = 0;
+ global[g145] = -1;
+ scratch._8e = 2;
+ player.command_ready = false;
+ return;
+ }
+
+ if (player_parse(99, 0)) {
+ player.commands_allowed = 0;
+ global[g135] = -1;
+ scratch._8c = 3;
+ player.command_ready = false;
+ return;
+ }
+
+ if (player_parse(78, 119, 0)) {
+ player.commands_allowed = 0;
+ global[g135] = -1;
+ scratch._8c = 3;
+ player.command_ready = false;
+ return;
+ }
}
void room_201_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 (AnimationInfo &ai : scratch.animation_info) ai.synchronize(s);
+ s.syncAsSint16LE(scratch._8c);
+ s.syncAsSint16LE(scratch._8e);
+ s.syncAsSint16LE(scratch._pad90);
+ s.syncAsSint16LE(scratch._92);
+ s.syncAsSint16LE(scratch._94);
+ s.syncAsSint16LE(scratch._96);
+ s.syncAsSint16LE(scratch._98);
+ s.syncAsSint16LE(scratch._9a);
+ s.syncAsSint16LE(scratch._9c);
+ s.syncAsSint16LE(scratch._pad9e);
+ s.syncAsSint16LE(scratch._a0);
+ s.syncAsSint16LE(scratch._a2);
+ s.syncAsSint16LE(scratch._a4);
+ s.syncAsSint16LE(scratch._a6);
+ s.syncAsSint16LE(scratch._a8);
+ s.syncAsSint16LE(scratch._aa);
+ s.syncAsSint16LE(scratch._ac);
+ s.syncAsSint16LE(scratch._ae);
+ s.syncAsSint16LE(scratch._b0);
}
void room_201_preload() {
- room_init_code_pointer = room_201_init;
+ room_init_code_pointer = room_201_init;
room_pre_parser_code_pointer = room_201_pre_parser;
- room_parser_code_pointer = room_201_parser;
- room_daemon_code_pointer = room_201_daemon;
-
- section_1_walker();
- section_1_interface();
+ room_parser_code_pointer = room_201_parser;
+ room_daemon_code_pointer = room_201_daemon;
+ section_2_walker();
+ section_2_interface();
+ player.walker_must_reload = true;
}
} // namespace Rooms
Commit: 8d948d35db2b0c4453458c3d2a8039ce5b6be477
https://github.com/scummvm/scummvm/commit/8d948d35db2b0c4453458c3d2a8039ce5b6be477
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-06-07T08:21:17+10:00
Commit Message:
MADS: FOREST: Cleanup Scratch structs for pending rooms
Changed paths:
engines/mads/madsv2/forest/rooms/room101.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/room211.cpp
engines/mads/madsv2/forest/rooms/room220.cpp
engines/mads/madsv2/forest/rooms/room221.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/room420.cpp
engines/mads/madsv2/forest/rooms/room501.cpp
engines/mads/madsv2/forest/rooms/room503.cpp
engines/mads/madsv2/forest/rooms/room509.cpp
engines/mads/madsv2/forest/rooms/room510.cpp
engines/mads/madsv2/forest/rooms/room520.cpp
engines/mads/madsv2/forest/rooms/room903.cpp
diff --git a/engines/mads/madsv2/forest/rooms/room101.cpp b/engines/mads/madsv2/forest/rooms/room101.cpp
index 156824d8b41..e37b7788ccc 100644
--- a/engines/mads/madsv2/forest/rooms/room101.cpp
+++ b/engines/mads/madsv2/forest/rooms/room101.cpp
@@ -77,6 +77,7 @@ static Scratch scratch;
#define aa scratch.animation
#define aainfo scratch.animation_info
+
static void room_101_init1() {
global[g009] = -1;
viewing_at_y = 22;
diff --git a/engines/mads/madsv2/forest/rooms/room203.cpp b/engines/mads/madsv2/forest/rooms/room203.cpp
index 7dba244347d..e4dd299ad51 100644
--- a/engines/mads/madsv2/forest/rooms/room203.cpp
+++ b/engines/mads/madsv2/forest/rooms/room203.cpp
@@ -39,14 +39,10 @@ namespace Forest {
namespace Rooms {
struct Scratch {
- int16 sprite[15]; /* Sprite series handles */
- int16 sequence[15]; /* Sequence handles */
- int16 animation[4]; /* Animation handles */
-
- int16 dragon_frame; /* frame animation is on */
-
- int16 done_with_conv; /* T if done with conv */
- int16 prev_room;
+ int16 sprite[10]; /* Sprite series handles */
+ int16 sequence[10]; /* Sequence handles */
+ int16 animation[10]; /* Animation handles */
+ AnimationInfo animation_info[10];
};
static Scratch scratch;
@@ -55,7 +51,7 @@ static Scratch scratch;
#define ss local->sprite
#define seq local->sequence
#define aa local->animation
-
+#define aainfo scratch.animation_info
static void room_203_init() {
}
diff --git a/engines/mads/madsv2/forest/rooms/room204.cpp b/engines/mads/madsv2/forest/rooms/room204.cpp
index a3265ab6f87..8ab1e7fbcd2 100644
--- a/engines/mads/madsv2/forest/rooms/room204.cpp
+++ b/engines/mads/madsv2/forest/rooms/room204.cpp
@@ -39,14 +39,10 @@ namespace Forest {
namespace Rooms {
struct Scratch {
- int16 sprite[15]; /* Sprite series handles */
- int16 sequence[15]; /* Sequence handles */
- int16 animation[4]; /* Animation handles */
-
- int16 dragon_frame; /* frame animation is on */
-
- int16 done_with_conv; /* T if done with conv */
- int16 prev_room;
+ int16 sprite[10]; /* Sprite series handles */
+ int16 sequence[10]; /* Sequence handles */
+ int16 animation[10]; /* Animation handles */
+ AnimationInfo animation_info[10];
};
static Scratch scratch;
@@ -55,6 +51,7 @@ static Scratch scratch;
#define ss local->sprite
#define seq local->sequence
#define aa local->animation
+#define aainfo scratch.animation_info
static void room_204_init() {
diff --git a/engines/mads/madsv2/forest/rooms/room205.cpp b/engines/mads/madsv2/forest/rooms/room205.cpp
index f0ba29ce313..0da27750430 100644
--- a/engines/mads/madsv2/forest/rooms/room205.cpp
+++ b/engines/mads/madsv2/forest/rooms/room205.cpp
@@ -39,14 +39,10 @@ namespace Forest {
namespace Rooms {
struct Scratch {
- int16 sprite[15]; /* Sprite series handles */
- int16 sequence[15]; /* Sequence handles */
- int16 animation[4]; /* Animation handles */
-
- int16 dragon_frame; /* frame animation is on */
-
- int16 done_with_conv; /* T if done with conv */
- int16 prev_room;
+ int16 sprite[10]; /* Sprite series handles */
+ int16 sequence[10]; /* Sequence handles */
+ int16 animation[10]; /* Animation handles */
+ AnimationInfo animation_info[10];
};
static Scratch scratch;
@@ -55,6 +51,7 @@ static Scratch scratch;
#define ss local->sprite
#define seq local->sequence
#define aa local->animation
+#define aainfo scratch.animation_info
static void room_205_init() {
diff --git a/engines/mads/madsv2/forest/rooms/room210.cpp b/engines/mads/madsv2/forest/rooms/room210.cpp
index ae17ec3faae..235c69f63df 100644
--- a/engines/mads/madsv2/forest/rooms/room210.cpp
+++ b/engines/mads/madsv2/forest/rooms/room210.cpp
@@ -39,14 +39,10 @@ namespace Forest {
namespace Rooms {
struct Scratch {
- int16 sprite[15]; /* Sprite series handles */
- int16 sequence[15]; /* Sequence handles */
- int16 animation[4]; /* Animation handles */
-
- int16 dragon_frame; /* frame animation is on */
-
- int16 done_with_conv; /* T if done with conv */
- int16 prev_room;
+ int16 sprite[10]; /* Sprite series handles */
+ int16 sequence[10]; /* Sequence handles */
+ int16 animation[10]; /* Animation handles */
+ AnimationInfo animation_info[10];
};
static Scratch scratch;
@@ -55,6 +51,7 @@ static Scratch scratch;
#define ss local->sprite
#define seq local->sequence
#define aa local->animation
+#define aainfo scratch.animation_info
static void room_210_init() {
diff --git a/engines/mads/madsv2/forest/rooms/room211.cpp b/engines/mads/madsv2/forest/rooms/room211.cpp
index 8173536b2dd..69b91185a8d 100644
--- a/engines/mads/madsv2/forest/rooms/room211.cpp
+++ b/engines/mads/madsv2/forest/rooms/room211.cpp
@@ -39,14 +39,10 @@ namespace Forest {
namespace Rooms {
struct Scratch {
- int16 sprite[15]; /* Sprite series handles */
- int16 sequence[15]; /* Sequence handles */
- int16 animation[4]; /* Animation handles */
-
- int16 dragon_frame; /* frame animation is on */
-
- int16 done_with_conv; /* T if done with conv */
- int16 prev_room;
+ int16 sprite[10]; /* Sprite series handles */
+ int16 sequence[10]; /* Sequence handles */
+ int16 animation[10]; /* Animation handles */
+ AnimationInfo animation_info[10];
};
static Scratch scratch;
@@ -55,6 +51,7 @@ static Scratch scratch;
#define ss local->sprite
#define seq local->sequence
#define aa local->animation
+#define aainfo scratch.animation_info
static void room_211_init() {
diff --git a/engines/mads/madsv2/forest/rooms/room220.cpp b/engines/mads/madsv2/forest/rooms/room220.cpp
index 83679c727bc..643c4b96747 100644
--- a/engines/mads/madsv2/forest/rooms/room220.cpp
+++ b/engines/mads/madsv2/forest/rooms/room220.cpp
@@ -39,14 +39,10 @@ namespace Forest {
namespace Rooms {
struct Scratch {
- int16 sprite[15]; /* Sprite series handles */
- int16 sequence[15]; /* Sequence handles */
- int16 animation[4]; /* Animation handles */
-
- int16 dragon_frame; /* frame animation is on */
-
- int16 done_with_conv; /* T if done with conv */
- int16 prev_room;
+ int16 sprite[10]; /* Sprite series handles */
+ int16 sequence[10]; /* Sequence handles */
+ int16 animation[10]; /* Animation handles */
+ AnimationInfo animation_info[10];
};
static Scratch scratch;
@@ -55,6 +51,7 @@ static Scratch scratch;
#define ss local->sprite
#define seq local->sequence
#define aa local->animation
+#define aainfo scratch.animation_info
static void room_220_init() {
diff --git a/engines/mads/madsv2/forest/rooms/room221.cpp b/engines/mads/madsv2/forest/rooms/room221.cpp
index 81bb0747d0a..74145af6669 100644
--- a/engines/mads/madsv2/forest/rooms/room221.cpp
+++ b/engines/mads/madsv2/forest/rooms/room221.cpp
@@ -39,14 +39,10 @@ namespace Forest {
namespace Rooms {
struct Scratch {
- int16 sprite[15]; /* Sprite series handles */
- int16 sequence[15]; /* Sequence handles */
- int16 animation[4]; /* Animation handles */
-
- int16 dragon_frame; /* frame animation is on */
-
- int16 done_with_conv; /* T if done with conv */
- int16 prev_room;
+ int16 sprite[10]; /* Sprite series handles */
+ int16 sequence[10]; /* Sequence handles */
+ int16 animation[10]; /* Animation handles */
+ AnimationInfo animation_info[10];
};
static Scratch scratch;
@@ -55,6 +51,7 @@ static Scratch scratch;
#define ss local->sprite
#define seq local->sequence
#define aa local->animation
+#define aainfo scratch.animation_info
static void room_221_init() {
diff --git a/engines/mads/madsv2/forest/rooms/room301.cpp b/engines/mads/madsv2/forest/rooms/room301.cpp
index bc879fa1355..85f0c82eade 100644
--- a/engines/mads/madsv2/forest/rooms/room301.cpp
+++ b/engines/mads/madsv2/forest/rooms/room301.cpp
@@ -39,14 +39,10 @@ namespace Forest {
namespace Rooms {
struct Scratch {
- int16 sprite[15]; /* Sprite series handles */
- int16 sequence[15]; /* Sequence handles */
- int16 animation[4]; /* Animation handles */
-
- int16 dragon_frame; /* frame animation is on */
-
- int16 done_with_conv; /* T if done with conv */
- int16 prev_room;
+ int16 sprite[10]; /* Sprite series handles */
+ int16 sequence[10]; /* Sequence handles */
+ int16 animation[10]; /* Animation handles */
+ AnimationInfo animation_info[10];
};
static Scratch scratch;
@@ -55,6 +51,7 @@ static Scratch scratch;
#define ss local->sprite
#define seq local->sequence
#define aa local->animation
+#define aainfo scratch.animation_info
static void room_301_init() {
diff --git a/engines/mads/madsv2/forest/rooms/room302.cpp b/engines/mads/madsv2/forest/rooms/room302.cpp
index fe16ebcf227..82a6e09a042 100644
--- a/engines/mads/madsv2/forest/rooms/room302.cpp
+++ b/engines/mads/madsv2/forest/rooms/room302.cpp
@@ -39,14 +39,10 @@ namespace Forest {
namespace Rooms {
struct Scratch {
- int16 sprite[15]; /* Sprite series handles */
- int16 sequence[15]; /* Sequence handles */
- int16 animation[4]; /* Animation handles */
-
- int16 dragon_frame; /* frame animation is on */
-
- int16 done_with_conv; /* T if done with conv */
- int16 prev_room;
+ int16 sprite[10]; /* Sprite series handles */
+ int16 sequence[10]; /* Sequence handles */
+ int16 animation[10]; /* Animation handles */
+ AnimationInfo animation_info[10];
};
static Scratch scratch;
@@ -55,6 +51,7 @@ static Scratch scratch;
#define ss local->sprite
#define seq local->sequence
#define aa local->animation
+#define aainfo scratch.animation_info
static void room_302_init() {
diff --git a/engines/mads/madsv2/forest/rooms/room303.cpp b/engines/mads/madsv2/forest/rooms/room303.cpp
index 6d476f668ff..abb32340a3c 100644
--- a/engines/mads/madsv2/forest/rooms/room303.cpp
+++ b/engines/mads/madsv2/forest/rooms/room303.cpp
@@ -39,14 +39,10 @@ namespace Forest {
namespace Rooms {
struct Scratch {
- int16 sprite[15]; /* Sprite series handles */
- int16 sequence[15]; /* Sequence handles */
- int16 animation[4]; /* Animation handles */
-
- int16 dragon_frame; /* frame animation is on */
-
- int16 done_with_conv; /* T if done with conv */
- int16 prev_room;
+ int16 sprite[10]; /* Sprite series handles */
+ int16 sequence[10]; /* Sequence handles */
+ int16 animation[10]; /* Animation handles */
+ AnimationInfo animation_info[10];
};
static Scratch scratch;
@@ -55,6 +51,7 @@ static Scratch scratch;
#define ss local->sprite
#define seq local->sequence
#define aa local->animation
+#define aainfo scratch.animation_info
static void room_303_init() {
diff --git a/engines/mads/madsv2/forest/rooms/room304.cpp b/engines/mads/madsv2/forest/rooms/room304.cpp
index 105c64b1714..0cbdeae59d8 100644
--- a/engines/mads/madsv2/forest/rooms/room304.cpp
+++ b/engines/mads/madsv2/forest/rooms/room304.cpp
@@ -39,14 +39,10 @@ namespace Forest {
namespace Rooms {
struct Scratch {
- int16 sprite[15]; /* Sprite series handles */
- int16 sequence[15]; /* Sequence handles */
- int16 animation[4]; /* Animation handles */
-
- int16 dragon_frame; /* frame animation is on */
-
- int16 done_with_conv; /* T if done with conv */
- int16 prev_room;
+ int16 sprite[10]; /* Sprite series handles */
+ int16 sequence[10]; /* Sequence handles */
+ int16 animation[10]; /* Animation handles */
+ AnimationInfo animation_info[10];
};
static Scratch scratch;
@@ -55,6 +51,7 @@ static Scratch scratch;
#define ss local->sprite
#define seq local->sequence
#define aa local->animation
+#define aainfo scratch.animation_info
static void room_304_init() {
diff --git a/engines/mads/madsv2/forest/rooms/room305.cpp b/engines/mads/madsv2/forest/rooms/room305.cpp
index b789bcd6474..a3369107f8d 100644
--- a/engines/mads/madsv2/forest/rooms/room305.cpp
+++ b/engines/mads/madsv2/forest/rooms/room305.cpp
@@ -39,14 +39,10 @@ namespace Forest {
namespace Rooms {
struct Scratch {
- int16 sprite[15]; /* Sprite series handles */
- int16 sequence[15]; /* Sequence handles */
- int16 animation[4]; /* Animation handles */
-
- int16 dragon_frame; /* frame animation is on */
-
- int16 done_with_conv; /* T if done with conv */
- int16 prev_room;
+ int16 sprite[10]; /* Sprite series handles */
+ int16 sequence[10]; /* Sequence handles */
+ int16 animation[10]; /* Animation handles */
+ AnimationInfo animation_info[10];
};
static Scratch scratch;
@@ -55,6 +51,7 @@ static Scratch scratch;
#define ss local->sprite
#define seq local->sequence
#define aa local->animation
+#define aainfo scratch.animation_info
static void room_305_init() {
diff --git a/engines/mads/madsv2/forest/rooms/room306.cpp b/engines/mads/madsv2/forest/rooms/room306.cpp
index 27fbacdc6cb..44c11f19ac9 100644
--- a/engines/mads/madsv2/forest/rooms/room306.cpp
+++ b/engines/mads/madsv2/forest/rooms/room306.cpp
@@ -39,14 +39,10 @@ namespace Forest {
namespace Rooms {
struct Scratch {
- int16 sprite[15]; /* Sprite series handles */
- int16 sequence[15]; /* Sequence handles */
- int16 animation[4]; /* Animation handles */
-
- int16 dragon_frame; /* frame animation is on */
-
- int16 done_with_conv; /* T if done with conv */
- int16 prev_room;
+ int16 sprite[10]; /* Sprite series handles */
+ int16 sequence[10]; /* Sequence handles */
+ int16 animation[10]; /* Animation handles */
+ AnimationInfo animation_info[10];
};
static Scratch scratch;
@@ -55,6 +51,7 @@ static Scratch scratch;
#define ss local->sprite
#define seq local->sequence
#define aa local->animation
+#define aainfo scratch.animation_info
static void room_306_init() {
diff --git a/engines/mads/madsv2/forest/rooms/room307.cpp b/engines/mads/madsv2/forest/rooms/room307.cpp
index 409ed029d8b..04f7f2dd846 100644
--- a/engines/mads/madsv2/forest/rooms/room307.cpp
+++ b/engines/mads/madsv2/forest/rooms/room307.cpp
@@ -39,14 +39,10 @@ namespace Forest {
namespace Rooms {
struct Scratch {
- int16 sprite[15]; /* Sprite series handles */
- int16 sequence[15]; /* Sequence handles */
- int16 animation[4]; /* Animation handles */
-
- int16 dragon_frame; /* frame animation is on */
-
- int16 done_with_conv; /* T if done with conv */
- int16 prev_room;
+ int16 sprite[10]; /* Sprite series handles */
+ int16 sequence[10]; /* Sequence handles */
+ int16 animation[10]; /* Animation handles */
+ AnimationInfo animation_info[10];
};
static Scratch scratch;
@@ -55,6 +51,7 @@ static Scratch scratch;
#define ss local->sprite
#define seq local->sequence
#define aa local->animation
+#define aainfo scratch.animation_info
static void room_307_init() {
diff --git a/engines/mads/madsv2/forest/rooms/room308.cpp b/engines/mads/madsv2/forest/rooms/room308.cpp
index 8555f6dbd6d..6be0433fca1 100644
--- a/engines/mads/madsv2/forest/rooms/room308.cpp
+++ b/engines/mads/madsv2/forest/rooms/room308.cpp
@@ -39,14 +39,10 @@ namespace Forest {
namespace Rooms {
struct Scratch {
- int16 sprite[15]; /* Sprite series handles */
- int16 sequence[15]; /* Sequence handles */
- int16 animation[4]; /* Animation handles */
-
- int16 dragon_frame; /* frame animation is on */
-
- int16 done_with_conv; /* T if done with conv */
- int16 prev_room;
+ int16 sprite[10]; /* Sprite series handles */
+ int16 sequence[10]; /* Sequence handles */
+ int16 animation[10]; /* Animation handles */
+ AnimationInfo animation_info[10];
};
static Scratch scratch;
@@ -55,6 +51,7 @@ static Scratch scratch;
#define ss local->sprite
#define seq local->sequence
#define aa local->animation
+#define aainfo scratch.animation_info
static void room_308_init() {
diff --git a/engines/mads/madsv2/forest/rooms/room321.cpp b/engines/mads/madsv2/forest/rooms/room321.cpp
index 7325c714f9f..ff3ef4df085 100644
--- a/engines/mads/madsv2/forest/rooms/room321.cpp
+++ b/engines/mads/madsv2/forest/rooms/room321.cpp
@@ -39,14 +39,10 @@ namespace Forest {
namespace Rooms {
struct Scratch {
- int16 sprite[15]; /* Sprite series handles */
- int16 sequence[15]; /* Sequence handles */
- int16 animation[4]; /* Animation handles */
-
- int16 dragon_frame; /* frame animation is on */
-
- int16 done_with_conv; /* T if done with conv */
- int16 prev_room;
+ int16 sprite[10]; /* Sprite series handles */
+ int16 sequence[10]; /* Sequence handles */
+ int16 animation[10]; /* Animation handles */
+ AnimationInfo animation_info[10];
};
static Scratch scratch;
@@ -55,6 +51,7 @@ static Scratch scratch;
#define ss local->sprite
#define seq local->sequence
#define aa local->animation
+#define aainfo scratch.animation_info
static void room_321_init() {
diff --git a/engines/mads/madsv2/forest/rooms/room322.cpp b/engines/mads/madsv2/forest/rooms/room322.cpp
index 07c0a80e45c..8f1777d3c83 100644
--- a/engines/mads/madsv2/forest/rooms/room322.cpp
+++ b/engines/mads/madsv2/forest/rooms/room322.cpp
@@ -39,14 +39,10 @@ namespace Forest {
namespace Rooms {
struct Scratch {
- int16 sprite[15]; /* Sprite series handles */
- int16 sequence[15]; /* Sequence handles */
- int16 animation[4]; /* Animation handles */
-
- int16 dragon_frame; /* frame animation is on */
-
- int16 done_with_conv; /* T if done with conv */
- int16 prev_room;
+ int16 sprite[10]; /* Sprite series handles */
+ int16 sequence[10]; /* Sequence handles */
+ int16 animation[10]; /* Animation handles */
+ AnimationInfo animation_info[10];
};
static Scratch scratch;
@@ -55,6 +51,7 @@ static Scratch scratch;
#define ss local->sprite
#define seq local->sequence
#define aa local->animation
+#define aainfo scratch.animation_info
static void room_322_init() {
diff --git a/engines/mads/madsv2/forest/rooms/room401.cpp b/engines/mads/madsv2/forest/rooms/room401.cpp
index 626d2f7cb9e..4ea88c25dec 100644
--- a/engines/mads/madsv2/forest/rooms/room401.cpp
+++ b/engines/mads/madsv2/forest/rooms/room401.cpp
@@ -39,14 +39,10 @@ namespace Forest {
namespace Rooms {
struct Scratch {
- int16 sprite[15]; /* Sprite series handles */
- int16 sequence[15]; /* Sequence handles */
- int16 animation[4]; /* Animation handles */
-
- int16 dragon_frame; /* frame animation is on */
-
- int16 done_with_conv; /* T if done with conv */
- int16 prev_room;
+ int16 sprite[10]; /* Sprite series handles */
+ int16 sequence[10]; /* Sequence handles */
+ int16 animation[10]; /* Animation handles */
+ AnimationInfo animation_info[10];
};
static Scratch scratch;
@@ -55,6 +51,7 @@ static Scratch scratch;
#define ss local->sprite
#define seq local->sequence
#define aa local->animation
+#define aainfo scratch.animation_info
static void room_401_init() {
diff --git a/engines/mads/madsv2/forest/rooms/room402.cpp b/engines/mads/madsv2/forest/rooms/room402.cpp
index 34273aa93ce..99e263ca4e3 100644
--- a/engines/mads/madsv2/forest/rooms/room402.cpp
+++ b/engines/mads/madsv2/forest/rooms/room402.cpp
@@ -39,14 +39,10 @@ namespace Forest {
namespace Rooms {
struct Scratch {
- int16 sprite[15]; /* Sprite series handles */
- int16 sequence[15]; /* Sequence handles */
- int16 animation[4]; /* Animation handles */
-
- int16 dragon_frame; /* frame animation is on */
-
- int16 done_with_conv; /* T if done with conv */
- int16 prev_room;
+ int16 sprite[10]; /* Sprite series handles */
+ int16 sequence[10]; /* Sequence handles */
+ int16 animation[10]; /* Animation handles */
+ AnimationInfo animation_info[10];
};
static Scratch scratch;
@@ -55,6 +51,7 @@ static Scratch scratch;
#define ss local->sprite
#define seq local->sequence
#define aa local->animation
+#define aainfo scratch.animation_info
static void room_402_init() {
diff --git a/engines/mads/madsv2/forest/rooms/room403.cpp b/engines/mads/madsv2/forest/rooms/room403.cpp
index 35bcb54e03f..c9e44095b24 100644
--- a/engines/mads/madsv2/forest/rooms/room403.cpp
+++ b/engines/mads/madsv2/forest/rooms/room403.cpp
@@ -39,14 +39,10 @@ namespace Forest {
namespace Rooms {
struct Scratch {
- int16 sprite[15]; /* Sprite series handles */
- int16 sequence[15]; /* Sequence handles */
- int16 animation[4]; /* Animation handles */
-
- int16 dragon_frame; /* frame animation is on */
-
- int16 done_with_conv; /* T if done with conv */
- int16 prev_room;
+ int16 sprite[10]; /* Sprite series handles */
+ int16 sequence[10]; /* Sequence handles */
+ int16 animation[10]; /* Animation handles */
+ AnimationInfo animation_info[10];
};
static Scratch scratch;
@@ -55,6 +51,7 @@ static Scratch scratch;
#define ss local->sprite
#define seq local->sequence
#define aa local->animation
+#define aainfo scratch.animation_info
static void room_403_init() {
diff --git a/engines/mads/madsv2/forest/rooms/room404.cpp b/engines/mads/madsv2/forest/rooms/room404.cpp
index a0e1dff1e99..24d2b042ea2 100644
--- a/engines/mads/madsv2/forest/rooms/room404.cpp
+++ b/engines/mads/madsv2/forest/rooms/room404.cpp
@@ -39,14 +39,10 @@ namespace Forest {
namespace Rooms {
struct Scratch {
- int16 sprite[15]; /* Sprite series handles */
- int16 sequence[15]; /* Sequence handles */
- int16 animation[4]; /* Animation handles */
-
- int16 dragon_frame; /* frame animation is on */
-
- int16 done_with_conv; /* T if done with conv */
- int16 prev_room;
+ int16 sprite[10]; /* Sprite series handles */
+ int16 sequence[10]; /* Sequence handles */
+ int16 animation[10]; /* Animation handles */
+ AnimationInfo animation_info[10];
};
static Scratch scratch;
@@ -55,6 +51,7 @@ static Scratch scratch;
#define ss local->sprite
#define seq local->sequence
#define aa local->animation
+#define aainfo scratch.animation_info
static void room_404_init() {
diff --git a/engines/mads/madsv2/forest/rooms/room405.cpp b/engines/mads/madsv2/forest/rooms/room405.cpp
index 794e67c6d6e..282231b5cf3 100644
--- a/engines/mads/madsv2/forest/rooms/room405.cpp
+++ b/engines/mads/madsv2/forest/rooms/room405.cpp
@@ -39,14 +39,10 @@ namespace Forest {
namespace Rooms {
struct Scratch {
- int16 sprite[15]; /* Sprite series handles */
- int16 sequence[15]; /* Sequence handles */
- int16 animation[4]; /* Animation handles */
-
- int16 dragon_frame; /* frame animation is on */
-
- int16 done_with_conv; /* T if done with conv */
- int16 prev_room;
+ int16 sprite[10]; /* Sprite series handles */
+ int16 sequence[10]; /* Sequence handles */
+ int16 animation[10]; /* Animation handles */
+ AnimationInfo animation_info[10];
};
static Scratch scratch;
@@ -55,6 +51,7 @@ static Scratch scratch;
#define ss local->sprite
#define seq local->sequence
#define aa local->animation
+#define aainfo scratch.animation_info
static void room_405_init() {
diff --git a/engines/mads/madsv2/forest/rooms/room420.cpp b/engines/mads/madsv2/forest/rooms/room420.cpp
index e3ccd7685e7..9cda90a1583 100644
--- a/engines/mads/madsv2/forest/rooms/room420.cpp
+++ b/engines/mads/madsv2/forest/rooms/room420.cpp
@@ -39,14 +39,10 @@ namespace Forest {
namespace Rooms {
struct Scratch {
- int16 sprite[15]; /* Sprite series handles */
- int16 sequence[15]; /* Sequence handles */
- int16 animation[4]; /* Animation handles */
-
- int16 dragon_frame; /* frame animation is on */
-
- int16 done_with_conv; /* T if done with conv */
- int16 prev_room;
+ int16 sprite[10]; /* Sprite series handles */
+ int16 sequence[10]; /* Sequence handles */
+ int16 animation[10]; /* Animation handles */
+ AnimationInfo animation_info[10];
};
static Scratch scratch;
@@ -55,6 +51,7 @@ static Scratch scratch;
#define ss local->sprite
#define seq local->sequence
#define aa local->animation
+#define aainfo scratch.animation_info
static void room_420_init() {
diff --git a/engines/mads/madsv2/forest/rooms/room501.cpp b/engines/mads/madsv2/forest/rooms/room501.cpp
index c2075289b60..0856cadf4e6 100644
--- a/engines/mads/madsv2/forest/rooms/room501.cpp
+++ b/engines/mads/madsv2/forest/rooms/room501.cpp
@@ -39,14 +39,10 @@ namespace Forest {
namespace Rooms {
struct Scratch {
- int16 sprite[15]; /* Sprite series handles */
- int16 sequence[15]; /* Sequence handles */
- int16 animation[4]; /* Animation handles */
-
- int16 dragon_frame; /* frame animation is on */
-
- int16 done_with_conv; /* T if done with conv */
- int16 prev_room;
+ int16 sprite[10]; /* Sprite series handles */
+ int16 sequence[10]; /* Sequence handles */
+ int16 animation[10]; /* Animation handles */
+ AnimationInfo animation_info[10];
};
static Scratch scratch;
@@ -55,6 +51,7 @@ static Scratch scratch;
#define ss local->sprite
#define seq local->sequence
#define aa local->animation
+#define aainfo scratch.animation_info
static void room_501_init() {
diff --git a/engines/mads/madsv2/forest/rooms/room503.cpp b/engines/mads/madsv2/forest/rooms/room503.cpp
index 0c66b325ff4..5ecd14289d0 100644
--- a/engines/mads/madsv2/forest/rooms/room503.cpp
+++ b/engines/mads/madsv2/forest/rooms/room503.cpp
@@ -39,14 +39,10 @@ namespace Forest {
namespace Rooms {
struct Scratch {
- int16 sprite[15]; /* Sprite series handles */
- int16 sequence[15]; /* Sequence handles */
- int16 animation[4]; /* Animation handles */
-
- int16 dragon_frame; /* frame animation is on */
-
- int16 done_with_conv; /* T if done with conv */
- int16 prev_room;
+ int16 sprite[10]; /* Sprite series handles */
+ int16 sequence[10]; /* Sequence handles */
+ int16 animation[10]; /* Animation handles */
+ AnimationInfo animation_info[10];
};
static Scratch scratch;
@@ -55,6 +51,7 @@ static Scratch scratch;
#define ss local->sprite
#define seq local->sequence
#define aa local->animation
+#define aainfo scratch.animation_info
static void room_503_init() {
diff --git a/engines/mads/madsv2/forest/rooms/room509.cpp b/engines/mads/madsv2/forest/rooms/room509.cpp
index 50881aa9434..b91d93105db 100644
--- a/engines/mads/madsv2/forest/rooms/room509.cpp
+++ b/engines/mads/madsv2/forest/rooms/room509.cpp
@@ -39,14 +39,10 @@ namespace Forest {
namespace Rooms {
struct Scratch {
- int16 sprite[15]; /* Sprite series handles */
- int16 sequence[15]; /* Sequence handles */
- int16 animation[4]; /* Animation handles */
-
- int16 dragon_frame; /* frame animation is on */
-
- int16 done_with_conv; /* T if done with conv */
- int16 prev_room;
+ int16 sprite[10]; /* Sprite series handles */
+ int16 sequence[10]; /* Sequence handles */
+ int16 animation[10]; /* Animation handles */
+ AnimationInfo animation_info[10];
};
static Scratch scratch;
@@ -55,6 +51,7 @@ static Scratch scratch;
#define ss local->sprite
#define seq local->sequence
#define aa local->animation
+#define aainfo scratch.animation_info
static void room_509_init() {
diff --git a/engines/mads/madsv2/forest/rooms/room510.cpp b/engines/mads/madsv2/forest/rooms/room510.cpp
index 815c6ed21e3..ec39479b552 100644
--- a/engines/mads/madsv2/forest/rooms/room510.cpp
+++ b/engines/mads/madsv2/forest/rooms/room510.cpp
@@ -39,14 +39,10 @@ namespace Forest {
namespace Rooms {
struct Scratch {
- int16 sprite[15]; /* Sprite series handles */
- int16 sequence[15]; /* Sequence handles */
- int16 animation[4]; /* Animation handles */
-
- int16 dragon_frame; /* frame animation is on */
-
- int16 done_with_conv; /* T if done with conv */
- int16 prev_room;
+ int16 sprite[10]; /* Sprite series handles */
+ int16 sequence[10]; /* Sequence handles */
+ int16 animation[10]; /* Animation handles */
+ AnimationInfo animation_info[10];
};
static Scratch scratch;
@@ -55,6 +51,7 @@ static Scratch scratch;
#define ss local->sprite
#define seq local->sequence
#define aa local->animation
+#define aainfo scratch.animation_info
static void room_510_init() {
diff --git a/engines/mads/madsv2/forest/rooms/room520.cpp b/engines/mads/madsv2/forest/rooms/room520.cpp
index f907dd7d515..3413c1f4a33 100644
--- a/engines/mads/madsv2/forest/rooms/room520.cpp
+++ b/engines/mads/madsv2/forest/rooms/room520.cpp
@@ -39,14 +39,10 @@ namespace Forest {
namespace Rooms {
struct Scratch {
- int16 sprite[15]; /* Sprite series handles */
- int16 sequence[15]; /* Sequence handles */
- int16 animation[4]; /* Animation handles */
-
- int16 dragon_frame; /* frame animation is on */
-
- int16 done_with_conv; /* T if done with conv */
- int16 prev_room;
+ int16 sprite[10]; /* Sprite series handles */
+ int16 sequence[10]; /* Sequence handles */
+ int16 animation[10]; /* Animation handles */
+ AnimationInfo animation_info[10];
};
static Scratch scratch;
@@ -55,6 +51,7 @@ static Scratch scratch;
#define ss local->sprite
#define seq local->sequence
#define aa local->animation
+#define aainfo scratch.animation_info
static void room_520_init() {
diff --git a/engines/mads/madsv2/forest/rooms/room903.cpp b/engines/mads/madsv2/forest/rooms/room903.cpp
index a080b8ecef5..affb572a887 100644
--- a/engines/mads/madsv2/forest/rooms/room903.cpp
+++ b/engines/mads/madsv2/forest/rooms/room903.cpp
@@ -37,11 +37,6 @@ namespace MADSV2 {
namespace Forest {
namespace Rooms {
-#define local (&scratch)
-#define ss local->sprite
-#define seq local->sequence
-#define aa local->animation
-
/* Triggers */
#define TRIGGER0 100
#define TRIGGER1 101
Commit: 6878d3b44d85b9c0c5459150487c5b303f0219ce
https://github.com/scummvm/scummvm/commit/6878d3b44d85b9c0c5459150487c5b303f0219ce
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-06-07T08:21:18+10:00
Commit Message:
MADS: FOREST: Implemented room 203
Changed paths:
engines/mads/madsv2/forest/extra.cpp
engines/mads/madsv2/forest/extra.h
engines/mads/madsv2/forest/global.cpp
engines/mads/madsv2/forest/global.h
engines/mads/madsv2/forest/rooms/room203.cpp
diff --git a/engines/mads/madsv2/forest/extra.cpp b/engines/mads/madsv2/forest/extra.cpp
index e135a5355f2..b222cf4d01d 100644
--- a/engines/mads/madsv2/forest/extra.cpp
+++ b/engines/mads/madsv2/forest/extra.cpp
@@ -34,6 +34,10 @@ namespace MADS {
namespace MADSV2 {
namespace Forest {
+void display_interface() {
+ error("TODO: display_interface");
+}
+
void fly_on_screen(int flying_object) {
error("TODO: fly_on_screen");
}
diff --git a/engines/mads/madsv2/forest/extra.h b/engines/mads/madsv2/forest/extra.h
index e4cac25e94f..8639da8addb 100644
--- a/engines/mads/madsv2/forest/extra.h
+++ b/engines/mads/madsv2/forest/extra.h
@@ -48,6 +48,7 @@ namespace Forest {
extern void fly_on_screen(int flying_object);
extern void fly_off_screen(int flying_object);
+extern void display_interface();
extern void display_inventory(void);
extern void solve_me_selected(void);
extern void door_selected(void);
diff --git a/engines/mads/madsv2/forest/global.cpp b/engines/mads/madsv2/forest/global.cpp
index eeb31fdb4ee..22f546ca4f5 100644
--- a/engines/mads/madsv2/forest/global.cpp
+++ b/engines/mads/madsv2/forest/global.cpp
@@ -34,6 +34,7 @@ namespace MADSV2 {
namespace Forest {
int16 flags[40];
+bool room_203_flag;
namespace Rooms {
diff --git a/engines/mads/madsv2/forest/global.h b/engines/mads/madsv2/forest/global.h
index 4213e666761..b602faf2352 100644
--- a/engines/mads/madsv2/forest/global.h
+++ b/engines/mads/madsv2/forest/global.h
@@ -255,6 +255,7 @@ struct AnimationInfo {
};
extern int16 flags[40];
+extern bool room_203_flag;
extern void global_section_constructor();
extern void sync_room(Common::Serializer &s);
diff --git a/engines/mads/madsv2/forest/rooms/room203.cpp b/engines/mads/madsv2/forest/rooms/room203.cpp
index e4dd299ad51..e9a0d88dedf 100644
--- a/engines/mads/madsv2/forest/rooms/room203.cpp
+++ b/engines/mads/madsv2/forest/rooms/room203.cpp
@@ -1,4 +1,4 @@
-/* ScummVM - Graphic Adventure Engine
+/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
@@ -19,18 +19,16 @@
*
*/
-#include "mads/madsv2/core/conv.h"
+#include "mads/madsv2/core/digi.h"
#include "mads/madsv2/core/game.h"
-#include "mads/madsv2/core/imath.h"
#include "mads/madsv2/core/inter.h"
#include "mads/madsv2/core/kernel.h"
-#include "mads/madsv2/core/sound.h"
-#include "mads/madsv2/core/text.h"
-#include "mads/madsv2/forest/mads/inventory.h"
-#include "mads/madsv2/forest/mads/sounds.h"
-#include "mads/madsv2/forest/mads/words.h"
+#include "mads/madsv2/core/object.h"
+#include "mads/madsv2/core/player.h"
+#include "mads/madsv2/forest/extra.h"
#include "mads/madsv2/forest/global.h"
-#include "mads/madsv2/forest/rooms/section1.h"
+#include "mads/madsv2/forest/journal.h"
+#include "mads/madsv2/forest/rooms/section2.h"
#include "mads/madsv2/forest/rooms/room203.h"
namespace MADS {
@@ -39,46 +37,1045 @@ namespace Forest {
namespace Rooms {
struct Scratch {
- int16 sprite[10]; /* Sprite series handles */
- int16 sequence[10]; /* Sequence handles */
- int16 animation[10]; /* Animation handles */
- AnimationInfo animation_info[10];
+ int16 sprite[10]; /* 0x00 â sprite series handles */
+ int16 sequence[10]; /* 0x14 â sequence handles */
+ int16 animation[10]; /* 0x28 â animation handles */
+ AnimationInfo animation_info[10];/* 0x3C */
+ int16 _8c; /* 0x8C */
+ int16 _8e; /* 0x8E */
+ int16 _90; /* 0x90 */
+ int16 _92; /* 0x92 */
+ int16 _94; /* 0x94 */
+ int16 _96; /* 0x96 */
+ int16 _98; /* 0x98 */
+ int16 _9a; /* 0x9A */
+ int16 _9c; /* 0x9C */
+ int16 _9e; /* 0x9E â animation handle */
+ int16 _a0; /* 0xA0 â animation handle */
+ int16 _a2; /* 0xA2 â talk animation handle */
+ int16 _a4; /* 0xA4 */
+ int16 _a6; /* 0xA6 */
+ int16 _a8; /* 0xA8 */
+ int16 _paa; /* 0xAA */
+ int16 _ac; /* 0xAC */
+ int16 _ae; /* 0xAE */
+ int16 _b0; /* 0xB0 */
+ int16 _b2; /* 0xB2 */
+ int16 _b4; /* 0xB4 */
};
static Scratch scratch;
-#define local (&scratch)
-#define ss local->sprite
-#define seq local->sequence
-#define aa local->animation
+#define local (&scratch)
+#define ss local->sprite
+#define seq local->sequence
+#define aa local->animation
#define aainfo scratch.animation_info
+
+static void room_203_init1() {
+ global[g131] = 0;
+ global[g141] = 0;
+
+ if (global[g046] != 0) {
+ object_set_quality(5, 0, -1);
+ object_set_quality(8, 0, -1);
+ scratch._a0 = kernel_run_animation_disp('r', 1, 0);
+ kernel_position_anim(scratch._a0, 132, 133, 88, 6);
+ scratch._9e = kernel_run_animation_disp('e', 3, 0);
+ kernel_position_anim(scratch._9e, 105, 137, 90, 5);
+ player.x = 91;
+ player.y = 124;
+ player.facing = 3;
+ } else {
+ object_set_quality(5, 0, 0);
+ object_set_quality(8, 0, 0);
+ room_203_flag = 0;
+ scratch._a0 = kernel_run_animation_disp('r', 9, 0);
+ kernel_position_anim(scratch._a0, 110, 153, 98, 2);
+ scratch._9e = kernel_run_animation_disp('e', 9, 0);
+ kernel_position_anim(scratch._9e, 86, 148, 96, 3);
+ player.x = 70;
+ player.y = 130;
+ player.facing = 9;
+ }
+
+ if (previous_room == 201) {
+ aa[0] = kernel_run_animation(kernel_name('y', 1), 101);
+ aainfo[0]._val1 = -1;
+ scratch._9a = 11;
+ scratch._92 = 60;
+ if (flags[8] == 1) {
+ aa[4] = kernel_run_animation(kernel_name('w', 1), 105);
+ aainfo[4]._val1 = -1;
+ aainfo[4]._val2 = 0;
+ scratch._9c = 60;
+ }
+ return;
+ } else if (previous_room == 204) {
+ aa[0] = kernel_run_animation(kernel_name('y', 2), 101);
+ aainfo[0]._val1 = -1;
+ scratch._9a = 11;
+ scratch._92 = 99;
+ return;
+ } else if (previous_room == 210) {
+ aa[0] = kernel_run_animation(kernel_name('y', 3), 101);
+ aainfo[0]._val1 = -1;
+ scratch._9a = 11;
+ scratch._92 = 74;
+ global_digi_play(11);
+ scratch._a6 = 5;
+ return;
+ }
+
+ if (previous_room == 199)
+ restore_player();
+
+ global[g131] = -1;
+ global[g141] = -1;
+ kernel_reset_animation(scratch._9e, 2);
+ kernel_reset_animation(scratch._a0, 2);
+ kernel_synch(KERNEL_ANIM, scratch._9e, KERNEL_NOW, 0);
+ kernel_synch(KERNEL_ANIM, scratch._a0, KERNEL_NOW, 0);
+ global[g133] = 0;
+ global[g143] = 0;
+
+ if (global[g046] == 0) {
+ global_digi_play(15);
+ scratch._a6 = 2;
+ aa[4] = kernel_run_animation(kernel_name('w', 4), 105);
+ aainfo[4]._val1 = -1;
+ aainfo[4]._val2 = 0;
+ scratch._9c = 63;
+ player.walker_visible = -1;
+ kernel_synch(KERNEL_PLAYER, 0, KERNEL_NOW, 0);
+ player.commands_allowed = -1;
+ kernel_flip_hotspot(168, -1);
+ kernel_flip_hotspot(170, -1);
+ kernel_flip_hotspot(169, -1);
+
+ if (global[g049] != 0) {
+ aa[3] = kernel_run_animation(kernel_name('a', 1), 104);
+ scratch._98 = 30;
+ aainfo[3]._val1 = -1;
+ aainfo[3]._val2 = 25;
+ kernel_reset_animation(aa[3], 25);
+ global[g049] = -1;
+ player.walker_visible = 0;
+ player.commands_allowed = 0;
+ kernel_synch(KERNEL_ANIM, aa[3], KERNEL_NOW, 0);
+ }
+
+ kernel_flip_hotspot(119, global[g047] == 0 ? 1 : 0);
+ kernel_flip_hotspot(27, global[g047]);
+ } else {
+ global_digi_play(11);
+ scratch._a6 = 5;
+ }
+}
+
static void room_203_init() {
+ scratch._b4 = 0;
+ scratch._ac = 0;
+ scratch._ae = 0;
+ scratch._a8 = 0;
+
+ if (previous_room != KERNEL_RESTORING_GAME && previous_room != 199 && global[g050] == 0)
+ global[g046] = 0;
+
+ scratch._a6 = 5;
+ global[player_score] = -1;
+ global[g009] = -1;
+ kernel_flip_hotspot(65, false);
+ kernel_flip_hotspot(66, false);
+ kernel_flip_hotspot(168, false);
+ kernel_flip_hotspot(170, false);
+ kernel_flip_hotspot(169, false);
+
+ ss[0] = kernel_load_series(kernel_name('p', 5), 0);
+ ss[1] = kernel_load_series(kernel_name('p', 6), 0);
+
+ if (global[g047] != 0) {
+ kernel_flip_hotspot(119, false);
+ kernel_flip_hotspot(27, -1);
+ seq[1] = kernel_seq_stamp(ss[1], false, KERNEL_FIRST);
+ kernel_seq_depth(seq[1], 15);
+ kernel_seq_loc(seq[1], 128, 74);
+ kernel_seq_scale(seq[1], 100);
+ } else {
+ kernel_flip_hotspot(119, -1);
+ kernel_flip_hotspot(27, false);
+ seq[0] = kernel_seq_stamp(ss[0], false, KERNEL_FIRST);
+ kernel_seq_depth(seq[0], 15);
+ kernel_seq_loc(seq[0], 129, 79);
+ kernel_seq_scale(seq[0], 100);
+ }
+
+ if (previous_room != KERNEL_RESTORING_GAME) {
+ if (previous_room != 199) {
+ player.walker_visible = 0;
+ player.commands_allowed = 0;
+ }
+
+ for (int i = 0; i < 10; i++) {
+ aainfo[i]._val1 = 0;
+ aainfo[i]._val2 = 1;
+ aainfo[i]._val3 = 0;
+ aainfo[i]._val4 = 0;
+ }
+
+ if (previous_room != 199 && flags[8] != 3)
+ flags[8]++;
+ }
+
+ room_203_init1();
}
static void room_203_daemon() {
+ switch (kernel.trigger) {
+ case 7:
+ switch (local->_a4) {
+ case 11:
+ kernel_timing_trigger(40, 106);
+ aainfo[0]._val2 = 9;
+ kernel_reset_animation(aa[0], 9);
+ break;
+
+ case 12:
+ kernel_timing_trigger(40, 106);
+ aainfo[0]._val2 = 33;
+ kernel_reset_animation(aa[0], 33);
+ break;
+
+ case 13:
+ aainfo[0]._val2 = 28;
+ kernel_reset_animation(aa[0], 28);
+ break;
+
+ case 14:
+ case 15:
+ aainfo[1]._val2 = 11;
+ kernel_reset_animation(aa[1], 11);
+ break;
+
+ case 16:
+ aainfo[0]._val2 = 12;
+ kernel_reset_animation(aa[0], 12);
+ break;
+
+ case 17:
+ aainfo[0]._val2 = 57;
+ kernel_reset_animation(aa[0], 57);
+ break;
+
+ case 21:
+ kernel_timing_trigger(40, 106);
+ aainfo[0]._val2 = 17;
+ kernel_reset_animation(aa[0], 17);
+ break;
+
+ case 22:
+ dont_frag_the_palette();
+ kernel_abort_animation(aa[4]);
+ aainfo[4]._val1 = 0;
+
+ aa[4] = kernel_run_animation(kernel_name('w', 3), 105);
+ aainfo[4]._val1 = -1;
+ aainfo[4]._val2 = 0;
+ local->_9c = 62;
+ aainfo[0]._val2 = 41;
+ kernel_reset_animation(aa[0], 41);
+ break;
+
+ case 23:
+ kernel_timing_trigger(40, 106);
+ aainfo[0]._val2 = 23;
+ kernel_reset_animation(aa[0], 23);
+ break;
+
+ case 24:
+ kernel_timing_trigger(40, 106);
+ aainfo[2]._val2 = 6;
+ kernel_reset_animation(aa[2], 6);
+ break;
+
+ case 25:
+ aainfo[2]._val2 = 20;
+ kernel_reset_animation(aa[2], 20);
+ break;
+
+ case 26:
+ aainfo[2]._val2 = 10;
+ kernel_reset_animation(aa[2], 10);
+ break;
+
+ case 30:
+ dont_frag_the_palette();
+ kernel_abort_animation(local->_a2);
+ player.walker_visible = true;
+ local->_b2 = 0;
+ global[g154] = 0;
+ kernel_synch(KERNEL_PLAYER, 0, KERNEL_NOW, 0);
+ global[g150] = -1;
+ local->_90 = global[g046] ? 16 : 15;
+
+ case 31:
+ kernel_timing_trigger(40, 106);
+ aainfo[0]._val2 = 25;
+ kernel_reset_animation(aa[0], 25);
+ break;
+
+ case 32:
+ aainfo[0]._val2 = 5;
+ kernel_reset_animation(aa[0], 5);
+ break;
+
+ case 33:
+ aainfo[3]._val2 = 3;
+ kernel_reset_animation(aa[3], 3);
+ break;
+
+ case 34:
+ case 35:
+ aainfo[3]._val2 = 39;
+ kernel_reset_animation(aa[3], 39);
+ break;
+
+ case 36:
+ kernel_timing_trigger(40, 106);
+ aainfo[3]._val2 = 60;
+ kernel_reset_animation(aa[3], 60);
+ break;
+
+ case 38:
+ case 39:
+ aainfo[3]._val2 = 63;
+ kernel_reset_animation(aa[3], 63);
+ break;
+
+ case 51:
+ kernel_timing_trigger(40, 106);
+ aainfo[0]._val2 = 24;
+ kernel_reset_animation(aa[0], 24);
+ break;
+
+ case 52:
+ global[walker_converse_state] = 0;
+ close_journal(3);
+ player.commands_allowed = true;
+ local->_a4 = 0;
+ break;
+
+ default:
+ break;
+ }
+ break;
+
+ case 24:
+ switch (local->_8c) {
+ case 50:
+ aa[1] = kernel_run_animation(kernel_name('Z', 1), 103);
+ aainfo[1]._val1 = -1;
+ aainfo[1]._val2 = 0;
+ local->_96 = 50;
+ player.commands_allowed = false;
+ player.walker_visible = false;
+ kernel_reset_animation(local->_9e, 0);
+
+ global[g131] = 0;
+ kernel_synch(KERNEL_ANIM, aa[1], KERNEL_ANIM, local->_9e);
+ kernel_synch(KERNEL_ANIM, 0, KERNEL_PLAYER, aa[1]);
+ global[g133] = 1;
+ break;
+
+ case 51:
+ aa[1] = kernel_run_animation(kernel_name('e', 4), 103);
+ aainfo[1]._val1 = -1;
+ aainfo[1]._val2 = 0;
+ local->_96 = 52;
+ player.commands_allowed = false;
+ player.walker_visible = false;
+ kernel_reset_animation(local->_9e, 0);
+
+ global[g131] = 0;
+ kernel_synch(KERNEL_ANIM, aa[1], KERNEL_ANIM, local->_9e);
+ kernel_synch(KERNEL_ANIM, 0, KERNEL_PLAYER, aa[1]);
+ global[g133] = 1;
+ break;
+
+ }
+ break;
+
+ case 25:
+ player.commands_allowed = false;
+
+ switch (local->_8e) {
+ case 41:
+ aa[2] = kernel_run_animation(kernel_name('R', 3), 102);
+ aainfo[2]._val1 = -1;
+ aainfo[2]._val2 = 0;
+ local->_94 = 41;
+ local->_a8 = 0;
+ kernel_reset_animation(local->_a0, 0);
+ kernel_synch(KERNEL_ANIM, aa[2], KERNEL_ANIM, local->_a0);
+ global[g143] = 1;
+ break;
+
+ case 42:
+ aa[2] = kernel_run_animation(kernel_name('R', 1), 102);
+ aainfo[2]._val1 = -1;
+ aainfo[2]._val2 = 0;
+ local->_94 = 42;
+ kernel_reset_animation(local->_a0, 0);
+ kernel_synch(KERNEL_ANIM, aa[2], KERNEL_ANIM, local->_a0);
+ global[g143] = 1;
+ break;
+
+ case 43:
+ aa[2] = kernel_run_animation(kernel_name('R', 2), 102);
+ aainfo[2]._val1 = -1;
+ aainfo[2]._val2 = 0;
+ local->_94 = 43;
+ kernel_reset_animation(local->_a0, 0);
+ kernel_synch(KERNEL_ANIM, aa[2], KERNEL_ANIM, local->_a0);
+ global[g143] = 1;
+ break;
+
+ default:
+ break;
+ }
+ break;
+
+ case 26:
+ kernel_reset_animation(local->_9e, 0);
+ kernel_synch(KERNEL_ANIM, aa[local->_9e], KERNEL_NOW, 0);
+ global[g133] = 1;
+ global[g131] = 0;
+
+ if (local->_90 != 55) {
+ kernel_reset_animation(local->_a0, 0);
+ kernel_synch(KERNEL_ANIM, aa[local->_a0], KERNEL_NOW, 0);
+ global[g143] = 1;
+ global[g141] = 0;
+ }
+
+ player.walker_visible = false;
+ kernel_synch(KERNEL_PLAYER, 0, KERNEL_NOW, 0);
+ player.commands_allowed = false;
+
+ switch (local->_90) {
+ case 14:
+ aa[0] = kernel_run_animation(kernel_name('x', 4), 101);
+ aainfo[0]._val1 = -1;
+ aainfo[0]._val2 = 0;
+ kernel_synch(KERNEL_ANIM, aa[0], KERNEL_NOW, 0);
+ local->_9a = 14;
+ break;
+
+ case 15:
+ dont_frag_the_palette();
+ kernel_abort_animation(aa[4]);
+ aainfo[4]._val1 = 0;
+ aa[0] = kernel_run_animation(kernel_name('z', 2), 101);
+ aainfo[0]._val1 = -1;
+ aainfo[0]._val2 = 0;
+ kernel_synch(KERNEL_ANIM, aa[0], KERNEL_NOW, 0);
+ local->_9a = 15;
+ break;
+
+ case 16:
+ player.walker_visible = true;
+ kernel_synch(KERNEL_PLAYER, 0, KERNEL_NOW, 0);
+ aa[0] = kernel_run_animation(kernel_name('m', 1), 101);
+ aainfo[0]._val1 = -1;
+ aainfo[0]._val2 = 0;
+ kernel_synch(KERNEL_ANIM, aa[0], KERNEL_NOW, 0);
+ local->_9a = 16;
+ kernel_seq_delete(seq[0]);
+ break;
+
+ case 55:
+ global[g143] = 0;
+ kernel_reset_animation(local->_a0, 1);
+ kernel_synch(KERNEL_ANIM, aa[local->_a0], KERNEL_NOW, 0);
+ aa[1] = kernel_run_animation(kernel_name('e', 1), 103);
+ kernel_synch(KERNEL_ANIM, aa[1], KERNEL_NOW, 0);
+ aainfo[1]._val1 = -1;
+ aainfo[1]._val2 = 0;
+ local->_a8 = 0;
+ break;
+
+ default:
+ break;
+ }
+ break;
+
+ case 101:
+ dont_frag_the_palette();
+ kernel_abort_animation(aa[0]);
+ aainfo[0]._val1 = 0;
+
+ switch (local->_9a) {
+ case 11:
+ if (global[g046]) {
+ global[g131] = -1;
+ global[g141] = -1;
+ kernel_reset_animation(local->_9e, 1);
+ kernel_reset_animation(local->_a0, 1);
+ player.walker_visible = true;
+ global[g133] = 0;
+ global[g143] = 0;
+ kernel_synch(KERNEL_PLAYER, 0, KERNEL_NOW, 0);
+ kernel_synch(KERNEL_ANIM, local->_9e, KERNEL_NOW, 0);
+ kernel_synch(KERNEL_ANIM, local->_a0, KERNEL_NOW, 0);
+ player.commands_allowed = true;
+ } else {
+ if (local->_a6 != 1) {
+ global_digi_play(10);
+ local->_a6 = 1;
+ }
+
+ aa[0] = kernel_run_animation(kernel_name('x', 2), 101);
+ aainfo[0]._val1 = -1;
+ aainfo[0]._val2 = 0;
+ local->_9a = 12;
+
+ if (flags[8] == 1) {
+ aa[4] = kernel_run_animation(kernel_name('w', 2), 105);
+ aainfo[4]._val1 = -1;
+ aainfo[4]._val2 = 0;
+ local->_9c = 61;
+ } else {
+ aa[4] = kernel_run_animation(kernel_name('w', 3), 105);
+ aainfo[4]._val1 = -1;
+ aainfo[4]._val2 = 0;
+ local->_9c = 62;
+ aainfo[0]._val2 = 41;
+ kernel_reset_animation(aa[0], 41);
+ }
+ }
+ break;
+
+ case 14:
+ dont_frag_the_palette();
+ kernel_abort_animation(local->_9e);
+ dont_frag_the_palette();
+ kernel_abort_animation(local->_a0);
+ local->_a0 = kernel_run_animation_disp('r', 1, 0);
+ 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);
+ display_interface();
+ global[g046] = -1;
+
+ if (local->_ac)
+ global[g050] = -1;
+
+ kernel_flip_hotspot(168, false);
+ kernel_flip_hotspot(170, false);
+ kernel_flip_hotspot(169, false);
+
+ global[g131] = -1;
+ global[g141] = -1;
+ kernel_reset_animation(local->_9e, 1);
+ kernel_reset_animation(local->_a0, 1);
+ kernel_synch(KERNEL_ANIM, local->_9e, KERNEL_NOW, 0);
+ kernel_synch(KERNEL_ANIM, local->_a0, KERNEL_NOW, 0);
+ global[g133] = 0;
+ global[g143] = 0;
+
+ player.walker_visible = false;
+ player_demand_facing(3);
+ player_demand_location(124, 91);
+ kernel_synch(KERNEL_PLAYER, 0, KERNEL_NOW, 0);
+ player.commands_allowed = true;
+ player.walker_visible = true;
+ room_203_flag = true;
+ break;
+
+ case 15:
+ new_room = 201;
+ break;
+
+ case 16:
+ global[g131] = -1;
+ global[g141] = -1;
+ kernel_reset_animation(local->_9e, 1);
+ kernel_reset_animation(local->_a0, 1);
+ kernel_synch(KERNEL_ANIM, local->_9e, KERNEL_NOW, 0);
+ kernel_synch(KERNEL_ANIM, local->_a0, KERNEL_NOW, 0);
+ global[g133] = 0;
+ global[g143] = 0;
+
+ kernel_flip_hotspot(27, true);
+ seq[1] = kernel_seq_stamp(ss[1], true, -1);
+ kernel_seq_depth(seq[1], 15);
+ kernel_seq_loc(seq[1], 128, 74);
+ kernel_seq_scale(seq[1], 100);
+ player.commands_allowed = true;
+ break;
+
+ default:
+ break;
+ }
+ break;
+
+ case 102:
+ dont_frag_the_palette();
+ kernel_abort_animation(aa[2]);
+ aainfo[2]._val1 = 0;
+ aainfo[2]._val2 = 0;
+
+ switch (local->_8e) {
+ case 41:
+ dont_frag_the_palette();
+ kernel_abort_animation(aa[4]);
+ aainfo[4]._val1 = 0;
+ aa[4] = kernel_run_animation(kernel_name('w', 5), 105);
+ aainfo[4]._val1 = -1;
+ aainfo[4]._val2 = 0;
+ local->_9c = 64;
+ kernel_synch(KERNEL_ANIM, aa[4], KERNEL_NOW, 0);
+ kernel_reset_animation(local->_a0, 1);
+ kernel_synch(KERNEL_ANIM, local->_a0, KERNEL_NOW, 0);
+ global[g143] = 0;
+ display_interface();
+ break;
+
+ case 42:
+ global[g141] = -1;
+ kernel_reset_animation(local->_a0, 1);
+ kernel_synch(KERNEL_ANIM, local->_a0, KERNEL_NOW, 0);
+ global[g143] = 0;
+ kernel_timing_trigger(1, 26);
+ local->_90 = 14;
+ break;
+
+ case 43:
+ global[g141] = -1;
+ kernel_reset_animation(local->_a0, 1);
+ kernel_synch(KERNEL_ANIM, local->_a0, KERNEL_NOW, 0);
+ global[g143] = 0;
+ player.commands_allowed = true;
+ break;
+
+ default:
+ break;
+ }
+ break;
+
+ case 103:
+ dont_frag_the_palette();
+ kernel_abort_animation(aa[1]);
+ aainfo[1]._val1 = 0;
+ aainfo[1]._val2 = 0;
+
+ switch (local->_96) {
+ case 50:
+ global[g040] = -1;
+ new_room = 210;
+ break;
+
+ case 52:
+ aa[1] = kernel_run_animation(kernel_name('e', 1), 103);
+ kernel_synch(KERNEL_ANIM, aa[1], KERNEL_NOW, 0);
+ aainfo[1]._val1 = -1;
+ aainfo[1]._val2 = 0;
+ local->_96 = 53;
+ local->_a8 = 0;
+ break;
+
+ case 53:
+ aa[1] = kernel_run_animation(kernel_name('e', 2), 103);
+ aainfo[1]._val1 = -1;
+ aainfo[1]._val2 = 0;
+ aainfo[1]._val4 = 0;
+ aainfo[4]._val2 = 17;
+ kernel_reset_animation(aa[4], 0);
+ kernel_synch(KERNEL_ANIM, aa[4], KERNEL_NOW, 0);
+ local->_96 = local->_ac ? 55 : 54;
+ break;
+
+ case 56:
+ if (local->_ac) {
+ global[g131] = -1;
+ kernel_reset_animation(local->_9e, 1);
+ kernel_synch(KERNEL_ANIM, local->_9e, KERNEL_NOW, 0);
+ global[g133] = 0;
+ } else {
+ aa[1] = kernel_run_animation(kernel_name('e', 4), 103);
+ kernel_synch(KERNEL_ANIM, aa[1], KERNEL_NOW, 0);
+ aainfo[1]._val1 = -1;
+ aainfo[1]._val2 = 0;
+ local->_96 = 57;
+ }
+ break;
+
+ case 57:
+ global[g131] = -1;
+ kernel_reset_animation(local->_9e, 1);
+ kernel_synch(KERNEL_ANIM, local->_9e, KERNEL_NOW, 0);
+ global[g133] = 0;
+ kernel_timing_trigger(1, 26);
+ local->_90 = 14;
+ break;
+
+ default:
+ local->_96 = 0;
+ break;
+ }
+ break;
+
+ case 104:
+ dont_frag_the_palette();
+ kernel_abort_animation(aa[3]);
+ aainfo[3]._val1 = 0;
+
+ if (local->_98 == 33) {
+ player.walker_visible = true;
+ kernel_synch(KERNEL_PLAYER, 0, KERNEL_NOW, 0);
+ global[g150] = -1;
+ local->_90 = 14;
+ local->_98 = 0;
+ local->_94 = 0;
+ local->_96 = 0;
+ }
+ break;
+
+ case 105:
+ dont_frag_the_palette();
+ kernel_abort_animation(aa[4]);
+ aainfo[4]._val1 = 0;
+
+ if (local->_9c == 64) {
+ if (local->_94 == 41 && local->_ac == 0) {
+ global[g145] = -1;
+ local->_8e = 42;
+ }
+
+ if (local->_96 == 54) {
+ dont_frag_the_palette();
+ kernel_abort_animation(aa[5]);
+ aainfo[5]._val1 = 0;
+ aa[1] = kernel_run_animation(kernel_name('e', 3), 103);
+ aainfo[1]._val1 = -1;
+ aainfo[1]._val2 = 0;
+ local->_96 = 56;
+ }
+
+ object_set_quality(5, -1, -1);
+ object_set_quality(8, -1, -1);
+
+ if (local->_ac) {
+ dont_frag_the_palette();
+ kernel_abort_animation(aa[5]);
+ aainfo[5]._val1 = 0;
+ aa[1] = kernel_run_animation(kernel_name('e', 3), 103);
+ aainfo[1]._val1 = -1;
+ aainfo[1]._val2 = 0;
+ local->_96 = 56;
+ }
+ break;
+ }
+ break;
+
+ case 106:
+ switch (local->_a4) {
+ case 23:
+ digi_play_build(203, 'W', 1, 1);
+ local->_a4 = 51;
+ aainfo[4]._val2 = 1;
+ kernel_reset_animation(aa[4], 1);
+ break;
+
+ case 24:
+ aainfo[2]._val2 = 10;
+ kernel_reset_animation(aa[2], 10);
+ break;
+
+ case 31:
+ aainfo[0]._val2 = 27;
+ kernel_reset_animation(aa[0], 27);
+ break;
+
+ case 36:
+ aainfo[3]._val2 = 57;
+ kernel_reset_animation(aa[3], 57);
+ digi_play_build(203, 'b', 8, 1);
+ local->_a4 = 38;
+ break;
+
+ case 34:
+ aainfo[0]._val2 = 11;
+ kernel_reset_animation(aa[0], 11);
+ break;
+
+ case 35:
+ aainfo[0]._val2 = 35;
+ kernel_reset_animation(aa[0], 35);
+ break;
+
+ case 44:
+ aainfo[0]._val2 = 19;
+ kernel_reset_animation(aa[0], 19);
+ break;
+
+ default:
+ break;
+ }
+ break;
+
+ case 107:
+ player.commands_allowed = false;
+ break;
+
+ default:
+ break;
+ }
}
static void room_203_pre_parser() {
+ if (global[g046] == 0) {
+ player.need_to_walk = 0;
+ return;
+ }
+ if (player_parse(13, 21, 0))
+ player.walk_off_edge_to_room = 201;
+ if (player_parse(13, 24, 0))
+ player.walk_off_edge_to_room = 204;
}
static void room_203_parser() {
+ if (player_parse(13, 27, 0)) {
+ if (global[g046] != 0) {
+ global[g135] = -1;
+ scratch._8c = 50;
+ } else {
+ player.commands_allowed = 0;
+ global[g150] = -1;
+ scratch._90 = 15;
+ }
+ player.command_ready = false;
+ return;
+ }
+
+ if (player_parse(13, 21, 0)) {
+ if (global[g046] == 0) {
+ player.commands_allowed = 0;
+ global[g150] = -1;
+ scratch._90 = 15;
+ }
+ player.command_ready = false;
+ return;
+ }
+
+ if (player_parse(13, 24, 0) && global[g046] == 0) {
+ player.commands_allowed = 0;
+ global[g150] = -1;
+ scratch._90 = 15;
+ }
+
+ if (global[walker_converse_state] != 0) {
+ if (global[g046] == 0) {
+ player.commands_allowed = 0;
+ kernel.trigger_setup_mode = KERNEL_TRIGGER_DAEMON;
+ kernel_timing_trigger(1, 107);
+ scratch._a8 = 0;
+ if (global[g049] != 0) {
+ inter_spin_object(8);
+ aainfo[3]._val2 = 28;
+ kernel_reset_animation(aa[3], 28);
+ global[g049] = 0;
+ } else {
+ global[g135] = -1;
+ scratch._8c = 51;
+ }
+ } else {
+ player.commands_allowed = 0;
+ digi_play_build_ii('c', 1, 1);
+ scratch._a4 = 52;
+ }
+ player.command_ready = false;
+ return;
+ }
+
+ if (global[player_selected_object] >= 0) {
+ if (global[player_selected_object] == 5) {
+ if (global[g046] != 0) {
+ // TODO: display_interface()
+ } else {
+ player.commands_allowed = 0;
+ kernel.trigger_setup_mode = KERNEL_TRIGGER_DAEMON;
+ kernel_timing_trigger(1, 107);
+ if (global[g049] != 0) {
+ aainfo[3]._val2 = 41;
+ kernel_reset_animation(aa[3], 41);
+ global[g049] = 0;
+ scratch._ae = -1;
+ } else {
+ global[g145] = -1;
+ scratch._8e = 41;
+ scratch._a8 = 0;
+ }
+ }
+ } else if (global[player_selected_object] == 8) {
+ if (global[g046] != 0) {
+ // TODO: display_interface()
+ } else {
+ player.commands_allowed = 0;
+ kernel.trigger_setup_mode = KERNEL_TRIGGER_DAEMON;
+ kernel_timing_trigger(1, 107);
+ if (global[g049] != 0) {
+ scratch._ac = 0;
+ aainfo[3]._val2 = 28;
+ kernel_reset_animation(aa[3], 28);
+ global[g049] = 0;
+ } else {
+ kernel.trigger_setup_mode = KERNEL_TRIGGER_DAEMON;
+ aa[3] = kernel_run_animation(kernel_name('a', 2), 104);
+ aainfo[3]._val1 = -1;
+ aainfo[3]._val2 = 0;
+ scratch._98 = 31;
+ player.walker_visible = 0;
+ kernel_synch(KERNEL_PLAYER, 0, KERNEL_NOW, 0);
+ }
+ }
+ }
+ player.command_ready = false;
+ return;
+ }
+
+ if (player_parse(78, 119, 0)) {
+ player.commands_allowed = 0;
+ if (global[g046] == 0) {
+ global[g150] = -1;
+ scratch._90 = 15;
+ } else {
+ global[g154] = 2;
+ player.walker_visible = 0;
+ scratch._a2 = kernel_run_animation_talk('b', 7, 0);
+ kernel_position_anim(scratch._a2, player.x, player.y, player.scale, player.depth);
+ scratch._b4 = -1;
+ kernel_synch(KERNEL_ANIM, scratch._a2, KERNEL_PLAYER, 0);
+ digi_play_build_ii('b', 1, 1);
+ scratch._a4 = 30;
+ }
+ player.command_ready = false;
+ return;
+ }
+
+ if (player_parse(78, 168, 0)) {
+ if (player_has(5) && player_has(8)) {
+ kernel.trigger_setup_mode = KERNEL_TRIGGER_DAEMON;
+ aa[3] = kernel_run_animation(kernel_name('a', 1), 104);
+ scratch._98 = 30;
+ aainfo[3]._val1 = -1;
+ global[g049] = -1;
+ aainfo[3]._val2 = 0;
+ player.walker_visible = 0;
+ player.commands_allowed = 0;
+ kernel_synch(KERNEL_ANIM, aa[3], KERNEL_NOW, 0);
+ } else if (player_has(8)) {
+ kernel.trigger_setup_mode = KERNEL_TRIGGER_DAEMON;
+ aa[3] = kernel_run_animation(kernel_name('a', 2), 104);
+ aainfo[3]._val1 = -1;
+ aainfo[3]._val2 = 0;
+ scratch._98 = 31;
+ player.walker_visible = 0;
+ kernel_synch(KERNEL_PLAYER, 0, KERNEL_NOW, 0);
+ player.commands_allowed = 0;
+ } else {
+ player.commands_allowed = 0;
+ global[g150] = -1;
+ scratch._90 = 15;
+ }
+ player.command_ready = false;
+ return;
+ }
+
+ if (player_parse(78, 169, 0)) {
+ player.commands_allowed = 0;
+ global[g135] = -1;
+ scratch._8c = 51;
+ player.command_ready = false;
+ return;
+ }
+
+ if (player_parse(78, 170, 0)) {
+ player.commands_allowed = 0;
+ global[g145] = -1;
+ scratch._8e = 43;
+ player.command_ready = false;
+ return;
+ }
+
+ if (player_parse(78, 65, 0)) {
+ player.commands_allowed = 0;
+ aainfo[3]._val2 = 28;
+ kernel_reset_animation(aa[3], 28);
+ global[g049] = 0;
+ player.command_ready = false;
+ return;
+ }
+
+ if (player_parse(78, 66, 0)) {
+ player.commands_allowed = 0;
+ aainfo[3]._val2 = 33;
+ kernel_reset_animation(aa[3], 33);
+ global[g049] = 0;
+ player.command_ready = false;
+ return;
+ }
+
+ if (global[g049] == 0)
+ return;
+
+ if (player_parse(13, 106, 0)) {
+ player.commands_allowed = 0;
+ aainfo[3]._val2 = 41;
+ kernel_reset_animation(aa[3], 41);
+ global[g049] = 0;
+ player.command_ready = false;
+ }
}
void room_203_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 (AnimationInfo &ai : scratch.animation_info) ai.synchronize(s);
+ s.syncAsSint16LE(scratch._8c);
+ s.syncAsSint16LE(scratch._8e);
+ s.syncAsSint16LE(scratch._90);
+ s.syncAsSint16LE(scratch._92);
+ s.syncAsSint16LE(scratch._94);
+ s.syncAsSint16LE(scratch._96);
+ s.syncAsSint16LE(scratch._98);
+ s.syncAsSint16LE(scratch._9a);
+ s.syncAsSint16LE(scratch._9c);
+ s.syncAsSint16LE(scratch._9e);
+ s.syncAsSint16LE(scratch._a0);
+ s.syncAsSint16LE(scratch._a2);
+ s.syncAsSint16LE(scratch._a4);
+ s.syncAsSint16LE(scratch._a6);
+ s.syncAsSint16LE(scratch._a8);
+ s.syncAsSint16LE(scratch._paa);
+ s.syncAsSint16LE(scratch._ac);
+ s.syncAsSint16LE(scratch._ae);
+ s.syncAsSint16LE(scratch._b0);
+ s.syncAsSint16LE(scratch._b2);
+ s.syncAsSint16LE(scratch._b4);
}
void room_203_preload() {
- room_init_code_pointer = room_203_init;
+ room_init_code_pointer = room_203_init;
room_pre_parser_code_pointer = room_203_pre_parser;
- room_parser_code_pointer = room_203_parser;
- room_daemon_code_pointer = room_203_daemon;
-
- section_1_walker();
- section_1_interface();
+ room_parser_code_pointer = room_203_parser;
+ room_daemon_code_pointer = room_203_daemon;
+ section_2_walker();
+ section_2_interface();
+ player.walker_must_reload = true;
}
} // namespace Rooms
More information about the Scummvm-git-logs
mailing list