[Scummvm-cvs-logs] scummvm master -> ff93aef6ec86cb00778a36a28909b6c0e9ed0c08
Strangerke
Strangerke at scummvm.org
Mon Jun 9 18:03:36 CEST 2014
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
ff93aef6ec CRUISE: Initialize some variables in the contractor, change some variables to boolean
Commit: ff93aef6ec86cb00778a36a28909b6c0e9ed0c08
https://github.com/scummvm/scummvm/commit/ff93aef6ec86cb00778a36a28909b6c0e9ed0c08
Author: Strangerke (strangerke at scummvm.org)
Date: 2014-06-09T17:53:27+02:00
Commit Message:
CRUISE: Initialize some variables in the contractor, change some variables to boolean
Changed paths:
engines/cruise/cruise.cpp
engines/cruise/cruise_main.cpp
engines/cruise/function.cpp
engines/cruise/mainDraw.cpp
engines/cruise/saveload.cpp
engines/cruise/various.cpp
engines/cruise/various.h
diff --git a/engines/cruise/cruise.cpp b/engines/cruise/cruise.cpp
index 6dcb0b1..5c1a37a 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 c3b6cd0..6b09e1d 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 b9a074b..33f3bba 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 31fafbb..98e7e66 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 8d66e82..8e64faa 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 a7d701f..df09ac9 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 c2ff1e2..94fc291 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);
More information about the Scummvm-git-logs
mailing list