From 6b4484472b79dc7ea7d1ce545a28fba7d3b7696f Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 30 Jul 2005 21:11:48 +0000 Subject: Remove trailing whitespaces. svn-id: r18604 --- kyra/palette.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'kyra/palette.cpp') diff --git a/kyra/palette.cpp b/kyra/palette.cpp index 9136666634..b1099f72dc 100644 --- a/kyra/palette.cpp +++ b/kyra/palette.cpp @@ -31,39 +31,39 @@ Palette::Palette(uint8* data, uint32 size) { if (!data) { error("resource created without data"); } - + if (size != 768) { Common::MemoryReadStream datastream(data, size); - + datastream.readSint32LE(); int imageSize = datastream.readSint16LE(); - + if (imageSize != 768) { error("decompresed palette is not 768 byte long!"); } - + // lets uncompress this palette :) _palette = new uint8[imageSize]; assert(_palette); - + // made decompression if (Compression::decode80(data + 10, _palette) != 768) { error("decode80 decompressesize != 768 bytes"); } - + delete [] data; data = _palette; } - + // hmm.. common/system.h Docu is wrong or SDL Backend has a bug :) // a palette should have this order: // R1-G1-B1-A1-R2-G2-B2-A2-... // so we need 4 bytes per color _palette = new uint8[256 * 4]; - + uint8* currentpossrc = &data[0]; uint8* currentposdst = &_palette[0]; - + // creates the original pallette (only first 6 bits are used) for (uint32 i = 0; i < 256; i++) { currentposdst[0] = currentpossrc[0] << 2; @@ -72,7 +72,7 @@ Palette::Palette(uint8* data, uint32 size) { currentpossrc += 3; currentposdst += 4; } - + delete [] data; } -- cgit v1.2.3