[Scummvm-cvs-logs] CVS: scummvm/scumm charset.cpp,2.78,2.79 gfx.cpp,2.253,2.254 gfx.h,1.55,1.56
Max Horn
fingolfin at users.sourceforge.net
Tue Jan 6 04:17:02 CET 2004
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv9077
Modified Files:
charset.cpp gfx.cpp gfx.h
Log Message:
get rid of VirtScreen::scrollable
Index: charset.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/charset.cpp,v
retrieving revision 2.78
retrieving revision 2.79
diff -u -d -r2.78 -r2.79
--- charset.cpp 6 Jan 2004 11:47:34 -0000 2.78
+++ charset.cpp 6 Jan 2004 12:16:28 -0000 2.79
@@ -1085,7 +1085,7 @@
_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;
Index: gfx.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/gfx.cpp,v
retrieving revision 2.253
retrieving revision 2.254
diff -u -d -r2.253 -r2.254
--- gfx.cpp 6 Jan 2004 12:08:35 -0000 2.253
+++ gfx.cpp 6 Jan 2004 12:16:28 -0000 2.254
@@ -217,12 +217,11 @@
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 @@
_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
Index: gfx.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/gfx.h,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -d -r1.55 -r1.56
--- gfx.h 6 Jan 2004 11:52:12 -0000 1.55
+++ gfx.h 6 Jan 2004 12:16:28 -0000 1.56
@@ -75,8 +75,8 @@
* 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 @@
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;
More information about the Scummvm-git-logs
mailing list