mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-14 13:50:13 +00:00
MM: MM1: Fixes for map 38 and 39
This commit is contained in:
parent
2e028b83eb
commit
071e118197
@ -1572,16 +1572,22 @@ maps:
|
||||
face1: "Inset in the wall, a stone face\nyells: \"My brain hurts!\""
|
||||
face2: "Inset in the wall, a stone face\nspeaks: \"I would pay highly for a green\nhandled, pearl encrusted abelnuski.\""
|
||||
face3: "Inset in the wall, a stone face\nspeaks: \"I see all, hear all,\nknow nothing...\""
|
||||
face4: "Inset in the wall, a stone face\nproclaims: \"Okrim is watching.\nhe studies your weaknesses!\""
|
||||
face4: "Inset in the wall, a stone face\nproclaims: \"Okrim is watching.\nHe studies your weaknesses!\""
|
||||
ringing: "A strange ringing sound startles\nthe party. You are teleported!"
|
||||
emap38:
|
||||
message4: "Etched in gold, message 4 reads:\n"Of-be-has-true-knowledge-plane-\na-level-to-reality-it\""
|
||||
|
||||
map39:
|
||||
message6: "Etched in gold, message 6 reads:\nbook-done.-a-self-that-from-key-you-\nbe-to-seems"
|
||||
ruby1: "In the center of the room, a huge ruby\nstands atop a pedestal. hexagonally\nshaped, it glows rhythmically!\nMesmerized by its light, you hear:\nGlass that glitters, rubies that glow\nWhen i twinkle, I cast a rainbow\nWhat am i? :> ..............."
|
||||
ruby2: "Wrong! a bright flash..."
|
||||
ruby2: "Wrong! A bright flash..."
|
||||
door_repels: "A silver door repels you!"
|
||||
door_glows: "A silver door, your silver key glows!"
|
||||
stairs_up: "Stairs to surface, take them (Y/N)?"
|
||||
emap39:
|
||||
message6: "Etched in gold, message 6 reads:\n\"Book-done.-A-self-that-from-\nkey-you-be-to-seems\""
|
||||
title: "Ruby"
|
||||
ruby1: "In the center of the room, a huge hexagonal ruby stands glowing atop a pedestal. You hear: Glass that glitters, rubies that glow when i twinkle, I cast a rainbow.\nWhat am i?"
|
||||
|
||||
map40:
|
||||
message2: "Etched in gold, message 2 reads:\nOne,-riddles-value-you-you-5-card-must-\nclaimed.-dreams,-..."
|
||||
|
@ -44,10 +44,9 @@ void Map38::special() {
|
||||
}
|
||||
}
|
||||
|
||||
send(SoundMessage(STRING["maps.map38.ringing"]));
|
||||
g_maps->_mapPos = Common::Point(getRandomNumber(16) - 1,
|
||||
getRandomNumber(16) - 1);
|
||||
updateGame();
|
||||
send(SoundMessage(STRING["maps.map38.ringing"]));
|
||||
}
|
||||
|
||||
void Map38::special00() {
|
||||
|
@ -29,6 +29,8 @@ namespace MM {
|
||||
namespace MM1 {
|
||||
namespace Maps {
|
||||
|
||||
#define ANSWER_OFFSET 477
|
||||
|
||||
void Map39::special() {
|
||||
// Scan for special actions on the map cell
|
||||
for (uint i = 0; i < 19; ++i) {
|
||||
@ -139,6 +141,32 @@ void Map39::special18() {
|
||||
send(SoundMessage(STRING["maps.wall_painted"]));
|
||||
}
|
||||
|
||||
void Map39::riddleAnswered(const Common::String &answer) {
|
||||
Common::String properAnswer;
|
||||
|
||||
for (int i = 0; i < 12 && _data[ANSWER_OFFSET + i]; ++i)
|
||||
properAnswer += _data[ANSWER_OFFSET + i] - 64;
|
||||
|
||||
if (answer.equalsIgnoreCase(properAnswer)) {
|
||||
g_maps->clearSpecial();
|
||||
Sound::sound(SOUND_3);
|
||||
redrawGame();
|
||||
|
||||
for (uint i = 0; i < g_globals->_party.size(); ++i) {
|
||||
g_globals->_party[i]._flags[5] |= CHARFLAG5_20;
|
||||
}
|
||||
|
||||
g_globals->_treasure._items[2] = CRYSTAL_KEY_ID;
|
||||
g_events->addAction(KEYBIND_SEARCH);
|
||||
|
||||
} else {
|
||||
g_maps->_mapPos.x = 9;
|
||||
updateGame();
|
||||
|
||||
send(InfoMessage(STRING["maps.map39.ruby2"]));
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace Maps
|
||||
} // namespace MM1
|
||||
} // namespace MM
|
||||
|
@ -76,6 +76,8 @@ public:
|
||||
* Handles all special stuff that happens on the map
|
||||
*/
|
||||
void special() override;
|
||||
|
||||
void riddleAnswered(const Common::String &answer);
|
||||
};
|
||||
|
||||
} // namespace Maps
|
||||
|
@ -29,8 +29,6 @@ namespace MM1 {
|
||||
namespace Views {
|
||||
namespace Maps {
|
||||
|
||||
#define ANSWER_OFFSET 477
|
||||
|
||||
Ruby::Ruby() : AnswerEntry("Ruby", Common::Point(14, 7), 12) {
|
||||
_bounds = getLineBounds(17, 24);
|
||||
}
|
||||
@ -42,31 +40,9 @@ void Ruby::draw() {
|
||||
}
|
||||
|
||||
void Ruby::answerEntered() {
|
||||
MM1::Maps::Map &map = *g_maps->_currentMap;
|
||||
Common::String properAnswer;
|
||||
MM1::Maps::Map39 &map = *static_cast<MM1::Maps::Map39 *>(g_maps->_currentMap);
|
||||
close();
|
||||
|
||||
for (int i = 0; i < 12 && map[ANSWER_OFFSET + i]; ++i)
|
||||
properAnswer += map[ANSWER_OFFSET + i] - 64;
|
||||
|
||||
if (_answer.equalsIgnoreCase(properAnswer)) {
|
||||
g_maps->clearSpecial();
|
||||
Sound::sound(SOUND_3);
|
||||
map.redrawGame();
|
||||
|
||||
for (uint i = 0; i < g_globals->_party.size(); ++i) {
|
||||
g_globals->_party[i]._flags[5] |= CHARFLAG5_20;
|
||||
}
|
||||
|
||||
g_globals->_treasure._items[2] = CRYSTAL_KEY_ID;
|
||||
g_events->addAction(KEYBIND_SEARCH);
|
||||
|
||||
} else {
|
||||
g_maps->_mapPos.x = 9;
|
||||
map.updateGame();
|
||||
|
||||
send(InfoMessage(STRING["maps.map39.ruby2"]));
|
||||
}
|
||||
map.riddleAnswered(_answer);
|
||||
}
|
||||
|
||||
} // namespace Maps
|
||||
|
@ -68,6 +68,7 @@
|
||||
#include "mm/mm1/views_enh/interactions/lion.h"
|
||||
#include "mm/mm1/views_enh/interactions/prisoners.h"
|
||||
#include "mm/mm1/views_enh/interactions/resistances.h"
|
||||
#include "mm/mm1/views_enh/interactions/ruby.h"
|
||||
#include "mm/mm1/views_enh/interactions/statue.h"
|
||||
#include "mm/mm1/views_enh/interactions/trivia.h"
|
||||
#include "mm/mm1/views_enh/interactions/volcano_god.h"
|
||||
@ -101,6 +102,7 @@ private:
|
||||
ViewsEnh::Interactions::Leprechaun _leprechaun;
|
||||
ViewsEnh::Interactions::Lion _lion;
|
||||
ViewsEnh::Interactions::Resistances _resistances;
|
||||
ViewsEnh::Interactions::Ruby _ruby;
|
||||
ViewsEnh::Interactions::Statue _statue;
|
||||
ViewsEnh::Interactions::Trivia _trivia;
|
||||
ViewsEnh::Interactions::VolcanoGod _volcanoGod;
|
||||
|
44
engines/mm/mm1/views_enh/interactions/ruby.cpp
Normal file
44
engines/mm/mm1/views_enh/interactions/ruby.cpp
Normal file
@ -0,0 +1,44 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "mm/mm1/views_enh/interactions/ruby.h"
|
||||
#include "mm/mm1/maps/map39.h"
|
||||
#include "mm/mm1/globals.h"
|
||||
|
||||
namespace MM {
|
||||
namespace MM1 {
|
||||
namespace ViewsEnh {
|
||||
namespace Interactions {
|
||||
|
||||
Ruby::Ruby() : InteractionQuery("Ruby", 12) {
|
||||
_title = STRING["maps.emap39.title"];
|
||||
addText(STRING["maps.emap39.ruby1"]);
|
||||
}
|
||||
|
||||
void Ruby::answerEntered() {
|
||||
MM1::Maps::Map39 &map = *static_cast<MM1::Maps::Map39 *>(g_maps->_currentMap);
|
||||
map.riddleAnswered(_answer);
|
||||
}
|
||||
|
||||
} // namespace Interactions
|
||||
} // namespace ViewsEnh
|
||||
} // namespace MM1
|
||||
} // namespace MM
|
50
engines/mm/mm1/views_enh/interactions/ruby.h
Normal file
50
engines/mm/mm1/views_enh/interactions/ruby.h
Normal file
@ -0,0 +1,50 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef MM1_VIEWS_ENH_INTERACTIONS_RUBY_H
|
||||
#define MM1_VIEWS_ENH_INTERACTIONS_RUBY_H
|
||||
|
||||
#include "mm/mm1/views_enh/interactions/interaction_query.h"
|
||||
#include "mm/mm1/data/character.h"
|
||||
|
||||
namespace MM {
|
||||
namespace MM1 {
|
||||
namespace ViewsEnh {
|
||||
namespace Interactions {
|
||||
|
||||
class Ruby : public InteractionQuery {
|
||||
protected:
|
||||
/**
|
||||
* Answer entered
|
||||
*/
|
||||
void answerEntered() override;
|
||||
|
||||
public:
|
||||
Ruby();
|
||||
virtual ~Ruby() {}
|
||||
};
|
||||
|
||||
} // namespace Interactions
|
||||
} // namespace ViewsEnh
|
||||
} // namespace MM1
|
||||
} // namespace MM
|
||||
|
||||
#endif
|
@ -197,6 +197,7 @@ MODULE_OBJS += \
|
||||
mm1/views_enh/interactions/lion.o \
|
||||
mm1/views_enh/interactions/prisoners.o \
|
||||
mm1/views_enh/interactions/resistances.o \
|
||||
mm1/views_enh/interactions/ruby.o \
|
||||
mm1/views_enh/interactions/statue.o \
|
||||
mm1/views_enh/interactions/trivia.o \
|
||||
mm1/views_enh/interactions/volcano_god.o \
|
||||
|
Loading…
Reference in New Issue
Block a user