diff options
author | Eugene Sandulenko | 2005-05-18 07:59:45 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2005-05-18 07:59:45 +0000 |
commit | 1a68fbe1459b8f19f7aa61110ebd99e514d65494 (patch) | |
tree | ad9e54b4c602868dc9a0120e234d71487b0e1e8e | |
parent | 16a1f8814b954e5327e7d17b811631d7994a9b51 (diff) | |
download | scummvm-rg350-1a68fbe1459b8f19f7aa61110ebd99e514d65494.tar.gz scummvm-rg350-1a68fbe1459b8f19f7aa61110ebd99e514d65494.tar.bz2 scummvm-rg350-1a68fbe1459b8f19f7aa61110ebd99e514d65494.zip |
round() is not portable.
svn-id: r18155
-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 { |