[Scummvm-cvs-logs] scummvm master -> 344d6bc2dad335527085767dfa0734478e658747

bluegr bluegr at gmail.com
Tue Dec 11 03:05:02 CET 2012


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
f23e7a246c TINSEL: Merge the different TinselV0/V1 graphics code handlers
344d6bc2da TINSEL: An additional endianess fix for DW1 Mac


Commit: f23e7a246c900870dadf2ed764b22fd1b1795c03
    https://github.com/scummvm/scummvm/commit/f23e7a246c900870dadf2ed764b22fd1b1795c03
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2012-12-10T18:03:22-08:00

Commit Message:
TINSEL: Merge the different TinselV0/V1 graphics code handlers

Changed paths:
    engines/tinsel/graphics.cpp



diff --git a/engines/tinsel/graphics.cpp b/engines/tinsel/graphics.cpp
index 8533be4..876d182 100644
--- a/engines/tinsel/graphics.cpp
+++ b/engines/tinsel/graphics.cpp
@@ -872,53 +872,31 @@ void DrawObject(DRAWOBJECT *pObj) {
 				(pObj->flags & DMA_FLIPH), packType);
 		}
 
-	} else if (TinselV1PSX) {
-		// Tinsel v1 decoders, PSX specific variants
+	} else {	// TinselV1
 		switch (typeId) {
 		case 0x01:
 		case 0x41:
-			PsxDrawTiles(pObj, srcPtr, destPtr, typeId >= 0x40, psxFourBitClut, psxSkipBytes, psxMapperTable, true);
-			break;
-		case 0x08:
-		case 0x48:
-			PsxDrawTiles(pObj, srcPtr, destPtr, typeId >= 0x40, psxFourBitClut, psxSkipBytes, psxMapperTable, false);
-			break;
-		case 0x84:
-		case 0xC4:
-			// WrtTrans with/without clipping
-			WrtTrans(pObj, destPtr, typeId == 0xC4);
-			break;
-		case 0x04:
-		case 0x44:
-			// WrtConst with/without clipping
-			WrtConst(pObj, destPtr, typeId == 0x44);
-			break;
-		default:
-			error("Unknown drawing type %d", typeId);
-		}
-	} else if (TinselV1Mac) {
-		// Tinsel v1 Mac decoders
-		// TODO: Finish this
-		switch (typeId) {
-		case 0x01:
-		case 0x41:
-			// TODO
+			if (TinselV1PSX) {
+				PsxDrawTiles(pObj, srcPtr, destPtr, typeId >= 0x40, psxFourBitClut, psxSkipBytes, psxMapperTable, true);
+			} else if (TinselV1Mac) {
+				// TODO
+			} else if (TinselV1) {
+				WrtNonZero(pObj, srcPtr, destPtr, typeId >= 0x40);
+			} else if (TinselV0) {
+				t0WrtNonZero(pObj, srcPtr, destPtr, typeId >= 0x40);
+			} 
 			break;
 		case 0x08:
 		case 0x48:
-			WrtAll(pObj, srcPtr, destPtr, typeId >= 0x40);
-			break;
-		default:
-			error("Unknown drawing type %d", typeId);
-		}
-	} else if (TinselV1) {
-		// Tinsel v1 decoders
-		switch (typeId) {
-		case 0x01:
-		case 0x08:
-		case 0x41:
-		case 0x48:
-			WrtNonZero(pObj, srcPtr, destPtr, typeId >= 0x40);
+			if (TinselV1PSX) {
+				PsxDrawTiles(pObj, srcPtr, destPtr, typeId >= 0x40, psxFourBitClut, psxSkipBytes, psxMapperTable, false);
+			} else if (TinselV1Mac) {
+				WrtAll(pObj, srcPtr, destPtr, typeId >= 0x40);
+			} else if (TinselV1) {
+				WrtNonZero(pObj, srcPtr, destPtr, typeId >= 0x40);
+			} else if (TinselV0) {
+				WrtAll(pObj, srcPtr, destPtr, typeId >= 0x40);
+			}
 			break;
 		case 0x04:
 		case 0x44:
@@ -927,26 +905,12 @@ void DrawObject(DRAWOBJECT *pObj) {
 			break;
 		case 0x84:
 		case 0xC4:
-			// WrtTrans with/without clipping
-			WrtTrans(pObj, destPtr, typeId == 0xC4);
-			break;
-		default:
-			error("Unknown drawing type %d", typeId);
-		}
-	} else {
-		// Tinsel v0 decoders
-		switch (typeId) {
-		case 0x01:
-		case 0x41:
-			t0WrtNonZero(pObj, srcPtr, destPtr, typeId >= 0x40);
-			break;
-		case 0x08:
-		case 0x48:
-			WrtAll(pObj, srcPtr, destPtr, typeId >= 0x40);
-			break;
-		case 0x84:
-		case 0xC4:
-			WrtTrans(pObj, destPtr, (typeId & 0x40) != 0);
+			if (!TinselV0) {
+				// WrtTrans with/without clipping
+				WrtTrans(pObj, destPtr, typeId == 0xC4);
+			} else {
+				WrtTrans(pObj, destPtr, (typeId & 0x40) != 0);
+			}
 			break;
 		default:
 			error("Unknown drawing type %d", typeId);


Commit: 344d6bc2dad335527085767dfa0734478e658747
    https://github.com/scummvm/scummvm/commit/344d6bc2dad335527085767dfa0734478e658747
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2012-12-10T18:04:04-08:00

Commit Message:
TINSEL: An additional endianess fix for DW1 Mac

This will also need testing on a BE system

Changed paths:
    engines/tinsel/object.cpp



diff --git a/engines/tinsel/object.cpp b/engines/tinsel/object.cpp
index c9a392f..cbf1c86 100644
--- a/engines/tinsel/object.cpp
+++ b/engines/tinsel/object.cpp
@@ -494,7 +494,7 @@ OBJECT *RectangleObject(SCNHANDLE hPal, int color, int width, int height) {
 	OBJECT *pRect = InitObject(&rectObj);
 
 	// allocate a palette for this object
-	pPalQ = AllocPalette(hPal);
+	pPalQ = AllocPalette(FROM_32(hPal));
 
 	// make sure palette allocated
 	assert(pPalQ != NULL);






More information about the Scummvm-git-logs mailing list