diff options
Diffstat (limited to 'src/Game.h')
-rw-r--r-- | src/Game.h | 105 |
1 files changed, 52 insertions, 53 deletions
diff --git a/src/Game.h b/src/Game.h index e7d5b53..c1127ea 100644 --- a/src/Game.h +++ b/src/Game.h @@ -1,7 +1,7 @@ #ifndef _GAME_H_ #define _GAME_H_ -#ifdef OS9 +#ifdef OS9 #include <gl.h> #include <glu.h> #include <tk.h> @@ -9,31 +9,31 @@ #include <GL/gl.h> #include <GL/glu.h> #endif -#include <stdlib.h> -#include <stdio.h> +#include <stdlib.h> +#include <stdio.h> #include <string.h> #include <ctype.h> -#ifdef OS9 +#ifdef OS9 #include <Sound.h> -#include <Resources.h> +#include <Resources.h> #endif #include <cstdarg> -#ifdef OS9 +#ifdef OS9 #include <glm.h> #include <TextUtils.h> #endif -#ifndef OS9 +#ifndef OS9 #include <SDL/SDL.h> #endif -#ifdef OS9 +#ifdef OS9 #include "alut.h" #else #include <AL/al.h> #include <AL/alut.h> #endif -#include "Timer.h" -#ifdef OS9 -#include "AGL_DSp.h" +#include "Timer.h" +#ifdef OS9 +#include "AGL_DSp.h" #endif #include "MacInput.h" #include "Quaternions.h" @@ -53,34 +53,33 @@ #define max_people 90 #define max_people_block 20 - -class Game +class Game { public: //Eventloop Boolean gQuit; float gamespeed; double multiplier2,multiplier3,multiplier4,multiplier5,end,start,timetaken,framespersecond; - timer theTimer; + timer theTimer; float sps; int maxfps; -#ifdef OS9 +#ifdef OS9 AGLContext gOpenGLContext; CGrafPtr theScreen; #endif //Graphics int screenwidth,screenheight; float viewdistance; - + //GL functions GLvoid ReSizeGLScene(float fov, float near); int DrawGLScene(void); int InitGL(void); void LoadingScreen(float percent); - + //Game Functions void HandleKeyDown( char theChar ); -#ifdef OS9 +#ifdef OS9 void DoEvent( EventRecord *event ); #endif void EventLoop( void ); @@ -88,7 +87,7 @@ class Game void Splat(int k); void InitGame(); void Dispose(); - + //Mouse Point mouseloc; Point oldmouseloc; @@ -97,11 +96,11 @@ class Game float oldmouserotation,oldmouserotation2; float mousesensitivity; float usermousesensitivity; - + //keyboard - + bool tabkeydown; - + //Project Specific int cityrotation[num_blocks][num_blocks]; int citytype[num_blocks][num_blocks]; @@ -111,22 +110,22 @@ class Game bool cubetest; bool disttest; bool oldbutton; - + bool initialized; - + float flashamount; float flashr,flashg,flashb; - + int enemystate; - + int cycle; - + bool whacked; - + float losedelay; - + XYZ bodycoords; - + FRUSTUM frustum; Model blocks[4]; Model blockwalls[4]; @@ -146,59 +145,59 @@ class Game int badkills; int civkills; int machinegunsoundloop; - + bool lasersight; bool debug; bool vblsync; - + bool blur; bool blurness; - + bool paused; - + int mainmenu; - + bool reloadtoggle; - + bool aimtoggle; Point olddrawmouse; - + XYZ vipgoal; - + XYZ aimer[2]; - + double eqn[4]; - + float oldrot,oldrot2; - + XYZ lastshot[2]; bool zoom; bool oldzoom; - + int numpeople; float spawndelay; - + bool customlevels; - + bool musictoggle; - + float psychicpower; - + int type; - + bool slomokeydown; - + int mouseoverbutton; int oldmouseoverbutton; - + Person person[max_people]; - + GLuint personspritetextureptr; GLuint deadpersonspritetextureptr; GLuint scopetextureptr; GLuint flaretextureptr; - + bool killedinnocent; bool gameinprogress; bool beatgame; @@ -217,14 +216,14 @@ class Game float difficulty; bool azertykeyboard; bool oldvisionkey; - + ~Game() { glDeleteTextures( 1, (const GLuint *)personspritetextureptr ); glDeleteTextures( 1, (const GLuint *)deadpersonspritetextureptr ); glDeleteTextures( 1, (const GLuint *)scopetextureptr ); glDeleteTextures( 1, (const GLuint *)flaretextureptr ); } - + }; #endif |