TsAGE: Add scene 935

Currently not working due to missing palette functions
This commit is contained in:
Strangerke 2011-09-26 08:14:11 +02:00
parent 3eb8c9f123
commit cfb12c8f91
3 changed files with 204 additions and 22 deletions

View file

@ -170,7 +170,9 @@ Scene *BlueForceGame::createScene(int sceneNumber) {
// Inside Warehouse: Secret room
return new Scene920();
case 930:
error("Scene group 9 not implemented");
case 935:
return new Scene935();
case 940:
error("Scene group 9 not implemented");
default:

View file

@ -902,5 +902,163 @@ void Scene920::synchronize(Serializer &s) {
s.syncAsSint16LE(_oldCoord.y);
}
/*--------------------------------------------------------------------------
* Scene 935 - ?
*
*--------------------------------------------------------------------------*/
void Scene935::Action1::signal() {
Scene935 *scene = (Scene935 *)BF_GLOBALS._sceneManager._scene;
static uint32 v50ECC = 0, v50EEE = 0, v50F2A = 0, v50F66 = 0;
switch (_actionIndex++) {
case 0:
scene->addFader((const byte *)&v50ECC, 100, this);
break;
case 1:
scene->_visualSpeaker.setText("Jake! Hide in the closet!");
// for (int i = 1; i < 21; i++)
// scene->sub_15E4F(&v50EEA, 5 * i, 935, 0, 0, 0, 255, 249, 255, 1);
warning("Scene935::Action1::signal(): sub_15E4F");
setDelay(3);
break;
case 2:
scene->addFader((const byte *)&v50EEE, 5, this);
break;
case 3:
scene->_visualSpeaker.removeText();
scene->_visualSpeaker._textPos.y = scene->_sceneBounds.top + 80;
scene->_visualSpeaker._color1 = 252;
scene->_visualSpeaker._color1 = 251;
scene->_visualSpeaker.setText("Jake! Hide in the closet!");
setDelay(3);
break;
case 4:
scene->_visualSpeaker.setText("Jake! Hide in the closet!");
// for (int i = 1; i < 21; i++)
// scene->sub_15E4F(&v50F26, 5 * i, 935, 0, 0, 0, 255, 249, 255, 1);
warning("Scene935::Action1::signal(): sub_15E4F");
setDelay(3);
break;
case 5:
scene->addFader((const byte *)&v50F2A, 5, this);
break;
case 6:
scene->_visualSpeaker.removeText();
scene->_visualSpeaker._textPos.y = scene->_sceneBounds.top + 150;
scene->_visualSpeaker._color1 = 250;
scene->_visualSpeaker._color1 = 249;
scene->_visualSpeaker.setText("Jake! Hide in the closet!");
setDelay(3);
break;
case 7:
scene->_visualSpeaker.setText("Jake! Hide in the closet!");
// for (int i = 1; i < 21; i++)
// scene->sub_15E4F(&v50F62, 5 * i, 935, 0, 0, 0, 255, 249, 255, 1);
warning("Scene935::Action1::signal(): sub_15E4F");
setDelay(3);
break;
case 8:
scene->addFader((const byte *)&v50F66, 5, this);
break;
case 9:
scene->_visualSpeaker.removeText();
setDelay(3);
break;
case 10:
scene->_sceneMode = 1;
// scene->sub_15DD6(&v50F6A, 5, 935, this);
warning("Scene935::Action1::signal(): sub_15DD6");
remove();
break;
default:
break;
}
}
void Scene935::postInit(SceneObjectList *OwnerList) {
PalettedScene::postInit();
loadScene(935);
BF_GLOBALS._interfaceY = 200;
BF_GLOBALS._player.disableControl();
_visualSpeaker._textMode = ALIGN_CENTER;
_visualSpeaker._hideObjects = false;
_visualSpeaker._color1 = 254;
_visualSpeaker._color2 = 253;
_visualSpeaker._textPos.y = _sceneBounds.top + 18;
_visualSpeaker._textWidth = 300;
_visualSpeaker._textPos.x = _sceneBounds.left + 10;
setAction(&_action1);
BF_GLOBALS._sound1.fadeSound(67);
}
void Scene935::remove() {
BF_GLOBALS._sound1.fadeOut2(NULL);
BF_GLOBALS._scrollFollower = &BF_GLOBALS._player;
PalettedScene::remove();
}
void Scene935::signal() {
static uint32 v50EC8 = 0;
switch (_sceneMode) {
case 1:
_object1.postInit();
if (BF_GLOBALS._sceneManager._previousScene == 810) {
BF_GLOBALS._player.disableControl();
_sceneMode = 9352;
setAction(&_sequenceManager, this, 9350, &_object1, NULL);
} else if (BF_GLOBALS._sceneManager._previousScene == 930) {
_object3.postInit();
_object3.setVisage(938);
_object3.fixPriority(255);
_object3.setPosition(Common::Point(260, -4));
BF_GLOBALS._player.disableControl();
_sceneMode = 0;
setAction(&_sequenceManager, this, 9354, &_object1, &_object3, NULL);
} else {
_sceneMode = 9351;
setAction(&_sequenceManager, this, 9350, &_object1, NULL);
}
break;
case 2:
BF_GLOBALS._sound1.play(68);
_sceneMode = 0;
addFader((const byte *)&v50EC8, 5, this);
break;
case 3:
_sceneMode = 2;
_object1.animate(ANIM_MODE_6, NULL);
signal();
break;
case 9351:
BF_GLOBALS._player.disableControl();
_sceneMode = 2;
setAction(&_sequenceManager, this, 9351, &_object1, NULL);
if (BF_GLOBALS._sceneManager._previousScene == 910)
_sceneMode = 9353;
break;
case 9352:
BF_GLOBALS._player.disableControl();
_sceneMode = 2;
setAction(&_sequenceManager, this, 9352, &_object1, NULL);
break;
case 9353:
_object2.postInit();
BF_GLOBALS._player.disableControl();
_sceneMode = 3;
setAction(&_sequenceManager, this, 9353, &_object1, &_object2, NULL);
break;
default:
BF_GLOBALS._sceneManager.changeScene(BF_GLOBALS._sceneManager._previousScene);
break;
}
}
void Scene935::dispatch() {
SceneExt::dispatch();
}
} // End of namespace BlueForce
} // End of namespace TsAGE

