TSAGE: R2R - Implement scene 3230

This commit is contained in:
Strangerke 2011-12-22 15:01:50 +01:00
parent e10060f262
commit fc671351cf
5 changed files with 126 additions and 0 deletions

View File

@ -193,6 +193,8 @@ Scene *Ringworld2Game::createScene(int sceneNumber) {
// Cutscene : Guards in cargo zone
return new Scene3220();
case 3230:
// Cutscene : Guards on duty
return new Scene3230();
case 3240:
case 3245:
case 3250:

View File

@ -1002,5 +1002,31 @@ void Scene3220::signal() {
R2_GLOBALS._sceneManager.changeScene(1200);
}
/*--------------------------------------------------------------------------
* Scene 3230 - Cutscene : Guards on duty
*
*--------------------------------------------------------------------------*/
void Scene3230::postInit(SceneObjectList *OwnerList) {
loadScene(3230);
R2_GLOBALS._v58CE2 = 0;
SceneExt::postInit();
_stripManager.addSpeaker(&_rockoSpeaker);
_stripManager.addSpeaker(&_jockoSpeaker);
R2_GLOBALS._player.postInit();
R2_GLOBALS._player.hide();
R2_GLOBALS._player.disableControl();
_actor1.postInit();
_actor2.postInit();
_actor3.postInit();
setAction(&_sequenceManager, this, 3230 + R2_GLOBALS._randomSource.getRandomNumber(1), &_actor1, &_actor2, &_actor3, NULL);
}
void Scene3230::signal() {
R2_GLOBALS._sceneManager.changeScene(1200);
}
} // End of namespace Ringworld2
} // End of namespace TsAGE

View File

@ -223,6 +223,19 @@ public:
virtual void postInit(SceneObjectList *OwnerList = NULL);
virtual void signal();
};
class Scene3230 : public SceneExt {
public:
SpeakerRocko3230 _rockoSpeaker;
SpeakerJocko3230 _jockoSpeaker;
SceneActor _actor1;
SceneActor _actor2;
SceneActor _actor3;
SequenceManager _sequenceManager;
virtual void postInit(SceneObjectList *OwnerList = NULL);
virtual void signal();
};
} // End of namespace Ringworld2
} // End of namespace TsAGE

View File

@ -1298,5 +1298,75 @@ void SpeakerJocko3220::proc15() {
}
}
SpeakerRocko3230::SpeakerRocko3230() {
_speakerName = "Rocko";
_color1 = 5;
_color2 = 0;
_fieldF6 = 0;
_textWidth = 300;
_hideObjects = false;
_object2 = NULL;
_displayMode = 1;
_numFrames = 0;
}
void SpeakerRocko3230::proc15() {
int v = _fieldF6;
Scene3230 *scene = (Scene3230 *)R2_GLOBALS._sceneManager._scene;
if (!_object2) {
_object2 = &scene->_actor1;
_object2->hide();
_object1.postInit();
_object1.setPosition(_object2->_position);
if (_object2->_mover)
_object2->addMover(NULL);
}
if (v == 0) {
_object1.animate(ANIM_MODE_2, NULL);
} else {
((SceneItem *)_action)->_sceneRegionId = 0;
_object1.setup(4111, (_object2->_strip * 2) - 1, 1);
_object1.animate(ANIM_MODE_5, this);
}
}
SpeakerJocko3230::SpeakerJocko3230() {
_speakerName = "Jocko";
_color1 = 45;
_color2 = 0;
_fieldF6 = 0;
_textWidth = 300;
_hideObjects = false;
_object2 = NULL;
_displayMode = 1;
_numFrames = 0;
}
void SpeakerJocko3230::proc15() {
int v = _fieldF6;
Scene3230 *scene = (Scene3230 *)R2_GLOBALS._sceneManager._scene;
if (!_object2) {
_object2 = &scene->_actor2;
_object2->hide();
_object1.postInit();
_object1.setPosition(_object2->_position);
if (_object2->_mover)
_object2->addMover(NULL);
}
if (v == 0) {
_object1.animate(ANIM_MODE_2, NULL);
} else {
((SceneItem *)_action)->_sceneRegionId = 0;
_object1.setup(4060, (_object2->_strip * 2) - 1, 1);
_object1.animate(ANIM_MODE_5, this);
}
}
} // End of namespace Ringworld2
} // End of namespace TsAGE

View File

@ -325,6 +325,21 @@ public:
virtual void proc15();
};
class SpeakerRocko3230 : public VisualSpeaker {
public:
SpeakerRocko3230();
virtual Common::String getClassName() { return "SpeakerRocko3230"; }
virtual void proc15();
};
class SpeakerJocko3230 : public VisualSpeaker {
public:
SpeakerJocko3230();
virtual Common::String getClassName() { return "SpeakerJocko3230"; }
virtual void proc15();
};
} // End of namespace Ringworld2
} // End of namespace TsAGE