Skip to content

Commit

Permalink
TSAGE: R2R Demo - Fix some incomplete tests on GF_DEMO
Browse files Browse the repository at this point in the history
  • Loading branch information
Strangerke committed Jan 1, 2014
1 parent 92b8dbf commit bade0e4
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 33 deletions.
2 changes: 1 addition & 1 deletion engines/tsage/events.cpp
Expand Up @@ -156,7 +156,7 @@ void EventsClass::setCursor(CursorType cursorType) {
// No cursor
g_globals->setFlag(122);

if ((g_vm->getFeatures() & GF_DEMO) || (g_vm->getGameID() != GType_Ringworld)) {
if ((g_vm->getGameID() != GType_Ringworld) || ((g_vm->getGameID() == GType_Ringworld) && (g_vm->getFeatures() & GF_DEMO))) {
CursorMan.showMouse(false);
return;
}
Expand Down
64 changes: 33 additions & 31 deletions engines/tsage/globals.cpp
Expand Up @@ -64,17 +64,39 @@ Globals::Globals() : _dialogCenter(160, 140), _gfxManagerInstance(_screenSurface
_stripNum = 0;
_gfxEdgeAdjust = 3;

if (g_vm->getFeatures() & GF_DEMO) {
_gfxFontNumber = 0;
_gfxColors.background = 6;
_gfxColors.foreground = 0;
_fontColors.background = 255;
_fontColors.foreground = 6;
_dialogCenter.y = 80;
// Workaround in order to use later version of the engine
_color1 = _gfxColors.foreground;
_color2 = _gfxColors.foreground;
_color3 = _gfxColors.foreground;
if (g_vm->getGameID() == GType_Ringworld) {
if (g_vm->getFeatures() & GF_DEMO) {
_gfxFontNumber = 0;
_gfxColors.background = 6;
_gfxColors.foreground = 0;
_fontColors.background = 255;
_fontColors.foreground = 6;
_dialogCenter.y = 80;
// Workaround in order to use later version of the engine
_color1 = _gfxColors.foreground;
_color2 = _gfxColors.foreground;
_color3 = _gfxColors.foreground;
} else if (g_vm->getFeatures() & GF_CD) {
_gfxFontNumber = 50;
_gfxColors.background = 53;
_gfxColors.foreground = 0;
_fontColors.background = 51;
_fontColors.foreground = 54;
_color1 = 18;
_color2 = 18;
_color3 = 18;
} else {
// Floppy version
_gfxFontNumber = 50;
_gfxColors.background = 53;
_gfxColors.foreground = 18;
_fontColors.background = 51;
_fontColors.foreground = 54;
// Workaround in order to use later version of the engine
_color1 = _gfxColors.foreground;
_color2 = _gfxColors.foreground;
_color3 = _gfxColors.foreground;
}
} else if (g_vm->getGameID() == GType_BlueForce) {
// Blue Force
_gfxFontNumber = 0;
Expand All @@ -94,26 +116,6 @@ Globals::Globals() : _dialogCenter(160, 140), _gfxManagerInstance(_screenSurface
_color2 = 15;
_color3 = 4;
_dialogCenter.y = 100;
} else if ((g_vm->getGameID() == GType_Ringworld) && (g_vm->getFeatures() & GF_CD)) {
_gfxFontNumber = 50;
_gfxColors.background = 53;
_gfxColors.foreground = 0;
_fontColors.background = 51;
_fontColors.foreground = 54;
_color1 = 18;
_color2 = 18;
_color3 = 18;
} else {
// Ringworld
_gfxFontNumber = 50;
_gfxColors.background = 53;
_gfxColors.foreground = 18;
_fontColors.background = 51;
_fontColors.foreground = 54;
// Workaround in order to use later version of the engine
_color1 = _gfxColors.foreground;
_color2 = _gfxColors.foreground;
_color3 = _gfxColors.foreground;
}
_screenSurface.setScreenSurface();
_gfxManagers.push_back(&_gfxManagerInstance);
Expand Down
5 changes: 4 additions & 1 deletion engines/tsage/graphics.cpp
Expand Up @@ -1390,7 +1390,10 @@ void GfxManager::copyFrom(GfxSurface &src, const Rect &srcBounds, const Rect &de


GfxFont::GfxFont() {
_fontNumber = (g_vm->getFeatures() & GF_DEMO) ? 0 : 50;
if ((g_vm->getGameID() == GType_Ringworld) && (g_vm->getFeatures() & GF_DEMO))
_fontNumber = 0;
else
_fontNumber = 50;
_numChars = 0;
_bpp = 0;
_fontData = NULL;
Expand Down

0 comments on commit bade0e4

Please sign in to comment.