diff options
author | Strangerke | 2012-01-07 20:33:00 +0100 |
---|---|---|
committer | Strangerke | 2012-01-07 20:33:00 +0100 |
commit | 8327189f8c24d47ca4e746ea0f6b230028b3ed4c (patch) | |
tree | 575d9e5bbc3f415ada054c44cfaa0d84ae818100 /engines/tsage/ringworld2/ringworld2_speakers.cpp | |
parent | beb1f5b316b2d00bc02bf9c4f674278dc71aba7a (diff) | |
download | scummvm-rg350-8327189f8c24d47ca4e746ea0f6b230028b3ed4c.tar.gz scummvm-rg350-8327189f8c24d47ca4e746ea0f6b230028b3ed4c.tar.bz2 scummvm-rg350-8327189f8c24d47ca4e746ea0f6b230028b3ed4c.zip |
TSAGE: R2R - Implement scene 1100
Diffstat (limited to 'engines/tsage/ringworld2/ringworld2_speakers.cpp')
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_speakers.cpp | 166 |
1 files changed, 166 insertions, 0 deletions
diff --git a/engines/tsage/ringworld2/ringworld2_speakers.cpp b/engines/tsage/ringworld2/ringworld2_speakers.cpp index 26ed818819..b5fd99b0b4 100644 --- a/engines/tsage/ringworld2/ringworld2_speakers.cpp +++ b/engines/tsage/ringworld2/ringworld2_speakers.cpp @@ -26,6 +26,7 @@ #include "tsage/graphics.h" #include "tsage/staticres.h" #include "tsage/ringworld2/ringworld2_scenes0.h" +#include "tsage/ringworld2/ringworld2_scenes1.h" #include "tsage/ringworld2/ringworld2_scenes2.h" #include "tsage/ringworld2/ringworld2_scenes3.h" @@ -247,6 +248,64 @@ SpeakerCaretaker2450::SpeakerCaretaker2450() { } //---------------------------------------------------------------------------- +// Classes related to CHIEF +//---------------------------------------------------------------------------- + +SpeakerChief1100::SpeakerChief1100() { + _speakerName = "CHIEF"; + _color1 = 8; + _color2 = 0; + _fieldF6 = 0; + _textWidth = 300; + _hideObjects = false; + _object2 = NULL; + _displayMode = 1; + _numFrames = 0; +} + +void SpeakerChief1100::proc15() { + int v = _fieldF6; + Scene1100 *scene = (Scene1100 *)R2_GLOBALS._sceneManager._scene; + + if (!_object2) { + _object2 = &scene->_actor18; + _object2->hide(); + _object1.postInit(); + _object1.setPosition(_object2->_position); + _object1._numFrames = 7; + + if (_object2->_mover) + _object2->addMover(NULL); + } + + switch (v) { + case 0: + _object1.animate(ANIM_MODE_2, NULL); + break; + case 1: + ((SceneItem *)_action)->_sceneRegionId = 0; + _object1.setup(4080, 1, 1); + _object1.animate(ANIM_MODE_5, this); + break; + case 2: + ((SceneItem *)_action)->_sceneRegionId = 0; + _object1.setup(4080, 3, 1); + _object1.animate(ANIM_MODE_5, this); + break; + case 100: + _numFrames = 0; + ((SceneItem *)_action)->_sceneRegionId = 0; + _object1.setStrip(_object1._strip - 1); + _object1.setFrame(_object1.getFrameCount()); + _object1.animate(ANIM_MODE_6, this); + break; + default: + signal(); + break; + } +} + +//---------------------------------------------------------------------------- // Classes related to GUARD //---------------------------------------------------------------------------- @@ -1046,6 +1105,54 @@ void SpeakerQuinn300::proc15() { } } +void SpeakerQuinn1100::proc15() { + int v = _fieldF6; + + if (!_object2) { + if (v == 0) + return; + + if (R2_GLOBALS._player._characterIndex == 1) { + _object2 = &R2_GLOBALS._player; + } else { + Scene1100 *scene = (Scene1100 *)R2_GLOBALS._sceneManager._scene; + _object2 = &scene->_actor16; + } + + _object2->hide(); + _object1.postInit(); + _object1.setPosition(_object2->_position); + _object1._numFrames = 7; + + if (_object2->_mover) + _object2->addMover(NULL); + } + + switch (v) { + case 0: + _object1.animate(ANIM_MODE_2, NULL); + break; + case 1: + ((SceneItem *)_action)->_sceneRegionId = 0; + _object1.setup(1108, 7, 1); + _object1.animate(ANIM_MODE_5, this); + break; + case 2: + ((SceneItem *)_action)->_sceneRegionId = 0; + _object1.setup(1109, 1, 1); + _object1.animate(ANIM_MODE_5, this); + break; + case 3: + ((SceneItem *)_action)->_sceneRegionId = 0; + _object1.setup(1109, 5, 1); + _object1.animate(ANIM_MODE_5, this); + break; + default: + signal(); + break; + } +} + void SpeakerQuinn2435::proc15() { int v = _fieldF6; @@ -1758,6 +1865,65 @@ void SpeakerSeeker300::proc15() { } } +void SpeakerSeeker1100::proc15() { + int v = _fieldF6; + + if (!_object2) { + if (v == 0) + return; + + if (R2_GLOBALS._player._characterIndex == 2) { + _object2 = &R2_GLOBALS._player; + } else { + Scene1100 *scene = (Scene1100 *)R2_GLOBALS._sceneManager._scene; + _object2 = &scene->_actor16; + } + + _object2->hide(); + _object1.postInit(); + _object1.setPosition(_object2->_position); + _object1._numFrames = 7; + + if (_object2->_mover) + _object2->addMover(NULL); + } + + switch (v) { + case 0: + _object1.animate(ANIM_MODE_2, NULL); + break; + case 1: + ((SceneItem *)_action)->_sceneRegionId = 0; + _object1.setup(1108, 1, 1); + _object1.animate(ANIM_MODE_5, this); + break; + case 2: + ((SceneItem *)_action)->_sceneRegionId = 0; + _object1.setup(1108, 3, 1); + _object1.animate(ANIM_MODE_5, this); + break; + case 3: + _object1.setPosition(Common::Point(197, 134)); + ((SceneItem *)_action)->_sceneRegionId = 0; + _object1.setup(1108, 5, 1); + _object1.animate(ANIM_MODE_5, this); + break; + case 4: + ((SceneItem *)_action)->_sceneRegionId = 0; + _object1.setup(1109, 7, 1); + _object1.animate(ANIM_MODE_5, this); + break; + case 5: + ((SceneItem *)_action)->_sceneRegionId = 0; + _object1.setup(1109, 3, 1); + _object1.animate(ANIM_MODE_5, this); + break; + default: + signal(); + break; + } +} + void SpeakerSeeker2435::proc15() { int v = _fieldF6; |