[Scummvm-cvs-logs] SF.net SVN: scummvm: [31531] scummvm/trunk/engines/parallaction
peres001 at users.sourceforge.net
peres001 at users.sourceforge.net
Thu Apr 17 11:30:05 CEST 2008
Revision: 31531
http://scummvm.svn.sourceforge.net/scummvm/?rev=31531&view=rev
Author: peres001
Date: 2008-04-17 02:30:04 -0700 (Thu, 17 Apr 2008)
Log Message:
-----------
Cleanup of background loading for BRA.
Modified Paths:
--------------
scummvm/trunk/engines/parallaction/disk.h
scummvm/trunk/engines/parallaction/disk_br.cpp
Modified: scummvm/trunk/engines/parallaction/disk.h
===================================================================
--- scummvm/trunk/engines/parallaction/disk.h 2008-04-17 07:21:47 UTC (rev 31530)
+++ scummvm/trunk/engines/parallaction/disk.h 2008-04-17 09:30:04 UTC (rev 31531)
@@ -240,8 +240,6 @@
BackgroundInfo _backgroundTemp;
Sprites* createSprites(const char *name);
- void unpackFrame(byte *dst, byte *src, uint16 planeSize);
- void unpackBitmap(byte *dst, byte *src, uint16 numFrames, uint16 bytesPerPlane, uint16 height);
Font *createFont(const char *name, Common::SeekableReadStream &stream);
void loadMask(BackgroundInfo& info, const char *name);
void loadBackground(BackgroundInfo& info, const char *name);
Modified: scummvm/trunk/engines/parallaction/disk_br.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/disk_br.cpp 2008-04-17 07:21:47 UTC (rev 31530)
+++ scummvm/trunk/engines/parallaction/disk_br.cpp 2008-04-17 09:30:04 UTC (rev 31531)
@@ -409,51 +409,8 @@
}
-#define NUM_PLANES 5
/*
- unpackFrame transforms images from 5-bitplanes format to
- 8-bit color-index mode
-*/
-void AmigaDisk_br::unpackFrame(byte *dst, byte *src, uint16 planeSize) {
-
- byte s0, s1, s2, s3, s4, mask, t0, t1, t2, t3, t4;
-
- for (uint32 j = 0; j < planeSize; j++) {
- s0 = src[j];
- s1 = src[j+planeSize];
- s2 = src[j+planeSize*2];
- s3 = src[j+planeSize*3];
- s4 = src[j+planeSize*4];
-
- for (uint32 k = 0; k < 8; k++) {
- mask = 1 << (7 - k);
- t0 = (s0 & mask ? 1 << 0 : 0);
- t1 = (s1 & mask ? 1 << 1 : 0);
- t2 = (s2 & mask ? 1 << 2 : 0);
- t3 = (s3 & mask ? 1 << 3 : 0);
- t4 = (s4 & mask ? 1 << 4 : 0);
- *dst++ = t0 | t1 | t2 | t3 | t4;
- }
-
- }
-
-}
-
-// FIXME: no mask is loaded
-void AmigaDisk_br::unpackBitmap(byte *dst, byte *src, uint16 numFrames, uint16 bytesPerPlane, uint16 height) {
- uint16 planeSize = bytesPerPlane * height;
-
- for (uint32 i = 0; i < numFrames; i++) {
- unpackFrame(dst, src, planeSize);
- src += planeSize * NUM_PLANES;
- dst += planeSize * 8;
- }
-}
-
-#undef NUM_PLANES
-
-/*
FIXME: mask values are not computed correctly for level 1 and 2
NOTE: this routine is only able to build masks for Nippon Safes, since mask widths are hardcoded
@@ -552,7 +509,7 @@
info.height = info.bg.h;
byte *p = pal;
- for (i = 0; i < 32; i++) {
+ for (i = 0; i < 16; i++) {
byte r = *p >> 2;
p++;
byte g = *p >> 2;
@@ -564,12 +521,7 @@
free(pal);
- for (i = 0; i < 6; i++) {
- info.setPaletteRange(i, ranges[i]);
- }
-
return;
-
}
void AmigaDisk_br::loadMask(BackgroundInfo& info, const char *name) {
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