aboutsummaryrefslogtreecommitdiff
path: root/engines/cine/cine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/cine/cine.cpp')
-rw-r--r--engines/cine/cine.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/engines/cine/cine.cpp b/engines/cine/cine.cpp
index c50af52901..e6ac2859cf 100644
--- a/engines/cine/cine.cpp
+++ b/engines/cine/cine.cpp
@@ -48,10 +48,9 @@
namespace Cine {
-Sound *g_sound;
-Common::SaveFileManager *g_saveFileMan;
+Sound *g_sound = 0;
-CineEngine *g_cine;
+CineEngine *g_cine = 0;
CineEngine::CineEngine(OSystem *syst, const CINEGameDescription *gameDesc) : Engine(syst), _gameDescription(gameDesc) {
DebugMan.addDebugChannel(kCineDebugScript, "Script", "Script debug level");
@@ -72,7 +71,7 @@ CineEngine::CineEngine(OSystem *syst, const CINEGameDescription *gameDesc) : Eng
}
CineEngine::~CineEngine() {
- if (g_cine->getGameType() == Cine::GType_OS) {
+ if (getGameType() == Cine::GType_OS) {
freeErrmessDat();
}
DebugMan.clearAllDebugChannels();
@@ -82,13 +81,12 @@ Common::Error CineEngine::run() {
// Initialize backend
initGraphics(320, 200, false);
- if (g_cine->getPlatform() == Common::kPlatformPC) {
+ if (getPlatform() == Common::kPlatformPC) {
g_sound = new PCSound(_mixer, this);
} else {
// Paula chipset for Amiga and Atari versions
g_sound = new PaulaSound(_mixer, this);
}
- g_saveFileMan = _saveFileMan;
_restartRequested = false;
@@ -147,9 +145,9 @@ void CineEngine::initialize() {
_timerDelayMultiplier = 12; // Set default speed
setupOpcodes();
- initLanguage(g_cine->getLanguage());
+ initLanguage(getLanguage());
- if (g_cine->getGameType() == Cine::GType_OS) {
+ if (getGameType() == Cine::GType_OS) {
renderer = new OSRenderer;
} else {
renderer = new FWRenderer;
@@ -163,13 +161,13 @@ void CineEngine::initialize() {
// Its size will change when loading data into it with the loadPart function.
partBuffer.clear();
- if (g_cine->getGameType() == Cine::GType_OS) {
+ if (getGameType() == Cine::GType_OS) {
readVolCnf();
}
loadTextData("texte.dat");
- if (g_cine->getGameType() == Cine::GType_OS && !(g_cine->getFeatures() & GF_DEMO)) {
+ if (getGameType() == Cine::GType_OS && !(getFeatures() & GF_DEMO)) {
loadPoldatDat("poldat.dat");
loadErrmessDat("errmess.dat");
}