diff options
| author | Simon <simon@hardwired.org.uk> | 2010-08-15 11:54:56 (GMT) |
|---|---|---|
| committer | Simon <simon@hardwired.org.uk> | 2010-08-15 11:54:56 (GMT) |
| commit | 077fbb56ae234b5da54386805f4b77f938618dc2 (patch) | |
| tree | 508d2ef37d7b5aa862f4e63907d7483295d78f87 /powder.c | |
| parent | 1a724d6f7fd8625986e47ccd13bfb45316c6e7ab (diff) | |
| download | powder-077fbb56ae234b5da54386805f4b77f938618dc2.zip powder-077fbb56ae234b5da54386805f4b77f938618dc2.tar.gz | |
Few changes to source and makefile
Diffstat (limited to 'powder.c')
| -rwxr-xr-x | powder.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -328,7 +328,7 @@ void *update_air_th(void *arg) return NULL; } -unsigned clamp_flt(float f, float min, float max) +inline unsigned clamp_flt(float f, float min, float max) { if(f<min) return 0; @@ -337,7 +337,7 @@ unsigned clamp_flt(float f, float min, float max) return (int)(255.0f*(f-min)/(max-min)); } -float restrict_flt(float f, float min, float max){ +inline float restrict_flt(float f, float min, float max){ if(f<min) return min; if(f>max) @@ -871,7 +871,7 @@ void kill_part(int i) pfree = i; } -int create_part(int p, int x, int y, int t) +inline int create_part(int p, int x, int y, int t) { int i; @@ -1061,7 +1061,7 @@ void delete_part(int x, int y) pmap[y][x] = 0; // just in case } -void blendpixel(pixel *vid, int x, int y, int r, int g, int b, int a) +inline void blendpixel(pixel *vid, int x, int y, int r, int g, int b, int a) { pixel t; if(x<0 || y<0 || x>=XRES || y>=YRES) @@ -1205,7 +1205,7 @@ void set_emap(int x, int y) set_emap(x, y+1); } } -int parts_avg(int ci, int ni){ +inline int parts_avg(int ci, int ni){ int pmr = pmap[(int)((parts[ci].y + parts[ni].y)/2)][(int)((parts[ci].x + parts[ni].x)/2)]; if((pmr>>8) < NPART && (pmr>>8) >= 0){ return parts[pmr>>8].type; @@ -3457,7 +3457,7 @@ void *build_thumb(int *size, int bzip2) return d; } -void drawpixel(pixel *vid, int x, int y, int r, int g, int b, int a); +inline void drawpixel(pixel *vid, int x, int y, int r, int g, int b, int a); int render_thumb(void *thumb, int size, int bzip2, pixel *vid_buf, int px, int py, int scl) { unsigned char *d,*c=thumb; @@ -4339,7 +4339,7 @@ void del_stamp(int d) #include "font.h" -void drawpixel(pixel *vid, int x, int y, int r, int g, int b, int a) +inline void drawpixel(pixel *vid, int x, int y, int r, int g, int b, int a) { pixel t; if(x<0 || y<0 || x>=XRES+BARSIZE || y>=YRES+MENUSIZE) @@ -4353,7 +4353,7 @@ void drawpixel(pixel *vid, int x, int y, int r, int g, int b, int a) vid[y*(XRES+BARSIZE)+x] = PIXRGB(r,g,b); } -int drawchar(pixel *vid, int x, int y, int c, int r, int g, int b, int a) +inline int drawchar(pixel *vid, int x, int y, int c, int r, int g, int b, int a) { int i, j, w, bn = 0, ba = 0; char *rp = font_data + font_ptrs[c]; |
