diff options
author | Nicola Mettifogo | 2009-01-07 07:35:11 +0000 |
---|---|---|
committer | Nicola Mettifogo | 2009-01-07 07:35:11 +0000 |
commit | 21fae9d029e1c902c47f59143c1a8f938c694318 (patch) | |
tree | 66cd7707f39f40b0a1bb1d5931a9aa33182a3655 /engines/parallaction/disk_ns.cpp | |
parent | ef05ed7a985062edf978472b76b97ead0946b92b (diff) | |
download | scummvm-rg350-21fae9d029e1c902c47f59143c1a8f938c694318.tar.gz scummvm-rg350-21fae9d029e1c902c47f59143c1a8f938c694318.tar.bz2 scummvm-rg350-21fae9d029e1c902c47f59143c1a8f938c694318.zip |
* moved more mask management to BackgroundInfo
* simplified mask management for client code
* reduced the clutter into graphics.h by moving the implementations of BackgroundInfo, MaskBuffer and PathBuffer to graphics.cpp
* preparation for the full implementation of BRA's PathBuffer
svn-id: r35765
Diffstat (limited to 'engines/parallaction/disk_ns.cpp')
-rw-r--r-- | engines/parallaction/disk_ns.cpp | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/engines/parallaction/disk_ns.cpp b/engines/parallaction/disk_ns.cpp index eedfaf92b7..c24eaf7007 100644 --- a/engines/parallaction/disk_ns.cpp +++ b/engines/parallaction/disk_ns.cpp @@ -457,12 +457,13 @@ void DosDisk_ns::loadBackground(BackgroundInfo& info, const char *filename) { parseBackground(info, *stream); info.bg.create(info.width, info.height, 1); - info.mask.create(info.width, info.height); - info.mask.bigEndian = true; + info._mask = new MaskBuffer; + info._mask->create(info.width, info.height); + info._mask->bigEndian = true; info.path.create(info.width, info.height); Graphics::PackBitsReadStream pbstream(*stream); - unpackBackground(&pbstream, (byte*)info.bg.pixels, info.mask.data, info.path.data); + unpackBackground(&pbstream, (byte*)info.bg.pixels, info._mask->data, info.path.data); delete stream; } @@ -480,9 +481,10 @@ void DosDisk_ns::loadMaskAndPath(BackgroundInfo& info, const char *name) { parseDepths(info, *stream); info.path.create(info.width, info.height); stream->read(info.path.data, info.path.size); - info.mask.create(info.width, info.height); - info.mask.bigEndian = true; - stream->read(info.mask.data, info.mask.size); + info._mask = new MaskBuffer; + info._mask->create(info.width, info.height); + info._mask->bigEndian = true; + stream->read(info._mask->data, info._mask->size); delete stream; } @@ -1049,9 +1051,10 @@ void AmigaDisk_ns::loadMask(BackgroundInfo& info, const char *name) { s->seek(0x126, SEEK_SET); // HACK: skipping IFF/ILBM header should be done by analysis, not magic Graphics::PackBitsReadStream stream(*s); - info.mask.create(info.width, info.height); - stream.read(info.mask.data, info.mask.size); - buildMask(info.mask.data); + info._mask = new MaskBuffer; + info._mask->create(info.width, info.height); + stream.read(info._mask->data, info._mask->size); + buildMask(info._mask->data); delete s; |