Pass canvas to gr_upoly_tmap

This commit is contained in:
Kp 2017-02-11 21:42:40 +00:00
parent 85da2c0013
commit 416954bbdf
3 changed files with 5 additions and 5 deletions

View file

@ -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
}

View file

@ -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<fix, MAX_POINTS_IN_POLY*2> &vert, uint8_t color);
void gr_upoly_tmap(grs_canvas &, uint_fast32_t nverts, const array<fix, MAX_POINTS_IN_POLY * 2> &vert, uint8_t color);
#endif
void g3_draw_line(grs_canvas &canvas, cg3s_point &p0, cg3s_point &p1, uint8_t color);

View file

@ -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<fix, MAX_POINTS_IN_POLY*2> &vert, const uint8_t color)
void gr_upoly_tmap(grs_canvas &canvas, uint_fast32_t nverts, const array<fix, MAX_POINTS_IN_POLY * 2> &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 {