diff options
author | yinsimei | 2017-07-10 21:44:35 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2017-07-13 18:27:45 +0200 |
commit | 2563180f11589213a816a2a6c3482ce308df922b (patch) | |
tree | bf758cca41586262799521a0b05a4d5026d370ab /engines/sludge | |
parent | f8e1fe006433124f7cd82691d37011127297ec42 (diff) | |
download | scummvm-rg350-2563180f11589213a816a2a6c3482ce308df922b.tar.gz scummvm-rg350-2563180f11589213a816a2a6c3482ce308df922b.tar.bz2 scummvm-rg350-2563180f11589213a816a2a6c3482ce308df922b.zip |
SLUDGE: remove math functions defined in sludge
Diffstat (limited to 'engines/sludge')
-rw-r--r-- | engines/sludge/people.cpp | 10 | ||||
-rw-r--r-- | engines/sludge/talk.cpp | 3 |
2 files changed, 2 insertions, 11 deletions
diff --git a/engines/sludge/people.cpp b/engines/sludge/people.cpp index 1a032847ed..a477fbea85 100644 --- a/engines/sludge/people.cpp +++ b/engines/sludge/people.cpp @@ -61,12 +61,6 @@ int16 scaleHorizon = 75; int16 scaleDivide = 150; extern screenRegion *allScreenRegions; -#define TF_max(a, b) ((a > b) ? a : b) - -inline int TF_abs(int a) { - return (a > 0) ? a : -a; -} - void setFrames(onScreenPerson &m, int a) { m.myAnim = m.myPersona->animation[(a * m.myPersona->numDirections) + m.direction]; } @@ -649,9 +643,9 @@ bool walkMe(onScreenPerson *thisPerson, bool move = true) { if (s < 0.2) s = 0.2; - maxDiff = (TF_abs(xDiff) >= TF_abs(yDiff)) ? TF_abs(xDiff) : TF_abs(yDiff); + maxDiff = (abs(xDiff) >= abs(yDiff)) ? abs(xDiff) : abs(yDiff); - if (TF_abs(maxDiff) > s) { + if (abs(maxDiff) > s) { if (thisPerson->spinning) { spinStep(thisPerson); setFrames(*thisPerson, ANI_WALK); diff --git a/engines/sludge/talk.cpp b/engines/sludge/talk.cpp index ce9bd0be68..8f3dd02f20 100644 --- a/engines/sludge/talk.cpp +++ b/engines/sludge/talk.cpp @@ -75,9 +75,6 @@ void killAllSpeech() { } } -#define TF_max(a, b) ((a > b) ? a : b) -#define TF_min(a, b) ((a > b) ? b : a) - inline void setObjFontColour(objectType *t) { setFontColour(speech->talkCol, t->r, t->g, t->b); } |