annotate Xcode/TemplatesForXcodeTiger/SDL OpenGL Application/atlantis/atlantis.h @ 4639:f5cd4b6231ba

Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
author Jim Grandpre <jim.tla@gmail.com>
date Mon, 24 May 2010 23:44:24 -0400
parents 232e5e00e398
children
rev   line source
3329
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
1 /**
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
2 * (c) Copyright 1993, 1994, Silicon Graphics, Inc.
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
3 * ALL RIGHTS RESERVED
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
4 * Permission to use, copy, modify, and distribute this software for
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
5 * any purpose and without fee is hereby granted, provided that the above
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
6 * copyright notice appear in all copies and that both the copyright notice
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
7 * and this permission notice appear in supporting documentation, and that
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
8 * the name of Silicon Graphics, Inc. not be used in advertising
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
9 * or publicity pertaining to distribution of the software without specific,
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
10 * written prior permission.
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
11 *
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
12 * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS"
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
13 * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
14 * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
15 * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
16 * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT,
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
17 * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
18 * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION,
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
19 * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
20 * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
21 * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
22 * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
23 * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
24 *
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
25 * US Government Users Restricted Rights
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
26 * Use, duplication, or disclosure by the Government is subject to
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
27 * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
28 * (c)(1)(ii) of the Rights in Technical Data and Computer Software
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
29 * clause at DFARS 252.227-7013 and/or in similar or successor
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
30 * clauses in the FAR or the DOD or NASA FAR Supplement.
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
31 * Unpublished-- rights reserved under the copyright laws of the
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
32 * United States. Contractor/manufacturer is Silicon Graphics,
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
33 * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311.
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
34 *
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
35 * OpenGL(TM) is a trademark of Silicon Graphics, Inc.
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
36 */
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
37 #define RAD 57.295
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
38 #define RRAD 0.01745
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
39
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
40 #define NUM_SHARKS 4
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
41 #define SHARKSIZE 6000
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
42 #define SHARKSPEED 100.0
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
43
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
44 #define WHALESPEED 250.0
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
45
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
46 typedef struct _fishRec {
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
47 float x, y, z, phi, theta, psi, v;
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
48 float xt, yt, zt;
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
49 float htail, vtail;
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
50 float dtheta;
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
51 int spurt, attack;
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
52 } fishRec;
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
53
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
54 extern fishRec sharks[NUM_SHARKS];
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
55 extern fishRec momWhale;
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
56 extern fishRec babyWhale;
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
57 extern fishRec dolph;
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
58
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
59 extern void FishTransform(fishRec *);
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
60 extern void WhalePilot(fishRec *);
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
61 extern void SharkPilot(fishRec *);
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
62 extern void SharkMiss(int);
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
63 extern void DrawWhale(fishRec *);
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
64 extern void DrawShark(fishRec *);
232e5e00e398 Added missing templates
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
65 extern void DrawDolphin(fishRec *);