summaryrefslogtreecommitdiff
path: root/powder.c
diff options
context:
space:
mode:
authorSimon <simon@hardwired.org.uk>2010-08-26 09:53:15 (GMT)
committer Simon <simon@hardwired.org.uk>2010-08-26 09:53:15 (GMT)
commit5751fea35f31640fddfaea1459503e366ae39729 (patch)
treead4180fdfba2b0600ac61b919f3ed3f5486dab8e /powder.c
parent470519c92ed917b41c6ccae2e193eb59bdfe2ece (diff)
downloadpowder-5751fea35f31640fddfaea1459503e366ae39729.zip
powder-5751fea35f31640fddfaea1459503e366ae39729.tar.gz
More work
Diffstat (limited to 'powder.c')
-rw-r--r--powder.c43
1 files changed, 1 insertions, 42 deletions
diff --git a/powder.c b/powder.c
index 63d67ea..c0ff76d 100644
--- a/powder.c
+++ b/powder.c
@@ -37,6 +37,7 @@
#include <unistd.h>
#endif
+#include "utils.h"
#include "font.h"
#include "defines.h"
#include "powder.h"
@@ -281,32 +282,6 @@ void *update_air_th(void *arg)
return NULL;
}
-#ifdef WIN32
-_inline unsigned clamp_flt(float f, float min, float max)
-#else
-inline unsigned clamp_flt(float f, float min, float max)
-#endif
-{
- if(f<min)
- return 0;
- if(f>max)
- return 255;
- return (int)(255.0f*(f-min)/(max-min));
-}
-
-#ifdef WIN32
-_inline float restrict_flt(float f, float min, float max)
-#else
-inline float restrict_flt(float f, float min, float max)
-#endif
-{
- if(f<min)
- return min;
- if(f>max)
- return max;
- return f;
-}
-
/***********************************************************
* PARTICLE SIMULATOR *
***********************************************************/
@@ -650,22 +625,6 @@ inline void delete_part(int x, int y)
pmap[y][x] = 0; // just in case
}
-//Signum function
-#ifdef WIN32
-_inline int sign(float i)
-#else
-inline int sign(float i)
-#endif
-{
- if (i<0)
- return -1;
- if (i>0)
- return 1;
- return 0;
-}
-
-int drawtext(pixel *vid, int x, int y, char *s, int r, int g, int b, int a);
-
#ifdef WIN32
_inline int is_wire(int x, int y)
#else