View file

@ -43,50 +43,50 @@ class Scene900: public PalettedScene {
/* Items */
class Item1: public NamedHotspot {
public:
virtual bool startAction(CursorType action, Event &event);
bool startAction(CursorType action, Event &event);
};
class Item4: public NamedHotspot {
public:
virtual bool startAction(CursorType action, Event &event);
bool startAction(CursorType action, Event &event);
};
/* Objects */
class Object1: public NamedObject {
public:
virtual bool startAction(CursorType action, Event &event);
bool startAction(CursorType action, Event &event);
};
class Object2: public NamedObjectExt {
public:
virtual bool startAction(CursorType action, Event &event);
bool startAction(CursorType action, Event &event);
};
class Object3: public NamedObjectExt {
public:
virtual bool startAction(CursorType action, Event &event);
bool startAction(CursorType action, Event &event);
};
class Object6: public NamedObject {
public:
virtual bool startAction(CursorType action, Event &event);
bool startAction(CursorType action, Event &event);
};
class Object7: public NamedObject {
public:
virtual bool startAction(CursorType action, Event &event);
bool startAction(CursorType action, Event &event);
};
/* Actions */
class Action1 : public Action {
public:
virtual void signal();
void signal();
};
class Action2 : public Action {
public:
virtual void signal();
void signal();
};
class Action3 : public Action {
public:
virtual void signal();
void signal();
};
class Action4 : public Action {
public:
virtual void signal();
void signal();
};
public:
@ -114,10 +114,10 @@ public:
int _field1976;
Scene900();
virtual void postInit(SceneObjectList *OwnerList = NULL);
virtual void signal();
virtual void process(Event &event);
virtual void dispatch();
void postInit(SceneObjectList *OwnerList = NULL);
void signal();
void process(Event &event);
void dispatch();
void synchronize(Serializer &s);
};
@ -125,11 +125,11 @@ class Scene920: public PalettedScene {
/* Items */
class Item1: public NamedHotspot {
public:
virtual bool startAction(CursorType action, Event &event);
bool startAction(CursorType action, Event &event);
};
class Item8: public NamedHotspot {
public:
virtual bool startAction(CursorType action, Event &event);
bool startAction(CursorType action, Event &event);
};
public:
@ -150,14 +150,36 @@ public:
Item8 _exitN;
Common::Point _oldCoord;
virtual void postInit(SceneObjectList *OwnerList = NULL);
virtual void signal();
virtual void process(Event &event);
virtual void dispatch();
void postInit(SceneObjectList *OwnerList = NULL);
void signal();
void process(Event &event);
void dispatch();
void synchronize(Serializer &s);
};
} // End of namespace BlueForce
class Scene935: public PalettedScene {
/* Actions */
class Action1 : public Action {
public:
void signal();
};
public:
ScenePalette _scenePalette;
SequenceManager _sequenceManager;
NamedObject _object1;
NamedObject _object2;
NamedObject _object3;
Action1 _action1;
VisualSpeaker _visualSpeaker;
void postInit(SceneObjectList *OwnerList = NULL);
void remove();
void signal();
void dispatch();
};
} // End of namespace BlueForce
} // End of namespace TsAGE
#endif