LAB: Bugfixes for the lowres DOS version
The lowres DOS version should be working properly now
This commit is contained in:
parent
e3b9f726a1
commit
31d47d6be2
4 changed files with 4 additions and 20 deletions
|
@ -78,17 +78,7 @@ Button *EventManager::checkButtonHit(ButtonList *buttonList, Common::Point pos)
|
||||||
Common::Rect buttonRect(button->_x, button->_y, button->_x + button->_image->_width - 1, button->_y + button->_image->_height - 1);
|
Common::Rect buttonRect(button->_x, button->_y, button->_x + button->_image->_width - 1, button->_y + button->_image->_height - 1);
|
||||||
|
|
||||||
if (buttonRect.contains(pos) && button->_isEnabled) {
|
if (buttonRect.contains(pos) && button->_isEnabled) {
|
||||||
if (_vm->_isHiRes) {
|
_hitButton = button;
|
||||||
_hitButton = button;
|
|
||||||
} else {
|
|
||||||
button->_altImage->drawImage(button->_x, button->_y);
|
|
||||||
|
|
||||||
for (int i = 0; i < 3; i++)
|
|
||||||
_vm->waitTOF();
|
|
||||||
|
|
||||||
button->_image->drawImage(button->_x, button->_y);
|
|
||||||
}
|
|
||||||
|
|
||||||
return button;
|
return button;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -156,7 +146,7 @@ void EventManager::processInput() {
|
||||||
switch (event.type) {
|
switch (event.type) {
|
||||||
case Common::EVENT_LBUTTONDOWN:
|
case Common::EVENT_LBUTTONDOWN:
|
||||||
if (_screenButtonList)
|
if (_screenButtonList)
|
||||||
curButton = checkButtonHit(_screenButtonList, _vm->_isHiRes ? _mousePos : Common::Point(_mousePos.x / 2, _mousePos.y));
|
curButton = checkButtonHit(_screenButtonList, _mousePos);
|
||||||
|
|
||||||
if (curButton)
|
if (curButton)
|
||||||
_lastButtonHit = curButton;
|
_lastButtonHit = curButton;
|
||||||
|
|
|
@ -124,8 +124,6 @@ IntuiMessage *EventManager::getMsg() {
|
||||||
message._msgClass = (_leftClick) ? kMessageLeftClick : kMessageRightClick;
|
message._msgClass = (_leftClick) ? kMessageLeftClick : kMessageRightClick;
|
||||||
message._qualifier = 0;
|
message._qualifier = 0;
|
||||||
message._mouse = _mousePos;
|
message._mouse = _mousePos;
|
||||||
if (!_vm->_isHiRes)
|
|
||||||
message._mouse.x /= 2;
|
|
||||||
_leftClick = _rightClick = false;
|
_leftClick = _rightClick = false;
|
||||||
return &message;
|
return &message;
|
||||||
} else if (_keyPressed.keycode != Common::KEYCODE_INVALID) {
|
} else if (_keyPressed.keycode != Common::KEYCODE_INVALID) {
|
||||||
|
|
|
@ -323,11 +323,7 @@ void SpecialLocks::changeCombination(uint16 number) {
|
||||||
byte *buffer = new byte[_numberImages[1]->_width * _numberImages[1]->_height * 2];
|
byte *buffer = new byte[_numberImages[1]->_width * _numberImages[1]->_height * 2];
|
||||||
|
|
||||||
for (int i = 1; i <= (_numberImages[combnum]->_height / 2); i++) {
|
for (int i = 1; i <= (_numberImages[combnum]->_height / 2); i++) {
|
||||||
if (_vm->_isHiRes) {
|
if (i & 1)
|
||||||
if (i & 1)
|
|
||||||
_vm->waitTOF();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
_vm->waitTOF();
|
_vm->waitTOF();
|
||||||
|
|
||||||
display.setData(_vm->_graphics->getCurrentDrawingBuffer(), false);
|
display.setData(_vm->_graphics->getCurrentDrawingBuffer(), false);
|
||||||
|
|
|
@ -162,7 +162,7 @@ void Utils::verticalUnDiff(T *dest, Common::File *sourceFile, uint16 bytesPerRow
|
||||||
|
|
||||||
while (copy) {
|
while (copy) {
|
||||||
if (bytesPerWord == 1)
|
if (bytesPerWord == 1)
|
||||||
*curPtr++ = sourceFile->readByte();
|
*curPtr = sourceFile->readByte();
|
||||||
else if (bytesPerWord == 2)
|
else if (bytesPerWord == 2)
|
||||||
*curPtr = sourceFile->readUint16LE();
|
*curPtr = sourceFile->readUint16LE();
|
||||||
else if (bytesPerWord == 4)
|
else if (bytesPerWord == 4)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue