[Scummvm-git-logs] scummvm master -> 470de4d743690c7fcd6a5673cb1beacbed9fa7b5
Strangerke
noreply at scummvm.org
Wed Jan 28 19:21:38 UTC 2026
This automated email contains information about 4 new commits which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
4a37b9b645 M4: Small janitorial work in gui_item
7624bed30f M4: BURGER: Make always use of setRoom for safety reasons (section number)
0a9c753f03 M4: RIDDLE: Make always use of setRoom for safety reasons (section number)
470de4d743 M4: Add a last call to setRoom in core/param
Commit: 4a37b9b64596cca52798d96de6abe3b909ab7cf7
https://github.com/scummvm/scummvm/commit/4a37b9b64596cca52798d96de6abe3b909ab7cf7
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2026-01-28T20:21:07+01:00
Commit Message:
M4: Small janitorial work in gui_item
Changed paths:
engines/m4/gui/gui_item.cpp
diff --git a/engines/m4/gui/gui_item.cpp b/engines/m4/gui/gui_item.cpp
index c1fe56a9b5b..92cb7022df8 100644
--- a/engines/m4/gui/gui_item.cpp
+++ b/engines/m4/gui/gui_item.cpp
@@ -582,8 +582,10 @@ static void CalculateViewIndex(Item *myItem) {
if (myItem->myListCount > myItem->listView) {
if (myItem->viewBottom && myItem->viewBottom->next) {
myItem->thumbY = minThumbY + (((myItem->h - thumbYRange) * myItem->viewIndex) / (myItem->myListCount - myItem->listView));
- } else myItem->thumbY = myItem->h - maxThumbY;
- } else myItem->thumbY = minThumbY;
+ } else
+ myItem->thumbY = myItem->h - maxThumbY;
+ } else
+ myItem->thumbY = minThumbY;
}
static void SetViewIndex(Item *myItem) {
@@ -1062,7 +1064,8 @@ bool ClickOnListBox(Item *myItem, int32 xOffset, int32 yOffset, int32 scrollType
myItem->viewBottom = myItem->viewBottom->prev;
myItem->viewIndex--;
changed = true;
- } else break;
+ } else
+ break;
}
myItem->thumbY = minThumbY + (((myItem->h - thumbYRange) * myItem->viewIndex) / (myItem->myListCount - myItem->listView));
} else
@@ -1076,7 +1079,8 @@ bool ClickOnListBox(Item *myItem, int32 xOffset, int32 yOffset, int32 scrollType
myItem->viewIndex++;
if (myItem->viewBottom && myItem->viewBottom->next) {
myItem->thumbY = minThumbY + (((myItem->h - thumbYRange) * myItem->viewIndex) / (myItem->myListCount - myItem->listView));
- } else myItem->thumbY = myItem->h - maxThumbY;
+ } else
+ myItem->thumbY = myItem->h - maxThumbY;
changed = true;
} else
changed = false;
@@ -1098,7 +1102,8 @@ bool ClickOnListBox(Item *myItem, int32 xOffset, int32 yOffset, int32 scrollType
myItem->thumbY = minThumbY + (((myItem->h - thumbYRange) * myItem->viewIndex) / (myItem->myListCount - myItem->listView));
} else
myItem->thumbY = myItem->h - maxThumbY;
- } else changed = false;
+ } else
+ changed = false;
} else if (((myItem->status & AREA_PRESSED) == 0) && (yOffset >= (myItem->thumbY)) && (yOffset < (myItem->thumbY + thumbHeight + _G(items).buttonHeight))) {
myItem->status = THUMB_PRESSED;
thumbOffset = yOffset - myItem->thumbY;
Commit: 7624bed30fbb6283cc38b67ae1ead93831ebf08e
https://github.com/scummvm/scummvm/commit/7624bed30fbb6283cc38b67ae1ead93831ebf08e
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2026-01-28T20:21:07+01:00
Commit Message:
M4: BURGER: Make always use of setRoom for safety reasons (section number)
Changed paths:
engines/m4/burger/hotkeys.cpp
engines/m4/burger/rooms/section1/room120.cpp
engines/m4/burger/rooms/section1/section1.cpp
engines/m4/burger/rooms/section2/section2.cpp
engines/m4/burger/rooms/section3/mine.cpp
engines/m4/burger/rooms/section3/room305.cpp
engines/m4/burger/rooms/section3/section3.cpp
engines/m4/burger/rooms/section4/section4.cpp
engines/m4/burger/rooms/section5/room501.cpp
engines/m4/burger/rooms/section5/room510.cpp
engines/m4/burger/rooms/section5/section5.cpp
engines/m4/burger/rooms/section6/room601.cpp
engines/m4/burger/rooms/section6/room603.cpp
engines/m4/burger/rooms/section6/room604.cpp
engines/m4/burger/rooms/section6/room605.cpp
engines/m4/burger/rooms/section6/room606.cpp
engines/m4/burger/rooms/section6/room609.cpp
engines/m4/burger/rooms/section6/section6.cpp
engines/m4/burger/rooms/section7/room701.cpp
engines/m4/burger/rooms/section7/room702.cpp
engines/m4/burger/rooms/section8/room801.cpp
engines/m4/burger/rooms/section9/room903.cpp
engines/m4/burger/rooms/section9/room951.cpp
engines/m4/burger/rooms/section9/room971.cpp
engines/m4/burger/rooms/section9/section9.cpp
diff --git a/engines/m4/burger/hotkeys.cpp b/engines/m4/burger/hotkeys.cpp
index fb44a3f65fe..881f6c6441c 100644
--- a/engines/m4/burger/hotkeys.cpp
+++ b/engines/m4/burger/hotkeys.cpp
@@ -114,8 +114,7 @@ void Hotkeys::escape_key_pressed(void *, void *) {
_G(kernel).going = false;
} else {
// In-game, so go back to demo menu screen
- _G(game).new_section = 9;
- _G(game).new_room = 901;
+ _G(game).setRoom(901);
}
break;
@@ -127,8 +126,7 @@ void Hotkeys::escape_key_pressed(void *, void *) {
case 951:
case 971:
// Switch to main menu
- _G(game).new_section = 9;
- _G(game).new_room = 903;
+ _G(game).setRoom(903);
break;
case 903:
diff --git a/engines/m4/burger/rooms/section1/room120.cpp b/engines/m4/burger/rooms/section1/room120.cpp
index b14c270bd32..02f3a4c9494 100644
--- a/engines/m4/burger/rooms/section1/room120.cpp
+++ b/engines/m4/burger/rooms/section1/room120.cpp
@@ -41,7 +41,7 @@ void Room120::daemon() {
// statements that are the previous rooms' daemons, I seriously love
// the simplicity of this room's daemon. It's awesome!
if (_G(kernel).trigger == 1) {
- _G(game).new_room = _G(game).previous_room;
+ _G(game).setRoom(_G(game).previous_room);
} else {
_G(kernel).continue_handling_trigger = true;
}
diff --git a/engines/m4/burger/rooms/section1/section1.cpp b/engines/m4/burger/rooms/section1/section1.cpp
index 60ec88209b5..7f68f1141cb 100644
--- a/engines/m4/burger/rooms/section1/section1.cpp
+++ b/engines/m4/burger/rooms/section1/section1.cpp
@@ -111,55 +111,55 @@ void Section1::daemon() {
case 1005:
case 1006:
case 1007:
- _G(game).new_room = _G(kernel).trigger - 1000 + 100;
+ _G(game).setRoom(_G(kernel).trigger - 1000 + 100);
break;
case 1008:
- _G(game).new_room = _G(flags)[V000] == 1002 ? 134 : 135;
+ _G(game).setRoom(_G(flags)[V000] == 1002 ? 134 : 135);
break;
case 1009:
- _G(game).new_room = _G(flags)[V000] == 1002 ? 133 : 136;
+ _G(game).setRoom(_G(flags)[V000] == 1002 ? 133 : 136);
break;
case 1010:
- _G(game).new_room = 137;
+ _G(game).setRoom(137);
break;
case 1011:
- _G(game).new_room = 138;
+ _G(game).setRoom(138);
break;
case 1012:
- _G(game).new_room = _G(flags)[V000] == 1002 ? 144 : 139;
+ _G(game).setRoom(_G(flags)[V000] == 1002 ? 144 : 139);
break;
case 1013:
- _G(game).new_room = _G(flags)[V000] == 1002 ? 141 : 140;
+ _G(game).setRoom(_G(flags)[V000] == 1002 ? 141 : 140);
break;
case 1014:
- _G(game).new_room = 142;
+ _G(game).setRoom(142);
break;
case 1015:
- _G(game).new_room = 143;
+ _G(game).setRoom(143);
break;
case 1016:
- _G(game).new_room = 145;
+ _G(game).setRoom(145);
break;
case 1017:
- _G(game).new_room = 170;
+ _G(game).setRoom(170);
break;
case 1018:
- _G(game).new_room = 171;
+ _G(game).setRoom(171);
break;
case 1019:
- _G(game).new_room = 172;
+ _G(game).setRoom(172);
break;
case 1020:
- _G(game).new_room = 173;
+ _G(game).setRoom(173);
break;
case 1021:
- _G(game).new_room = 174;
+ _G(game).setRoom(174);
break;
case 1022:
- _G(game).new_room = 175;
+ _G(game).setRoom(175);
break;
case 1023:
- _G(game).new_room = 176;
+ _G(game).setRoom(176);
break;
case 1024:
pal_fade_init(_G(master_palette), 0, 255, 100, 0, -1);
diff --git a/engines/m4/burger/rooms/section2/section2.cpp b/engines/m4/burger/rooms/section2/section2.cpp
index b7f066f5948..2d0a472c1d7 100644
--- a/engines/m4/burger/rooms/section2/section2.cpp
+++ b/engines/m4/burger/rooms/section2/section2.cpp
@@ -34,11 +34,11 @@ Section2::Section2() : Rooms::Section() {
void Section2::daemon() {
switch (_G(kernel).trigger) {
case 2001:
- _G(game).new_room = 204;
+ _G(game).setRoom(204);
break;
case 2002:
- _G(game).new_room = 207;
+ _G(game).setRoom(207);
break;
default:
diff --git a/engines/m4/burger/rooms/section3/mine.cpp b/engines/m4/burger/rooms/section3/mine.cpp
index abb1b4411bf..34f2a8c29bc 100644
--- a/engines/m4/burger/rooms/section3/mine.cpp
+++ b/engines/m4/burger/rooms/section3/mine.cpp
@@ -478,7 +478,7 @@ void Mine::mine_travel_link(int16 takeLink) {
_mineRoomInfo = MINE_INFO[mineRoomIndex]; // Get new mine room info from new index
_presentSceneID = _mineRoomInfo.scene_id; // Set the scene ID
- _G(game).new_room = MINE_SCENE_NUMBERS[_presentSceneID]; // Go to the corresponding scene number
+ _G(game).setRoom(MINE_SCENE_NUMBERS[_presentSceneID]); // Go to the corresponding scene number
_G(kernel).force_restart = true; // Makes the scene start over even if new_room = present room
}
diff --git a/engines/m4/burger/rooms/section3/room305.cpp b/engines/m4/burger/rooms/section3/room305.cpp
index a19af1c9e6f..c5dd96ddf53 100644
--- a/engines/m4/burger/rooms/section3/room305.cpp
+++ b/engines/m4/burger/rooms/section3/room305.cpp
@@ -120,7 +120,7 @@ void Room305::daemon() {
break;
case 3001:
- _G(game).new_room = 302;
+ _G(game).setRoom(302);
break;
case kCHANGE_WILBUR_ANIMATION:
diff --git a/engines/m4/burger/rooms/section3/section3.cpp b/engines/m4/burger/rooms/section3/section3.cpp
index 940112060eb..ae235a4351a 100644
--- a/engines/m4/burger/rooms/section3/section3.cpp
+++ b/engines/m4/burger/rooms/section3/section3.cpp
@@ -59,28 +59,28 @@ Section3::Section3() : Rooms::Section() {
void Section3::daemon() {
switch (_G(kernel).trigger) {
case 3001:
- _G(game).new_room = 302;
+ _G(game).setRoom(302);
break;
case 3002:
- _G(game).new_room = 303;
+ _G(game).setRoom(303);
break;
case 3003:
- _G(game).new_room = 304;
+ _G(game).setRoom(304);
break;
case 3004:
- _G(game).new_room = 305;
+ _G(game).setRoom(305);
break;
case 3005:
digi_unload("303_003");
- _G(game).new_room = 306;
+ _G(game).setRoom(306);
break;
case 3006:
- _G(game).new_room = 307;
+ _G(game).setRoom(307);
break;
case 3007:
@@ -134,7 +134,7 @@ void Section3::daemon() {
break;
case 10015:
- _G(game).new_room = 306;
+ _G(game).setRoom(306);
break;
default:
diff --git a/engines/m4/burger/rooms/section4/section4.cpp b/engines/m4/burger/rooms/section4/section4.cpp
index 4f77d63c0c9..0d06ad07806 100644
--- a/engines/m4/burger/rooms/section4/section4.cpp
+++ b/engines/m4/burger/rooms/section4/section4.cpp
@@ -148,27 +148,27 @@ void Section4::init() {
void Section4::daemon() {
switch (_G(kernel).trigger) {
case 4001:
- _G(game).new_room = 401;
+ _G(game).setRoom(401);
break;
case 4002:
- _G(game).new_room = 402;
+ _G(game).setRoom(402);
break;
case 4003:
- _G(game).new_room = 404;
+ _G(game).setRoom(404);
break;
case 4004:
- _G(game).new_room = 405;
+ _G(game).setRoom(405);
break;
case 4005:
- _G(game).new_room = 406;
+ _G(game).setRoom(406);
break;
case 4006:
- _G(game).new_room = 407;
+ _G(game).setRoom(407);
break;
case 4007:
@@ -229,9 +229,9 @@ bool Section4::checkOrderWindow() {
_G(flags)[kFifthTestPassed] = 1;
disable_player_commands_and_fade_init(k10027);
return true;
- } else {
- return false;
}
+
+ return false;
}
bool Section4::teleport() {
@@ -241,19 +241,19 @@ bool Section4::teleport() {
if (te->_room) {
if (player_said("DISC")) {
- _G(game).new_room = te->_newRoom1;
+ _G(game).setRoom(te->_newRoom1);
term_message("...%d...", te->_newRoom1);
return true;
- } else if (player_said("DISC ")) {
- _G(game).new_room = te->_newRoom2;
+ }
+
+ if (player_said("DISC ")) {
+ _G(game).setRoom(te->_newRoom2);
term_message("...%d...", te->_newRoom2);
return true;
- } else {
- return false;
}
- } else {
- return false;
}
+
+ return false;
}
} // namespace Rooms
diff --git a/engines/m4/burger/rooms/section5/room501.cpp b/engines/m4/burger/rooms/section5/room501.cpp
index 5eae2cfa553..bfd9a2f9a66 100644
--- a/engines/m4/burger/rooms/section5/room501.cpp
+++ b/engines/m4/burger/rooms/section5/room501.cpp
@@ -79,7 +79,7 @@ void Room501::daemon() {
break;
case 5006:
- _G(game).new_room = 502;
+ _G(game).setRoom(502);
break;
default:
diff --git a/engines/m4/burger/rooms/section5/room510.cpp b/engines/m4/burger/rooms/section5/room510.cpp
index c67588c08c2..5433aa80983 100644
--- a/engines/m4/burger/rooms/section5/room510.cpp
+++ b/engines/m4/burger/rooms/section5/room510.cpp
@@ -73,7 +73,7 @@ void Room510::init() {
void Room510::daemon() {
switch (_G(kernel).trigger) {
case 1:
- _G(game).new_room = _G(game).previous_room;
+ _G(game).setRoom(_G(game).previous_room);
break;
case 2:
diff --git a/engines/m4/burger/rooms/section5/section5.cpp b/engines/m4/burger/rooms/section5/section5.cpp
index 6e609cbfb15..22099e8ceb7 100644
--- a/engines/m4/burger/rooms/section5/section5.cpp
+++ b/engines/m4/burger/rooms/section5/section5.cpp
@@ -428,35 +428,35 @@ void Section5::daemon() {
break;
case 5006:
- _G(game).new_room = 502;
+ _G(game).setRoom(502);
break;
case 5007:
- _G(game).new_room = 503;
+ _G(game).setRoom(503);
break;
case 5008:
- _G(game).new_room = 504;
+ _G(game).setRoom(504);
break;
case 5009:
- _G(game).new_room = 505;
+ _G(game).setRoom(505);
break;
case 5010:
- _G(game).new_room = 506;
+ _G(game).setRoom(506);
break;
case 5011:
- _G(game).new_room = 507;
+ _G(game).setRoom(507);
break;
case 5012:
- _G(game).new_room = 508;
+ _G(game).setRoom(508);
break;
case 5013:
- _G(game).new_room = 509;
+ _G(game).setRoom(509);
break;
case 5014:
@@ -464,19 +464,19 @@ void Section5::daemon() {
_G(flags)[V187] = _G(player_info).x;
_G(flags)[V188] = _G(player_info).y;
_G(flags)[V189] = _G(player_info).facing;
- _G(game).new_room = 510;
+ _G(game).setRoom(510);
break;
case 5015:
- _G(game).new_room = 511;
+ _G(game).setRoom(511);
break;
case 5016:
- _G(game).new_room = 512;
+ _G(game).setRoom(512);
break;
case 5017:
- _G(game).new_room = 513;
+ _G(game).setRoom(513);
break;
case 5018:
@@ -509,7 +509,7 @@ void Section5::daemon() {
break;
case 10015:
- _G(game).new_room = 512;
+ _G(game).setRoom(512);
break;
default:
diff --git a/engines/m4/burger/rooms/section6/room601.cpp b/engines/m4/burger/rooms/section6/room601.cpp
index c8198b2f648..33554c907a0 100644
--- a/engines/m4/burger/rooms/section6/room601.cpp
+++ b/engines/m4/burger/rooms/section6/room601.cpp
@@ -79,7 +79,7 @@ void Room601::daemon() {
break;
case 6004:
- _G(game).new_room = 604;
+ _G(game).setRoom(604);
break;
default:
diff --git a/engines/m4/burger/rooms/section6/room603.cpp b/engines/m4/burger/rooms/section6/room603.cpp
index 8a8442faa2a..530860130f8 100644
--- a/engines/m4/burger/rooms/section6/room603.cpp
+++ b/engines/m4/burger/rooms/section6/room603.cpp
@@ -318,19 +318,19 @@ void Room603::daemon() {
break;
case 6002:
- _G(game).new_room = 602;
+ _G(game).setRoom(602);
break;
case 6004:
- _G(game).new_room = 604;
+ _G(game).setRoom(604);
break;
case 6005:
- _G(game).new_room = 605;
+ _G(game).setRoom(605);
break;
case 6010:
- _G(game).new_room = 612;
+ _G(game).setRoom(612);
break;
case 6011:
diff --git a/engines/m4/burger/rooms/section6/room604.cpp b/engines/m4/burger/rooms/section6/room604.cpp
index 8a8053693bd..7f9d63554de 100644
--- a/engines/m4/burger/rooms/section6/room604.cpp
+++ b/engines/m4/burger/rooms/section6/room604.cpp
@@ -298,15 +298,15 @@ void Room604::daemon() {
break;
case 7:
- _G(game).new_room = 602;
+ _G(game).setRoom(602);
break;
case 8:
- _G(game).new_room = 603;
+ _G(game).setRoom(603);
break;
case 9:
- _G(game).new_room = 612;
+ _G(game).setRoom(612);
break;
case 6002:
@@ -354,7 +354,7 @@ void Room604::daemon() {
case 6004:
if (!_G(flags)[V246])
- _G(game).new_room = 605;
+ _G(game).setRoom(605);
break;
case 6005:
diff --git a/engines/m4/burger/rooms/section6/room605.cpp b/engines/m4/burger/rooms/section6/room605.cpp
index b7463343f3e..a3b287ff2db 100644
--- a/engines/m4/burger/rooms/section6/room605.cpp
+++ b/engines/m4/burger/rooms/section6/room605.cpp
@@ -64,7 +64,7 @@ void Room605::daemon() {
break;
case 6007:
- _G(game).new_room = 608;
+ _G(game).setRoom(608);
break;
default:
diff --git a/engines/m4/burger/rooms/section6/room606.cpp b/engines/m4/burger/rooms/section6/room606.cpp
index 081356f45f1..231bb2b36a7 100644
--- a/engines/m4/burger/rooms/section6/room606.cpp
+++ b/engines/m4/burger/rooms/section6/room606.cpp
@@ -63,7 +63,7 @@ void Room606::daemon() {
break;
case 6007:
- _G(game).new_room = 608;
+ _G(game).setRoom(608);
break;
default:
diff --git a/engines/m4/burger/rooms/section6/room609.cpp b/engines/m4/burger/rooms/section6/room609.cpp
index a39652bc0a5..e62f7f1670b 100644
--- a/engines/m4/burger/rooms/section6/room609.cpp
+++ b/engines/m4/burger/rooms/section6/room609.cpp
@@ -61,7 +61,7 @@ void Room609::daemon() {
break;
case 6010:
- _G(game).new_room = 612;
+ _G(game).setRoom(612);
break;
default:
diff --git a/engines/m4/burger/rooms/section6/section6.cpp b/engines/m4/burger/rooms/section6/section6.cpp
index 1e5932e4888..4dd69b3541e 100644
--- a/engines/m4/burger/rooms/section6/section6.cpp
+++ b/engines/m4/burger/rooms/section6/section6.cpp
@@ -67,19 +67,19 @@ void Section6::daemon() {
case 6004:
case 6005:
case 6006:
- _G(game).new_room = _G(kernel).trigger - 6000 + 600;
+ _G(game).setRoom(_G(kernel).trigger - 6000 + 600);
break;
case 6008:
- _G(game).new_room = 609;
+ _G(game).setRoom(609);
break;
case 6009:
- _G(game).new_room = 610;
+ _G(game).setRoom(610);
break;
case 6010:
- _G(game).new_room = 612;
+ _G(game).setRoom(612);
break;
case 6011:
@@ -346,10 +346,9 @@ void Section6::daemon() {
if (_G(executing) == INTERACTIVE_DEMO) {
// After having clicked the teleporter/"failed normally" button we end up here
// In the DEMO this click leads to the main menu (it does not restart the test sequence)
- _G(game).new_section = 9;
- _G(game).new_room = 901;
+ _G(game).setRoom(901);
} else {
- _G(game).new_room = 608;
+ _G(game).setRoom(608);
}
break;
diff --git a/engines/m4/burger/rooms/section7/room701.cpp b/engines/m4/burger/rooms/section7/room701.cpp
index 60ae7586f4d..7b3e63d46c9 100644
--- a/engines/m4/burger/rooms/section7/room701.cpp
+++ b/engines/m4/burger/rooms/section7/room701.cpp
@@ -291,7 +291,7 @@ void Room701::daemon() {
break;
case 26:
- _G(game).new_room = 702;
+ _G(game).setRoom(702);
break;
default:
diff --git a/engines/m4/burger/rooms/section7/room702.cpp b/engines/m4/burger/rooms/section7/room702.cpp
index a79c725d0a2..c11bb267a4b 100644
--- a/engines/m4/burger/rooms/section7/room702.cpp
+++ b/engines/m4/burger/rooms/section7/room702.cpp
@@ -94,7 +94,7 @@ void Room702::daemon() {
break;
case 4:
- _G(game).new_room = 706;
+ _G(game).setRoom(706);
break;
case kCHANGE_FLUMIX_ANIMATION:
diff --git a/engines/m4/burger/rooms/section8/room801.cpp b/engines/m4/burger/rooms/section8/room801.cpp
index db9fda972b3..573cc039faf 100644
--- a/engines/m4/burger/rooms/section8/room801.cpp
+++ b/engines/m4/burger/rooms/section8/room801.cpp
@@ -440,7 +440,7 @@ void Room801::daemon() {
digi_play_loop("807_003", 2, 255, -1, 807);
digi_play_loop("807_001", 3, 255, -1, 807);
- _G(game).new_room = 802;
+ _G(game).setRoom(802);
} else {
kernel_trigger_dispatch_now(k10027);
}
diff --git a/engines/m4/burger/rooms/section9/room903.cpp b/engines/m4/burger/rooms/section9/room903.cpp
index b5207d71ca6..ca7e1ff59eb 100644
--- a/engines/m4/burger/rooms/section9/room903.cpp
+++ b/engines/m4/burger/rooms/section9/room903.cpp
@@ -167,8 +167,7 @@ void Room903::daemon() {
case 15:
g_vars->initialize_game();
- _G(game).new_room = 801;
- _G(game).new_section = 8;
+ _G(game).setRoom(801);
break;
case 16:
diff --git a/engines/m4/burger/rooms/section9/room951.cpp b/engines/m4/burger/rooms/section9/room951.cpp
index 796eaef9709..3f38297f431 100644
--- a/engines/m4/burger/rooms/section9/room951.cpp
+++ b/engines/m4/burger/rooms/section9/room951.cpp
@@ -594,7 +594,7 @@ void Room951::daemon() {
case SAVEGAME_CHECK:
if (_G(executing) == WHOLE_GAME && !g_engine->autosaveExists()) {
- _G(game).new_room = 903;
+ _G(game).setRoom(903);
adv_kill_digi_between_rooms(false);
} else {
kernel_trigger_dispatch_now(START_44);
@@ -656,10 +656,9 @@ void Room951::daemon() {
compact_mem_and_report();
if (_G(executing) == WHOLE_GAME) {
g_vars->initialize_game();
- _G(game).new_room = 801;
- _G(game).new_section = 8;
+ _G(game).setRoom(801);
} else if (g_engine->getLanguage() == Common::EN_ANY) {
- _G(game).new_room = 901;
+ _G(game).setRoom(901);
} else {
_G(kernel).force_restart = true;
}
diff --git a/engines/m4/burger/rooms/section9/room971.cpp b/engines/m4/burger/rooms/section9/room971.cpp
index b1f1d17d2c5..09671756d8e 100644
--- a/engines/m4/burger/rooms/section9/room971.cpp
+++ b/engines/m4/burger/rooms/section9/room971.cpp
@@ -489,12 +489,12 @@ void Room971::daemon() {
break;
case INTERACTIVE_DEMO:
- _G(game).new_room = 901;
+ _G(game).setRoom(901);
player_set_commands_allowed(false);
break;
case WHOLE_GAME:
- _G(game).new_room = 903;
+ _G(game).setRoom(903);
player_set_commands_allowed(false);
break;
diff --git a/engines/m4/burger/rooms/section9/section9.cpp b/engines/m4/burger/rooms/section9/section9.cpp
index 1d215ac86c5..cdcb342bcbf 100644
--- a/engines/m4/burger/rooms/section9/section9.cpp
+++ b/engines/m4/burger/rooms/section9/section9.cpp
@@ -38,16 +38,16 @@ Section9::Section9() : Rooms::Section() {
void Section9::daemon() {
switch (_G(kernel).trigger) {
case 9002:
- _G(game).new_room = 902;
+ _G(game).setRoom(902);
break;
case 9004:
- _G(game).new_room = 904;
+ _G(game).setRoom(904);
break;
case 9005:
- _G(game).new_room = 951;
+ _G(game).setRoom(951);
break;
case 9006:
- _G(game).new_room = 971;
+ _G(game).setRoom(971);
break;
default:
_G(kernel).continue_handling_trigger = true;
Commit: 0a9c753f03467127ca9891baf9178b86b50faecb
https://github.com/scummvm/scummvm/commit/0a9c753f03467127ca9891baf9178b86b50faecb
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2026-01-28T20:21:07+01:00
Commit Message:
M4: RIDDLE: Make always use of setRoom for safety reasons (section number)
Changed paths:
engines/m4/riddle/rooms/section2/room204.cpp
engines/m4/riddle/rooms/section2/room205.cpp
engines/m4/riddle/rooms/section2/room207.cpp
engines/m4/riddle/rooms/section3/room301.cpp
engines/m4/riddle/rooms/section7/room701.cpp
engines/m4/riddle/rooms/section7/room702.cpp
engines/m4/riddle/rooms/section7/room703.cpp
engines/m4/riddle/rooms/section7/room704.cpp
engines/m4/riddle/rooms/section7/room705.cpp
engines/m4/riddle/rooms/section7/room706.cpp
engines/m4/riddle/rooms/section7/room707.cpp
engines/m4/riddle/rooms/section7/room709.cpp
engines/m4/riddle/rooms/section7/room710.cpp
engines/m4/riddle/rooms/section7/room711.cpp
engines/m4/riddle/rooms/section8/room801.cpp
engines/m4/riddle/rooms/section8/room802.cpp
engines/m4/riddle/rooms/section8/room803.cpp
engines/m4/riddle/rooms/section8/room805.cpp
engines/m4/riddle/rooms/section8/room806.cpp
engines/m4/riddle/rooms/section8/room807.cpp
engines/m4/riddle/rooms/section8/room808.cpp
engines/m4/riddle/rooms/section8/room809.cpp
engines/m4/riddle/rooms/section8/room810.cpp
engines/m4/riddle/rooms/section8/room811.cpp
engines/m4/riddle/rooms/section8/room818.cpp
engines/m4/riddle/rooms/section8/room860.cpp
engines/m4/riddle/rooms/section8/section8_room.cpp
engines/m4/riddle/rooms/section9/room903.cpp
engines/m4/riddle/rooms/section9/room905.cpp
engines/m4/riddle/rooms/section9/room906.cpp
engines/m4/riddle/rooms/section9/room907.cpp
engines/m4/riddle/rooms/section9/room917.cpp
engines/m4/riddle/rooms/section9/room918.cpp
diff --git a/engines/m4/riddle/rooms/section2/room204.cpp b/engines/m4/riddle/rooms/section2/room204.cpp
index 57b14e33b77..8f52404466f 100644
--- a/engines/m4/riddle/rooms/section2/room204.cpp
+++ b/engines/m4/riddle/rooms/section2/room204.cpp
@@ -1027,7 +1027,7 @@ void Room204::daemon() {
case 12:
interface_show();
- _G(game).new_room = 205;
+ _G(game).setRoom(205);
break;
case 15:
@@ -2216,7 +2216,7 @@ void Room204::daemon() {
case 629:
case 711:
- _G(game).new_room = 203;
+ _G(game).setRoom(203);
break;
case 630:
diff --git a/engines/m4/riddle/rooms/section2/room205.cpp b/engines/m4/riddle/rooms/section2/room205.cpp
index 66bb907f636..681dcbe4886 100644
--- a/engines/m4/riddle/rooms/section2/room205.cpp
+++ b/engines/m4/riddle/rooms/section2/room205.cpp
@@ -337,8 +337,7 @@ void Room205::parser() {
case 21:
inv_give_to_player("CHINESE YUAN");
inv_move_object("CHARCOAL", 999);
- _G(game).new_section = 8;
- _G(game).new_room = 850;
+ _G(game).setRoom(850);
break;
default:
@@ -728,7 +727,7 @@ void Room205::parser() {
break;
case 1:
- _G(game).new_room = 204;
+ _G(game).setRoom(204);
break;
default:
@@ -1434,8 +1433,7 @@ void Room205::daemon() {
case 666:
other_save_game_for_resurrection();
- _G(game).new_section = 4;
- _G(game).new_room = 413;
+ _G(game).setRoom(413);
break;
case 669:
@@ -1446,8 +1444,7 @@ void Room205::daemon() {
_fieldDC = 0;
_fieldE0 = 0;
other_save_game_for_resurrection();
- _G(game).new_section = 4;
- _G(game).new_room = 413;
+ _G(game).setRoom(413);
break;
case 901:
diff --git a/engines/m4/riddle/rooms/section2/room207.cpp b/engines/m4/riddle/rooms/section2/room207.cpp
index 69577c3815c..ab41fcf1f37 100644
--- a/engines/m4/riddle/rooms/section2/room207.cpp
+++ b/engines/m4/riddle/rooms/section2/room207.cpp
@@ -318,7 +318,7 @@ void Room207::parser() {
} else if (player_said("conv203d")) {
convHandler();
} else if (_G(kernel).trigger == 203) {
- _G(game).new_room = 203;
+ _G(game).setRoom(203);
} else if (talkFlag && player_said("peasant")) {
player_set_commands_allowed(false);
player_update_info();
@@ -1042,7 +1042,7 @@ void Room207::parser() {
break;
case 1:
- _G(game).new_room = 203;
+ _G(game).setRoom(203);
break;
@@ -1701,7 +1701,7 @@ void Room207::daemon() {
break;
case 749:
- _G(game).new_room = 203;
+ _G(game).setRoom(203);
break;
default:
diff --git a/engines/m4/riddle/rooms/section3/room301.cpp b/engines/m4/riddle/rooms/section3/room301.cpp
index d8ba56d7a23..ba5c9539922 100644
--- a/engines/m4/riddle/rooms/section3/room301.cpp
+++ b/engines/m4/riddle/rooms/section3/room301.cpp
@@ -926,7 +926,7 @@ void Room301::parser() {
player_set_commands_allowed(false);
disable_player_commands_and_fade_init(1);
} else if (_G(kernel).trigger == 1) {
- _G(game).new_room = 303;
+ _G(game).setRoom(303);
}
}
} else if (lookFlag && player_said("poster")) {
diff --git a/engines/m4/riddle/rooms/section7/room701.cpp b/engines/m4/riddle/rooms/section7/room701.cpp
index 06db7326a9a..e873c4d33b2 100644
--- a/engines/m4/riddle/rooms/section7/room701.cpp
+++ b/engines/m4/riddle/rooms/section7/room701.cpp
@@ -306,7 +306,7 @@ void Room701::parser() {
case 3:
digi_stop(3);
- _G(game).new_room = 702;
+ _G(game).setRoom(702);
break;
default:
@@ -351,7 +351,7 @@ void Room701::parser() {
case 6:
digi_stop(3);
- _G(game).new_room = 702;
+ _G(game).setRoom(702);
break;
default:
@@ -1402,8 +1402,7 @@ void Room701::daemon() {
break;
}
- _G(game).new_room = 495;
- _G(game).new_section = 4;
+ _G(game).setRoom(495);
break;
diff --git a/engines/m4/riddle/rooms/section7/room702.cpp b/engines/m4/riddle/rooms/section7/room702.cpp
index 7b63186c254..7919b636a76 100644
--- a/engines/m4/riddle/rooms/section7/room702.cpp
+++ b/engines/m4/riddle/rooms/section7/room702.cpp
@@ -249,7 +249,7 @@ void Room702::parser() {
case 4:
adv_kill_digi_between_rooms(false);
digi_play_loop("950_s39", 3, 255, -1, -1);
- _G(game).new_room = 703;
+ _G(game).setRoom(703);
break;
@@ -267,7 +267,7 @@ void Room702::parser() {
if (_G(flags)[V211] && !_G(flags)[V210])
_G(flags)[V213] = 1;
- _G(game).new_room = 701;
+ _G(game).setRoom(701);
break;
default:
@@ -308,7 +308,7 @@ void Room702::parser() {
_G(flags)[V213] = 1;
}
- _G(game).new_room = 703;
+ _G(game).setRoom(703);
break;
diff --git a/engines/m4/riddle/rooms/section7/room703.cpp b/engines/m4/riddle/rooms/section7/room703.cpp
index 0b7b29f2689..611d8fdc694 100644
--- a/engines/m4/riddle/rooms/section7/room703.cpp
+++ b/engines/m4/riddle/rooms/section7/room703.cpp
@@ -615,7 +615,7 @@ void Room703::parser() {
player_set_commands_allowed(true);
adv_kill_digi_between_rooms(false);
digi_play_loop("950_s39", 3, 255, -1, -1);
- _G(game).new_room = 707;
+ _G(game).setRoom(707);
break;
@@ -641,7 +641,7 @@ void Room703::parser() {
case 4:
adv_kill_digi_between_rooms(false);
digi_play_loop("950_s39", 3, 255, -1, -1);
- _G(game).new_room = 702;
+ _G(game).setRoom(702);
break;
@@ -657,7 +657,7 @@ void Room703::parser() {
case 4:
adv_kill_digi_between_rooms(false);
digi_play_loop("950_s39", 3, 255, -1, -1);
- _G(game).new_room = 704;
+ _G(game).setRoom(704);
break;
@@ -673,7 +673,7 @@ void Room703::parser() {
case 4:
adv_kill_digi_between_rooms(false);
digi_play_loop("950_s39", 3, 255, -1, -1);
- _G(game).new_room = 706;
+ _G(game).setRoom(706);
break;
@@ -696,7 +696,7 @@ void Room703::parser() {
case 2:
adv_kill_digi_between_rooms(false);
digi_play_loop("950_s39", 3, 255, -1, -1);
- _G(game).new_room = 702;
+ _G(game).setRoom(702);
default:
break;
@@ -1184,7 +1184,7 @@ void Room703::useWheelOnNiche(int32 trigger, int val1) {
case 112:
adv_kill_digi_between_rooms(false);
digi_play_loop("950_s39", 3, 255, -1, -1);
- _G(game).new_room = 705;
+ _G(game).setRoom(705);
break;
diff --git a/engines/m4/riddle/rooms/section7/room704.cpp b/engines/m4/riddle/rooms/section7/room704.cpp
index 5b1bba2b144..ebea0f13ebd 100644
--- a/engines/m4/riddle/rooms/section7/room704.cpp
+++ b/engines/m4/riddle/rooms/section7/room704.cpp
@@ -571,7 +571,7 @@ void Room704::parser() {
player_set_commands_allowed(true);
adv_kill_digi_between_rooms(false);
digi_play_loop("950_s39", 3, 255, -1, -1);
- _G(game).new_room = 707;
+ _G(game).setRoom(707);
break;
@@ -589,7 +589,7 @@ void Room704::parser() {
case 4:
adv_kill_digi_between_rooms(false);
digi_play_loop("950_s39", 3, 255, -1, -1);
- _G(game).new_room = 705;
+ _G(game).setRoom(705);
break;
@@ -605,7 +605,7 @@ void Room704::parser() {
case 4:
adv_kill_digi_between_rooms(false);
digi_play_loop("950_s39", 3, 255, -1, -1);
- _G(game).new_room = 703;
+ _G(game).setRoom(703);
break;
@@ -1090,7 +1090,7 @@ void Room704::useWheelOnNiche(int32 trigger, int val1) {
case 112:
adv_kill_digi_between_rooms(false);
digi_play_loop("950_s39", 3, 255, -1, -1);
- _G(game).new_room = 705;
+ _G(game).setRoom(705);
break;
diff --git a/engines/m4/riddle/rooms/section7/room705.cpp b/engines/m4/riddle/rooms/section7/room705.cpp
index c5587789dc8..51de207316c 100644
--- a/engines/m4/riddle/rooms/section7/room705.cpp
+++ b/engines/m4/riddle/rooms/section7/room705.cpp
@@ -658,7 +658,7 @@ void Room705::parser() {
player_set_commands_allowed(true);
adv_kill_digi_between_rooms(false);
digi_play_loop("950_s39", 3, 255, -1, -1);
- _G(game).new_room = 707;
+ _G(game).setRoom(707);
break;
@@ -676,7 +676,7 @@ void Room705::parser() {
case 4:
adv_kill_digi_between_rooms(false);
digi_play_loop("950_s39", 3, 255, -1, -1);
- _G(game).new_room = 706;
+ _G(game).setRoom(706);
break;
@@ -692,7 +692,7 @@ void Room705::parser() {
case 4:
adv_kill_digi_between_rooms(false);
digi_play_loop("950_s39", 3, 255, -1, -1);
- _G(game).new_room = 704;
+ _G(game).setRoom(704);
break;
diff --git a/engines/m4/riddle/rooms/section7/room706.cpp b/engines/m4/riddle/rooms/section7/room706.cpp
index 6087ddb9da1..8a6ded44885 100644
--- a/engines/m4/riddle/rooms/section7/room706.cpp
+++ b/engines/m4/riddle/rooms/section7/room706.cpp
@@ -573,7 +573,7 @@ void Room706::parser() {
player_set_commands_allowed(true);
adv_kill_digi_between_rooms(false);
digi_play_loop("950_s39", 3, 255, -1, -1);
- _G(game).new_room = 707;
+ _G(game).setRoom(707);
break;
@@ -591,7 +591,7 @@ void Room706::parser() {
case 4:
adv_kill_digi_between_rooms(false);
digi_play_loop("950_s39", 3, 255, -1, -1);
- _G(game).new_room = 705;
+ _G(game).setRoom(705);
break;
@@ -609,7 +609,7 @@ void Room706::parser() {
case 4:
adv_kill_digi_between_rooms(false);
digi_play_loop("950_s39", 3, 255, -1, -1);
- _G(game).new_room = 703;
+ _G(game).setRoom(703);
break;
@@ -636,7 +636,7 @@ void Room706::parser() {
break;
case 3:
- _G(game).new_room = 709;
+ _G(game).setRoom(709);
break;
default:
@@ -1147,7 +1147,7 @@ void Room706::useWheelOnNiche(int32 trigger, int32 val1) {
case 112:
adv_kill_digi_between_rooms(false);
digi_play_loop("950_s39", 3, 255, -1, -1);
- _G(game).new_room = 705;
+ _G(game).setRoom(705);
break;
diff --git a/engines/m4/riddle/rooms/section7/room707.cpp b/engines/m4/riddle/rooms/section7/room707.cpp
index a4a354fde68..9243bc02e1a 100644
--- a/engines/m4/riddle/rooms/section7/room707.cpp
+++ b/engines/m4/riddle/rooms/section7/room707.cpp
@@ -282,7 +282,7 @@ void Room707::parser() {
player_set_commands_allowed(true);
adv_kill_digi_between_rooms(false);
digi_play_loop("950_s39", 3, 255, -1, -1);
- _G(game).new_room = 704;
+ _G(game).setRoom(704);
break;
@@ -313,7 +313,7 @@ void Room707::parser() {
player_set_commands_allowed(true);
adv_kill_digi_between_rooms(false);
digi_play_loop("950_s39", 3, 255, -1, -1);
- _G(game).new_room = 705;
+ _G(game).setRoom(705);
break;
@@ -344,7 +344,7 @@ void Room707::parser() {
player_set_commands_allowed(true);
adv_kill_digi_between_rooms(false);
digi_play_loop("950_s39", 3, 255, -1, -1);
- _G(game).new_room = 703;
+ _G(game).setRoom(703);
break;
@@ -375,7 +375,7 @@ void Room707::parser() {
player_set_commands_allowed(true);
adv_kill_digi_between_rooms(false);
digi_play_loop("950_s39", 3, 255, -1, -1);
- _G(game).new_room = 706;
+ _G(game).setRoom(706);
break;
diff --git a/engines/m4/riddle/rooms/section7/room709.cpp b/engines/m4/riddle/rooms/section7/room709.cpp
index b2748bcaf36..d5f269b9a4c 100644
--- a/engines/m4/riddle/rooms/section7/room709.cpp
+++ b/engines/m4/riddle/rooms/section7/room709.cpp
@@ -551,7 +551,7 @@ void Room709::parser() {
case 3:
RemoveSystemHotkey(KEY_CLEAR);
RemoveSystemHotkey(5);
- _G(game).new_room = 706;
+ _G(game).setRoom(706);
break;
default:
@@ -941,7 +941,7 @@ void Room709::daemon() {
digi_play_loop("950_s41", 3, 255, -1, -1);
RemoveSystemHotkey(KEY_CLEAR);
RemoveSystemHotkey(5);
- _G(game).new_room = 710;
+ _G(game).setRoom(710);
}
if (_chiselActiveFl) {
@@ -1015,7 +1015,7 @@ void Room709::daemon() {
digi_play_loop("950_s41", 3, 255, -1, -1);
RemoveSystemHotkey(KEY_CLEAR);
RemoveSystemHotkey(5);
- _G(game).new_room = 710;
+ _G(game).setRoom(710);
break;
diff --git a/engines/m4/riddle/rooms/section7/room710.cpp b/engines/m4/riddle/rooms/section7/room710.cpp
index fa67c29ade6..de0b3f3a3fb 100644
--- a/engines/m4/riddle/rooms/section7/room710.cpp
+++ b/engines/m4/riddle/rooms/section7/room710.cpp
@@ -512,7 +512,7 @@ void Room710::parser() {
case 5:
midi_stop();
player_set_commands_allowed(true);
- _G(game).new_room = 711;
+ _G(game).setRoom(711);
break;
@@ -536,7 +536,7 @@ void Room710::parser() {
player_set_commands_allowed(true);
adv_kill_digi_between_rooms(false);
midi_stop();
- _G(game).new_room = 709;
+ _G(game).setRoom(709);
break;
diff --git a/engines/m4/riddle/rooms/section7/room711.cpp b/engines/m4/riddle/rooms/section7/room711.cpp
index 4a2ec5b4a27..813017283fc 100644
--- a/engines/m4/riddle/rooms/section7/room711.cpp
+++ b/engines/m4/riddle/rooms/section7/room711.cpp
@@ -134,7 +134,7 @@ void Room711::parser() {
case 2:
player_set_commands_allowed(true);
- _G(game).new_room = _G(flags)[V286] ? 706 : 710;
+ _G(game).setRoom(_G(flags)[V286] ? 706 : 710);
break;
diff --git a/engines/m4/riddle/rooms/section8/room801.cpp b/engines/m4/riddle/rooms/section8/room801.cpp
index 8abb167a6ab..876600e9ef5 100644
--- a/engines/m4/riddle/rooms/section8/room801.cpp
+++ b/engines/m4/riddle/rooms/section8/room801.cpp
@@ -674,7 +674,7 @@ void Room801::parser() {
ws_unhide_walker(_G(my_walker));
adv_kill_digi_between_rooms(false);
digi_play_loop("801_s02", 3, 35, -1, -1);
- _G(game).new_room = 802;
+ _G(game).setRoom(802);
break;
default:
break;
@@ -974,7 +974,7 @@ void Room801::daemon() {
break;
case 83:
- _G(game).new_room = 852;
+ _G(game).setRoom(852);
break;
case 200:
diff --git a/engines/m4/riddle/rooms/section8/room802.cpp b/engines/m4/riddle/rooms/section8/room802.cpp
index a8f69fa4dab..f7a94ed8541 100644
--- a/engines/m4/riddle/rooms/section8/room802.cpp
+++ b/engines/m4/riddle/rooms/section8/room802.cpp
@@ -214,7 +214,7 @@ void Room802::parser() {
_G(flags)[V260] = 1;
adv_kill_digi_between_rooms(false);
digi_play_loop("801_s02", 3, 100, -1, -1);
- _G(game).new_room = 801;
+ _G(game).setRoom(801);
break;
case 10:
sendWSMessage_10000(1, _ripActionMach, _lookWithMatch, 13, 18, 1, _lookWithMatch, 19, 22, 1);
@@ -440,7 +440,7 @@ void Room802::parser() {
break;
case 2:
terminateMachine(_ripActionMach);
- _G(game).new_room = 801;
+ _G(game).setRoom(801);
break;
default:
break;
diff --git a/engines/m4/riddle/rooms/section8/room803.cpp b/engines/m4/riddle/rooms/section8/room803.cpp
index 0966640e7ab..7316573eb58 100644
--- a/engines/m4/riddle/rooms/section8/room803.cpp
+++ b/engines/m4/riddle/rooms/section8/room803.cpp
@@ -266,7 +266,7 @@ void Room803::parser() {
case 1:
adv_kill_digi_between_rooms(false);
digi_play_loop("950_s29", 2, 180, -1, 950);
- _G(game).new_room = 844;
+ _G(game).setRoom(844);
break;
default:
@@ -284,7 +284,7 @@ void Room803::parser() {
case 1:
adv_kill_digi_between_rooms(false);
digi_play_loop("950_s29", 3, 180, -1, 950);
- _G(game).new_room = 834;
+ _G(game).setRoom(834);
break;
default:
@@ -302,7 +302,7 @@ void Room803::parser() {
case 1:
adv_kill_digi_between_rooms(false);
digi_play_loop("950_s29", 3, 180, -1, 950);
- _G(game).new_room = 814;
+ _G(game).setRoom(814);
break;
default:
@@ -320,7 +320,7 @@ void Room803::parser() {
case 1:
adv_kill_digi_between_rooms(false);
digi_play_loop("950_s29", 3, 180, -1, 950);
- _G(game).new_room = 824;
+ _G(game).setRoom(824);
break;
default:
@@ -342,7 +342,7 @@ void Room803::parser() {
case 2:
adv_kill_digi_between_rooms(false);
digi_play_loop("950_s29", 3, 180, -1, 950);
- _G(game).new_room = 804;
+ _G(game).setRoom(804);
break;
default:
diff --git a/engines/m4/riddle/rooms/section8/room805.cpp b/engines/m4/riddle/rooms/section8/room805.cpp
index d48b72f29fd..040cceafa69 100644
--- a/engines/m4/riddle/rooms/section8/room805.cpp
+++ b/engines/m4/riddle/rooms/section8/room805.cpp
@@ -853,7 +853,7 @@ void Room805::parser() {
digi_play_loop("950_s33", 2, 255, -1, -1);
_G(flags)[V270] = 806;
_G(flags)[V262] = 0;
- _G(game).new_room = 806;
+ _G(game).setRoom(806);
break;
@@ -986,7 +986,7 @@ void Room805::parser() {
case 10:
adv_kill_digi_between_rooms(false);
digi_play_loop("950_s29", 3, 180, -1, 950);
- _G(game).new_room = 844;
+ _G(game).setRoom(844);
break;
@@ -1006,7 +1006,7 @@ void Room805::parser() {
case 10:
adv_kill_digi_between_rooms(false);
digi_play_loop("950_s29", 3, 180, -1, 950);
- _G(game).new_room = 834;
+ _G(game).setRoom(834);
break;
@@ -1026,7 +1026,7 @@ void Room805::parser() {
case 10:
adv_kill_digi_between_rooms(false);
digi_play_loop("950_s29", 3, 180, -1, 950);
- _G(game).new_room = 814;
+ _G(game).setRoom(814);
break;
@@ -1046,7 +1046,7 @@ void Room805::parser() {
case 10:
adv_kill_digi_between_rooms(false);
digi_play_loop("950_s29", 3, 180, -1, 950);
- _G(game).new_room = 824;
+ _G(game).setRoom(824);
break;
@@ -1065,7 +1065,7 @@ void Room805::parser() {
case 2:
adv_kill_digi_between_rooms(false);
digi_play_loop("950_s29", 3, 180, -1, 950);
- _G(game).new_room = 804;
+ _G(game).setRoom(804);
break;
@@ -1094,7 +1094,7 @@ void Room805::parser() {
case 3:
adv_kill_digi_between_rooms(false);
digi_play_loop("950_s29", 3, 180, -1, 950);
- _G(game).new_room = 806;
+ _G(game).setRoom(806);
break;
diff --git a/engines/m4/riddle/rooms/section8/room806.cpp b/engines/m4/riddle/rooms/section8/room806.cpp
index 9983aee2151..55208c4f8e9 100644
--- a/engines/m4/riddle/rooms/section8/room806.cpp
+++ b/engines/m4/riddle/rooms/section8/room806.cpp
@@ -925,7 +925,7 @@ void Room806::parser() {
adv_kill_digi_between_rooms(false);
digi_play_loop("950_s33", 1, 255, -1, -1);
digi_play_loop("950_s29", 3, 93, -1, -1);
- _G(game).new_room = 807;
+ _G(game).setRoom(807);
break;
@@ -1094,7 +1094,7 @@ void Room806::parser() {
} else if (_G(kernel).trigger == 1) {
adv_kill_digi_between_rooms(false);
digi_play_loop("950_s29", 3, 93, -1, -1);
- _G(game).new_room = 805;
+ _G(game).setRoom(805);
}
} // if (player_said("west") && (_G(kernel).trigger == -1 || _G(kernel).trigger == 1))
@@ -1106,7 +1106,7 @@ void Room806::parser() {
} else if (_G(kernel).trigger == 1) {
adv_kill_digi_between_rooms(false);
digi_play_loop("950_s29", 3, 93, -1, -1);
- _G(game).new_room = 807;
+ _G(game).setRoom(807);
}
}
diff --git a/engines/m4/riddle/rooms/section8/room807.cpp b/engines/m4/riddle/rooms/section8/room807.cpp
index 88154fe5767..251052b0f2b 100644
--- a/engines/m4/riddle/rooms/section8/room807.cpp
+++ b/engines/m4/riddle/rooms/section8/room807.cpp
@@ -628,7 +628,7 @@ void Room807::parser() {
break;
case 20:
- _G(game).new_room = 808;
+ _G(game).setRoom(808);
adv_kill_digi_between_rooms(false);
digi_preload("950_s29", -1);
digi_play_loop("950_s29", 3, 255, -1, -1);
@@ -688,7 +688,7 @@ void Room807::parser() {
break;
case 40:
- _G(game).new_room = 806;
+ _G(game).setRoom(806);
adv_kill_digi_between_rooms(false);
digi_preload("950_s29", -1);
digi_play_loop("950_s29", 2, 255, -1, -1);
diff --git a/engines/m4/riddle/rooms/section8/room808.cpp b/engines/m4/riddle/rooms/section8/room808.cpp
index 97094a8a701..5d7c0b77e91 100644
--- a/engines/m4/riddle/rooms/section8/room808.cpp
+++ b/engines/m4/riddle/rooms/section8/room808.cpp
@@ -1036,7 +1036,7 @@ void Room808::parser() {
break;
case 30:
- _G(game).new_room = 807;
+ _G(game).setRoom(807);
adv_kill_digi_between_rooms(false);
digi_play_loop("950_s29", 3, 255, -1, -1);
@@ -1063,7 +1063,7 @@ void Room808::parser() {
break;
case 20:
- _G(game).new_room = 809;
+ _G(game).setRoom(809);
break;
default:
diff --git a/engines/m4/riddle/rooms/section8/room809.cpp b/engines/m4/riddle/rooms/section8/room809.cpp
index 5231830a9ad..80ae6431a82 100644
--- a/engines/m4/riddle/rooms/section8/room809.cpp
+++ b/engines/m4/riddle/rooms/section8/room809.cpp
@@ -567,7 +567,7 @@ void Room809::parser() {
break;
case 58:
- _G(game).new_room = 810;
+ _G(game).setRoom(810);
break;
case 59:
@@ -613,7 +613,7 @@ void Room809::parser() {
break;
case 67:
- _G(game).new_room = 808;
+ _G(game).setRoom(808);
break;
default:
diff --git a/engines/m4/riddle/rooms/section8/room810.cpp b/engines/m4/riddle/rooms/section8/room810.cpp
index dd65bf88a43..5f0dc7cb80c 100644
--- a/engines/m4/riddle/rooms/section8/room810.cpp
+++ b/engines/m4/riddle/rooms/section8/room810.cpp
@@ -251,7 +251,7 @@ void Room810::parser() {
case 150:
adv_kill_digi_between_rooms(false);
digi_unload("950_s29");
- _G(game).new_room = 860;
+ _G(game).setRoom(860);
break;
diff --git a/engines/m4/riddle/rooms/section8/room811.cpp b/engines/m4/riddle/rooms/section8/room811.cpp
index 3ab79c083d4..337b108987a 100644
--- a/engines/m4/riddle/rooms/section8/room811.cpp
+++ b/engines/m4/riddle/rooms/section8/room811.cpp
@@ -372,7 +372,7 @@ void Room811::daemon() {
case 92:
digi_play_loop("950_s45", 3, 128, -1, 950);
- _G(game).new_room = 861;
+ _G(game).setRoom(861);
break;
case 1050:
diff --git a/engines/m4/riddle/rooms/section8/room818.cpp b/engines/m4/riddle/rooms/section8/room818.cpp
index ceee9b17d73..f6fc9f39f5c 100644
--- a/engines/m4/riddle/rooms/section8/room818.cpp
+++ b/engines/m4/riddle/rooms/section8/room818.cpp
@@ -132,8 +132,7 @@ void Room818::daemon() {
break;
case 30:
- _G(game).new_section = 9;
- _G(game).new_room = 917;
+ _G(game).setRoom(917);
break;
diff --git a/engines/m4/riddle/rooms/section8/room860.cpp b/engines/m4/riddle/rooms/section8/room860.cpp
index 260d5558655..74d0ac69a70 100644
--- a/engines/m4/riddle/rooms/section8/room860.cpp
+++ b/engines/m4/riddle/rooms/section8/room860.cpp
@@ -145,7 +145,7 @@ void Room860::daemon() {
digi_play_loop("950_s45", 3, 80, -1, 950);
- _G(game).new_room = 811;
+ _G(game).setRoom(811);
break;
case 1000:
diff --git a/engines/m4/riddle/rooms/section8/section8_room.cpp b/engines/m4/riddle/rooms/section8/section8_room.cpp
index 171f1579f62..237147ae917 100644
--- a/engines/m4/riddle/rooms/section8/section8_room.cpp
+++ b/engines/m4/riddle/rooms/section8/section8_room.cpp
@@ -292,7 +292,7 @@ void Section8Room::parser() {
case 70:
_G(flags)[V270] = 805;
- _G(game).new_room = 805;
+ _G(game).setRoom(805);
adv_kill_digi_between_rooms(false);
digi_preload("950_s29", -1);
digi_play_loop("950_s29", 3, 96, -1, -1);
@@ -639,7 +639,7 @@ void Section8Room::parser() {
break;
case 20:
- _G(game).new_room = _savedNextRoom;
+ _G(game).setRoom(_savedNextRoom);
adv_kill_digi_between_rooms(false);
digi_preload("950_s29", -1);
digi_play_loop("950_s29", 3, 255, -1, -1);
diff --git a/engines/m4/riddle/rooms/section9/room903.cpp b/engines/m4/riddle/rooms/section9/room903.cpp
index 4ee286af543..d3cf65e7469 100644
--- a/engines/m4/riddle/rooms/section9/room903.cpp
+++ b/engines/m4/riddle/rooms/section9/room903.cpp
@@ -66,17 +66,15 @@ void Room903::daemon() {
case 30:
digi_stop(3);
adv_kill_digi_between_rooms(false);
- _G(game).new_room = 905;
+ _G(game).setRoom(905);
break;
case 55:
- _G(game).new_room = 304;
- _G(game).new_section = 3;
+ _G(game).setRoom(304);
break;
case 56:
- _G(game).new_room = 494;
- _G(game).new_section = 4;
+ _G(game).setRoom(494);
break;
case 100:
diff --git a/engines/m4/riddle/rooms/section9/room905.cpp b/engines/m4/riddle/rooms/section9/room905.cpp
index 1b6fc0cb0ab..f0b285030c9 100644
--- a/engines/m4/riddle/rooms/section9/room905.cpp
+++ b/engines/m4/riddle/rooms/section9/room905.cpp
@@ -78,7 +78,7 @@ void Room905::daemon() {
_roomStates_field4 -= 3;
if (_roomStates_field4 <= 40) {
adv_kill_digi_between_rooms(false);
- _G(game).new_room = 906;
+ _G(game).setRoom(906);
} else {
digi_change_panning(1, _roomStates_field4);
kernel_timing_trigger(2, 30, nullptr);
@@ -86,13 +86,11 @@ void Room905::daemon() {
break;
case 55:
- _G(game).new_room = 304;
- _G(game).new_section = 3;
+ _G(game).setRoom(304);
break;
case 56:
- _G(game).new_room = 494;
- _G(game).new_section = 4;
+ _G(game).setRoom(494);
break;
case 666:
diff --git a/engines/m4/riddle/rooms/section9/room906.cpp b/engines/m4/riddle/rooms/section9/room906.cpp
index bcea7dcf903..801e39a6fb4 100644
--- a/engines/m4/riddle/rooms/section9/room906.cpp
+++ b/engines/m4/riddle/rooms/section9/room906.cpp
@@ -61,7 +61,7 @@ void Room906::daemon() {
_roomStates_pu -= 3;
if (_roomStates_pu <= 0) {
adv_kill_digi_between_rooms(false);
- _G(game).new_room = 907;
+ _G(game).setRoom(907);
} else {
digi_change_panning(1, _roomStates_pu);
kernel_timing_trigger(2, 30, nullptr);
@@ -70,13 +70,11 @@ void Room906::daemon() {
break;
case 55:
- _G(game).new_room = 304;
- _G(game).new_section = 3;
+ _G(game).setRoom(304);
break;
case 56:
- _G(game).new_room = 494;
- _G(game).new_section = 4;
+ _G(game).setRoom(494);
break;
case 200:
diff --git a/engines/m4/riddle/rooms/section9/room907.cpp b/engines/m4/riddle/rooms/section9/room907.cpp
index 6aff4a0f24a..b04ce32df45 100644
--- a/engines/m4/riddle/rooms/section9/room907.cpp
+++ b/engines/m4/riddle/rooms/section9/room907.cpp
@@ -81,17 +81,15 @@ void Room907::daemon() {
case 40:
adv_kill_digi_between_rooms(false);
- _G(game).new_room = 908;
+ _G(game).setRoom(908);
break;
case 55:
- _G(game).new_room = 304;
- _G(game).new_section = 3;
+ _G(game).setRoom(304);
break;
case 56:
- _G(game).new_room = 494;
- _G(game).new_section = 4;
+ _G(game).setRoom(494);
break;
default:
diff --git a/engines/m4/riddle/rooms/section9/room917.cpp b/engines/m4/riddle/rooms/section9/room917.cpp
index 5e61f600978..dd177238309 100644
--- a/engines/m4/riddle/rooms/section9/room917.cpp
+++ b/engines/m4/riddle/rooms/section9/room917.cpp
@@ -78,7 +78,7 @@ void Room917::daemon() {
digi_stop(1);
digi_stop(2);
digi_unload("907R02");
- _G(game).new_room = 918;
+ _G(game).setRoom(918);
break;
case 11:
@@ -152,8 +152,7 @@ void Room917::daemon() {
digi_unload("950_S48b");
digi_unload("950_S48c");
digi_unload("950_S50");
- _G(game).new_room = 493;
- _G(game).new_section = 4;
+ _G(game).setRoom(493);
break;
default:
diff --git a/engines/m4/riddle/rooms/section9/room918.cpp b/engines/m4/riddle/rooms/section9/room918.cpp
index fb8ab79e52e..6ab5b50380d 100644
--- a/engines/m4/riddle/rooms/section9/room918.cpp
+++ b/engines/m4/riddle/rooms/section9/room918.cpp
@@ -235,7 +235,7 @@ void Room918::daemon() {
digi_unload("950_s48f");
digi_unload("950_s48a");
digi_unload("950_s47");
- _G(game).new_room = 917;
+ _G(game).setRoom(917);
break;
default:
break;
Commit: 470de4d743690c7fcd6a5673cb1beacbed9fa7b5
https://github.com/scummvm/scummvm/commit/470de4d743690c7fcd6a5673cb1beacbed9fa7b5
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2026-01-28T20:21:07+01:00
Commit Message:
M4: Add a last call to setRoom in core/param
Changed paths:
engines/m4/core/param.cpp
diff --git a/engines/m4/core/param.cpp b/engines/m4/core/param.cpp
index c497ecec92f..80a79680510 100644
--- a/engines/m4/core/param.cpp
+++ b/engines/m4/core/param.cpp
@@ -71,8 +71,7 @@ void parse_all_flags() {
if (room) {
_G(kernel).teleported_in = true;
- _G(game).new_room = room;
- _G(game).new_section = (room / 100);
+ _G(game).setRoom(room);
}
}
}
More information about the Scummvm-git-logs
mailing list