aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sword2/driver/driver96.h5
-rw-r--r--sword2/driver/misc.cpp2
-rw-r--r--sword2/driver/palette.cpp6
-rw-r--r--sword2/driver/rdwin.cpp4
-rw-r--r--sword2/sword2.cpp5
-rw-r--r--sword2/sword2.h1
6 files changed, 11 insertions, 12 deletions
diff --git a/sword2/driver/driver96.h b/sword2/driver/driver96.h
index 0e10ff3b06..5a65643aa2 100644
--- a/sword2/driver/driver96.h
+++ b/sword2/driver/driver96.h
@@ -1050,8 +1050,9 @@
#include <stdio.h>
#include <string.h>
-#include "scummsys.h"
-#include "engine.h" // for warning()
+#include "common/scummsys.h"
+#include "common/engine.h" // for warning()
+#include "common/system.h"
#include "system.h"
#include "file.h"
//#include "ddraw.h"
diff --git a/sword2/driver/misc.cpp b/sword2/driver/misc.cpp
index 87ce34e989..ab7232aaf3 100644
--- a/sword2/driver/misc.cpp
+++ b/sword2/driver/misc.cpp
@@ -22,7 +22,7 @@
#include "../sword2.h"
uint32 SVM_timeGetTime(void) {
- return g_sword2->_syst->get_msecs();
+ return g_system->get_msecs();
}
void SVM_VirtualUnlock(uint8 *free_memman, uint32 total_free_memory) {
diff --git a/sword2/driver/palette.cpp b/sword2/driver/palette.cpp
index a969399554..dbc039720d 100644
--- a/sword2/driver/palette.cpp
+++ b/sword2/driver/palette.cpp
@@ -423,7 +423,7 @@ void FadeServer(void *)
currentTime = SVM_timeGetTime();
if (currentTime >= fadeStartTime + fadeTotalTime) {
fadeStatus = RDFADE_NONE;
- g_sword2->_syst->set_palette((const byte *) palCopy, 0, 256);
+ g_system->set_palette((const byte *) palCopy, 0, 256);
} else {
fadeMultiplier = (int16) (((int32) (currentTime - fadeStartTime) * 256) / fadeTotalTime);
for (i=0; i<256; i++) {
@@ -431,7 +431,7 @@ void FadeServer(void *)
fadePalette[i][1] = (palCopy[i][1] * fadeMultiplier) >> 8;
fadePalette[i][2] = (palCopy[i][2] * fadeMultiplier) >> 8;
}
- g_sword2->_syst->set_palette((const byte *) fadePalette, 0, 256);
+ g_system->set_palette((const byte *) fadePalette, 0, 256);
}
break;
@@ -448,7 +448,7 @@ void FadeServer(void *)
fadePalette[i][2] = (palCopy[i][2] * fadeMultiplier) >> 8;
}
}
- g_sword2->_syst->set_palette((const byte *) fadePalette, 0, 256);
+ g_system->set_palette((const byte *) fadePalette, 0, 256);
break;
}
diff --git a/sword2/driver/rdwin.cpp b/sword2/driver/rdwin.cpp
index e2a2f52fe5..a42d92fb26 100644
--- a/sword2/driver/rdwin.cpp
+++ b/sword2/driver/rdwin.cpp
@@ -168,7 +168,7 @@ void Sword2State::parseEvents() {
case OSystem::EVENT_MOUSEMOVE:
mousex = event.mouse.x;
mousey = event.mouse.y;
- _syst->set_mouse_pos(event.mouse.x, event.mouse.y);
+ _system->set_mouse_pos(event.mouse.x, event.mouse.y);
break;
case OSystem::EVENT_LBUTTONDOWN:
LogMouseEvent(RD_LEFTBUTTONDOWN);
@@ -537,7 +537,7 @@ int32 CloseAppWindow(void)
DestroyWindow(hwnd);
*/
// just quit for now
- g_sword2->_syst->quit();
+ g_system->quit();
return(RD_OK);
}
diff --git a/sword2/sword2.cpp b/sword2/sword2.cpp
index dfb66b5176..e7dcf62bff 100644
--- a/sword2/sword2.cpp
+++ b/sword2/sword2.cpp
@@ -103,7 +103,6 @@ Sword2State::Sword2State(GameDetector *detector, OSystem *syst)
: Engine(detector, syst) {
_detector = detector;
- _syst = syst;
g_sword2 = this;
_features = detector->_game.features;
_gameId = detector->_game.id;
@@ -270,14 +269,14 @@ void Sword2State::go()
return;
}
- _paletteMutex = _syst->create_mutex();
+ _paletteMutex = _system->create_mutex();
_timer->installProcedure(&FadeServer, 40000 / 25);
Zdebug("CALLING: InitialiseDisplay");
// rv = InitialiseDisplay(640, 480, 8, RD_FULLSCREEN);
- _syst->init_size(640, 480);
+ _system->init_size(640, 480);
rv = RD_OK;
Zdebug("RETURNED with rv = %.8x", rv);
diff --git a/sword2/sword2.h b/sword2/sword2.h
index 972d23d711..621f2fd556 100644
--- a/sword2/sword2.h
+++ b/sword2/sword2.h
@@ -57,7 +57,6 @@ class Sword2State : public Engine {
void parseEvents(void);
void Start_game(void);
int32 InitialiseGame(void);
- OSystem *_syst;
GameDetector *_detector;
uint32 _features;
byte _gameId;