[Scummvm-git-logs] scummvm master -> 814e0af73b16191ac05a68b04ffdb8d36517dbb1

aquadran noreply at scummvm.org
Sat Jun 25 22:03:00 UTC 2022


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

Summary:
814e0af73b WINTERMUTE: WME3D: Merge code into one opcode as original


Commit: 814e0af73b16191ac05a68b04ffdb8d36517dbb1
    https://github.com/scummvm/scummvm/commit/814e0af73b16191ac05a68b04ffdb8d36517dbb1
Author: Paweł Kołodziejski (aquadran at gmail.com)
Date: 2022-06-26T00:02:56+02:00

Commit Message:
WINTERMUTE: WME3D: Merge code into one opcode as original

Changed paths:
    engines/wintermute/ad/ad_game.cpp


diff --git a/engines/wintermute/ad/ad_game.cpp b/engines/wintermute/ad/ad_game.cpp
index 3723c7ab155..3749d23a601 100644
--- a/engines/wintermute/ad/ad_game.cpp
+++ b/engines/wintermute/ad/ad_game.cpp
@@ -415,25 +415,6 @@ bool AdGame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack,
 		}
 		return STATUS_OK;
 	}
-
-	//////////////////////////////////////////////////////////////////////////
-	// UnloadActor3D
-	//////////////////////////////////////////////////////////////////////////
-	else if (strcmp(name, "UnloadActor3D") == 0) {
-		// this does the same as UnloadActor etc. ..
-		// even WmeLite has this script call in AdScene
-		stack->correctParams(1);
-		ScValue *val = stack->pop();
-		AdObject *obj = static_cast<AdObject *>(val->getNative());
-
-		removeObject(obj);
-		if (val->getType() == VAL_VARIABLE_REF) {
-			val->setNULL();
-		}
-
-		stack->pushNULL();
-		return STATUS_OK;
-	}
 #endif
 
 	//////////////////////////////////////////////////////////////////////////
@@ -454,9 +435,13 @@ bool AdGame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack,
 	}
 
 	//////////////////////////////////////////////////////////////////////////
-	// UnloadObject / UnloadActor / UnloadEntity / DeleteEntity
+	// UnloadObject / UnloadActor / UnloadEntity / UnloadActor3D / DeleteEntity
 	//////////////////////////////////////////////////////////////////////////
-	else if (strcmp(name, "UnloadObject") == 0 || strcmp(name, "UnloadActor") == 0 || strcmp(name, "UnloadEntity") == 0 || strcmp(name, "DeleteEntity") == 0) {
+	else if (strcmp(name, "UnloadObject") == 0 || strcmp(name, "UnloadActor") == 0 || strcmp(name, "UnloadEntity") == 0 ||
+#ifdef ENABLE_WME3D
+	         strcmp(name, "UnloadActor3D") == 0 ||
+#endif
+	         strcmp(name, "DeleteEntity") == 0) {
 		stack->correctParams(1);
 		ScValue *val = stack->pop();
 		AdObject *obj = (AdObject *)val->getNative();




More information about the Scummvm-git-logs mailing list