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

peres001 at users.sourceforge.net peres001 at users.sourceforge.net
Sat Mar 3 11:10:50 CET 2007


Revision: 25949
          http://scummvm.svn.sourceforge.net/scummvm/?rev=25949&view=rev
Author:   peres001
Date:     2007-03-03 02:10:46 -0800 (Sat, 03 Mar 2007)

Log Message:
-----------
removed common-case code from loadBackground

Modified Paths:
--------------
    scummvm/trunk/engines/parallaction/graphics.cpp
    scummvm/trunk/engines/parallaction/graphics.h

Modified: scummvm/trunk/engines/parallaction/graphics.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/graphics.cpp	2007-03-03 10:01:43 UTC (rev 25948)
+++ scummvm/trunk/engines/parallaction/graphics.cpp	2007-03-03 10:10:46 UTC (rev 25949)
@@ -1155,15 +1155,41 @@
 	return;
 }
 
+void Graphics::parseBackground(Common::SeekableReadStream &stream) {
 
+	stream.read(_palette, PALETTE_SIZE);
 
+	uint16 _si;
+	for (_si = 0; _si < 4; _si++)
+		_bgLayers[_si] = stream.readByte();
 
+	for (_si = 0; _si < 6; _si++) {
+		_palettefx[_si]._timer = stream.readUint16BE();
+		_palettefx[_si]._step = stream.readUint16BE();
+		_palettefx[_si]._flags = stream.readUint16BE();
+		_palettefx[_si]._first = stream.readByte();
+		_palettefx[_si]._last = stream.readByte();
+	}
+
+#if 0
+	uint16 v147;
+	for (v147 = 0; v147 < PALETTE_SIZE; v147++) {
+		byte _al = _palette[v147];
+		_palette[PALETTE_SIZE+v147] = _al / 2;
+	}
+#endif
+
+}
+
+
 void Graphics::loadBackground(const char *filename, Graphics::Buffers buffer) {
 //	printf("Graphics::loadBackground(%s)\n", filename);
 
 	if (!_vm->_archive.openArchivedFile(filename))
 		errorFileNotFound(filename);
 
+	parseBackground(_vm->_archive);
+/*
 	_vm->_archive.read(_palette, PALETTE_SIZE);
 
 	uint16 _si;
@@ -1185,7 +1211,7 @@
 		_palette[PALETTE_SIZE+v147] = _al / 2;
 	}
 #endif
-
+*/
 	memset(_buffers[kPath0], 0, SCREENPATH_WIDTH*SCREEN_HEIGHT);
 	memset(_buffers[kMask0], 0, SCREENMASK_WIDTH*SCREEN_HEIGHT);
 

Modified: scummvm/trunk/engines/parallaction/graphics.h
===================================================================
--- scummvm/trunk/engines/parallaction/graphics.h	2007-03-03 10:01:43 UTC (rev 25948)
+++ scummvm/trunk/engines/parallaction/graphics.h	2007-03-03 10:10:46 UTC (rev 25949)
@@ -24,7 +24,9 @@
 #define PARALLACTION_GRAPHICS_H
 
 #include "parallaction/defs.h"
+#include "common/stream.h"
 
+
 namespace Parallaction {
 
 
@@ -98,6 +100,7 @@
 
 	// location
 	void loadBackground(const char *filename, Graphics::Buffers buffer);
+	void parseBackground(Common::SeekableReadStream &stream);
 	void loadMaskAndPath(const char *filename);
 	uint16 queryPath(uint16 x, uint16 y);
 	int16 queryMask(int16 v);


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