diff options
-rw-r--r-- | src/config.h | 6 | ||||
-rw-r--r-- | src/graphics_c3.c | 10 | ||||
-rw-r--r-- | src/graphics_cs_x11.c | 4 |
3 files changed, 11 insertions, 9 deletions
diff --git a/src/config.h b/src/config.h index cae9a3f..94688c6 100644 --- a/src/config.h +++ b/src/config.h @@ -13,8 +13,10 @@ #define RED_AND_BLUE 0 #define SHAPES 16386 #define MAX_SIDES 8 -#define WIDTH 4000 -#define HEIGHT 3000 +#define MAXWIDTH 4000 +#define WIDTH 320 +#define MAXHEIGHT 3000 +#define HEIGHT 240 #define DEFAULT_MINIMAP 0 #define FORCE_REDRAW 1 #define MAXSHAPES 30000 diff --git a/src/graphics_c3.c b/src/graphics_c3.c index 805d062..a66cebb 100644 --- a/src/graphics_c3.c +++ b/src/graphics_c3.c @@ -133,7 +133,7 @@ c3_t c3_subtract(c3_t p1,c3_t p2) { return (c3_t){p1.x-p2.x,p1.y-p2.y,p1.z-p2.z}; } -#define MAGIC(x) (1.0l-(1.0l/powl(1.01l,(x)))) //??? might want to have some changables in here +#define MAGIC(x) (1.0l-(1.0l/powl(1.1l,(x)))) //??? might want to have some changables in here real magic(real x) { return MAGIC(x); @@ -341,8 +341,8 @@ void draw_screen() { if(gra_global.split_screen > 1) { //oh... this will need to be a couple more lines... of what? I forgot. -Sep 2017 - radians tmprad=d2r((degrees){global.camera.r.y.d+180}); - radians tmprad2=d2r((degrees){global.camera.r.y.d+180}); + radians tmprad=d2r((degrees){global.camera.r.y.d+90}); + radians tmprad2=d2r((degrees){global.camera.r.y.d+90}); global.camera.p.z-=(gra_global.split_flip)*((gra_global.split/gra_global.split_screen)*cosl( tmprad.r )); global.camera.p.x-=(gra_global.split_flip)*((gra_global.split/gra_global.split_screen)*sinl( tmprad2.r )); } @@ -440,8 +440,8 @@ void draw_screen() { } // XSetForeground(global.dpy, global.backgc, global.green.pixel); - radians tmprad=d2r((degrees){global.camera.r.y.d+180}); - radians tmprad2=d2r((degrees){global.camera.r.y.d+180}); + radians tmprad=d2r((degrees){global.camera.r.y.d+90}); + radians tmprad2=d2r((degrees){global.camera.r.y.d+90}); global.camera.p.z+=(gra_global.split_flip)*(gra_global.split*cosl( tmprad.r )); global.camera.p.x+=(gra_global.split_flip)*(gra_global.split*sinl( tmprad2.r )); } diff --git a/src/graphics_cs_x11.c b/src/graphics_cs_x11.c index 9a18738..fea54a5 100644 --- a/src/graphics_cs_x11.c +++ b/src/graphics_cs_x11.c @@ -353,8 +353,8 @@ int graphics_sub_init() { global.group_rot[0]=&global.camera; global.group_rot[1]=0; x11_global.gc=XCreateGC(x11_global.dpy,x11_global.w, 0, 0); - x11_global.backbuffer=XCreatePixmap(x11_global.dpy,x11_global.w,gra_global.width,gra_global.height,DefaultDepth(x11_global.dpy,DefaultScreen(x11_global.dpy))); - x11_global.cleanbackbuffer=XCreatePixmap(x11_global.dpy,x11_global.w,gra_global.width,gra_global.height,DefaultDepth(x11_global.dpy,DefaultScreen(x11_global.dpy))); + x11_global.backbuffer=XCreatePixmap(x11_global.dpy,x11_global.w,MAXWIDTH,MAXHEIGHT,DefaultDepth(x11_global.dpy,DefaultScreen(x11_global.dpy))); + x11_global.cleanbackbuffer=XCreatePixmap(x11_global.dpy,x11_global.w,MAXWIDTH,MAXHEIGHT,DefaultDepth(x11_global.dpy,DefaultScreen(x11_global.dpy))); //backbuffer is uninitialized x11_global.backgc=XCreateGC(x11_global.dpy,x11_global.backbuffer,0,0); |