[Scummvm-cvs-logs] CVS: scummex blocks.h,1.2,1.3 resource.cpp,1.3,1.4 resource.h,1.2,1.3 wxwindows.cpp,1.2,1.3

Adrien Mercier yoshizf at users.sourceforge.net
Thu Sep 18 13:52:15 CEST 2003


Update of /cvsroot/scummvm/scummex
In directory sc8-pr-cvs1:/tmp/cvs-serv25120

Modified Files:
	blocks.h resource.cpp resource.h wxwindows.cpp 
Log Message:
Added basic support for some SOUN sub-blocks

Index: blocks.h
===================================================================
RCS file: /cvsroot/scummvm/scummex/blocks.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- blocks.h	18 Sep 2003 19:37:14 -0000	1.2
+++ blocks.h	18 Sep 2003 20:50:55 -0000	1.3
@@ -130,5 +130,8 @@
 	SAUD,
 	STRK,
 	SDAT,
-	XPAL
+	XPAL,
+	ADL,
+	SPK,
+	ROL
 };

Index: resource.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummex/resource.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- resource.cpp	18 Sep 2003 19:37:14 -0000	1.3
+++ resource.cpp	18 Sep 2003 20:50:56 -0000	1.4
@@ -356,13 +356,6 @@
 			index++;
 			break;
 
-		case SOUN:
-			_blockTable[index].blockSize = _input.readUint32BE();
-			_input.seek(_blockTable[index].offset + _blockTable[index].blockSize, SEEK_SET);
-			_gui->add_tree_elements(_blockTable[index].blockName, index, level, _blockTable[index].blockTypeID);
-			index++;
-			break;
-			
 		case IMHD:
 			_blockTable[index].blockSize = _input.readUint32BE();
 			_blockTable[index].width = _input.readUint32LE();
@@ -645,7 +638,6 @@
 		case LFLF:
 		case ROOM:
 		case OBCD:
-		case MAP:
 		case IM00:
 		case IM01:
 		case IM02:
@@ -660,7 +652,32 @@
 		case PALS:
 		case WRAP:
 		case OBIM:
+		case SOUN:
+			_blockTable[index].blockSize = _input.readUint32BE();
+			_gui->add_tree_elements(_blockTable[index].blockName, index, level, _blockTable[index].blockTypeID);
+			bufindex = index;
+			index++;
+			level++;
+			index = searchBlocks(_blockTable, _input, index, level, _blockTable[index-1].blockSize + _blockTable[index-1].offset);
+			_input.seek(_blockTable[bufindex].offset + _blockTable[bufindex].blockSize, SEEK_SET);
+			break;
+
+		case MAP:
+			_blockTable[index].blockSize = _input.readUint32BE();
+			_gui->add_tree_elements(_blockTable[index].blockName, index, level, _blockTable[index].blockTypeID);
+			index++;
+			level++;
+			index = searchBlocks(_blockTable, _input, index, level, _blockTable[index-1].blockSize + _blockTable[index-1].offset);
+			break;
+
+		case SOU:
 			_blockTable[index].blockSize = _input.readUint32BE();
+			if (_blockTable[index].blockSize == 0) {
+				stopflag = 1;
+				_gui->add_tree_elements(_blockTable[index].blockName, index, level, _blockTable[index].blockTypeID);
+				index++;
+				break;
+			}
 			_gui->add_tree_elements(_blockTable[index].blockName, index, level, _blockTable[index].blockTypeID);
 			bufindex = index;
 			index++;
@@ -710,12 +727,21 @@
 		case TRES:
 		case STRK:
 		case XPAL:
+		case ADL:
+		case ROL:
 			_blockTable[index].blockSize = _input.readUint32BE() + 8;
 			_input.seek(_blockTable[index].offset + _blockTable[index].blockSize, SEEK_SET);
 			_gui->add_tree_elements(_blockTable[index].blockName, index, level, _blockTable[index].blockTypeID);
 			index++;
 			break;
 
+		case SPK:
+			_blockTable[index].blockSize = _input.readUint32BE() + 8;
+			stopflag = 1;
+			_gui->add_tree_elements(_blockTable[index].blockName, index, level, _blockTable[index].blockTypeID);
+			index++;
+			break;
+
 		case FOBJ:
 			_blockTable[index].blockSize = _input.readUint32BE() + 8;
 			
@@ -821,7 +847,7 @@
 
 int Resource::getBlockType(char *tag) {
 	
-	for (int i=0; i<110; i++) {
+	for (int i=0; i<113; i++) {
 		if(strstr(tag, blocksInfo[i].name)) {
 			return blocksInfo[i].id;
 		}

Index: resource.h
===================================================================
RCS file: /cvsroot/scummvm/scummex/resource.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- resource.h	18 Sep 2003 19:37:14 -0000	1.2
+++ resource.h	18 Sep 2003 20:50:56 -0000	1.3
@@ -171,8 +171,10 @@
 	{106, "SAUD", "", 0, "", 24},
 	{107, "STRK", "", 0, "", 24},
 	{108, "SDAT", "", 0, "", 24},
-	{109, "XPAL", "", 0, "", 34}
-
+	{109, "XPAL", "", 0, "", 34},
+	{110, "ADL ", "", 1, "help/specADL.html", 31},
+	{111, "SPK ", "", 1, "help/specSPK.html", 31},
+	{112, "ROL ", "", 1, "help/specROL.html", 31}
 };
 
 const struct blockInfo oldBlocksInfo[] = {

Index: wxwindows.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummex/wxwindows.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- wxwindows.cpp	18 Sep 2003 19:37:14 -0000	1.2
+++ wxwindows.cpp	18 Sep 2003 20:50:56 -0000	1.3
@@ -1075,6 +1075,12 @@
 			bigIconBitmap = wxBitmap(xpm_24_big);
 			break;
 
+		case ADL:
+		case SPK:
+		case ROL:
+			bigIconBitmap = wxBitmap(xpm_31_big);
+			break;
+
 		default:
 			bigIconBitmap = wxBitmap(xpm_47_big);
 			break;





More information about the Scummvm-git-logs mailing list