[Scummvm-git-logs] scummvm master -> 5cc0febb7c02519bc5064b4500751c59fe5f5077

dreammaster noreply at scummvm.org
Wed Aug 21 05:36:49 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:
5cc0febb7c M4: RIDDLE: Beginnings of room 407 init


Commit: 5cc0febb7c02519bc5064b4500751c59fe5f5077
    https://github.com/scummvm/scummvm/commit/5cc0febb7c02519bc5064b4500751c59fe5f5077
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2024-08-20T22:35:12-07:00

Commit Message:
M4: RIDDLE: Beginnings of room 407 init

When you see that the room fields are over twice the size of
previous complicated rooms, you know you're in for a
monstrosity. Wish me luck, I'll need it.

Changed paths:
    engines/m4/riddle/rooms/section4/room407.cpp
    engines/m4/riddle/rooms/section4/room407.h


diff --git a/engines/m4/riddle/rooms/section4/room407.cpp b/engines/m4/riddle/rooms/section4/room407.cpp
index affd3500a2d..36a37254f19 100644
--- a/engines/m4/riddle/rooms/section4/room407.cpp
+++ b/engines/m4/riddle/rooms/section4/room407.cpp
@@ -27,10 +27,117 @@ namespace M4 {
 namespace Riddle {
 namespace Rooms {
 
+void Room407::preload() {
+	_G(player).walker_type = 1;
+	_G(player).shadow_type = 1;
+	LoadWSAssets("OTHER SCRIPT");
+}
+
 void Room407::init() {
+	player_set_commands_allowed(false);
+	digi_preload("407_s31");
+	digi_preload("407_s32");
+	_val1 = 357;
+	_val2 = 293;
+
+	_waterFlowTube = series_load("water flowing out surg tube");
+	_waterFlowFaucet = series_load("WATER FLOWING OUT OF FAUCET");
+	_waterFlowStem = series_load("water flws out fauct stem surg");
+
+	if (_G(game).previous_room == KERNEL_RESTORING_GAME) {
+		if (_val5 == 1010) {
+			// TODO
+		} else {
+			// TODO
+		}
+	} else {
+		static const char *HOTSPOTS[] = {
+			"GARDEN HOSE", "RUBBER PLUG", "SURGICAL TUBE",
+			"PUMP GRIPS", "PUMP GRIPS ", "JAR/CORK ",
+			"JAR/GRIPS ", "JAR/RUBBER PLUG ", "PUMP ROD ",
+			"GLASS JAR ", "LEVER KEY  ", "GARDEN HOSE ",
+			"SURGICAL TUBE ", "FAUCET PIPE ", "GARDEN HOSE  ",
+			"SURGICAL TUBE  ", "FAUCET PIPE  ", "SURGICAL TUBE   ",
+			"GARDEN HOSE   ", "GARDEN HOSE    ", "AIR VALVE/HANDLE",
+			"LEVER KEY ", "NOZZLES/TUBE", "PERIODIC TABLE/JAR",
+			"PERIODIC TABLE ", "JAR/RUBBER PLUG", "JAR/CORK",
+			"MICROSCOPE", "BUTTONS", "LETTER", "BUTTON",
+			"BUTTON ", "BUTTON  ", "BUTTON   ", "WATER",
+			"WATER ", "WATER  ", nullptr
+		};
+		for (auto *hs = HOTSPOTS; *hs; ++hs)
+			hotspot_set_active(*hs, false);
+
+		_val3 = 1010;
+		_val4 = 1011;
+		_val5 = 1011;
+		_val6 = 1011;
+		_val7 = 1020;
+		_val8 = 1100;
+		_val9 = 1100;
+		_val10 = 1112;
+		_xyzzy1 = 1115;
+		_xyzzy2 = 1101;
+		_xyzzy3 = 1101;
+		_xyzzy4 = 1101;
+		_xyzzy5 = 1101;
+		_xyzzy6 = 1112;
+		_xyzzy7 = 1112;
+		_xyzzy8 = 1116;
+		_xyzzy9 = 1118;
+		_xyzzy10 = 1040;
+		_frotz1 = 0;
+		_frotz2 = 0;
+		_frotz3 = 0;
+		_frotz4 = 0;
+		_frotz5 = 0;
+		_frotz6 = 0;
+		_frotz7 = 0;
+		_frotz8 = 0;
+		_frotz9 = 0;
+		_frotz10 = 1031;
+		_frotz10 = 1031;
+		_int1 = 1031;
+		_int2 = 1031;
+		_int3 = 1031;
+		_int4 = 1031;
+		_int5 = 1031;
+		_int6 = 1031;
+		_int7 = 1031;
+		_int10 = 0;
+		_int11 = 0;
+		_int12 = 0;
+		_int13 = 0;
+		_int14 = 0;
+
+		_bottle = series_place_sprite("407BOTLE", 0, 0, -53, 100, 0xf00);
+		_chart = series_place_sprite("407CHART", 0, 0, -53, 100, 0xf00);
+		_cpist = series_place_sprite("407CPIST", 0, 0, -53, 100, 0xf00);
+		_drawer = series_place_sprite("407DRAWR", 0, 0, -53, 100, 0xf00);
+		_escape = series_place_sprite("407ESCAP", 0, 0, -53, 100, 0xd00);
+		_faucet1 = series_place_sprite("407FAUC", 0, 0, -53, 100, 0xe00);
+		_faucet2 = series_place_sprite("407FAUC", 0, 0, -53, 100, 0xe00);
+		_lever = series_place_sprite("407LEVRW", 0, 0, -53, 100, 0xf00);
+		_niche = series_place_sprite("407NICH", 0, 0, -53, 100, 0xf00);
+		_tpist = series_place_sprite("407TPIST", 0, 0, -53, 100, 0xf00);
+		_pump = series_place_sprite("407pump", 0, 0, -53, 100, 0xf00);
+	}
+	// TODO
 }
 
 void Room407::daemon() {
+	// TODO
+}
+
+void Room407::pre_parser() {
+	bool lookFlag = player_said_any("look", "look at");
+	bool takeFlag = player_said("take");
+	bool useFlag = player_said_any("push", "pull", "gear", "open", "close");
+	// TODO
+}
+
+void Room407::parser() {
+	// TODO
 }
 
 } // namespace Rooms
diff --git a/engines/m4/riddle/rooms/section4/room407.h b/engines/m4/riddle/rooms/section4/room407.h
index 30904415e4f..3a48ed2bb62 100644
--- a/engines/m4/riddle/rooms/section4/room407.h
+++ b/engines/m4/riddle/rooms/section4/room407.h
@@ -29,12 +29,74 @@ namespace Riddle {
 namespace Rooms {
 
 class Room407 : public Room {
+private:
+	int _val1 = 0;
+	int _val2 = 0;
+	int _val3 = 0;
+	int _val4 = 0;
+	int _val5 = 0;
+	int _val6 = 0;
+	int _val7 = 0;
+	int _val8 = 0;
+	int _val9 = 0;
+	int _val10 = 0;
+	int _xyzzy1 = 0;
+	int _xyzzy2 = 0;
+	int _xyzzy3 = 0;
+	int _xyzzy4 = 0;
+	int _xyzzy5 = 0;
+	int _xyzzy6 = 0;
+	int _xyzzy7 = 0;
+	int _xyzzy8 = 0;
+	int _xyzzy9 = 0;
+	int _xyzzy10 = 0;
+	int _frotz1 = 0;
+	int _frotz2 = 0;
+	int _frotz3 = 0;
+	int _frotz4 = 0;
+	int _frotz5 = 0;
+	int _frotz6 = 0;
+	int _frotz7 = 0;
+	int _frotz8 = 0;
+	int _frotz9 = 0;
+	int _frotz10 = 0;
+	int _int1 = 0;
+	int _int2 = 0;
+	int _int3 = 0;
+	int _int4 = 0;
+	int _int5 = 0;
+	int _int6 = 0;
+	int _int7 = 0;
+	int _int10 = 0;
+	int _int11 = 0;
+	int _int12 = 0;
+	int _int13 = 0;
+	int _int14 = 0;
+
+	int _waterFlowTube = 0;
+	int _waterFlowFaucet = 0;
+	int _waterFlowStem = 0;
+	machine *_bottle = nullptr;
+	machine *_chart = nullptr;
+	machine *_cpist = nullptr;
+	machine *_drawer = nullptr;
+	machine *_escape = nullptr;
+	machine *_faucet1 = nullptr;
+	machine *_faucet2 = nullptr;
+	machine *_lever = nullptr;
+	machine *_niche = nullptr;
+	machine *_tpist = nullptr;
+	machine *_pump = nullptr;
+
 public:
 	Room407() : Room() {}
 	~Room407() override {}
 
+	void preload() override;
 	void init() override;
 	void daemon() override;
+	void pre_parser() override;
+	void parser() override;
 };
 
 } // namespace Rooms




More information about the Scummvm-git-logs mailing list