#ifndef JOHNNY_H_INCLUDED #define JOHNNY_H_INCLUDED void head(void); void hair(void); void eyeleft(void); void eyeright(void); void neck(void); void chest(void); void tummy(void); void jetpackright(void); void jetpackleft(void); void forearmleft(void); void forearmright(void); void handleft(void); void handright(void); void upperarmleft(void); void upperarmright(void); void pelvis(void); void upperlegleft(void); void upperlegright(void); void lowerlegleft(void); void lowerlegright(void); void bootleft(void); void bootright(void); void footleft(void); void footright(void); void head_Material__2(void); void hair_Material__9(void); void eyeleft_Material__8(void); #define MAIN_MENU_QUIT 0 #define RADIANS 0.01745329252 #define FOVY 80 #define DEBUG 0 #define MAXPLATFORMS 100 #define MAXCOINS 100 #define MAXLEVELS 4 #define MAX_VELOCITY_X 30 #define MAX_VELOCITY_Y_UP 10000 #define MAX_VELOCITY_Y_DOWN -50 #define MAX_VELOCITY_Z 30 #define WINDOW_SIZE 400 #define JOHNNY_X_WIDTH 100 #define JOHNNY_Y_WIDTH 90 #define JOHNNY_HEIGHT 360 typedef enum {XMin, YMin, ZMin, XMax, YMax, ZMax, Xc, Yc, Zc} BoundaryType; typedef enum {Xv,Yv,Zv} VectorType; int Coins[MAXCOINS][6]; extern int Platforms[MAXPLATFORMS][6]; int FuelCans[100][6]; int Lava[100][6]; int NumCoins; int NumPlatforms; int NumFuelCans; int NumLava; int Landed = 0; int Level = 0; int GameOver = 1; int Dead = 0; int Lives = 5; int MessageTime = 0; /* Johnny's bounding box mins, maxes, and initial center */ extern int JohnnyBound[9] = {-50,-180,-50, 50, 180, 40, 0,0,-5}; extern int nextJohnnyBound[9] = {-50,-180,-50, 50, 180, 40, 0,0,-5}; /* Johnny's model translation coords */ extern int JohnnyX = 0, JohnnyY = 0, JohnnyZ = 0; extern int JohnnyTheta = 0; extern int OldJohnnyTheta = 0; extern int StrafeMode = 1; extern int Thrust = 0, thrustX = 0, thrustY = 0; extern int Gravity = 20; extern int Velocity[3] = {0,0,0}; extern int nextVelocity[3] = {0,0,0}; extern int OldDragX=0, OldDragY=0; extern int Fuel = 255; float X = 0, Y = 0, Z = 0; /*initial position of camera*/ int rotatex = 0; /*parameters for model rotation*/ int rotatey = 0; int rotatez = 0; int superrotate = 0; int halfrotate = 0; int step = 5; int initialclick = 1; int W, H; /*window height and width*/ int first_time = 0; /*first time through flag*/ int FILL = 1; /*fill flag*/ int NORMALS = 0; /*normals flag*/ int LIGHTS = 1; /*lights flag*/ float x_max= -1000, x_min = 1000; /*clipping plane parameters*/ float y_max= -1000, y_min = 1000; float z_max= -1000, z_min = 1000; int vertices, faces; /*# of vertices and faces*/ float *x, *y, *z; /*pointers to x, y, z pos'n of vertices*/ int *one, *two, *three; /*pointers to triangle faces*/ float *normalx, *normaly, *normalz; /*pointers to normals*/ float black[] = {0, 0, 0, 1}; float cyan[] = {0, .5, .5, 1}; float green[] = {0, 1, 0, 1}; float blue[] = {0, 0, 1, 1}; float red[] = {1, 0, 0, 1}; float white[] = {1, 1, 1, 1}; float yellow[] = {1, 1, 0, 1}; float gray[] = {.47, .44, .47, 1}; int FACE_FLAG = 0; int which; void disable (void); /*function prototypes*/ void lighting (void); void display (void); void DrawPolygon (void); void Set_Mat (float *); void keyboard (unsigned char, int, int); void selectMainMenu (int); void myReshape(GLsizei, GLsizei); void glutMenu (void); void init (void); void eyeright_Material__8(void); void Cylinder01_Material__7(void); void chest_Material__7(void); void tummy_Material__7(void); void jetpacklef_Material__8(void); void jetpackrig_Material__8(void); void forearmlef_Material__3(void); void forearmrig_Material__3(void); void handleft_Material__3(void); void handright_Material__3(void); void upperarmle_Material__7(void); void upperarmri_Material__7(void); void pelvis_Material__7(void); void upperlegle_Material__7(void); void upperlegri_Material__7(void); void lowerlegle_Material__7(void); void lowerlegri_Material__7(void); void bootleft_Material__3(void); void bootright_Material__3(void); void footleft_Material__3(void); void footright_Material__3(void); /* Johnny's pivot points */ GLfloat neck_pivot[3] = {0.0, 104.398, 1.81}; GLfloat right_shoulder_pivot[3] = {-32.282, 86.942, 0.0}; GLfloat left_shoulder_pivot[3] = {32.282, 86.942, 0.0}; GLfloat chest_pivot[3] = {0.0, 47.85, 0.0}; GLfloat right_elbow_pivot[3] = {-45.446, 31.496, 0.0}; GLfloat left_elbow_pivot[3] = {45.446, 31.496, 0.0}; GLfloat tummy_pivot[3] = {0.0 , 25.113, 0.0}; GLfloat right_wrist_pivot[3] = {-46.643, -10.389, 0.0}; GLfloat left_wrist_pivot[3] = {46.643, -10.389, 0.0}; GLfloat right_hip_pivot[3] = {-16.725, 1.578, 0.0}; GLfloat left_hip_pivot[3] = {16.725, 1.578, 0.0}; GLfloat right_knee_pivot[3] = {-21.113, -86.809, 15.556}; GLfloat left_knee_pivot[3] = {21.113, -86.809, 15.556}; GLfloat right_ankle_pivot[3] = {-21.911, -180.573, -4.022}; GLfloat left_ankle_pivot[3] = {21.911, -180.573, -4.022}; #endif