diff --git a/source/src/entity.h b/source/src/entity.h index bd60b1e9..869031bf 100644 --- a/source/src/entity.h +++ b/source/src/entity.h @@ -342,6 +342,7 @@ public: } }; +#ifndef STANDALONE #define HEADSIZE 0.4f class playerent : public dynent, public playerstate @@ -492,6 +493,7 @@ public: int deaths() { return lifesequence; } }; +#endif //#ifndef STANDALONE // flag-mode entities @@ -513,7 +515,7 @@ struct flaginfo enum { BT_NONE, BT_NADE, BT_GIB }; -class bounceent : public physent +class bounceent : public physent { public: int millis, timetolive, bouncetype; // see enum above diff --git a/source/src/pch.h b/source/src/pch.h index 8408eabb..9bf2fbf2 100644 --- a/source/src/pch.h +++ b/source/src/pch.h @@ -1,15 +1,15 @@ #ifdef __GNUC__ -#ifdef _FORTIFY_SOURCE -#undef _FORTIFY_SOURCE -#endif + #ifdef _FORTIFY_SOURCE + #undef _FORTIFY_SOURCE + #endif -#define gamma __gamma + #define gamma __gamma #endif #include #ifdef __GNUC__ -#undef gamma + #undef gamma #endif #include @@ -20,12 +20,15 @@ #include #include #ifdef __GNUC__ -#include -#include + #include + #include #else -#include + #include #endif +#include +#include + #ifdef WIN32 #define WIN32_LEAN_AND_MEAN #include "windows.h" @@ -38,29 +41,26 @@ #endif #ifndef STANDALONE -#include -#include + #include + #include -#define GL_GLEXT_LEGACY -#define __glext_h__ -#define NO_SDL_GLEXT -#include -#undef __glext_h__ + #define GL_GLEXT_LEGACY + #define __glext_h__ + #define NO_SDL_GLEXT + #include + #undef __glext_h__ -#include "GL/glext.h" + #include "GL/glext.h" + + #ifdef __APPLE__ + #include "OpenAL/al.h" + #include "OpenAL/alc.h" + #include "Vorbis/vorbisfile.h" + #else + #include "AL/al.h" + #include "AL/alc.h" + #include "vorbis/vorbisfile.h" + #endif + + #include #endif - -#include -#include - -#ifdef __APPLE__ -#include "OpenAL/al.h" -#include "OpenAL/alc.h" -#include "Vorbis/vorbisfile.h" -#else -#include "AL/al.h" -#include "AL/alc.h" -#include "vorbis/vorbisfile.h" -#endif - -#include diff --git a/source/src/sound.h b/source/src/sound.h index 876b4a4c..1b64d663 100644 --- a/source/src/sound.h +++ b/source/src/sound.h @@ -5,22 +5,22 @@ enum S_JUMP = 0, S_SOFTLAND, S_HARDLAND, S_BULLETAIR1, S_BULLETAIR2, S_BULLETHIT, S_BULLETWATERHIT, - S_KNIFE, + S_KNIFE, S_PISTOL, S_RPISTOL, S_SHOTGUN, S_RSHOTGUN, S_SUBGUN, S_RSUBGUN, S_SNIPER, S_RSNIPER, S_ASSAULT, S_RASSAULT, S_ITEMAMMO, S_ITEMHEALTH, - S_ITEMARMOUR, S_ITEMAKIMBO, - S_NOAMMO, S_AKIMBOOUT, + S_ITEMARMOUR, S_ITEMAKIMBO, + S_NOAMMO, S_AKIMBOOUT, S_PAIN1, S_PAIN2, S_PAIN3, S_PAIN4, S_PAIN5, S_PAIN6, - S_DIE1, S_DIE2, - S_FEXPLODE, + S_DIE1, S_DIE2, + S_FEXPLODE, S_SPLASH1, S_SPLASH2, S_FLAGDROP, S_FLAGPICKUP, S_FLAGRETURN, S_FLAGSCORE, S_GRENADEPULL, S_GRENADETHROW, S_GRENADEBOUNCE1, S_GRENADEBOUNCE2, S_RAKIMBO, - S_GUNCHANGE, + S_GUNCHANGE, S_HITSOUND, S_GIB, S_HEADSHOT, S_CALLVOTE, S_VOTEPASS, S_VOTEFAIL, @@ -53,14 +53,14 @@ enum S_STAYTOGETHER, S_THERESNOWAYSIR, S_WEDIDIT, - S_YES, + S_YES, S_NICESHOT, S_NULL }; // hardcoded music -enum +enum { M_FLAGGRAB = 0, M_LASTMINUTE1, @@ -77,6 +77,8 @@ enum SP_HIGHEST }; +#ifndef STANDALONE + // owner of an OpenAL source, used as callback interface class sourceowner @@ -198,16 +200,16 @@ public: float volume, gain; int startmillis, endmillis, startfademillis, endfademillis; bool looping; - + oggstream(); - ~oggstream(); + ~oggstream(); void reset(); bool open(const char *f); void onsourcereassign(source *s); bool stream(ALuint bufid); bool update(); - bool playing(); + bool playing(); void updategain(); void setgain(float g); void setvolume(float v); @@ -227,8 +229,8 @@ struct soundconfig bool muted; int audibleradius; - enum distancemodel - { + enum distancemodel + { DM_DEFAULT = 0, // use openal distance model DM_LINEAR // custom linear model (used in conjunction with audibleradius) }; @@ -339,7 +341,7 @@ public: struct locvector : vector { - virtual ~locvector() {} + virtual ~locvector() {} location *find(int sound, worldobjreference *ref/* = NULL*/, const vector &soundcollection /* = gamesounds*/); void delete_(int i); @@ -353,7 +355,7 @@ struct locvector : vector // audio interface to the engine class audiomanager -{ +{ bool nosound; float currentpitch; cvector musics; @@ -427,4 +429,4 @@ extern int audiodebug; extern audiomanager audiomgr; - +#endif //#ifndef STANDALONE