Implement DrawGraph.ScreenDA_DAxSA

This commit is contained in:
Nunuhara Cabbage
2022-05-03 20:48:21 -07:00
parent 44891458f1
commit 7fc60f6607
3 changed files with 16 additions and 2 deletions
+1
View File
@@ -133,6 +133,7 @@ void gfx_fill_amap_gradation_ud(Texture *dst, int x, int y, int w, int h, int up
void gfx_fill_screen(Texture *dst, int x, int y, int w, int h, int r, int g, int b);
void gfx_fill_multiply(Texture *dst, int x, int y, int w, int h, int r, int g, int b);
void gfx_satur_dp_dpxsa(Texture *dst, int dx, int dy, Texture *src, int sx, int sy, int w, int h);
void gfx_screen_da_daxsa(Texture *dst, int dx, int dy, Texture *src, int sx, int sy, int w, int h);
void gfx_add_da_daxsa(struct texture *dst, int dx, int dy, struct texture *src, int sx, int sy, int w, int h);
void gfx_blend_da_daxsa(struct texture *dst, int dx, int dy, struct texture *src, int sx, int sy, int w, int h);
void gfx_sub_da_daxsa(struct texture *dst, int dx, int dy, struct texture *src, int sx, int sy, int w, int h);
+10
View File
@@ -603,6 +603,16 @@ void gfx_satur_dp_dpxsa(Texture *dst, int dx, int dy, Texture *src, int sx, int
restore_blend_mode();
}
void gfx_screen_da_daxsa(Texture *dst, int dx, int dy, Texture *src, int sx, int sy, int w, int h)
{
glBlendFuncSeparate(GL_ZERO, GL_ONE, GL_ONE, GL_ONE);
struct copy_data data = COPY_DATA(dx, dy, sx, sy, w, h);
run_copy_shader(&copy_shader.s, dst, src, &data);
restore_blend_mode();
}
void gfx_add_da_daxsa(Texture *dst, int dx, int dy, Texture *src, int sx, int sy, int w, int h)
{
// color = dst_color
+5 -2
View File
@@ -196,7 +196,10 @@ static void DrawGraph_SaturDP_DPxSA(int dst, int dx, int dy, int src, int sx, in
gfx_satur_dp_dpxsa(DTEX(dst), dx, dy, STEX(src), sx, sy, w, h);
}
//void DrawGraph_ScreenDA_DAxSA(int dst, int dx, int dy, int src, int sx, int sy, int w, int h);
static void DrawGraph_ScreenDA_DAxSA(int dst, int dx, int dy, int src, int sx, int sy, int w, int h)
{
gfx_screen_da_daxsa(DTEX(dst), dx, dy, STEX(src), sx, sy, w, h);
}
static void DrawGraph_AddDA_DAxSA(int dst, int dx, int dy, int src, int sx, int sy, int w, int h)
{
@@ -425,7 +428,7 @@ HLL_LIBRARY(DrawGraph,
HLL_EXPORT(FillScreen, DrawGraph_FillScreen),
HLL_EXPORT(FillMultiply, DrawGraph_FillMultiply),
HLL_EXPORT(SaturDP_DPxSA, DrawGraph_SaturDP_DPxSA),
//HLL_EXPORT(ScreenDA_DAxSA, DrawGraph_ScreenDA_DAxSA),
HLL_EXPORT(ScreenDA_DAxSA, DrawGraph_ScreenDA_DAxSA),
HLL_EXPORT(AddDA_DAxSA, DrawGraph_AddDA_DAxSA),
HLL_EXPORT(SpriteCopyAMap, DrawGraph_SpriteCopyAMap),
HLL_EXPORT(BlendDA_DAxSA, DrawGraph_BlendDA_DAxSA),