diff options
-rw-r--r-- | src/Camera.h | 12 | ||||
-rw-r--r-- | src/Decals.h | 9 | ||||
-rw-r--r-- | src/Files.h | 40 | ||||
-rw-r--r-- | src/Fog.h | 4 | ||||
-rw-r--r-- | src/Frustum.cpp | 4 | ||||
-rw-r--r-- | src/Game.h | 31 | ||||
-rw-r--r-- | src/GameInitDispose.cpp | 363 | ||||
-rw-r--r-- | src/GameLoop.cpp | 129 | ||||
-rw-r--r-- | src/GameTick.cpp | 55 | ||||
-rw-r--r-- | src/Main.cpp | 29 | ||||
-rw-r--r-- | src/Models.h | 8 | ||||
-rw-r--r-- | src/Person.h | 9 | ||||
-rw-r--r-- | src/Quaternions.h | 8 | ||||
-rw-r--r-- | src/Skeleton.h | 6 | ||||
-rw-r--r-- | src/Sprites.h | 5 | ||||
-rw-r--r-- | src/TGALoader.h | 8 | ||||
-rw-r--r-- | src/Text.h | 5 |
17 files changed, 104 insertions, 621 deletions
diff --git a/src/Camera.h b/src/Camera.h index 72319a3..538c4ac 100644 --- a/src/Camera.h +++ b/src/Camera.h @@ -2,11 +2,7 @@ #define _CAMERA_H_ /**> HEADER FILES <**/ -#ifdef OS9 -#include <gl.h> -#else #include <GL/gl.h> -#endif #include "Quaternions.h" @@ -17,10 +13,10 @@ class Camera XYZ oldposition; XYZ targetoffset; - float rotation, rotation2; - float oldrotation, oldrotation2; - float oldoldrotation, oldoldrotation2; - float visrotation, visrotation2; + float rotation, rotation2; + float oldrotation, oldrotation2; + float oldoldrotation, oldoldrotation2; + float visrotation, visrotation2; void Apply(); }; diff --git a/src/Decals.h b/src/Decals.h index e77195a..e6e9b37 100644 --- a/src/Decals.h +++ b/src/Decals.h @@ -2,15 +2,6 @@ #define _DECALS_H_ #include "Quaternions.h" -#ifdef OS9 -#include <gl.h> -#include <glu.h> -#include "glut.h" -#else -///ZWARNING -///#include <GL/glut.h> -///GLUT REMOVED. -#endif #include "Files.h" #include "Quaternions.h" #include "Camera.h" diff --git a/src/Files.h b/src/Files.h index 01ea9da..b743e2b 100644 --- a/src/Files.h +++ b/src/Files.h @@ -10,26 +10,10 @@ #include <cmath> #include <iostream> #include <fstream> -#ifdef OS9 -#include "gl.h" // Header File For The OpenGL32 Library -#include "glu.h" // Header File For The GLu32 Library -#include "tk.h" // Header File For The Glaux Library -#else #include <GL/gl.h> #include <GL/glu.h> -#endif -#ifdef OS9 -#include <Sound.h> -#include <Resources.h> -#include "AGL_DSp.h" // Header for OpenGL and DrawSprocket Functions -#include "Alerts.h" // Header for Dialogs and alerts for this application -#endif -#include "MacInput.h" // Header for Special Mac Input functions -#ifdef OS9 -#include "glm.h" -#include <TextUtils.h> -#endif +#include "MacInput.h" // Header for Special Mac Input functions #include "Support.h" #define FILE_STRINGS 130 @@ -72,32 +56,10 @@ class Files public: char szSavedGameName[FILE_NAME_SIZE + 1]; short sSavedGameVolume; -#ifdef OS9 - SFReply sfReply; - Boolean bGameSaved; -#endif -#ifdef OS9 - short sFile; -#else int sFile; -#endif -#ifdef OS9 - short OpenFile(Str255 Name); -#else int OpenFile(Str255 Name); Files() : sFile(-1) { } -#endif - -#ifdef OS9 - short PromptForSaveAS( short sPromptID, - short sNameID, - Str255 str255NamePrompt, - OSType osTypeCreator, - OSType osTypeType, - SFReply *psfReply ); - short OpenNewFile( SFReply *psfReply, OSType osTypeCreator, OSType osTypeType ); -#endif short OpenSavedGame(Str255 Name); short OpenFileDialog(); void LoadNamedMap(Str255 Name); diff --git a/src/Fog.h b/src/Fog.h index a22c378..ea1f2d2 100644 --- a/src/Fog.h +++ b/src/Fog.h @@ -2,11 +2,7 @@ #define _FOG_H_ /**> HEADER FILES <**/ -#ifdef OS9 -#include <gl.h> -#else #include <GL/gl.h> -#endif #include "Quaternions.h" class Fog{ diff --git a/src/Frustum.cpp b/src/Frustum.cpp index 79f0aa6..712c4a3 100644 --- a/src/Frustum.cpp +++ b/src/Frustum.cpp @@ -1,9 +1,5 @@ #include <cmath> -#ifdef OS9 -#include "gl.h" -#else #include <GL/gl.h> -#endif #include "Frustum.h" diff --git a/src/Game.h b/src/Game.h index c1127ea..03643d1 100644 --- a/src/Game.h +++ b/src/Game.h @@ -1,40 +1,17 @@ #ifndef _GAME_H_ #define _GAME_H_ -#ifdef OS9 -#include <gl.h> -#include <glu.h> -#include <tk.h> -#else #include <GL/gl.h> #include <GL/glu.h> -#endif #include <stdlib.h> #include <stdio.h> #include <string.h> #include <ctype.h> -#ifdef OS9 -#include <Sound.h> -#include <Resources.h> -#endif #include <cstdarg> -#ifdef OS9 -#include <glm.h> -#include <TextUtils.h> -#endif -#ifndef OS9 #include <SDL/SDL.h> -#endif -#ifdef OS9 -#include "alut.h" -#else #include <AL/al.h> #include <AL/alut.h> -#endif #include "Timer.h" -#ifdef OS9 -#include "AGL_DSp.h" -#endif #include "MacInput.h" #include "Quaternions.h" #include "Camera.h" @@ -63,10 +40,7 @@ class Game timer theTimer; float sps; int maxfps; -#ifdef OS9 - AGLContext gOpenGLContext; - CGrafPtr theScreen; -#endif + //Graphics int screenwidth,screenheight; float viewdistance; @@ -79,9 +53,6 @@ class Game //Game Functions void HandleKeyDown( char theChar ); -#ifdef OS9 - void DoEvent( EventRecord *event ); -#endif void EventLoop( void ); void Tick(); void Splat(int k); diff --git a/src/GameInitDispose.cpp b/src/GameInitDispose.cpp index f4d898e..69396c5 100644 --- a/src/GameInitDispose.cpp +++ b/src/GameInitDispose.cpp @@ -1,10 +1,7 @@ #include <ctype.h> -#include "Textures.h" - -#ifndef OS9 #include <time.h> -#endif +#include "Textures.h" #include "Game.h" extern unsigned int gSourceID[100]; @@ -1044,35 +1041,20 @@ void Game::LoadingScreen(float percent) } - glMatrixMode(GL_PROJECTION); // Select The Projection Matrix - - glPopMatrix(); // Restore The Old Projection Matrix - - glMatrixMode(GL_MODELVIEW); // Select The Modelview Matrix - - glPopMatrix(); // Restore The Old Projection Matrix - + glMatrixMode(GL_PROJECTION); // Select The Projection Matrix + glPopMatrix(); // Restore The Old Projection Matrix + glMatrixMode(GL_MODELVIEW); // Select The Modelview Matrix + glPopMatrix(); // Restore The Old Projection Matrix glDisable(GL_BLEND); - glDepthMask(1); //Text - glEnable(GL_TEXTURE_2D); - glColor4f(.6-.6*percent/100,0,0,1); - static char string[256]=""; - sprintf (string, "LOADING..."); - text.glPrint(280,195,string,1,1,640,480); - -#ifdef OS9 - aglSwapBuffers( gOpenGLContext ); -#else SDL_GL_SwapBuffers( ); -#endif } @@ -1691,39 +1673,22 @@ void Game::InitGame() if(!initialized)LoadingScreen(loadingscreenamount/loadingscreenamounttotal*100); //Setup random seed - -#ifdef OS9 - qd.randSeed = TickCount(); -#else srand(time(NULL)); -#endif - gamespeed=1; //Setup camera - camera.position=0; - camera.position.x=num_blocks/2*block_spacing+block_spacing/2; - camera.position.z=num_blocks/2*block_spacing+block_spacing/2; - camera.position.y=30; - camera.oldposition=camera.position; - numpeople=1; //Setup path to walk around blocks - path.load((unsigned char *)":Data:Models:path.solid"); - path.Rotate(90,0,0); - path.Scale(.8,.8,.8); - path.CalculateNormals(); - loadingscreenamount+=5; if(!initialized)LoadingScreen(loadingscreenamount/loadingscreenamounttotal*100); @@ -3119,23 +3084,12 @@ void Game::InitGame() } initialized=1; - loadingscreenamount+=5; //Sync to refresh rate - - if(vblsync){ - + if(vblsync) GLint swapInt = 1; -#ifdef OS9 - aglSetInteger(gOpenGLContext, AGL_SWAP_INTERVAL, &swapInt); -#else - -#endif - - } - /* for(int i=0;i<sprites.howmanysprites;i++){ @@ -3163,247 +3117,125 @@ void Game::InitGame() /*********************> InitGL() <*****/ int Game::InitGL(void) - { - //Config - if(!initialized){ - //Default config in case config is not found -#ifdef OS9 - HideCursor(); -#else STUB_FUNCTION; -#endif - screenwidth = 640; - screenheight = 480; - usermousesensitivity=.7; - debug=0; - vblsync=1; - blood = 1; - blurness = 0; - mainmenuness=1; - - customlevels=0; - - musictoggle=1; + customlevels=0; + musictoggle=1; //If no config, write one - ifstream ipstream("config.txt"); - - if(!ipstream) { - - ofstream opstream("config.txt"); - - opstream << "Screenwidth:\n"; - - opstream << screenwidth; - - opstream << "\nScreenheight:\n"; - - opstream << screenheight; - - opstream << "\nMouse sensitivity:\n"; - - opstream << usermousesensitivity; - - opstream << "\nShow fps and other info:\n"; - - opstream << debug; - - opstream << "\nVBL sync:\n"; - - opstream << vblsync; - - opstream << "\nBlood:\n"; - - opstream << blood; - - opstream << "\nBlur:\n"; - - opstream << blurness; - + if(!ipstream) { + ofstream opstream("config.txt"); + opstream << "Screenwidth:\n"; + opstream << screenwidth; + opstream << "\nScreenheight:\n"; + opstream << screenheight; + opstream << "\nMouse sensitivity:\n"; + opstream << usermousesensitivity; + opstream << "\nShow fps and other info:\n"; + opstream << debug; + opstream << "\nVBL sync:\n"; + opstream << vblsync; + opstream << "\nBlood:\n"; + opstream << blood; + opstream << "\nBlur:\n"; + opstream << blurness; opstream << "\nMain Menu:\n"; - - opstream << mainmenuness; - - opstream << "\nCustom levels:\n"; - - opstream << customlevels; - + opstream << mainmenuness; + opstream << "\nCustom levels:\n"; + opstream << customlevels; opstream << "\nMusic:\n"; - - opstream << musictoggle; - + opstream << musictoggle; opstream << "\azerty keyboard:\n"; - - opstream << azertykeyboard; - + opstream << azertykeyboard; opstream.close(); + } - } - - //Read config - + //Read config if(ipstream){ - ipstream.ignore(256,'\n'); - - ipstream >> screenwidth; - - ipstream.ignore(256,'\n'); - - ipstream.ignore(256,'\n'); - - ipstream >> screenheight; - - ipstream.ignore(256,'\n'); - - ipstream.ignore(256,'\n'); - - ipstream >> usermousesensitivity; - - ipstream.ignore(256,'\n'); - - ipstream.ignore(256,'\n'); - - ipstream >> debug; - - ipstream.ignore(256,'\n'); - - ipstream.ignore(256,'\n'); - - ipstream >> vblsync; - - ipstream.ignore(256,'\n'); - - ipstream.ignore(256,'\n'); - - ipstream >> blood; - - ipstream.ignore(256,'\n'); - - ipstream.ignore(256,'\n'); - - ipstream >> blurness; - - ipstream.ignore(256,'\n'); - - ipstream.ignore(256,'\n'); - - ipstream >> mainmenuness; - - ipstream.ignore(256,'\n'); - - ipstream.ignore(256,'\n'); - - ipstream >> customlevels; - - ipstream.ignore(256,'\n'); - - ipstream.ignore(256,'\n'); - - ipstream >> musictoggle; - - ipstream.ignore(256,'\n'); - - ipstream.ignore(256,'\n'); - - ipstream >> azertykeyboard; - - ipstream.close(); - + ipstream >> screenwidth; + ipstream.ignore(256,'\n'); + ipstream.ignore(256,'\n'); + ipstream >> screenheight; + ipstream.ignore(256,'\n'); + ipstream.ignore(256,'\n'); + ipstream >> usermousesensitivity; + ipstream.ignore(256,'\n'); + ipstream.ignore(256,'\n'); + ipstream >> debug; + ipstream.ignore(256,'\n'); + ipstream.ignore(256,'\n'); + ipstream >> vblsync; + ipstream.ignore(256,'\n'); + ipstream.ignore(256,'\n'); + ipstream >> blood; + ipstream.ignore(256,'\n'); + ipstream.ignore(256,'\n'); + ipstream >> blurness; + ipstream.ignore(256,'\n'); + ipstream.ignore(256,'\n'); + ipstream >> mainmenuness; + ipstream.ignore(256,'\n'); + ipstream.ignore(256,'\n'); + ipstream >> customlevels; + ipstream.ignore(256,'\n'); + ipstream.ignore(256,'\n'); + ipstream >> musictoggle; + ipstream.ignore(256,'\n'); + ipstream.ignore(256,'\n'); + ipstream >> azertykeyboard; + ipstream.close(); } - //Read high score -#ifdef OS9 - ifstream ipstream2(":Data:Highscore"); -#else - /* TODO */ + // TODO: Read high score ifstream ipstream2("Data/Highscore"); -#endif - if(!ipstream2) { - - highscore=0; - - beatgame=0; - -#ifdef OS9 - ofstream opstream(":Data:Highscore"); -#else - /* TODO */ - ofstream opstream("Data/Highscore"); -#endif - opstream << highscore; - + if(!ipstream2) { + highscore=0; + beatgame=0; + ofstream opstream("Data/Highscore"); + opstream << highscore; opstream << "\n"; - - opstream << beatgame; - + opstream << beatgame; opstream.close(); - - } - + } if(ipstream2){ - - ipstream2 >> highscore; - - ipstream.ignore(256,'\n'); - - ipstream2 >> beatgame; - - ipstream2.close(); - + ipstream2 >> highscore; + ipstream.ignore(256,'\n'); + ipstream2 >> beatgame; + ipstream2.close(); } sps=40; - maxfps=90; - disttest=1; - cubetest=1; - } //Setup screen -#ifdef OS9 - if(screenwidth<640||screenheight<480) - - theScreen = SetupScreen( 640, 480 ); - - else - - theScreen = SetupScreen( screenwidth, screenheight ); - - gOpenGLContext = SetupAGL( ( AGLDrawable )theScreen ); - - if ( !gOpenGLContext ) - - return; -#else - if (SDL_Init(SDL_INIT_VIDEO) == -1) { + if (SDL_Init(SDL_INIT_VIDEO) == -1) { fprintf(stderr, "SDL Init Video failed: %s\n", SDL_GetError()); exit(EXIT_FAILURE); - } + } atexit(SDL_Quit); SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 5); - SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 5); - SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 5); - SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 16); - SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1); + SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 5); + SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 5); + SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 16); + SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1); if(screenwidth<640||screenheight<480) { #ifdef FULLSCREEN @@ -3434,66 +3266,33 @@ int Game::InitGL(void) SDL_ShowCursor(0); #endif -#endif - text.LoadFontTexture(":Data:Textures:Font.png"); - text.BuildFont(); - glAlphaFunc(GL_GREATER, 0.01); - glDepthFunc(GL_LESS); - glPolygonOffset(-8,0); - glPolygonMode( GL_FRONT_AND_BACK, GL_FILL ); - return TRUE; - } //***************> Dispose() <******/ - void Game::Dispose() - { -#ifdef OS9 - CleanupAGL( gOpenGLContext ); - - ShutdownScreen( theScreen ); - - ShowCursor(); -#endif - //Delete sound sources - alDeleteSources(100, gSourceID); - } //***************> ResizeGLScene() <******/ GLvoid Game::ReSizeGLScene(float fov, float near) - { - if (screenheight==0) - - { - screenheight=1; - } - glViewport(0,0,screenwidth,screenheight); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - gluPerspective(fov,(GLfloat)screenwidth/(GLfloat)screenheight,near,viewdistance); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); } diff --git a/src/GameLoop.cpp b/src/GameLoop.cpp index eec916c..fe7292f 100644 --- a/src/GameLoop.cpp +++ b/src/GameLoop.cpp @@ -161,35 +161,6 @@ void Game::HandleKeyDown( char theChar ) } -/********************> DoEvent() <*****/ - -#ifdef OS9 -void Game::DoEvent( EventRecord *event ) - -{ - - char theChar; - - switch ( event->what ) - - { - - case keyDown: - - case autoKey: - - theChar = event->message & charCodeMask; // Get the letter of the key pressed from the event message - - HandleKeyDown( theChar ); // Only some key presses are handled here because it is slower and less responsive - - break; - - } - -} -#endif - -#ifndef OS9 static int mapinit = 0; static int sdlkeymap[SDLK_LAST]; @@ -368,172 +339,82 @@ static void ProcessSDLEvents(Game *g) } } -#endif - /********************> EventLoop() <*****/ - void Game::EventLoop( void ) - { - -#ifdef OS9 - EventRecord event; -#endif - unsigned char theKeyMap[16]; - int colaccuracy,i; - GLfloat oldmult; - gQuit = false; - - while ( gQuit == false ) - - { - -#ifdef OS9 - if ( GetNextEvent( everyEvent, &event ) ) - - DoEvent( &event ); -#else + while ( gQuit == false ) { ProcessSDLEvents(this); -#endif - start=TimerGetTime(&theTimer); - colaccuracy=sps/framespersecond+1; - if(colaccuracy>sps){colaccuracy=sps;} oldmult=multiplier; - multiplier/=colaccuracy; - - for(i=0;i<(int)(colaccuracy+.5);i++){ - + for(i = 0; i < (int) (colaccuracy+.5); i++) Tick(); - - } - multiplier=oldmult; - if ( DrawGLScene()) - -#ifdef OS9 - aglSwapBuffers( gOpenGLContext ); -#else - SDL_GL_SwapBuffers(); -#endif - + SDL_GL_SwapBuffers(); else - gQuit = true; - oldmult=multiplier; end=TimerGetTime(&theTimer); - timetaken=end-start; - framespersecond=600000000/timetaken; - while(framespersecond>maxfps){ - end=TimerGetTime(&theTimer); - timetaken=end-start; - framespersecond=600000000/timetaken; - } multiplier5=multiplier4; - multiplier4=multiplier3; - multiplier3=multiplier2; - multiplier2=1/framespersecond; - multiplier=(multiplier2+multiplier3+multiplier4+multiplier5)/4; - if(multiplier>1)multiplier=1; - if(multiplier<.00001)multiplier=.00001; - if(visions==1&&mainmenu==0)multiplier/=3; - if(slomo)multiplier*=.2; - if(paused)multiplier=0; GetKeys( ( unsigned long * )theKeyMap ); - if ( IsKeyDown( theKeyMap, MAC_COMMAND_KEY )&&IsKeyDown( theKeyMap, MAC_Q_KEY )){ - gQuit = true; - if(score>highscore){ - highscore=score; - -#ifdef OS9 - ofstream opstream(":Data:Highscore"); -#else /* TODO */ ofstream opstream("Data/Highscore"); -#endif - - opstream << highscore; - + opstream << highscore; opstream << "\n"; - - opstream << beatgame; - + opstream << beatgame; opstream.close(); - } - } if ( IsKeyDown( theKeyMap, MAC_ESCAPE_KEY )){ - alSourcePause(gSourceID[rainsound]); - mainmenu=1; - alSourcePlay(gSourceID[souloutsound]); - flashamount=1; - flashr=1;flashg=1;flashb=1; - alSourceStop(gSourceID[visionsound]); - whichsong=mainmenusong; - alSourceStop(gSourceID[knifesong]); - alSourceStop(gSourceID[shootsong]); - alSourceStop(gSourceID[zombiesong]); - alSourceStop(gSourceID[mainmenusong]); - alSourcef(gSourceID[knifesong], AL_MIN_GAIN, 0); - alSourcef(gSourceID[shootsong], AL_MIN_GAIN, 0); - alSourcef(gSourceID[zombiesong], AL_MIN_GAIN, 0); - alSourcef(gSourceID[mainmenusong], AL_MIN_GAIN, 0); - alSourcePlay(gSourceID[whichsong]); - alSourcef(gSourceID[whichsong], AL_MIN_GAIN, 1); - } - } } diff --git a/src/GameTick.cpp b/src/GameTick.cpp index 4249b05..045f903 100644 --- a/src/GameTick.cpp +++ b/src/GameTick.cpp @@ -229,67 +229,35 @@ void Game::Tick(){ } if(Button()&&mouseoverbutton==2&&!gameinprogress&&!oldbutton){ - flashamount=1; - flashr=1;flashg=0;flashb=0; - alSourcePlay(gSourceID[losesound]); - gQuit = true; - if(score>highscore){ - highscore=score; - -#ifdef OS9 - ofstream opstream(":Data:Highscore"); -#else /* TODO */ ofstream opstream("Data/Highscore"); -#endif - opstream << highscore; - + opstream << highscore; opstream << "\n"; - - opstream << beatgame; - + opstream << beatgame; opstream.close(); - } - } if(Button()&&mouseoverbutton==2&&gameinprogress&&!oldbutton){ - flashamount=1; - flashr=1;flashg=1;flashb=1; - alSourcePlay(gSourceID[losesound]); - gameinprogress=0; - if(score>highscore){ - highscore=score; - -#ifdef OS9 - ofstream opstream(":Data:Highscore"); -#else /* TODO */ ofstream opstream("Data/Highscore"); -#endif - opstream << highscore; - + opstream << highscore; opstream << "\n"; - - opstream << beatgame; - + opstream << beatgame; opstream.close(); - } - } if(Button())oldbutton=1; @@ -351,25 +319,14 @@ void Game::Tick(){ alSourcef(gSourceID[whichsong], AL_MAX_GAIN, 1); if(score>highscore){ - highscore=score; - -#ifdef OS9 - ofstream opstream(":Data:Highscore"); -#else /* TODO */ ofstream opstream("Data/Highscore"); -#endif - opstream << highscore; - + opstream << highscore; opstream << "\n"; - - opstream << beatgame; - + opstream << beatgame; opstream.close(); - } - } if(!mainmenu){ diff --git a/src/Main.cpp b/src/Main.cpp index a4899a9..46f7c12 100644 --- a/src/Main.cpp +++ b/src/Main.cpp @@ -3,37 +3,12 @@ #include "Game.h" /********************> Globals <*****/ - Game game; -/********************> main() <*****/ - -int main( int argc, char *argv[] ) - - { -#ifdef OS9 - ToolboxInit(); - - if ( HasAppearance() ) - - RegisterAppearanceClient(); -#endif - +int main(int argc, char *argv[]) +{ game.InitGL(); - game.InitGame(); - game.EventLoop(); - game.Dispose(); - -#ifdef OS9 - if ( HasAppearance() ) - - UnregisterAppearanceClient(); - - FlushEvents( everyEvent, 0 ); - - ExitToShell(); -#endif } diff --git a/src/Models.h b/src/Models.h index d0a2575..9c48841 100644 --- a/src/Models.h +++ b/src/Models.h @@ -5,14 +5,10 @@ // // Model Maximums // -#include "Quaternions.h" -#ifdef OS9 -#include <gl.h> -#include <glu.h> -#else #include <GL/gl.h> #include <GL/glu.h> -#endif + +#include "Quaternions.h" #include "Files.h" #include "Constants.h" diff --git a/src/Person.h b/src/Person.h index 8257e13..d831e1f 100644 --- a/src/Person.h +++ b/src/Person.h @@ -3,17 +3,10 @@ /**> HEADER FILES <**/ #include <cmath> -#ifdef OS9 -#include <gl.h> -#else #include <GL/gl.h> -#endif -#ifdef OS9 -#include "alut.h" -#else #include <AL/al.h> #include <AL/alut.h> -#endif + #include "Quaternions.h" #include "Constants.h" #include "Skeleton.h" diff --git a/src/Quaternions.h b/src/Quaternions.h index 2b46db9..1c4fc95 100644 --- a/src/Quaternions.h +++ b/src/Quaternions.h @@ -2,15 +2,7 @@ #ifndef _QUATERNIONS_H_ #define _QUATERNIONS_H_ -#ifdef OS9 -#pragma mark - -#endif - -#ifdef OS9 -#include <gl.h> -#else #include <GL/gl.h> -#endif #include "PhysicsMath.h" /**> Quaternion Structures <**/ diff --git a/src/Skeleton.h b/src/Skeleton.h index 7b5be13..78d9d3d 100644 --- a/src/Skeleton.h +++ b/src/Skeleton.h @@ -2,14 +2,10 @@ #define _SKELETON_H_ /**> HEADER FILES <**/ -#ifdef OS9 -#include <gl.h> -#include "alut.h" -#else #include <GL/gl.h> #include <AL/al.h> #include <AL/alut.h> -#endif + #include "Quaternions.h" #include "Constants.h" #include "Files.h" diff --git a/src/Sprites.h b/src/Sprites.h index 42edc67..d487c7e 100644 --- a/src/Sprites.h +++ b/src/Sprites.h @@ -2,13 +2,8 @@ #define _SPRITE_H_ #include "Quaternions.h" -#ifdef OS9 -#include <gl.h> -#include <glu.h> -#else #include <GL/gl.h> #include <GL/glu.h> -#endif #include "Files.h" #include "Quaternions.h" #include "Camera.h" diff --git a/src/TGALoader.h b/src/TGALoader.h index ab26f88..8e5bfa0 100644 --- a/src/TGALoader.h +++ b/src/TGALoader.h @@ -1,7 +1,3 @@ -#ifdef OS9 -#pragma once -#endif - #ifndef _TGA_LOADER_H_ #define _TGA_LOADER_H_ @@ -9,11 +5,7 @@ #include <stdlib.h> #include <stdio.h> #include <string.h> -#ifdef OS9 -#include "gl.h" -#else #include <GL/gl.h> -#endif #include "Support.h" diff --git a/src/Text.h b/src/Text.h index 77dee46..220bf9c 100644 --- a/src/Text.h +++ b/src/Text.h @@ -3,13 +3,8 @@ /**> HEADER FILES <**/ #include "Quaternions.h" -#ifdef OS9 -#include <gl.h> -#include <glu.h> -#else #include <GL/gl.h> #include <GL/glu.h> -#endif #include "Files.h" #include "Quaternions.h" |