/apps/demos/scenery: use quads

This commit is contained in:
veclavtalica 2025-02-26 11:28:59 +03:00
parent f57525cea6
commit 5f3920fdba

View File

@ -153,26 +153,12 @@ static void draw_terrain(SceneIngame *scn) {
float d2 = heightmap[lx + 1][ly - 1];
float d3 = heightmap[lx][ly - 1];
draw_triangle("/assets/grass.png",
draw_quad("/assets/grass.png",
(Vec3){ (float)x, d0, (float)y },
(Vec3){ (float)x + 1, d1, (float)y },
(Vec3){ (float)x, d3, (float)y - 1 },
(Vec2){ 128, 128 },
(Vec2){ 128, 0 },
(Vec2){ 0, 128 },
(Color){255, 255, 255, 255},
(Color){255, 255, 255, 255},
(Color){255, 255, 255, 255});
draw_triangle("/assets/grass.png",
(Vec3){ (float)x + 1, d1, (float)y },
(Vec3){ (float)x + 1, d2, (float)y - 1 },
(Vec3){ (float)x, d3, (float)y - 1 },
(Vec2){ 128, 0 },
(Vec2){ 0, 0 },
(Vec2){ 0, 128 },
(Color){255, 255, 255, 255},
(Color){255, 255, 255, 255},
(Rect){ .w = 128, .h = 128 },
(Color){255, 255, 255, 255});
draw_billboard("/assets/grasses/10.png",