[Scummvm-git-logs] scummvm master -> e783fa5950ab64d06510ea351237343aad3ba679

aquadran noreply at scummvm.org
Wed Jul 23 03:42:18 UTC 2025


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

Summary:
e783fa5950 WINTERMUTE: Small cleanup in ad_layer


Commit: e783fa5950ab64d06510ea351237343aad3ba679
    https://github.com/scummvm/scummvm/commit/e783fa5950ab64d06510ea351237343aad3ba679
Author: Paweł Kołodziejski (aquadran at gmail.com)
Date: 2025-07-23T05:42:13+02:00

Commit Message:
WINTERMUTE: Small cleanup in ad_layer

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


diff --git a/engines/wintermute/ad/ad_layer.cpp b/engines/wintermute/ad/ad_layer.cpp
index 54e3f4f2312..c8e8042d6cb 100644
--- a/engines/wintermute/ad/ad_layer.cpp
+++ b/engines/wintermute/ad/ad_layer.cpp
@@ -173,8 +173,6 @@ bool AdLayer::loadBuffer(char *buffer, bool complete) {
 				cmd = PARSERR_GENERIC;
 				delete region;
 				delete node;
-				region = nullptr;
-				node = nullptr;
 			} else {
 				node->setRegion(region);
 				_nodes.add(node);
@@ -192,8 +190,6 @@ bool AdLayer::loadBuffer(char *buffer, bool complete) {
 				cmd = PARSERR_GENERIC;
 				delete entity;
 				delete node;
-				entity = nullptr;
-				node = nullptr;
 			} else {
 				node->setEntity(entity);
 				_nodes.add(node);
@@ -240,7 +236,7 @@ bool AdLayer::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack,
 	if (strcmp(name, "GetNode") == 0) {
 		stack->correctParams(1);
 		ScValue *val = stack->pop();
-		int node = -1;
+		int32 node = -1;
 
 		if (val->_type == VAL_INT) {
 			node = val->getInt();
@@ -303,7 +299,7 @@ bool AdLayer::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack,
 	//////////////////////////////////////////////////////////////////////////
 	else if (strcmp(name, "InsertRegion") == 0 || strcmp(name, "InsertEntity") == 0) {
 		stack->correctParams(2);
-		int index = stack->pop()->getInt();
+		int32 index = stack->pop()->getInt();
 		ScValue *val = stack->pop();
 
 		AdSceneNode *node = new AdSceneNode(_gameRef);
@@ -351,7 +347,7 @@ bool AdLayer::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack,
 				}
 			}
 		} else {
-			int index = val->getInt();
+			int32 index = val->getInt();
 			if (index >= 0 && index < (int32)_nodes.getSize()) {
 				toDelete = _nodes[index];
 			}




More information about the Scummvm-git-logs mailing list