aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorFilippos Karapetis2011-01-22 02:51:39 +0000
committerFilippos Karapetis2011-01-22 02:51:39 +0000
commit84a04d6876aa1894b7f54633343856a5316066be (patch)
treedec8a98f96f1b2f6a5b0af8ea25a36999796d2bb /engines/sci
parent75b232c67d520d65029d00643dbbc36a95af3565 (diff)
downloadscummvm-rg350-84a04d6876aa1894b7f54633343856a5316066be.tar.gz
scummvm-rg350-84a04d6876aa1894b7f54633343856a5316066be.tar.bz2
scummvm-rg350-84a04d6876aa1894b7f54633343856a5316066be.zip
SCI: Code formatting
svn-id: r55404
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/graphics/robot.cpp30
1 files changed, 14 insertions, 16 deletions
diff --git a/engines/sci/graphics/robot.cpp b/engines/sci/graphics/robot.cpp
index 3e57e29854..31f421a2e1 100644
--- a/engines/sci/graphics/robot.cpp
+++ b/engines/sci/graphics/robot.cpp
@@ -135,23 +135,21 @@ void GfxRobot::draw(int x, int y) {
_palette->createFromData(paletteData, paletteSize, &resourcePal);
- for (int i = 0; i < 256; ++i)
- {
- savePal[i*4] = _palette->_sysPalette.colors[i].r;
- savePal[i*4+1] = _palette->_sysPalette.colors[i].g;
- savePal[i*4+2] = _palette->_sysPalette.colors[i].b;
- savePal[i*4+3] = 0;
+ for (int i = 0; i < 256; ++i) {
+ savePal[i * 4 + 0] = _palette->_sysPalette.colors[i].r;
+ savePal[i * 4 + 1] = _palette->_sysPalette.colors[i].g;
+ savePal[i * 4 + 2] = _palette->_sysPalette.colors[i].b;
+ savePal[i * 4 + 3] = 0;
}
memcpy(robotPal, savePal, sizeof(savePal));
- for (int i = 0; i < colorCount; ++i)
- {
+ for (int i = 0; i < colorCount; ++i) {
int index = i + startIndex;
- robotPal[index*4] = resourcePal.colors[index].r;
- robotPal[index*4+1] = resourcePal.colors[index].g;
- robotPal[index*4+2] = resourcePal.colors[index].b;
- robotPal[index*4+3] = 0;
+ robotPal[index * 4 + 0] = resourcePal.colors[index].r;
+ robotPal[index * 4 + 1] = resourcePal.colors[index].g;
+ robotPal[index * 4 + 2] = resourcePal.colors[index].b;
+ robotPal[index * 4 + 3] = 0;
}
g_system->setPalette(robotPal, 0, 256);
@@ -194,11 +192,11 @@ void GfxRobot::getFrameOffsets() {
// Plus one so we can assert on this in the calling routine
// The last one should point to end-of-file, unless I'm misunderstanding something
for (int i = 1; i < _frameCount + 1; ++i)
- _imageStart[i] = _imageStart[i-1] + audioEnd[i-1];
+ _imageStart[i] = _imageStart[i - 1] + audioEnd[i - 1];
for (int i = 0; i < _frameCount; ++i)
- _audioStart[i] = _imageStart[i] + videoEnd[i-1];
+ _audioStart[i] = _imageStart[i] + videoEnd[i - 1];
for (int i = 0; i < _frameCount; ++i)
- _audioLen[i] = _imageStart[i+1] - _audioStart[i];
+ _audioLen[i] = _imageStart[i + 1] - _audioStart[i];
delete[] audioEnd;
delete[] videoEnd;
@@ -280,7 +278,7 @@ float GfxRobot::getFrameScaleFactor(int frame) {
byte *videoData = _resourceData + _imageStart[frame];
byte percentage = videoData[3];
- return (float) percentage/100.0;
+ return (float) percentage / 100.0;
}
#endif