From a527864a0fd94da58ff36a452e2ca314beea3894 Mon Sep 17 00:00:00 2001 From: epoch Date: Mon, 24 Feb 2020 00:21:05 -0600 Subject: got rid of the derpy horizon that did not ever move and made shapes with the camera's name rotate in a more sane way when the camera rotates --- src/graphics_c3.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/graphics_c3.c b/src/graphics_c3.c index 46f71fc..1d69ca6 100644 --- a/src/graphics_c3.c +++ b/src/graphics_c3.c @@ -204,6 +204,9 @@ void draw_c3_shape(c3_s_t s) {//outlined. needs to be filled? //draw minimap shi c3_group_rot_t *gr=get_group_relative(s.id); if(s.len > 1) { for(i=0;ip,rotate_c3_yr(s.p[i],(c3_t){0,0,0},d2r((degrees){0-(gr->r.y.d)}))); + } else { if(gr) { //s2.p[i]=c3_add(gr->p,rotate_c3_yr(s.p[i],gr->p,d2r(gr->r.y))); s2.p[i]=c3_add(gr->p,rotate_c3_xr( @@ -216,6 +219,7 @@ void draw_c3_shape(c3_s_t s) {//outlined. needs to be filled? //draw minimap shi } else { s2.p[i]=s.p[i]; } + } } } if(s.len == 1) { @@ -423,8 +427,8 @@ void draw_screen() { //draw_sky();//???p? //XCopyArea(global.dpy,skypixmap,global.backbuffer,global.backgc,((camera.yr*5)+SKYW)%SKYW,0,WIDTH,global.height/2,0,0); } - if(gra_global.draw3d) { - draw_c2_line((c2_t){LEFT,0},(c2_t){RIGHT,0}); //horizon + if(gra_global.draw3d) {//wtf? why do I not compensate for camaera rotation along the x and z? + //draw_c2_line((c2_t){LEFT,0},(c2_t){RIGHT,0}); //horizon } ///// shiiiit. I should be applying group rotations to all these shapes before sorting them. //when I do that. I need to make sure to take the group rotation out of draw_c3_shape()'s code. -- cgit v1.2.3