[Scummvm-git-logs] scummvm master -> b2d63b3f1f9b08d19b6152d724ff90a8c090b859
Strangerke
noreply at scummvm.org
Wed Dec 11 22:39:42 UTC 2024
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
c8dd532ac2 M4: RIDDLE: Room 205: Fix CID 1564801
824cb4343d M4: RIDDLE: Room 494: Fix CID 1533274 + small cleanup
b2d63b3f1f M4: RIDDLE: Room 510: Implement the missing parserSub, fix some nullptr
Commit: c8dd532ac24536e8498b416e2dd87f8b93e6a86b
https://github.com/scummvm/scummvm/commit/c8dd532ac24536e8498b416e2dd87f8b93e6a86b
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2024-12-11T23:39:25+01:00
Commit Message:
M4: RIDDLE: Room 205: Fix CID 1564801
Changed paths:
engines/m4/riddle/rooms/section2/room205.h
diff --git a/engines/m4/riddle/rooms/section2/room205.h b/engines/m4/riddle/rooms/section2/room205.h
index a4063bfd5a4..3bf09502190 100644
--- a/engines/m4/riddle/rooms/section2/room205.h
+++ b/engines/m4/riddle/rooms/section2/room205.h
@@ -83,7 +83,7 @@ private:
int32 _205rtlk4Series = 0;
int32 _205rtlk5Series = 0;
int32 _205ShenGouStaresSeries = 0;
- int32 _205strlk1Series;
+ int32 _205strlk1Series = 0;
int32 _205TabletsSeries = 0;
int32 _ripGetsShotSeries = 0;
int32 _ripTalkerPos5Series = 0;
Commit: 824cb4343d62b1b068ce8ad36fed1d103af782f3
https://github.com/scummvm/scummvm/commit/824cb4343d62b1b068ce8ad36fed1d103af782f3
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2024-12-11T23:39:25+01:00
Commit Message:
M4: RIDDLE: Room 494: Fix CID 1533274 + small cleanup
Changed paths:
engines/m4/riddle/rooms/section4/room494.cpp
engines/m4/riddle/rooms/section4/room494.h
diff --git a/engines/m4/riddle/rooms/section4/room494.cpp b/engines/m4/riddle/rooms/section4/room494.cpp
index 397d81d2daf..62127f5555d 100644
--- a/engines/m4/riddle/rooms/section4/room494.cpp
+++ b/engines/m4/riddle/rooms/section4/room494.cpp
@@ -49,7 +49,7 @@ void Room494::init() {
RemoveSystemHotkey(KEY_F2);
AddSystemHotkey(KEY_ESCAPE, escapeFn);
AddSystemHotkey(KEY_F3, escapeFn);
- _machine1 = _machine2 = 0;
+ _machine1 = _machine2 = nullptr;
_selectedBtn1 = _selectedBtn2 = -1;
midi_stop();
@@ -68,7 +68,7 @@ void Room494::init() {
}
void Room494::daemon() {
- int selectedBtn = getSelectedButton();
+ const int selectedBtn = getSelectedButton();
bool btnClicked = false;
switch (_G(kernel).trigger) {
@@ -157,7 +157,7 @@ void Room494::daemon() {
_selectedBtn2 = -1;
}
- _selectState = 0;
+ _selectState = false;
btnClicked = true;
}
@@ -217,6 +217,7 @@ void Room494::pre_parser() {
}
void Room494::escapeFn(void *, void *) {
+ //TODO room 494 escapeFn
warning("TODO: room 494 escapeFn");
}
@@ -230,8 +231,8 @@ int Room494::getSelectedButton() const {
{ 494, 323, 547, 370 }
};
- int x = _G(MouseState).CursorColumn;
- int y = _G(MouseState).CursorRow;
+ const int x = _G(MouseState).CursorColumn;
+ const int y = _G(MouseState).CursorRow;
for (int i = 0; i < 6; ++i) {
if (BUTTONS[i].contains(x, y))
diff --git a/engines/m4/riddle/rooms/section4/room494.h b/engines/m4/riddle/rooms/section4/room494.h
index 492c170ca91..5517052677d 100644
--- a/engines/m4/riddle/rooms/section4/room494.h
+++ b/engines/m4/riddle/rooms/section4/room494.h
@@ -40,7 +40,7 @@ private:
int _selectedBtn1 = -1;
machine *_machine1 = nullptr;
machine *_machine2 = nullptr;
- machine *_buttons[6];
+ machine *_buttons[6] = { nullptr, nullptr, nullptr, nullptr, nullptr, nullptr };
HotkeyCB _hotkeyEscape = nullptr;
HotkeyCB _hotkeySave = nullptr;
HotkeyCB _hotkeyLoad = nullptr;
Commit: b2d63b3f1f9b08d19b6152d724ff90a8c090b859
https://github.com/scummvm/scummvm/commit/b2d63b3f1f9b08d19b6152d724ff90a8c090b859
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2024-12-11T23:39:25+01:00
Commit Message:
M4: RIDDLE: Room 510: Implement the missing parserSub, fix some nullptr
Changed paths:
engines/m4/riddle/rooms/section5/room510.cpp
diff --git a/engines/m4/riddle/rooms/section5/room510.cpp b/engines/m4/riddle/rooms/section5/room510.cpp
index 42935d0f8f9..7052d97dc70 100644
--- a/engines/m4/riddle/rooms/section5/room510.cpp
+++ b/engines/m4/riddle/rooms/section5/room510.cpp
@@ -318,7 +318,7 @@ void Room510::parser() {
hotspot_set_active("NICHE", true);
if (inv_object_is_here("CRYSTAL SKULL")) {
- kernel_examine_inventory_object("PING CRYSTAL SKULL", 5, 1, 330, 280, 2, 0, 2);
+ kernel_examine_inventory_object("PING CRYSTAL SKULL", 5, 1, 330, 280, 2, nullptr, 2);
inv_give_to_player("CRYSTAL SKULL");
terminateMachineAndNull(_skull);
}
@@ -764,7 +764,7 @@ void Room510::parser() {
player_set_commands_allowed(false);
if (_flag1) {
- sketchInJournal(0);
+ sketchInJournal(nullptr);
} else {
digi_play("com028", 1, 255, 100);
_flag1 = true;
@@ -776,10 +776,10 @@ void Room510::parser() {
break;
case 100:
_G(kernel).trigger = -1;
- sketchInJournal(0);
+ sketchInJournal(nullptr);
break;
default:
- sketchInJournal(0);
+ sketchInJournal(nullptr);
break;
}
}
@@ -813,8 +813,172 @@ void Room510::parser() {
}
bool Room510::parserSub() {
- // TODO
- return false;
+ switch (_G(kernel.trigger)) {
+ case -1:
+ ws_walk(382, 111, nullptr, 666, 11, true);
+ break;
+
+ case 1:
+ ws_unhide_walker(_G(my_walker));
+ terminateMachine(_statue);
+ _statue = nullptr;
+ if (_G(flags[V169]) <= 0) {
+ _statue = series_play(" 510 STATUE LAYED DOWN", 2560, 16, -1, 5, 0, 100, 0, 0, 0, -1);
+ kernel_timing_trigger(1, 2, nullptr);
+ hotspot_set_active("ALTAR POST", false);
+ hotspot_set_active("ALTAR POST ", true);
+ kernel_load_variant("510lock1");
+ } else if (_G(flags[V169]) <= 2) {
+ _statue = series_play(" 510 STATUE", 2560, 16, -1, 5, 0, 100, 0, 0, 0, -1);
+ kernel_timing_trigger(1, 2, nullptr);
+ hotspot_set_active("ALTAR POST", true);
+ hotspot_set_active("ALTAR POST ", false);
+ kernel_load_variant("510lock0");
+ }
+
+ break;
+
+ case 2:
+ switch (_G(flags[V169])) {
+ case 0:
+ _G(flags[V169]) = 1;
+ player_set_commands_allowed(true);
+ break;
+
+ case 1:
+ kernel_timing_trigger(1, 4, nullptr);
+ break;
+
+ case 2:
+ kernel_timing_trigger(1, 8, nullptr);
+ break;
+
+ default:
+ break;
+ }
+
+ break;
+
+ case 3:
+ digi_play("510_s02", 2, 255, -1, -1);
+ break;
+
+ case 4:
+ switch (_G(flags[V169])) {
+ case 0:
+ player_set_commands_allowed(true);
+ break;
+
+ case 1:
+ _G(flags[V169]) = 0;
+ player_set_commands_allowed(true);
+
+ break;
+
+ case 2:
+ terminateMachine(_rope);
+ _rope = nullptr;
+ if (inv_object_is_here("ROPE")) {
+ inv_give_to_player("ROPE");
+ hotspot_set_active(_G(currentSceneDef).hotspots, "ROPE ", false);
+ }
+
+ if (inv_object_is_here("GREEN VINE")) {
+ inv_give_to_player("GREEN VINE");
+ hotspot_set_active(_G(currentSceneDef).hotspots, "GREEN VINE ", false);
+ }
+
+ if (inv_object_is_here("BROWN VINE")) {
+ inv_give_to_player("BROWN VINE");
+ hotspot_set_active(_G(currentSceneDef).hotspots, "BROWN VINE ", false);
+ }
+
+ if (inv_object_is_here("VINES")) {
+ inv_give_to_player("VINES");
+ hotspot_set_active(_G(currentSceneDef).hotspots, "VINES ", false);
+ }
+
+ sendWSMessage_140000(_G(my_walker), 11);
+
+ break;
+
+ default:
+ break;
+ }
+
+ break;
+
+ case 7:
+ return false;
+
+ case 8:
+ _ripLowReach4 = series_load("RIP TREK LOW REACHER POS1", -1, nullptr);
+ kernel_timing_trigger(1, 9, nullptr);
+
+ break;
+
+ case 9:
+ setGlobals1(_ripLowReach4, 1, 28, 28, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+ sendWSMessage_110000(_G(my_walker), 10);
+
+ break;
+
+ case 10:
+ terminateMachine(_rope);
+ _rope = nullptr;
+
+ if (inv_object_is_here("ROPE")) {
+ _rope = series_play("510 STATUE AND ROPE", 3840, 18, 4, 5, 0, 100, 0, 0, 0);
+ }
+
+ if (inv_object_is_here("GREEN VINE") || inv_object_is_here("BROWN VINE")) {
+ _rope = series_play("510 STATUE AND ANY VINE", 3840, 18, 4, 5, 0, 100, 0, 0, 0);
+ }
+
+ if (inv_object_is_here("VINES")) {
+ _rope = series_play("510 STATUE AND COMBO VINES", 3840, 18, 4, 5, 0, 100, 0, 0, 0);
+ }
+
+ break;
+
+ case 11:
+ series_unload(_ripLowReach4);
+ _G(flags[V169]) = 0;
+ player_set_commands_allowed(true);
+
+ break;
+
+ case 666:
+ if (player_said("take")) {
+ if (player_said("VINES") && inv_player_has("VINES"))
+ return false;
+
+ if (player_said("ROPE") && inv_player_has("ROPE"))
+ return false;
+
+ if (player_said("GREEN VINE") && inv_player_has("GREEN VINE"))
+ return false;
+
+ if (player_said("BROWN VINE") && inv_player_has("BROWN VINE"))
+ return false;
+ }
+
+ player_set_commands_allowed(false);
+ kernel_timing_trigger(130, 3, nullptr);
+ ws_hide_walker(_G(my_walker));
+
+ if (_G(flags[V169]) <= 0)
+ _statue = series_play("510 RIP LOWERS STATUE", 2560, 16, 1, 5, 0, 100, 0, 0, 0, -1);
+ else if (_G(flags[V169]) == 1)
+ _statue = series_play("510 RIP LOWERS STATUE", 2560, 18, 1, 5, 0, 100, 0, 0, 0, -1);
+
+ break;
+
+ default:
+ break;
+ }
+
+ return true;
}
bool Room510::takeVinesRope() {
More information about the Scummvm-git-logs
mailing list