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

digitall noreply at scummvm.org
Tue Mar 22 12:41:23 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:
9c9ff6f670 SAGA2: Remove Leftover Compilation Broken Debug Code from Task Class


Commit: 9c9ff6f67095ea40ae615601a83d2136d57bd9b2
    https://github.com/scummvm/scummvm/commit/9c9ff6f67095ea40ae615601a83d2136d57bd9b2
Author: D G Turner (digitall at scummvm.org)
Date: 2022-03-22T12:38:18Z

Commit Message:
SAGA2: Remove Leftover Compilation Broken Debug Code from Task Class

The rest of this code was removed by commit 50868e2 i.e.
"SAGA2: Removed DList from Task and TaskList".

The remaining code fails to build when "#define DEBUG 1" is passed due
to various missing function definitions and other methods from Task
base class.

This was causing GCC Undefined Macro Warnings as well when -Wundef
was passed.

Changed paths:
    engines/saga2/task.cpp
    engines/saga2/task.h
    engines/saga2/tilemode.cpp


diff --git a/engines/saga2/task.cpp b/engines/saga2/task.cpp
index 15edef6a113..d7e6c8c0764 100644
--- a/engines/saga2/task.cpp
+++ b/engines/saga2/task.cpp
@@ -50,12 +50,6 @@ int32 taskArchiveSize(Task *t);
 
 void writeTask(Task *t, Common::MemoryWriteStreamDynamic *out);
 
-#if DEBUG
-//  Debugging function used to check the integrity of the global task
-//  list
-void checkTaskListIntegrity();
-#endif
-
 /* ===================================================================== *
    Utility functions
  * ===================================================================== */
@@ -952,18 +946,6 @@ void TetheredWanderTask::write(Common::MemoryWriteStreamDynamic *out) const {
 		out->writeSint16LE(NoTask);
 }
 
-#if DEBUG
-//----------------------------------------------------------------------
-//	Debugging function used to mark this task and any sub tasks as being
-//	used.  This is used to find task leaks.
-
-void TetheredWanderTask::mark() {
-	WanderTask::mark();
-	if (gotoTether != NULL)
-		gotoTether->mark();
-}
-#endif
-
 //----------------------------------------------------------------------
 //	Return an integer representing the type of this task
 
@@ -1112,18 +1094,6 @@ void GotoTask::write(Common::MemoryWriteStreamDynamic *out) const {
 	out->writeUint16LE(prevRunState);
 }
 
