From 4e1156a9969b397ff75a6036edd9d8b83765d23e Mon Sep 17 00:00:00 2001 From: Kp Date: Sat, 11 Mar 2017 19:56:24 +0000 Subject: [PATCH] Use canvas in OGL g3_draw_sphere --- common/include/3d.h | 1 - similar/arch/ogl/ogl.cpp | 4 ++-- similar/main/automap.cpp | 2 -- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/common/include/3d.h b/common/include/3d.h index 84d948d21..da9f24e97 100644 --- a/common/include/3d.h +++ b/common/include/3d.h @@ -126,7 +126,6 @@ void g3_set_view_matrix(const vms_vector &view_pos,const vms_matrix &view_matrix //end the frame #if DXX_USE_OGL #define g3_end_frame() ogl_end_frame() -#define g3_draw_sphere(C,P,R,c) g3_draw_sphere(P,R,c) #else #define g3_end_frame() #endif diff --git a/similar/arch/ogl/ogl.cpp b/similar/arch/ogl/ogl.cpp index 7ede32cdc..851c50acc 100644 --- a/similar/arch/ogl/ogl.cpp +++ b/similar/arch/ogl/ogl.cpp @@ -770,10 +770,10 @@ namespace dcx { /* * Stars on heaven in exit sequence, automap objects */ -void g3_draw_sphere(grs_canvas &, g3s_point &pnt, fix rad, const uint8_t c) +void g3_draw_sphere(grs_canvas &canvas, g3s_point &pnt, fix rad, const uint8_t c) { int i; - const float scale = (static_cast(grd_curcanv->cv_bitmap.bm_w)/grd_curcanv->cv_bitmap.bm_h); + const float scale = (static_cast(canvas.cv_bitmap.bm_w) / canvas.cv_bitmap.bm_h); GLfloat color_array[20*4]; for (i = 0; i < 20*4; i += 4) diff --git a/similar/main/automap.cpp b/similar/main/automap.cpp index 0e4c9764a..5796b7e3d 100644 --- a/similar/main/automap.cpp +++ b/similar/main/automap.cpp @@ -255,8 +255,6 @@ array MarkerObject = init_MarkerObject(make_tree_index_se # define automap_draw_line g3_draw_line #if DXX_USE_OGL #define DrawMarkerNumber(C,a,b,c) DrawMarkerNumber(a,b,c) -#define DrawMarkers(C,a) DrawMarkers(a) -#define draw_player(C,a,b) draw_player(a,b) #define draw_all_edges(C,a) draw_all_edges(a) #endif