diff options
Diffstat (limited to 'engines/draci/sprite.cpp')
-rw-r--r-- | engines/draci/sprite.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/engines/draci/sprite.cpp b/engines/draci/sprite.cpp index 6e4cb8b6b6..cce3f51cfa 100644 --- a/engines/draci/sprite.cpp +++ b/engines/draci/sprite.cpp @@ -54,7 +54,11 @@ static void transformToRows(byte *img, uint16 width, uint16 height) { * 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) : _data(NULL) { + _width = width; + _height = height; + _x = x; + _y = y; _data = new byte[width * height]; @@ -71,8 +75,10 @@ Sprite::Sprite(byte *raw_data, uint16 width, uint16 height, uint16 x, uint16 y, * pixel. */ Sprite::Sprite(byte *sprite_data, uint16 length, uint16 x, uint16 y, - bool columnwise) : _x(x), _y(y), _data(NULL) { - + bool columnwise) : _data(NULL) { + _x = x; + _y = y; + Common::MemoryReadStream reader(sprite_data, length); _width = reader.readUint16LE(); |