From acc49e9fe9b80985e5715ff62e33e4752557b076 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Tue, 29 Oct 2013 08:03:54 +0100 Subject: TSAGE: Fix CID 1047257 and 1002397 --- engines/tsage/globals.cpp | 28 ++++++++++++++++++++++++++++ engines/tsage/globals.h | 8 ++++---- 2 files changed, 32 insertions(+), 4 deletions(-) (limited to 'engines') diff --git a/engines/tsage/globals.cpp b/engines/tsage/globals.cpp index ff5814461c..9d4545bf89 100644 --- a/engines/tsage/globals.cpp +++ b/engines/tsage/globals.cpp @@ -259,6 +259,19 @@ BlueForceGlobals::BlueForceGlobals(): TsAGE2Globals() { _mapLocationId = 1; _clip1Bullets = 8; _clip2Bullets = 8; + + _dayNumber = 0; + _tonyDialogCtr = 0; + _marinaWomanCtr = 0; + _kateDialogCtr = 0; + _v4CEB6 = 0; + _safeCombination = 0; + _gateStatus = 0; + _greenDay5TalkCtr = 0; + _v4CEC4 = 0; + _v4CEC8 = 1; + _v4CECA = 0; + _v4CECC = 0; } void BlueForceGlobals::synchronize(Serializer &s) { @@ -428,6 +441,21 @@ Ringworld2Globals::Ringworld2Globals() { _v5780C = 0; _v5780E = 0; _v57810 = 0; + + _fadePaletteFlag = false; + _insetUp = 0; + _frameEdgeColor = 2; + _v558C2 = 0; + _animationCtr = 0; + _electromagnetChangeAmount = 0; + _electromagnetZoom = 0; + _v565E5 = 0; + _v565E7 = 0; + _v565E9 = -5; + _v565EB = 26; + _foodCount = 0; + _rimLocation = 0; + _rimTransportLocation = 0; } Ringworld2Globals::~Ringworld2Globals() { diff --git a/engines/tsage/globals.h b/engines/tsage/globals.h index 5083eec974..6493229175 100644 --- a/engines/tsage/globals.h +++ b/engines/tsage/globals.h @@ -194,7 +194,7 @@ public: int _safeCombination; int _gateStatus; int _greenDay5TalkCtr; - int _v4CEC4; + int _v4CEC4; // Useless variable int _v4CEC8; int _v4CECA; int _v4CECC; @@ -259,17 +259,17 @@ public: byte _fadePaletteMap[10][256]; byte _paletteMap[4096]; int _insetUp; - int _frameEdgeColor; // _v421e + int _frameEdgeColor; Rect _v5589E; Rect _v558B6; - int _v558C2; + int _v558C2; // Unused variable. The original seems to use it only in the context of the cheat mode int _animationCtr; int _electromagnetChangeAmount; int _electromagnetZoom; int _v565E5; int _v565E7; int _v565E9; - int _v565EB; + int _v565EB; // CHECKME: IS it a constant? int _foodCount; int _rimLocation; int _rimTransportLocation; -- cgit v1.2.3