[Scummvm-git-logs] scummvm master -> 20b54363bbe29717499463aea14e4a563bcd95df
dreammaster
noreply at scummvm.org
Fri Oct 18 04:41:33 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:
b7252ca3f9 M4: RIDDLE: Fix double triggering in room 303
20b54363bb M4: RIDDLE: Room 304 cutscene fixes
Commit: b7252ca3f9bcf912c373b11458efa459b5a97760
https://github.com/scummvm/scummvm/commit/b7252ca3f9bcf912c373b11458efa459b5a97760
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2024-10-17T21:41:23-07:00
Commit Message:
M4: RIDDLE: Fix double triggering in room 303
Changed paths:
engines/m4/riddle/walker.cpp
diff --git a/engines/m4/riddle/walker.cpp b/engines/m4/riddle/walker.cpp
index ac687fab0ff..18e99535103 100644
--- a/engines/m4/riddle/walker.cpp
+++ b/engines/m4/riddle/walker.cpp
@@ -84,10 +84,12 @@ void Walker::player_walker_callback(frac16 myMessage, machine *sender) {
case 2:
if (walker_has_walk_finished(sender)) {
- if (subVal)
+ if (subVal) {
sendWSMessage(0x30000, 0, sender, 0, nullptr, 1);
- else
+ return;
+ } else {
_G(player).waiting_for_walk = false;
+ }
}
break;
Commit: 20b54363bbe29717499463aea14e4a563bcd95df
https://github.com/scummvm/scummvm/commit/20b54363bbe29717499463aea14e4a563bcd95df
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2024-10-17T21:41:23-07:00
Commit Message:
M4: RIDDLE: Room 304 cutscene fixes
Changed paths:
engines/m4/riddle/rooms/section3/room303.cpp
engines/m4/riddle/rooms/section3/room303.h
diff --git a/engines/m4/riddle/rooms/section3/room303.cpp b/engines/m4/riddle/rooms/section3/room303.cpp
index aa6103feff4..7718412efe3 100644
--- a/engines/m4/riddle/rooms/section3/room303.cpp
+++ b/engines/m4/riddle/rooms/section3/room303.cpp
@@ -68,7 +68,7 @@ void Room303::preload() {
}
void Room303::init() {
- _val1 = _lonelyFlag = 0;
+ _newExhibitsFlag = _lonelyFlag = false;
if (_G(game).previous_room != KERNEL_RESTORING_GAME) {
_digiName1 = nullptr;
@@ -310,7 +310,7 @@ void Room303::daemon() {
break;
case 4:
- sendWSMessage_150000(61);
+ sendWSMessage_150000(5);
break;
case 5:
@@ -577,7 +577,7 @@ void Room303::daemon() {
break;
case 134:
- if (_val1)
+ if (_newExhibitsFlag)
kernel_timing_trigger(1, 172);
else
kernel_timing_trigger(60, 134);
@@ -662,7 +662,7 @@ void Room303::daemon() {
break;
case 170:
- _val1 = 1;
+ _newExhibitsFlag = true;
break;
case 172:
@@ -2001,12 +2001,12 @@ void Room303::priestTalk(bool flag, int trigger) {
_G(globals)[GLB_TEMP_4] = 0xD << 24;
_G(globals)[GLB_TEMP_9] = _feng4 << 24;
_G(globals)[GLB_TEMP_10] = 0xD << 24;
- _G(globals)[GLB_TEMP_5] = (flag ? 480 : 705) << 16;
+ _G(globals)[GLB_TEMP_5] = (flag ? 480 : 706) << 16;
_G(globals)[GLB_TEMP_6] = 1 << 24;
- _G(globals)[V007] = _G(globals)[V006] *
- ((1 << 24) - _G(globals)[V002]) + _G(globals)[V004];
+ _G(globals)[GLB_TEMP_7] = MulSF16(_G(globals)[V006],
+ (1 << 24) - _G(globals)[V002]) + _G(globals)[V004];
_G(globals)[GLB_TEMP_8] = (flag ? 1 : 0) << 16;
- _G(globals)[V008] = trigger << 16;
+ _G(globals)[GLB_TEMP_11] = trigger << 16;
_G(globals)[GLB_TEMP_12] = 0xdc28;
_priestTalk = TriggerMachineByHash(32, nullptr, -1, -1,
@@ -2020,16 +2020,16 @@ int Room303::getSize(const Common::String &assetName, int roomNum) {
return static_cast<int>((double)fileSize * 0.000090702946);
}
-void Room303::playSound(const Common::String &assetName, int trigger, int val1) {
- if (!val1)
- _val1 = -1;
+void Room303::playSound(const Common::String &assetName, int trigger1, int trigger2) {
+ if (!trigger2)
+ trigger2 = -1;
int size = MAX(getSize(assetName), 0);
_G(globals)[GLB_TEMP_1] = size << 16;
- _G(globals)[GLB_TEMP_2] = val1 << 16;
+ _G(globals)[GLB_TEMP_2] = trigger2 << 16;
sendWSMessage(0x200000, 0, _priestTalk, 0, nullptr, 1);
- digi_play(assetName.c_str(), 1, 255, trigger);
+ digi_play(assetName.c_str(), 1, 255, trigger1);
}
void Room303::syncGame(Common::Serializer &s) {
diff --git a/engines/m4/riddle/rooms/section3/room303.h b/engines/m4/riddle/rooms/section3/room303.h
index 111a224b453..89b6935a954 100644
--- a/engines/m4/riddle/rooms/section3/room303.h
+++ b/engines/m4/riddle/rooms/section3/room303.h
@@ -30,7 +30,7 @@ namespace Rooms {
class Room303 : public Room {
private:
- int _val1 = 0;
+ bool _newExhibitsFlag = false;
bool _lonelyFlag = 0;
const char *_digiName1 = nullptr;
int _val4 = 0;
@@ -95,7 +95,7 @@ private:
static void priestTalkCallback(frac16 myMessage, machine *sender);
void priestTalk(bool flag, int trigger);
int getSize(const Common::String &assetName, int roomNum = -1);
- void playSound(const Common::String &assetName, int trigger, int val1);
+ void playSound(const Common::String &assetName, int trigger1, int trigger2);
public:
Room303() : Room() {}
More information about the Scummvm-git-logs
mailing list