diff options
author | Eugene Sandulenko | 2015-12-30 18:22:46 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2015-12-30 18:22:46 +0100 |
commit | a712a1d80b2bf7e35d729475e9522456b6a90e27 (patch) | |
tree | 23ca3f23e161141281b1e95b379a7b20cb56fa0a /engines | |
parent | 1c3560cd65eb03efcc5db31cd62196db712af99e (diff) | |
download | scummvm-rg350-a712a1d80b2bf7e35d729475e9522456b6a90e27.tar.gz scummvm-rg350-a712a1d80b2bf7e35d729475e9522456b6a90e27.tar.bz2 scummvm-rg350-a712a1d80b2bf7e35d729475e9522456b6a90e27.zip |
WAGE: Implement appendText()
Diffstat (limited to 'engines')
-rw-r--r-- | engines/wage/gui.cpp | 8 | ||||
-rw-r--r-- | engines/wage/gui.h | 3 | ||||
-rw-r--r-- | engines/wage/wage.cpp | 4 | ||||
-rw-r--r-- | engines/wage/wage.h | 2 |
4 files changed, 13 insertions, 4 deletions
diff --git a/engines/wage/gui.cpp b/engines/wage/gui.cpp index 01b9422fd4..6f168ebcb8 100644 --- a/engines/wage/gui.cpp +++ b/engines/wage/gui.cpp @@ -83,6 +83,11 @@ void Gui::setScene(Scene *scene) { _scene = scene; } +void Gui::appendText(String &str) { + _out += str; + _out += '\n'; +} + void Gui::draw() { if (_scene != NULL && _sceneDirty) { _scene->paint(&_screen, 0, kMenuHeight); @@ -92,11 +97,12 @@ void Gui::draw() { _sceneDirty = false; } + // Render console int sceneW = _scene->_design->getBounds()->width(); paintBorder(&_screen, sceneW, kMenuHeight, _screen.w - sceneW, _scene->_design->getBounds()->height(), true, true, true, false); - + // Blit to screen g_system->copyRectToScreen(_screen.getPixels(), _screen.pitch, 0, 0, _screen.w, _screen.h); } diff --git a/engines/wage/gui.h b/engines/wage/gui.h index 46899027d3..2e6cd65ad6 100644 --- a/engines/wage/gui.h +++ b/engines/wage/gui.h @@ -60,6 +60,7 @@ public: void draw(); void setScene(Scene *scene); + void appendText(Common::String &str); private: void paintBorder(Graphics::Surface *g, int x, int y, int width, int height, @@ -72,6 +73,8 @@ private: Graphics::Surface _screen; Scene *_scene; bool _sceneDirty; + + Common::String _out; }; } // End of namespace Wage diff --git a/engines/wage/wage.cpp b/engines/wage/wage.cpp index 2b919e10b6..39a2ce6624 100644 --- a/engines/wage/wage.cpp +++ b/engines/wage/wage.cpp @@ -165,8 +165,8 @@ void WageEngine::setMenu(String soundName) { warning("STUB: WageEngine::setMenu"); } -void WageEngine::appendText(String str) { - warning("STUB: WageEngine::appendText(%s)", str.c_str()); +void WageEngine::appendText(String &str) { + _gui->appendText(str); } Obj *WageEngine::getOffer() { diff --git a/engines/wage/wage.h b/engines/wage/wage.h index c93e4e7b1b..3e29471246 100644 --- a/engines/wage/wage.h +++ b/engines/wage/wage.h @@ -139,7 +139,7 @@ public: void playSound(String soundName); void setMenu(String soundName); - void appendText(String str); + void appendText(String &str); void gameOver(); Obj *getOffer(); Chr *getMonster(); |