remove openal-dependency from server (thx nissarin)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4422 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
+3
-1
@@ -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
|
||||
|
||||
+31
-31
@@ -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 <math.h>
|
||||
|
||||
#ifdef __GNUC__
|
||||
#undef gamma
|
||||
#undef gamma
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
@@ -20,12 +20,15 @@
|
||||
#include <time.h>
|
||||
#include <limits.h>
|
||||
#ifdef __GNUC__
|
||||
#include <new>
|
||||
#include <signal.h>
|
||||
#include <new>
|
||||
#include <signal.h>
|
||||
#else
|
||||
#include <new.h>
|
||||
#include <new.h>
|
||||
#endif
|
||||
|
||||
#include <zlib.h>
|
||||
#include <enet/enet.h>
|
||||
|
||||
#ifdef WIN32
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include "windows.h"
|
||||
@@ -38,29 +41,26 @@
|
||||
#endif
|
||||
|
||||
#ifndef STANDALONE
|
||||
#include <SDL.h>
|
||||
#include <SDL_image.h>
|
||||
#include <SDL.h>
|
||||
#include <SDL_image.h>
|
||||
|
||||
#define GL_GLEXT_LEGACY
|
||||
#define __glext_h__
|
||||
#define NO_SDL_GLEXT
|
||||
#include <SDL_opengl.h>
|
||||
#undef __glext_h__
|
||||
#define GL_GLEXT_LEGACY
|
||||
#define __glext_h__
|
||||
#define NO_SDL_GLEXT
|
||||
#include <SDL_opengl.h>
|
||||
#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 <jpeglib.h>
|
||||
#endif
|
||||
|
||||
#include <zlib.h>
|
||||
#include <enet/enet.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 <jpeglib.h>
|
||||
|
||||
+18
-16
@@ -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<location *>
|
||||
{
|
||||
virtual ~locvector() {}
|
||||
virtual ~locvector() {}
|
||||
|
||||
location *find(int sound, worldobjreference *ref/* = NULL*/, const vector<soundconfig> &soundcollection /* = gamesounds*/);
|
||||
void delete_(int i);
|
||||
@@ -353,7 +355,7 @@ struct locvector : vector<location *>
|
||||
// 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
|
||||
|
||||
Reference in New Issue
Block a user