aboutsummaryrefslogtreecommitdiff
path: root/engines/adl
diff options
context:
space:
mode:
Diffstat (limited to 'engines/adl')
-rw-r--r--engines/adl/adl.cpp14
-rw-r--r--engines/adl/adl.h1
-rw-r--r--engines/adl/display.cpp10
-rw-r--r--engines/adl/display.h1
-rw-r--r--engines/adl/hires1.cpp12
5 files changed, 19 insertions, 19 deletions
diff --git a/engines/adl/adl.cpp b/engines/adl/adl.cpp
index f466f80b24..5b43a6cd31 100644
--- a/engines/adl/adl.cpp
+++ b/engines/adl/adl.cpp
@@ -87,7 +87,7 @@ Common::Error AdlEngine::run() {
}
_display->setMode(DISPLAY_MODE_MIXED);
- printASCIIString("\r\r\r\r\r");
+ _display->printAsciiString("\r\r\r\r\r");
while (1) {
uint verb = 0, noun = 0;
@@ -119,7 +119,7 @@ Common::Error AdlEngine::run() {
// means that restoring a game will always run through
// the global commands and increase the move counter
// before the first user input.
- printASCIIString("\r");
+ _display->printAsciiString("\r");
_isRestoring = false;
verb = _restoreVerb;
noun = _restoreNoun;
@@ -889,16 +889,6 @@ void AdlEngine::getInput(uint &verb, uint &noun) {
}
}
-void AdlEngine::printASCIIString(const Common::String &str) const {
- Common::String aStr;
-
- Common::String::const_iterator it;
- for (it = str.begin(); it != str.end(); ++it)
- aStr += APPLECHAR(*it);
-
- _display->printString(aStr);
-}
-
Common::String AdlEngine::inputString(byte prompt) const {
Common::String s;
diff --git a/engines/adl/adl.h b/engines/adl/adl.h
index 303f1972c0..b1d5b7c0b3 100644
--- a/engines/adl/adl.h
+++ b/engines/adl/adl.h
@@ -146,7 +146,6 @@ protected:
Common::String readStringAt(Common::SeekableReadStream &stream, uint offset, byte until = 0) const;
virtual void printMessage(uint idx, bool wait = true) const;
- void printASCIIString(const Common::String &str) const;
void delay(uint32 ms) const;
Common::String inputString(byte prompt = 0) const;
diff --git a/engines/adl/display.cpp b/engines/adl/display.cpp
index 7af6f660fd..d48296e9ee 100644
--- a/engines/adl/display.cpp
+++ b/engines/adl/display.cpp
@@ -289,6 +289,16 @@ void Display::printString(const Common::String &str) {
updateTextScreen();
}
+void Display::printAsciiString(const Common::String &str) {
+ Common::String aStr;
+
+ Common::String::const_iterator it;
+ for (it = str.begin(); it != str.end(); ++it)
+ aStr += APPLECHAR(*it);
+
+ printString(aStr);
+}
+
void Display::setCharAtCursor(byte c) {
_textBuf[_cursorPos] = c;
}
diff --git a/engines/adl/display.h b/engines/adl/display.h
index ce8f86beba..e61477da84 100644
--- a/engines/adl/display.h
+++ b/engines/adl/display.h
@@ -70,6 +70,7 @@ public:
void moveCursorForward();
void moveCursorBackward();
void printString(const Common::String &str);
+ void printAsciiString(const Common::String &str);
void setCharAtCursor(byte c);
void showCursor(bool enable);
diff --git a/engines/adl/hires1.cpp b/engines/adl/hires1.cpp
index 80ea094fa8..95f02899a2 100644
--- a/engines/adl/hires1.cpp
+++ b/engines/adl/hires1.cpp
@@ -55,16 +55,16 @@ void HiRes1Engine::runIntro() const {
Common::String str;
str = readStringAt(basic, IDI_HR1_OFS_PD_TEXT_0, '"');
- printASCIIString(str + '\r');
+ _display->printAsciiString(str + '\r');
str = readStringAt(basic, IDI_HR1_OFS_PD_TEXT_1, '"');
- printASCIIString(str + "\r\r");
+ _display->printAsciiString(str + "\r\r");
str = readStringAt(basic, IDI_HR1_OFS_PD_TEXT_2, '"');
- printASCIIString(str + "\r\r");
+ _display->printAsciiString(str + "\r\r");
str = readStringAt(basic, IDI_HR1_OFS_PD_TEXT_3, '"');
- printASCIIString(str + '\r');
+ _display->printAsciiString(str + '\r');
inputKey();
if (g_engine->shouldQuit())
@@ -120,7 +120,7 @@ void HiRes1Engine::runIntro() const {
}
}
- printASCIIString("\r");
+ _display->printAsciiString("\r");
file.close();
@@ -240,7 +240,7 @@ void HiRes1Engine::restartGame() {
initState();
_display->printString(_gameStrings.pressReturn);
inputString(); // Missing in the original
- printASCIIString("\r\r\r\r\r");
+ _display->printAsciiString("\r\r\r\r\r");
}
void HiRes1Engine::loadData() {