diff options
author | Peter Kohaut | 2018-02-11 15:22:27 +0100 |
---|---|---|
committer | Peter Kohaut | 2018-02-11 15:31:40 +0100 |
commit | 70e68ace1823e3535a6e82fddb7c960067fc6cb8 (patch) | |
tree | 706cabf7d09e44b7ae0a2c72b5c277f9036b61a7 /engines/bladerunner/ui/vk.cpp | |
parent | 3ce56d5427ba5f88427112caadc7f894962048c1 (diff) | |
download | scummvm-rg350-70e68ace1823e3535a6e82fddb7c960067fc6cb8.tar.gz scummvm-rg350-70e68ace1823e3535a6e82fddb7c960067fc6cb8.tar.bz2 scummvm-rg350-70e68ace1823e3535a6e82fddb7c960067fc6cb8.zip |
BLADERUNNER: VK small fixes
Fixed rendering of non-visible objects
Diffstat (limited to 'engines/bladerunner/ui/vk.cpp')
-rw-r--r-- | engines/bladerunner/ui/vk.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/engines/bladerunner/ui/vk.cpp b/engines/bladerunner/ui/vk.cpp index 078b60abbf..8145ee39db 100644 --- a/engines/bladerunner/ui/vk.cpp +++ b/engines/bladerunner/ui/vk.cpp @@ -472,6 +472,7 @@ void VK::draw() { _soundTrackId2 = _vm->_audioPlayer->playAud(_vm->_gameInfo->getSfxTrack(426), 33, 0, 0, 50, 0); _vm->_audioPlayer->playAud(_vm->_gameInfo->getSfxTrack(431), 50, 0, 0, 50, 0); } else if (frame == 26) { + setAdjustment(158); _vm->_audioPlayer->stop(_soundTrackId2, false); _soundTrackId1 = _vm->_audioPlayer->playAud(_vm->_gameInfo->getSfxTrack(429), 50, 30, 30, 50, kAudioPlayerLoop); } else if (frame == 40) { @@ -664,8 +665,8 @@ void VK::drawNeedle(Graphics::Surface &surface) { x = CLIP(x + (int)_vm->_rnd.getRandomNumberRng(0, 4) - 2, 165, 245); } - float needleOffset = ABS(38.0f - _needleValue); - float y = 345 - sqrt(72.0f * 72.0f - needleOffset * needleOffset); + int needleOffset = abs(38 - _needleValue); + int y = 345 - sqrt(72 * 72 - needleOffset * needleOffset); float colorIntensity = MIN(78.0f, _needleValue + 39.0f) / 78.0f; @@ -846,8 +847,8 @@ void VK::animateAdjustment(int target) { void VK::setAdjustment(int x) { _adjustment = CLIP(x - 4, 154, 246); - float offset = ABS(199.0f - _adjustment); - int y = sqrt(88.0f * 88.0f - offset * offset); + int offset = abs(199 - _adjustment); + int y = sqrt(88 * 88 - offset * offset); _buttons->setImageLeft(1, _adjustment); _buttons->setImageTop(1, 345 - y); } |