* Thanks goes also to Brian Paul for making it possible and inexpensive
* to use OpenGL at home.
*
- * My e-mail address is lassauge@sagem.fr
+ * My e-mail address is lassauge@users.sourceforge.net
*
* Eric Lassauge (May-13-1998)
*
*
* OpenGL(TM) is a trademark of Silicon Graphics, Inc.
*/
-#include <GL/gl.h>
-#include <GL/glx.h>
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif /* HAVE_CONFIG_H */
+
+#ifdef STANDALONE
+# include <math.h>
+# include "screenhackI.h"
+# ifndef HAVE_JWXYZ
+# include <GL/gl.h>
+# include <GL/glx.h>
+# endif
+#else
+# include "xlock.h"
+#endif
+#ifdef HAVE_ANDROID
+#include <GLES/gl.h>
+#endif
+
+
+#ifdef HAVE_JWZGLES
+# include "jwzgles.h"
+#endif /* HAVE_JWZGLES */
#define RAD 57.295
#define RRAD 0.01745
+/* default values */
#define NUM_SHARKS 4
+#define SHARKSPEED 100
#define SHARKSIZE 6000
-#define SHARKSPEED 100.0
-
-#define WHALESPEED 250.0
typedef struct _fishRec {
- float x, y, z, phi, theta, psi, v;
- float xt, yt, zt;
- float htail, vtail;
- float dtheta;
- int spurt, attack;
+ float x, y, z, phi, theta, psi, v;
+ float xt, yt, zt;
+ float htail, vtail;
+ float dtheta;
+ int spurt, attack;
+ int sign;
} fishRec;
typedef struct {
- GLint WinH, WinW;
- GLXContext *glx_context;
- fishRec sharks[NUM_SHARKS];
- fishRec momWhale;
- fishRec babyWhale;
- fishRec dolph;
+ GLint WinH, WinW;
+ GLXContext *glx_context;
+ int num_sharks;
+ float sharkspeed, whalespeed;
+ int sharksize;
+ int wire;
+ Bool whaledir;
+ fishRec *sharks;
+ fishRec momWhale;
+ fishRec babyWhale;
+ fishRec dolph;
+
+ XImage *texture; /* water distortion overlay bits */
} atlantisstruct;
extern void FishTransform(fishRec *);
-extern void WhalePilot(fishRec *);
-extern void SharkPilot(fishRec *);
-extern void SharkMiss(atlantisstruct *,int);
-extern void DrawWhale(fishRec *);
-extern void DrawShark(fishRec *);
-extern void DrawDolphin(fishRec *);
+extern void WhalePilot(fishRec *, float, Bool);
+extern void SharkPilot(fishRec *, float);
+extern void SharkMiss(atlantisstruct *, int);
+extern void DrawWhale(fishRec *, int);
+extern void DrawShark(fishRec *, int);
+extern void DrawDolphin(fishRec *, int);