mirror of
https://github.com/nunuhara/xsystem4.git
synced 2026-09-22 23:18:01 +03:00
Implement DrawGraph.BlendMultiply
This commit is contained in:
@@ -122,6 +122,7 @@ void gfx_blend_amap_bright(Texture *dst, int dx, int dy, Texture *src, int sx, i
|
||||
void gfx_blend_amap_alpha_src_bright(Texture *dst, int dx, int dy, Texture *src, int sx, int sy, int w, int h, int alpha, int rate);
|
||||
void gfx_blend_use_amap_color(Texture *dst, int dx, int dy, Texture *src, int sx, int sy, int w, int h, int r, int g, int b, int rate);
|
||||
void gfx_blend_screen(Texture *dst, int dx, int dy, Texture *src, int sx, int sy, int w, int h);
|
||||
void gfx_blend_multiply(Texture *dst, int dx, int dy, Texture *src, int sx, int sy, int w, int h);
|
||||
void gfx_fill(struct texture *dst, int x, int y, int w, int h, int r, int g, int b);
|
||||
void gfx_fill_alpha_color(struct texture *dst, int x, int y, int w, int h, int r, int g, int b, int a);
|
||||
void gfx_fill_amap(struct texture *dst, int x, int y, int w, int h, int a);
|
||||
|
||||
@@ -452,7 +452,16 @@ void gfx_blend_screen(Texture *dst, int dx, int dy, Texture *src, int sx, int sy
|
||||
run_copy_shader(©_shader.s, dst, src, &data);
|
||||
|
||||
restore_blend_mode();
|
||||
}
|
||||
|
||||
void gfx_blend_multiply(Texture *dst, int dx, int dy, Texture *src, int sx, int sy, int w, int h)
|
||||
{
|
||||
glBlendFuncSeparate(GL_DST_COLOR, GL_ZERO, GL_ZERO, GL_ONE);
|
||||
|
||||
struct copy_data data = COPY_DATA(dx, dy, sx, sy, w, h);
|
||||
run_copy_shader(©_shader.s, dst, src, &data);
|
||||
|
||||
restore_blend_mode();
|
||||
}
|
||||
|
||||
void gfx_fill(Texture *dst, int x, int y, int w, int h, int r, int g, int b)
|
||||
|
||||
+6
-2
@@ -141,7 +141,11 @@ static void DrawGraph_BlendScreen(int dst, int dx, int dy, int src, int sx, int
|
||||
gfx_blend_screen(DTEX(dst), dx, dy, STEX(src), sx, sy, w, h);
|
||||
}
|
||||
|
||||
//void DrawGraph_BlendMultiply(int dst, int dx, int dy, int src, int sx, int sy, int w, int h);
|
||||
static void DrawGraph_BlendMultiply(int dst, int dx, int dy, int src, int sx, int sy, int w, int h)
|
||||
{
|
||||
gfx_blend_multiply(DTEX(dst), dx, dy, STEX(src), sx, sy, w, h);
|
||||
}
|
||||
|
||||
//void DrawGraph_BlendScreenAlpha(int dst, int dx, int dy, int src, int sx, int sy, int w, int h, int alpha);
|
||||
|
||||
static void DrawGraph_Fill(int dst, int x, int y, int w, int h, int r, int g, int b)
|
||||
@@ -391,7 +395,7 @@ HLL_LIBRARY(DrawGraph,
|
||||
HLL_EXPORT(BlendAMapAlphaSrcBright, DrawGraph_BlendAMapAlphaSrcBright),
|
||||
HLL_EXPORT(BlendUseAMapColor, DrawGraph_BlendUseAMapColor),
|
||||
HLL_EXPORT(BlendScreen, DrawGraph_BlendScreen),
|
||||
//HLL_EXPORT(BlendMultiply, DrawGraph_BlendMultiply),
|
||||
HLL_EXPORT(BlendMultiply, DrawGraph_BlendMultiply),
|
||||
//HLL_EXPORT(BlendScreenAlpha, DrawGraph_BlendScreenAlpha),
|
||||
HLL_EXPORT(Fill, DrawGraph_Fill),
|
||||
HLL_EXPORT(FillAlphaColor, DrawGraph_FillAlphaColor),
|
||||
|
||||
Reference in New Issue
Block a user