diff options
-rw-r--r-- | engines/bladerunner/item_pickup.cpp | 2 | ||||
-rw-r--r-- | engines/bladerunner/savefile.h | 4 | ||||
-rw-r--r-- | engines/bladerunner/ui/kia.cpp | 8 | ||||
-rw-r--r-- | engines/bladerunner/ui/ui_check_box.cpp | 4 |
4 files changed, 9 insertions, 9 deletions
diff --git a/engines/bladerunner/item_pickup.cpp b/engines/bladerunner/item_pickup.cpp index cf1ade02fe..15904d4b32 100644 --- a/engines/bladerunner/item_pickup.cpp +++ b/engines/bladerunner/item_pickup.cpp @@ -81,7 +81,7 @@ void ItemPickup::tick() { // unsigned difference is intentional uint32 timeDiff = timeNow - _timeLast; _timeLast = timeNow; - timeDiff = MIN(MIN(timeDiff, 67u), _timeLeft); + timeDiff = MIN(MIN<uint32>(timeDiff, 67u), _timeLeft); _timeLeft = (_timeLeft < timeDiff) ? 0 : (_timeLeft - timeDiff); if (_timeLeft >= 2000u) { diff --git a/engines/bladerunner/savefile.h b/engines/bladerunner/savefile.h index de5ca4bf52..2948ce64e0 100644 --- a/engines/bladerunner/savefile.h +++ b/engines/bladerunner/savefile.h @@ -94,7 +94,7 @@ public: void padBytes(int count); - void writeInt(int v); // this writes a 4 byte int (uses writeUint32LE) + void writeInt(int32 v); // this writes a 4 byte int (uses writeUint32LE) void writeFloat(float v); void writeBool(bool v); void writeStringSz(const Common::String &s, uint sz); @@ -117,7 +117,7 @@ public: int32 size() const override { return _s.size(); } bool seek(int32 offset, int whence = SEEK_SET) override { return _s.seek(offset, whence); } - int readInt(); + int32 readInt(); float readFloat(); bool readBool(); Common::String readStringSz(uint sz); diff --git a/engines/bladerunner/ui/kia.cpp b/engines/bladerunner/ui/kia.cpp index 7ad73ceea2..fe997d5543 100644 --- a/engines/bladerunner/ui/kia.cpp +++ b/engines/bladerunner/ui/kia.cpp @@ -261,17 +261,17 @@ void KIA::tick() { _playerVqaTimeLast = timeNow; if (_playerActorDialogueQueueSize == _playerActorDialogueQueuePosition || _playerSliceModelId != -1 || _playerPhotographId != -1 || _playerImage.getPixels() != nullptr) { if (_playerVisualizerState > 0) { - _playerVisualizerState = (_playerVisualizerState < timeDiffDiv48) ? 0u : MAX(_playerVisualizerState - timeDiffDiv48, 0u); + _playerVisualizerState = (_playerVisualizerState < timeDiffDiv48) ? 0u : MAX<uint32>(_playerVisualizerState - timeDiffDiv48, 0u); } } else { if (_playerVisualizerState < 2) { - _playerVisualizerState = MIN(_playerVisualizerState + timeDiffDiv48, 2u); + _playerVisualizerState = MIN<uint32>(_playerVisualizerState + timeDiffDiv48, 2u); } } if ( _playerSliceModelId != -1 || _playerPhotographId != -1 || _playerImage.getPixels() != nullptr) { if (_playerVqaFrame < 8) { - int newVqaFrame = MIN(timeDiffDiv48 + _playerVqaFrame, 8u); + int newVqaFrame = MIN<uint32>(timeDiffDiv48 + _playerVqaFrame, 8u); if (_playerVqaFrame <= 0 && newVqaFrame > 0) { _vm->_audioPlayer->playAud(_vm->_gameInfo->getSfxTrack(kSfxMECHAN1), 100, 70, 70, 50, 0); } @@ -279,7 +279,7 @@ void KIA::tick() { } } else { if (_playerVqaFrame > 0) { - int newVqaFrame = (_playerVqaFrame < timeDiffDiv48) ? 0 : MAX(_playerVqaFrame - timeDiffDiv48, 0u); + int newVqaFrame = (_playerVqaFrame < timeDiffDiv48) ? 0 : MAX<uint32>(_playerVqaFrame - timeDiffDiv48, 0u); if (_playerVqaFrame >= 8 && newVqaFrame < 8) { _vm->_audioPlayer->playAud(_vm->_gameInfo->getSfxTrack(kSfxMECHAN1C), 100, 70, 70, 50, 0); } diff --git a/engines/bladerunner/ui/ui_check_box.cpp b/engines/bladerunner/ui/ui_check_box.cpp index 935c53f98a..38fb86c679 100644 --- a/engines/bladerunner/ui/ui_check_box.cpp +++ b/engines/bladerunner/ui/ui_check_box.cpp @@ -67,9 +67,9 @@ void UICheckBox::draw(Graphics::Surface &surface) { _timeLast = timeNow; if (_isChecked) { - _frame = MIN(_frame + frameDelta, 5u); + _frame = MIN<uint32>(_frame + frameDelta, 5u); } else { - _frame = (_frame < frameDelta) ? 0 : MAX(_frame - frameDelta, 0u); + _frame = (_frame < frameDelta) ? 0 : MAX<uint32>(_frame - frameDelta, 0u); } } |