From f1c79ee518f61ee0c8a2a1f9af9f2c0f1b7f5bf7 Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Mon, 10 Apr 2006 08:49:28 +0000 Subject: Merged o_setup_cond_c() into o1_getDollar2(). (We could merge setup_cond_c_helper() into o1_getDollar2() as well, but for now I'm only trying to get rid of the o_* functions.) svn-id: r21759 --- engines/simon/items.cpp | 20 +++++++++++++++++++- engines/simon/simon.cpp | 21 --------------------- engines/simon/simon.h | 1 - 3 files changed, 19 insertions(+), 23 deletions(-) diff --git a/engines/simon/items.cpp b/engines/simon/items.cpp index d6bf274c06..84c047799c 100644 --- a/engines/simon/items.cpp +++ b/engines/simon/items.cpp @@ -1369,7 +1369,25 @@ void SimonEngine::o1_playEffect() { void SimonEngine::o1_getDollar2() { // 164 _showPreposition = true; - o_setup_cond_c(); + + setup_cond_c_helper(); + + _objectItem = _hitAreaObjectItem; + + if (_objectItem == _dummyItem2) + _objectItem = getItem1Ptr(); + + if (_objectItem == _dummyItem3) + _objectItem = derefItem(getItem1Ptr()->parent); + + if (_objectItem != NULL) { + _scriptNoun2 = _objectItem->noun; + _scriptAdj2 = _objectItem->adjective; + } else { + _scriptNoun2 = -1; + _scriptAdj2 = -1; + } + _showPreposition = false; } diff --git a/engines/simon/simon.cpp b/engines/simon/simon.cpp index 4a2d5849bc..ee1eaf460a 100644 --- a/engines/simon/simon.cpp +++ b/engines/simon/simon.cpp @@ -1533,27 +1533,6 @@ void SimonEngine::invokeTimeEvent(TimeEvent *te) { _runScriptReturn1 = false; } -void SimonEngine::o_setup_cond_c() { - - setup_cond_c_helper(); - - _objectItem = _hitAreaObjectItem; - - if (_objectItem == _dummyItem2) - _objectItem = getItem1Ptr(); - - if (_objectItem == _dummyItem3) - _objectItem = derefItem(getItem1Ptr()->parent); - - if (_objectItem != NULL) { - _scriptNoun2 = _objectItem->noun; - _scriptAdj2 = _objectItem->adjective; - } else { - _scriptNoun2 = -1; - _scriptAdj2 = -1; - } -} - void SimonEngine::setup_cond_c_helper() { HitArea *last; uint id; diff --git a/engines/simon/simon.h b/engines/simon/simon.h index c62e7785b5..c253618519 100644 --- a/engines/simon/simon.h +++ b/engines/simon/simon.h @@ -585,7 +585,6 @@ protected: void o_fadeToBlack(); TextLocation *getTextLocation(uint a); - void o_setup_cond_c(); void setup_cond_c_helper(); void checkLinkBox(); -- cgit v1.2.3