Files
kichikuou_xsystem35-sdl2/modules/lib/graph_fillrect_amap.c
T
2017-02-11 19:03:05 +09:00

25 lines
405 B
C

// alpha map の矩形塗りつぶし
#include <string.h>
#include "portab.h"
#include "surface.h"
#include "ngraph.h"
#include "ags.h"
int gr_fill_alpha_map(surface_t *dst, int dx, int dy, int dw, int dh, int lv) {
BYTE *a;
if (!gr_clip_xywh(dst, &dx, &dy, &dw, &dh)) {
return NG;
}
a = GETOFFSET_ALPHA(dst, dx, dy);
while(dh--){
memset(a, lv, dw);
a += dst->width;
}
return OK;
}