[Scummvm-git-logs] scummvm master -> 9b2f694cfffc43035efe808e2ef1b4796ea6f7a1

a-yyg 76591232+a-yyg at users.noreply.github.com
Sat Jul 3 18:43:47 UTC 2021


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:
7449f2ccde SAGA2: Remove unnecessary fields in ResourceGameObject
9b2f694cff SAGA2: Fix for uninitialized field in GameWorld


Commit: 7449f2ccdeb2cc3c30fdf87ae7bad4c018486dae
    https://github.com/scummvm/scummvm/commit/7449f2ccdeb2cc3c30fdf87ae7bad4c018486dae
Author: a/ (yuri.kgpps at gmail.com)
Date: 2021-07-04T03:43:01+09:00

Commit Message:
SAGA2: Remove unnecessary fields in ResourceGameObject

Changed paths:
    engines/saga2/objects.h


diff --git a/engines/saga2/objects.h b/engines/saga2/objects.h
index f19d9b7315..8aa86abbdb 100644
--- a/engines/saga2/objects.h
+++ b/engines/saga2/objects.h
@@ -72,14 +72,6 @@ struct ResourceGameObject {
 	uint16          objectFlags;
 	uint8           hitPoints;
 	uint16          misc;
-	union {
-		uint16      massCount;              // for mergeables, object count
-		uint16      textStringID;           // inscription for documents
-		uint16      enchantmentType;        // for enchantments
-		uint16      generatorFrequency;     // for encounter and mission generators
-	};
-
-	uint8           missileFacing;
 
 	ResourceGameObject(Common::SeekableReadStream *stream);
 };


Commit: 9b2f694cfffc43035efe808e2ef1b4796ea6f7a1
    https://github.com/scummvm/scummvm/commit/9b2f694cfffc43035efe808e2ef1b4796ea6f7a1
Author: a/ (yuri.kgpps at gmail.com)
Date: 2021-07-04T03:43:01+09:00

Commit Message:
SAGA2: Fix for uninitialized field in GameWorld

Changed paths:
    engines/saga2/objects.cpp
    engines/saga2/objects.h


diff --git a/engines/saga2/objects.cpp b/engines/saga2/objects.cpp
index b45cab41b7..18b5ba310f 100644
--- a/engines/saga2/objects.cpp
+++ b/engines/saga2/objects.cpp
@@ -2374,6 +2374,11 @@ GameWorld::GameWorld(void **buf) {
 #endif
 }
 
+GameWorld::~GameWorld() {
+	if (sectorArray)
+		delete[] sectorArray;
+}
+
 //-------------------------------------------------------------------
 //	Return the number of bytes need to make an archive of this world
 
diff --git a/engines/saga2/objects.h b/engines/saga2/objects.h
index 8aa86abbdb..3432c1f8c8 100644
--- a/engines/saga2/objects.h
+++ b/engines/saga2/objects.h
@@ -768,7 +768,7 @@ public:
 	int16           mapNum;                 // map number for this world.
 
 	//  Default constructor
-	GameWorld(void) : sectorArray(NULL) {}
+	GameWorld(void) : sectorArraySize(0), sectorArray(nullptr), mapNum(0) {}
 
 	//  Initial constructor
 	GameWorld(int16 map);
@@ -776,6 +776,8 @@ public:
 	//  Constructor -- reconstruct from archive buffer
 	GameWorld(void **buf);
 
+	~GameWorld();
+
 	int32 archiveSize(void);
 	void *archive(void *buf);
 




More information about the Scummvm-git-logs mailing list