summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorepoch <epoch@hacking.allowed.org>2020-06-25 08:18:22 -0500
committerepoch <epoch@hacking.allowed.org>2020-06-25 08:18:22 -0500
commit7c9c6dcb800fcf4652b7f481a5f0693035e673ef (patch)
tree112dbeec87a2f2abf6f6230fe1a31a61062b2e41
parent61afcb601343cb9337e69595e66ab7fd78115b3f (diff)
downloadhackvr-7c9c6dcb800fcf4652b7f481a5f0693035e673ef.tar.gz
hackvr-7c9c6dcb800fcf4652b7f481a5f0693035e673ef.zip
added horizon line back
-rw-r--r--src/graphics_c3.c10
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++) {