diff options
-rw-r--r-- | engines/gob/draw_v2.cpp | 157 | ||||
-rw-r--r-- | engines/gob/global.cpp | 3 | ||||
-rw-r--r-- | engines/gob/mult_v2.cpp | 4 |
3 files changed, 6 insertions, 158 deletions
diff --git a/engines/gob/draw_v2.cpp b/engines/gob/draw_v2.cpp index 97a4b596a4..be6a051709 100644 --- a/engines/gob/draw_v2.cpp +++ b/engines/gob/draw_v2.cpp @@ -57,162 +57,7 @@ void Draw_v2::printText(void) { _vm->_cdrom->playMultMusic(); - dataPtr = (char *)_vm->_game->_totTextData + _vm->_game->_totTextData->items[index].offset; - ptr = dataPtr; - - if (_renderFlags & RENDERFLAG_CAPTUREPUSH) { - _destSpriteX = READ_LE_UINT16(ptr); - _destSpriteY = READ_LE_UINT16(ptr + 2); - _spriteRight = READ_LE_UINT16(ptr + 4) - _destSpriteX + 1; - _spriteBottom = READ_LE_UINT16(ptr + 6) - _destSpriteY + 1; - _vm->_game->capturePush(_destSpriteX, _destSpriteY, - _spriteRight, _spriteBottom); - (*_vm->_scenery->_pCaptureCounter)++; - } - _destSpriteX = READ_LE_UINT16(ptr); - destX = _destSpriteX; - - _destSpriteY = READ_LE_UINT16(ptr + 2); - destY = _destSpriteY; - - _spriteRight = READ_LE_UINT16(ptr + 4); - _spriteBottom = READ_LE_UINT16(ptr + 6); - _destSurface = 21; - - ptr += 8; - - _backColor = *ptr++; - _transparency = 1; -// spriteOperation(DRAW_CLEARRECT); - - _backColor = 0; - savedFlags = _renderFlags; - - _renderFlags &= ~RENDERFLAG_NOINVALIDATE; - for (; (_destSpriteX = READ_LE_UINT16(ptr)) != -1; ptr++) { - _destSpriteX += destX; - _destSpriteY = READ_LE_UINT16(ptr + 2) + destY; - _spriteRight = READ_LE_UINT16(ptr + 4) + destX; - _spriteBottom = READ_LE_UINT16(ptr + 6) + destY; - ptr += 8; - - cmd = (*ptr & 0xf0) >> 4; - if (cmd == 0) { - _frontColor = *ptr & 0xf; -// spriteOperation(DRAW_DRAWLINE); - } else if (cmd == 1) { - _frontColor = *ptr & 0xf; -// spriteOperation(DRAW_DRAWBAR); - } else if (cmd == 2) { - _backColor = *ptr & 0xf; -// spriteOperation(DRAW_FILLRECTABS); - } - } - ptr += 2; - - for (ptr2 = ptr; *ptr2 != 1; ptr2++) { - if (*ptr2 == 3) - ptr2++; - - if (*ptr2 == 2) - ptr2 += 4; - } - - ptr2++; - - while (*ptr != 1) { - cmd = *ptr; - if (cmd == 3) { - ptr++; - _fontIndex = (*ptr & 0xf0) >> 4; - _frontColor = *ptr & 0xf; - ptr++; - continue; - } else if (cmd == 2) { - ptr++; - _destSpriteX = destX + READ_LE_UINT16(ptr); - _destSpriteY = destY + READ_LE_UINT16(ptr + 2); - ptr += 4; - continue; - } - - if ((byte)*ptr != 0xba) { - _letterToPrint = *ptr; -// spriteOperation(DRAW_DRAWLETTER); -// _destSpriteX += -// _fonts[_fontIndex]->itemWidth; - ptr++; - } else { - cmd = ptr2[17] & 0x7f; - if (cmd == 0) { - val = READ_LE_UINT16(ptr2 + 18) * 4; - sprintf(buf, "%d", VAR_OFFSET(val)); - } else if (cmd == 1) { - val = READ_LE_UINT16(ptr2 + 18) * 4; - - strcpy(buf, _vm->_global->_inter_variables + val); - } else { - val = READ_LE_UINT16(ptr2 + 18) * 4; - - sprintf(buf, "%d", VAR_OFFSET(val)); - if (buf[0] == '-') { - while (strlen(buf) - 1 < (uint32)ptr2[17]) { - _vm->_util->insertStr("0", buf, 1); - } - } else { - while (strlen(buf) - 1 < (uint32)ptr2[17]) { - _vm->_util->insertStr("0", buf, 0); - } - } - - _vm->_util->insertStr(",", buf, strlen(buf) + 1 - ptr2[17]); - } - - _textToPrint = buf; - ldestSpriteX = _destSpriteX; -// spriteOperation(DRAW_PRINTTEXT); - if (ptr2[17] & 0x80) { - if (ptr[1] == ' ') { -// _destSpriteX += _fonts[_fontIndex]->itemWidth; - while (ptr[1] == ' ') - ptr++; - if (ptr[1] == 2) { - if (READ_LE_UINT16(ptr + 4) == _destSpriteY) - ptr += 5; - } - } else if (ptr[1] == 2 && READ_LE_UINT16(ptr + 4) == _destSpriteY) { - ptr += 5; -// _destSpriteX += _fonts[_fontIndex]->itemWidth; - } -// } else { -// _destSpriteX = ldestSpriteX + _fonts[_fontIndex]->itemWidth; - } - ptr2 += 23; - ptr++; - } - } - - _renderFlags = savedFlags; - if (_renderFlags & 4) { - warning("printText: Input not supported"); -// xor ax, ax -// loc_436_1391: -// xor dx, dx -// push ax -// push dx -// push ax -// push dx -// push ax -// mov al, 0 -// push ax -// call sub_9FF_1E71 -// add sp, 0Ch - } - - if ((_renderFlags & RENDERFLAG_CAPTUREPOP) && *_vm->_scenery->_pCaptureCounter != 0) { - (*_vm->_scenery->_pCaptureCounter)--; - _vm->_game->capturePop(1); - } + return; } void Draw_v2::spriteOperation(int16 operation) { diff --git a/engines/gob/global.cpp b/engines/gob/global.cpp index 0d732e1f2a..cceb0c7bed 100644 --- a/engines/gob/global.cpp +++ b/engines/gob/global.cpp @@ -147,6 +147,9 @@ Global::Global(GobEngine *vm) : _vm(vm) { _inter_mouseX = 0; _inter_mouseY = 0; + + for (i = 0; i < 128; i++) + _pressedKeys[i] = 0; } } // End of namespace Gob diff --git a/engines/gob/mult_v2.cpp b/engines/gob/mult_v2.cpp index d78abaf3e3..fa05f643da 100644 --- a/engines/gob/mult_v2.cpp +++ b/engines/gob/mult_v2.cpp @@ -196,8 +196,8 @@ void Mult_v2::loadMult(int16 resId) { _multData2->sndKeys[i].freq = (int16)READ_LE_UINT16(_dataPtr + 4); _multData2->sndKeys[i].channel = (int16)READ_LE_UINT16(_dataPtr + 6); _multData2->sndKeys[i].repCount = (int16)READ_LE_UINT16(_dataPtr + 8); - _multData2->sndKeys[i].resId = (int16)READ_LE_UINT16(_dataPtr + 10); - _multData2->sndKeys[i].soundIndex = (int16)READ_LE_UINT16(_dataPtr + 12); +/* _multData2->sndKeys[i].resId = (int16)READ_LE_UINT16(_dataPtr + 10); + _multData2->sndKeys[i].soundIndex = (int16)READ_LE_UINT16(_dataPtr + 12);*/ _multData2->sndKeys[i].soundIndex = -1; _multData2->sndKeys[i].resId = -1; |