cleanup / tweaks (V2 masking, at least in Zakdemo, seems not to work properly, though)
svn-id: r7429
This commit is contained in:
parent
134c32bc98
commit
e5f8056d88
2 changed files with 10 additions and 8 deletions
|
@ -871,7 +871,7 @@ void Gdi::drawBitmap(byte *ptr, VirtScreen *vs, int x, int y, const int width, c
|
|||
|
||||
if (_disable_zbuffer)
|
||||
numzbuf = 0;
|
||||
else if (_numZBuffer <= 1)
|
||||
else if (_numZBuffer <= 1 || (_vm->_features & GF_AFTER_V2))
|
||||
numzbuf = _numZBuffer;
|
||||
else {
|
||||
numzbuf = _numZBuffer;
|
||||
|
@ -949,7 +949,7 @@ void Gdi::drawBitmap(byte *ptr, VirtScreen *vs, int x, int y, const int width, c
|
|||
else
|
||||
bgbak_ptr = vs->screenPtr + (y * _numStrips + x) * 8;
|
||||
|
||||
mask_ptr = _vm->getResourceAddress(rtBuffer, 9) + (y * _numStrips + x);
|
||||
mask_ptr = _vm->getResourceAddress(rtBuffer, 9) + (y * _numStrips + x) + _imgBufOffs[1];
|
||||
|
||||
const int left = (stripnr << 3);
|
||||
const int right = left + (numstrip << 3);
|
||||
|
@ -1013,8 +1013,7 @@ void Gdi::drawBitmap(byte *ptr, VirtScreen *vs, int x, int y, const int width, c
|
|||
theY++;
|
||||
if (theY >= height) {
|
||||
if (left <= theX && theX < right) {
|
||||
mask_ptr -= _numStrips * height;
|
||||
mask_ptr++;
|
||||
mask_ptr -= _numStrips * height - 1;
|
||||
}
|
||||
theY = 0;
|
||||
theX += 8;
|
||||
|
@ -1033,8 +1032,7 @@ void Gdi::drawBitmap(byte *ptr, VirtScreen *vs, int x, int y, const int width, c
|
|||
theY++;
|
||||
if (theY >= height) {
|
||||
if (left <= theX && theX < right) {
|
||||
mask_ptr -= _numStrips * height;
|
||||
mask_ptr++;
|
||||
mask_ptr -= _numStrips * height - 1;
|
||||
}
|
||||
theY = 0;
|
||||
theX += 8;
|
||||
|
@ -1073,8 +1071,6 @@ void Gdi::drawBitmap(byte *ptr, VirtScreen *vs, int x, int y, const int width, c
|
|||
else
|
||||
bgbak_ptr = backbuff_ptr;
|
||||
|
||||
mask_ptr = _vm->getResourceAddress(rtBuffer, 9) + (y * _numStrips + x);
|
||||
|
||||
if (!(_vm->_features & GF_AFTER_V2)) {
|
||||
if (_vm->_features & GF_16COLOR) {
|
||||
decodeStripEGA(bgbak_ptr, smap_ptr + READ_LE_UINT16(smap_ptr + stripnr * 2 + 2), height);
|
||||
|
@ -1085,6 +1081,8 @@ void Gdi::drawBitmap(byte *ptr, VirtScreen *vs, int x, int y, const int width, c
|
|||
}
|
||||
}
|
||||
|
||||
mask_ptr = _vm->getResourceAddress(rtBuffer, 9) + (y * _numStrips + x);
|
||||
|
||||
CHECK_HEAP;
|
||||
if (vs->alloctwobuffers) {
|
||||
if (_vm->hasCharsetMask(sx << 3, y, (sx + 1) << 3, bottom)) {
|
||||
|
|
|
@ -821,8 +821,12 @@ void Scumm_v2::o2_doSentence() {
|
|||
// TODO
|
||||
switch(fetchScriptByte()) {
|
||||
case 1:
|
||||
// TODO - execute the sentence
|
||||
_sentenceNum--;
|
||||
break;
|
||||
case 2:
|
||||
// TODO - print the sentence
|
||||
_sentenceNum--;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue