[Scummvm-git-logs] scummvm master -> 531c54865c93275b4f03dcbdbfe0b15e675c8bac
dreammaster
noreply at scummvm.org
Thu Aug 8 05:22:25 UTC 2024
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
2594571b7b M4: RIDDLE: Add missing break in room 305
531c54865c M4: RIDDLE: In progress room 401 daemon
Commit: 2594571b7b735c4ca246f0194fc2f77059bed096
https://github.com/scummvm/scummvm/commit/2594571b7b735c4ca246f0194fc2f77059bed096
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2024-08-07T22:22:19-07:00
Commit Message:
M4: RIDDLE: Add missing break in room 305
Changed paths:
engines/m4/riddle/rooms/section3/room305.cpp
diff --git a/engines/m4/riddle/rooms/section3/room305.cpp b/engines/m4/riddle/rooms/section3/room305.cpp
index 22909c78d86..46047fa26ce 100644
--- a/engines/m4/riddle/rooms/section3/room305.cpp
+++ b/engines/m4/riddle/rooms/section3/room305.cpp
@@ -333,6 +333,7 @@ void Room305::daemon() {
default:
break;
}
+ break;
case 1:
if (_conv1 == 1) {
Commit: 531c54865c93275b4f03dcbdbfe0b15e675c8bac
https://github.com/scummvm/scummvm/commit/531c54865c93275b4f03dcbdbfe0b15e675c8bac
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2024-08-07T22:22:19-07:00
Commit Message:
M4: RIDDLE: In progress room 401 daemon
Changed paths:
engines/m4/riddle/rooms/section4/room401.cpp
engines/m4/riddle/rooms/section4/room401.h
diff --git a/engines/m4/riddle/rooms/section4/room401.cpp b/engines/m4/riddle/rooms/section4/room401.cpp
index eef8db9ac9e..6e84a5989e2 100644
--- a/engines/m4/riddle/rooms/section4/room401.cpp
+++ b/engines/m4/riddle/rooms/section4/room401.cpp
@@ -90,7 +90,221 @@ void Room401::init() {
}
void Room401::daemon() {
+ int val;
+
+ switch (_G(kernel).trigger) {
+ case 1:
+ player_set_commands_allowed(true);
+ break;
+
+ case 7:
+ setGlobals1(_rip1, 1, 7, 7, 7, 1);
+ sendWSMessage_110000(9);
+ digi_play("401r01", 1, 255, 11);
+ break;
+
+ case 8:
+ sendWSMessage_140000(-1);
+ break;
+
+ case 11:
+ _val6 = 5;
+ digi_play(_G(player).been_here_before ? "401x08" : "401x01",
+ 1, 255, 13);
+ break;
+
+ case 13:
+ kernel_timing_trigger(1, 100);
+ _val6 = 0;
+ kernel_timing_trigger(2, 999);
+ break;
+
+ case 100:
+ kernel_trigger_dispatchx(kernel_trigger_create(101));
+ break;
+
+ case 101:
+ switch (_val5) {
+ case 1:
+ switch (_val6) {
+ case 0:
+ val = imath_ranged_rand(1, 2);
+ ++_ctr1;
+
+ if (imath_ranged_rand(20, 80) > _ctr1)
+ val = 1;
+ else
+ _ctr1 = 0;
+
+ if (val == 1) {
+ sendWSMessage_10000(1, _agent, _401a01, 1, 1, 100, _401a01, 1, 1, 0);
+ } else {
+ sendWSMessage_10000(1, _agent, _401a01, 1, 3, 100, _401a01, 3, 3, 0);
+ _val5 = 4;
+ }
+ break;
+
+ case 7:
+ sendWSMessage_10000(1, _agent, _401a02, 1, 57, 100, _401a01, 1, 1, 0);
+ _val6 = 4;
+ _ctr1 = 0;
+ break;
+
+ case 8:
+ terminateMachineAndNull(_ripMach);
+ sendWSMessage_10000(1, _agent, _401a04, 1, 62, 108, _401a01, 1, 1, 0);
+ break;
+
+ case 9:
+ terminateMachineAndNull(_ripMach);
+ sendWSMessage_10000(1, _agent, _401a05, 1, 53, 105, _401a01, 53, 53, 0);
+ break;
+ case 10:
+ terminateMachineAndNull(_ripMach);
+ sendWSMessage_10000(1, _agent, _401a03, 1, 47, 103, _401a03, 1, 1, 0);
+ break;
+
+ default:
+ sendWSMessage_10000(1, _agent, _401a01, 1, 3, 100, _401a01, 3, 3, 0);
+ _val5 = 4;
+ _ctr1 = 0;
+ break;
+ }
+ break;
+
+ case 4:
+ switch (_val6) {
+ case 0:
+ val = imath_ranged_rand(1, 3);
+ ++_ctr1;
+
+ if (imath_ranged_rand(20, 80) > _ctr1)
+ val = 1;
+ else
+ _ctr1 = 0;
+
+ switch (val) {
+ case 1:
+ sendWSMessage_10000(1, _agent, _401a01, 3, 3, 100, _401a01, 3, 3, 0);
+ break;
+
+ case 2:
+ sendWSMessage_10000(1, _agent, _401a01, 11, 28, 100, _401a01, 28, 28, 0);
+ _val5 = 11;
+ _ctr1 = 0;
+ break;
+
+ case 3:
+ sendWSMessage_10000(1, _agent, _401a01, 3, 1, 100, _401a01, 1, 1, 0);
+ _val5 = 1;
+ _ctr1 = 0;
+ break;
+
+ default:
+ break;
+ }
+ break;
+
+ case 4:
+ sendWSMessage_10000(1, _agent, _401a01, 3, 3, 100, _401a01, 3, 3, 0);
+ break;
+
+ case 5:
+ sendWSMessage_10000(1, _agent, _401a01, 4, 4, -1, _401a01, 4, 10, 4);
+ sendWSMessage_1a0000(_agent, 13);
+ break;
+
+ case 6:
+ sendWSMessage_10000(1, _agent, _401a01, 29, 43, 100, _401a01, 3, 3, 0);
+ sendWSMessage_190000(_agent, 13);
+ _val6 = 4;
+ break;
+
+ case 11:
+ sendWSMessage_10000(1, _agent, _401a01, 11, 28, 100, _401a01, 28, 28, 0);
+ _val5 = 11;
+ break;
+
+ default:
+ sendWSMessage_10000(1, _agent, _401a01, 3, 1, 100, _401a01, 1, 1, 0);
+ _val5 = 1;
+ _ctr1 = 0;
+ break;
+ }
+ break;
+
+ case 11:
+ switch (_val6) {
+ case 0:
+ val = imath_ranged_rand(1, 2);
+ ++_ctr1;
+ if (imath_ranged_rand(20, 80) < _ctr1)
+ val = 1;
+ else
+ _ctr1 = 0;
+
+ if (val == 1) {
+ sendWSMessage_10000(1, _agent, _401a01, 28, 28, 100, _401a01, 28, 28, 0);
+ } else {
+ sendWSMessage_10000(1, _agent, _401a01, 28, 11, 100, _401a01, 3, 3, 0);
+ _val5 = 4;
+ _ctr1 = 0;
+ }
+ break;
+
+ case 11:
+ sendWSMessage_10000(1, _agent, _401a01, 28, 28, 100, _401a01, 28, 28, 0);
+ break;
+
+ default:
+ sendWSMessage_10000(1, _agent, _401a01, 28, 11, 100, _401a01, 3, 3, 0);
+ break;
+ }
+ break;
+
+ default:
+ break;
+ }
+ break;
+
+ case 102:
+ _ripMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, 0, 100, 0x400, 0,
+ triggerMachineByHashCallbackNegative, "rip");
+ sendWSMessage_10000(1, _ripMach, _401rp01, 11, 11, 200, _401rp01, 11, 11, 0);
+ _val7 = _val3 = 0;
+
+ sendWSMessage_10000(1, _agent, _401a01, 1, 1, 100, _401a01, 1, 1, 0);
+ _val6 = 4;
+ _ctr1 = 0;
+
+ _G(kernel).trigger_mode = KT_PARSE;
+ digi_play(conv_sound_to_play(), 255, 1);
+ _G(kernel).trigger_mode = KT_DAEMON;
+ break;
+
+ case 103:
+ sendWSMessage_10000(1, _agent, _401a03, 48, 67, 102, _401a01, 1, 1, 0);
+ digi_play(imath_ranged_rand(1, 2) == 1 ? "950_s09" : "950_s10", 2);
+ break;
+
+ case 104:
+ series_show("401a06", 0);
+ _ripMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, 0, 100, 0x400, 0,
+ triggerMachineByHashCallbackNegative, "rip");
+ sendWSMessage_10000(1, _ripMach, _401rp01, 11, 11, 200, _401rp01, 11, 11, 0);
+ _val7 = _val3 = 0;
+
+ sendWSMessage_10000(1, _agent, _401a01, 1, 1, 100, _401a01, 1, 1, 0);
+ _val6 = 4;
+ _ctr1 = 0;
+
+ conv_resume();
+ break;
+
+ default:
+ break;
+ }
}
void Room401::parser() {
@@ -158,6 +372,7 @@ void Room401::parser() {
EXPORT(15, "CHISEL");
EXPORT(16, "INCENSE BURNER");
EXPORT(17, "ROMANOV EMERALD");
+ #undef EXPORT
conv_play();
_G(kernel).trigger_mode = KT_DAEMON;
diff --git a/engines/m4/riddle/rooms/section4/room401.h b/engines/m4/riddle/rooms/section4/room401.h
index 6cc4f2f6526..21e2a687c72 100644
--- a/engines/m4/riddle/rooms/section4/room401.h
+++ b/engines/m4/riddle/rooms/section4/room401.h
@@ -51,7 +51,8 @@ private:
machine *_agent = nullptr;
machine *_ripMach = nullptr;
const char *_digiName = nullptr;
-
+ int _ctr1 = 0;
+
void conv401a();
int getItemCount() const;
More information about the Scummvm-git-logs
mailing list