[Scummvm-git-logs] scummvm master -> 53521da11fc8262e1530eb747d89e52ca39eea67
Strangerke
noreply at scummvm.org
Mon Dec 9 08:14:04 UTC 2024
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
53521da11f M4: RIDDLE: room 706: Start working on room (preload, init, pre_parser)
Commit: 53521da11fc8262e1530eb747d89e52ca39eea67
https://github.com/scummvm/scummvm/commit/53521da11fc8262e1530eb747d89e52ca39eea67
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2024-12-09T09:13:47+01:00
Commit Message:
M4: RIDDLE: room 706: Start working on room (preload, init, pre_parser)
Changed paths:
engines/m4/riddle/flags.h
engines/m4/riddle/rooms/section7/room706.cpp
engines/m4/riddle/rooms/section7/room706.h
diff --git a/engines/m4/riddle/flags.h b/engines/m4/riddle/flags.h
index d5300cc4761..240f100eede 100644
--- a/engines/m4/riddle/flags.h
+++ b/engines/m4/riddle/flags.h
@@ -253,7 +253,7 @@ enum Flag {
V216 = 216,
V217 = 217, // Prayer wheel in niche, room 703
V218 = 218,
- V219 = 219, // Prayer wheel in niche, room 704
+ V219 = 219, // Prayer wheel in niche, room 704 / 706
V220 = 220, // prayer wheel (left), room 705
V221 = 221, // prayer wheel (right), room 705
V222 = 222,
diff --git a/engines/m4/riddle/rooms/section7/room706.cpp b/engines/m4/riddle/rooms/section7/room706.cpp
index b4a05e21694..76cf8b79437 100644
--- a/engines/m4/riddle/rooms/section7/room706.cpp
+++ b/engines/m4/riddle/rooms/section7/room706.cpp
@@ -21,16 +21,133 @@
#include "m4/riddle/rooms/section7/room706.h"
#include "m4/graphics/gr_series.h"
+#include "m4/gui/gui_vmng_screen.h"
#include "m4/riddle/vars.h"
namespace M4 {
namespace Riddle {
namespace Rooms {
+void Room706::preload() {
+ _G(player).walker_type = WALKER_ALT;
+ _G(player).shadow_type = SHADOW_ALT;
+ LoadWSAssets("OTHER SCRIPT", _G(master_palette));
+}
+
void Room706::init() {
+ digi_preload("950_S40", -1);
+ digi_preload("950_S40A", -1);
+ _ripTrekMedReachHandPos1Series = series_load("RIP TREK MED REACH HAND POS1", -1, nullptr);
+
+ if (_G(flags[V224])) {
+ hotspot_set_active(_G(currentSceneDef).hotspots, "MONK #13", false);
+ hotspot_set_active(_G(currentSceneDef).hotspots, "MONK #14", false);
+ // Suspicious but present in the original. Should it be #16?
+ hotspot_set_active(_G(currentSceneDef).hotspots, "MONK #14", false);
+ hotspot_set_active(_G(currentSceneDef).hotspots, "MONK #15", false);
+ hotspot_set_active(_G(currentSceneDef).hotspots, "PRAYER WHEEL #14", false);
+ hotspot_set_active(_G(currentSceneDef).hotspots, "EMPTY NICHE", false);
+
+ series_show("THE ALL IMPORTANT NOTE", 3840, 16, -1, -1, 0, 100, 0, 0);
+ }
+
+ hotspot_set_active(_G(currentSceneDef).hotspots, " ", false);
+ hotspot_set_active(_G(currentSceneDef).hotspots, "Note", false);
+
+ if (_G(flags[V219])) {
+ hotspot_set_active(_G(currentSceneDef).hotspots, "EMPTY NICHE", false);
+ } else {
+ hotspot_set_active(_G(currentSceneDef).hotspots, "PRAYER WHEEL #15", false);
+ }
+
+ switch (_G(flags[V219])) {
+ case 1:
+ _prayerWheelMach = series_place_sprite("706 PEACE PRAYER WHEEL", 0, 640, 0, 100, 1280);
+ break;
+
+ case 2:
+ _prayerWheelMach = series_place_sprite("706 INSIGHT PRAYER WHEEL", 0, 640, 0, 100, 1280);
+ break;
+
+ case 3:
+ _prayerWheelMach = series_place_sprite("706 SERENITY PRAYER WHEEL", 0, 640, 0, 100, 1280);
+ break;
+
+ case 4:
+ _prayerWheelMach = series_place_sprite("706 TRUTH PRAYER WHEEL", 0, 640, 0, 100, 1280);
+ break;
+
+ case 5:
+ _prayerWheelMach = series_place_sprite("706 WISDOM PRAYER WHEEL", 0, 640, 0, 100, 1280);
+ break;
+
+ default:
+ break;
+ }
+
+ if (_G(flags[V222])) {
+ series_show("706 ENLIGHTEN DOOR OPEN", 3840, 16, -1, -1, 0, 100, 0, 0);
+
+ hotspot_set_active(_G(currentSceneDef).hotspots, " ", true);
+ hotspot_set_active(_G(currentSceneDef).hotspots, "PRAYER WHEEL #14", false);
+ hotspot_set_active(_G(currentSceneDef).hotspots, "empty cell", false);
+ }
+
+ if (_G(flags[V224])) {
+ hotspot_set_active(_G(currentSceneDef).hotspots, "Note", true);
+ }
+
+ switch (_G(game).previous_room) {
+ case 703:
+ MoveScreenDelta(_G(game_buff_ptr), -640, 0);
+ player_first_walk(1299, 300, 9, 1170, 318, 9, true);
+ break;
+
+ case 705:
+ player_first_walk(0, 300, 3, 130, 318, 3, true);
+ break;
+
+ case 707:
+ MoveScreenDelta(_G(game_buff_ptr), -320, 0);
+ player_set_commands_allowed(false);
+ ws_demand_location(_G(my_walker), 635, 357);
+ ws_demand_facing(_G(my_walker), 7);
+ ws_hide_walker(_G(my_walker));
+ _706RipGoesDownStairsSeries = series_load("706 RIP GOES DOWN STAIRS", -1, nullptr);
+ _ripStairsMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 320, 0, 100, 0, false, triggerMachineByHashCallback, "rip stairs machine");
+ sendWSMessage_10000(1, _ripStairsMach, _706RipGoesDownStairsSeries, 4, 39, 140, _706RipGoesDownStairsSeries, 39, 39, 0);
+ break;
+
+ case 709:
+ case 711:
+ digi_preload("950_s39", -1);
+ player_set_commands_allowed(false);
+ ws_demand_location(_G(my_walker), 420, 288);
+ ws_demand_facing(_G(my_walker), 4);
+ _ripShieldsFaceSeries = series_load("RIP SHIELDS FACE", -1, nullptr);
+ setGlobals1(_ripShieldsFaceSeries, 1, 14, 14, 14, 0, 14, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+ sendWSMessage_110000(_G(my_walker), 131);
+
+ break;
+
+ default: // Including KERNEL_RESTORING_GAME
+ digi_preload("950_s39", -1);
+ break;
+ }
+
+ digi_play_loop("950_s39", 3, 255, -1, -1);
+}
+
+void Room706::pre_parser() {
+ // Nothing
+}
+
+void Room706::parser() {
+ // TODO Not implemented yet
}
void Room706::daemon() {
+ // TODO Not implemented yet
}
} // namespace Rooms
diff --git a/engines/m4/riddle/rooms/section7/room706.h b/engines/m4/riddle/rooms/section7/room706.h
index 15c1de2c0ed..0c7cfb3f6b7 100644
--- a/engines/m4/riddle/rooms/section7/room706.h
+++ b/engines/m4/riddle/rooms/section7/room706.h
@@ -33,8 +33,19 @@ public:
Room706() : Room() {}
~Room706() override {}
+ void preload() override;
void init() override;
+ void pre_parser() override;
+ void parser() override;
void daemon() override;
+
+private:
+ int32 _706RipGoesDownStairsSeries = 0;
+ int32 _ripShieldsFaceSeries = 0;
+ int32 _ripTrekMedReachHandPos1Series = 0;
+
+ machine *_prayerWheelMach = nullptr;
+ machine *_ripStairsMach = nullptr;
};
} // namespace Rooms
More information about the Scummvm-git-logs
mailing list