mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-06 18:27:26 +00:00
AVALANCHE: Move freeing of the used surfaces in Nim to a better place.
This commit is contained in:
parent
439817d42e
commit
eeca348953
@ -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().
|
||||
*/
|
||||
|
@ -84,6 +84,7 @@ public:
|
||||
void nimDrawStone(int x, int y);
|
||||
void nimDrawInitials();
|
||||
void nimDrawLogo();
|
||||
void nimFree();
|
||||
|
||||
void clearAlso();
|
||||
void clearTextBar();
|
||||
|
@ -424,6 +424,8 @@ void Nim::endOfGame() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_vm->_graphics->nimFree();
|
||||
}
|
||||
|
||||
bool Nim::find(byte x) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user