as a joke, adding setPixel to Tscript

This commit is contained in:
suchmememanyskill
2020-12-28 15:02:08 +01:00
parent b0dd71bd4f
commit baec43da2a
3 changed files with 13 additions and 0 deletions

View File

@@ -595,6 +595,10 @@ void gfx_set_pixel(u32 x, u32 y, u32 color)
gfx_ctxt.fb[x + y * gfx_ctxt.stride] = color;
}
void gfx_set_pixel_horz(int x, int y, u32 color) {
*(gfx_ctxt.fb + (YLEFT - x) * gfx_ctxt.stride + y) = color;
}
void gfx_line(int x0, int y0, int x1, int y1, u32 color)
{
int dx = abs(x1 - x0), sx = x0 < x1 ? 1 : -1;

View File

@@ -71,6 +71,7 @@ void gfx_puts_limit(const char *s, u32 limit);
void gfx_puts_small(const char *s);
void gfx_set_pixel(u32 x, u32 y, u32 color);
void gfx_set_pixel_horz(int x, int y, u32 color);
void gfx_line(int x0, int y0, int x1, int y1, u32 color);
void gfx_put_small_sep();
void gfx_put_big_sep();