-#if DEBUG
-//----------------------------------------------------------------------
-//	Debugging function used to mark this task and any sub tasks as being
-//	used.  This is used to find task leaks.
-
-void GotoTask::mark() {
-	Task::mark();
-	if (wander != NULL)
-		wander->mark();
-}
-#endif
-
 //----------------------------------------------------------------------
 
 void GotoTask::abortTask() {
@@ -1723,18 +1693,6 @@ void GoAwayFromTask::write(Common::MemoryWriteStreamDynamic *out) const {
 	out->writeByte(flags);
 }
 
-#if DEBUG
-//----------------------------------------------------------------------
-//	Debugging function used to mark this task and any sub tasks as being
-//	used.  This is used to find task leaks.
-
-void GoAwayFromTask::mark() {
-	Task::mark();
-	if (goTask != NULL)
-		goTask->mark();
-}
-#endif
-
 //----------------------------------------------------------------------
 //	Abort this task
 
@@ -2017,18 +1975,6 @@ void HuntTask::write(Common::MemoryWriteStreamDynamic *out) const {
 		out->writeSint16LE(getTaskID(subTask));
 }
 
-#if DEBUG
-//----------------------------------------------------------------------
-//	Debugging function used to mark this task and any sub tasks as being
-//	used.  This is used to find task leaks.
-
-void HuntTask::mark() {
-	Task::mark();
-	if (huntFlags & (huntGoto | huntWander))
-		subTask->mark();
-}
-#endif
-
 //----------------------------------------------------------------------
 
 void HuntTask::abortTask() {
@@ -2801,18 +2747,6 @@ void HuntToBeNearActorTask::write(Common::MemoryWriteStreamDynamic *out) const {
 	out->writeByte(targetEvaluateCtr);
 }
 
-#if DEBUG
-//----------------------------------------------------------------------
-//	Debugging function used to mark this task and any sub tasks as being
-//	used.  This is used to find task leaks.
-
-void HuntToBeNearActorTask::mark() {
-	HuntActorTask::mark();
-	if (goAway != NULL)
-		goAway->mark();
-}
-#endif
-
 //----------------------------------------------------------------------
 //	Return an integer representing the type of this task
 
@@ -3536,18 +3470,6 @@ void BandTask::write(Common::MemoryWriteStreamDynamic *out) const {
 	out->writeByte(targetEvaluateCtr);
 }
 
-#if DEBUG
-//----------------------------------------------------------------------
-//	Debugging function used to mark this task and any sub tasks as being
-//	used.  This is used to find task leaks.
-
-void BandTask::mark() {
-	HuntTask::mark();
-	if (attend != NULL)
-		attend->mark();
-}
-#endif
-
 //----------------------------------------------------------------------
 //	Return an integer representing the type of this task
 
@@ -3925,18 +3847,6 @@ void FollowPatrolRouteTask::write(Common::MemoryWriteStreamDynamic *out) const {
 	out->writeSint16LE(counter);
 }
 
-#if DEBUG
-//----------------------------------------------------------------------
-//	Debugging function used to mark this task and any sub tasks as being
-//	used.  This is used to find task leaks.
-
-void FollowPatrolRouteTask::mark() {
-	Task::mark();
-	if (gotoWayPoint != NULL)
-		gotoWayPoint->mark();
-}
-#endif
-
 //----------------------------------------------------------------------
 //	Return an integer representing the type of this task
 
@@ -4191,20 +4101,6 @@ void TaskStack::read(Common::InSaveFile *in) {
 	debugC(4, kDebugSaveload, "...... evalRate = %d", evalRate);
 }
 
-#if DEBUG
-//----------------------------------------------------------------------
-//	Debugging function used to mark this task and any sub tasks as being
-//	used.  This is used to find task leaks.
-
-void TaskStack::mark() {
-	if (stackBottomID != NoTask) {
-		Task    *stackBottom = getTaskAddress(stackBottomID);
-
-		stackBottom->mark();
-	}
-}
-#endif
-
 //----------------------------------------------------------------------
 //	Set the bottom task of this task stack
 
diff --git a/engines/saga2/task.h b/engines/saga2/task.h
index ec7ea3675a5..5ba256f0532 100644
--- a/engines/saga2/task.h
+++ b/engines/saga2/task.h
@@ -270,12 +270,6 @@ public:
 
 	void write(Common::MemoryWriteStreamDynamic *out) const;
 
-#if DEBUG
-	//  Debugging function used to mark this task and any sub tasks as
-	//  being used.  This is used to find task leaks.
-	void mark();
-#endif
-
 	//  Return an integer representing the type of this task
 	int16 getType() const;
 
@@ -319,12 +313,6 @@ public:
 
 	void write(Common::MemoryWriteStreamDynamic *out) const;
 
-#if DEBUG
-	//  Debugging function used to mark this task and any sub tasks as
-	//  being used.  This is used to find task leaks.
-	void mark();
-#endif
-
 	void abortTask();
 	TaskResult evaluate();
 	TaskResult update();
@@ -621,12 +609,6 @@ public:
 
 	void write(Common::MemoryWriteStreamDynamic *out) const;
 
-#if DEBUG
-	//  Debugging function used to mark this task and any sub tasks as
-	//  being used.  This is used to find task leaks.
-	void mark();
-#endif
-
 	void abortTask();
 	TaskResult evaluate();
 	TaskResult update();
@@ -742,12 +724,6 @@ public:
 
 	void write(Common::MemoryWriteStreamDynamic *out) const;
 
-#if DEBUG
-	//  Debugging function used to mark this task and any sub tasks as
-	//  being used.  This is used to find task leaks.
-	void mark();
-#endif
-
 	void abortTask();
 	TaskResult evaluate();
 	TaskResult update();
@@ -1086,12 +1062,6 @@ public:
 
 	void write(Common::MemoryWriteStreamDynamic *out) const;
 
-#if DEBUG
-	//  Debugging function used to mark this task and any sub tasks as
-	//  being used.  This is used to find task leaks.
-	void mark();
-#endif
-
 	//  Return an integer representing the type of this task
 	int16 getType() const;
 
@@ -1336,12 +1306,6 @@ public:
 
 	void write(Common::MemoryWriteStreamDynamic *out) const;
 
-#if DEBUG
-	//  Debugging function used to mark this task and any sub tasks as
-	//  being used.  This is used to find task leaks.
-	void mark();
-#endif
-
 	//  Return an integer representing the type of this task
 	int16 getType() const;
 
@@ -1464,12 +1428,6 @@ public:
 
 	void write(Common::MemoryWriteStreamDynamic *out) const;
 
-#if DEBUG
-	//  Debugging function used to mark this task and any sub tasks as
-	//  being used.  This is used to find task leaks.
-	void mark();
-#endif
-
 	//  Return an integer representing the type of this task
 	int16 getType() const;
 
diff --git a/engines/saga2/tilemode.cpp b/engines/saga2/tilemode.cpp
index 7c9fccc6f46..cb64108c45c 100644
--- a/engines/saga2/tilemode.cpp
+++ b/engines/saga2/tilemode.cpp
@@ -27,6 +27,7 @@
 
 #include "saga2/saga2.h"
 #include "saga2/detection.h"
+#include "saga2/display.h"
 #include "saga2/tilemode.h"
 #include "saga2/tile.h"
 #include "saga2/setup.h"




More information about the Scummvm-git-logs mailing list