From 416954bbdf5c80dac6a399d85d4bf61825d28f2e Mon Sep 17 00:00:00 2001 From: Kp Date: Sat, 11 Feb 2017 21:42:40 +0000 Subject: [PATCH] Pass canvas to gr_upoly_tmap --- common/3d/draw.cpp | 4 ++-- common/include/3d.h | 2 +- common/texmap/tmapflat.cpp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/common/3d/draw.cpp b/common/3d/draw.cpp index 6dc185142..140b22fa5 100644 --- a/common/3d/draw.cpp +++ b/common/3d/draw.cpp @@ -114,7 +114,7 @@ static void must_clip_flat_face(int nv,g3s_codes cc, polygon_clip_points &Vbuf0, Vertex_list[i*2] = p->p3_sx; Vertex_list[i*2+1] = p->p3_sy; } - gr_upoly_tmap(nv, Vertex_list, color); + gr_upoly_tmap(*grd_curcanv, nv, Vertex_list, color); } //free temp points free_points: @@ -164,7 +164,7 @@ void _g3_draw_poly(uint_fast32_t nv,cg3s_point *const *const pointlist, const ui Vertex_list[i*2] = p->p3_sx; Vertex_list[i*2+1] = p->p3_sy; } - gr_upoly_tmap(nv, Vertex_list, color); + gr_upoly_tmap(*grd_curcanv, nv, Vertex_list, color); //say it drew } diff --git a/common/include/3d.h b/common/include/3d.h index 45ec23896..6b8cf2ff9 100644 --- a/common/include/3d.h +++ b/common/include/3d.h @@ -310,7 +310,7 @@ using tmap_drawer_type = void (*)(grs_canvas &, const grs_bitmap &bm, uint_fast3 // This is the gr_upoly-like interface to the texture mapper which uses texture-mapper compatible // (ie, avoids cracking) edge/delta computation. -void gr_upoly_tmap(uint_fast32_t nverts, const array &vert, uint8_t color); +void gr_upoly_tmap(grs_canvas &, uint_fast32_t nverts, const array &vert, uint8_t color); #endif void g3_draw_line(grs_canvas &canvas, cg3s_point &p0, cg3s_point &p1, uint8_t color); diff --git a/common/texmap/tmapflat.cpp b/common/texmap/tmapflat.cpp index 201112ef7..230e09bd3 100644 --- a/common/texmap/tmapflat.cpp +++ b/common/texmap/tmapflat.cpp @@ -176,9 +176,9 @@ static void texture_map_flat(grs_canvas &canvas, const g3ds_tmap &t, int color) // ----------------------------------------------------------------------------------------- // This is the gr_upoly-like interface to the texture mapper which uses texture-mapper compatible // (ie, avoids cracking) edge/delta computation. -void gr_upoly_tmap(uint_fast32_t nverts, const array &vert, const uint8_t color) +void gr_upoly_tmap(grs_canvas &canvas, uint_fast32_t nverts, const array &vert, const uint8_t color) { - gr_upoly_tmap_ylr(*grd_curcanv, nverts, vert.data(), color); + gr_upoly_tmap_ylr(canvas, nverts, vert.data(), color); } struct pnt2d {