aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2009-06-14 13:51:07 +0000
committerEugene Sandulenko2009-06-14 13:51:07 +0000
commitf6f7a1e31a9beb8ca37097098e08c0b263ca57ec (patch)
treee4771a5998a917dc5ffc4952e9bf37451229df99 /engines
parent682c272e53196bbb4c59bcdc3fe8aa1380bfdea1 (diff)
downloadscummvm-rg350-f6f7a1e31a9beb8ca37097098e08c0b263ca57ec.tar.gz
scummvm-rg350-f6f7a1e31a9beb8ca37097098e08c0b263ca57ec.tar.bz2
scummvm-rg350-f6f7a1e31a9beb8ca37097098e08c0b263ca57ec.zip
Whitespce fixes
svn-id: r41514
Diffstat (limited to 'engines')
-rw-r--r--engines/draci/sprite.cpp50
1 files changed, 24 insertions, 26 deletions
diff --git a/engines/draci/sprite.cpp b/engines/draci/sprite.cpp
index 790bc4cc2e..4e17c59c7d 100644
--- a/engines/draci/sprite.cpp
+++ b/engines/draci/sprite.cpp
@@ -32,48 +32,46 @@ namespace Draci {
* Constructor for loading sprites from a raw data buffer, one byte per pixel.
*/
Sprite::Sprite(byte *raw_data, uint16 width, uint16 height, uint16 x, uint16 y,
- bool columnwise) : _width(width), _height(height), _x(x), _y(y), _data(NULL) {
+ bool columnwise) : _width(width), _height(height), _x(x), _y(y), _data(NULL) {
- _data = new byte[width * height];
+ _data = new byte[width * height];
- if (!columnwise) {
- memcpy(_data, raw_data, width * height);
- return;
- }
- else {
- for (uint16 i = 0; i < width; ++i) {
- for (uint16 j = 0; j < height; ++j) {
- _data[j * width + i] = *raw_data++;
- }
+ if (!columnwise) {
+ memcpy(_data, raw_data, width * height);
+ return;
+ } else {
+ for (uint16 i = 0; i < width; ++i) {
+ for (uint16 j = 0; j < height; ++j) {
+ _data[j * width + i] = *raw_data++;
}
}
}
+}
/**
* Constructor for loading sprites from a sprite-formatted buffer, one byte per
* pixel.
*/
Sprite::Sprite(byte *sprite_data, uint16 length, uint16 x, uint16 y,
- bool columnwise) : _x(x), _y(y), _data(NULL) {
+ bool columnwise) : _x(x), _y(y), _data(NULL) {
- Common::MemoryReadStream reader(sprite_data, length);
+ Common::MemoryReadStream reader(sprite_data, length);
- _width = reader.readUint16LE();
- _height = reader.readUint16LE();
+ _width = reader.readUint16LE();
+ _height = reader.readUint16LE();
- _data = new byte[_width * _height];
+ _data = new byte[_width * _height];
- if (!columnwise) {
- reader.read(_data, _width * _height);
- }
- else {
- for (uint16 i = 0; i < _width; ++i) {
- for (uint16 j = 0; j < _height; ++j) {
- _data[j * _width + i] = reader.readByte();
- }
+ if (!columnwise) {
+ reader.read(_data, _width * _height);
+ } else {
+ for (uint16 i = 0; i < _width; ++i) {
+ for (uint16 j = 0; j < _height; ++j) {
+ _data[j * _width + i] = reader.readByte();
}
- }
- }
+ }
+ }
+}
Sprite::~Sprite() {
delete[] _data;