[Scummvm-git-logs] scummvm master -> f11ea2457f713d7a3f016cc8d78cf8223caeb989
dreammaster
noreply at scummvm.org
Wed Nov 13 03:25:34 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:
f11ea2457f M4: RIDDLE: Standardize CreateCustomPath terminator as -1
Commit: f11ea2457f713d7a3f016cc8d78cf8223caeb989
https://github.com/scummvm/scummvm/commit/f11ea2457f713d7a3f016cc8d78cf8223caeb989
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2024-11-12T19:25:13-08:00
Commit Message:
M4: RIDDLE: Standardize CreateCustomPath terminator as -1
Changed paths:
engines/m4/adv_r/adv_rails.cpp
engines/m4/adv_r/adv_rails.h
engines/m4/riddle/rooms/section2/room203.cpp
engines/m4/riddle/rooms/section8/room804.cpp
engines/m4/riddle/rooms/section8/room814.cpp
engines/m4/riddle/rooms/section8/room824.cpp
engines/m4/riddle/rooms/section8/room834.cpp
engines/m4/riddle/rooms/section8/room844.cpp
diff --git a/engines/m4/adv_r/adv_rails.cpp b/engines/m4/adv_r/adv_rails.cpp
index a6d86ed5b4d..ef3e70aa008 100644
--- a/engines/m4/adv_r/adv_rails.cpp
+++ b/engines/m4/adv_r/adv_rails.cpp
@@ -761,7 +761,7 @@ static railNode *DuplicatePath(railNode *pathStart) {
}
-railNode *CreateCustomPath(int32 coord, ...) {
+railNode *CreateCustomPath(int coord, ...) {
va_list argPtr;
railNode *firstNode, *prevNode = nullptr, *newNode;
int32 x, y;
@@ -772,13 +772,13 @@ railNode *CreateCustomPath(int32 coord, ...) {
// Set argPtr to point to the beginning of the variable arg list
va_start(argPtr, coord);
- // Loop until coord == 0xffff
- while (coord != 0xffff) {
+ // Loop until coord == -1
+ while (coord != -1) {
// Set x
x = coord;
// Read the next arg off the arg list, and set y
- coord = va_arg(argPtr, int32);
+ coord = va_arg(argPtr, int);
y = coord;
@@ -803,8 +803,8 @@ railNode *CreateCustomPath(int32 coord, ...) {
prevNode = newNode;
// Read another arg, should be the next "x" for the next pair of args
- if (coord != 65535) {
- coord = va_arg(argPtr, int32);
+ if (coord != -1) {
+ coord = va_arg(argPtr, int);
}
}
diff --git a/engines/m4/adv_r/adv_rails.h b/engines/m4/adv_r/adv_rails.h
index c252e716e2b..13b976371c4 100644
--- a/engines/m4/adv_r/adv_rails.h
+++ b/engines/m4/adv_r/adv_rails.h
@@ -57,7 +57,7 @@ bool RemoveRailNode(int32 nodeID, Buffer *walkCodes, bool restoreEdges);
bool RailNodeExists(int32 nodeID, int32 *nodeX, int32 *nodeY);
int16 GetEdgeLength(int32 node1, int32 node2);
bool GetShortestPath(int32 origID, int32 destID, railNode **shortPath);
-railNode *CreateCustomPath(int32 coord, ...);
+railNode *CreateCustomPath(int coord, ...);
void DisposePath(railNode *pathStart);
bool intr_LineCrossesRect(int32 line_x1, int32 line_y1, int32 line_x2, int32 line_y2,
int32 rect_x1, int32 rect_y1, int32 rect_x2, int32 rect_y2);
diff --git a/engines/m4/riddle/rooms/section2/room203.cpp b/engines/m4/riddle/rooms/section2/room203.cpp
index f40b1e3812f..bce79686f72 100644
--- a/engines/m4/riddle/rooms/section2/room203.cpp
+++ b/engines/m4/riddle/rooms/section2/room203.cpp
@@ -324,9 +324,6 @@ void Room203::init() {
void Room203::daemon() {
int frame;
- if (_G(kernel).trigger < 9999)
- warning("%d", _G(kernel).trigger);
-
if (keyCheck() && _gkShould == 0 && _G(game_buff_ptr)->x1 >= 380) {
_gkShould = 1;
_G(kernel).call_daemon_every_loop = false;
diff --git a/engines/m4/riddle/rooms/section8/room804.cpp b/engines/m4/riddle/rooms/section8/room804.cpp
index c42a2f9a071..8668a1098ab 100644
--- a/engines/m4/riddle/rooms/section8/room804.cpp
+++ b/engines/m4/riddle/rooms/section8/room804.cpp
@@ -97,7 +97,7 @@ void Room804::init() {
_guessIndex = 11;
ws_walk(_G(my_walker), 1765, 345, nullptr, 0, 9, true);
DisposePath(_mcTrekMach->walkPath);
- _mcTrekMach->walkPath = CreateCustomPath(1835, 325, 1815, 400, 0xffff);
+ _mcTrekMach->walkPath = CreateCustomPath(1835, 325, 1815, 400, -1);
ws_custom_walk(_mcTrekMach, 11, 1, true);
} else {
ws_walk(_G(my_walker), 1765, 345, nullptr, 1, 9, true);
diff --git a/engines/m4/riddle/rooms/section8/room814.cpp b/engines/m4/riddle/rooms/section8/room814.cpp
index 58c02ccdb0c..7323d299d33 100644
--- a/engines/m4/riddle/rooms/section8/room814.cpp
+++ b/engines/m4/riddle/rooms/section8/room814.cpp
@@ -93,7 +93,7 @@ void Room814::init() {
_guessIndex = 11;
ws_walk(_G(my_walker), 1765, 348, nullptr, 0, 9, true);
DisposePath(_mcTrekMach->walkPath);
- _mcTrekMach->walkPath = CreateCustomPath(1832, 325, 1815, 400, 0xffff);
+ _mcTrekMach->walkPath = CreateCustomPath(1832, 325, 1815, 400, -1);
ws_custom_walk(_mcTrekMach, 11, 1, true);
} else {
ws_walk(_G(my_walker), 1765, 348, nullptr, 1, 9, true);
diff --git a/engines/m4/riddle/rooms/section8/room824.cpp b/engines/m4/riddle/rooms/section8/room824.cpp
index b84f1a96eb9..32972e40e5c 100644
--- a/engines/m4/riddle/rooms/section8/room824.cpp
+++ b/engines/m4/riddle/rooms/section8/room824.cpp
@@ -102,7 +102,7 @@ void Room824::init() {
_guessIndex = 11;
ws_walk(_G(my_walker), 1765, 348, nullptr, -1, 9, true);
DisposePath(_mcTrekMach->walkPath);
- _mcTrekMach->walkPath = CreateCustomPath(1832, 325, 1815, 400, 0xffff);
+ _mcTrekMach->walkPath = CreateCustomPath(1832, 325, 1815, 400, -1);
ws_custom_walk(_mcTrekMach, 11, 1, true);
} else {
ws_walk(_G(my_walker), 1765, 348, nullptr, 1, 9, true);
diff --git a/engines/m4/riddle/rooms/section8/room834.cpp b/engines/m4/riddle/rooms/section8/room834.cpp
index c49c6b2c07b..1925d50def5 100644
--- a/engines/m4/riddle/rooms/section8/room834.cpp
+++ b/engines/m4/riddle/rooms/section8/room834.cpp
@@ -96,7 +96,7 @@ void Room834::init() {
_guessIndex = 11;
ws_walk(_G(my_walker), 1765, 348, nullptr, -1, 9, true);
DisposePath(_mcTrekMach->walkPath);
- _mcTrekMach->walkPath = CreateCustomPath(1836, 329, 1815, 400, 0xffff);
+ _mcTrekMach->walkPath = CreateCustomPath(1836, 329, 1815, 400, -1);
ws_custom_walk(_mcTrekMach, 11, 1, true);
} else {
ws_walk(_G(my_walker), 1765, 348, nullptr, 1, 9, true);
diff --git a/engines/m4/riddle/rooms/section8/room844.cpp b/engines/m4/riddle/rooms/section8/room844.cpp
index f543e601df5..f0fec5b65d9 100644
--- a/engines/m4/riddle/rooms/section8/room844.cpp
+++ b/engines/m4/riddle/rooms/section8/room844.cpp
@@ -101,7 +101,7 @@ void Room844::init() {
_guessIndex = 11;
ws_walk(_G(my_walker), 1765, 348, nullptr, -1, 9, true);
DisposePath(_mcTrekMach->walkPath);
- _mcTrekMach->walkPath = CreateCustomPath(1832, 325, 1815, 400, 0xffff);
+ _mcTrekMach->walkPath = CreateCustomPath(1832, 325, 1815, 400, -1);
ws_custom_walk(_mcTrekMach, 11, 1, true);
} else {
ws_walk(_G(my_walker), 1765, 348, nullptr, 1, 9, true);
More information about the Scummvm-git-logs
mailing list