TsAGE: Fix an instant crash in scene 100.

This isn't really a hack: the engine expects things to be done in a particular
order, which wasn't so strict in the original BF. The code is adapted accordingly.
This commit is contained in:
Strangerke 2011-09-27 22:45:37 +02:00
parent dfadac1558
commit 2e40e47437

View file

@ -166,24 +166,29 @@ Scene100::Scene100(): SceneExt() {
}
void Scene100::postInit(SceneObjectList *OwnerList) {
SceneExt::postInit();
if (BF_GLOBALS._dayNumber < 6) {
// Title
loadScene(100);
} else {
// Credits
loadScene(101);
}
BF_GLOBALS._scenePalette.loadPalette(2);
BF_GLOBALS._v51C44 = 1;
Scene::postInit();
BF_GLOBALS._interfaceY = SCREEN_HEIGHT;
_globals->_player.enableControl();
_globals->_player.postInit();
_globals->_player.hide();
_globals->_player.disableControl();
_index = 109;
if (BF_GLOBALS._dayNumber < 6) {
// Title
loadScene(100);
BF_GLOBALS._sound1.play(2);
setAction(&_action2, this);
} else {
// Credits
loadScene(101);
BF_GLOBALS._sound1.play(118);
setAction(&_action1, this);
}