diff options
author | Max Horn | 2007-12-09 14:43:31 +0000 |
---|---|---|
committer | Max Horn | 2007-12-09 14:43:31 +0000 |
commit | b1a8b8a76be67d126172c1f29a0d1c74222cf694 (patch) | |
tree | 9a16e907d93b8d8d7814e38c57475434b72c9cf4 | |
parent | a94fada0ae13b04d54684d470d5b86ab68a2df55 (diff) | |
download | scummvm-rg350-b1a8b8a76be67d126172c1f29a0d1c74222cf694.tar.gz scummvm-rg350-b1a8b8a76be67d126172c1f29a0d1c74222cf694.tar.bz2 scummvm-rg350-b1a8b8a76be67d126172c1f29a0d1c74222cf694.zip |
Fix for bug #1845876: MACOSX 10.2.8: sqrtf undefined
svn-id: r29791
-rw-r--r-- | graphics/primitives.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/graphics/primitives.cpp b/graphics/primitives.cpp index 85a0383ea9..077af1c3a6 100644 --- a/graphics/primitives.cpp +++ b/graphics/primitives.cpp @@ -26,6 +26,13 @@ namespace Graphics { +#ifdef MACOSX +// Older versions of Mac OS X didn't supply a sqrtf function. To ensure +// binary compatibiity, we force using pow instead of sqrtf (the only +// potential drawback is that it might be a little bit slower). +#define sqrtf sqrt +#endif + void drawLine(int x0, int y0, int x1, int y1, int color, void (*plotProc)(int, int, int, void *), void *data) { // Bresenham's line algorithm, as described by Wikipedia const bool steep = ABS(y1 - y0) > ABS(x1 - x0); |