[Scummvm-cvs-logs] CVS: scummex bomp.cpp,1.1,1.2 descumm.cpp,1.2,1.3 image.cpp,1.13,1.14 sound.cpp,1.4,1.5

Jonathan Gray khalek at users.sourceforge.net
Tue Sep 23 05:57:06 CEST 2003


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

Modified Files:
	bomp.cpp descumm.cpp image.cpp sound.cpp 
Log Message:
warning cleanup, including some shadow fixes that should probably be applied back to descumm, why is the source to descumm included instead of calling an external binary anyway? its going to be a large pain syncing continually...

Index: bomp.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummex/bomp.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- bomp.cpp	21 Sep 2003 23:50:28 -0000	1.1
+++ bomp.cpp	23 Sep 2003 12:56:12 -0000	1.2
@@ -25,12 +25,12 @@
 byte defaultScaleTable[768];
 byte revBitMask[8];
 
-static void bompScaleFuncX(byte *line_buffer, byte *scaling_x_ptr, byte skip, int32 size);
+//static void bompScaleFuncX(byte *line_buffer, byte *scaling_x_ptr, byte skip, int32 size);
 
 static void bompApplyShadow0(const byte *line_buffer, byte *dst, int32 size, byte transparency);
 static void bompApplyShadow1(const byte *shadowPalette, const byte *line_buffer, byte *dst, int32 size, byte transparency);
 static void bompApplyShadow3(const byte *shadowPalette, const byte *line_buffer, byte *dst, int32 size, byte transparency);
-static void bompApplyActorPalette(byte *actorPalette, byte *line_buffer, int32 size);
+//static void bompApplyActorPalette(byte *actorPalette, byte *line_buffer, int32 size);
 
 
 
@@ -163,6 +163,7 @@
 	}
 }
 
