Files
kichikuou_xsystem35-sdl2/modules/lib/graph_draw_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
465 B
C

// 8bit surface (or data列)から surface の alpha map へコピー
#include <string.h>
#include "portab.h"
#include "surface.h"
#include "ngraph.h"
#include "ags.h"
int gr_draw_amap(surface_t *dst, int dx, int dy, uint8_t *src, int width, int height, int scanline) {
int y;
uint8_t *sp, *dp;
sp = src;
dp = GETOFFSET_ALPHA(dst, dx, dy);
for (y = 0; y < height; y++) {
memcpy(dp, sp, width);
sp += scanline;
dp += dst->width;
}
return OK;
}