aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/sci/gui/gui_screen.cpp10
-rw-r--r--engines/sci/gui/gui_screen.h4
-rw-r--r--engines/sci/sci.cpp2
3 files changed, 7 insertions, 9 deletions
diff --git a/engines/sci/gui/gui_screen.cpp b/engines/sci/gui/gui_screen.cpp
index f493eb050d..1079b4c3f9 100644
--- a/engines/sci/gui/gui_screen.cpp
+++ b/engines/sci/gui/gui_screen.cpp
@@ -33,8 +33,8 @@
namespace Sci {
-SciGuiScreen::SciGuiScreen(OSystem *system, int16 width, int16 height, int16 scaleFactor) :
- _system(system), _width(width), _height(height) {
+SciGuiScreen::SciGuiScreen(int16 width, int16 height, int16 scaleFactor) :
+ _width(width), _height(height) {
int i;
uint16 base = 0;
@@ -73,7 +73,7 @@ byte *SciGuiScreen::initScreen(uint16 pixelCount) {
}
void SciGuiScreen::copyToScreen() {
- _system->copyRectToScreen(_displayScreen, _displayWidth, 0, 0, _displayWidth, _displayHeight);
+ g_system->copyRectToScreen(_displayScreen, _displayWidth, 0, 0, _displayWidth, _displayHeight);
}
byte SciGuiScreen::getDrawingMask(byte color, byte prio, byte control) {
@@ -205,7 +205,7 @@ void SciGuiScreen::setPalette(GuiPalette*pal) {
// just copy palette to system
byte bpal[4 * 256];
// Get current palette, update it and put back
- _system->grabPalette(bpal, 0, 256);
+ g_system->grabPalette(bpal, 0, 256);
for (int16 i = 0; i < 256; i++) {
if (!pal->colors[i].used)
continue;
@@ -214,7 +214,7 @@ void SciGuiScreen::setPalette(GuiPalette*pal) {
bpal[i * 4 + 2] = pal->colors[i].b * pal->intensity[i] / 100;
bpal[i * 4 + 3] = 100;
}
- _system->setPalette(bpal, 0, 256);
+ g_system->setPalette(bpal, 0, 256);
}
// Currently not really done, its supposed to be possible to only dither _visualScreen
diff --git a/engines/sci/gui/gui_screen.h b/engines/sci/gui/gui_screen.h
index 196e0e1cab..c3f2be95b8 100644
--- a/engines/sci/gui/gui_screen.h
+++ b/engines/sci/gui/gui_screen.h
@@ -41,7 +41,7 @@ namespace Sci {
class SciGuiScreen {
public:
- SciGuiScreen(OSystem *system, int16 width = 320, int16 height = 200, int16 scaleFactor = 1);
+ SciGuiScreen(int16 width = 320, int16 height = 200, int16 scaleFactor = 1);
~SciGuiScreen();
byte *initScreen(uint16 pixelCount);
@@ -76,8 +76,6 @@ private:
void restoreBitsScreen(Common::Rect rect, byte *&memoryPtr, byte *screen);
void saveBitsScreen(Common::Rect rect, byte *screen, byte *&memoryPtr);
- OSystem *_system;
-
uint16 _baseTable[SCI_SCREEN_MAXHEIGHT];
uint16 _baseDisplayTable[SCI_SCREEN_MAXHEIGHT];
diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp
index e8d4d49a23..9ffbb4cee2 100644
--- a/engines/sci/sci.cpp
+++ b/engines/sci/sci.cpp
@@ -157,7 +157,7 @@ Common::Error SciEngine::run() {
GfxState gfx_state;
_gamestate->gfx_state = &gfx_state;
- SciGuiScreen *screen = new SciGuiScreen(_system);
+ SciGuiScreen *screen = new SciGuiScreen();
SciGuiPalette *palette = new SciGuiPalette(_gamestate, screen);
SciGuiCursor *cursor = new SciGuiCursor(_gamestate, palette);