X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fflow.c;h=b5fdfcc4d858361e06967e7ab205c37bcdf50627;hb=93f25dc6827112d98b8b855ea85c8f5eb8123086;hp=0f8c2f4aee2914762d3ccd952b1ebd042219fe4a;hpb=0316d74da7982288abddd34e7a62698eb7f79965;p=xscreensaver diff --git a/hacks/flow.c b/hacks/flow.c index 0f8c2f4a..b5fdfcc4 100644 --- a/hacks/flow.c +++ b/hacks/flow.c @@ -472,7 +472,7 @@ static double box_orig[][3] = { static double box[BOX_P][3]; /* Lines connecting the box dots */ -static double lines[0][2] = { +static double lines[][2] = { {0,1}, {1,2}, {2,3}, {3,0}, /* box */ {4,5}, {5,6}, {6,7}, {7,4}, {0,4}, {1,5}, {2,6}, {3,7}, @@ -496,8 +496,17 @@ void init_clip(flowstruct *sp) /* Scale the planes to the screen. I had to invert the projection * algorithms so that when projected they would be right at the edge of the * screen. */ - double width = sp->size/sp->view.depth/2; - double height = sp->size/sp->view.depth/2*sp->view.height/sp->view.height; + + /* #### jwz: I'm not really sure what it means when sp->view.depth is 0 + in here -- what's the right thing to do? */ + + double width = (sp->view.depth + ? sp->size/sp->view.depth/2 + : 1); + double height = (sp->view.depth + ? (sp->size/sp->view.depth/2* + sp->view.height/sp->view.height) + : 1); for (i = 0; i < PLANES; i++) { /* Copy orig planes into planes, expanding <-> clippings */ plane[i][0][0] = plane_orig[i][0][0];