diff options
author | athrxx | 2011-09-30 19:34:42 +0200 |
---|---|---|
committer | Johannes Schickel | 2011-12-26 16:18:15 +0100 |
commit | 532f8f33f2dad8c0292c41301926becc5198a83e (patch) | |
tree | 76e3cff9a7d62f7945bb04d9d616568e102a2a2f /engines/kyra/gui_eob.cpp | |
parent | 1cbd56693086afa8ce93092c3638e1052e31a5d9 (diff) | |
download | scummvm-rg350-532f8f33f2dad8c0292c41301926becc5198a83e.tar.gz scummvm-rg350-532f8f33f2dad8c0292c41301926becc5198a83e.tar.bz2 scummvm-rg350-532f8f33f2dad8c0292c41301926becc5198a83e.zip |
KYRA: (EOB) - fix mem leak
Diffstat (limited to 'engines/kyra/gui_eob.cpp')
-rw-r--r-- | engines/kyra/gui_eob.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/engines/kyra/gui_eob.cpp b/engines/kyra/gui_eob.cpp index af97d487cb..4ced205d91 100644 --- a/engines/kyra/gui_eob.cpp +++ b/engines/kyra/gui_eob.cpp @@ -85,7 +85,6 @@ void LolEobBaseEngine::gui_drawHorizontalBarGraph(int x, int y, int w, int h, in } void LolEobBaseEngine::gui_initButtonsFromList(const int16 *list) { - return; while (*list != -1) gui_initButton(*list++); } @@ -808,13 +807,17 @@ void EobCoreEngine::gui_initButton(int index, int, int, int) { b->index = index + 1; const EobGuiButtonDef *d = &_buttonDefs[index]; + b->buttonCallback = _buttonCallbacks[index]; if (_flags.gameID == GI_EOB1) { // EOB1 spellbook modifications - if (index > 60 && index < 66) + if (index > 60 && index < 66) { d = &_buttonDefs[index + 33]; - if (index == 88) + b->buttonCallback = _buttonCallbacks[index + 33]; + } else if (index == 88) { d = &_buttonDefs[index + 12]; + b->buttonCallback = _buttonCallbacks[index + 12]; + } } b->x = d->x; @@ -830,7 +833,6 @@ void EobCoreEngine::gui_initButton(int index, int, int, int) { b->keyCode = d->keyCode; b->keyCode2 = d->keyCode2; b->arg = d->arg; - b->buttonCallback = d->buttonCallback; } int EobCoreEngine::clickedCharPortraitDefault(Button *button) { @@ -1437,8 +1439,6 @@ void EobCoreEngine::gui_processInventorySlotClick(int slot) { } GUI_Eob::GUI_Eob(EobCoreEngine *vm) : GUI(vm), _vm(vm), _screen(vm->_screen) { - //_scrollUpFunctor = _scrollDownFunctor = BUTTON_FUNCTOR(GUI_Eob, this, 0); - _menuStringsPrefsTemp = new char*[4]; memset(_menuStringsPrefsTemp, 0, 4 * sizeof(char*)); @@ -1601,7 +1601,6 @@ void GUI_Eob::processButton(Button *button) { } int GUI_Eob::processButtonList(Kyra::Button *buttonList, uint16 inputFlags, int8 mouseWheel) { - return 0; _progress = 0; uint16 in = inputFlags & 0xff; uint16 buttonReleaseFlag = 0; |