[Scummvm-git-logs] scummvm master -> 9746baae134b8e6ac455102510593535d5306b35

dreammaster noreply at scummvm.org
Wed Jan 25 06:51:13 UTC 2023


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

Summary:
d224c19bdd MM: MM1: Remove redundant semicolons
9746baae13 MM: MM1: Hopefully fix compilation for RiscOS


Commit: d224c19bdd143e1d7330318aa9deaad1c6fddcc5
    https://github.com/scummvm/scummvm/commit/d224c19bdd143e1d7330318aa9deaad1c6fddcc5
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2023-01-24T22:40:35-08:00

Commit Message:
MM: MM1: Remove redundant semicolons

Changed paths:
    engines/mm/mm1/data/items.h


diff --git a/engines/mm/mm1/data/items.h b/engines/mm/mm1/data/items.h
index 6e15ef0b622..351333891b5 100644
--- a/engines/mm/mm1/data/items.h
+++ b/engines/mm/mm1/data/items.h
@@ -119,19 +119,19 @@ struct ItemsArray : public Common::Array<Item>, public TextParser {
 
 inline bool isWeapon(byte id) {
 	return id >= 1 && id <= 60;
-};
+}
 inline bool isMissile(byte id) {
 	return id >= 61 && id <= 85;
-};
+}
 inline bool isTwoHanded(byte id) {
 	return id >= 86 && id <= 120;
-};
+}
 inline bool isArmor(byte id) {
 	return id >= 121 && id <= 155;
-};
+}
 inline bool isShield(byte id) {
 	return id >= 156 && id <= 170;
-};
+}
 
 extern ItemCategory getItemCategory(byte itemId);
 


Commit: 9746baae134b8e6ac455102510593535d5306b35
    https://github.com/scummvm/scummvm/commit/9746baae134b8e6ac455102510593535d5306b35
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2023-01-24T22:50:02-08:00

Commit Message:
MM: MM1: Hopefully fix compilation for RiscOS

RiscOS was erroring out because the lambda functions in
the map logic were referring to methods of the map class
that contains them, even though the methods were all static

Changed paths:
    engines/mm/mm1/maps/map01.cpp
    engines/mm/mm1/maps/map05.cpp
    engines/mm/mm1/maps/map07.cpp
    engines/mm/mm1/maps/map09.cpp
    engines/mm/mm1/maps/map10.cpp


diff --git a/engines/mm/mm1/maps/map01.cpp b/engines/mm/mm1/maps/map01.cpp
index ed35bc803dc..1ca9aaf0e1a 100644
--- a/engines/mm/mm1/maps/map01.cpp
+++ b/engines/mm/mm1/maps/map01.cpp
@@ -125,7 +125,7 @@ void Map01::special08() {
 			Game::Encounter &enc = g_globals->_encounters;
 			enc.clearMonsters();
 
-			uint count = getRandomNumber(4) + 4;
+			uint count = g_events->getRandomNumber(4) + 4;
 			enc.addMonster(6, 12);
 			for (uint i = 0; i < count; ++i)
 				enc.addMonster(4, 9);
diff --git a/engines/mm/mm1/maps/map05.cpp b/engines/mm/mm1/maps/map05.cpp
index 6eaa043aacc..ef16142dfbf 100644
--- a/engines/mm/mm1/maps/map05.cpp
+++ b/engines/mm/mm1/maps/map05.cpp
@@ -97,8 +97,9 @@ void Map05::special06() {
 		send(SoundMessage(
 			0, 1, STRING[!hasFlag() ? "maps.map05.man1" : "maps.map05.man2"],
 			[]() {
-				if (addScroll()) {
-					addFlag();
+				Map05 &map = *static_cast<Map05 *>(g_maps->_currentMap);
+				if (map.addScroll()) {
+					map.addFlag();
 					g_events->send(InfoMessage(0, 1, STRING["maps.map05.man3"]));
 				}
 			}
diff --git a/engines/mm/mm1/maps/map07.cpp b/engines/mm/mm1/maps/map07.cpp
index 1dbff601767..55b4b33f4ef 100644
--- a/engines/mm/mm1/maps/map07.cpp
+++ b/engines/mm/mm1/maps/map07.cpp
@@ -192,7 +192,7 @@ void Map07::special16() {
 
 void Map07::special17() {
 	poolYN([]() {
-		g_globals->_treasure._items[2] = getRandomNumber(12) + 24;
+		g_globals->_treasure._items[2] = g_events->getRandomNumber(12) + 24;
 		g_globals->_treasure.setGems(20);
 		g_events->addAction(KEYBIND_SEARCH);
 	});
diff --git a/engines/mm/mm1/maps/map09.cpp b/engines/mm/mm1/maps/map09.cpp
index 8ef4ff300c7..4a8fd468239 100644
--- a/engines/mm/mm1/maps/map09.cpp
+++ b/engines/mm/mm1/maps/map09.cpp
@@ -129,7 +129,7 @@ void Map09::special08() {
 				SoundMessage msg(
 					STRING["maps.map09.shrine2"],
 					[]() {
-						g_globals->_treasure._items[2] = getRandomNumber(26) + 120;
+						g_globals->_treasure._items[2] = g_events->getRandomNumber(26) + 120;
 						g_globals->_treasure.setGold(120);
 						g_events->addAction(KEYBIND_SEARCH);
 					}
diff --git a/engines/mm/mm1/maps/map10.cpp b/engines/mm/mm1/maps/map10.cpp
index 8a8add50df8..8fc77ca81d1 100644
--- a/engines/mm/mm1/maps/map10.cpp
+++ b/engines/mm/mm1/maps/map10.cpp
@@ -90,7 +90,7 @@ void Map10::special01() {
 			} else if (ks.keycode == Common::KEYCODE_n) {
 				g_events->send(SoundMessage(STRING["maps.map10.ranalou3"]));
 				g_maps->_mapPos = Common::Point(15, 0);
-				updateGame();
+				g_maps->_currentMap->updateGame();
 			}
 		}
 	));




More information about the Scummvm-git-logs mailing list