diff options
| author | kkard2 <[email protected]> | 2025-09-14 11:56:10 +0200 |
|---|---|---|
| committer | kkard2 <[email protected]> | 2025-09-14 11:56:10 +0200 |
| commit | a554485534c83c2ecfa98f8c651ad957358a4034 (patch) | |
| tree | 5560c1b5c117126c80110e4353370be7f8e55d39 /examples/triangle.c | |
| parent | 90d40f283f6e7a8a1c57849841ddee11f362d95e (diff) | |
finish refactor (triangles)
Diffstat (limited to 'examples/triangle.c')
| -rw-r--r-- | examples/triangle.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/triangle.c b/examples/triangle.c index a39ee1b..a3559e9 100644 --- a/examples/triangle.c +++ b/examples/triangle.c @@ -6,7 +6,7 @@ static int32_t offset = 0; void init() {} void draw_frame(sponge_Texture c) { - sponge_clear(c, 0xFF000000); + sponge_clear(c, sponge_color32_make(0xFF000000)); offset += SPEED; if (offset > 100) @@ -14,8 +14,8 @@ void draw_frame(sponge_Texture c) { sponge_draw_triangle_col3( c, - 30, 30 + offset, - c.width - 30, 50 + offset, - 30, c.height - 30 + offset, - 0xFFFF0000, 0xFF00FF00, 0xFF0000FF); + sponge_vec2i_make(30, 30 + offset), + sponge_vec2i_make(c.width - 30, 50 + offset), + sponge_vec2i_make(30, c.height - 30 + offset), + sponge_colorf_make(0xFFFF0000), sponge_colorf_make(0xFF00FF00), sponge_colorf_make(0xFF0000FF)); } |
