[Scummvm-cvs-logs] SF.net SVN: scummvm: [26303] scummvm/trunk/graphics

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Sun Mar 25 21:51:19 CEST 2007


Revision: 26303
          http://scummvm.svn.sourceforge.net/scummvm/?rev=26303&view=rev
Author:   lordhoto
Date:     2007-03-25 12:51:19 -0700 (Sun, 25 Mar 2007)

Log Message:
-----------
cleanup

Modified Paths:
--------------
    scummvm/trunk/graphics/ilbm.cpp
    scummvm/trunk/graphics/ilbm.h

Modified: scummvm/trunk/graphics/ilbm.cpp
===================================================================
--- scummvm/trunk/graphics/ilbm.cpp	2007-03-25 19:36:24 UTC (rev 26302)
+++ scummvm/trunk/graphics/ilbm.cpp	2007-03-25 19:51:19 UTC (rev 26303)
@@ -27,7 +27,6 @@
 
 namespace Graphics {
 
-
 static char * ID2string(IFF_ID id) {
 	static char str[] = "abcd";
 
@@ -39,7 +38,6 @@
 	return str;
 }
 
-
 #define ID_FORM     MKID_BE('FORM')
 /* EA IFF 85 group identifier */
 #define ID_CAT      MKID_BE('CAT ')
@@ -78,7 +76,7 @@
 /* EA IFF 85 Generic character string chunk */
 #define ID_NAME     MKID_BE('NAME')
 /* EA IFF 85 Generic Name of art, music, etc. chunk */
-#define ID_TEXT     MKID_BE('TEXT'))
+#define ID_TEXT     MKID_BE('TEXT')
 /* EA IFF 85 Generic unformatted ASCII text chunk */
 #define ID_copy     MKID_BE('(c) ')
 /* EA IFF 85 Generic Copyright text chunk */
@@ -181,9 +179,6 @@
 	}
 }
 
-IFFDecoder::~IFFDecoder() {
-}
-
 void IFFDecoder::decode(Surface &surface, byte *&colors) {
 	_surface = &surface;
 	_colors = colors;
@@ -222,12 +217,9 @@
 
 		_chunk.feed();
 		_formChunk.incBytesRead(_chunk.size);
-
 	}
 }
 
-
-
 bool PBMDecoder::isTypeSupported(IFF_ID type) {
 	return type == ID_PBM;
 }
@@ -274,16 +266,6 @@
 
 }
 
-PBMDecoder::PBMDecoder(Common::ReadStream &input) : IFFDecoder(input) {
-
-}
-
-PBMDecoder::~PBMDecoder() {
-
-}
-
-
-
 void decodeILBM(Common::ReadStream &input, Surface &surface, byte *&colors) {
 	IFF_ID typeId;
 	BMHD bitmapHeader;
@@ -292,7 +274,7 @@
 	uint32 colorCount = 0, i, j, si;
 	byte byteRun;
 	byte idx;
-	colors = NULL;
+	colors = 0; 
 	si = 0;
 
 	formChunk.readHeader();
@@ -388,3 +370,4 @@
 }
 
 }	// End of namespace Graphics
+

Modified: scummvm/trunk/graphics/ilbm.h
===================================================================
--- scummvm/trunk/graphics/ilbm.h	2007-03-25 19:36:24 UTC (rev 26302)
+++ scummvm/trunk/graphics/ilbm.h	2007-03-25 19:51:19 UTC (rev 26303)
@@ -26,7 +26,6 @@
 
 void decodeILBM(Common::ReadStream &input, Surface &surface, byte *&colors);
 
-
 typedef uint32 IFF_ID;
 
 struct Chunk {
@@ -94,7 +93,6 @@
 	}
 };
 
-
 struct BMHD {
 	uint16 width, height;
 	uint16 x, y;
@@ -105,15 +103,19 @@
 	uint16 transparentColor;
 	byte xAspect, yAspect;
 	uint16 pageWidth, pageHeight;
+
 	BMHD() {
 		memset(this, 0, sizeof(*this));
 	}
 };
 
-
-
 class IFFDecoder {
+public:
+	IFFDecoder(Common::ReadStream &input);
+	virtual ~IFFDecoder() {}
 
+	virtual void decode(Surface &surface, byte *&colors);
+
 protected:
 	Chunk 	_formChunk;
 	Chunk 	_chunk;
@@ -130,29 +132,17 @@
 
 	virtual void readBMHD();
 	virtual void readCMAP();
-
-public:
-	IFFDecoder(Common::ReadStream &input);
-	virtual ~IFFDecoder();
-
-	virtual void decode(Surface &surface, byte *&colors);
-
 };
 
-
-
 class PBMDecoder : public IFFDecoder {
-
+public:
+	PBMDecoder(Common::ReadStream &input) : IFFDecoder(input) {}
 protected:
 	bool isTypeSupported(IFF_ID type);
 	void readBody();
-
-public:
-	PBMDecoder(Common::ReadStream &input);
-	~PBMDecoder();
-
 };
 
 }	// End of namespace Graphics
 
 #endif
+


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