diff options
author | Max Horn | 2003-06-15 13:07:06 +0000 |
---|---|---|
committer | Max Horn | 2003-06-15 13:07:06 +0000 |
commit | e6455a9dd28c59d6d61ab7db214175be96eb811e (patch) | |
tree | d04201f0a2bce9a681ea5fb9f1ffcab1a6751f5f | |
parent | 9ef0657c5c71a40b2a78ce1ad2138b0ae13d226c (diff) | |
download | scummvm-rg350-e6455a9dd28c59d6d61ab7db214175be96eb811e.tar.gz scummvm-rg350-e6455a9dd28c59d6d61ab7db214175be96eb811e.tar.bz2 scummvm-rg350-e6455a9dd28c59d6d61ab7db214175be96eb811e.zip |
cleanup
svn-id: r8509
-rw-r--r-- | simon/items.cpp | 1 | ||||
-rw-r--r-- | simon/res.cpp | 1 | ||||
-rw-r--r-- | simon/simon.cpp | 32 | ||||
-rw-r--r-- | simon/simon.h | 3 |
4 files changed, 9 insertions, 28 deletions
diff --git a/simon/items.cpp b/simon/items.cpp index fdd6a82c4d..356c2d2941 100644 --- a/simon/items.cpp +++ b/simon/items.cpp @@ -1145,7 +1145,6 @@ int SimonEngine::startSubroutine(Subroutine *sub) { } int SimonEngine::startSubroutineEx(Subroutine *sub) { - _item_1_ptr = _item_1; return startSubroutine(sub); } diff --git a/simon/res.cpp b/simon/res.cpp index 95032c8e1a..b0dd801c77 100644 --- a/simon/res.cpp +++ b/simon/res.cpp @@ -114,7 +114,6 @@ void SimonEngine::loadGamePcFile(const char *filename) { num_inited_objects = allocGamePcVars(&in); - allocItem1(); loginPlayer(); readGamePcText(&in); diff --git a/simon/simon.cpp b/simon/simon.cpp index 8e7736aa4e..6ce91b1bc8 100644 --- a/simon/simon.cpp +++ b/simon/simon.cpp @@ -268,8 +268,6 @@ SimonEngine::SimonEngine(GameDetector *detector, OSystem *syst) _subject_item = 0; _object_item = 0; - _item_1_ptr = 0; - _item_ptr_B = 0; _item_1 = 0; _hitarea_object_item = 0; @@ -522,7 +520,7 @@ int SimonEngine::allocGamePcVars(File *in) { _itemarray_size = item_array_size; _itemarray_inited = item_array_inited; - for (i = 2; i != item_array_inited; i++) { + for (i = 1; i < item_array_inited; i++) { _itemarray_ptr[i] = (Item *)allocateItem(sizeof(Item)); } @@ -533,12 +531,6 @@ int SimonEngine::allocGamePcVars(File *in) { return item_array_inited; } -Item *SimonEngine::allocItem1() { - Item *item = (Item *)allocateItem(sizeof(Item)); - _itemarray_ptr[1] = item; - return item; -} - void SimonEngine::loginPlayerHelper(Item *item, int a, int b) { Child9 *child; @@ -552,19 +544,17 @@ void SimonEngine::loginPlayerHelper(Item *item, int a, int b) { } void SimonEngine::loginPlayer() { - Item *item; Child *child; - item = _itemarray_ptr[1]; - item->unk2 = -1; - item->unk1 = 10000; - _item_1 = item; + _item_1 = _itemarray_ptr[1]; + _item_1->unk2 = -1; + _item_1->unk1 = 10000; - child = (Child *)allocateChildBlock(item, 3, sizeof(Child)); + child = (Child *)allocateChildBlock(_item_1, 3, sizeof(Child)); if (child == NULL) error("player create failure"); - loginPlayerHelper(item, 0, 0); + loginPlayerHelper(_item_1, 0, 0); } void SimonEngine::allocateStringTable(int num) { @@ -808,15 +798,13 @@ uint SimonEngine::getNextItemID() { } Item *SimonEngine::getItem1Ptr() { - if (_item_1_ptr) - return _item_1_ptr; + if (_item_1) + return _item_1; return _dummy_item_1; } Item *SimonEngine::getItemPtrB() { error("getItemPtrB: is this code ever used?"); - if (_item_ptr_B) - return _item_ptr_B; return _dummy_item_1; } @@ -1294,11 +1282,9 @@ void SimonEngine::invokeTimeEvent(TimeEvent *te) { } void SimonEngine::o_setup_cond_c() { - Item *item = _item_1; setup_cond_c_helper(); - _item_1_ptr = item; _object_item = _hitarea_object_item; if (_object_item == _dummy_item_2) @@ -1940,8 +1926,6 @@ void SimonEngine::handle_verb_clicked(uint verb) { Subroutine *sub; int result; - _item_1_ptr = _item_1; - _object_item = _hitarea_object_item; if (_object_item == _dummy_item_2) { _object_item = getItem1Ptr(); diff --git a/simon/simon.h b/simon/simon.h index 7661934fbc..af5548b59b 100644 --- a/simon/simon.h +++ b/simon/simon.h @@ -204,7 +204,7 @@ protected: FillOrCopyStruct *_fcs_ptr_1; Item *_subject_item, *_object_item; - Item *_item_1_ptr, *_item_ptr_B; + Item *_item_1_ptr; Item *_item_1; Item *_hitarea_object_item; @@ -360,7 +360,6 @@ public: protected: int allocGamePcVars(File *in); - Item *allocItem1(); void loginPlayerHelper(Item *item, int a, int b); void loginPlayer(); void allocateStringTable(int num); |