aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2004-01-03 22:21:56 +0000
committerMax Horn2004-01-03 22:21:56 +0000
commit105895da46818a2e440fa419aab7fb1bc5818f47 (patch)
tree8cb1055c25f0042cdf8699710a04a9a01329801a
parentacc4aa0fc286474d1145ba59715c0dd2b1b8f760 (diff)
downloadscummvm-rg350-105895da46818a2e440fa419aab7fb1bc5818f47.tar.gz
scummvm-rg350-105895da46818a2e440fa419aab7fb1bc5818f47.tar.bz2
scummvm-rg350-105895da46818a2e440fa419aab7fb1bc5818f47.zip
cleanup
svn-id: r12121
-rw-r--r--scumm/gfx.cpp34
-rw-r--r--scumm/gfx.h3
-rw-r--r--scumm/saveload.cpp2
-rw-r--r--scumm/scumm.h1
-rw-r--r--scumm/scummvm.cpp5
5 files changed, 7 insertions, 38 deletions
diff --git a/scumm/gfx.cpp b/scumm/gfx.cpp
index 3b3f4a38bd..3ce635dd75 100644
--- a/scumm/gfx.cpp
+++ b/scumm/gfx.cpp
@@ -211,30 +211,6 @@ Gdi::Gdi(ScummEngine *vm) {
_roomPalette += 16;
}
-void ScummEngine::getGraphicsPerformance() {
- int i;
-
- for (i = 10; i != 0; i--) {
- initScreens(0, _screenWidth, _screenHeight);
- }
-
- if (VAR_PERFORMANCE_1 != 0xFF) // Variable is reserved for game scripts in earlier games
- VAR(VAR_PERFORMANCE_1) = 0;
-
- for (i = 10; i != 0; i--) {
- virtscr[0].setDirtyRange(0, _screenHeight); //ender
- drawDirtyScreenParts();
- }
-
- if (VAR_PERFORMANCE_2 != 0xFF) // Variable is reserved for game scripts in earlier games
- VAR(VAR_PERFORMANCE_2) = 0;
-
- if (_version >= 7)
- initScreens(0, _screenWidth, _screenHeight);
- else
- initScreens(16, _screenWidth, 144);
-}
-
void ScummEngine::initScreens(int b, int w, int h) {
int i;
@@ -258,7 +234,6 @@ void ScummEngine::initScreens(int b, int w, int h) {
_screenB = b;
_screenH = h;
-
}
void ScummEngine::initVirtScreen(int slot, int number, int top, int width, int height, bool twobufs,
@@ -281,10 +256,9 @@ void ScummEngine::initVirtScreen(int slot, int number, int top, int width, int h
vs->alloctwobuffers = twobufs;
vs->scrollable = scrollable;
vs->xstart = 0;
- size = vs->width * vs->height;
- vs->size = size;
vs->backBuf = NULL;
+ size = vs->width * vs->height;
if (vs->scrollable) {
if (_version >= 7) {
size += _screenWidth * 8;
@@ -603,7 +577,7 @@ void ScummEngine::initBGBuffers(int height) {
byte *room;
if (_version >= 7) {
- initVirtScreen(0, 0, virtscr[0].topline, _screenWidth, height, 1, 1);
+ initVirtScreen(kMainVirtScreen, 0, virtscr[0].topline, _screenWidth, height, 1, 1);
}
room = getResourceAddress(rtRoom, _roomResource);
@@ -2238,7 +2212,7 @@ void ScummEngine::fadeOut(int effect) {
// Fill screen 0 with black
- memset(vs->screenPtr + vs->xstart, 0, vs->size);
+ memset(vs->screenPtr + vs->xstart, 0, vs->width * vs->height);
// Fade to black with the specified effect, if any.
switch (effect) {
@@ -2395,7 +2369,7 @@ void ScummEngine::dissolveEffect(int width, int height) {
if (width == 1 && height == 1) {
// Optimized case for pixel-by-pixel dissolve
- for (i = 0; i < vs->size; i++)
+ for (i = 0; i < vs->width * vs->height; i++)
offsets[i] = i;
for (i = 1; i < w * h; i++) {
diff --git a/scumm/gfx.h b/scumm/gfx.h
index 367f92b4fe..ff12ebfee4 100644
--- a/scumm/gfx.h
+++ b/scumm/gfx.h
@@ -59,7 +59,6 @@ struct VirtScreen {
int number;
uint16 topline;
uint16 width, height;
- int size;
byte alloctwobuffers;
bool scrollable;
uint16 xstart;
@@ -194,7 +193,7 @@ public:
};
-// If you wan to try buggy hacked smooth scrolling support in The Dig, enable
+// If you want to try buggy hacked smooth scrolling support in The Dig, enable
// the following preprocessor flag by uncommenting it.
//
// Note: This is purely experimental, NOT WORKING COMPLETLY and very buggy.
diff --git a/scumm/saveload.cpp b/scumm/saveload.cpp
index 18c1bfc9d9..f7f45a82ba 100644
--- a/scumm/saveload.cpp
+++ b/scumm/saveload.cpp
@@ -161,7 +161,7 @@ bool ScummEngine::loadState(int slot, bool compat, SaveFileManager *mgr) {
gdi._mask.right = gdi._mask.bottom = 0;
_charset->_hasMask = false;
- initScreens(0, _screenWidth, _screenHeight);
+ initScreens(kMainVirtScreen, _screenWidth, _screenHeight);
// Force a fade to black
int old_screenEffectFlag = _screenEffectFlag;
diff --git a/scumm/scumm.h b/scumm/scumm.h
index 18b6851be7..97f7d551b6 100644
--- a/scumm/scumm.h
+++ b/scumm/scumm.h
@@ -791,7 +791,6 @@ protected:
StripTable *_roomStrips;
- void getGraphicsPerformance();
void initScreens(int b, int w, int h);
void initVirtScreen(int slot, int number, int top, int width, int height, bool twobufs, bool scrollable);
void initBGBuffers(int height);
diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp
index 91768c9d5e..f57789b2f8 100644
--- a/scumm/scummvm.cpp
+++ b/scumm/scummvm.cpp
@@ -925,7 +925,7 @@ void ScummEngine::launch() {
_verbRedraw = false;
allocResTypeData(rtBuffer, MKID('NONE'), 10, "buffer", 0);
- initVirtScreen(0, 0, 0, _screenWidth, _screenHeight, false, false);
+// initVirtScreen(kMainVirtScreen, 0, 0, _screenWidth, _screenHeight, false, false); // FIXME - why is this here? It seems we could remove it in f
setupScummVars();
@@ -1168,9 +1168,6 @@ void ScummEngine::scummInit() {
initScummVars();
- // FIXME: disabled, why we need this, it's looks completly dummy and slow down startup
- // getGraphicsPerformance();
-
_lastSaveTime = _system->get_msecs();
}