[Scummvm-cvs-logs] SF.net SVN: scummvm: [26362] scummvm/trunk/engines/parallaction/disk.cpp

peres001 at users.sourceforge.net peres001 at users.sourceforge.net
Sun Apr 1 21:58:54 CEST 2007


Revision: 26362
          http://scummvm.svn.sourceforge.net/scummvm/?rev=26362&view=rev
Author:   peres001
Date:     2007-04-01 12:58:53 -0700 (Sun, 01 Apr 2007)

Log Message:
-----------
Renamed classes for consistency.

Modified Paths:
--------------
    scummvm/trunk/engines/parallaction/disk.cpp

Modified: scummvm/trunk/engines/parallaction/disk.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/disk.cpp	2007-04-01 19:22:15 UTC (rev 26361)
+++ scummvm/trunk/engines/parallaction/disk.cpp	2007-04-01 19:58:53 UTC (rev 26362)
@@ -29,7 +29,7 @@
 
 namespace Parallaction {
 
-class RLEDecoder : public Common::ReadStream {
+class RLEStream : public Common::ReadStream {
 
 	Common::ReadStream *_input;
 
@@ -92,10 +92,10 @@
 	}
 
 public:
-	RLEDecoder(Common::ReadStream *input) : _input(input), _pos(0) {
+	RLEStream(Common::ReadStream *input) : _input(input), _pos(0) {
 	}
 
-	~RLEDecoder() {
+	~RLEStream() {
 	}
 
 	bool eos() const {
@@ -237,7 +237,7 @@
 	uint32 decsize = numFrames * width * height;
 	byte *data = (byte*)malloc(decsize);
 
-	RLEDecoder decoder(&_archive);
+	RLEStream decoder(&_archive);
 	decoder.read(data, decsize);
 
 	return new Cnv(numFrames, width, height, data);
@@ -394,7 +394,7 @@
 	uint16 size = cnv->_width*cnv->_height;
 	cnv->_data0 = (byte*)malloc(size);
 
-	RLEDecoder decoder(&_archive);
+	RLEStream decoder(&_archive);
 	decoder.read(cnv->_data0, size);
 
 	return cnv;
@@ -465,7 +465,7 @@
 
 	byte v144[SCREEN_WIDTH];
 
-	RLEDecoder decoder(&_archive);
+	RLEStream decoder(&_archive);
 
 	for (uint16 i = 0; i < SCREEN_HEIGHT; i++) {
 		decoder.read(v144, SCREEN_WIDTH);
@@ -582,7 +582,7 @@
 } while (0)
 
 
-class DecrunchStream : public Common::SeekableReadStream {
+class PowerPackerStream : public Common::SeekableReadStream {
 
 	SeekableReadStream *_stream;
 	bool				_dispose;
@@ -662,7 +662,7 @@
 	}
 
 public:
-	DecrunchStream(Common::SeekableReadStream &stream) {
+	PowerPackerStream(Common::SeekableReadStream &stream) {
 
 		_dispose = false;
 
@@ -689,7 +689,7 @@
 		_dispose = true;
 	}
 
-	~DecrunchStream() {
+	~PowerPackerStream() {
 		if (_dispose) delete _stream;
 	}
 
@@ -826,7 +826,7 @@
 	if (!_archive.openArchivedFile(path))
 		error("can't find location file '%s'", path);
 
-	DecrunchStream stream(_archive);
+	PowerPackerStream stream(_archive);
 
 	uint32 size = stream.size();
 	char *buf = (char*)malloc(size+1);
@@ -865,7 +865,7 @@
 			error("can't open talk '%s' from archive", path);
 	}
 
-	DecrunchStream stream(_archive);
+	PowerPackerStream stream(_archive);
 	return makeCnv(stream);
 }
 
@@ -878,7 +878,7 @@
 	if (!_archive.openArchivedFile(path))
 		error("can't open objects '%s' from archive", path);
 
-	DecrunchStream stream(_archive);
+	PowerPackerStream stream(_archive);
 	return makeCnv(stream);
 }
 
@@ -902,7 +902,7 @@
 	if (!_archive.openArchivedFile(path))
 		error("can't open frames '%s' from archive", path);
 
-	DecrunchStream stream(_archive);
+	PowerPackerStream stream(_archive);
 	return makeStaticCnv(stream);
 }
 
@@ -939,7 +939,7 @@
 
 		s = &_archive;
 	} else {
-		DecrunchStream *stream = new DecrunchStream(_archive);
+		PowerPackerStream *stream = new PowerPackerStream(_archive);
 		s = stream;
 
 		dispose = true;
@@ -971,7 +971,7 @@
 		s = &_archive;
 	}
 	else {
-		DecrunchStream *stream = new DecrunchStream(_archive);
+		PowerPackerStream *stream = new PowerPackerStream(_archive);
 		s = stream;
 		dispose = true;
 	}
@@ -993,7 +993,7 @@
 	if (!_archive.openArchivedFile(path))
 		error("can't open archived file %s", path);
 
-	DecrunchStream stream(_archive);
+	PowerPackerStream stream(_archive);
 
 	Graphics::Surface surf;
 	byte *pal;
@@ -1023,13 +1023,13 @@
 	byte *pal;
 	char path[PATH_LEN];
 	Graphics::ILBMDecoder *decoder;
-	DecrunchStream *stream;
+	PowerPackerStream *stream;
 
 	sprintf(path, "%s.bkgnd.pp", background);
 	if (!_archive.openArchivedFile(path))
 		error("can't open background file %s", path);
 
-	stream = new DecrunchStream(_archive);
+	stream = new PowerPackerStream(_archive);
 	decoder = new Graphics::ILBMDecoder(*stream);
 	decoder->decode(surf, pal);
 	for (uint32 i = 0; i < PALETTE_SIZE; i++)
@@ -1044,13 +1044,13 @@
 	// FIXME: ILBMDecoder properly reads a LBM file and
 	// outputs a usable 8-bits bitmap, but that's not what
 	// we need here. Masks must be 2-bits bitmaps, so the
-	// following code must be changed to use RLEDecoder
+	// following code must be changed to use RLEStream
 	// to access the raw mask data, and another - not yet
 	// written - filter to properly reorder planes.
 /*	sprintf(path, "%s.mask.pp", background);
 	if (!_archive.openArchivedFile(path))
 		error("can't open mask file %s", path);
-	stream = new DecrunchStream(_archive);
+	stream = new PowerPackerStream(_archive);
 	decoder = new Graphics::ILBMDecoder(*stream);
 	decoder->decode(surf, pal);
 	_vm->_gfx->setMask(static_cast<byte*>(surf.pixels));
@@ -1061,9 +1061,9 @@
 	sprintf(path, "%s.path.pp", background);
 	if (!_archive.openArchivedFile(path))
 		error("can't open path file %s", path);
-	stream = new DecrunchStream(_archive);
+	stream = new PowerPackerStream(_archive);
 	stream->seek(0x120, SEEK_SET);	// skip IFF/ILBM header
-	RLEDecoder stream2(stream);
+	RLEStream stream2(stream);
 	byte *buf = (byte*)malloc(SCREENMASK_WIDTH*SCREEN_HEIGHT);
 	stream2.read(buf, SCREENMASK_WIDTH*SCREEN_HEIGHT);
 	setPath(buf);


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