From 10766eb46f00c2ed9b3550242ff8463659f5326c Mon Sep 17 00:00:00 2001 From: Walter van Niftrik Date: Fri, 27 Jan 2017 23:12:29 +0100 Subject: ADL: Add support for printing bell character --- engines/adl/adl.h | 2 +- engines/adl/display.cpp | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'engines') 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(g_engine)->bell(); + } else if ((byte)c < 0x80 || (byte)c >= 0xa0) { setCharAtCursor(c); ++_cursorPos; } -- cgit v1.2.3