diff options
-rw-r--r-- | common/rational.cpp | 8 | ||||
-rw-r--r-- | common/rational.h | 3 | ||||
-rw-r--r-- | engines/agos/animation.cpp | 4 | ||||
-rw-r--r-- | graphics/video/coktel_decoder.cpp | 2 |
4 files changed, 3 insertions, 14 deletions
diff --git a/common/rational.cpp b/common/rational.cpp index 38aae94def..999dc7feb8 100644 --- a/common/rational.cpp +++ b/common/rational.cpp @@ -258,14 +258,6 @@ frac_t Rational::toFrac() const { return (_num * FRAC_ONE) / _denom; } -Rational::operator int() const { - return toInt(); -} - -Rational::operator double() const { - return toDouble(); -} - const Rational operator+(int left, const Rational &right) { Rational tmp = right; tmp += left; diff --git a/common/rational.h b/common/rational.h index 5826839ac6..bee09d8ddb 100644 --- a/common/rational.h +++ b/common/rational.h @@ -76,9 +76,6 @@ public: bool operator>=(int right) const; bool operator<=(int right) const; - operator int() const; - operator double() const; - void invert(); Rational getInverse() const; diff --git a/engines/agos/animation.cpp b/engines/agos/animation.cpp index 1b3ac9fd65..af85c50114 100644 --- a/engines/agos/animation.cpp +++ b/engines/agos/animation.cpp @@ -372,10 +372,10 @@ bool MoviePlayerDXA::processFrame() { _vm->_system->unlockScreen(); Common::Rational soundTime(_mixer->getSoundElapsedTime(_bgSound), 1000); - if ((_bgSoundStream == NULL) || ((int)(soundTime * getFrameRate()) / 1000 < getCurFrame() + 1)) { + if ((_bgSoundStream == NULL) || ((soundTime * getFrameRate()).toInt() / 1000 < getCurFrame() + 1)) { if (_bgSoundStream && _mixer->isSoundHandleActive(_bgSound)) { - while (_mixer->isSoundHandleActive(_bgSound) && ((int) (soundTime * getFrameRate())) < getCurFrame()) { + while (_mixer->isSoundHandleActive(_bgSound) && (soundTime * getFrameRate()).toInt() < getCurFrame()) { _vm->_system->delayMillis(10); soundTime = Common::Rational(_mixer->getSoundElapsedTime(_bgSound), 1000); } diff --git a/graphics/video/coktel_decoder.cpp b/graphics/video/coktel_decoder.cpp index 37aad8f2c8..b1cbad2820 100644 --- a/graphics/video/coktel_decoder.cpp +++ b/graphics/video/coktel_decoder.cpp @@ -581,7 +581,7 @@ uint32 CoktelDecoder::getTimeToNextFrame() const { // the middle of a long video. if (!hasSound()) - return Common::Rational(1000, _frameRate).toInt(); + return (1000 / _frameRate).toInt(); // If there /is/ audio, we do need to keep video and audio // in sync, though. |