diff options
author | epoch <epoch@hacking.allowed.org> | 2020-06-25 08:18:22 -0500 |
---|---|---|
committer | epoch <epoch@hacking.allowed.org> | 2020-06-25 08:18:22 -0500 |
commit | 7c9c6dcb800fcf4652b7f481a5f0693035e673ef (patch) | |
tree | 112dbeec87a2f2abf6f6230fe1a31a61062b2e41 /src | |
parent | 61afcb601343cb9337e69595e66ab7fd78115b3f (diff) | |
download | hackvr-7c9c6dcb800fcf4652b7f481a5f0693035e673ef.tar.gz hackvr-7c9c6dcb800fcf4652b7f481a5f0693035e673ef.zip |
added horizon line back
Diffstat (limited to 'src')
-rw-r--r-- | src/graphics_c3.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/graphics_c3.c b/src/graphics_c3.c index eb63909..3bcef68 100644 --- a/src/graphics_c3.c +++ b/src/graphics_c3.c @@ -421,9 +421,13 @@ 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) {//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 - } + //if(gra_global.draw3d) {//wtf? why do I not compensate for camaera rotation along the x and z? + //horizon line + draw_c2_line((c2_t){LEFT, + (int)((real)(global.camera.r.x.d) * (real)(BOTTOM+BOTTOM) / (real)90.0)}, + (c2_t){RIGHT, + (int)((real)(global.camera.r.x.d) * (real)(BOTTOM+BOTTOM) / (real)90.0)}); + //} ///// 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. for(i=0;global.shape[i];i++) { |