mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-13 21:31:53 +00:00
TSAGE: Implemented Scene 2400 - Descending in Lander
This commit is contained in:
parent
d5ecc4e788
commit
ec7e751911
@ -1682,6 +1682,10 @@ void SceneObject::setZoom(int percent) {
|
||||
}
|
||||
}
|
||||
|
||||
void SceneObject::updateZoom() {
|
||||
changeZoom(_percent);
|
||||
}
|
||||
|
||||
void SceneObject::changeZoom(int percent) {
|
||||
if (percent == -1)
|
||||
_flags &= ~OBJFLAG_ZOOMED;
|
||||
|
@ -507,6 +507,7 @@ public:
|
||||
void setStrip(int frameNum);
|
||||
void setStrip2(int frameNum);
|
||||
void setZoom(int percent);
|
||||
void updateZoom();
|
||||
void changeZoom(int percent);
|
||||
void setFrame(int frameNum);
|
||||
void setFrame2(int frameNum);
|
||||
|
@ -94,6 +94,8 @@ Scene *SceneFactory::createScene(int sceneNumber) {
|
||||
case 2310: return new Scene2310();
|
||||
// Starcraft - Lander Bay
|
||||
case 2320: return new Scene2320();
|
||||
// Scene 2400 - Descending in Lander
|
||||
case 2400: return new Scene2400();
|
||||
|
||||
/* Scene group 4 */
|
||||
|
||||
|
@ -6034,6 +6034,65 @@ void Scene2320::signal() {
|
||||
}
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------
|
||||
* Scene 2400 - Descending in Lander
|
||||
*
|
||||
*--------------------------------------------------------------------------*/
|
||||
|
||||
void Scene2400::Action1::signal() {
|
||||
switch (_actionIndex++) {
|
||||
case 0:
|
||||
setDelay(60);
|
||||
break;
|
||||
case 1:
|
||||
ADD_MOVER(_globals->_player, 160, 71);
|
||||
break;
|
||||
case 2:
|
||||
ADD_MOVER(_globals->_player, 160, 360);
|
||||
break;
|
||||
case 3:
|
||||
_globals->_player._moveDiff = Common::Point(1, 1);
|
||||
ADD_MOVER(_globals->_player, 140, 375);
|
||||
break;
|
||||
case 4:
|
||||
ADD_MOVER(_globals->_player, 87, 338);
|
||||
break;
|
||||
case 5:
|
||||
_globals->_player.flag100();
|
||||
setDelay(60);
|
||||
break;
|
||||
case 6:
|
||||
_globals->_sceneManager.changeScene(4000);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void Scene2400::Action1::dispatch() {
|
||||
Action::dispatch();
|
||||
if ((_actionIndex == 4) && (_globals->_player._percent > 5))
|
||||
_globals->_player.changeZoom(_globals->_player._percent - 2);
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
void Scene2400::postInit(SceneObjectList *OwnerList) {
|
||||
loadScene(2400);
|
||||
Scene::postInit();
|
||||
setZoomPercents(0, 100, 200, 100);
|
||||
|
||||
_globals->_player.postInit();
|
||||
_globals->_player.setVisage(2410);
|
||||
_globals->_player.setPosition(Common::Point(340, -10));
|
||||
_globals->_player.animate(ANIM_MODE_2, NULL);
|
||||
_globals->_player.disableControl();
|
||||
|
||||
setAction(&_action1);
|
||||
|
||||
_globals->_sceneManager._scene->_sceneBounds.centre(_globals->_player._position.x, _globals->_player._position.y);
|
||||
_globals->_sceneManager._scene->_sceneBounds.contain(_globals->_sceneManager._scene->_backgroundBounds);
|
||||
_globals->_sceneOffset.x = (_globals->_sceneManager._scene->_sceneBounds.left / 160) * 160;
|
||||
|
||||
_globals->_soundHandler.startSound(153);
|
||||
}
|
||||
|
||||
} // End of namespace tSage
|
||||
|
@ -886,6 +886,20 @@ public:
|
||||
virtual void signal();
|
||||
};
|
||||
|
||||
class Scene2400: public Scene {
|
||||
/* Actions */
|
||||
class Action1: public Action {
|
||||
public:
|
||||
virtual void signal();
|
||||
virtual void dispatch();
|
||||
};
|
||||
public:
|
||||
Action1 _action1;
|
||||
SceneObject _object;
|
||||
|
||||
virtual void postInit(SceneObjectList *OwnerList = NULL);
|
||||
};
|
||||
|
||||
} // End of namespace tSage
|
||||
|
||||
#endif
|
||||
|
@ -164,7 +164,7 @@ void SceneManager::setBackSurface() {
|
||||
if (size > 96000) {
|
||||
if (_globals->_sceneManager._scene->_backgroundBounds.width() <= SCREEN_WIDTH) {
|
||||
// Standard size creation
|
||||
_globals->_sceneManager._scene->_backSurface.create(SCREEN_WIDTH, SCREEN_HEIGHT);
|
||||
_globals->_sceneManager._scene->_backSurface.create(SCREEN_WIDTH, SCREEN_HEIGHT * 3 / 2);
|
||||
_globals->_sceneManager._scrollerRect = Rect(0, 30, SCREEN_WIDTH, SCREEN_HEIGHT - 30);
|
||||
} else {
|
||||
// Wide screen needs extra space to allow for scrolling
|
||||
|
Loading…
Reference in New Issue
Block a user