[Scummvm-cvs-logs] CVS: scummvm/scumm gfx.cpp,2.323,2.324
Max Horn
fingolfin at users.sourceforge.net
Fri Sep 24 16:22:06 CEST 2004
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm gfx.h,1.77,1.78 gfx.cpp,2.322,2.323 scumm.h,1.495,1.496
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm gfx.cpp,2.324,2.325 gfx.h,1.78,1.79
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27213
Modified Files:
gfx.cpp
Log Message:
Some clipping for updateDirtyScreen; Evil hack to fix an actor drawing glitch in V7_SMOOTH_SCROLLING_HACK mode (which, by the way, works pretty well now)
Index: gfx.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/gfx.cpp,v
retrieving revision 2.323
retrieving revision 2.324
diff -u -d -r2.323 -r2.324
--- gfx.cpp 24 Sep 2004 22:31:33 -0000 2.323
+++ gfx.cpp 24 Sep 2004 23:21:15 -0000 2.324
@@ -322,6 +322,14 @@
bottom = vs->h;
if (virt == kMainVirtScreen && dirtybit) {
+#ifdef V7_SMOOTH_SCROLLING_HACK
+ if (_version >= 7) {
+ // FIXME / HACK: This is a hack to fix an actor redraw glitch
+ // in V7_SMOOTH_SCROLLING_HACK mode. Right now I have no idea
+ // why this hack is needed, but for now it works well enough.
+ lp = left / 8 + _screenStartStrip - 1;
+ } else
+#endif
lp = left / 8 + _screenStartStrip;
if (lp < 0)
lp = 0;
@@ -410,14 +418,19 @@
int i;
int w = 8;
int start = 0;
+#ifdef V7_SMOOTH_SCROLLING_HACK
+ const int numStrips = MIN(_vm->_screenStartStrip + _numStrips, _vm->_roomWidth / 8) - _vm->_screenStartStrip;
+#else
+ const int numStrips = _numStrips;
+#endif
- for (i = 0; i < _numStrips; i++) {
+ for (i = 0; i < numStrips; i++) {
if (vs->bdirty[i]) {
const int top = vs->tdirty[i];
const int bottom = vs->bdirty[i];
vs->tdirty[i] = vs->h;
vs->bdirty[i] = 0;
- if (i != (_numStrips - 1) && vs->bdirty[i + 1] == bottom && vs->tdirty[i + 1] == top) {
+ if (i != (numStrips - 1) && vs->bdirty[i + 1] == bottom && vs->tdirty[i + 1] == top) {
// Simple optimizations: if two or more neighbouring strips
// form one bigger rectangle, coalesce them.
w += 8;
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm gfx.h,1.77,1.78 gfx.cpp,2.322,2.323 scumm.h,1.495,1.496
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm gfx.cpp,2.324,2.325 gfx.h,1.78,1.79
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list