aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimei Yin2018-04-15 00:33:01 +0200
committerSimei Yin2018-04-15 01:09:35 +0200
commitb575aac25a8aaa8409d4729e2cc2044e96681524 (patch)
tree818df5cbba6fa80ddc2c0e6ca891b4ed77a1f411
parentc348bb01b6613a0801c3cf70fda991343d005686 (diff)
downloadscummvm-rg350-b575aac25a8aaa8409d4729e2cc2044e96681524.tar.gz
scummvm-rg350-b575aac25a8aaa8409d4729e2cc2044e96681524.tar.bz2
scummvm-rg350-b575aac25a8aaa8409d4729e2cc2044e96681524.zip
SLUDGE: Rename KillAll to Kill in RegionManager
-rw-r--r--engines/sludge/builtin.cpp2
-rw-r--r--engines/sludge/freeze.cpp2
-rw-r--r--engines/sludge/loadsave.cpp2
-rw-r--r--engines/sludge/region.cpp7
-rw-r--r--engines/sludge/region.h2
-rw-r--r--engines/sludge/sludger.cpp2
6 files changed, 8 insertions, 9 deletions
diff --git a/engines/sludge/builtin.cpp b/engines/sludge/builtin.cpp
index 4d4726a165..d6cfbb53fe 100644
--- a/engines/sludge/builtin.cpp
+++ b/engines/sludge/builtin.cpp
@@ -1428,7 +1428,7 @@ builtIn(showBoxes) {
builtIn(removeAllScreenRegions) {
UNUSEDALL
- g_sludge->_regionMan->killAll();
+ g_sludge->_regionMan->kill();
return BR_CONTINUE;
}
diff --git a/engines/sludge/freeze.cpp b/engines/sludge/freeze.cpp
index 2df8f553ea..15125dbf4e 100644
--- a/engines/sludge/freeze.cpp
+++ b/engines/sludge/freeze.cpp
@@ -136,7 +136,7 @@ void GraphicsManager::unfreeze(bool killImage) {
killAllPeople();
allPeople = _frozenStuff->allPeople;
- g_sludge->_regionMan->killAll();
+ g_sludge->_regionMan->kill();
g_sludge->_regionMan->resotre(_frozenStuff);
killLightMap();
diff --git a/engines/sludge/loadsave.cpp b/engines/sludge/loadsave.cpp
index bd4b38343a..2a69d02280 100644
--- a/engines/sludge/loadsave.cpp
+++ b/engines/sludge/loadsave.cpp
@@ -504,7 +504,7 @@ bool loadGame(const Common::String &fname) {
g_sludge->_txtMan->loadFont(ssgVersion, fp);
killAllPeople();
- g_sludge->_regionMan->killAll();
+ g_sludge->_regionMan->kill();
int camerX = fp->readUint16BE();
int camerY = fp->readUint16BE();
diff --git a/engines/sludge/region.cpp b/engines/sludge/region.cpp
index 3ce4d92c74..409c4fc939 100644
--- a/engines/sludge/region.cpp
+++ b/engines/sludge/region.cpp
@@ -41,9 +41,8 @@ RegionManager::RegionManager(SludgeEngine *vm)
_overRegion = nullptr;
}
-RegionManager::~RegionManager()
-{
-
+RegionManager::~RegionManager() {
+ kill();
}
void RegionManager::showBoxes() {
@@ -123,7 +122,7 @@ void RegionManager::loadRegions(Common::SeekableReadStream *stream) {
*pointy = NULL;
}
-void RegionManager::killAll() {
+void RegionManager::kill() {
ScreenRegion *killRegion;
while (_allScreenRegions) {
killRegion = _allScreenRegions;
diff --git a/engines/sludge/region.h b/engines/sludge/region.h
index 3a7414979e..06b7a627d7 100644
--- a/engines/sludge/region.h
+++ b/engines/sludge/region.h
@@ -39,7 +39,7 @@ public:
~RegionManager();
// Kill
- void killAll();
+ void kill();
// Add & remove region
bool addScreenRegion(int x1, int y1, int x2, int y2, int, int, int, int objectNum);
diff --git a/engines/sludge/sludger.cpp b/engines/sludge/sludger.cpp
index 9eb0eb82db..0da7f39427 100644
--- a/engines/sludge/sludger.cpp
+++ b/engines/sludge/sludger.cpp
@@ -183,7 +183,7 @@ void initSludge() {
void killSludge() {
killAllFunctions();
killAllPeople();
- g_sludge->_regionMan->killAll();
+ g_sludge->_regionMan->kill();
setFloorNull();
g_sludge->_speechMan->kill();
g_sludge->_languageMan->kill();