[Scummvm-git-logs] scummvm master -> 46f426ccdb0f17b653656d00dbf20f3b4ef8994d

a-yyg 76591232+a-yyg at users.noreply.github.com
Mon Jul 12 08:20:18 UTC 2021


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

Summary:
f0016b02df SAGA2: Fix debug messages
5e6d32062c SAGA2: Fix list removal on gControl delete
97f90e5e2d SAGA2: Fix list removal on cleanupTimers
46f426ccdb SAGA2: Remove unneeded step in cleanupGameState


Commit: f0016b02dfb25cef69fa8ac0a49c5d4b9f9ca330
    https://github.com/scummvm/scummvm/commit/f0016b02dfb25cef69fa8ac0a49c5d4b9f9ca330
Author: a/ (yuri.kgpps at gmail.com)
Date: 2021-07-12T17:19:01+09:00

Commit Message:
SAGA2: Fix debug messages

Changed paths:
    engines/saga2/contain.cpp
    engines/saga2/intrface.cpp


diff --git a/engines/saga2/contain.cpp b/engines/saga2/contain.cpp
index 5a499b0f35..acccf595db 100644
--- a/engines/saga2/contain.cpp
+++ b/engines/saga2/contain.cpp
@@ -1905,12 +1905,12 @@ void saveContainerNodes(Common::OutSaveFile *out) {
 
 	//  Store the nodes
 	for (Common::List<ContainerNode *>::iterator it = g_vm->_containerList->_list.begin(); it != g_vm->_containerList->_list.end(); ++it) {
-		debugC(3, kDebugSaveload, "Saving ContainerNode %d", i++);
-
 		ContainerNode *n = *it;
 
-		if (n->getType() != ContainerNode::readyType)
+		if (n->getType() != ContainerNode::readyType) {
+			debugC(3, kDebugSaveload, "Saving ContainerNode %d", i++);
 			n->write(out);
+		}
 	}
 }
 
