TSAGE: R2R changes to UI disablement to match the original

This commit is contained in:
Paul Gilbert 2013-10-07 10:11:50 -04:00
parent 303261482d
commit 402b7a0371
2 changed files with 14 additions and 7 deletions

View File

@ -3324,20 +3324,24 @@ void Player::postInit(SceneObjectList *OwnerList) {
void Player::disableControl() {
_canWalk = false;
_uiEnabled = false;
g_globals->_events.setCursor(CURSOR_NONE);
_enabled = false;
if ((g_vm->getGameID() != GType_Ringworld) && T2_GLOBALS._uiElements._active)
T2_GLOBALS._uiElements.hide();
if (g_vm->getGameID() != GType_Ringworld2) {
_uiEnabled = false;
if ((g_vm->getGameID() != GType_Ringworld) && T2_GLOBALS._uiElements._active)
T2_GLOBALS._uiElements.hide();
}
}
void Player::enableControl() {
CursorType cursor;
_canWalk = true;
_uiEnabled = true;
_enabled = true;
if (g_vm->getGameID() != GType_Ringworld2)
_uiEnabled = true;
switch (g_vm->getGameID()) {
case GType_BlueForce:
@ -3345,7 +3349,7 @@ void Player::enableControl() {
cursor = g_globals->_events.getCursor();
g_globals->_events.setCursor(cursor);
if (T2_GLOBALS._uiElements._active)
if (g_vm->getGameID() == GType_BlueForce && T2_GLOBALS._uiElements._active)
T2_GLOBALS._uiElements.show();
break;

View File

@ -2601,8 +2601,10 @@ void Scene250::synchronize(Serializer &s) {
void Scene250::postInit(SceneObjectList *OwnerList) {
loadScene(250);
SceneExt::postInit();
BF_GLOBALS._interfaceY = 200;
R2_GLOBALS._player.postInit();
R2_GLOBALS._uiElements._active = false;
R2_GLOBALS._player.setVisage(10);
R2_GLOBALS._player.hide();
R2_GLOBALS._player.enableControl();
@ -6944,17 +6946,18 @@ Scene825::Scene825(): SceneExt() {
}
void Scene825::postInit(SceneObjectList *OwnerList) {
SceneExt::postInit();
loadScene(825);
R2_GLOBALS._player._uiEnabled = false;
SceneExt::postInit();
BF_GLOBALS._interfaceY = 200;
R2_GLOBALS._player.postInit();
R2_GLOBALS._uiElements._active = false;
R2_GLOBALS._player._effect = 0;
R2_GLOBALS._player.setVisage(10);
R2_GLOBALS._player.hide();
R2_GLOBALS._player.disableControl();
_console.setDetails(1, 825, 3, 4, 5);
_background.setDetails(Rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT), 825, 0, -1, -1, 1, NULL);