Files
kichikuou_xsystem35-sdl2/modules/lib/graph_fillrect_amap.c
T
kichikuou 29a139c8a1 Use the standard integer types
This replaces BYTE, WORD and DWORD types with uint8_t, uint16_t and
uint32_t respectively.
2022-10-29 09:34:21 +09:00

25 lines
408 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) {
uint8_t *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;
}