diff --git a/engines/saga2/intrface.cpp b/engines/saga2/intrface.cpp
index b04f591278..2f29ec496d 100644
--- a/engines/saga2/intrface.cpp
+++ b/engines/saga2/intrface.cpp
@@ -2631,7 +2631,7 @@ void loadUIState(SaveFileReader &saveGame) {
 }
 
 void loadUIState(Common::InSaveFile *in) {
-	debugC(2, kDebugSaveload, "Saving UIState");
+	debugC(2, kDebugSaveload, "Loading UIState");
 
 	indivControlsFlag = in->readByte();
 	indivBrother = in->readUint16LE();


Commit: 5e6d32062cebb84dd61135e8b476a41efa96282c
    https://github.com/scummvm/scummvm/commit/5e6d32062cebb84dd61135e8b476a41efa96282c
Author: a/ (yuri.kgpps at gmail.com)
Date: 2021-07-12T17:19:01+09:00

Commit Message:
SAGA2: Fix list removal on gControl delete

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


diff --git a/engines/saga2/panel.cpp b/engines/saga2/panel.cpp
index de23ebf504..e4b5988196 100644
--- a/engines/saga2/panel.cpp
+++ b/engines/saga2/panel.cpp
@@ -122,7 +122,6 @@ gPanel::~gPanel() {
 		G_BASE.mousePanel = NULL;
 	if (this == G_BASE.activePanel)
 		G_BASE.activePanel = NULL;
-
 }
 void gPanel::draw(void) {}
 void gPanel::drawClipped(gPort &, const Point16 &, const Rect16 &) {}
@@ -618,6 +617,7 @@ gControl::gControl(gPanelList &list, const Rect16 &box, const char *title_, uint
 
 	//  Add control to the window's control list.
 
+	_list = &list;
 	list.contents.push_back(this);
 }
 
@@ -627,11 +627,12 @@ gControl::gControl(gPanelList &list, const Rect16 &box, gPixelMap &img, uint16 i
 
 	//  Add control to the window's control list.
 
+	_list = &list;
 	list.contents.push_back(this);
 }
 
 gControl::~gControl() {
-	window.contents.remove(this);
+	_list->contents.remove(this);
 }
 
 gControl::gControl(gPanelList &list, const StaticRect &box, const char *title_, uint16 ident,
@@ -640,6 +641,7 @@ gControl::gControl(gPanelList &list, const StaticRect &box, const char *title_,
 
 	//  Add control to the window's control list.
 
+	_list = &list;
 	list.contents.push_back(this);
 }
 
diff --git a/engines/saga2/panel.h b/engines/saga2/panel.h
index 76576bee1d..125213be69 100644
--- a/engines/saga2/panel.h
+++ b/engines/saga2/panel.h
@@ -402,6 +402,7 @@ public:
 class gControl : public gPanel {
 public:
 	uint8               accelKey;
+	gPanelList *_list;
 
 	gControl(gPanelList &, const Rect16 &, const char *, uint16, AppFunc *cmd = NULL);
 	gControl(gPanelList &, const Rect16 &, gPixelMap &, uint16, AppFunc *cmd = NULL);


Commit: 97f90e5e2d1729642f7ee651e65cbe82b51ed894
    https://github.com/scummvm/scummvm/commit/97f90e5e2d1729642f7ee651e65cbe82b51ed894
Author: a/ (yuri.kgpps at gmail.com)
Date: 2021-07-12T17:19:01+09:00

Commit Message:
SAGA2: Fix list removal on cleanupTimers

Changed paths:
    engines/saga2/timers.cpp


diff --git a/engines/saga2/timers.cpp b/engines/saga2/timers.cpp
index c59e89844f..eceb1c37c3 100644
--- a/engines/saga2/timers.cpp
+++ b/engines/saga2/timers.cpp
@@ -408,18 +408,13 @@ void loadTimers(Common::InSaveFile *in) {
 //	Cleanup the active Timers
 
 void cleanupTimers(void) {
-	Common::List<TimerList *>::iterator timerListNextIt;
-	for (Common::List<TimerList *>::iterator it = g_vm->_timerLists.begin(); it != g_vm->_timerLists.end(); it = timerListNextIt) {
-		timerListNextIt = it;
-		timerListNextIt++;
-		delete *it;
-	}
+	while (g_vm->_timerLists.size() > 0)
+		delete g_vm->_timerLists.front();
 
-	Common::List<Timer *>::iterator timerNextIt;
-	for (Common::List<Timer *>::iterator it = g_vm->_timers.begin(); it != g_vm->_timers.end(); it = timerNextIt) {
-		timerNextIt = it;
-		timerNextIt++;
-		delete *it;
+	while (g_vm->_timers.size() > 0) {
+		Timer *t = g_vm->_timers.front();
+		deleteTimer(t);
+		delete t;
 	}
 }
 


Commit: 46f426ccdb0f17b653656d00dbf20f3b4ef8994d
    https://github.com/scummvm/scummvm/commit/46f426ccdb0f17b653656d00dbf20f3b4ef8994d
Author: a/ (yuri.kgpps at gmail.com)
Date: 2021-07-12T17:19:01+09:00

Commit Message:
SAGA2: Remove unneeded step in cleanupGameState

Changed paths:
    engines/saga2/loadsave.cpp


diff --git a/engines/saga2/loadsave.cpp b/engines/saga2/loadsave.cpp
index fa475faa2a..4ebba70552 100644
--- a/engines/saga2/loadsave.cpp
+++ b/engines/saga2/loadsave.cpp
@@ -502,7 +502,6 @@ void cleanupGameState(void) {
 	cleanupObjects();
 	cleanupActors();
 	cleanupWorlds();
-	cleanupAudio();
 	cleanupTimer();
 	cleanupGlobals();
 }




More information about the Scummvm-git-logs mailing list