[Scummvm-cvs-logs] SF.net SVN: scummvm:[33976] scummvm/trunk/engines/cine/gfx.cpp
buddha_ at users.sourceforge.net
buddha_ at users.sourceforge.net
Sun Aug 17 22:53:19 CEST 2008
Revision: 33976
http://scummvm.svn.sourceforge.net/scummvm/?rev=33976&view=rev
Author: buddha_
Date: 2008-08-17 20:53:18 +0000 (Sun, 17 Aug 2008)
Log Message:
-----------
Added some documentation about how data is unpacked in gfxConvertSpriteToRaw (Learned this from trying to implement convertPI1_2 i.e. gfxConvertSpriteToRaw myself to see if that was the problem with the Operation Stealth's labyrinth arcade sequence).
Modified Paths:
--------------
scummvm/trunk/engines/cine/gfx.cpp
Modified: scummvm/trunk/engines/cine/gfx.cpp
===================================================================
--- scummvm/trunk/engines/cine/gfx.cpp 2008-08-17 20:50:50 UTC (rev 33975)
+++ scummvm/trunk/engines/cine/gfx.cpp 2008-08-17 20:53:18 UTC (rev 33976)
@@ -1667,6 +1667,16 @@
}
void gfxConvertSpriteToRaw(byte *dst, const byte *src, uint16 w, uint16 h) {
+ // Output is 4 bits per pixel.
+ // Pixels are in 16 pixel chunks (8 bytes of source per 16 pixels of output).
+ // The source data is interleaved so that
+ // 1st big-endian 16-bit value contains all bit position 0 values for 16 pixels,
+ // 2nd big-endian 16-bit value contains all bit position 1 values for 16 pixels,
+ // 3rd big-endian 16-bit value contains all bit position 2 values for 16 pixels,
+ // 4th big-endian 16-bit value contains all bit position 3 values for 16 pixels.
+ // 1st pixel's bits are in the 16th bits,
+ // 2nd pixel's bits are in the 15th bits,
+ // 3rd pixel's bits are in the 14th bits etc.
for (int y = 0; y < h; ++y) {
for (int x = 0; x < w / 8; ++x) {
for (int bit = 0; bit < 16; ++bit) {
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