[Scummvm-cvs-logs] SF.net SVN: scummvm:[39583] scummvm/trunk/engines/parallaction
peres001 at users.sourceforge.net
peres001 at users.sourceforge.net
Sat Mar 21 15:58:36 CET 2009
Revision: 39583
http://scummvm.svn.sourceforge.net/scummvm/?rev=39583&view=rev
Author: peres001
Date: 2009-03-21 14:58:36 +0000 (Sat, 21 Mar 2009)
Log Message:
-----------
Extended the IFF parser to handle 1 and 5 bits deep images.
Modified Paths:
--------------
scummvm/trunk/engines/parallaction/iff.cpp
scummvm/trunk/engines/parallaction/iff.h
Modified: scummvm/trunk/engines/parallaction/iff.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/iff.cpp 2009-03-21 14:30:25 UTC (rev 39582)
+++ scummvm/trunk/engines/parallaction/iff.cpp 2009-03-21 14:58:36 UTC (rev 39583)
@@ -161,10 +161,10 @@
byte *ILBMDecoder::getBitmap(uint32 numPlanes, bool packPlanes) {
assert(_bodySize != (uint32)-1);
- assert(numPlanes == 2 || numPlanes == 4 || numPlanes == 8);
+ assert(numPlanes == 1 || numPlanes == 2 || numPlanes == 4 || numPlanes == 5 || numPlanes == 8);
numPlanes = MIN(numPlanes, (uint32)_header.depth);
- if (numPlanes == 8) {
+ if (numPlanes > 4) {
packPlanes = false;
}
@@ -246,6 +246,9 @@
if (!packPlanes) {
out[x] = pix;
} else
+ if (nPlanes == 1) {
+ out[x/8] |= (pix << (x & 7));
+ } else
if (nPlanes == 2) {
out[x/4] |= (pix << ((x & 3) << 1));
} else
Modified: scummvm/trunk/engines/parallaction/iff.h
===================================================================
--- scummvm/trunk/engines/parallaction/iff.h 2009-03-21 14:30:25 UTC (rev 39582)
+++ scummvm/trunk/engines/parallaction/iff.h 2009-03-21 14:58:36 UTC (rev 39583)
@@ -64,14 +64,17 @@
class ILBMDecoder {
Common::SeekableReadStream *_in;
- IFFParser _parser;
+ bool _disposeStream;
+
+ void planarToChunky(byte *out, uint32 width, byte *in, uint32 planeWidth, uint32 nPlanes, bool packPlanes);
+
+protected:
+ IFFParser _parser;
Graphics::BMHD _header;
bool _hasHeader;
uint32 _bodySize;
uint32 _paletteSize;
- bool _disposeStream;
- void planarToChunky(byte *out, uint32 width, byte *in, uint32 planeWidth, uint32 nPlanes, bool packPlanes);
public:
ILBMDecoder(Common::SeekableReadStream *input, bool disposeStream = false);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list