aboutsummaryrefslogtreecommitdiff
path: root/engines/director
diff options
context:
space:
mode:
authorEugene Sandulenko2017-01-16 00:49:25 +0100
committerEugene Sandulenko2017-01-16 00:51:37 +0100
commit8b5196da53f2e9f92f5a6f22a1073833e51123f9 (patch)
treea48510b9e2ca01cfe0ed4258fa35f3401eac515b /engines/director
parent979560e304fef2ff978b8019a510a4f2a13ed49e (diff)
downloadscummvm-rg350-8b5196da53f2e9f92f5a6f22a1073833e51123f9.tar.gz
scummvm-rg350-8b5196da53f2e9f92f5a6f22a1073833e51123f9.tar.bz2
scummvm-rg350-8b5196da53f2e9f92f5a6f22a1073833e51123f9.zip
DIRECTOR: Added debug output for Shared Cast images
Diffstat (limited to 'engines/director')
-rw-r--r--engines/director/frame.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/engines/director/frame.cpp b/engines/director/frame.cpp
index 4a478de884..c58ae7d456 100644
--- a/engines/director/frame.cpp
+++ b/engines/director/frame.cpp
@@ -601,6 +601,7 @@ void Frame::renderSprites(Graphics::ManagedSurface &surface, bool renderTrail) {
BitmapCast *bitmapCast = static_cast<BitmapCast *>(_sprites[i]->_cast);
//TODO: might want a quicker way to determine if cast is from Shared Cast.
if (_vm->getSharedBMP() != NULL && _vm->getSharedBMP()->contains(_sprites[i]->_castId + 1024)) {
+ debugC(2, kDebugImages, "Shared cast sprite BMP: id: %d", _sprites[i]->_castId + 1024);
bitmapCast = static_cast<BitmapCast *>(_vm->getSharedCasts()->getVal(_sprites[i]->_castId));
}
@@ -719,6 +720,7 @@ Image::ImageDecoder *Frame::getImageFrom(uint16 spriteId) {
BitmapCast *bc = NULL;
if (_vm->getSharedBMP() != NULL && _vm->getSharedBMP()->contains(imgId)) {
+ debugC(2, kDebugImages, "Shared cast BMP: id: %d", imgId);
pic = _vm->getSharedBMP()->getVal(imgId);
bc = static_cast<BitmapCast *>(_vm->getSharedCasts()->getVal(spriteId));
} else if (_vm->_currentScore->getArchive()->hasResource(MKTAG('B', 'I', 'T', 'D'), imgId)) {
@@ -875,9 +877,9 @@ void Frame::renderText(Graphics::ManagedSurface &surface, uint16 spriteId, Commo
debugC(3, kDebugText, "renderText: x: %d y: %d w: %d h: %d font: '%s'", x, y, width, height, _vm->_wm->_fontMan->getFontName(macFont));
int alignment = (int)textCast->textAlign;
- if (alignment == -1)
+ if (alignment == -1)
alignment = 3;
- else
+ else
alignment++;
uint16 textX = x, textY = y;
@@ -897,12 +899,12 @@ void Frame::renderText(Graphics::ManagedSurface &surface, uint16 spriteId, Commo
width += padding * 2;
height += padding;
- if (textCast->textAlign == kTextAlignLeft)
+ if (textCast->textAlign == kTextAlignLeft)
textX += padding;
- else if (textCast->textAlign == kTextAlignRight)
+ else if (textCast->textAlign == kTextAlignRight)
textX -= padding;
//TODO: alignment issue with odd-size-width center-aligned text
- //else if (textCast->textAlign == kTextAlignCenter && ((borderSize + padding) % 2 == 1))
+ //else if (textCast->textAlign == kTextAlignCenter && ((borderSize + padding) % 2 == 1))
// textX--;
textY += padding / 2;