[Scummvm-git-logs] scummvm master -> 60ee470a88836bc24f01b91eac69b3f1cd7bdabd

somaen noreply at scummvm.org
Sat May 7 19:58:48 UTC 2022


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:
102a90cfd9 TINSEL: Implement DECINV2 for NOIR
60ee470a88 TINSEL: Implement ADDINV3 (Noir)


Commit: 102a90cfd9d6d06e47f805ce6fb0be476c244f45
    https://github.com/scummvm/scummvm/commit/102a90cfd9d6d06e47f805ce6fb0be476c244f45
Author: Einar Johan Trøan Sømåen (einarjohants at gmail.com)
Date: 2022-05-07T21:57:34+02:00

Commit Message:
TINSEL: Implement DECINV2 for NOIR

Changed paths:
    engines/tinsel/dialogs.cpp
    engines/tinsel/tinlib.cpp


diff --git a/engines/tinsel/dialogs.cpp b/engines/tinsel/dialogs.cpp
index 9386d40350a..ca3a2f4376a 100644
--- a/engines/tinsel/dialogs.cpp
+++ b/engines/tinsel/dialogs.cpp
@@ -5163,9 +5163,21 @@ void Dialogs::idec_inv2(SCNHANDLE text, int MaxContents,
 						int MinWidth, int MinHeight,
 						int StartWidth, int StartHeight,
 						int MaxWidth, int MaxHeight) {
+	int startx = 100;
+	int starty = 100;
+	if (TinselVersion == 3) {
+		MinWidth = 3;
+		MinHeight = 2;
+		StartWidth = 3;
+		StartHeight = 2;
+		MaxWidth = 3;
+		MaxHeight = 2;
+		startx = 0;
+		starty = 50;
+	}
 	idec_inv(INV_2, text, MaxContents, MinWidth, MinHeight,
-	         StartWidth, StartHeight, MaxWidth, MaxHeight,
-	         100, 100, true);
+			 StartWidth, StartHeight, MaxWidth, MaxHeight,
+			 startx, starty, true);
 }
 
 /**
@@ -5180,7 +5192,6 @@ void Dialogs::idec_invMain(SCNHANDLE text, int MaxContents) {
 	idec_inv(INV_4, text, MaxContents,3, 2, 3, 2, 3, 2, 39,
 			72, false);
 
-	warning("TODO: idec_invMain: implement language scene playback");
 	const char *fileName = _vm->getSceneFile(TextLanguage());
 	SCNHANDLE sceneHandle = _vm->_handle->FindLanguageSceneHandle(fileName);
 	DoHailScene(sceneHandle);
diff --git a/engines/tinsel/tinlib.cpp b/engines/tinsel/tinlib.cpp
index c7c990d5f56..c3b466f5b11 100644
--- a/engines/tinsel/tinlib.cpp
+++ b/engines/tinsel/tinlib.cpp
@@ -4466,7 +4466,6 @@ NoirMapping translateNoirLibCode(int libCode, int32 *pp) {
 		debug(7, "%s(0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X)", mapping.name, pp[0], pp[1], pp[2], pp[3], pp[4], pp[5], pp[6], pp[7]);
 		break;
 	case 44: // Changed in Noir
-		warning("TODO: Implement DECINV2 v3");
 		mapping = NoirMapping{"DECINV2", DECINV2, 8};
 		pp -= mapping.numArgs - 1;
 		debug(7, "%s(0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X)", mapping.name, pp[0], pp[1], pp[2], pp[3], pp[4], pp[5], pp[6], pp[7]);


Commit: 60ee470a88836bc24f01b91eac69b3f1cd7bdabd
    https://github.com/scummvm/scummvm/commit/60ee470a88836bc24f01b91eac69b3f1cd7bdabd
Author: Einar Johan Trøan Sømåen (einarjohants at gmail.com)
Date: 2022-05-07T21:58:39+02:00

Commit Message:
TINSEL: Implement ADDINV3 (Noir)

Changed paths:
    engines/tinsel/dialogs.cpp
    engines/tinsel/dialogs.h
    engines/tinsel/tinlib.cpp


diff --git a/engines/tinsel/dialogs.cpp b/engines/tinsel/dialogs.cpp
index ca3a2f4376a..1dd6e74a0b5 100644
--- a/engines/tinsel/dialogs.cpp
+++ b/engines/tinsel/dialogs.cpp
@@ -1464,7 +1464,7 @@ void Dialogs::AddToInventory(int invno, int icon, bool hold) {
 	INV_OBJECT *invObj;
 
 	// Validate trying to add to a legal inventory
-	assert(invno == INV_1 || invno == INV_2 || invno == INV_CONV || invno == INV_OPEN || (invno == INV_DEFAULT && TinselVersion >= 2));
+	assert(invno == INV_1 || invno == INV_2 || invno == INV_3 || invno == INV_CONV || invno == INV_OPEN || (invno == INV_DEFAULT && TinselVersion >= 2));
 
 	if (invno == INV_OPEN) {
 		assert(_inventoryState == ACTIVE_INV && (_activeInv == INV_1 || _activeInv == INV_2)); // addopeninv() with inventry not open
diff --git a/engines/tinsel/dialogs.h b/engines/tinsel/dialogs.h
index 8db8be40656..54252e5b393 100644
--- a/engines/tinsel/dialogs.h
+++ b/engines/tinsel/dialogs.h
@@ -55,6 +55,7 @@ enum {
 	INV_DEFAULT  	= 6,
 
 	// Noir constants
+	INV_3		 	= 3,
 	INV_4 		 	= 4,
 	NUM_INV_V3 	 	= 5,
 	INV_7NOINV 	 	= 7,
diff --git a/engines/tinsel/tinlib.cpp b/engines/tinsel/tinlib.cpp
index c3b466f5b11..5617adf151d 100644
--- a/engines/tinsel/tinlib.cpp
+++ b/engines/tinsel/tinlib.cpp
@@ -624,7 +624,7 @@ static void AddTopic(int icon) {
  */
 static void AddInv(int invno, int object) {
 	// illegal inventory number
-	assert(invno == INV_1 || invno == INV_2 || invno == INV_OPEN || invno == INV_DEFAULT);
+	assert(invno == INV_1 || invno == INV_2 || invno == INV_3 || invno == INV_OPEN || invno == INV_DEFAULT);
 
 	_vm->_dialogs->AddToInventory(invno, object, false);
 }
@@ -5390,7 +5390,7 @@ int CallLibraryRoutine(CORO_PARAM, int operand, int32 *pp, const INT_CONTEXT *pi
 
 	case ADDINV3:
 		// Noir only
-		warning("TODO: Implement ADDINV3");
+		AddInv(INV_3, pp[0]);
 		return -1;
 
 	case ADDNOTEBOOK:




More information about the Scummvm-git-logs mailing list