diff options
Diffstat (limited to 'engines/tsage/graphics.cpp')
-rw-r--r-- | engines/tsage/graphics.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/engines/tsage/graphics.cpp b/engines/tsage/graphics.cpp index fa3ed33302..622a979dac 100644 --- a/engines/tsage/graphics.cpp +++ b/engines/tsage/graphics.cpp @@ -199,9 +199,9 @@ void Rect::resize(const GfxSurface &surface, int xp, int yp, int percent) { this->moveTo(xp, yp); - int xa = (surface._flags & FRAME_FLIP_CENTROID_X) == 0 ? surface._centroid.x : + int xa = (surface._flags & FRAME_FLIP_CENTROID_X) == 0 ? surface._centroid.x : bounds.width() - (surface._centroid.x + 1); - int ya = (surface._flags & FRAME_FLIP_CENTROID_Y) == 0 ? surface._centroid.y : + int ya = (surface._flags & FRAME_FLIP_CENTROID_Y) == 0 ? surface._centroid.y : bounds.height() - (surface._centroid.y + 1); int xd = xa * percent / 100; @@ -1390,7 +1390,10 @@ void GfxManager::copyFrom(GfxSurface &src, const Rect &srcBounds, const Rect &de GfxFont::GfxFont() { - _fontNumber = (g_vm->getFeatures() & GF_DEMO) ? 0 : 50; + if ((g_vm->getGameID() == GType_Ringworld) && (g_vm->getFeatures() & GF_DEMO)) + _fontNumber = 0; + else + _fontNumber = 50; _numChars = 0; _bpp = 0; _fontData = NULL; @@ -1480,7 +1483,6 @@ int GfxFont::getStringFit(const char *&s, int maxWidth) { const char *nextWord = NULL; const char *sStart = s; int numChars = 1; - int strWidth = 1; char nextChar; for (;;) { @@ -1494,7 +1496,7 @@ int GfxFont::getStringFit(const char *&s, int maxWidth) { nextWord = s; } - strWidth = getStringWidth(sStart, numChars); + int strWidth = getStringWidth(sStart, numChars); if (strWidth > maxWidth) { if (nextWord) { s = nextWord; |