TWINE: replaced magic numbers

This commit is contained in:
Martin Gerhardy 2020-10-25 22:04:33 +01:00
parent 05bc119526
commit 7f8c588af9
3 changed files with 8 additions and 8 deletions

View File

@ -97,8 +97,8 @@ void MenuOptions::showCredits() {
int32 tmpShadowMode = _engine->cfgfile.ShadowMode;
_engine->cfgfile.ShadowMode = 0;
_engine->_gameState->initEngineVars();
_engine->_scene->currentSceneIdx = 119;
_engine->_scene->needChangeScene = 119;
_engine->_scene->currentSceneIdx = LBA1SceneId::Credits_List_Sequence;
_engine->_scene->needChangeScene = LBA1SceneId::Credits_List_Sequence;
_engine->gameEngineLoop();

View File

@ -307,8 +307,8 @@ void Scene::changeScene() {
int32 a;
// change twinsen house destroyed hard-coded
if (needChangeScene == 4 && _engine->_gameState->gameFlags[30] != 0) {
needChangeScene = 118;
if (needChangeScene == LBA1SceneId::Citadel_Island_near_twinsens_house && _engine->_gameState->gameFlags[30] != 0) {
needChangeScene = LBA1SceneId::Citadel_Island_Twinsens_house_destroyed;
}
// local backup previous scene
@ -330,7 +330,7 @@ void Scene::changeScene() {
// TODO: treat holomap trajectories
if (needChangeScene == 116 || needChangeScene == 117) {
if (needChangeScene == LBA1SceneId::Citadel_Island_end_sequence_1 || needChangeScene == LBA1SceneId::Citadel_Island_end_sequence_2) {
_engine->_text->currentTextBank = 10;
}

View File

@ -246,7 +246,7 @@ public:
uint8 *currentScene = nullptr;
int32 needChangeScene = 0;
int32 needChangeScene = LBA1SceneId::Citadel_Island_Prison;
int32 currentSceneIdx = 0;
int32 previousSceneIdx = 0;