aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorMax Horn2004-01-06 12:16:28 +0000
committerMax Horn2004-01-06 12:16:28 +0000
commit2ecf66d5610df289b9d936e59c153c81a64ebef5 (patch)
treeaec8930e0a07a6bb88f1b197a703d53c89bf7174 /scumm
parentf5f357498f27e63b2ca5dee6513f6af41087d64d (diff)
downloadscummvm-rg350-2ecf66d5610df289b9d936e59c153c81a64ebef5.tar.gz
scummvm-rg350-2ecf66d5610df289b9d936e59c153c81a64ebef5.tar.bz2
scummvm-rg350-2ecf66d5610df289b9d936e59c153c81a64ebef5.zip
get rid of VirtScreen::scrollable
svn-id: r12173
Diffstat (limited to 'scumm')
-rw-r--r--scumm/charset.cpp2
-rw-r--r--scumm/gfx.cpp11
-rw-r--r--scumm/gfx.h16
3 files changed, 7 insertions, 22 deletions
diff --git a/scumm/charset.cpp b/scumm/charset.cpp
index 8295941e55..3884163537 100644
--- a/scumm/charset.cpp
+++ b/scumm/charset.cpp
@@ -1085,7 +1085,7 @@ void CharsetRendererClassic::printChar(int chr) {
_vm->markRectAsDirty(vs->number, _left, _left + width, drawTop, drawTop + height + offsY, 0);
- if (vs->number != kMainVirtScreen)
+ if (!vs->hasTwoBuffers)
_blitAlso = false;
if (vs->number == kMainVirtScreen && !_ignoreCharsetMask)
_hasMask = true;
diff --git a/scumm/gfx.cpp b/scumm/gfx.cpp
index 478e1c2200..45ede03d73 100644
--- a/scumm/gfx.cpp
+++ b/scumm/gfx.cpp
@@ -217,12 +217,11 @@ void ScummEngine::initVirtScreen(VirtScreenNumber slot, int number, int top, int
vs->topline = top;
vs->height = height;
vs->hasTwoBuffers = twobufs;
- vs->scrollable = scrollable;
vs->xstart = 0;
vs->backBuf = NULL;
size = vs->width * vs->height;
- if (vs->scrollable) {
+ if (scrollable) {
// Allow enough spaces so that rooms can be up to 4 resp. 8 screens
// wide. To achieve (horizontal!) scrolling, we use a neat trick:
// only the offset into the screen buffer (xstart) is changed. That way
@@ -936,13 +935,7 @@ void Gdi::drawBitmap(const byte *ptr, VirtScreen *vs, int x, int y, const int wi
_vertStripNextInc = height * vs->width - 1;
- sx = x;
- // FIXME / TODO: This is the only place vs->scrollable is ever checked, and
- // I think we can simply remove the condition and always use xstart - it
- // should always be 0 for any non-scrolling virtual screen, after all.
- assert(vs->scrollable || !vs->xstart);
- if (vs->scrollable)
- sx -= vs->xstart / 8;
+ sx = x - vs->xstart / 8;
//
// Since V3, all graphics data was encoded in strips, which is very efficient
diff --git a/scumm/gfx.h b/scumm/gfx.h
index eda59d2829..19e89557eb 100644
--- a/scumm/gfx.h
+++ b/scumm/gfx.h
@@ -75,8 +75,8 @@ enum VirtScreenNumber {
* It seems that it is not used at all by ScummVM, so we probably could just
* get rid of it and save a couple kilobytes of RAM.
*
- * Each of these virtual screens has a fixed number or id (see also the
- * VirtScreenNumber enum).
+ * Each of these virtual screens has a fixed number or id (see also
+ * \ref VirtScreenNumber).
*/
struct VirtScreen {
/**
@@ -102,17 +102,9 @@ struct VirtScreen {
uint16 height;
/**
- * Flag indicating that this virtual screen allows (horizontal) scrolling.
- * This is always only true for the main screen (stage)! After all, verbs
- * and the conversation text box don't have to scroll.
- * @todo Get rid of this, there is only one place where it is used,
- * and there it is trivial to remove the usage.
- */
- bool scrollable;
-
- /**
* Horizontal scroll offset, tells how far the screen is scrolled to the
- * right. Only used for the main screen.
+ * right. Only used for the main screen. After all, verbs and the
+ * conversation text box don't have to scroll.
*/
uint16 xstart;