mirror of
https://github.com/kichikuou/xsystem35-sdl2.git
synced 2026-09-27 17:27:55 +03:00
This replaces BYTE, WORD and DWORD types with uint8_t, uint16_t and uint32_t respectively.
25 lines
465 B
C
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;
|
|
}
|
|
|