aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorMax Horn2009-10-07 22:53:32 +0000
committerMax Horn2009-10-07 22:53:32 +0000
commit5d07a657f0619d197c8ababec32f1022a5d4f2e4 (patch)
tree5a31ac7a7ff139ae1b8586bf80090b987cbb58f9 /engines/sci
parente8a13197e3958b7d8472c8519cb060407266eb14 (diff)
downloadscummvm-rg350-5d07a657f0619d197c8ababec32f1022a5d4f2e4.tar.gz
scummvm-rg350-5d07a657f0619d197c8ababec32f1022a5d4f2e4.tar.bz2
scummvm-rg350-5d07a657f0619d197c8ababec32f1022a5d4f2e4.zip
SCI: Get rid of SciGuiScreen::initScreen, also known as 'calloc' elsewhere ;)
svn-id: r44766
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);