[Scummvm-git-logs] scummvm master -> 8679281bf1142a9d208be020c47961ff0bd1cf06

dreammaster noreply at scummvm.org
Sat Jul 4 22:09:15 UTC 2026


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .

Summary:
8679281bf1 MADS: PHANTOM: Restrict demo playable area


Commit: 8679281bf1142a9d208be020c47961ff0bd1cf06
    https://github.com/scummvm/scummvm/commit/8679281bf1142a9d208be020c47961ff0bd1cf06
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-07-05T08:09:09+10:00

Commit Message:
MADS: PHANTOM: Restrict demo playable area

Changed paths:
    engines/mads/madsv2/phantom/global.cpp
    engines/mads/madsv2/phantom/global.h
    engines/mads/madsv2/phantom/rooms/room102.cpp
    engines/mads/madsv2/phantom/rooms/room202.cpp


diff --git a/engines/mads/madsv2/phantom/global.cpp b/engines/mads/madsv2/phantom/global.cpp
index 3fb29bd1039..6620738f51d 100644
--- a/engines/mads/madsv2/phantom/global.cpp
+++ b/engines/mads/madsv2/phantom/global.cpp
@@ -29,6 +29,7 @@ namespace MADSV2 {
 namespace Phantom {
 
 namespace Rooms {
+
 // Section preloads
 extern void section_1_preload();
 extern void section_2_preload();
@@ -92,6 +93,8 @@ extern void room_506_synchronize(Common::Serializer &s);
 
 } // namespace Rooms
 
+const char *DEMO_MSG = "That command is not available in the demo version";
+
 void global_section_constructor() {
 	section_preload_code_pointer = NULL;
 	section_room_constructor = NULL;
diff --git a/engines/mads/madsv2/phantom/global.h b/engines/mads/madsv2/phantom/global.h
index 3616c336973..b12b2ffda94 100644
--- a/engines/mads/madsv2/phantom/global.h
+++ b/engines/mads/madsv2/phantom/global.h
@@ -275,6 +275,7 @@ enum {
 #define FUGUE_B_MINOR             3
 #define FUGUE_C_MINOR             4
 
+extern const char *DEMO_MSG;
 
 extern void global_section_constructor();
 extern void sync_room(Common::Serializer &s);
diff --git a/engines/mads/madsv2/phantom/rooms/room102.cpp b/engines/mads/madsv2/phantom/rooms/room102.cpp
index 98250dda697..ede1357805a 100644
--- a/engines/mads/madsv2/phantom/rooms/room102.cpp
+++ b/engines/mads/madsv2/phantom/rooms/room102.cpp
@@ -29,6 +29,7 @@
 #include "mads/madsv2/phantom/mads/sounds.h"
 #include "mads/madsv2/phantom/rooms/section1.h"
 #include "mads/madsv2/phantom/rooms/room102.h"
+#include "mads/madsv2/engine.h"
 
 namespace MADS {
 namespace MADSV2 {
@@ -48,7 +49,8 @@ void room_102_init() {
 	/* =================== Load Sprite Series ==================== */
 
 	ss[fx_door]  = kernel_load_series(kernel_name('x', 0), false);
-	ss[fx_death] = kernel_load_series("*RAL86", false);
+	if (!g_engine->isDemo())
+		ss[fx_death] = kernel_load_series("*RAL86", false);
 
 
 	/* =========== If in 1993, put chandelier here =============== */
@@ -155,7 +157,7 @@ void room_102_pre_parser() {
 
 
 void room_102_parser() {
-	if (player_said_2(walk_down, aisle)) {
+	if (player_said_2(walk_down, aisle) || player_said_2(walk_up, aisle)) {
 		new_room = 101;
 		goto handled;
 	}
@@ -163,7 +165,10 @@ void room_102_parser() {
 	if ((player_said_2(walk_through, orchestra_door)) ||
 	    (player_said_2(push, orchestra_door)) ||
 	    (player_said_2(open, orchestra_door))) {
-		if (local->anim_0_running) {
+		if (g_engine->isDemo()) {
+			popup_alert(26, DEMO_MSG, nullptr);
+
+		} else if (local->anim_0_running) {
 			kernel_timing_trigger(QUARTER_SECOND, ROOM_102_TRY_AGAIN);
 			player.commands_allowed = false;
 
diff --git a/engines/mads/madsv2/phantom/rooms/room202.cpp b/engines/mads/madsv2/phantom/rooms/room202.cpp
index 214a1231943..8119fcbe330 100644
--- a/engines/mads/madsv2/phantom/rooms/room202.cpp
+++ b/engines/mads/madsv2/phantom/rooms/room202.cpp
@@ -37,6 +37,7 @@
 #include "mads/madsv2/phantom/mads/text.h"
 #include "mads/madsv2/phantom/rooms/section2.h"
 #include "mads/madsv2/phantom/rooms/room202.h"
+#include "mads/madsv2/engine.h"
 
 namespace MADS {
 namespace MADSV2 {
@@ -56,6 +57,9 @@ void set_chandelier_positions() {
 	int y;
 	int xs;
 
+	if (g_engine->isDemo())
+		return;
+
 	center = picture_view_x + (video_x >> 1);
 
 	for (chandelier = 0; chandelier < NUM_CHANDELIERS; chandelier++) {
@@ -414,15 +418,18 @@ void room_202_init() {
 
 	/* =================== Load conversations ======================== */
 
-	conv_get(CONV_USHER_17);
-	conv_get(CONV_DEGAS_9);
+	if (!g_engine->isDemo()) {
+		conv_get(CONV_USHER_17);
+		conv_get(CONV_DEGAS_9);
+	}
 
 
 	/* =================== Load Sprite Series ======================= */
 
 	ss[fx_take_9]       = kernel_load_series("*RDR_9", false);
 	ss[fx_left_door]    = kernel_load_series(kernel_name('x', 0), false);
-	ss[fx_chandelier_0] = kernel_load_series(kernel_name('f', 0), false);
+	if (!g_engine->isDemo())
+		ss[fx_chandelier_0] = kernel_load_series(kernel_name('f', 0), false);
 
 
 	if (global[ticket_people_here] == USHER_AND_SELLER) {
@@ -802,6 +809,11 @@ void room_202_parser() {
 	}
 
 	if (player_said_2(walk_through, left_door) || player_said_2(open, left_door)) {
+		if (g_engine->isDemo()) {
+			popup_alert(26, DEMO_MSG, nullptr);
+			goto handled;
+		}
+
 		switch (kernel.trigger) {
 		case 0:
 			player.commands_allowed = false;
@@ -854,7 +866,12 @@ void room_202_parser() {
 	}
 
 	if (player_said_2(walk_through, left_archway)) {
-		new_room = 201;
+		if (g_engine->isDemo()) {
+			popup_alert(26, DEMO_MSG, nullptr);
+		} else {
+			new_room = 201;
+		}
+
 		goto handled;
 	}
 
@@ -864,12 +881,20 @@ void room_202_parser() {
 	}
 
 	if (player_said_2(walk_through, middle_door)) {
-		new_room = 204;
+		if (g_engine->isDemo()) {
+			popup_alert(26, DEMO_MSG, nullptr);
+		} else {
+			new_room = 204;
+		}
 		goto handled;
 	}
 
 	if (player_said_2(walk_through, right_door)) {
-		new_room = 205;
+		if (g_engine->isDemo()) {
+			popup_alert(26, DEMO_MSG, nullptr);
+		} else {
+			new_room = 205;
+		}
 		goto handled;
 	}
 




More information about the Scummvm-git-logs mailing list