[Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.337,1.338 gfx.cpp,2.427,2.428 gfx.h,1.115,1.116 script_v7he.cpp,2.138,2.139 script_v90he.cpp,2.206,2.207 scumm.cpp,1.396,1.397 scumm.h,1.556,1.557 sprite_he.cpp,1.115,1.116 wiz_he.cpp,2.35,2.36
kirben
kirben at users.sourceforge.net
Sat Apr 2 06:25:43 CEST 2005
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19798/scumm
Modified Files:
actor.cpp gfx.cpp gfx.h script_v7he.cpp script_v90he.cpp
scumm.cpp scumm.h sprite_he.cpp wiz_he.cpp
Log Message:
Cleanup
Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/actor.cpp,v
retrieving revision 1.337
retrieving revision 1.338
diff -u -d -r1.337 -r1.338
--- actor.cpp 1 Apr 2005 14:46:58 -0000 1.337
+++ actor.cpp 2 Apr 2005 14:24:23 -0000 1.338
@@ -1171,6 +1171,15 @@
}
}
+void ScummEngine::redrawAllActors() {
+ int j;
+
+ for (j = 1; j < _numActors; j++) {
+ _actors[j]._needRedraw = true;
+ _actors[j]._needBgReset = true;
+ }
+}
+
void ScummEngine::setActorRedrawFlags() {
int i, j;
@@ -1927,7 +1936,6 @@
break;
default:
error("unimplemented compression type %d", comp);
- break;
}
}
const uint8 *axur = findResourceData(MKID('AXUR'), auxd);
@@ -1938,7 +1946,7 @@
int y1 = (int16)READ_LE_UINT16(axur + 2) + dy;
int x2 = (int16)READ_LE_UINT16(axur + 4) + dx;
int y2 = (int16)READ_LE_UINT16(axur + 6) + dy;
- markRectAsDirty(kMainVirtScreen, x1, x2, y1, y2 + 1);
+ markRectAsDirty(kMainVirtScreen, x1, x2, y1, y2 + 1, a->_number);
axur += 8;
}
}
Index: gfx.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/gfx.cpp,v
retrieving revision 2.427
retrieving revision 2.428
diff -u -d -r2.427 -r2.428
--- gfx.cpp 1 Apr 2005 01:41:18 -0000 2.427
+++ gfx.cpp 2 Apr 2005 14:24:24 -0000 2.428
@@ -777,21 +777,16 @@
return;
}
- int val = 0;
if (camera._cur.x != camera._last.x && _charset->_hasMask)
stopTalk();
byte *room = getResourceAddress(rtRoomImage, _roomResource) + _IM00_offs;
- if (findResource(MKID('BMAP'), room) != NULL) {
- if (_fullRedraw) {
- _bgNeedsRedraw = false;
- gdi.drawBMAPBg(room, &virtscr[0]);
- }
- } else if (findResource(MKID('SMAP'), room) == NULL) {
- warning("redrawBGAreas(): Both SMAP and BMAP are missing...");
+ if (_fullRedraw) {
+ _bgNeedsRedraw = false;
+ gdi.drawBMAPBg(room, &virtscr[0]);
}
- drawRoomObjects(val);
+ drawRoomObjects(0);
_bgNeedsRedraw = false;
}
@@ -1629,7 +1624,7 @@
}
}
-void Gdi::copyVirtScreenBuffers(Common::Rect rect) {
+void Gdi::copyVirtScreenBuffers(Common::Rect rect, int dirtybit) {
byte *src, *dst;
VirtScreen *vs = &_vm->virtscr[0];
Index: gfx.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/gfx.h,v
retrieving revision 1.115
retrieving revision 1.116
diff -u -d -r1.115 -r1.116
--- gfx.h 28 Mar 2005 22:37:29 -0000 1.115
+++ gfx.h 2 Apr 2005 14:24:40 -0000 1.116
@@ -290,7 +290,7 @@
void drawBMAPBg(const byte *ptr, VirtScreen *vs);
void drawBMAPObject(const byte *ptr, VirtScreen *vs, int obj, int x, int y, int w, int h);
- void copyVirtScreenBuffers(Common::Rect rect);
+ void copyVirtScreenBuffers(Common::Rect rect, int dirtybit = 0);
byte *getMaskBuffer(int x, int y, int z);
void disableZBuffer() { _zbufferDisabled = true; }
Index: script_v7he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v7he.cpp,v
retrieving revision 2.138
retrieving revision 2.139
diff -u -d -r2.138 -r2.139
--- script_v7he.cpp 31 Mar 2005 21:38:58 -0000 2.138
+++ script_v7he.cpp 2 Apr 2005 14:24:40 -0000 2.139
@@ -748,11 +748,11 @@
break;
case 24:
_skipProcessActors = 1;
- _fullRedraw = 1;
+ redrawAllActors();
break;
case 25:
_skipProcessActors = 0;
- _fullRedraw = 1;
+ redrawAllActors();
break;
case 30:
a = derefActor(args[1], "o70_kernelSetFunctions: 30");
Index: script_v90he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v90he.cpp,v
retrieving revision 2.206
retrieving revision 2.207
diff -u -d -r2.206 -r2.207
--- script_v90he.cpp 1 Apr 2005 12:43:12 -0000 2.206
+++ script_v90he.cpp 2 Apr 2005 14:24:41 -0000 2.207
@@ -2307,11 +2307,11 @@
break;
case 24:
_skipProcessActors = 1;
- //_fullRedraw = 1;
+ redrawAllActors();
break;
case 25:
_skipProcessActors = 0;
- //_fullRedraw = 1;
+ redrawAllActors();
break;
case 42:
_wiz._rectOverrideEnabled = true;
Index: scumm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.cpp,v
retrieving revision 1.396
retrieving revision 1.397
diff -u -d -r1.396 -r1.397
--- scumm.cpp 1 Apr 2005 08:51:13 -0000 1.396
+++ scumm.cpp 2 Apr 2005 14:24:41 -0000 1.397
@@ -2012,7 +2012,6 @@
}
processActors();
- postProcessAuxQueue();
} else {
processActors();
@@ -2020,6 +2019,9 @@
_fullRedraw = false;
+ if (_heversion >= 71) {
+ postProcessAuxQueue();
+ }
if (_heversion >= 90) {
((ScummEngine_v90he *)this)->spritesMarkDirty(1);
((ScummEngine_v90he *)this)->spritesProcessWiz(false);
Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.h,v
retrieving revision 1.556
retrieving revision 1.557
diff -u -d -r1.556 -r1.557
--- scumm.h 1 Apr 2005 13:05:40 -0000 1.556
+++ scumm.h 2 Apr 2005 14:24:41 -0000 1.557
@@ -815,6 +815,7 @@
protected:
void walkActors();
void playActorSounds();
+ void redrawAllActors();
void setActorRedrawFlags();
void putActors();
void showActors();
Index: sprite_he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/sprite_he.cpp,v
retrieving revision 1.115
retrieving revision 1.116
diff -u -d -r1.115 -r1.116
--- sprite_he.cpp 1 Apr 2005 12:43:12 -0000 1.115
+++ sprite_he.cpp 2 Apr 2005 14:24:42 -0000 1.116
@@ -26,6 +26,7 @@
#include "scumm/resource.h"
#include "scumm/scumm.h"
#include "scumm/sprite_he.h"
+#include "scumm/usage_bits.h"
#include "scumm/wiz_he.h"
namespace Scumm {
@@ -1061,7 +1062,7 @@
spi->flags &= ~kSFChanged;
if (spi->bbox.left <= spi->bbox.right && spi->bbox.top <= spi->bbox.bottom) {
if (spi->flags & kSFBlitDirectly) {
- gdi.copyVirtScreenBuffers(spi->bbox); // XXX 0, 0x40000000);
+ gdi.copyVirtScreenBuffers(spi->bbox, USAGE_BIT_RESTORED);
} else if (firstLoop) {
xmin = spi->bbox.left;
ymin = spi->bbox.top;
@@ -1090,7 +1091,7 @@
}
}
if (refreshScreen) {
- gdi.copyVirtScreenBuffers(Common::Rect(xmin, ymin, xmax, ymax)); // , 0, 0x40000000);
+ gdi.copyVirtScreenBuffers(Common::Rect(xmin, ymin, xmax, ymax), USAGE_BIT_RESTORED);
}
}
@@ -1210,10 +1211,8 @@
for (int i = 0; i < _numSpritesToProcess; i++) {
SpriteInfo *spi = _activeSpritesTable[i];
- // HACK Sprite redraws aren't always been triggered
- // so leave disabled for now.
- //if (!(spi->flags & kSFNeedRedraw))
- // continue;
+ if (!(spi->flags & kSFNeedRedraw))
+ continue;
spr_flags = spi->flags;
Index: wiz_he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/wiz_he.cpp,v
retrieving revision 2.35
retrieving revision 2.36
diff -u -d -r2.35 -r2.36
--- wiz_he.cpp 1 Apr 2005 12:43:13 -0000 2.35
+++ wiz_he.cpp 2 Apr 2005 14:24:43 -0000 2.36
@@ -231,21 +231,21 @@
}
static bool calcClipRects(int dst_w, int dst_h, int src_x, int src_y, int src_w, int src_h, const Common::Rect *rect, Common::Rect &srcRect, Common::Rect &dstRect) {
- srcRect = Common::Rect(0, 0, src_w, src_h);
+ srcRect = Common::Rect(src_w, src_h);
dstRect = Common::Rect(src_x, src_y, src_x + src_w, src_y + src_h);
Common::Rect r3;
int diff;
if (rect) {
r3 = *rect;
- Common::Rect r4(0, 0, dst_w, dst_h);
+ Common::Rect r4(dst_w, dst_h);
if (r3.intersects(r4)) {
r3.clip(r4);
} else {
return false;
}
} else {
- r3 = Common::Rect(0, 0, dst_w, dst_h);
+ r3 = Common::Rect(dst_w, dst_h);
}
diff = dstRect.left - r3.left;
if (diff < 0) {
@@ -782,7 +782,7 @@
} else {
src = pvs->getBackPixels(0, 0);
}
- Common::Rect rCapt(0, 0, pvs->w, pvs->h);
+ Common::Rect rCapt(pvs->w, pvs->h);
if (rCapt.intersects(r)) {
rCapt.clip(r);
const uint8 *palPtr = _currentPalette;
More information about the Scummvm-git-logs
mailing list