Skip to content

Commit

Permalink
SHERLOCK: Whitespace fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dreammaster committed May 12, 2015
1 parent 1e8c297 commit cf229ce
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion engines/sherlock/graphics.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class Surface : public Graphics::Surface {
protected:
virtual void addDirtyRect(const Common::Rect &r) {}
public:
Surface(uint16 width, uint16 height);
Surface(uint16 width, uint16 height);
Surface();
virtual ~Surface();

Expand Down
10 changes: 5 additions & 5 deletions engines/sherlock/people.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
28 changes: 14 additions & 14 deletions engines/sherlock/resources.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
}
}
}

/**
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion engines/sherlock/scalpel/scalpel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
};
Expand Down
4 changes: 2 additions & 2 deletions engines/sherlock/scene.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit cf229ce

Please sign in to comment.