Skip to content

Commit

Permalink
TSAGE: Expanded a lot of game Id checks for Blue Force to include Rin…
Browse files Browse the repository at this point in the history
…gworld 2 as well
  • Loading branch information
dreammaster committed Oct 26, 2011
1 parent 9ccb2ee commit e93c847
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
14 changes: 7 additions & 7 deletions engines/tsage/core.cpp
Expand Up @@ -2810,7 +2810,7 @@ void SceneText::synchronize(Serializer &s) {
void SceneText::updateScreen() {
// FIXME: Hack for Blue Force to handle not refreshing the screen if the user interface
// has been re-activated after showing some scene text
if ((g_vm->getGameID() != GType_BlueForce) || (_bounds.top < UI_INTERFACE_Y) ||
if ((g_vm->getGameID() == GType_Ringworld) || (_bounds.top < UI_INTERFACE_Y) ||
!T2_GLOBALS._uiElements._visible)
SceneObject::updateScreen();
}
Expand Down Expand Up @@ -2944,7 +2944,7 @@ void Player::disableControl() {
g_globals->_events.setCursor(CURSOR_NONE);
_enabled = false;

if ((g_vm->getGameID() == GType_BlueForce) && T2_GLOBALS._uiElements._active)
if ((g_vm->getGameID() != GType_Ringworld) && T2_GLOBALS._uiElements._active)
T2_GLOBALS._uiElements.hide();
}

Expand Down Expand Up @@ -2992,7 +2992,7 @@ void Player::process(Event &event) {
(g_globals->_events.getCursor() == CURSOR_WALK) && g_globals->_player._canWalk &&
(_position != event.mousePos) && g_globals->_sceneObjects->contains(this)) {

if ((g_vm->getGameID() == GType_BlueForce) && !BF_GLOBALS._player._enabled)
if ((g_vm->getGameID() != GType_Ringworld) && !BF_GLOBALS._player._enabled)
return;

PlayerMover *newMover = new PlayerMover();
Expand All @@ -3011,7 +3011,7 @@ void Player::synchronize(Serializer &s) {
s.syncAsByte(_uiEnabled);
s.syncAsSint16LE(_field8C);

if (g_vm->getGameID() == GType_BlueForce)
if (g_vm->getGameID() != GType_Ringworld)
s.syncAsByte(_enabled);
}

Expand Down Expand Up @@ -3829,7 +3829,7 @@ void SceneHandler::process(Event &event) {
}

// Mouse press handling
bool enabled = (g_vm->getGameID() == GType_BlueForce) ? g_globals->_player._enabled :
bool enabled = (g_vm->getGameID() != GType_Ringworld) ? g_globals->_player._enabled :
g_globals->_player._uiEnabled;
if (enabled && (event.eventType == EVENT_BUTTON_DOWN) && !g_globals->_sceneItems.empty()) {
// Check if the mouse is on the player
Expand Down Expand Up @@ -3861,7 +3861,7 @@ void SceneHandler::process(Event &event) {
g_globals->_events.setCursor(CURSOR_USE);
}

if (g_vm->getGameID() == GType_BlueForce)
if (g_vm->getGameID() != GType_Ringworld)
event.handled = true;
} else if (g_vm->getGameID() != GType_Ringworld) {
event.handled = true;
Expand Down Expand Up @@ -3917,7 +3917,7 @@ void SceneHandler::dispatch() {
do {
process(event);
} while (g_globals->_events.getEvent(event));
} else if (g_vm->getGameID() == GType_BlueForce) {
} else if (g_vm->getGameID() != GType_Ringworld) {
// For Blue Force, 'none' events need to be generated in the absence of any
event.eventType = EVENT_NONE;
event.mousePos = g_globals->_events._mousePos;
Expand Down
4 changes: 2 additions & 2 deletions engines/tsage/events.cpp
Expand Up @@ -251,8 +251,8 @@ void EventsClass::setCursor(CursorType cursorType) {
if (delFlag)
DEALLOCATE(cursor);

// For Blue Force, enable the question button when an inventory icon is selected
if (g_vm->getGameID() == GType_BlueForce)
// For Blue Force and Return to Ringworld, enable the question button when an inventory icon is selected
if (g_vm->getGameID() != GType_Ringworld)
T2_GLOBALS._uiElements._question.setEnabled(questionEnabled);
}

Expand Down
5 changes: 3 additions & 2 deletions engines/tsage/scenes.cpp
Expand Up @@ -456,8 +456,9 @@ void Scene::refreshBackground(int xAmount, int yAmount) {
(xSectionSrc + 1) * 160, (ySectionSrc + 1) * 100);
Rect destBounds(xSectionDest * 160, ySectionDest * 100,
(xSectionDest + 1) * 160, (ySectionDest + 1) * 100);
if (g_vm->getGameID() == GType_BlueForce) {
// For Blue Force, if the scene has an interface area, exclude it from the copy
if (g_vm->getGameID() != GType_Ringworld) {
// For Blue Force and Return to Ringworld, if the scene has an interface area,
// exclude it from the copy
srcBounds.bottom = MIN<int16>(srcBounds.bottom, BF_GLOBALS._interfaceY);
destBounds.bottom = MIN<int16>(destBounds.bottom, BF_GLOBALS._interfaceY);
}
Expand Down

0 comments on commit e93c847

Please sign in to comment.