diff options
author | Nicola Mettifogo | 2008-01-04 21:24:51 +0000 |
---|---|---|
committer | Nicola Mettifogo | 2008-01-04 21:24:51 +0000 |
commit | 3e04d8b2154b59acc6075055c2ea085795826531 (patch) | |
tree | 815dc090b86131feb85bc2110d3570d3722e24f7 /engines | |
parent | 3451d1c30f579be0fa90cbdd51ec624043346b31 (diff) | |
download | scummvm-rg350-3e04d8b2154b59acc6075055c2ea085795826531.tar.gz scummvm-rg350-3e04d8b2154b59acc6075055c2ea085795826531.tar.bz2 scummvm-rg350-3e04d8b2154b59acc6075055c2ea085795826531.zip |
Fix for bug# 1729307. Fonts are now displayed with shadows when needed on Amiga. The correct font for intro screen has also been selected.
svn-id: r30221
Diffstat (limited to 'engines')
-rw-r--r-- | engines/parallaction/callables_ns.cpp | 7 | ||||
-rw-r--r-- | engines/parallaction/font.cpp | 2 | ||||
-rw-r--r-- | engines/parallaction/graphics.cpp | 12 | ||||
-rw-r--r-- | engines/parallaction/graphics.h | 2 | ||||
-rw-r--r-- | engines/parallaction/gui_ns.cpp | 7 | ||||
-rw-r--r-- | engines/parallaction/parallaction.h | 1 | ||||
-rw-r--r-- | engines/parallaction/parallaction_ns.cpp | 1 |
7 files changed, 29 insertions, 3 deletions
diff --git a/engines/parallaction/callables_ns.cpp b/engines/parallaction/callables_ns.cpp index c06e109e48..9a54859aba 100644 --- a/engines/parallaction/callables_ns.cpp +++ b/engines/parallaction/callables_ns.cpp @@ -397,8 +397,10 @@ void Parallaction_ns::_c_finito(void *parm) { cleanInventory(); _gfx->setPalette(_gfx->_palette); + _gfx->setFont(_menuFont); + _gfx->setFontShadow(true); + if (allPartsComplete()) { - _gfx->setFont(_menuFont); _gfx->displayCenteredString(70, v4C[_language]); _gfx->displayCenteredString(100, v3C[_language]); _gfx->displayCenteredString(130, v2C[_language]); @@ -409,7 +411,6 @@ void Parallaction_ns::_c_finito(void *parm) { scheduleLocationSwitch("estgrotta.drki"); } else { - _gfx->setFont(_menuFont); _gfx->displayCenteredString(70, v8C[_language]); _gfx->displayCenteredString(100, v7C[_language]); _gfx->displayCenteredString(130, v6C[_language]); @@ -438,6 +439,7 @@ void Parallaction_ns::_c_testResult(void *parm) { parseLocation("common"); _gfx->setFont(_menuFont); + _gfx->setFontShadow(true); _gfx->displayCenteredString(38, _slideText[0]); _gfx->displayCenteredString(58, _slideText[1]); @@ -483,6 +485,7 @@ void Parallaction_ns::_c_startIntro(void *parm) { void Parallaction_ns::_c_endIntro(void *parm) { _gfx->setFont(_menuFont); + _gfx->setFontShadow(true); debugC(1, kDebugExec, "endIntro()"); diff --git a/engines/parallaction/font.cpp b/engines/parallaction/font.cpp index e5aaa695a0..d0f863ee86 100644 --- a/engines/parallaction/font.cpp +++ b/engines/parallaction/font.cpp @@ -578,11 +578,13 @@ void Parallaction_ns::initFonts() { _dialogueFont = _disk->loadFont("comic"); _labelFont = _disk->loadFont("topaz"); _menuFont = _disk->loadFont("slide"); + _introFont = _disk->loadFont("slide"); } else { _dialogueFont = _disk->loadFont("comic"); Common::MemoryReadStream stream(_amigaTopazFont, 2600, false); _labelFont = new AmigaFont(stream); _menuFont = _disk->loadFont("slide"); + _introFont = _disk->loadFont("intro"); } } diff --git a/engines/parallaction/graphics.cpp b/engines/parallaction/graphics.cpp index 5b1c292ead..81922dd185 100644 --- a/engines/parallaction/graphics.cpp +++ b/engines/parallaction/graphics.cpp @@ -688,6 +688,13 @@ void Gfx::restoreGetBackground(const Common::Rect& r, byte *data) { void Gfx::displayString(uint16 x, uint16 y, const char *text, byte color) { byte *dst = (byte*)_buffers[kBitFront]->getBasePtr(x, y); + if (_fontShadow) { + dst = (byte*)_buffers[kBitFront]->getBasePtr(x-2, y+2); + _font->setColor(0); + _font->drawString(dst, _vm->_screenWidth, text); + } + + dst = (byte*)_buffers[kBitFront]->getBasePtr(x, y); _font->setColor(color); _font->drawString(dst, _vm->_screenWidth, text); } @@ -799,8 +806,12 @@ void Gfx::getStringExtent(char *text, uint16 maxwidth, int16* width, int16* heig void Gfx::setFont(Font *font) { assert(font); _font = font; + setFontShadow(false); } +void Gfx::setFontShadow(bool enable) { + _fontShadow = enable && (_vm->getPlatform() == Common::kPlatformAmiga); +} void Gfx::restoreBackground(const Common::Rect& r) { @@ -907,6 +918,7 @@ Gfx::Gfx(Parallaction* vm) : _hbCircleRadius = 0; _font = NULL; + _fontShadow = false; return; } diff --git a/engines/parallaction/graphics.h b/engines/parallaction/graphics.h index a165a08fab..778c2e6e0a 100644 --- a/engines/parallaction/graphics.h +++ b/engines/parallaction/graphics.h @@ -288,6 +288,7 @@ public: // misc int16 queryMask(int16 v); void setFont(Font* font); + void setFontShadow(bool enable); void swapBuffers(); void updateScreen(); void setBackground(Graphics::Surface *surf); @@ -314,6 +315,7 @@ protected: Graphics::Surface *_buffers[NUM_BUFFERS]; MaskBuffer *_depthMask; Font *_font; + bool _fontShadow; bool _halfbrite; Common::Point _hbCirclePos; diff --git a/engines/parallaction/gui_ns.cpp b/engines/parallaction/gui_ns.cpp index 05b31fb052..8271dddfb4 100644 --- a/engines/parallaction/gui_ns.cpp +++ b/engines/parallaction/gui_ns.cpp @@ -127,7 +127,8 @@ void Parallaction_ns::guiStart() { guiSplash(); - _gfx->setFont(_menuFont); + _gfx->setFont(_introFont); + _gfx->setFontShadow(true); _language = guiChooseLanguage(); _disk->setLanguage(_language); @@ -191,6 +192,9 @@ int Parallaction_ns::guiNewGame() { const char **v14 = introMsg3; + _gfx->setFont(_menuFont); + _gfx->setFontShadow(true); + _disk->selectArchive("disk1"); setBackground("test", NULL, NULL); @@ -374,6 +378,7 @@ int Parallaction_ns::guiSelectCharacter() { _soundMan->stopMusic(); _gfx->setFont(_menuFont); + _gfx->setFontShadow(true); _disk->selectArchive((getFeatures() & GF_LANG_MULT) ? "disk1" : "disk0"); diff --git a/engines/parallaction/parallaction.h b/engines/parallaction/parallaction.h index 8ff0408d93..abd0f9c93d 100644 --- a/engines/parallaction/parallaction.h +++ b/engines/parallaction/parallaction.h @@ -493,6 +493,7 @@ public: Font *_labelFont; Font *_menuFont; + Font *_introFont; Font *_dialogueFont; Common::RandomSource _rnd; diff --git a/engines/parallaction/parallaction_ns.cpp b/engines/parallaction/parallaction_ns.cpp index bb369684dd..d65030f355 100644 --- a/engines/parallaction/parallaction_ns.cpp +++ b/engines/parallaction/parallaction_ns.cpp @@ -160,6 +160,7 @@ void Parallaction_ns::freeFonts() { delete _dialogueFont; delete _labelFont; delete _menuFont; + delete _introFont; } |