Add engine_rendertarget_fill
This commit is contained in:
parent
3d697c4656
commit
2cf2d7441b
@ -2,6 +2,18 @@ struct ENGINE_TEXTURE * engine_rendertarget_get() {
|
||||
return engine_rendertarget;
|
||||
}
|
||||
|
||||
void engine_rendertarget_fill(int sx,int sy,int ex,int ey) {
|
||||
int y = sy;
|
||||
while (y < ey) {
|
||||
int x = sx;
|
||||
while (x < ex) {
|
||||
engine_rendertarget_draw_point(x,y);
|
||||
x += 1;
|
||||
}
|
||||
y += 1;
|
||||
}
|
||||
}
|
||||
|
||||
void engine_rendertarget_draw_texture(struct ENGINE_TEXTURE * texture,int x,int y) {
|
||||
int sx = 0;
|
||||
if (x < 0) {
|
||||
|
@ -71,6 +71,12 @@ arguments = ["int","int"]
|
||||
argNames = ["x", "y"]
|
||||
description = "Draw a pixel."
|
||||
|
||||
[engine_rendertarget_fill]
|
||||
type = "void"
|
||||
arguments = ["int","int","int","int"]
|
||||
argNames = ["sx", "sy", "ex", "ey"]
|
||||
description = "Fill the rendertarget from sx,sy to ex,ey."
|
||||
|
||||
[engine_rendertarget_draw_texture]
|
||||
type = "void"
|
||||
arguments = ["struct ENGINE_TEXTURE *","int","int"]
|
||||
|
Loading…
Reference in New Issue
Block a user