aboutsummaryrefslogtreecommitdiff
path: root/engines/saga/interface.cpp
diff options
context:
space:
mode:
authorAndrew Kurushin2010-10-19 22:29:53 +0000
committerAndrew Kurushin2010-10-19 22:29:53 +0000
commite4029f6f0e5aa9dc679ce875fb7625c564c69144 (patch)
tree7a1510db216ad36d78e637cbef959b54614ab90e /engines/saga/interface.cpp
parentbfb0986cd4f73e564384f513daeba9e7938dcb4d (diff)
downloadscummvm-rg350-e4029f6f0e5aa9dc679ce875fb7625c564c69144.tar.gz
scummvm-rg350-e4029f6f0e5aa9dc679ce875fb7625c564c69144.tar.bz2
scummvm-rg350-e4029f6f0e5aa9dc679ce875fb7625c564c69144.zip
SAGA: SAGA: replace SpriteList "::realloc" with Common::Array
svn-id: r53628
Diffstat (limited to 'engines/saga/interface.cpp')
-rw-r--r--engines/saga/interface.cpp17
1 files changed, 3 insertions, 14 deletions
diff --git a/engines/saga/interface.cpp b/engines/saga/interface.cpp
index 8d89a6fbdb..362d4ffdc0 100644
--- a/engines/saga/interface.cpp
+++ b/engines/saga/interface.cpp
@@ -197,7 +197,7 @@ Interface::Interface(SagaEngine *vm) : _vm(vm) {
} else {
_optionPanel.buttons = NULL;
_optionPanel.buttonsCount = 0;
- _optionPanel.sprites.spriteCount = 0;
+ _optionPanel.sprites.clear();
}
#ifdef ENABLE_IHNM
@@ -353,17 +353,6 @@ Interface::~Interface() {
free(_quitPanel.image);
free(_loadPanel.image);
free(_savePanel.image);
-
- _mainPanel.sprites.freeMem();
- _conversePanel.sprites.freeMem();
- _optionPanel.sprites.freeMem();
- _quitPanel.sprites.freeMem();
- _loadPanel.sprites.freeMem();
- _savePanel.sprites.freeMem();
- _protectPanel.sprites.freeMem();
-
- _defPortraits.freeMem();
- _scenePortraits.freeMem();
}
void Interface::saveReminderCallback(void *refCon) {
@@ -768,7 +757,7 @@ void Interface::setStatusText(const char *text, int statusColor) {
}
void Interface::loadScenePortraits(int resourceId) {
- _scenePortraits.freeMem();
+ _scenePortraits.clear();
_vm->_sprite->loadList(resourceId, _scenePortraits);
}
@@ -847,7 +836,7 @@ void Interface::draw() {
// can tell this is what the original engine does. And it keeps
// ITE from crashing when entering the Elk King's court.
- if (_rightPortrait >= _scenePortraits.spriteCount)
+ if (_rightPortrait >= _scenePortraits.size())
_rightPortrait = 0;
_vm->_sprite->draw(_scenePortraits, _rightPortrait, rightPortraitPoint, 256);