mirror of
https://github.com/nunuhara/xsystem4.git
synced 2026-09-22 23:18:01 +03:00
Implement DrawGraph.BlendAddSatur
This commit is contained in:
@@ -114,6 +114,7 @@ void gfx_blend(Texture *dst, int dx, int dy, Texture *src, int sx, int sy, int w
|
||||
void gfx_blend_amap(struct texture *dst, int dx, int dy, struct texture *src, int sx, int sy, int w, int h);
|
||||
void gfx_blend_amap_color(struct texture *dst, int dx, int dy, struct texture *src, int sx, int sy, int w, int h, int r, int g, int b);
|
||||
void gfx_blend_amap_alpha(struct texture *dst, int dx, int dy, struct texture *src, int sx, int sy, int w, int h, int a);
|
||||
void gfx_blend_add_satur(Texture *dst, int dx, int dy, Texture *src, int sx, int sy, int w, int h);
|
||||
void gfx_blend_src_bright(Texture *dst, int dx, int dy, Texture *src, int sx, int sy, int w, int h, int a, int rate);
|
||||
void gfx_blend_amap_color_alpha(Texture *dst, int dx, int dy, Texture *src, int sx, int sy, int w, int h, int r, int g, int b, int a);
|
||||
void gfx_fill(struct texture *dst, int x, int y, int w, int h, int r, int g, int b);
|
||||
|
||||
+10
@@ -360,6 +360,16 @@ void gfx_blend_src_bright(Texture *dst, int dx, int dy, Texture *src, int sx, in
|
||||
restore_blend_mode();
|
||||
}
|
||||
|
||||
void gfx_blend_add_satur(Texture *dst, int dx, int dy, Texture *src, int sx, int sy, int w, int h)
|
||||
{
|
||||
glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE, 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_blend_amap_color_alpha(Texture *dst, int dx, int dy, Texture *src, int sx, int sy, int w, int h, int r, int g, int b, int a)
|
||||
{
|
||||
glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_DST_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
+6
-2
@@ -211,7 +211,11 @@ void DrawGraph_BlendSrcBright(int dst, int dx, int dy, int src, int sx, int sy,
|
||||
gfx_blend_src_bright(DTEX(dst), dx, dy, STEX(src), sx, sy, w, h, alpha, rate);
|
||||
}
|
||||
|
||||
//void DrawGraph_BlendAddSatur(int dst, int dx, int dy, int src, int sx, int sy, int w, int h);
|
||||
void DrawGraph_BlendAddSatur(int dst, int dx, int dy, int src, int sx, int sy, int w, int h)
|
||||
{
|
||||
gfx_blend_add_satur(DTEX(dst), dx, dy, STEX(src), sx, sy, w, h);
|
||||
}
|
||||
|
||||
//void DrawGraph_BlendAMapSrcOnly(int dst, int dx, int dy, int src, int sx, int sy, int w, int h);
|
||||
|
||||
void DrawGraph_BlendAMapColorAlpha(int dst, int dx, int dy, int src, int sx, int sy, int w, int h, int r, int g, int b, int a)
|
||||
@@ -351,7 +355,7 @@ HLL_LIBRARY(DrawGraph,
|
||||
HLL_EXPORT(CopyAMapMin, DrawGraph_CopyAMapMin),
|
||||
HLL_EXPORT(Blend, DrawGraph_Blend),
|
||||
HLL_EXPORT(BlendSrcBright, DrawGraph_BlendSrcBright),
|
||||
//HLL_EXPORT(BlendAddSatur, DrawGraph_BlendAddSatur),
|
||||
HLL_EXPORT(BlendAddSatur, DrawGraph_BlendAddSatur),
|
||||
HLL_EXPORT(BlendAMap, DrawGraph_BlendAMap),
|
||||
//HLL_EXPORT(BlendAMapSrcOnly, DrawGraph_BlendAMapSrcOnly),
|
||||
HLL_EXPORT(BlendAMapColor, DrawGraph_BlendAMapColor),
|
||||
|
||||
Reference in New Issue
Block a user