[Scummvm-cvs-logs] SF.net SVN: scummvm: [24242] scummvm/trunk/engines/agos

kirben at users.sourceforge.net kirben at users.sourceforge.net
Mon Oct 9 03:56:59 CEST 2006


Revision: 24242
          http://svn.sourceforge.net/scummvm/?rev=24242&view=rev
Author:   kirben
Date:     2006-10-08 18:56:51 -0700 (Sun, 08 Oct 2006)

Log Message:
-----------
Add conversion for planar graphics in Amiga version of Elvira 1/2 and Waxworks

Modified Paths:
--------------
    scummvm/trunk/engines/agos/agos.h
    scummvm/trunk/engines/agos/items.cpp
    scummvm/trunk/engines/agos/module.mk
    scummvm/trunk/engines/agos/res.cpp

Modified: scummvm/trunk/engines/agos/agos.h
===================================================================
--- scummvm/trunk/engines/agos/agos.h	2006-10-08 22:47:29 UTC (rev 24241)
+++ scummvm/trunk/engines/agos/agos.h	2006-10-09 01:56:51 UTC (rev 24242)
@@ -1072,6 +1072,7 @@
 	void oe1_clearUserItem();
 	void oe1_findMaster();
 	void oe1_nextMaster();
+	void oe1_menu();
 	void oe1_setTime();
 	void oe1_ifTime();
 	void oe1_bitClear();
@@ -1240,6 +1241,7 @@
 	byte *getBackGround();
 	byte *getScaleBuf();
 
+	void convertAmiga(byte *srcBuf, int32 flength);
 	void loadVGAFile(uint id, uint type);
 	void loadSimonVGAFile(uint id);
 

Modified: scummvm/trunk/engines/agos/items.cpp
===================================================================
--- scummvm/trunk/engines/agos/items.cpp	2006-10-08 22:47:29 UTC (rev 24241)
+++ scummvm/trunk/engines/agos/items.cpp	2006-10-09 01:56:51 UTC (rev 24242)
@@ -290,6 +290,7 @@
 	op[230] = &AGOSEngine::o_window;
 	op[231] = &AGOSEngine::o_cls;
 	op[232] = &AGOSEngine::o_closeWindow;
+	op[233] = &AGOSEngine::oe1_menu;
 
 	op[235] = &AGOSEngine::o_addBox;
 	op[236] = &AGOSEngine::o_delBox;
@@ -2027,6 +2028,11 @@
 		_objectItem = nextMaster(levelOf(me()), item, ad, no);
 }
 
+void AGOSEngine::oe1_menu() {
+	// 233: agos menu
+	// Used by Amiga demo
+}
+
 void AGOSEngine::oe1_bitClear() {
 	// 251: set bit off
 	int var = getVarOrWord();

Modified: scummvm/trunk/engines/agos/module.mk
===================================================================
--- scummvm/trunk/engines/agos/module.mk	2006-10-08 22:47:29 UTC (rev 24241)
+++ scummvm/trunk/engines/agos/module.mk	2006-10-09 01:56:51 UTC (rev 24242)
@@ -17,6 +17,7 @@
 	midiparser_s1d.o \
 	oracle.o \
 	res.o \
+	res_ami.o \
 	rooms.o \
 	saveload.o \
 	sound.o \

Modified: scummvm/trunk/engines/agos/res.cpp
===================================================================
--- scummvm/trunk/engines/agos/res.cpp	2006-10-08 22:47:29 UTC (rev 24241)
+++ scummvm/trunk/engines/agos/res.cpp	2006-10-09 01:56:51 UTC (rev 24242)
@@ -669,10 +669,14 @@
 			if (getFeatures() & GF_TALKIE) {
 				sprintf(filename, "%.3d%d.out", id, type);
 			} else if (getGameType() == GType_ELVIRA1 || getGameType() == GType_ELVIRA2) {
-				if (getGameId() == GID_ELVIRA1DEMO)
-					sprintf(filename, "%.1d%d.out", id, type);
-				else 
+				if (getGameId() == GID_ELVIRA1DEMO) {
+					if (id == 27)
+						sprintf(filename, "K%d.out", type);
+					else
+						sprintf(filename, "%.1d%d.out", id, type);
+				} else {
 					sprintf(filename, "%.2d%d.pkd", id, type);
+				}
 			} else {
 				sprintf(filename, "%.3d%d.pkd", id, type);
 			}
@@ -693,8 +697,15 @@
 					error("loadVGAFile: Read failed");
 
 				dstSize = READ_BE_UINT32(srcBuffer + srcSize - 4);
-				dst = allocBlock (dstSize + extraBuffer);
-				decrunchFile(srcBuffer, dst, srcSize);
+				if (type == 2 && dstSize != 64800) {
+					dst = (byte *)malloc(dstSize);
+					decrunchFile(srcBuffer, dst, srcSize);
+					convertAmiga(dst, dstSize);
+					free(dst);
+				} else {
+					dst = allocBlock (dstSize + extraBuffer);
+					decrunchFile(srcBuffer, dst, srcSize);
+				}
 				free(srcBuffer);
 			} else {
 				dst = allocBlock(dstSize + extraBuffer);


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