Cleanup
svn-id: r17333
This commit is contained in:
parent
eb4dce05ee
commit
b5f281e9d8
9 changed files with 33 additions and 28 deletions
|
@ -1171,6 +1171,15 @@ void Actor::animateLimb(int limb, int f) {
|
|||
}
|
||||
}
|
||||
|
||||
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 @@ void ScummEngine::postProcessAuxQueue() {
|
|||
break;
|
||||
default:
|
||||
error("unimplemented compression type %d", comp);
|
||||
break;
|
||||
}
|
||||
}
|
||||
const uint8 *axur = findResourceData(MKID('AXUR'), auxd);
|
||||
|
@ -1938,7 +1946,7 @@ void ScummEngine::postProcessAuxQueue() {
|
|||
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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -777,21 +777,16 @@ void ScummEngine_v70he::redrawBGAreas() {
|
|||
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...");
|
||||
}
|
||||
|
||||
drawRoomObjects(val);
|
||||
drawRoomObjects(0);
|
||||
_bgNeedsRedraw = false;
|
||||
}
|
||||
|
||||
|
@ -1629,7 +1624,7 @@ void Gdi::drawBMAPObject(const byte *ptr, VirtScreen *vs, int obj, int x, int y,
|
|||
}
|
||||
}
|
||||
|
||||
void Gdi::copyVirtScreenBuffers(Common::Rect rect) {
|
||||
void Gdi::copyVirtScreenBuffers(Common::Rect rect, int dirtybit) {
|
||||
byte *src, *dst;
|
||||
VirtScreen *vs = &_vm->virtscr[0];
|
||||
|
||||
|
|
|
@ -290,7 +290,7 @@ public:
|
|||
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; }
|
||||
|
|
|
@ -748,11 +748,11 @@ void ScummEngine_v70he::o70_kernelSetFunctions() {
|
|||
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");
|
||||
|
|
|
@ -2307,11 +2307,11 @@ void ScummEngine_v90he::o90_kernelSetFunctions() {
|
|||
break;
|
||||
case 24:
|
||||
_skipProcessActors = 1;
|
||||
//_fullRedraw = 1;
|
||||
redrawAllActors();
|
||||
break;
|
||||
case 25:
|
||||
_skipProcessActors = 0;
|
||||
//_fullRedraw = 1;
|
||||
redrawAllActors();
|
||||
break;
|
||||
case 42:
|
||||
_wiz._rectOverrideEnabled = true;
|
||||
|
|
|
@ -2012,7 +2012,6 @@ load_game:
|
|||
}
|
||||
|
||||
processActors();
|
||||
postProcessAuxQueue();
|
||||
|
||||
} else {
|
||||
processActors();
|
||||
|
@ -2020,6 +2019,9 @@ load_game:
|
|||
|
||||
_fullRedraw = false;
|
||||
|
||||
if (_heversion >= 71) {
|
||||
postProcessAuxQueue();
|
||||
}
|
||||
if (_heversion >= 90) {
|
||||
((ScummEngine_v90he *)this)->spritesMarkDirty(1);
|
||||
((ScummEngine_v90he *)this)->spritesProcessWiz(false);
|
||||
|
|
|
@ -815,6 +815,7 @@ public:
|
|||
protected:
|
||||
void walkActors();
|
||||
void playActorSounds();
|
||||
void redrawAllActors();
|
||||
void setActorRedrawFlags();
|
||||
void putActors();
|
||||
void showActors();
|
||||
|
|
|
@ -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 @@ void ScummEngine_v90he::spritesBlitToScreen() {
|
|||
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 @@ void ScummEngine_v90he::spritesBlitToScreen() {
|
|||
}
|
||||
}
|
||||
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 @@ void ScummEngine_v90he::spritesProcessWiz(bool arg) {
|
|||
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;
|
||||
|
||||
|
|
|
@ -231,21 +231,21 @@ void Wiz::copyAuxImage(uint8 *dst1, uint8 *dst2, const uint8 *src, int dstw, int
|
|||
}
|
||||
|
||||
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 @@ void ScummEngine_v72he::captureWizImage(int resNum, const Common::Rect& r, bool
|
|||
} 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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue