diff options
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 22 |
1 files changed, 21 insertions, 1 deletions
@@ -33,6 +33,26 @@ fmax(double a, double b) } void +swapi(int *a, int *b) +{ + int t; + + t = *a; + *a = *b; + *b = t; +} + +void +swappt(Point *a, Point *b) +{ + Point t; + + t = *a; + *a = *b; + *b = t; +} + +void memsetd(double *p, double v, usize len) { double *dp; @@ -46,7 +66,7 @@ rgb(ulong c) { Memimage *i; - i = eallocmemimage(UR, screen->chan); + i = eallocmemimage(UR, RGBA32); i->flags |= Frepl; i->clipr = Rect(-1e6, -1e6, 1e6, 1e6); memfillcolor(i, c); |