#include <stdlib.h>
#include <math.h>
#include <time.h>
+#include <string.h>
#ifdef WIN32
#include <windows.h>
#endif
#include <GL/glut.h>
-#include "readtex.c"
+#include "readtex.h"
#ifdef XMESA
#include "GL/xmesa.h"
static float treepos[NUMTREE][3];
static float black[3] = { 0.0, 0.0, 0.0 };
-static float blu[3] = { 0.0, 0.2, 1.0 };
-static float blu2[3] = { 0.0, 1.0, 1.0 };
+static float blu[3] = { 1.0, 0.2, 0.0 };
+static float blu2[3] = { 1.0, 1.0, 0.0 };
static float fogcolor[4] = { 1.0, 1.0, 1.0, 1.0 };
static float obs[3] = { 2.0, 1.0, 0.0 };
static float dir[3];
static float v = 0.0;
-static float alpha = -90.0;
+static float alpha = -84.0;
static float beta = 90.0;
static float
{
static char frbuf[80] = "";
int j;
+ static double t0 = -1.;
+ double t = glutGet(GLUT_ELAPSED_TIME) / 1000.0;
+ if (t0 < 0.0)
+ t0 = t;
+ dt = (t - t0) * 1.0;
+ t0 = t;
dojoy();
break;
case 'a':
- v += 0.01;
+ v += 0.0005;
break;
case 'z':
- v -= 0.01;
+ v -= 0.0005;
break;
case 'j':
/* Default settings */
np = 800;
- eject_r = 0.1;
+ eject_r = -0.35;
dt = 0.015;
eject_vy = 4;
eject_vl = 1;
shadows = 1;
- ridtri = 0.1;
+ ridtri = 0.5;
maxage = 1.0 / dt;