diff options
Diffstat (limited to 'engines/supernova/supernova.cpp')
-rw-r--r-- | engines/supernova/supernova.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/engines/supernova/supernova.cpp b/engines/supernova/supernova.cpp index cde54ab193..d11f85670b 100644 --- a/engines/supernova/supernova.cpp +++ b/engines/supernova/supernova.cpp @@ -362,6 +362,11 @@ void SupernovaEngine::renderRoom(Room &room) { } } +int SupernovaEngine::textWidth(const uint16 key) { + const char text[2] = {key & 0xFF, 0}; + return textWidth(text); +} + int SupernovaEngine::textWidth(const char *text) { int charWidth = 0; while (*text != '\0') { @@ -502,10 +507,20 @@ void SupernovaEngine::renderText(const char *text, int x, int y, byte color) { _textColor = color; } +void SupernovaEngine::renderText(const uint16 character, int x, int y, byte color) { + char text[2] = {character & 0xFF, 0}; + renderText(text, x, y, color); +} + void SupernovaEngine::renderText(const char *text) { renderText(text, _textCursorX, _textCursorY, _textColor); } +void SupernovaEngine::renderText(const uint16 character) { + char text[2] = {character & 0xFF, 0}; + renderText(text, _textCursorX, _textCursorY, _textColor); +} + void SupernovaEngine::renderBox(int x, int y, int width, int height, byte color) { Graphics::Surface *screen = _system->lockScreen(); screen->fillRect(Common::Rect(x, y, x + width, y + height), color); |