aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWalter van Niftrik2016-03-15 22:34:00 +0100
committerWalter van Niftrik2016-06-06 20:35:49 +0200
commit1e5fff86c875958408f3a5532451139626a4dc56 (patch)
tree6f118fb95ab50f06e3b5d996f8c5d3b4664449b5
parent7cef93739c24bb017e31bb2d5c359a93582426cd (diff)
downloadscummvm-rg350-1e5fff86c875958408f3a5532451139626a4dc56.tar.gz
scummvm-rg350-1e5fff86c875958408f3a5532451139626a4dc56.tar.bz2
scummvm-rg350-1e5fff86c875958408f3a5532451139626a4dc56.zip
ADL: Fix hires2 message printing
-rw-r--r--engines/adl/adl.cpp2
-rw-r--r--engines/adl/adl.h2
-rw-r--r--engines/adl/hires1.cpp2
-rw-r--r--engines/adl/hires1.h2
-rw-r--r--engines/adl/hires2.cpp6
-rw-r--r--engines/adl/hires2.h1
6 files changed, 10 insertions, 5 deletions
diff --git a/engines/adl/adl.cpp b/engines/adl/adl.cpp
index 74fc93c12e..81c9054bb2 100644
--- a/engines/adl/adl.cpp
+++ b/engines/adl/adl.cpp
@@ -110,7 +110,7 @@ void AdlEngine::openFile(Common::File &file, const Common::String &name) const {
error("Error opening '%s'", name.c_str());
}
-void AdlEngine::printMessage(uint idx, bool wait) const {
+void AdlEngine::printMessage(uint idx, bool wait) {
Common::String msg = _messages[idx - 1];
wordWrap(msg);
_display->printString(msg);
diff --git a/engines/adl/adl.h b/engines/adl/adl.h
index 9ccd02ba6a..20e8fbc30c 100644
--- a/engines/adl/adl.h
+++ b/engines/adl/adl.h
@@ -155,7 +155,7 @@ protected:
Common::String readStringAt(Common::SeekableReadStream &stream, uint offset, byte until = 0) const;
void openFile(Common::File &file, const Common::String &name) const;
- virtual void printMessage(uint idx, bool wait = true) const;
+ virtual void printMessage(uint idx, bool wait = true);
void delay(uint32 ms) const;
Common::String inputString(byte prompt = 0) const;
diff --git a/engines/adl/hires1.cpp b/engines/adl/hires1.cpp
index 438d9c2dcf..368b08cbb3 100644
--- a/engines/adl/hires1.cpp
+++ b/engines/adl/hires1.cpp
@@ -274,7 +274,7 @@ void HiRes1Engine::drawPic(byte pic, Common::Point pos) const {
_graphics->drawPic(f, pos, 0x7f);
}
-void HiRes1Engine::printMessage(uint idx, bool wait) const {
+void HiRes1Engine::printMessage(uint idx, bool wait) {
// Messages with hardcoded overrides don't delay after printing.
// It's unclear if this is a bug or not. In some cases the result
// is that these strings will scroll past the four-line text window
diff --git a/engines/adl/hires1.h b/engines/adl/hires1.h
index 028148b4ea..9c31a39b39 100644
--- a/engines/adl/hires1.h
+++ b/engines/adl/hires1.h
@@ -99,7 +99,7 @@ private:
void initState();
void restartGame();
void drawPic(byte pic, Common::Point pos = Common::Point()) const;
- void printMessage(uint idx, bool wait = true) const;
+ void printMessage(uint idx, bool wait = true);
void drawItem(const Item &item, const Common::Point &pos) const;
void showRoom();
diff --git a/engines/adl/hires2.cpp b/engines/adl/hires2.cpp
index 19acf19476..f44dfc4a2b 100644
--- a/engines/adl/hires2.cpp
+++ b/engines/adl/hires2.cpp
@@ -59,7 +59,7 @@ void HiRes2Engine::init() {
byte track = f.readByte();
byte sector = f.readByte();
byte offset = f.readByte();
- // One more byte follows, disk?
+ // One more byte follows, disk? or size maybe?
uint diskOffset = TSO(track, sector, offset);
@@ -144,6 +144,10 @@ void HiRes2Engine::showRoom() {
printString(_roomData.description);
}
+void HiRes2Engine::printMessage(uint idx, bool wait) {
+ printString(_messages[idx - 1]);
+}
+
void HiRes2Engine::checkTextOverflow(char c) {
if (c != APPLECHAR('\r'))
return;
diff --git a/engines/adl/hires2.h b/engines/adl/hires2.h
index 91bbf0a4f7..d88e43a5a6 100644
--- a/engines/adl/hires2.h
+++ b/engines/adl/hires2.h
@@ -87,6 +87,7 @@ private:
void drawPic(byte pic, Common::Point pos) const;
void drawItem(const Item &item, const Common::Point &pos) const { }
void showRoom();
+ void printMessage(uint idx, bool wait);
void loadRoom(uint i);
void checkTextOverflow(char c);