aboutsummaryrefslogtreecommitdiff
path: root/engines/director
diff options
context:
space:
mode:
authorEugene Sandulenko2017-01-11 19:45:23 +0100
committerEugene Sandulenko2017-01-11 19:45:23 +0100
commit5c985ab549ae9ac2c47bf32f7951fca80db071f1 (patch)
tree04635a6bbb5c5f3a26b751a00ec81396996e0d16 /engines/director
parenta1500016ff26b59619fe90bf20c37a4ad582a07f (diff)
downloadscummvm-rg350-5c985ab549ae9ac2c47bf32f7951fca80db071f1.tar.gz
scummvm-rg350-5c985ab549ae9ac2c47bf32f7951fca80db071f1.tar.bz2
scummvm-rg350-5c985ab549ae9ac2c47bf32f7951fca80db071f1.zip
DIRECTOR: Fix warnings
Diffstat (limited to 'engines/director')
-rw-r--r--engines/director/cast.cpp6
-rw-r--r--engines/director/frame.cpp24
2 files changed, 19 insertions, 11 deletions
diff --git a/engines/director/cast.cpp b/engines/director/cast.cpp
index 1434419e6c..a3c58008ed 100644
--- a/engines/director/cast.cpp
+++ b/engines/director/cast.cpp
@@ -86,7 +86,7 @@ TextCast::TextCast(Common::ReadStreamEndian &stream, uint16 version) {
if (flags & 0x4)
textFlags.push_back(kTextFlagDoNotWrap);
if (flags & 0xf8)
- warning("Unproxessed text cast flags: %x", flags & 0xf8);
+ warning("Unprocessed text cast flags: %x", flags & 0xf8);
// TODO: FIXME: guesswork
fontId = stream.readByte();
@@ -108,6 +108,10 @@ TextCast::TextCast(Common::ReadStreamEndian &stream, uint16 version) {
stream.readUint16();
textShadow = static_cast<SizeType>(stream.readByte());
byte flags = stream.readByte();
+
+ if (flags)
+ warning("Unproxessed text cast flags: %x", flags);
+
fontSize = stream.readUint16();
} else {
initialRect = Score::readRect(stream);
diff --git a/engines/director/frame.cpp b/engines/director/frame.cpp
index 4de017b61b..6978c574ef 100644
--- a/engines/director/frame.cpp
+++ b/engines/director/frame.cpp
@@ -638,9 +638,9 @@ void Frame::renderSprites(Graphics::ManagedSurface &surface, bool renderTrail) {
}
void Frame::renderShape(Graphics::ManagedSurface &surface, uint16 spriteID) {
- Common::Rect r = Common::Rect(_sprites[spriteID]->_startPoint.x,
+ Common::Rect r = Common::Rect(_sprites[spriteID]->_startPoint.x,
_sprites[spriteID]->_startPoint.y,
- _sprites[spriteID]->_startPoint.x + _sprites[spriteID]->_width,
+ _sprites[spriteID]->_startPoint.x + _sprites[spriteID]->_width,
_sprites[spriteID]->_startPoint.y + _sprites[spriteID]->_height);
Graphics::Surface tmpSurface;
@@ -743,7 +743,7 @@ Image::ImageDecoder *Frame::getImageFrom(uint16 spriteId) {
pic = _vm->_currentScore->getArchive()->getResource(MKTAG('B', 'I', 'T', 'D'), imgId);
bc = static_cast<BitmapCast *>(_vm->_currentScore->_casts[spriteId]);
}
-
+
if (pic != NULL && bc != NULL) {
if (_vm->getVersion() < 4) {
int w = bc->initialRect.width(), h = bc->initialRect.height();
@@ -752,7 +752,7 @@ Image::ImageDecoder *Frame::getImageFrom(uint16 spriteId) {
imgId, w, h, bc->flags, bc->someFlaggyThing, bc->unk1, bc->unk2);
img = new BITDDecoder(w, h);
} else if (_vm->getVersion() < 6) {
- BitmapCast *bc = static_cast<BitmapCast *>(_vm->_currentScore->_casts[spriteId]);
+ bc = static_cast<BitmapCast *>(_vm->_currentScore->_casts[spriteId]);
int w = bc->initialRect.width(), h = bc->initialRect.height();
debugC(2, kDebugImages, "id: %d, w: %d, h: %d, flags: %x, some: %x, unk1: %d, unk2: %d",
@@ -797,8 +797,9 @@ void Frame::renderText(Graphics::ManagedSurface &surface, uint16 spriteID, uint1
}
void Frame::renderText(Graphics::ManagedSurface &surface, uint16 spriteID, Common::SeekableSubReadStreamEndian *textStream, bool isButtonLabel) {
- if (textStream == NULL) return;
-
+ if (textStream == NULL)
+ return;
+
uint16 castID = _sprites[spriteID]->_castId;
TextCast *textCast = static_cast<TextCast *>(_vm->_currentScore->_casts[castID]);
@@ -824,6 +825,9 @@ void Frame::renderText(Graphics::ManagedSurface &surface, uint16 spriteID, Commo
uint32 b = textStream->readUint32();
uint16 c = textStream->readUint16();
uint16 d = textStream->readUint16();
+
+ debugC(3, kDebugText, "text: a: %x b: %x c: %x d: %x", a, b, c, d);
+
textCast->fontId = textStream->readUint16();
textCast->textSlant = textStream->readByte();
textStream->readByte();
@@ -839,8 +843,8 @@ void Frame::renderText(Graphics::ManagedSurface &surface, uint16 spriteID, Commo
uint16 padding = (uint16)textCast->gutterSize;
uint16 textShadow = (uint16)textCast->textShadow;
- uint32 rectLeft = textCast->initialRect.left;
- uint32 rectTop = textCast->initialRect.top;
+ //uint32 rectLeft = textCast->initialRect.left;
+ //uint32 rectTop = textCast->initialRect.top;
int x = _sprites[spriteID]->_startPoint.x; // +rectLeft;
int y = _sprites[spriteID]->_startPoint.y; // +rectTop;
@@ -866,7 +870,7 @@ void Frame::renderText(Graphics::ManagedSurface &surface, uint16 spriteID, Commo
int alignment = (int)textCast->textAlign;
if (alignment == -1) alignment = 3;
else alignment++;
-
+
uint16 textX = x, textY = y;
if (!isButtonLabel) {
if (borderSize > 0) {
@@ -902,7 +906,7 @@ void Frame::renderText(Graphics::ManagedSurface &surface, uint16 spriteID, Commo
return;
uint16 borderX = x + borderSize - 1, borderY = y + borderSize - 1, borderHeight = height, borderWidth = width;
- if (borderSize != kSizeNone) {
+ if (borderSize != kSizeNone) {
while (borderSize) {
borderWidth += 2;
borderHeight += 2;