#define PLANET_ELIPSE 1.17
#define EXPLOSION_VERTICES 16
#define EXPLOSION_ELIPSE 1.17
+#define SIGHT_DIST 78.74 /* distanc of sights in inch */
/*
* render item definition and structures
gamecolor2gl(&red, &green, &blue, 0x777);
opengl_render_color(red, green, blue, debug_opacity);
/* render point */
- opengl_render_point(0.0, 0.0, 100.0, 0.0);
+ opengl_render_point(0.0, 0.0, 1000000.0, 0.0);
break;
}
case RENDER_ITEM_SIGHTS:
printf("RENDER_ITEM_SIGHTS\n");
#endif
/* use default fov of 64 to calculate z distance */
- z[0] = z[1] = z[2] = z[3] = 160.0 / frustum_slope_64;
+ z[0] = z[1] = z[2] = z[3] = SIGHT_DIST;
/* white */
gamecolor2gl(&red, &green, &blue, 0x777);
opengl_render_color(red, green, blue, debug_opacity);
- y[0] = y[3] = -1.0;
- y[1] = y[2] = 1.0;
- x[0] = x[1] = -16.0;
- x[2] = x[3] = -8.0;
+ y[0] = y[3] = -1.0 / 160.0 * SIGHT_DIST * frustum_slope_64;
+ y[1] = y[2] = 1.0 / 160.0 * SIGHT_DIST * frustum_slope_64;
+ x[0] = x[1] = -16.0 / 160.0 * SIGHT_DIST * frustum_slope_64;
+ x[2] = x[3] = -8.0 / 160.0 * SIGHT_DIST * frustum_slope_64;
opengl_render_polygon(x, y, z, 4, 0); /* no culling, because sights are always visible! */
- x[0] = x[1] = 8.0;
- x[2] = x[3] = 16.0;
+ x[0] = x[1] = 8.0 / 160.0 * SIGHT_DIST * frustum_slope_64;
+ x[2] = x[3] = 16.0 / 160.0 * SIGHT_DIST * frustum_slope_64;
opengl_render_polygon(x, y, z, 4, 0); /* no culling, because sights are always visible! */
break;
}