SHERLOCK: Whitespace fixes

This commit is contained in:
Paul Gilbert 2015-05-12 19:50:16 -04:00 committed by Willem Jan Palenstijn
parent f12fe46fad
commit 95212c5f02
5 changed files with 23 additions and 23 deletions

View File

@ -37,7 +37,7 @@ private:
protected:
virtual void addDirtyRect(const Common::Rect &r) {}
public:
Surface(uint16 width, uint16 height);
Surface(uint16 width, uint16 height);
Surface();
virtual ~Surface();

View File

@ -32,11 +32,11 @@ namespace Sherlock {
// People definitions
enum PeopleId {
PLAYER = 0,
AL = 0,
PEG = 1,
NUM_OF_PEOPLE = 2, // Holmes and Watson
MAX_PEOPLE = 66 // Total of all NPCs
PLAYER = 0,
AL = 0,
PEG = 1,
NUM_OF_PEOPLE = 2, // Holmes and Watson
MAX_PEOPLE = 66 // Total of all NPCs
};
// Animation sequence identifiers for characters

View File

@ -294,7 +294,7 @@ void ImageFile::load(Common::SeekableReadStream &stream, bool skipPalette, bool
loadPalette(stream);
int streamSize = stream.size();
while (stream.pos() < streamSize) {
while (stream.pos() < streamSize) {
ImageFrame frame;
frame._width = stream.readUint16LE() + 1;
frame._height = stream.readUint16LE() + 1;
@ -309,30 +309,30 @@ void ImageFile::load(Common::SeekableReadStream &stream, bool skipPalette, bool
frame._rleEncoded = stream.readByte() == 1;
frame._offset.x = stream.readByte();
}
frame._offset.y = stream.readByte();
frame._offset.y = stream.readByte();
frame._rleEncoded = !skipPalette && frame._rleEncoded;
if (frame._paletteBase) {
// Nibble packed frame data
frame._size = (frame._width * frame._height) / 2;
} else if (frame._rleEncoded) {
// this size includes the header size, which we subtract
// This size includes the header size, which we subtract
frame._size = stream.readUint16LE() - 11;
frame._rleMarker = stream.readByte();
} else {
} else {
// Uncompressed data
frame._size = frame._width * frame._height;
}
}
// Load data for frame and decompress it
byte *data = new byte[frame._size];
stream.read(data, frame._size);
decompressFrame(frame, data);
decompressFrame(frame, data);
delete[] data;
push_back(frame);
}
}
}
/**
@ -372,17 +372,17 @@ void ImageFile::decompressFrame(ImageFrame &frame, const byte *src) {
}
} else if (frame._rleEncoded) {
// RLE encoded
byte *dst = (byte *)frame._frame.getPixels();
byte *dst = (byte *)frame._frame.getPixels();
int frameSize = frame._width * frame._height;
while (frameSize > 0) {
if (*src == frame._rleMarker) {
byte rleColor = src[1];
byte rleCount = src[2];
src += 3;
frameSize -= rleCount;
while (rleCount--)
*dst++ = rleColor;
byte rleColor = src[1];
byte rleCount = src[2];
src += 3;
frameSize -= rleCount;
while (rleCount--)
*dst++ = rleColor;
} else {
*dst++ = *src++;
--frameSize;

View File

@ -81,7 +81,7 @@ const int MAP_TRANSLATE[NUM_PLACES] = {
};
const byte MAP_SEQUENCES[3][MAX_FRAME] = {
{ 1, 1, 2, 3, 4, 0 }, // Overview Still
{ 1, 1, 2, 3, 4, 0 }, // Overview Still
{ 5, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 0 },
{ 5, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 0 }
};

View File

@ -33,8 +33,8 @@
namespace Sherlock {
#define SCENES_COUNT 63
#define MAX_ZONES 40
#define INFO_LINE 140
#define MAX_ZONES 40
#define INFO_LINE 140
class SherlockEngine;