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