[Scummvm-git-logs] scummvm master -> 6d899b25a3122369fcbe4143bfe37c8d7697aca7
Strangerke
noreply at scummvm.org
Sun Oct 6 15:12:18 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:
6d899b25a3 M4: RIDDLE: Partial implementation of room 956 (parser is missing)
Commit: 6d899b25a3122369fcbe4143bfe37c8d7697aca7
https://github.com/scummvm/scummvm/commit/6d899b25a3122369fcbe4143bfe37c8d7697aca7
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2024-10-06T17:11:27+02:00
Commit Message:
M4: RIDDLE: Partial implementation of room 956 (parser is missing)
Changed paths:
engines/m4/riddle/rooms/section9/room996.cpp
engines/m4/riddle/rooms/section9/room996.h
diff --git a/engines/m4/riddle/rooms/section9/room996.cpp b/engines/m4/riddle/rooms/section9/room996.cpp
index 6f2388373a1..9a5900146a3 100644
--- a/engines/m4/riddle/rooms/section9/room996.cpp
+++ b/engines/m4/riddle/rooms/section9/room996.cpp
@@ -32,9 +32,160 @@ void Room996::preload() {
}
void Room996::init() {
+ digi_preload("950_s56", -1);
+ interface_hide();
+ series_show("996mark", 0, 16, -1, -1, 0, 100, 0, 0);
+ _flag = 1;
+ if (_G(flags)[V290]) {
+ _roomStates_loop0 = series_show("996 Charcoal Page", 256, 16, -1, -1, 0, 100, 0, 0);
+ digi_preload("205r13a", -1);
+ digi_play("205r13a", 1, 255, -1, 205);
+ hotspot_set_active(_G(currentSceneDef).hotspots, "FORWARD", false);
+ hotspot_set_active(_G(currentSceneDef).hotspots, "BACK", false);
+ } else {
+ if (player_been_here(205)) {
+ _roomStates_loop0 = series_show("996 RIPPED OUT PAGE", 256, 16, -1, -1, 0, 100, 0, 0);
+ hotspot_set_active(_G(currentSceneDef).hotspots, "FORWARD", false);
+ hotspot_set_active(_G(currentSceneDef).hotspots, "BACK", false);
+ } else {
+ if (_G(flags)[V280]) {
+ _roomStates_tt = series_show("996 Peru Pictograph Snake", 256, 16, -1, -1, 0, 100, 0, 0);
+
+ if (_G(flags)[V148]) {
+ _roomStates_field4 = series_show("996 Peru Pictograph Condor", 256, 16, -1, -1, 0, 100, 0, 0);
+ } else {
+ _roomStates_field4 = series_show("996 Peru Pictograph Spider", 256, 16, -1, -1, 0, 100, -13, -87);
+ }
+
+ if (_G(flags)[V156]) {
+ _roomStates_pu = series_show("996 Peru Pictos Solved Spider", 256, 16, -1, -1, 0, 100, 0, 0);
+ } else {
+ _roomStates_field8 = series_show("996 Peru Pictograph Spider", 256, 16, -1, -1, 0, 100, 0, 0);
+ }
+
+ if (_G(flags)[V283]) {
+ _roomStates_untie = series_show("996 Peru Pictograph Monkey", 256, 16, -1, -1, 0, 100, 0, 0);
+ } else {
+ _roomStates_untie = series_show("996 Peru Pictograph Spider", 256, 16, -1, -1, 0, 100, -21, 71);
+ }
+ }
+
+ hotspot_set_active(_G(currentSceneDef).hotspots, "BACK", false);
+ }
+ }
+
+ for (int i = 1; i < 12; ++i)
+ _flagArray[i] = 0;
+
+ if (_G(flags)[kEasterIslandCartoon])
+ _flagArray[1] = 1;
+
+ if (_G(flags)[kChinshiCartoon])
+ _flagArray[1] = 2;
+
+ if (_G(flags)[kTabletsCartoon])
+ _flagArray[1] = 3;
+
+ if (_G(flags)[kEpitaphCartoon])
+ _flagArray[1] = 5;
+
+ if (_G(flags)[kGraveyardCartoon])
+ _flagArray[1] = 4;
+
+ if (_G(flags)[kCastleCartoon])
+ _flagArray[1] = 6;
+
+ if (_G(flags)[kMocaMocheCartoon])
+ _flagArray[1] = 7;
+
+ if (_G(flags)[kTempleCartoon])
+ _flagArray[1] = 8;
+
+ if (_G(flags)[kEmeraldCartoon])
+ _flagArray[1] = 9;
+
+ _flagArray[12] = 1;
+ _moveValue = 0;
+}
+
+void Room996::pre_parser() {
+ if (player_said("forward", nullptr, nullptr) && (_flagArray[12] != 3)) {
+ digi_play("950_s56", 1, 255, -1, 950);
+ ++_flagArray[12];
+ }
+
+ if (player_said("back", nullptr, nullptr) && (_flagArray[12] != 3)) {
+ digi_play("950_s56", 1, 255, -1, 950);
+ --_flagArray[12];
+ }
+
+ if (player_said("forward", nullptr, nullptr) && (_flagArray[12] == 3) && (_flagArray[1] == 0)) {
+ ++_flagArray[12];
+ }
+
+ if (player_said("forward", nullptr, nullptr) && (_flagArray[12] == 4) && (_G(flags)[V047] == 0)) {
+ ++_flagArray[12];
+ }
+
+ if (player_said("back", nullptr, nullptr) && (_flagArray[12] == 4) && (_G(flags)[V047] == 0)) {
+ --_flagArray[12];
+ }
+
+ if (player_said("back", nullptr, nullptr) && (_flagArray[12] == 3) && (_flagArray[1] == 0)) {
+ --_flagArray[12];
+ }
+
+ _flagArray[12] = CLIP(_flagArray[12], 1, 5);
+
+ _G(player).need_to_walk = false;
+ _G(player).ready_to_walk = true;
+ _G(player).waiting_for_walk = false;
+}
+
+void Room996::parser() {
+ if (player_said("--", nullptr, nullptr)) {
+ _G(player).command_ready = false;
+ return;
+ }
+
+ if (player_said("exit", nullptr, nullptr) && (_G(kernel).trigger >= -1)) {
+ if (_G(kernel).trigger == -1) {
+ player_set_commands_allowed(false);
+ disable_player_commands_and_fade_init(1);
+ _G(player).command_ready = false;
+ return;
+ }
+
+ if (_G(kernel).trigger == 1) {
+ interface_show();
+ restoreAutosave();
+ _G(player).command_ready = false;
+ return;
+ }
+ }
+
+
+ warning("STUB - Room996::parser not implemented");
+
+
+ if (_flagArray[12] == 2) {
+ if (_G(kernel).trigger >= 1) {
+
+ }
+
+ _G(player).command_ready = false;
+ return;
+ }
+
+
+
+
+ _G(player).command_ready = false;
}
void Room996::daemon() {
+ if (_G(kernel).trigger == 1)
+ player_set_commands_allowed(true);
}
} // namespace Rooms
diff --git a/engines/m4/riddle/rooms/section9/room996.h b/engines/m4/riddle/rooms/section9/room996.h
index df15a6b0dcb..750e984abad 100644
--- a/engines/m4/riddle/rooms/section9/room996.h
+++ b/engines/m4/riddle/rooms/section9/room996.h
@@ -22,7 +22,8 @@
#ifndef M4_RIDDLE_ROOMS_SECTION9_ROOM996_H
#define M4_RIDDLE_ROOMS_SECTION9_ROOM996_H
-#include "m4/core/rooms.h"
+#include "m4/riddle/rooms/room.h"
+#include "m4/wscript/ws_machine.h"
namespace M4 {
namespace Riddle {
@@ -35,7 +36,21 @@ public:
void preload() override;
void init() override;
+ void pre_parser() override;
+ void parser() override;
void daemon() override;
+
+private:
+ int32 _flag = 0;
+ int32 _flagArray[13];
+ int32 _moveValue = 0;
+
+ machine *_roomStates_loop0 = nullptr;
+ machine * _roomStates_untie = nullptr;
+ machine * _roomStates_pu = nullptr;
+ machine * _roomStates_field8 = nullptr;
+ machine * _roomStates_field4 = nullptr;
+ machine * _roomStates_tt = nullptr;
};
} // namespace Rooms
More information about the Scummvm-git-logs
mailing list