aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2017-02-07 08:10:11 +0100
committerEugene Sandulenko2017-02-07 08:10:11 +0100
commitdae115abaf2f7bee674a1bf15838e7c9c8d57434 (patch)
treef55b14053fe4c3a4d68633232fbe2e0596830661 /engines
parent7d044c570cd9476b28af6261d69e39bf43ab5a9f (diff)
downloadscummvm-rg350-dae115abaf2f7bee674a1bf15838e7c9c8d57434.tar.gz
scummvm-rg350-dae115abaf2f7bee674a1bf15838e7c9c8d57434.tar.bz2
scummvm-rg350-dae115abaf2f7bee674a1bf15838e7c9c8d57434.zip
JANITORIAL: Formatting fixes
Diffstat (limited to 'engines')
-rw-r--r--engines/director/frame.cpp39
1 files changed, 20 insertions, 19 deletions
diff --git a/engines/director/frame.cpp b/engines/director/frame.cpp
index 4260eaad8e..68b1713f46 100644
--- a/engines/director/frame.cpp
+++ b/engines/director/frame.cpp
@@ -380,7 +380,7 @@ void Frame::prepareFrame(Score *score) {
renderSprites(*score->_trailSurface, true);
if (_transType != 0)
- //T ODO Handle changing area case
+ // TODO Handle changing area case
playTransition(score);
if (_sound1 != 0 || _sound2 != 0) {
@@ -391,8 +391,7 @@ void Frame::prepareFrame(Score *score) {
}
void Frame::playSoundChannel() {
- debug(0, "Sound1 %d", _sound1);
- debug(0, "Sound2 %d", _sound2);
+ debug(0, "STUB: playSoundChannel(), Sound1 %d Sound2 %d", _sound1, _sound2);
}
void Frame::playTransition(Score *score) {
@@ -575,8 +574,8 @@ void Frame::renderSprites(Graphics::ManagedSurface &surface, bool renderTrail) {
castType = cast->type;
}
- //this needs precedence to be hit first... D3 does something really tricky with cast IDs for shapes.
- //I don't like this implementation 100% as the 'cast' above might not actually hit a member and be null?
+ // this needs precedence to be hit first... D3 does something really tricky with cast IDs for shapes.
+ // I don't like this implementation 100% as the 'cast' above might not actually hit a member and be null?
if (castType == kCastShape) {
renderShape(surface, i);
} else if (castType == kCastText) {
@@ -599,7 +598,7 @@ void Frame::renderSprites(Graphics::ManagedSurface &surface, bool renderTrail) {
assert(_sprites[i]->_cast);
BitmapCast *bitmapCast = static_cast<BitmapCast *>(_sprites[i]->_cast);
- //TODO: might want a quicker way to determine if cast is from Shared 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));
@@ -642,10 +641,10 @@ void Frame::renderShape(Graphics::ManagedSurface &surface, uint16 spriteId) {
if (_vm->getVersion() <= 3 && _sprites[spriteId]->_spriteType == 0x0c) {
tmpSurface.fillRect(Common::Rect(shapeRect.width(), shapeRect.height()), 255);
tmpSurface.frameRect(Common::Rect(shapeRect.width(), shapeRect.height()), 0);
- //TODO: don't override, work out how to display correctly.
+ // TODO: don't override, work out how to display correctly.
_sprites[spriteId]->_ink = kInkTypeTransparent;
} else {
- //No minus one on the pattern here! MacPlotData will do that for us!
+ // No minus one on the pattern here! MacPlotData will do that for us!
Graphics::MacPlotData pd(&tmpSurface, &_vm->getPatterns(), _sprites[spriteId]->_castId, 1, _sprites[spriteId]->_backColor);
Common::Rect fillRect(shapeRect.width(), shapeRect.height());
Graphics::drawFilledRect(fillRect, _sprites[spriteId]->_foreColor, Graphics::macDrawPixel, &pd);
@@ -670,14 +669,14 @@ void Frame::renderButton(Graphics::ManagedSurface &surface, uint16 spriteId, uin
int x = _sprites[spriteId]->_startPoint.x + rectLeft;
int y = _sprites[spriteId]->_startPoint.y + rectTop;
int height = button->initialRect.height(); // _sprites[spriteId]->_height;
- int width = button->initialRect.width() + 3; //_sprites[spriteId]->_width;
+ int width = button->initialRect.width() + 3; // _sprites[spriteId]->_width;
Common::Rect textRect(0, 0, width, height);
- //pass the rect of the button into the label.
+ // pass the rect of the button into the label.
renderText(surface, spriteId, _vm->getMainArchive()->getResource(MKTAG('S', 'T', 'X', 'T'), textId), &textRect);
- //TODO: review all cases to confirm if we should use text height.
- //height = textRect.height();
+ // TODO: review all cases to confirm if we should use text height.
+ // height = textRect.height();
Common::Rect _rect;
@@ -727,7 +726,7 @@ Image::ImageDecoder *Frame::getImageFrom(uint16 spriteId) {
if (_vm->getSharedBMP() != NULL && _vm->getSharedBMP()->contains(imgId)) {
debugC(2, kDebugImages, "Shared cast BMP: id: %d", imgId);
pic = _vm->getSharedBMP()->getVal(imgId);
- pic->seek(0); //TODO: this actually gets re-read every loop... we need to rewind it!
+ pic->seek(0); // TODO: this actually gets re-read every loop... we need to rewind it!
bc = static_cast<BitmapCast *>(_vm->getSharedCasts()->getVal(spriteId));
} else if (_vm->_currentScore->getArchive()->hasResource(MKTAG('B', 'I', 'T', 'D'), imgId)) {
pic = _vm->_currentScore->getArchive()->getResource(MKTAG('B', 'I', 'T', 'D'), imgId);
@@ -891,7 +890,8 @@ void Frame::renderText(Graphics::ManagedSurface &surface, uint16 spriteId, Commo
uint16 boxShadow = (uint16)textCast->boxShadow;
uint16 borderSize = (uint16)textCast->borderSize;
- if (textSize != NULL) borderSize = 0;
+ if (textSize != NULL)
+ borderSize = 0;
uint16 padding = (uint16)textCast->gutterSize;
uint16 textShadow = (uint16)textCast->textShadow;
@@ -907,9 +907,9 @@ void Frame::renderText(Graphics::ManagedSurface &surface, uint16 spriteId, Commo
width = textCast->initialRect.right;
if (_vm->_currentScore->_fontMap.contains(textCast->fontId)) {
- // We need to make sure that teh Shared Cast fonts have been loaded in?
- //might need a mapping table here of our own.
- //textCast->fontId = _vm->_wm->_fontMan->getFontIdByName(_vm->_currentScore->_fontMap[textCast->fontId]);
+ // We need to make sure that the Shared Cast fonts have been loaded in?
+ // might need a mapping table here of our own.
+ // textCast->fontId = _vm->_wm->_fontMan->getFontIdByName(_vm->_currentScore->_fontMap[textCast->fontId]);
}
Graphics::MacFont macFont = Graphics::MacFont(textCast->fontId, textCast->fontSize, textCast->textSlant);
@@ -939,7 +939,7 @@ void Frame::renderText(Graphics::ManagedSurface &surface, uint16 spriteId, Commo
height = textSurface->h;
if (textSize != NULL) {
- //TODO: this offset could be due to incorrect fonts loaded!
+ // TODO: this offset could be due to incorrect fonts loaded!
textSize->bottom = height + mt.getLineCount();
}
@@ -971,7 +971,8 @@ void Frame::renderText(Graphics::ManagedSurface &surface, uint16 spriteId, Commo
textX--;
} else {
x++;
- if (width % 2 != 0) x++;
+ if (width % 2 != 0)
+ x++;
y += 2;
}