diff options
-rw-r--r-- | scumm/logic_he.cpp | 7 | ||||
-rw-r--r-- | scumm/logic_he.h | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/scumm/logic_he.cpp b/scumm/logic_he.cpp index 2c9e9e6f39..fea0087c68 100644 --- a/scumm/logic_he.cpp +++ b/scumm/logic_he.cpp @@ -37,6 +37,13 @@ LogicHE::~LogicHE() { free(_userDataD); } +double LogicHE::round(double arg) { + if (floor(arg) + 0.5 > arg) + return floor(arg); + else + return ceil(arg); +} + int LogicHE::versionID() { return 1; } diff --git a/scumm/logic_he.h b/scumm/logic_he.h index 66c4333d02..f07e682691 100644 --- a/scumm/logic_he.h +++ b/scumm/logic_he.h @@ -49,6 +49,8 @@ public: virtual int versionID(); virtual int32 dispatch(int op, int numArgs, int32 *args); + + double round(double arg); }; class LogicHErace : public LogicHE { |