MM: MM1: More RiscOS compilation fixes

This commit is contained in:
Paul Gilbert 2023-01-25 19:08:40 -08:00
parent 79a9b4bbe0
commit 3373c8084a
12 changed files with 19 additions and 19 deletions

View File

@ -195,7 +195,7 @@ void Map12::setPolyhedron(int polyIndex) {
msg,
[]() {
static_cast<Map12 *>(g_maps->_currentMap)->spinPolyhedron(0);
updateGame();
g_maps->_currentMap->updateGame();
}
));
@ -206,9 +206,9 @@ void Map12::setPolyhedron(int polyIndex) {
if (ks.keycode >= Common::KEYCODE_0 &&
ks.keycode <= Common::KEYCODE_9) {
g_events->close();
static_cast<Map12 *>(g_maps->_currentMap)->spinPolyhedron(
ks.ascii | 0x80);
none160();
Map12 &map = *static_cast<Map12 *>(g_maps->_currentMap);
map.spinPolyhedron(ks.ascii | 0x80);
map.none160();
}
}
));

View File

@ -148,7 +148,7 @@ void Map13::special10() {
0, 1, STRING["maps.map13.snake_pit"],
[]() {
static_cast<Map13 *>(g_maps->_currentMap)->encounter(
getRandomNumber(3) + 10, 14, 1);
g_events->getRandomNumber(3) + 10, 14, 1);
}
);
msg._delaySeconds = 2;

View File

@ -90,7 +90,7 @@ void Map14::special00() {
// Note: The original seems to be backwards
if (ks.keycode == Common::KEYCODE_n &&
getRandomNumber(3) == 3) {
g_events->getRandomNumber(3) == 3) {
g_maps->_mapPos = Common::Point(15, 10);
} else {
map[VAL1]++;

View File

@ -181,7 +181,7 @@ void Map15::special06() {
STRING["maps.map15.percella2"],
[]() {
g_maps->_mapPos = Common::Point(14, 2);
updateGame();
g_maps->_currentMap->updateGame();
}
);
msg._delaySeconds = 5;

View File

@ -142,7 +142,7 @@ void Map20::special03() {
[](const Common::KeyState &ks) {
if (ks.keycode == Common::KEYCODE_0) {
g_events->focusedView()->close();
none160();
g_maps->_currentMap->none160();
} else if (ks.keycode == Common::KEYCODE_2) {
g_events->focusedView()->close();
g_events->send(SoundMessage(

View File

@ -136,12 +136,12 @@ void Map21::special02() {
g_events->send(SoundMessage(STRING["maps.map21.not_enough_gold"]));
g_maps->_mapPos.y++;
updateGame();
g_maps->_currentMap->updateGame();
} else if (ks.keycode == Common::KEYCODE_n) {
g_events->close();
g_maps->_mapPos.y++;
updateGame();
g_maps->_currentMap->updateGame();
}
}
));

View File

@ -116,7 +116,7 @@ void Map23::special08() {
[]() {
g_maps->_mapPos = Common::Point(
getRandomNumber(15), getRandomNumber(15));
updateGame();
g_maps->_currentMap->updateGame();
}
));
}

View File

@ -61,7 +61,7 @@ void Map24::special01() {
Map24 &map = *static_cast<Map24 *>(g_maps->_currentMap);
if (!map.addItem(MAP_OF_DESERT_ID)) {
g_maps->clearSpecial();
none160();
map.none160();
}
}
);
@ -145,7 +145,7 @@ void Map24::special09() {
c._backpack[1]._id = PIRATES_MAP_B_ID;
g_maps->clearSpecial();
none160();
g_maps->_currentMap->none160();
}
));
}

View File

@ -120,7 +120,7 @@ void Map28::special() {
g_events->send(SoundMessage(STRING["maps.map28.poof"]));
g_maps->_mapPos = Common::Point(
getRandomNumber(15), getRandomNumber(15));
updateGame();
map.updateGame();
break;
default:

View File

@ -115,7 +115,7 @@ void Map29::special01() {
if (ks.keycode == Common::KEYCODE_y) {
g_events->close();
g_maps->_mapPos = Common::Point(12, 12);
updateGame();
g_maps->_currentMap->updateGame();
} else if (ks.keycode == Common::KEYCODE_n) {
Game::Encounter &enc = g_globals->_encounters;
Map29 &map = *static_cast<Map29 *>(g_maps->_currentMap);
@ -208,7 +208,7 @@ void Map29::begone() {
g_maps->_mapPos.y = 7;
SoundMessage msg(STRING["maps.map29.begone"],
[]() {
updateGame();
g_maps->_currentMap->updateGame();
}
);
msg._delaySeconds = 2;

View File

@ -110,7 +110,7 @@ void Map30::special03() {
MAX((int)c._age._base - 20, 18);
}
none160();
g_maps->_currentMap->none160();
}
));
}

View File

@ -96,11 +96,11 @@ void Map32::special02() {
if (ks.keycode == Common::KEYCODE_y) {
g_events->close();
map[VAL2] = 0xff;
updateGame();
map.updateGame();
} else if (ks.keycode == Common::KEYCODE_n) {
g_events->close();
map[VAL2]++;
updateGame();
map.updateGame();
}
}
));