[Scummvm-git-logs] scummvm master -> e34250dd36bda47258a1986ea4ffa7769f5d2d18
dreammaster
noreply at scummvm.org
Thu Jun 11 11:48:46 UTC 2026
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
8dc76dfc6f MADS: FOREST: Implemented room 305
e34250dd36 MADS: FOREST: Implemented room 306
Commit: 8dc76dfc6fec2c6f69b54305394ff8b41aeea269
https://github.com/scummvm/scummvm/commit/8dc76dfc6fec2c6f69b54305394ff8b41aeea269
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-06-11T21:48:40+10:00
Commit Message:
MADS: FOREST: Implemented room 305
Changed paths:
engines/mads/madsv2/forest/rooms/room305.cpp
diff --git a/engines/mads/madsv2/forest/rooms/room305.cpp b/engines/mads/madsv2/forest/rooms/room305.cpp
index 89c14ccbe20..32a89cc1c49 100644
--- a/engines/mads/madsv2/forest/rooms/room305.cpp
+++ b/engines/mads/madsv2/forest/rooms/room305.cpp
@@ -19,18 +19,17 @@
*
*/
-#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/core/player.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/forest/global.h"
-#include "mads/madsv2/forest/rooms/section1.h"
+#include "mads/madsv2/forest/journal.h"
#include "mads/madsv2/forest/rooms/room305.h"
namespace MADS {
@@ -39,10 +38,26 @@ namespace Forest {
namespace Rooms {
struct Scratch {
- int16 sprite[10]; /* Sprite series handles */
- int16 sequence[10]; /* Sequence handles */
- int16 animation[10]; /* Animation handles */
+ int16 sprite[10];
+ int16 sequence[10];
+ int16 animation[10];
AnimationInfo animation_info[10];
+ int16 _8c;
+ int16 _8e;
+ int16 _90;
+ int16 _92;
+ int16 _94;
+ int16 _96;
+ int16 _98;
+ int16 _9a;
+ int16 _9c;
+ int16 _9e;
+ int16 _a0;
+ int16 _a2;
+ int16 _a4;
+ int16 _a6;
+ int16 _a8;
+ int16 _aa;
};
static Scratch scratch;
@@ -54,22 +69,1097 @@ static Scratch scratch;
#define aainfo scratch.animation_info
+static void room_305_init1() {
+ global[g131] = 0;
+ global[g141] = 0;
+
+ scratch._9c = kernel_run_animation_disp('r', 1, 0);
+ kernel_position_anim(scratch._9c, 210, 124, 100, 13);
+
+ scratch._9a = kernel_run_animation_disp('e', 2, 0);
+ kernel_position_anim(scratch._9a, 118, 142, 100, 6);
+
+ if (previous_room != KERNEL_LAST) {
+ player.x = 183;
+ player.y = 109;
+ player.facing = 2;
+ }
+
+ if (previous_room == 301) {
+ aa[1] = kernel_run_animation(kernel_name('t', 1), 104);
+ aainfo[1]._active = -1;
+ global_digi_play(14);
+ return;
+ }
+
+ if (previous_room == 306) {
+ if (global[g066] == 3) {
+ aa[0] = kernel_run_animation(kernel_name('y', 3), 100);
+ aainfo[0]._active = -1;
+ scratch._92 = 76;
+ } else {
+ player.x = 138;
+ player.y = 122;
+ player.facing = 9;
+ aa[0] = kernel_run_animation(kernel_name('y', 4), 100);
+ }
+ return;
+ }
+
+ 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.walker_visible = -1;
+ player.commands_allowed = -1;
+}
+
+static void room_305_init2() {
+ global[g131] = 0;
+ global[g141] = 0;
+
+ scratch._9c = kernel_run_animation_disp('r', 1, 0);
+ kernel_position_anim(scratch._9c, 210, 124, 100, 13);
+
+ scratch._9a = kernel_run_animation_disp('e', 2, 0);
+ kernel_position_anim(scratch._9a, 118, 142, 100, 6);
+
+ if (previous_room != KERNEL_LAST) {
+ player.x = 183;
+ player.y = 109;
+ player.facing = 2;
+ }
+
+ if (previous_room == KERNEL_LAST) {
+ 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;
+ }
+
+ if (previous_room == 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;
+ }
+
+ if (previous_room == 210) {
+ aa[0] = kernel_run_animation(kernel_name('y', 1), 100);
+ aainfo[0]._active = -1;
+ scratch._92 = 52;
+ return;
+ }
+
+ if (previous_room == 301) {
+ aa[0] = kernel_run_animation(kernel_name('y', 2), 100);
+ aainfo[0]._active = -1;
+ scratch._92 = 70;
+ return;
+ }
+
+ if (previous_room == 306) {
+ if (global[g066] == 3) {
+ aa[0] = kernel_run_animation(kernel_name('y', 3), 100);
+ aainfo[0]._active = -1;
+ scratch._92 = 76;
+ return;
+ }
+ player.x = 138;
+ player.y = 122;
+ player.facing = 9;
+ aa[0] = kernel_run_animation(kernel_name('y', 4), 100);
+ return;
+ }
+
+ 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;
+}
+
static void room_305_init() {
+ scratch._a8 = 0;
+ scratch._aa = -1;
+
+ if (global[g074] != 0)
+ kernel_flip_hotspot(28, 0);
+
+ if (global[g069] == 0) {
+ ss[0] = kernel_load_series(kernel_name('p', 1), 0);
+ seq[0] = kernel_seq_stamp(ss[0], false, -1);
+ kernel_seq_depth(seq[0], 4);
+ kernel_seq_loc(seq[0], 229, 146);
+ kernel_seq_scale(seq[0], 100);
+ } else {
+ kernel_flip_hotspot(145, 0);
+ }
+
+ if (previous_room != KERNEL_LAST) {
+ if (previous_room != 199) {
+ player.walker_visible = 0;
+ player.commands_allowed = 0;
+ }
+
+ for (int count = 0; count < 10; count++) {
+ aainfo[count]._active = 0;
+ aainfo[count]._frame = 1;
+ aainfo[count]._val3 = 0;
+ aainfo[count]._val4 = 0;
+ }
+
+ if (previous_room != 199 && flags[19] != 3)
+ flags[19]++;
+ }
+
+ if (global[g066] < 2)
+ kernel_timing_trigger(1, 109);
+
+ switch (flags[19] - 1) {
+ case 0:
+ room_305_init1();
+ break;
+ case 1:
+ default:
+ room_305_init2();
+ break;
+ }
+
+ global[g009] = -1;
+ if (global[g066] == 1)
+ global_digi_play(8);
+}
+
+static void room_305_anim1() {
+ if (kernel_anim[aa[0]].frame != aainfo[0]._frame)
+ aainfo[0]._frame = kernel_anim[aa[0]].frame;
+
+ if (global[player_hyperwalked] == -1) {
+ int16 f = scratch._92 - 1;
+ aainfo[0]._frame = f;
+ kernel_reset_animation(aa[0], f);
+ }
+}
+
+static void room_305_anim2() {
+ if (kernel_anim[aa[1]].frame != aainfo[1]._frame) {
+ int16 f = kernel_anim[aa[1]].frame;
+ aainfo[1]._frame = f;
+
+ if (f == 61) {
+ global[g009] = 0;
+ aainfo[1]._val3 = 10;
+ digi_play_build(305, 'b', 1, 1);
+ scratch._a4 = 1;
+ } else if (f == 66 && aainfo[1]._val3 == 10) {
+ aainfo[1]._frame = 62;
+ kernel_reset_animation(aa[1], 62);
+ }
+ }
+
+ if (kernel.trigger != 7 && kernel.trigger != 28)
+ return;
+
+ if (scratch._a4 == 1) {
+ global[g154] = 0;
+ aainfo[1]._frame = 67;
+ kernel_reset_animation(aa[1], 67);
+ scratch._a4 = 2;
+ }
+}
+
+static void room_305_anim3() {
+ int16 f = aainfo[2]._frame;
+ if (kernel_anim[aa[2]].frame != f)
+ f = aainfo[2]._frame = kernel_anim[aa[2]].frame;
+
+ if (global[player_hyperwalked] == -1 && f <= 23) {
+ aainfo[2]._frame = 23;
+ kernel_reset_animation(aa[2], 23);
+ kernel_synch(3, aa[2], 4, 0);
+ return;
+ }
+ if (global[player_hyperwalked] == -1 || f == 45) {
+ aainfo[2]._frame = 44;
+ kernel_reset_animation(aa[2], 44);
+ kernel_synch(3, aa[2], 4, 0);
+ }
+}
+
+static void room_305_anim4() {
+ int16 f = aainfo[3]._frame;
+ if (kernel_anim[aa[3]].frame != f)
+ f = aainfo[3]._frame = kernel_anim[aa[3]].frame;
+
+ if (global[player_hyperwalked] == -1 && f <= 23) {
+ aainfo[3]._frame = 23;
+ kernel_reset_animation(aa[3], 23);
+ kernel_synch(3, aa[3], 4, 0);
+ return;
+ }
+ if (global[player_hyperwalked] == -1 || f == 45) {
+ aainfo[3]._frame = 44;
+ kernel_reset_animation(aa[3], 44);
+ kernel_synch(3, aa[3], 4, 0);
+ }
+}
+
+static void room_305_anim5() {
+ if (kernel_anim[aa[4]].frame != aainfo[4]._frame) {
+ int16 f = kernel_anim[aa[4]].frame;
+ aainfo[4]._frame = f;
+
+ if (scratch._aa == 1) {
+ if (f == 37) {
+ if (aainfo[4]._val3 == 11) {
+ aainfo[4]._frame = 35;
+ kernel_reset_animation(aa[4], 35);
+ }
+ } else if (f <= 37) {
+ if (f == 29) {
+ aainfo[4]._val3 = 12;
+ digi_play_build_ii('e', 1, 1);
+ scratch._a4 = 29;
+ } else if (f == 34 && aainfo[4]._val3 == 12) {
+ aainfo[4]._frame = 29;
+ kernel_reset_animation(aa[4], 29);
+ }
+ }
+ } else if (scratch._aa == 2) {
+ if (f == 15) {
+ if (aainfo[4]._val3 == 11) {
+ aainfo[4]._frame = 12;
+ kernel_reset_animation(aa[4], 12);
+ }
+ } else if (f <= 15) {
+ if (f == 5) {
+ aainfo[4]._val3 = 12;
+ digi_play_build_ii('e', 3, 1);
+ scratch._a4 = 500;
+ } else if (f == 11 && aainfo[4]._val3 == 12) {
+ aainfo[4]._frame = 5;
+ kernel_reset_animation(aa[4], 5);
+ }
+ }
+ }
+ }
+
+ if (kernel.trigger != 7 && kernel.trigger != 28)
+ return;
+
+ switch (scratch._a4) {
+ case 29:
+ kernel_timing_trigger(30, 28);
+ aainfo[4]._val3 = 11;
+ scratch._a4 = 30;
+ break;
+ case 30:
+ aainfo[4]._val3 = 12;
+ aainfo[4]._frame = 29;
+ kernel_reset_animation(aa[4], 29);
+ digi_play_build_ii('e', 10, 1);
+ scratch._a4 = 31;
+ break;
+ case 31:
+ aainfo[4]._val3 = 13;
+ aainfo[4]._frame = 35;
+ kernel_reset_animation(aa[4], 35);
+ scratch._a4 = -1;
+ break;
+ case 500:
+ kernel_timing_trigger(30, 28);
+ aainfo[4]._val3 = 11;
+ scratch._a4 = 501;
+ break;
+ case 501:
+ aainfo[4]._val3 = 12;
+ aainfo[4]._frame = 5;
+ kernel_reset_animation(aa[4], 5);
+ digi_play_build_ii('e', 10, 1);
+ scratch._a4 = 502;
+ break;
+ case 502:
+ aainfo[4]._val3 = 13;
+ aainfo[4]._frame = 11;
+ kernel_reset_animation(aa[4], 11);
+ scratch._a4 = -1;
+ break;
+ default:
+ break;
+ }
+}
+
+static void room_305_anim6() {
+ if (kernel_anim[aa[5]].frame != aainfo[5]._frame) {
+ int16 result = -1;
+ aainfo[5]._frame = kernel_anim[aa[5]].frame;
+ int16 f = aainfo[5]._frame;
+
+ if (f >= 3 && f <= 76) {
+ switch (f) {
+ case 3:
+ digi_play_build(305, 'b', 2, 1);
+ aainfo[5]._val3 = 3;
+ scratch._a4 = 10;
+ break;
+ case 4: case 5: case 6: case 7: case 8: case 9:
+ if (aainfo[5]._val3 == 3)
+ result = imath_random(3, 8);
+ else
+ result = 9;
+ break;
+ case 15:
+ result = 19;
+ break;
+ case 24:
+ aainfo[5]._val3 = 5;
+ digi_play_build(305, 'h', 1, 1);
+ scratch._a4 = 12;
+ break;
+ case 25: case 26: case 27: case 28: case 29: case 30:
+ case 31: case 32: case 33: case 34: case 35:
+ case 57: case 58: case 59: case 60: case 61: case 62: case 63:
+ case 69: case 70: case 71: case 72: case 73: case 74: case 75: case 76: {
+ int16 v = aainfo[5]._val3;
+ if (v == 11)
+ result = imath_random(68, 75);
+ else if (v < 11) {
+ if (v == 0)
+ result = 24;
+ else if (v == 4)
+ result = imath_random(56, 62);
+ else if (v == 5)
+ result = imath_random(25, 33);
+ else if (v == 6)
+ result = 34;
+ }
+ break;
+ }
+ default:
+ break;
+ }
+ }
+
+ if (result >= 0) {
+ kernel_reset_animation(aa[5], result);
+ aainfo[5]._frame = result;
+ }
+ }
+
+ if (kernel.trigger != 7 && kernel.trigger != 105)
+ return;
+
+ switch (scratch._a4) {
+ case 10:
+ aainfo[5]._val3 = 0;
+ break;
+ case 12:
+ aainfo[5]._val3 = 6;
+ kernel_timing_trigger(90, 105);
+ scratch._a4++;
+ break;
+ case 13:
+ aainfo[5]._val3 = 5;
+ digi_play_build(305, 'h', 2, 1);
+ scratch._a4++;
+ break;
+ case 14:
+ aainfo[5]._val3 = 0;
+ kernel_timing_trigger(45, 105);
+ scratch._a4++;
+ global[g009] = -1;
+ global_digi_play(6);
+ break;
+ case 15:
+ if (global[g065] != 0) {
+ aainfo[5]._val3 = 4;
+ digi_play_build(305, 'b', 3, 1);
+ } else {
+ aainfo[5]._val3 = 11;
+ digi_play_build(305, 'e', 3, 1);
+ }
+ scratch._a4++;
+ break;
+ case 16:
+ aainfo[5]._val3 = 0;
+ kernel_timing_trigger(45, 105);
+ scratch._a4++;
+ break;
+ case 17:
+ if (global[g065] != 0) {
+ aainfo[5]._val3 = 11;
+ digi_play_build(305, 'e', 4, 1);
+ } else {
+ aainfo[5]._val3 = 4;
+ digi_play_build(305, 'b', 4, 1);
+ }
+ scratch._a4++;
+ break;
+ case 18:
+ kernel_abort_animation(aa[5]);
+ aainfo[5]._active = 0;
+ aa[6] = kernel_run_animation(kernel_name('h', 3), 0);
+ aainfo[6]._active = -1;
+ kernel_timing_trigger(1, 109);
+ break;
+ default:
+ break;
+ }
+}
+
+static void room_305_anim7() {
+ if (kernel_anim[aa[6]].frame != aainfo[6]._frame) {
+ int16 result = -1;
+ aainfo[6]._frame = kernel_anim[aa[6]].frame;
+ int16 f = aainfo[6]._frame;
+
+ if (f == 25) {
+ aainfo[6]._val3 = 7;
+ digi_play_build(305, 'h', 3, 1);
+ scratch._a4 = 30;
+ } else if ((f >= 26 && f <= 34) || (f >= 39 && f <= 46)) {
+ int16 v = aainfo[6]._val3;
+ if (v == 10)
+ result = imath_random(38, 44);
+ else if (v < 10) {
+ if (v == 0)
+ result = 25;
+ else if (v == 2)
+ result = 45;
+ else if (v == 7)
+ result = imath_random(26, 33);
+ }
+ }
+
+ if (result >= 0) {
+ kernel_reset_animation(aa[6], result);
+ aainfo[6]._frame = result;
+ }
+ }
+
+ if (kernel.trigger != 7 && kernel.trigger != 105)
+ return;
+
+ switch (scratch._a4) {
+ case 30:
+ aainfo[6]._val3 = 0;
+ kernel_timing_trigger(45, 105);
+ scratch._a4++;
+ break;
+ case 31:
+ case 33:
+ aainfo[6]._val3 = 2;
+ kernel_timing_trigger(45, 105);
+ scratch._a4++;
+ break;
+ case 32:
+ aainfo[6]._val3 = 10;
+ digi_play_build(305, 'h', 4, 1);
+ scratch._a4++;
+ break;
+ case 34:
+ kernel_abort_animation(aa[6]);
+ aainfo[6]._active = 0;
+ aa[7] = kernel_run_animation(kernel_name('h', 4), 106);
+ kernel_timing_trigger(1, 109);
+ break;
+ default:
+ break;
+ }
+}
+
+static void room_305_anim8() {
+ if (kernel_anim[aa[7]].frame == aainfo[7]._frame) {
+ if (kernel.trigger != 7 && kernel.trigger != 105)
+ return;
+ } else {
+ int16 f = kernel_anim[aa[7]].frame;
+ aainfo[7]._frame = f;
+ int16 result = -1;
+
+ switch (f) {
+ case 1: case 2: case 3: case 4: case 5: case 6: case 7: case 8: case 9:
+ case 10: case 11: case 12: case 13:
+ case 18: case 19: case 20: case 21: case 22: case 23:
+ case 28: case 29: case 30: case 31: case 32: case 33: case 34:
+ case 39:
+ case 42: case 43: case 44: case 45: case 46:
+ case 52: case 53: case 54: case 55: case 56: case 57: case 58: case 59: case 60:
+ switch (aainfo[7]._val3) {
+ case 0: result = 0; break;
+ case 4: result = imath_random(51, 59); break;
+ case 5: result = imath_random(1, 4); break;
+ case 9: result = imath_random(28, 33); break;
+ case 11: result = imath_random(41, 45); break;
+ case 12: result = imath_random(17, 22); break;
+ case 13: result = 25; break;
+ case 14: result = 36; aainfo[7]._val3 = 0; break;
+ default: break;
+ }
+ break;
+ case 27:
+ if (scratch._a4 == 42)
+ digi_play_build(305, 'h', 6, 1);
+ else
+ digi_play_build(305, 'h', 7, 1);
+ digi_initial_volume(100);
+ aainfo[7]._val3 = 9;
+ break;
+ default:
+ break;
+ }
+
+ if (result >= 0) {
+ aainfo[7]._frame = result;
+ kernel_reset_animation(aa[7], result);
+ }
+ }
+
+ if (kernel.trigger != 7 && kernel.trigger != 105)
+ return;
+
+ switch (scratch._a4) {
+ case 40:
+ case 44:
+ case 48:
+ case 50:
+ aainfo[7]._val3 = 0;
+ kernel_timing_trigger(45, 105);
+ scratch._a4++;
+ break;
+ case 41:
+ if (global[g080] != 0) {
+ aainfo[7]._val3 = 5;
+ digi_play_build(305, 'h', 5, 1);
+ } else {
+ aainfo[7]._val3 = 13;
+ }
+ scratch._a4++;
+ break;
+ case 42:
+ case 46:
+ if (global[g080] != 0) {
+ aainfo[7]._val3 = 0;
+ kernel_timing_trigger(90, 105);
+ } else {
+ aainfo[7]._val3 = 14;
+ kernel_timing_trigger(90, 105);
+ }
+ scratch._a4++;
+ break;
+ case 43:
+ if (global[g080] != 0) {
+ aainfo[7]._val3 = 12;
+ digi_play_build(305, 'r', 1, 1);
+ } else {
+ aainfo[7]._val3 = 11;
+ digi_play_build(305, 'e', 5, 1);
+ }
+ scratch._a4++;
+ break;
+ case 45:
+ aainfo[7]._val3 = 13;
+ scratch._a4++;
+ break;
+ case 47:
+ aainfo[7]._val3 = 4;
+ digi_play_build(305, 'b', 7, 1);
+ scratch._a4++;
+ break;
+ case 49:
+ aainfo[7]._val3 = 5;
+ digi_play_build(305, 'h', 8, 1);
+ scratch._a4++;
+ break;
+ case 51:
+ kernel_abort_animation(aa[7]);
+ aainfo[7]._active = 0;
+ aa[7] = kernel_run_animation(kernel_name('h', 6), 107);
+ aainfo[7]._active = -1;
+ kernel_timing_trigger(1, 109);
+ break;
+ default:
+ break;
+ }
+}
+
+static void room_305_anim9() {
+ if (kernel_anim[aa[8]].frame != aainfo[8]._frame) {
+ int16 f = kernel_anim[aa[8]].frame;
+ aainfo[8]._frame = f;
+
+ if (scratch._aa == 1) {
+ if (f == 28) {
+ if (aainfo[8]._val3 == 11) {
+ digi_play_build('e', '_', 1, 2);
+ scratch._a4 = 28;
+ }
+ } else if (f <= 28) {
+ if (f == 5) {
+ aainfo[8]._val3 = 12;
+ digi_play_build(305, 'e', 2, 1);
+ scratch._a4 = 5;
+ kernel_seq_delete(seq[0]);
+ } else if (f == 10 && aainfo[8]._val3 == 12) {
+ aainfo[8]._frame = 5;
+ kernel_reset_animation(aa[8], 5);
+ }
+ }
+ }
+ }
+
+ if (kernel.trigger == 7 || kernel.trigger == 28) {
+ if (scratch._a4 == 5) {
+ aainfo[8]._val3 = 11;
+ aainfo[8]._frame = 11;
+ kernel_reset_animation(aa[8], 11);
+ scratch._a4 = -1;
+ }
+ }
+ if (kernel.trigger != 8 && kernel.trigger != 28)
+ return;
+ if (scratch._a4 == 28)
+ scratch._a4 = -1;
+}
+
+static void room_305_anim10() {
+ if (kernel_anim[aa[9]].frame != aainfo[9]._frame) {
+ int16 var_2 = -1;
+ aainfo[9]._frame = kernel_anim[aa[9]].frame;
+ int16 f = aainfo[9]._frame;
+
+ if (f == 79) {
+ kernel_abort_animation(aa[9]);
+ aainfo[9]._active = 0;
+ player.commands_allowed = -1;
+ if (digi_val1 != 0)
+ kernel_timing_trigger(1, 109);
+ global[g131] = -1;
+ kernel_reset_animation(scratch._9a, 1);
+ kernel_synch(KERNEL_ANIM, scratch._9a, KERNEL_NOW, 0);
+ global[g133] = 0;
+ } else if (f == 42) {
+ digi_play_build(305, 'e', 1, 1);
+ scratch._a4 = 666;
+ } else if (f == 43 || f == 44) {
+ if (aainfo[9]._val3 == 15)
+ var_2 = imath_random(42, 43);
+ }
+
+ if (var_2 >= 0) {
+ kernel_reset_animation(aa[9], var_2);
+ aainfo[9]._frame = var_2;
+ }
+ }
+
+ if (kernel.trigger == 7 || kernel.trigger == 105) {
+ if (scratch._a4 == 666)
+ aainfo[9]._val3 = 0;
+ }
}
static void room_305_daemon() {
+ switch (kernel.trigger) {
+ case 7:
+ if (global[walker_converse_state] != 0) {
+ global[walker_converse_state] = 0;
+ close_journal(3);
+ player.commands_allowed = -1;
+ if (digi_val1 != 0)
+ kernel_timing_trigger(1, 109);
+ } else {
+ if (scratch._a4 == 300) {
+ kernel_abort_animation(scratch._9e);
+ scratch._a4 = -1;
+ scratch._a8 = 0;
+ kernel_synch(KERNEL_PLAYER, 0, KERNEL_NOW, 0);
+ scratch._aa = 1;
+ player.walker_visible = -1;
+ global[g150] = -1;
+ scratch._90 = 6;
+ } else if (scratch._a4 == 451) {
+ kernel_abort_animation(scratch._9e);
+ kernel_synch(KERNEL_PLAYER, 0, KERNEL_NOW, 0);
+ scratch._a4 = -1;
+ scratch._a8 = 0;
+ scratch._8c = 3;
+ player.walker_visible = -1;
+ global[g135] = -1;
+ player.commands_allowed = 0;
+ }
+ }
+ break;
+
+ case 24:
+ if (scratch._8c == 3) {
+ if (global[g074] == 0) {
+ global[g074] = -1;
+ aa[9] = kernel_run_animation(kernel_name('e', 1), 0);
+ aainfo[9]._active = -1;
+ aainfo[9]._val3 = 15;
+ kernel_flip_hotspot(28, 0);
+ } else {
+ aa[0] = kernel_run_animation(kernel_name('Z', 1), 102);
+ aainfo[0]._active = -1;
+ scratch._92 = 38;
+ }
+ kernel_reset_animation(scratch._9a, 0);
+ kernel_synch(KERNEL_ANIM, aa[2], KERNEL_ANIM, scratch._9a);
+ kernel_synch(KERNEL_PLAYER, 0, KERNEL_ANIM, aa[2]);
+ global[g133] = 1;
+ kernel_timing_trigger(1, 109);
+ } else if (scratch._8c == 5) {
+ if (scratch._aa == 1 || scratch._aa == 2) {
+ aa[4] = kernel_run_animation(kernel_name('F', scratch._aa), 108);
+ aainfo[4]._active = -1;
+ scratch._96 = 4;
+ kernel_reset_animation(scratch._9a, 0);
+ kernel_synch(KERNEL_ANIM, aa[4], KERNEL_ANIM, scratch._9a);
+ global[g133] = 1;
+ kernel_timing_trigger(1, 109);
+ }
+ }
+ break;
+
+ case 25:
+ if (scratch._8e == 2) {
+ aa[3] = kernel_run_animation(kernel_name('R', 1), 101);
+ aainfo[3]._active = -1;
+ scratch._94 = 3;
+ kernel_reset_animation(scratch._9c, 0);
+ kernel_synch(KERNEL_ANIM, aa[3], KERNEL_ANIM, scratch._9c);
+ global[g143] = 1;
+ kernel_timing_trigger(1, 109);
+ }
+ break;
+
+ case 26:
+ if (scratch._90 == 1) {
+ kernel_reset_animation(scratch._9a, 0);
+ kernel_reset_animation(scratch._9c, 0);
+ global[g133] = 1;
+ global[g143] = 1;
+ } else if (scratch._90 == 6 && scratch._aa == 1) {
+ aa[8] = kernel_run_animation(kernel_name('P', 1), 103);
+ aainfo[8]._active = -1;
+ scratch._98 = 8;
+ kernel_reset_animation(scratch._9a, 0);
+ kernel_reset_animation(scratch._9c, 0);
+ kernel_synch(KERNEL_ANIM, scratch._9a, KERNEL_ANIM, aa[8]);
+ kernel_synch(KERNEL_ANIM, scratch._9c, KERNEL_ANIM, aa[8]);
+ global[g133] = 1;
+ global[g143] = 1;
+ kernel_timing_trigger(1, 109);
+ }
+ break;
+
+ case 27:
+ kernel_abort_animation(aa[1]);
+ aainfo[1]._active = 0;
+ global[g131] = -1;
+ kernel_reset_animation(scratch._9a, 1);
+ kernel_synch(KERNEL_ANIM, scratch._9a, KERNEL_NOW, 0);
+ global[g133] = 0;
+ player.commands_allowed = -1;
+ if (digi_val1 != 0)
+ kernel_timing_trigger(1, 109);
+ break;
+
+ case 100:
+ kernel_abort_animation(aa[0]);
+ aainfo[0]._active = 0;
+ if (global[g066] == 1) {
+ aa[5] = kernel_run_animation(kernel_name('b', 1), 0);
+ aainfo[5]._active = -1;
+ kernel_timing_trigger(1, 109);
+ } 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;
+ if (digi_val1 != 0)
+ kernel_timing_trigger(1, 109);
+ }
+ break;
+
+ case 101: {
+ int16 idx = scratch._94;
+ kernel_abort_animation(aa[idx]);
+ aainfo[idx]._active = 0;
+ kernel_reset_animation(scratch._9c, 1);
+ kernel_synch(KERNEL_ANIM, scratch._9c, KERNEL_NOW, 0);
+ global[g143] = 0;
+ player.commands_allowed = -1;
+ if (digi_val1 != 0)
+ kernel_timing_trigger(1, 109);
+ break;
+ }
+
+ case 102:
+ global[g060] = -1;
+ new_room = 210;
+ break;
+
+ case 103:
+ if (scratch._aa == 1) {
+ kernel_abort_animation(aa[8]);
+ aainfo[8]._active = 0;
+ kernel_reset_animation(scratch._9c, 1);
+ kernel_synch(KERNEL_ANIM, scratch._9c, KERNEL_NOW, 0);
+ global[g143] = 0;
+ kernel_reset_animation(scratch._9a, 1);
+ kernel_synch(KERNEL_ANIM, scratch._9a, KERNEL_NOW, 0);
+ global[g133] = 0;
+ kernel_flip_hotspot(145, false);
+ if (!player_has(7))
+ inter_move_object(7, 2);
+ global[g069] = -1;
+ global[player_score] = -1;
+ player.commands_allowed = -1;
+ if (digi_val1 != 0)
+ kernel_timing_trigger(1, 109);
+ }
+ break;
+
+ case 104:
+ kernel_abort_animation(aa[1]);
+ // unused variable set to 0 in original
+ global[g141] = -1;
+ kernel_reset_animation(scratch._9c, 1);
+ kernel_synch(KERNEL_ANIM, scratch._9c, KERNEL_NOW, 0);
+ player.walker_visible = -1;
+ global[g143] = 0;
+ kernel_synch(KERNEL_PLAYER, 0, KERNEL_NOW, 0);
+ scratch._a6 = kernel_run_animation_write(0);
+ kernel_reset_animation(scratch._a6, 41);
+ kernel_position_anim(scratch._a6, 118, 142, 100, 6);
+ global[walker_converse_now] = 1;
+ global[g007] = 2;
+ kernel_synch(KERNEL_ANIM, scratch._a6, KERNEL_NOW, 0);
+ kernel_timing_trigger(1, 109);
+ break;
+
+ case 106:
+ kernel_abort_animation(aa[7]);
+ aa[7] = kernel_run_animation(kernel_name('h', 5), 0);
+ aainfo[7]._active = -1;
+ if (global[g080] != 0)
+ digi_play_build(305, 'b', 5, 1);
+ else
+ digi_play_build(305, 'b', 6, 1);
+ aainfo[7]._val3 = 4;
+ scratch._a4 = 40;
+ kernel_timing_trigger(1, 109);
+ break;
+
+ case 107:
+ kernel_abort_animation(aa[7]);
+ global[g066] = 2;
+ 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;
+ if (digi_val1 != 0)
+ kernel_timing_trigger(1, 109);
+ break;
+
+ case 108:
+ kernel_abort_animation(aa[4]);
+ aainfo[4]._active = 0;
+ kernel_reset_animation(scratch._9a, 1);
+ kernel_synch(KERNEL_ANIM, scratch._9a, KERNEL_NOW, 0);
+ global[g133] = 0;
+ global[player_score] = -1;
+ player.commands_allowed = -1;
+ if (digi_val1 != 0)
+ kernel_timing_trigger(1, 109);
+ break;
+
+ case 109:
+ if (global[g066] < 2) {
+ digi_initial_volume(15);
+ digi_play_build(305, '_', 1, 3);
+ digi_val2 = -1;
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ global_anim1(2, scratch._9a, global[g131], &global[g132]);
+ global_anim2(1, scratch._9c, global[g141], &global[g142]);
+ if (scratch._a8 != 0)
+ kernel_random_frame(scratch._9e, &global[g151], global[g154]);
+ if (aainfo[0]._active != 0)
+ room_305_anim1();
+ if (aainfo[3]._active != 0)
+ room_305_anim4();
+ if (aainfo[2]._active != 0)
+ room_305_anim3();
+ if (aainfo[4]._active != 0)
+ room_305_anim5();
+ if (aainfo[8]._active != 0)
+ room_305_anim9();
+ if (aainfo[1]._active != 0)
+ room_305_anim2();
+ if (aainfo[5]._active != 0)
+ room_305_anim6();
+ if (aainfo[6]._active != 0)
+ room_305_anim7();
+ if (aainfo[7]._active != 0)
+ room_305_anim8();
+ if (aainfo[9]._active != 0)
+ room_305_anim10();
+ if (global[walker_converse_now] != 0)
+ global_anim3(scratch._a6, &global[g008]);
}
static void room_305_pre_parser() {
+ if (player_parse(13, 34, 0))
+ player.walk_off_edge_to_room = 301;
+
+ if (player_parse(13, 39, 0))
+ player.walk_off_edge_to_room = 306;
}
static void room_305_parser() {
+ if (global[walker_converse_state] != 0) {
+ player.commands_allowed = 0;
+ digi_play_build_ii('c', 1, 1);
+ goto handled;
+ }
+
+ if (player_parse(28, 0)) {
+ global[g154] = 2;
+ player.walker_visible = 0;
+ player.commands_allowed = 0;
+ scratch._9e = kernel_run_animation_talk('b', 9, 0);
+ kernel_position_anim(scratch._9e, player.x, player.y, player.scale, player.depth);
+ scratch._a8 = -1;
+ kernel_synch(KERNEL_ANIM, scratch._9e, KERNEL_PLAYER, 0);
+ digi_play_build_ii('b', 1, 1);
+ scratch._a4 = 451;
+ kernel.trigger_setup_mode = 1;
+ kernel_timing_trigger(1, 109);
+ goto handled;
+ }
+
+ if (player_parse(27, 0)) {
+ scratch._8c = 3;
+ global[g135] = -1;
+ player.commands_allowed = 0;
+ goto handled;
+ }
+
+ if (global[player_selected_object] >= 0) {
+ goto handled;
+ }
+
+ if (player_parse(114, 118, 0)) {
+ global[player_score] = 0;
+ digi_stop(3);
+ player.commands_allowed = 0;
+ global[g135] = -1;
+ scratch._8c = 5;
+ scratch._aa = 1;
+ goto handled;
+ }
+
+ if (player_parse(114, 142, 0)) {
+ global[player_score] = 0;
+ digi_stop(3);
+ player.commands_allowed = 0;
+ global[g135] = -1;
+ scratch._8c = 5;
+ scratch._aa = 2;
+ goto handled;
+ }
+
+ if (player_parse(126, 145, 0)) {
+ global[player_score] = 0;
+ digi_stop(3);
+ global[g154] = 2;
+ player.commands_allowed = 0;
+ player.walker_visible = 0;
+ scratch._9e = kernel_run_animation_talk('b', 1, 0);
+ kernel_position_anim(scratch._9e, player.x, player.y, player.scale, player.depth);
+ kernel_synch(KERNEL_ANIM, scratch._9e, KERNEL_PLAYER, 0);
+ digi_play_build_ii('b', 3, 1);
+ scratch._a4 = 300;
+ scratch._a8 = -1;
+ kernel.trigger_setup_mode = 1;
+ kernel_timing_trigger(1, 109);
+ goto handled;
+ }
+
+ if (player_parse(78, 119, 0)) {
+ player.commands_allowed = 0;
+ global[g135] = -1;
+ scratch._8c = 3;
+ goto handled;
+ }
+
+
+ goto done;
+
+handled:
+ player.command_ready = false;
+
+done:
+ ;
}
void room_305_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._aa);
}
void room_305_preload() {
Commit: e34250dd36bda47258a1986ea4ffa7769f5d2d18
https://github.com/scummvm/scummvm/commit/e34250dd36bda47258a1986ea4ffa7769f5d2d18
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-06-11T21:48:40+10:00
Commit Message:
MADS: FOREST: Implemented room 306
Changed paths:
engines/mads/madsv2/forest/rooms/room306.cpp
diff --git a/engines/mads/madsv2/forest/rooms/room306.cpp b/engines/mads/madsv2/forest/rooms/room306.cpp
index da270f67e99..8d44e900d4b 100644
--- a/engines/mads/madsv2/forest/rooms/room306.cpp
+++ b/engines/mads/madsv2/forest/rooms/room306.cpp
@@ -23,14 +23,18 @@
#include "mads/madsv2/core/game.h"
#include "mads/madsv2/core/imath.h"
#include "mads/madsv2/core/inter.h"
+#include "mads/madsv2/core/digi.h"
#include "mads/madsv2/core/kernel.h"
+#include "mads/madsv2/core/midi.h"
+#include "mads/madsv2/core/player.h"
#include "mads/madsv2/core/sound.h"
+#include "mads/madsv2/core/sprite.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/forest/global.h"
-#include "mads/madsv2/forest/rooms/section1.h"
+#include "mads/madsv2/forest/journal.h"
#include "mads/madsv2/forest/rooms/room306.h"
namespace MADS {
@@ -39,10 +43,26 @@ namespace Forest {
namespace Rooms {
struct Scratch {
- int16 sprite[10]; /* Sprite series handles */
- int16 sequence[10]; /* Sequence handles */
- int16 animation[10]; /* Animation handles */
+ int16 sprite[10];
+ int16 sequence[10];
+ int16 animation[10];
AnimationInfo animation_info[10];
+ int16 _pad8C[2];
+ int16 x90;
+ int16 x92;
+ int16 x94;
+ int16 _pad96[2];
+ int16 x9a;
+ int16 x9c;
+ int16 x9e;
+ int16 xa0;
+ int16 xa2;
+ int16 xa4;
+ int16 xa6;
+ int16 xa8;
+ int16 xaa;
+ int16 xac;
+ int16 xae;
};
static Scratch scratch;
@@ -54,22 +74,948 @@ static Scratch scratch;
#define aainfo scratch.animation_info
+static void room_306_init1() {
+ if (previous_room == KERNEL_RESTORING_GAME) {
+ scratch.xaa = -1;
+ scratch.x9c = kernel_run_animation_disp('r', 6, 0);
+ kernel_position_anim(scratch.x9c, 63, 134, 91, 3);
+ global[g143] = 1;
+ scratch.x9a = kernel_run_animation_disp('e', 2, 0);
+ kernel_position_anim(scratch.x9a, 88, 122, 86, 5);
+ global[g133] = 1;
+ global[g131] = -1;
+ global[g141] = -1;
+ kernel_reset_animation(scratch.x9a, 2);
+ kernel_reset_animation(scratch.x9c, 2);
+ global[g133] = 0;
+ global[g143] = 0;
+ player.walker_visible = -1;
+ player.commands_allowed = -1;
+ } else {
+ global[g131] = 0;
+ global[g141] = 0;
+ global[g133] = 1;
+ global[g143] = 1;
+ player.x = 103;
+ player.y = 136;
+ player.facing = 8;
+ }
+
+ if (previous_room == 199) {
+ scratch.xaa = -1;
+ global[g131] = 0;
+ global[g141] = 0;
+ scratch.x9c = kernel_run_animation_disp('r', 6, 0);
+ kernel_position_anim(scratch.x9c, 63, 134, 91, 3);
+ scratch.x9a = kernel_run_animation_disp('e', 2, 0);
+ kernel_position_anim(scratch.x9a, 88, 122, 86, 5);
+ global[g131] = -1;
+ global[g141] = -1;
+ kernel_reset_animation(scratch.x9a, 2);
+ kernel_reset_animation(scratch.x9c, 2);
+ global[g133] = 0;
+ global[g143] = 0;
+ restore_player();
+ player.commands_allowed = -1;
+ player.walker_visible = -1;
+ }
+
+ if (global[g066] == 3)
+ return;
+
+ aa[4] = kernel_run_animation(kernel_name('t', 5), 0);
+ aainfo[4]._active = -1;
+ aainfo[4]._val3 = 3;
+ aa[2] = kernel_run_animation(kernel_name('s', 1), 0);
+ aainfo[2]._active = -1;
+ aainfo[2]._val3 = (global[g066] == 0) ? 4 : 3;
+ aa[5] = kernel_run_animation(kernel_name('t', 7), 0);
+ aainfo[5]._active = -1;
+ aainfo[5]._val3 = 1;
+ if (global[g066] == 0) {
+ aa[7] = kernel_run_animation(kernel_name('t', 2), 0);
+ aainfo[7]._active = -1;
+ aainfo[7]._val3 = 4;
+ }
+
+ if (previous_room != KERNEL_RESTORING_GAME && previous_room != 199) {
+ aa[6] = kernel_run_animation(kernel_name('y', 1), 104);
+ }
+}
+
+static void room_306_init2() {
+ if (previous_room == KERNEL_RESTORING_GAME) {
+ scratch.xaa = -1;
+ scratch.x9c = kernel_run_animation_disp('r', 6, 0);
+ kernel_position_anim(scratch.x9c, 63, 134, 91, 3);
+ global[g143] = 1;
+ scratch.x9a = kernel_run_animation_disp('e', 2, 0);
+ kernel_position_anim(scratch.x9a, 88, 122, 86, 5);
+ global[g133] = 1;
+ global[g131] = -1;
+ global[g141] = -1;
+ kernel_reset_animation(scratch.x9a, 2);
+ kernel_reset_animation(scratch.x9c, 2);
+ global[g133] = 0;
+ global[g143] = 0;
+ player.walker_visible = -1;
+ player.commands_allowed = -1;
+ } else {
+ global[g131] = 0;
+ global[g141] = 0;
+ global[g133] = 1;
+ global[g143] = 1;
+ player.x = 103;
+ player.y = 136;
+ player.facing = 8;
+ }
+
+ if (previous_room == 199) {
+ scratch.xaa = -1;
+ global[g131] = 0;
+ global[g141] = 0;
+ scratch.x9c = kernel_run_animation_disp('r', 6, 0);
+ kernel_position_anim(scratch.x9c, 63, 134, 91, 3);
+ scratch.x9a = kernel_run_animation_disp('e', 2, 0);
+ kernel_position_anim(scratch.x9a, 88, 122, 86, 5);
+ player.x = 116;
+ player.y = 130;
+ player.facing = 4;
+ global[g131] = -1;
+ global[g141] = -1;
+ kernel_reset_animation(scratch.x9a, 2);
+ kernel_reset_animation(scratch.x9c, 2);
+ global[g133] = 0;
+ global[g143] = 0;
+ restore_player();
+ player.commands_allowed = -1;
+ player.walker_visible = -1;
+ }
+
+ if (global[g066] == 3)
+ return;
+
+ aa[8] = kernel_run_animation(kernel_name('y', 1), 0);
+ aainfo[8]._active = -1;
+ aa[3] = kernel_run_animation("*rm306t11", 0);
+ aainfo[3]._active = -1;
+ aainfo[3]._val3 = 4;
+ aa[1] = kernel_run_animation("*rm306t10", 0);
+ kernel_reset_animation(aa[1], 60);
+ aainfo[1]._active = -1;
+ aainfo[1]._val3 = 11;
+ aa[4] = kernel_run_animation(kernel_name('t', 5), 0);
+ aainfo[4]._active = -1;
+ aainfo[4]._val3 = 3;
+ aa[2] = kernel_run_animation(kernel_name('s', 1), 0);
+ aainfo[2]._active = -1;
+ aainfo[2]._val3 = (global[g066] == 0) ? 4 : 3;
+ aa[5] = kernel_run_animation(kernel_name('t', 7), 0);
+ aainfo[5]._active = -1;
+ aainfo[5]._val3 = 1;
+}
+
+static void room_306_init3() {
+ scratch.xaa = -1;
+ global[g131] = 0;
+ global[g141] = 0;
+ scratch.x9c = kernel_run_animation_disp('r', 6, 0);
+ kernel_position_anim(scratch.x9c, 63, 134, 91, 3);
+ scratch.x9a = kernel_run_animation_disp('e', 2, 0);
+ kernel_position_anim(scratch.x9a, 88, 122, 86, 5);
+
+ if (previous_room != KERNEL_RESTORING_GAME) {
+ player.x = 116;
+ player.y = 130;
+ player.facing = 4;
+ }
+
+ if (previous_room == KERNEL_RESTORING_GAME) {
+ global[g131] = -1;
+ global[g141] = -1;
+ kernel_reset_animation(scratch.x9a, 2);
+ kernel_reset_animation(scratch.x9c, 2);
+ global[g133] = 0;
+ global[g143] = 0;
+ return;
+ }
+
+ if (previous_room == 199) {
+ global[g131] = -1;
+ global[g141] = -1;
+ kernel_reset_animation(scratch.x9a, 2);
+ kernel_reset_animation(scratch.x9c, 2);
+ global[g133] = 0;
+ global[g143] = 0;
+ restore_player();
+ player.commands_allowed = -1;
+ player.walker_visible = -1;
+ return;
+ }
+
+ if (previous_room == 305) {
+ aa[0] = kernel_run_animation(kernel_name('t', 9), 100);
+ aainfo[0]._active = -1;
+ scratch.x92 = 50;
+ return;
+ }
+
+ global[g131] = -1;
+ global[g141] = -1;
+ kernel_reset_animation(scratch.x9a, 2);
+ kernel_reset_animation(scratch.x9c, 2);
+ global[g133] = 0;
+ global[g143] = 0;
+ player.commands_allowed = -1;
+ player.walker_visible = -1;
+}
+
static void room_306_init() {
+ scratch.xa2 = 0;
+ scratch.xac = -1;
+ scratch.xae = -1;
+ scratch.xa4 = 0;
+
+ if (global[g066] >= 2)
+ kernel_flip_hotspot(180, 0);
+
+ if (previous_room != KERNEL_RESTORING_GAME) {
+ scratch.xaa = 0;
+ scratch.x9e = -1;
+
+ if (previous_room != 199) {
+ player.walker_visible = 0;
+ player.commands_allowed = 0;
+ }
+
+ for (int16 i = 0; i < 10; i++) {
+ aainfo[i]._active = 0;
+ aainfo[i]._frame = 1;
+ aainfo[i]._val3 = 0;
+ aainfo[i]._val4 = 0;
+ }
+
+ if (previous_room != 199) {
+ if (flags[20] != 3)
+ flags[20]++;
+ }
+ }
+
+ switch (flags[20]) {
+ case 1:
+ room_306_init1();
+ break;
+ case 2:
+ room_306_init2();
+ break;
+ case 3:
+ room_306_init3();
+ break;
+ }
+
+ switch (global[g066]) {
+ case 0:
+ case 1:
+ scratch.xa0 = 30;
+ kernel_timing_trigger(1, 117);
+ global[player_score] = 0;
+ break;
+ case 2:
+ kernel_timing_trigger(10, 110);
+ global[player_score] = 0;
+ break;
+ case 3:
+ kernel_timing_trigger(1, 118);
+ global[player_score] = -1;
+ break;
+ default:
+ break;
+ }
+
+ midi_stop();
+}
+
+static void room_306_anim1() {
+ int16 cur = kernel_anim[aa[0]].frame;
+ if (cur != aainfo[0]._frame)
+ aainfo[0]._frame = cur;
+ if (global[player_hyperwalked] == -1) {
+ aainfo[0]._frame = scratch.x92 - 1;
+ kernel_reset_animation(aa[0], aainfo[0]._frame);
+ }
+}
+
+static void room_306_anim7() {
+ int16 result = -1;
+ int16 cur = kernel_anim[aa[6]].frame;
+ if (cur != aainfo[6]._frame) {
+ aainfo[6]._frame = cur;
+ if (cur == 12) {
+ if (global[g066] == 3) {
+ digi_play_build_ii('b', 4, 1);
+ scratch.x9e = 90;
+ aainfo[6]._val3 = 12;
+ } else {
+ digi_play_build(306, 'r', 1, 1);
+ scratch.x9e++;
+ aainfo[6]._val3 = 6;
+ }
+ } else if (cur == 39) {
+ dont_frag_the_palette();
+ kernel_abort_animation(aa[6]);
+ aainfo[6]._active = 0;
+ scratch.xaa = 666;
+ scratch.x9c = kernel_run_animation_disp('r', 6, 0);
+ kernel_position_anim(scratch.x9c, 63, 134, 91, 3);
+ global[g141] = -1;
+ kernel_reset_animation(scratch.x9c, 2);
+ kernel_synch(KERNEL_ANIM, scratch.x9c, KERNEL_NOW, 0);
+ global[g143] = 0;
+ if (!player.been_here_before) {
+ scratch.xac = kernel_run_animation_write(0);
+ kernel_reset_animation(scratch.xac, 4);
+ kernel_position_anim(scratch.xac, 88, 122, 86, 5);
+ global[walker_converse_now] = 1;
+ global[g007] = 2;
+ kernel_synch(KERNEL_ANIM, scratch.xac, KERNEL_NOW, 0);
+ } else {
+ scratch.xaa = -1;
+ scratch.x9a = kernel_run_animation_disp('e', 2, 0);
+ kernel_position_anim(scratch.x9a, 88, 122, 86, 5);
+ global[g131] = -1;
+ kernel_reset_animation(scratch.x9a, 2);
+ kernel_synch(KERNEL_ANIM, scratch.x9a, KERNEL_NOW, 0);
+ global[g133] = 0;
+ player.commands_allowed = -1;
+ }
+ if (global[g066] != 3) {
+ scratch.xa0 = 30;
+ kernel_timing_trigger(1, 117);
+ } else {
+ kernel_timing_trigger(1, 118);
+ }
+ } else {
+ bool dispatch = (cur == 1) ||
+ (cur >= 13 && cur <= 19) ||
+ (cur == 24) ||
+ (cur >= 26 && cur <= 31);
+ if (dispatch) {
+ switch (aainfo[6]._val3) {
+ case 4: result = 0; break;
+ case 6: result = imath_random(13, 18); break;
+ case 7:
+ result = 6;
+ if (global[g066] == 3)
+ aainfo[6]._val3 = 12;
+ break;
+ case 8:
+ result = 22;
+ aainfo[6]._val3 = (scratch.x9e == 90) ? 13 : 4;
+ break;
+ case 12: result = imath_random(26, 30); break;
+ case 13:
+ result = 31;
+ player.walker_visible = -1;
+ kernel_synch(KERNEL_PLAYER, 0, KERNEL_ANIM, aa[6]);
+ player_walk(116, 130, 4);
+ break;
+ default: break;
+ }
+ }
+ }
+ if (result >= 0) {
+ kernel_reset_animation(aa[6], result);
+ aainfo[6]._frame = result;
+ }
+ }
+ if (kernel.trigger == 7 || kernel.trigger == 105) {
+ if (scratch.x9e == 90)
+ aainfo[6]._val3 = 8;
+ }
+}
+
+static void room_306_anim8() {
+ int16 result = -1;
+ int16 cur = kernel_anim[aa[7]].frame;
+ if (cur != aainfo[7]._frame) {
+ aainfo[7]._frame = cur;
+ if (cur >= 1 && cur <= 8) {
+ switch (aainfo[7]._val3) {
+ case 3: result = imath_random(2, 7); break;
+ case 4: result = 0; break;
+ case 5: result = 23; break;
+ default: break;
+ }
+ } else if (cur == 24) {
+ kernel_abort_animation(aa[7]);
+ aainfo[7]._active = 0;
+ aa[9] = kernel_run_animation(kernel_name('t', 6), 0);
+ aainfo[9]._active = -1;
+ aainfo[2]._val3 = 3;
+ scratch.xa0 = 100;
+ digi_initial_volume(100);
+ digi_play_build(305, '_', 1, 3);
+ digi_val2 = -1;
+ }
+ if (result >= 0) {
+ kernel_reset_animation(aa[7], result);
+ aainfo[7]._frame = result;
+ }
+ }
+ if (kernel.trigger != 7 && kernel.trigger != 105)
+ return;
+ switch (scratch.x9e) {
+ case 10:
+ aainfo[7]._val3 = 4;
+ kernel_timing_trigger(45, 105);
+ scratch.x9e++;
+ return;
+ case 11:
+ digi_play_build(306, 'k', 1, 1);
+ scratch.x9e++;
+ aainfo[2]._val3 = 3;
+ digi_stop(3);
+ scratch.xa4 = -1;
+ return;
+ case 12:
+ aainfo[2]._val3 = 4;
+ aainfo[7]._val3 = 4;
+ kernel_timing_trigger(5, 105);
+ scratch.x9e++;
+ scratch.xa4 = 0;
+ digi_stop(3);
+ digi_initial_volume(30);
+ digi_play_build(305, '_', 1, 3);
+ kernel_timing_trigger(1, 106);
+ digi_val2 = -1;
+ scratch.xa0 = 30;
+ return;
+ case 13:
+ aainfo[6]._val3 = 7;
+ return;
+ case 14:
+ aainfo[6]._val3 = 8;
+ kernel_timing_trigger(45, 105);
+ scratch.x9e++;
+ return;
+ case 15:
+ aainfo[6]._val3 = 4;
+ digi_stop(3);
+ scratch.xa4 = -1;
+ digi_play_build(306, 'l', 1, 1);
+ scratch.x9e++;
+ aainfo[4]._val3 = 16;
+ return;
+ case 16:
+ aainfo[4]._val3 = 3;
+ aainfo[7]._val3 = 5;
+ kernel_timing_trigger(45, 105);
+ scratch.x9e++;
+ scratch.xa4 = 0;
+ digi_initial_volume(30);
+ digi_play_build(305, '_', 1, 3);
+ kernel_timing_trigger(1, 106);
+ digi_val2 = -1;
+ scratch.xa0 = 30;
+ return;
+ default:
+ return;
+ }
+}
+
+static void room_306_anim9() {
+ int16 result = -1;
+ int16 cur = kernel_anim[aa[8]].frame;
+ if (cur == aainfo[8]._frame)
+ return;
+ aainfo[8]._frame = cur;
+ if (cur == 49) {
+ if (scratch.xae == 0)
+ kernel_timing_trigger(10, 112);
+ } else if (cur == 50) {
+ result = 49;
+ }
+ if (result >= 0) {
+ kernel_reset_animation(aa[8], result);
+ aainfo[8]._frame = result;
+ }
+}
+
+static void room_306_anim2() {
+ int16 result = -1;
+ int16 cur = kernel_anim[aa[1]].frame;
+ if (cur == aainfo[1]._frame)
+ return;
+ aainfo[1]._frame = cur;
+ if (cur == 59) {
+ kernel_abort_animation(aa[1]);
+ aainfo[1]._active = 0;
+ aainfo[3]._val3 = 10;
+ } else if (cur == 60) {
+ if (aainfo[1]._val3 == 11)
+ result = 59;
+ }
+ if (result >= 0) {
+ kernel_reset_animation(aa[1], result);
+ aainfo[1]._frame = result;
+ }
+}
+
+static void room_306_anim3() {
+ int16 result = -1;
+ int16 cur = kernel_anim[aa[2]].frame;
+ if (cur == aainfo[2]._frame)
+ return;
+ aainfo[2]._frame = cur;
+ if (cur >= 1 && cur <= 6) {
+ switch (aainfo[2]._val3) {
+ case 3: result = imath_random(1, 2); break;
+ case 4: result = 0; break;
+ case 14: result = imath_random(4, 5); break;
+ case 15: result = 3; break;
+ default: break;
+ }
+ }
+ if (result >= 0) {
+ kernel_reset_animation(aa[2], result);
+ aainfo[2]._frame = result;
+ }
+}
+
+static void room_306_anim4() {
+ int16 result = -1;
+ int16 cur = kernel_anim[aa[3]].frame;
+ if (cur == aainfo[3]._frame)
+ return;
+ aainfo[3]._frame = cur;
+ if (cur == 34) {
+ dont_frag_the_palette();
+ kernel_abort_animation(aa[3]);
+ aainfo[3]._active = 0;
+ global[g066] = 3;
+ global[player_score] = -1;
+ kernel_timing_trigger(1, 118);
+ aainfo[6]._val3 = 7;
+ } else if (cur == 1 || cur == 5) {
+ switch (aainfo[3]._val3) {
+ case 4:
+ result = (cur == 1) ? 0 : 4;
+ break;
+ case 9:
+ result = 1;
+ aainfo[3]._val3 = 4;
+ break;
+ case 10:
+ result = 6;
+ break;
+ default:
+ break;
+ }
+ }
+ if (result >= 0) {
+ kernel_reset_animation(aa[3], result);
+ aainfo[3]._frame = result;
+ }
+}
+
+static void room_306_anim5() {
+ int16 result = -1;
+ int16 cur = kernel_anim[aa[4]].frame;
+ if (cur == aainfo[4]._frame)
+ return;
+ aainfo[4]._frame = cur;
+ if ((cur >= 4 && cur <= 7) || (cur >= 10 && cur <= 16)) {
+ if (aainfo[4]._val3 == 3)
+ result = imath_random(3, 6);
+ else if (aainfo[4]._val3 == 16)
+ result = imath_random(9, 15);
+ }
+ if (result >= 0) {
+ kernel_reset_animation(aa[4], result);
+ aainfo[4]._frame = result;
+ }
+}
+
+static void room_306_anim6() {
+ int16 result = -1;
+ int16 cur = kernel_anim[aa[5]].frame;
+ if (cur == aainfo[5]._frame)
+ return;
+ aainfo[5]._frame = cur;
+ if (cur >= 1 && cur <= 7) {
+ switch (aainfo[5]._val3) {
+ case 0: result = 0; break;
+ case 1: result = imath_random(1, 6); break;
+ default: break;
+ }
+ }
+ if (result >= 0) {
+ kernel_reset_animation(aa[5], result);
+ aainfo[5]._frame = result;
+ }
+}
+
+static void room_306_anim10() {
+ int16 result = -1;
+ int16 cur = kernel_anim[aa[9]].frame;
+ if (cur == aainfo[9]._frame)
+ return;
+ aainfo[9]._frame = cur;
+ if (cur == 28) {
+ kernel_abort_animation(aa[9]);
+ aainfo[9]._active = 0;
+ global[g066] = 1;
+ aainfo[6]._val3 = 13;
+ } else if (cur == 15) {
+ digi_initial_volume(scratch.xa0);
+ digi_play_build(305, '_', 1, 3);
+ kernel_timing_trigger(1, 107);
+ digi_val2 = -1;
+ } else if (cur == 20) {
+ digi_play_build(203, '_', 1, 2);
+ }
+ if (result >= 0) {
+ kernel_reset_animation(aa[9], result);
+ aainfo[9]._frame = result;
+ }
}
static void room_306_daemon() {
+ switch (kernel.trigger) {
+ case 7:
+ if (global[walker_converse_state] != 0) {
+ global[walker_converse_state] = 0;
+ close_journal(3);
+ player.commands_allowed = -1;
+ if (digi_val1 != 0) {
+ if (global[g066] == 3) {
+ kernel_timing_trigger(1, 118);
+ } else {
+ scratch.xa0 = 30;
+ kernel_timing_trigger(1, 117);
+ }
+ }
+ } else {
+ switch (scratch.x9e) {
+ case 100:
+ kernel_timing_trigger(20, 113);
+ global[player_score] = -1;
+ break;
+
+ case 2000:
+ kernel_abort_animation(scratch.xa6);
+ scratch.xa2 = 0;
+ scratch.x9e = -1;
+ kernel_reset_animation(scratch.x9a, 1);
+ kernel_synch(KERNEL_ANIM, scratch.x9a, KERNEL_NOW, 0);
+ global[g133] = 0;
+ player.commands_allowed = -1;
+ if (digi_val1 != 0) {
+ if (global[g066] == 3) {
+ kernel_timing_trigger(1, 118);
+ } else {
+ scratch.xa0 = 30;
+ kernel_timing_trigger(1, 117);
+ }
+ }
+ break;
+
+ case 2500:
+ kernel_abort_animation(scratch.xa8);
+ scratch.xa2 = 0;
+ scratch.x9e = -1;
+ player.walker_visible = -1;
+ kernel_synch(KERNEL_PLAYER, 0, KERNEL_NOW, 0);
+ kernel_timing_trigger(20, 114);
+ break;
+
+ case 3000:
+ aainfo[2]._val3 = 3;
+ scratch.xa2 = 0;
+ scratch.x9e = -1;
+ player.commands_allowed = -1;
+ if (digi_val1 != 0) {
+ if (global[g066] == 3) {
+ kernel_timing_trigger(1, 118);
+ } else {
+ scratch.xa0 = 30;
+ kernel_timing_trigger(1, 117);
+ }
+ }
+ break;
+
+ default:
+ break;
+ }
+ }
+ break;
+
+ case 24:
+ kernel_reset_animation(scratch.x9a, 0);
+ global[g133] = 1;
+ scratch.xa6 = kernel_run_animation_talk('e', 3, 0);
+ kernel_position_anim(scratch.xa6, 88, 122, 86, 5);
+ global[g156] = 2;
+ kernel_synch(KERNEL_ANIM, scratch.xa6, KERNEL_ANIM, scratch.x9a);
+ digi_play_build(306, 'e', 1, 1);
+ scratch.x9e = 2000;
+ scratch.xa2 = -1;
+ if (global[g066] == 3) {
+ kernel_timing_trigger(1, 118);
+ } else {
+ kernel_timing_trigger(1, 117);
+ }
+ break;
+
+ case 26:
+ kernel_reset_animation(scratch.x9a, 0);
+ kernel_reset_animation(scratch.x9c, 0);
+ global[g133] = 1;
+ global[g143] = 1;
+ break;
+
+ case 27:
+ kernel_abort_animation(scratch.xac);
+ scratch.xac = -1;
+ scratch.x9a = kernel_run_animation_disp('e', 2, 0);
+ kernel_position_anim(scratch.x9a, 88, 122, 86, 5);
+ global[g131] = -1;
+ kernel_reset_animation(scratch.x9a, 2);
+ kernel_synch(KERNEL_ANIM, scratch.x9a, KERNEL_NOW, 0);
+ global[g133] = 0;
+ scratch.xaa = -1;
+ player.commands_allowed = -1;
+ scratch.xa0 = 30;
+ kernel_timing_trigger(1, 117);
+ break;
+
+ case 100:
+ kernel_abort_animation(aa[0]);
+ aainfo[0]._active = 0;
+ if (digi_val1 != 0) {
+ if (global[g066] == 3) {
+ kernel_timing_trigger(1, 118);
+ } else {
+ scratch.xa0 = 30;
+ kernel_timing_trigger(1, 117);
+ }
+ }
+ player.commands_allowed = -1;
+ player.walker_visible = -1;
+ kernel_synch(KERNEL_PLAYER, 0, KERNEL_NOW, 0);
+ global[g131] = -1;
+ global[g141] = -1;
+ kernel_reset_animation(scratch.x9a, 1);
+ kernel_synch(KERNEL_ANIM, scratch.x9a, KERNEL_NOW, 0);
+ kernel_reset_animation(scratch.x9c, 1);
+ kernel_synch(KERNEL_ANIM, scratch.x9c, KERNEL_NOW, 0);
+ global[g133] = 0;
+ global[g143] = 0;
+ break;
+
+ case 101:
+ kernel_abort_animation(aa[scratch.x94]);
+ aainfo[scratch.x94]._active = 0;
+ kernel_reset_animation(scratch.x9c, 1);
+ kernel_synch(KERNEL_ANIM, scratch.x9c, KERNEL_NOW, 0);
+ global[g143] = 0;
+ player.commands_allowed = -1;
+ if (digi_val1 != 0) {
+ if (global[g066] == 3) {
+ kernel_timing_trigger(1, 118);
+ } else {
+ scratch.xa0 = 30;
+ kernel_timing_trigger(1, 117);
+ }
+ }
+ break;
+
+ case 104:
+ kernel_abort_animation(aa[6]);
+ kernel_abort_animation(aa[7]);
+ aa[6] = kernel_run_animation(kernel_name('t', 4), 0);
+ aainfo[6]._active = -1;
+ aainfo[6]._val3 = 4;
+ aa[7] = kernel_run_animation(kernel_name('t', 2), 0);
+ aainfo[7]._active = -1;
+ aainfo[7]._val3 = 4;
+ digi_play_build(306, 'h', 1, 1);
+ aainfo[7]._val3 = 3;
+ scratch.x9e = 10;
+ digi_stop(3);
+ scratch.xa4 = -1;
+ break;
+
+ case 106:
+ if (scratch.xa0 < 101) {
+ scratch.xa0++;
+ digi_set_volume(scratch.xa0, 3);
+ if (scratch.xa0 < 101)
+ kernel_timing_trigger(1, 106);
+ }
+ break;
+
+ case 107:
+ if (scratch.xa0 > 30) {
+ scratch.xa0--;
+ digi_set_volume(scratch.xa0, 3);
+ if (scratch.xa0 > 30)
+ kernel_timing_trigger(1, 107);
+ }
+ break;
+
+ case 110:
+ kernel_timing_trigger(1300, 112);
+ digi_play_build(306, '_', 999, 1);
+ scratch.x9e = 100;
+ break;
+
+ case 111:
+ if (global[g065] != 0)
+ global[g071] = -1;
+ kernel_abort_animation(aa[5]);
+ aainfo[5]._active = 0;
+ kernel_abort_animation(aa[2]);
+ aainfo[2]._active = 0;
+ kernel_abort_animation(aa[4]);
+ aainfo[4]._active = 0;
+ kernel_reset_animation(aa[1], 0);
+ kernel_synch(KERNEL_ANIM, aa[1], KERNEL_NOW, 0);
+ break;
+
+ case 112:
+ aainfo[3]._val3 = 9;
+ kernel_timing_trigger(20, 111);
+ break;
+
+ case 113:
+ kernel_abort_animation(aa[8]);
+ aainfo[8]._active = 0;
+ aa[6] = kernel_run_animation(kernel_name('t', 4), 0);
+ kernel_reset_animation(aa[6], 7);
+ aainfo[6]._active = -1;
+ aainfo[6]._val3 = 7;
+ kernel_timing_trigger(1, 118);
+ break;
+
+ case 114:
+ aainfo[2]._val3 = 14;
+ digi_play_build(306, 'k', 2, 1);
+ scratch.x9e = 3000;
+ break;
+
+ case 117:
+ if (global[g066] <= 1 && scratch.xa4 == 0) {
+ digi_initial_volume(scratch.xa0);
+ digi_play_build(305, '_', 1, 3);
+ }
+ break;
+
+ case 118:
+ if (global[g066] == 3) {
+ digi_initial_volume(15);
+ digi_play_build(306, '_', 2, 3);
+ digi_val2 = -1;
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ if (scratch.xa2 != 0) {
+ if (scratch.x9e == 2000) {
+ kernel_random_frame(scratch.xa6, &global[g153], global[g156]);
+ } else if (scratch.x9e == 2500) {
+ kernel_random_frame(scratch.xa8, &global[g151], global[g154]);
+ }
+ }
+
+ if (scratch.xaa != 0) {
+ if (scratch.xaa != 666)
+ global_anim1(2, scratch.x9a, global[g131], &global[g132]);
+ global_anim2(6, scratch.x9c, global[g141], &global[g142]);
+ }
+
+ if (scratch.xac >= 0)
+ global_anim3(scratch.xac, &global[g008]);
+
+ if (aainfo[0]._active != 0) room_306_anim1();
+ if (aainfo[5]._active != 0) room_306_anim6();
+ if (aainfo[6]._active != 0) room_306_anim7();
+ if (aainfo[7]._active != 0) room_306_anim8();
+ if (aainfo[8]._active != 0) room_306_anim9();
+ if (aainfo[9]._active != 0) room_306_anim10();
+ if (aainfo[3]._active != 0) room_306_anim4();
+ if (aainfo[1]._active != 0) room_306_anim2();
+ if (aainfo[2]._active != 0) room_306_anim3();
+ if (aainfo[4]._active != 0) room_306_anim5();
}
static void room_306_pre_parser() {
+ if (player_parse(13, 38, 0))
+ player.walk_off_edge_to_room = 305;
}
static void room_306_parser() {
+ if (global[walker_converse_state] != 0) {
+ player.commands_allowed = 0;
+ digi_play_build_ii('c', 1, 1);
+ goto handled;
+ }
+
+ if (player_parse(180, 0)) {
+ aainfo[2]._val3 = 15;
+ player.commands_allowed = 0;
+ player.walker_visible = 0;
+ scratch.xa8 = kernel_run_animation_talk('b', 9, 0);
+ kernel_position_anim(scratch.xa8, player.x, player.y, player.scale, player.depth);
+ global[g154] = 2;
+ kernel_synch(KERNEL_ANIM, scratch.xa8, KERNEL_PLAYER, 0);
+ digi_play_build(306, 'b', 1, 1);
+ scratch.x9e = 2500;
+ scratch.xa2 = -1;
+ if (digi_val1 == 0) {
+ kernel.trigger_setup_mode = 1;
+ kernel_timing_trigger(1, 117);
+ }
+ goto handled;
+ }
+
+ if (player_parse(133, 0)) {
+ player.commands_allowed = 0;
+ global[g135] = -1;
+ goto handled;
+ }
+
+ goto done;
+
+handled:
+ player.command_ready = false;
+
+done:
+ ;
}
void room_306_synchronize(Common::Serializer &s) {
for (int16 &v : scratch.sprite) s.syncAsSint16LE(v);
for (int16 &v : scratch.sequence) s.syncAsSint16LE(v);
for (int16 &v : scratch.animation) s.syncAsSint16LE(v);
+ for (auto &ai : scratch.animation_info) ai.synchronize(s);
+ s.syncAsSint16LE(scratch.x90);
+ s.syncAsSint16LE(scratch.x92);
+ s.syncAsSint16LE(scratch.x94);
+ s.syncAsSint16LE(scratch.x9a);
+ s.syncAsSint16LE(scratch.x9c);
+ s.syncAsSint16LE(scratch.x9e);
+ s.syncAsSint16LE(scratch.xa0);
+ s.syncAsSint16LE(scratch.xa2);
+ s.syncAsSint16LE(scratch.xa4);
+ s.syncAsSint16LE(scratch.xa6);
+ s.syncAsSint16LE(scratch.xa8);
+ s.syncAsSint16LE(scratch.xaa);
+ s.syncAsSint16LE(scratch.xac);
+ s.syncAsSint16LE(scratch.xae);
}
void room_306_preload() {
More information about the Scummvm-git-logs
mailing list