aboutsummaryrefslogtreecommitdiff
path: root/engines/cruise
diff options
context:
space:
mode:
authorStrangerke2014-06-09 17:53:27 +0200
committerStrangerke2014-06-09 17:53:27 +0200
commitff93aef6ec86cb00778a36a28909b6c0e9ed0c08 (patch)
treed1fc39fea1a68179b51de7a64df36615c6df059e /engines/cruise
parent0a1c75bc32cc6198c29874d8a3ef96bf1acb6404 (diff)
downloadscummvm-rg350-ff93aef6ec86cb00778a36a28909b6c0e9ed0c08.tar.gz
scummvm-rg350-ff93aef6ec86cb00778a36a28909b6c0e9ed0c08.tar.bz2
scummvm-rg350-ff93aef6ec86cb00778a36a28909b6c0e9ed0c08.zip
CRUISE: Initialize some variables in the contractor, change some variables to boolean
Diffstat (limited to 'engines/cruise')
-rw-r--r--engines/cruise/cruise.cpp25
-rw-r--r--engines/cruise/cruise_main.cpp2
-rw-r--r--engines/cruise/function.cpp2
-rw-r--r--engines/cruise/mainDraw.cpp2
-rw-r--r--engines/cruise/saveload.cpp4
-rw-r--r--engines/cruise/various.cpp4
-rw-r--r--engines/cruise/various.h4
7 files changed, 19 insertions, 24 deletions
diff --git a/engines/cruise/cruise.cpp b/engines/cruise/cruise.cpp
index 6dcb0b1432..5c1a37a8eb 100644
--- a/engines/cruise/cruise.cpp
+++ b/engines/cruise/cruise.cpp
@@ -50,6 +50,16 @@ CruiseEngine::CruiseEngine(OSystem * syst, const CRUISEGameDescription *gameDesc
_debugger = new Debugger();
_sound = new PCSound(_mixer, this);
+ PCFadeFlag = false;
+ _preLoad = false;
+ _savedCursor = CURSOR_NOMOUSE;
+ lastTick = 0;
+ lastTickDebug = 0;
+ _gameSpeed = GAME_FRAME_DELAY_1;
+ _speedFlag = false;
+ _polyStructs = nullptr;
+ _polyStruct = nullptr;
+
// Setup mixer
syncSoundSettings();
}
@@ -87,9 +97,6 @@ Common::Error CruiseEngine::run() {
Cruise::changeCursor(Cruise::CURSOR_NORMAL);
CursorMan.showMouse(true);
- lastTick = 0;
- lastTickDebug = 0;
-
mainLoop();
deinitialize();
@@ -98,24 +105,12 @@ Common::Error CruiseEngine::run() {
}
void CruiseEngine::initialize() {
- PCFadeFlag = 0;
- _gameSpeed = GAME_FRAME_DELAY_1;
- _speedFlag = false;
-
- /*volVar1 = 0;
- * fileData1 = 0; */
-
- /*PAL_fileHandle = -1; */
-
// video init stuff
-
initSystem();
gfxModuleData_Init();
// another bit of video init
-
readVolCnf();
- _vm->_polyStruct = NULL;
}
void CruiseEngine::deinitialize() {
diff --git a/engines/cruise/cruise_main.cpp b/engines/cruise/cruise_main.cpp
index c3b6cd01d6..6b09e1dc65 100644
--- a/engines/cruise/cruise_main.cpp
+++ b/engines/cruise/cruise_main.cpp
@@ -1937,7 +1937,7 @@ void CruiseEngine::mainLoop() {
if (displayOn) {
if (doFade)
- PCFadeFlag = 0;
+ PCFadeFlag = false;
/*if (!PCFadeFlag)*/
mainDraw(userWait);
diff --git a/engines/cruise/function.cpp b/engines/cruise/function.cpp
index b9a074ba54..33f3bbaf4a 100644
--- a/engines/cruise/function.cpp
+++ b/engines/cruise/function.cpp
@@ -644,7 +644,7 @@ int16 Op_FadeOut() {
flip();
fadeFlag = 1;
- PCFadeFlag = 1;
+ PCFadeFlag = true;
return 0;
}
diff --git a/engines/cruise/mainDraw.cpp b/engines/cruise/mainDraw.cpp
index 31fafbb641..98e7e66aa6 100644
--- a/engines/cruise/mainDraw.cpp
+++ b/engines/cruise/mainDraw.cpp
@@ -120,7 +120,7 @@ void fadeIn() {
gfxModuleData_setPal256(workpal);
fadeFlag = 0;
- PCFadeFlag = 0;
+ PCFadeFlag = false;
}
void flipScreen() {
diff --git a/engines/cruise/saveload.cpp b/engines/cruise/saveload.cpp
index 8d66e82d37..8e64faa14c 100644
--- a/engines/cruise/saveload.cpp
+++ b/engines/cruise/saveload.cpp
@@ -735,7 +735,7 @@ void initVars() {
resetBackgroundIncrustList(&backgroundIncrustHead);
vblLimit = 0;
- remdo = 0;
+ remdo = false;
songLoaded = 0;
songPlayed = 0;
songLoop = 1;
@@ -777,7 +777,7 @@ void initVars() {
buttonDown = 0;
var41 = 0;
playerMenuEnabled = 0;
- PCFadeFlag = 0;
+ PCFadeFlag = false;
}
Common::Error saveSavegameData(int saveGameIdx, const Common::String &saveName) {
diff --git a/engines/cruise/various.cpp b/engines/cruise/various.cpp
index a7d701f9a1..df09ac92c8 100644
--- a/engines/cruise/various.cpp
+++ b/engines/cruise/various.cpp
@@ -24,8 +24,8 @@
namespace Cruise {
-uint16 remdo = 0;
-uint16 PCFadeFlag;
+bool remdo = false;
+bool PCFadeFlag;
char *getText(int textIndex, int overlayIndex) {
if (!overlayTable[overlayIndex].ovlData) {
diff --git a/engines/cruise/various.h b/engines/cruise/various.h
index c2ff1e22bb..94fc29173a 100644
--- a/engines/cruise/various.h
+++ b/engines/cruise/various.h
@@ -27,8 +27,8 @@
namespace Cruise {
-extern uint16 remdo;
-extern uint16 PCFadeFlag;
+extern bool remdo;
+extern bool PCFadeFlag;
int16 objInit(int ovlIdx, int param1, int param2);
char *getText(int textIndex, int overlayIndex);