+/* FIXME can this be deleted?
 void bompApplyActorPalette(byte *actorPalette, byte *line_buffer, int32 size) {
 	if (actorPalette != 0) {
 		actorPalette[255] = 255;
@@ -191,6 +192,7 @@
 		}
 	}
 }
+*/
 
 /*void Scumm::drawBomp(const BompDrawData &bd, bool mirror) {
 	const byte *src;

Index: descumm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummex/descumm.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- descumm.cpp	19 Sep 2003 19:57:07 -0000	1.2
+++ descumm.cpp	23 Sep 2003 12:56:12 -0000	1.3
@@ -1193,33 +1193,33 @@
 	}
 
 	do {
-		int opcode = get_byte();
-		if (opcode == 0xFF)
+		int subopcode = get_byte();
+		if (subopcode == 0xFF)
 			break;
 
 		if (!first)
 			buf = strecpy(buf, ",");
 		first = 0;
 
-		switch (opcode & 0x1f) {
+		switch (subopcode & 0x1f) {
 		case 0x0:
-			buf = do_tok(buf, "Pos", ((opcode & 0x80) ? A1V : A1W) | ((opcode & 0x40) ? A2V : A2W));
+			buf = do_tok(buf, "Pos", ((subopcode & 0x80) ? A1V : A1W) | ((subopcode & 0x40) ? A2V : A2W));
 			break;
 		case 0x1:
-			buf = do_tok(buf, "Color", ((opcode & 0x80) ? A1V : A1B));
+			buf = do_tok(buf, "Color", ((subopcode & 0x80) ? A1V : A1B));
 			break;
 		case 0x2:
-			buf = do_tok(buf, "Clipped", ((opcode & 0x80) ? A1V : A1W));
+			buf = do_tok(buf, "Clipped", ((subopcode & 0x80) ? A1V : A1W));
 			break;
 		case 0x3:
-			buf = do_tok(buf, "Erase?", ((opcode & 0x80) ? A1V : A1W) | ((opcode & 0x40) ? A2V : A2W));
+			buf = do_tok(buf, "Erase?", ((subopcode & 0x80) ? A1V : A1W) | ((subopcode & 0x40) ? A2V : A2W));
 			break;
 		case 0x4:
 			buf = do_tok(buf, "Center", 0);
 			break;
 		case 0x6:
 			if (GF_UNBLOCKED)
-				buf = do_tok(buf, "Spacing?", ((opcode & 0x80) ? A1V: A1W));
+				buf = do_tok(buf, "Spacing?", ((subopcode & 0x80) ? A1V: A1W));
 			else
 				buf = do_tok(buf, "Left", 0);
 			break;
@@ -1227,7 +1227,7 @@
 			buf = do_tok(buf, "Overhead", 0);
 			break;
 		case 0x8:
-			buf = do_tok(buf, "PlayCDTrack", ((opcode & 0x80) ? A1V : A1W) | ((opcode & 0x40) ? A2V : A2W));
+			buf = do_tok(buf, "PlayCDTrack", ((subopcode & 0x80) ? A1V : A1W) | ((subopcode & 0x40) ? A2V : A2W));
 			break;
 		case 0xF:{
 				buf = strecpy(buf, "Text(\"");
@@ -1249,7 +1249,7 @@
 			}
 			goto exit_proc;
 		default:
-			buf += sprintf(buf, "Unknown%.2X()", opcode);
+			buf += sprintf(buf, "Unknown%.2X()", subopcode);
 			goto exit_proc;
 		}
 	} while (1);
@@ -2399,16 +2399,16 @@
 		break;
 
 	case 0xAE:{
-			byte opcode;
+			byte subopcode;
 			if (IndyFlag)
-				opcode = 2;
+				subopcode = 2;
 			else
-				opcode = get_byte();
+				subopcode = get_byte();
 
-			switch (opcode) {
+			switch (subopcode) {
 			case 0x01:
 			case 0x81:
-				do_tok(buf, "WaitForActor", ((opcode & 0x80) ? A1V : A1B));
+				do_tok(buf, "WaitForActor", ((subopcode & 0x80) ? A1V : A1B));
 				break;
 			case 0x02:
 				do_tok(buf, "WaitForMessage", 0);

Index: image.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummex/image.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- image.cpp	23 Sep 2003 09:05:47 -0000	1.13
+++ image.cpp	23 Sep 2003 12:56:12 -0000	1.14
@@ -41,7 +41,7 @@
 {
 	int addindex = 0;
 	int index = 0;
-	int h;
+	unsigned int h;
 
 	_gui->DisplayImage("Block Palette", 384, 384);
 

Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummex/sound.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- sound.cpp	21 Sep 2003 00:45:16 -0000	1.4
+++ sound.cpp	23 Sep 2003 12:56:12 -0000	1.5
@@ -661,11 +661,11 @@
 		    }
 		} else {
 		    startPos = 1;
-		    for (int i = 0; i < channels; i++) {
-			sByte[i] = *(src++);
-			sDWord1[i] = READ_BE_UINT32(src);
+		    for (int ch = 0; ch < channels; ch++) {
+			sByte[ch] = *(src++);
+			sDWord1[ch] = READ_BE_UINT32(src);
 			src += 4;
-			sDWord2[i] = READ_BE_UINT32(src);
+			sDWord2[ch] = READ_BE_UINT32(src);
 			src += 4;
 		    }
 		}
@@ -809,19 +809,19 @@
     if (bits == 12) {
 	s_size = (size * 4) / 3 + 3;
 	buffer = (byte *) malloc(s_size+44);
-	uint32 l = 0, r = 44, tmp;
+	uint32 l = 0, ra = 44, tmp;
 	for (; l < size; l += 3) {
 	    tmp = (ptr[l + 1] & 0x0f) << 8;
 	    tmp = (tmp | ptr[l + 0]) << 4;
 	    tmp -= 0x8000;
-	    buffer[r++] = (uint8) (tmp & 0xff);
-	    buffer[r++] = (uint8) ((tmp >> 8) & 0xff);
+	    buffer[ra++] = (uint8) (tmp & 0xff);
+	    buffer[ra++] = (uint8) ((tmp >> 8) & 0xff);
 
 	    tmp = (ptr[l + 1] & 0xf0) << 4;
 	    tmp = (tmp | ptr[l + 2]) << 4;
 	    tmp -= 0x8000;
-	    buffer[r++] = (uint8) (tmp & 0xff);
-	    buffer[r++] = (uint8) ((tmp >> 8) & 0xff);
+	    buffer[ra++] = (uint8) (tmp & 0xff);
+	    buffer[ra++] = (uint8) ((tmp >> 8) & 0xff);
 	}
 	bits = 16;
     } else {





More information about the Scummvm-git-logs mailing list