aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/gui/gui_screen.cpp14
-rw-r--r--engines/sci/gui/gui_screen.h2
2 files changed, 4 insertions, 12 deletions
diff --git a/engines/sci/gui/gui_screen.cpp b/engines/sci/gui/gui_screen.cpp
index 555387e537..f9a63c3d81 100644
--- a/engines/sci/gui/gui_screen.cpp
+++ b/engines/sci/gui/gui_screen.cpp
@@ -46,10 +46,10 @@ SciGuiScreen::SciGuiScreen(int16 width, int16 height, int16 scaleFactor) :
_displayHeight = _height * scaleFactor;
_displayPixels = _displayWidth * _displayHeight;
- _visualScreen = initScreen(_pixels);
- _priorityScreen = initScreen(_pixels);
- _controlScreen = initScreen(_pixels);
- _displayScreen = initScreen(_displayPixels);
+ _visualScreen = (byte *)calloc(_pixels, 1);
+ _priorityScreen = (byte *)calloc(_pixels, 1);
+ _controlScreen = (byte *)calloc(_pixels, 1);
+ _displayScreen = (byte *)calloc(_displayPixels, 1);
// Sets display screen to be actually displayed
_activeScreen = _displayScreen;
@@ -70,12 +70,6 @@ SciGuiScreen::~SciGuiScreen() {
free(_displayScreen);
}
-byte *SciGuiScreen::initScreen(uint16 pixelCount) {
- byte *screen = (byte *)malloc(pixelCount);
- memset(screen, 0, pixelCount);
- return screen;
-}
-
void SciGuiScreen::copyToScreen() {
g_system->copyRectToScreen(_activeScreen, _displayWidth, 0, 0, _displayWidth, _displayHeight);
}
diff --git a/engines/sci/gui/gui_screen.h b/engines/sci/gui/gui_screen.h
index 0a631e980a..c9af0a6ff8 100644
--- a/engines/sci/gui/gui_screen.h
+++ b/engines/sci/gui/gui_screen.h
@@ -44,8 +44,6 @@ public:
SciGuiScreen(int16 width = 320, int16 height = 200, int16 scaleFactor = 1);
~SciGuiScreen();
- byte *initScreen(uint16 pixelCount);
-
void copyToScreen();
byte getDrawingMask(byte color, byte prio, byte control);