aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorbjörn Andersson2015-09-27 17:05:16 +0200
committerTorbjörn Andersson2015-09-27 17:05:16 +0200
commit3fa3a7197a031f82079ff48aa2df3d1433c5d3d1 (patch)
tree6af251449436e0ff62fe93f47f83e19be81aa4ad
parentd6aa2494e0b38c318c7a1fe54c4eaaebce823677 (diff)
downloadscummvm-rg350-3fa3a7197a031f82079ff48aa2df3d1433c5d3d1.tar.gz
scummvm-rg350-3fa3a7197a031f82079ff48aa2df3d1433c5d3d1.tar.bz2
scummvm-rg350-3fa3a7197a031f82079ff48aa2df3d1433c5d3d1.zip
SHERLOCK: Remove unnecessary indentation level
-rw-r--r--engines/sherlock/image_file.cpp94
1 files changed, 46 insertions, 48 deletions
diff --git a/engines/sherlock/image_file.cpp b/engines/sherlock/image_file.cpp
index 3d881eb655..1a1f295c5c 100644
--- a/engines/sherlock/image_file.cpp
+++ b/engines/sherlock/image_file.cpp
@@ -961,59 +961,57 @@ void ImageFile3DO::loadFont(Common::SeekableReadStream &stream) {
for (curChar = 33; curChar < header_charCount; curChar++) {
// create frame
- {
- ImageFrame imageFrame;
-
- imageFrame._width = widthTablePtr[curChar];
- imageFrame._height = header_fontHeight;
- imageFrame._paletteBase = 0;
- imageFrame._offset.x = 0;
- imageFrame._offset.y = 0;
- imageFrame._rleEncoded = false;
- imageFrame._size = 0;
-
- // Extract pixels
- imageFrame._frame.create(imageFrame._width, imageFrame._height, Graphics::PixelFormat(2, 5, 6, 5, 0, 11, 5, 0, 0));
- uint16 *dest = (uint16 *)imageFrame._frame.getPixels();
- Common::fill(dest, dest + imageFrame._width * imageFrame._height, 0);
-
- curCharHeightLeft = header_fontHeight;
- while (curCharHeightLeft) {
- curCharWidthLeft = widthTablePtr[curChar];
- curBitsPtr = curBitsLinePtr;
- curBitsLeft = 8;
- curPosX = 0;
-
- while (curCharWidthLeft) {
- if (!(curPosX & 1)) {
- curBits = *curBitsPtr >> 4;
- } else {
- curBits = *curBitsPtr & 0x0F;
- curBitsPtr++;
- }
- // doing this properly is complicated
- // the 3DO has built-in anti-aliasing
- // this here at least results in somewhat readable text
- // TODO: make it better
- if (curBits) {
- curBitsReversed = (curBits >> 3) | ((curBits & 0x04) >> 1) | ((curBits & 0x02) << 1) | ((curBits & 0x01) << 3);
- curBits = 20 - curBits;
- }
-
- byte curIntensity = curBits;
- *dest = (curIntensity << 11) | (curIntensity << 6) | curIntensity;
- dest++;
-
- curCharWidthLeft--;
- curPosX++;
+ ImageFrame imageFrame;
+
+ imageFrame._width = widthTablePtr[curChar];
+ imageFrame._height = header_fontHeight;
+ imageFrame._paletteBase = 0;
+ imageFrame._offset.x = 0;
+ imageFrame._offset.y = 0;
+ imageFrame._rleEncoded = false;
+ imageFrame._size = 0;
+
+ // Extract pixels
+ imageFrame._frame.create(imageFrame._width, imageFrame._height, Graphics::PixelFormat(2, 5, 6, 5, 0, 11, 5, 0, 0));
+ uint16 *dest = (uint16 *)imageFrame._frame.getPixels();
+ Common::fill(dest, dest + imageFrame._width * imageFrame._height, 0);
+
+ curCharHeightLeft = header_fontHeight;
+ while (curCharHeightLeft) {
+ curCharWidthLeft = widthTablePtr[curChar];
+ curBitsPtr = curBitsLinePtr;
+ curBitsLeft = 8;
+ curPosX = 0;
+
+ while (curCharWidthLeft) {
+ if (!(curPosX & 1)) {
+ curBits = *curBitsPtr >> 4;
+ } else {
+ curBits = *curBitsPtr & 0x0F;
+ curBitsPtr++;
}
+ // doing this properly is complicated
+ // the 3DO has built-in anti-aliasing
+ // this here at least results in somewhat readable text
+ // TODO: make it better
+ if (curBits) {
+ curBitsReversed = (curBits >> 3) | ((curBits & 0x04) >> 1) | ((curBits & 0x02) << 1) | ((curBits & 0x01) << 3);
+ curBits = 20 - curBits;
+ }
+
+ byte curIntensity = curBits;
+ *dest = (curIntensity << 11) | (curIntensity << 6) | curIntensity;
+ dest++;
- curCharHeightLeft--;
- curBitsLinePtr += header_bytesPerLine;
+ curCharWidthLeft--;
+ curPosX++;
}
- push_back(imageFrame);
+ curCharHeightLeft--;
+ curBitsLinePtr += header_bytesPerLine;
}
+
+ push_back(imageFrame);
}
// Warning below being used to silence unused variable warnings for now