diff options
author | lukaslw | 2014-08-09 05:37:57 +0200 |
---|---|---|
committer | lukaslw | 2014-08-09 05:37:57 +0200 |
commit | b97f726a3e79d11ca243ef48a8a6173d47366c7e (patch) | |
tree | 95cbbdef921a010ff47e5c26023ceff2cdbbed7c /engines/prince/font.cpp | |
parent | 886cf189c66a9fa59f0317a25ccc5db9d75bf59a (diff) | |
download | scummvm-rg350-b97f726a3e79d11ca243ef48a8a6173d47366c7e.tar.gz scummvm-rg350-b97f726a3e79d11ca243ef48a8a6173d47366c7e.tar.bz2 scummvm-rg350-b97f726a3e79d11ca243ef48a8a6173d47366c7e.zip |
PRINCE: scrollCredits() implementation, showLogo() update
Diffstat (limited to 'engines/prince/font.cpp')
-rw-r--r-- | engines/prince/font.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/engines/prince/font.cpp b/engines/prince/font.cpp index 0ac61f29be..42329d2606 100644 --- a/engines/prince/font.cpp +++ b/engines/prince/font.cpp @@ -25,6 +25,7 @@ #include "common/stream.h" #include "prince/font.h" +#include "prince/prince.h" namespace Prince { @@ -72,6 +73,7 @@ int Font::getCharWidth(uint32 chr) const { void Font::drawChar(Graphics::Surface *dst, uint32 chr, int posX, int posY, uint32 color) const { const ChrData chrData = getChrData(chr); + Common::Rect screenRect(0, 0, PrinceEngine::kNormalWidth, PrinceEngine::kNormalHeight); for (int y = 0; y < chrData._height; y++) { for (int x = 0; x < chrData._width; x++) { @@ -81,7 +83,9 @@ void Font::drawChar(Graphics::Surface *dst, uint32 chr, int posX, int posY, uint else if (d == 2) d = color; else if (d == 3) d = 0; if (d != 255) { - *(byte *)dst->getBasePtr(posX + x, posY + y) = d; + if (screenRect.contains(posX + x, posY + y)) { + *(byte *)dst->getBasePtr(posX + x, posY + y) = d; + } } } } |