diff options
author | Walter van Niftrik | 2017-01-27 23:12:29 +0100 |
---|---|---|
committer | Walter van Niftrik | 2017-01-27 23:14:19 +0100 |
commit | 10766eb46f00c2ed9b3550242ff8463659f5326c (patch) | |
tree | 878c8123f1b0ce4f3ed0a36867f91f08ad153d2c /engines/adl | |
parent | d87b4b3f1804eb38ea170540335c05b1dff455c5 (diff) | |
download | scummvm-rg350-10766eb46f00c2ed9b3550242ff8463659f5326c.tar.gz scummvm-rg350-10766eb46f00c2ed9b3550242ff8463659f5326c.tar.bz2 scummvm-rg350-10766eb46f00c2ed9b3550242ff8463659f5326c.zip |
ADL: Add support for printing bell character
Diffstat (limited to 'engines/adl')
-rw-r--r-- | engines/adl/adl.h | 2 | ||||
-rw-r--r-- | engines/adl/display.cpp | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/engines/adl/adl.h b/engines/adl/adl.h index 543c190793..3f26636234 100644 --- a/engines/adl/adl.h +++ b/engines/adl/adl.h @@ -231,6 +231,7 @@ public: virtual ~AdlEngine(); bool pollEvent(Common::Event &event) const; + void bell(uint count = 1) const; protected: AdlEngine(OSystem *syst, const AdlGameDescription *gd); @@ -312,7 +313,6 @@ protected: void drawPic(byte pic, Common::Point pos = Common::Point()) const; // Sound - void bell(uint count = 1) const; bool playTones(const Tones &tones, bool isMusic, bool allowSkip = false) const; // Game state functions diff --git a/engines/adl/display.cpp b/engines/adl/display.cpp index e18de6adae..c630d034c9 100644 --- a/engines/adl/display.cpp +++ b/engines/adl/display.cpp @@ -33,6 +33,7 @@ #include "engines/util.h" #include "adl/display.h" +#include "adl/adl.h" namespace Adl { @@ -294,7 +295,10 @@ void Display::moveCursorTo(const Common::Point &pos) { void Display::printChar(char c) { if (c == APPLECHAR('\r')) _cursorPos = (_cursorPos / TEXT_WIDTH + 1) * TEXT_WIDTH; - else if ((byte)c < 0x80 || (byte)c >= 0xa0) { + else if (c == APPLECHAR('\a')) { + updateTextScreen(); + static_cast<AdlEngine *>(g_engine)->bell(); + } else if ((byte)c < 0x80 || (byte)c >= 0xa0) { setCharAtCursor(c); ++_cursorPos; } |