So, das Spiel baut nun fehlerfrei und ist fertig :)

This commit is contained in:
Yamagi Burmeister 2009-03-09 15:46:42 +00:00
parent 09775372f9
commit 5b2431ad95
4 changed files with 35 additions and 9 deletions

View file

@ -79,7 +79,7 @@ CFLAGS_OPENGL += -DBROKEN_GL -fPIC -Werror
# Game
CFLAGS_GAME = $(CFLAGS_BASE)
CFLAGS_GAME += -fPIC
CFLAGS_GAME += -fPIC -Werror
# ----------
@ -99,7 +99,7 @@ endif
SDLLDFLAGS=$(shell sdl-config --libs)
# OpenGL
OPENGLLDFLAGS = -L/usr/lib -L/usr/local/lib -shared
OPENGLLDFLAGS = -shared
# Game
GAMELDFLAGS = -shared

View file

@ -501,10 +501,10 @@ extern int meansOfDeath;
extern edict_t *g_edicts;
#define FOFS(x) (int)&(((edict_t *)0)->x)
#define STOFS(x) (int)&(((spawn_temp_t *)0)->x)
#define LLOFS(x) (int)&(((level_locals_t *)0)->x)
#define CLOFS(x) (int)&(((gclient_t *)0)->x)
#define FOFS(x) (size_t)&(((edict_t *)NULL)->x)
#define STOFS(x) (size_t)&(((spawn_temp_t *)NULL)->x)
#define LLOFS(x) (size_t)&(((level_locals_t *)NULL)->x)
#define CLOFS(x) (size_t)&(((gclient_t *)NULL)->x)
#define random() ((rand () & 0x7fff) / ((float)0x7fff))
#define crandom() (2.0 * (random() - 0.5))

View file

@ -374,6 +374,12 @@ int BoxOnPlaneSide (vec3_t emins, vec3_t emaxs, struct cplane_s *p)
return sides;
}
void ClearBounds (vec3_t mins, vec3_t maxs)
{
mins[0] = mins[1] = mins[2] = 99999;
maxs[0] = maxs[1] = maxs[2] = -99999;
}
void AddPointToBounds (vec3_t v, vec3_t mins, vec3_t maxs)
{
int i;
@ -437,6 +443,13 @@ vec_t VectorNormalize2 (vec3_t v, vec3_t out)
}
void VectorMA (vec3_t veca, float scale, vec3_t vecb, vec3_t vecc)
{
vecc[0] = veca[0] + scale*vecb[0];
vecc[1] = veca[1] + scale*vecb[1];
vecc[2] = veca[2] + scale*vecb[2];
}
vec_t _DotProduct (vec3_t v1, vec3_t v2)
{
return v1[0]*v2[0] + v1[1]*v2[1] + v1[2]*v2[2];
@ -463,6 +476,13 @@ void _VectorCopy (vec3_t in, vec3_t out)
out[2] = in[2];
}
void CrossProduct (vec3_t v1, vec3_t v2, vec3_t cross)
{
cross[0] = v1[1]*v2[2] - v1[2]*v2[1];
cross[1] = v1[2]*v2[0] - v1[0]*v2[2];
cross[2] = v1[0]*v2[1] - v1[1]*v2[0];
}
double sqrt(double x);
vec_t VectorLength(vec3_t v)
@ -478,6 +498,13 @@ vec_t VectorLength(vec3_t v)
return length;
}
void VectorInverse (vec3_t v)
{
v[0] = -v[0];
v[1] = -v[1];
v[2] = -v[2];
}
void VectorScale (vec3_t in, vec_t scale, vec3_t out)
{
out[0] = in[0]*scale;
@ -485,7 +512,6 @@ void VectorScale (vec3_t in, vec_t scale, vec3_t out)
out[2] = in[2]*scale;
}
int Q_log2(int val)
{
int answer=0;
@ -768,7 +794,7 @@ COM_Parse
Parse a token out of a string
==============
*/
const char *COM_Parse (char **data_p)
char *COM_Parse (char **data_p)
{
int c;
int len;

View file

@ -188,7 +188,7 @@ void COM_FileBase (char *in, char *out);
void COM_FilePath (const char *in, char *out);
void COM_DefaultExtension (char *path, const char *extension);
const char *COM_Parse (char **data_p);
char *COM_Parse (char **data_p);
// data is an in/out parm, returns a parsed out token
void Com_sprintf (char *dest, int size, char *fmt, ...);