diff options
author | uruk | 2014-03-04 20:27:00 +0100 |
---|---|---|
committer | uruk | 2014-03-04 20:27:00 +0100 |
commit | 80e01378d34217e572825bd6aa1e196247cc5b40 (patch) | |
tree | d4566e769128d4f6535cca2fa73f4e3eebb23257 /engines/avalanche/graphics.cpp | |
parent | 8b16fdcede688a156b4787601d284224d915d49f (diff) | |
download | scummvm-rg350-80e01378d34217e572825bd6aa1e196247cc5b40.tar.gz scummvm-rg350-80e01378d34217e572825bd6aa1e196247cc5b40.tar.bz2 scummvm-rg350-80e01378d34217e572825bd6aa1e196247cc5b40.zip |
AVALANCHE: Implement MainMenu::option().
Rework and implement a lot of connected functions.
Diffstat (limited to 'engines/avalanche/graphics.cpp')
-rw-r--r-- | engines/avalanche/graphics.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/engines/avalanche/graphics.cpp b/engines/avalanche/graphics.cpp index 0ba9a8c118..e1dd8e91cd 100644 --- a/engines/avalanche/graphics.cpp +++ b/engines/avalanche/graphics.cpp @@ -353,9 +353,9 @@ void GraphicManager::drawNormalText(const Common::String text, FontType font, by } /** - * Used in Help. Draws text double the size of the normal. + * Draws text double the size of the normal. */ -void GraphicManager::drawBigText(const Common::String text, FontType font, byte fontHeight, int16 x, int16 y, Color color) { +void GraphicManager::drawBigText(Graphics::Surface &surface, const Common::String text, FontType font, byte fontHeight, int16 x, int16 y, Color color) { for (uint i = 0; i < text.size(); i++) { for (int j = 0; j < fontHeight; j++) { byte pixel = font[(byte)text[i]][j]; @@ -365,7 +365,7 @@ void GraphicManager::drawBigText(const Common::String text, FontType font, byte pixelBit = (pixel >> (bit / 2)) & 1; for (int k = 0; k < 2; k++) if (pixelBit) - *(byte *)_surface.getBasePtr(x + i * 16 + 16 - bit, y + j * 2 + k) = color; + *(byte *)surface.getBasePtr(x + i * 16 + 16 - bit, y + j * 2 + k) = color; } } } @@ -694,6 +694,10 @@ void GraphicManager::helpDrawHighlight(byte which, Color color) { drawRectangle(Common::Rect(466, 38 + which * 27, 556, 63 + which * 27), color); } +void GraphicManager::helpDrawBigText(const Common::String text, int16 x, int16 y, Color color) { + drawBigText(_surface, text, _vm->_font, 8, x, y, color); +} + /** * @remarks Originally called 'titles' */ @@ -857,8 +861,10 @@ void GraphicManager::menuLoadPictures() { title.free(); file.close(); +} - menuRefreshScreen(); +void GraphicManager::menuDrawBigText(FontType font, uint16 x, uint16 y, Common::String text, bool notted) { + drawBigText(_menu, text, font, 14, x, y, kColorBlack); } /** |