[Scummvm-cvs-logs] scummvm master -> eeca348953d851d11f98b9b78d9bba0043937614
urukgit
urukgit at users.noreply.github.com
Sat Dec 21 19:10:31 CET 2013
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:
eeca348953 AVALANCHE: Move freeing of the used surfaces in Nim to a better place.
Commit: eeca348953d851d11f98b9b78d9bba0043937614
https://github.com/scummvm/scummvm/commit/eeca348953d851d11f98b9b78d9bba0043937614
Author: uruk (koppirnyo at gmail.com)
Date: 2013-12-21T10:09:57-08:00
Commit Message:
AVALANCHE: Move freeing of the used surfaces in Nim to a better place.
Changed paths:
engines/avalanche/graphics.cpp
engines/avalanche/graphics.h
engines/avalanche/nim.cpp
diff --git a/engines/avalanche/graphics.cpp b/engines/avalanche/graphics.cpp
index f23ef2a..4b8d667 100644
--- a/engines/avalanche/graphics.cpp
+++ b/engines/avalanche/graphics.cpp
@@ -60,11 +60,6 @@ GraphicManager::~GraphicManager() {
_scrolls.free();
_backup.free();
- _nimStone.free();
- for (int i = 0; i < 3; i++)
- _nimInitials[i].free();
- _nimLogo.free();
-
for (int i = 0; i < 10; i++)
_digits[i].free();
for (int i = 0; i < 9; i++)
@@ -494,6 +489,13 @@ void GraphicManager::nimDrawLogo() {
drawPicture(_surface, _nimLogo, 392, 5);
}
+void GraphicManager::nimFree() {
+ _nimStone.free();
+ for (int i = 0; i < 3; i++)
+ _nimInitials[i].free();
+ _nimLogo.free();
+}
+
/**
* This function mimics Pascal's getimage().
*/
diff --git a/engines/avalanche/graphics.h b/engines/avalanche/graphics.h
index e230896..0de2361 100644
--- a/engines/avalanche/graphics.h
+++ b/engines/avalanche/graphics.h
@@ -84,6 +84,7 @@ public:
void nimDrawStone(int x, int y);
void nimDrawInitials();
void nimDrawLogo();
+ void nimFree();
void clearAlso();
void clearTextBar();
diff --git a/engines/avalanche/nim.cpp b/engines/avalanche/nim.cpp
index 6b36ab8..be32f7c 100644
--- a/engines/avalanche/nim.cpp
+++ b/engines/avalanche/nim.cpp
@@ -424,6 +424,8 @@ void Nim::endOfGame() {
}
}
}
+
+ _vm->_graphics->nimFree();
}
bool Nim::find(byte x) {
More information about the Scummvm-git-logs
mailing list