extern GLuint rabbittexture;
-#ifndef TRUE
-#define TRUE 1
-#endif
-
-#ifndef FALSE
-#define FALSE 0
-#endif
-
-
class Game
{
public:
/**> HEADER FILES <**/
#include "MacCompatibility.h"
+
+#ifdef WIN32
#include <windows.h>
+#endif
+
#include <errno.h>
#include <time.h>
#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
#if PLATFORM_UNIX
+#include <unistd.h>
+#include <sys/time.h>
+#include <assert.h>
typedef long long __int64;
typedef __int64 LARGE_INTEGER;
static int QueryPerformanceFrequency(LARGE_INTEGER *liptr)
return(1);
}
-static void QueryPerformanceCounter(LARGE_INTEGER *liptr)
+static int QueryPerformanceCounter(LARGE_INTEGER *liptr)
{
struct timeval tv;
gettimeofday(&tv, NULL);
/**> HEADER FILES <**/
#include "SDLInput.h"
-#include "String.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
extern bool keyboardfrozen;
extern bool buttons[3];
-#include "skybox.h"
+#include "Skybox.h"
#include "Game.h"
extern float viewdistance;
}
SkyBox::~SkyBox()
{
- if (front) glDeleteTextures( 1, (const unsigned long *)&front );
- if (left) glDeleteTextures( 1, (const unsigned long *)&left );
- if (back) glDeleteTextures( 1, (const unsigned long *)&back );
- if (right) glDeleteTextures( 1, (const unsigned long *)&right );
- if (up) glDeleteTextures( 1, (const unsigned long *)&up );
- if (down) glDeleteTextures( 1, (const unsigned long *)&down );
- if (cloud) glDeleteTextures( 1, (const unsigned long *)&cloud );
- if (reflect) glDeleteTextures( 1, (const unsigned long *)&reflect );
+ if (front) glDeleteTextures( 1, &front );
+ if (left) glDeleteTextures( 1, &left );
+ if (back) glDeleteTextures( 1, &back );
+ if (right) glDeleteTextures( 1, &right );
+ if (up) glDeleteTextures( 1, &up );
+ if (down) glDeleteTextures( 1, &down );
+ if (cloud) glDeleteTextures( 1, &cloud );
+ if (reflect) glDeleteTextures( 1, &reflect );
};
}
Sprites::~Sprites()
{
- if (toothtexture) glDeleteTextures( 1, (const unsigned long *)&toothtexture );
- if (cloudtexture) glDeleteTextures( 1, (const unsigned long *)&cloudtexture );
- if (cloudimpacttexture) glDeleteTextures( 1, (const unsigned long *)&cloudimpacttexture );
- if (bloodtexture) glDeleteTextures( 1, (const unsigned long *)&bloodtexture );
- if (flametexture) glDeleteTextures( 1, (const unsigned long *)&flametexture );
- if (bloodflametexture) glDeleteTextures( 1, (const unsigned long *)&bloodflametexture );
- if (smoketexture) glDeleteTextures( 1, (const unsigned long *)&smoketexture );
- if (snowflaketexture) glDeleteTextures( 1, (const unsigned long *)&snowflaketexture );
- if (shinetexture) glDeleteTextures( 1, (const unsigned long *)&shinetexture );
- if (splintertexture) glDeleteTextures( 1, (const unsigned long *)&splintertexture );
- if (leaftexture) glDeleteTextures( 1, (const unsigned long *)&leaftexture );
+ if (toothtexture) glDeleteTextures( 1, &toothtexture );
+ if (cloudtexture) glDeleteTextures( 1, &cloudtexture );
+ if (cloudimpacttexture) glDeleteTextures( 1, &cloudimpacttexture );
+ if (bloodtexture) glDeleteTextures( 1, &bloodtexture );
+ if (flametexture) glDeleteTextures( 1, &flametexture );
+ if (bloodflametexture) glDeleteTextures( 1, &bloodflametexture );
+ if (smoketexture) glDeleteTextures( 1, &smoketexture );
+ if (snowflaketexture) glDeleteTextures( 1, &snowflaketexture );
+ if (shinetexture) glDeleteTextures( 1, &shinetexture );
+ if (splintertexture) glDeleteTextures( 1, &splintertexture );
+ if (leaftexture) glDeleteTextures( 1, &leaftexture );
}
pgame->LoadingScreen();
}
-#ifdef WIN32
+#if !PLATFORM_MACOSX
// for Windows, just use TGA loader for now
char fileName[ 256];
}
Terrain::~Terrain()
{
- if(terraintexture)glDeleteTextures( 1, (const unsigned long *)&terraintexture );
- if(shadowtexture) glDeleteTextures( 1, (const unsigned long *)&shadowtexture );
- if(bodyprinttexture) glDeleteTextures( 1, (const unsigned long *)&bodyprinttexture );
- if(footprinttexture) glDeleteTextures( 1, (const unsigned long *)&footprinttexture );
- if(bloodtexture) glDeleteTextures( 1, (const unsigned long *)&bloodtexture );
- if(bloodtexture2) glDeleteTextures( 1, (const unsigned long *)&bloodtexture2 );
- if(breaktexture) glDeleteTextures( 1, (const unsigned long *)&breaktexture );
+ if(terraintexture)glDeleteTextures( 1, &terraintexture );
+ if(shadowtexture) glDeleteTextures( 1, &shadowtexture );
+ if(bodyprinttexture) glDeleteTextures( 1, &bodyprinttexture );
+ if(footprinttexture) glDeleteTextures( 1, &footprinttexture );
+ if(bloodtexture) glDeleteTextures( 1, &bloodtexture );
+ if(bloodtexture2) glDeleteTextures( 1, &bloodtexture2 );
+ if(breaktexture) glDeleteTextures( 1, &breaktexture );
}
glDeleteLists(base, 512);
base = 0;
}
- if (FontTexture) glDeleteTextures( 1, (const unsigned long *)&FontTexture );
+ if (FontTexture) glDeleteTextures( 1, &FontTexture );
}
Weapons::~Weapons()
{
- if (stafftextureptr) glDeleteTextures( 1, (const unsigned long *)&stafftextureptr );
- if (knifetextureptr) glDeleteTextures( 1, (const unsigned long *)&knifetextureptr );
- if (lightbloodknifetextureptr) glDeleteTextures( 1, (const unsigned long *)&lightbloodknifetextureptr );
- if (bloodknifetextureptr) glDeleteTextures( 1, (const unsigned long *)&bloodknifetextureptr );
- if (swordtextureptr) glDeleteTextures( 1, (const unsigned long *)&swordtextureptr );
- if (lightbloodswordtextureptr) glDeleteTextures( 1, (const unsigned long *)&lightbloodswordtextureptr );
- if (bloodswordtextureptr) glDeleteTextures( 1, (const unsigned long *)&bloodswordtextureptr );
+ if (stafftextureptr) glDeleteTextures( 1, &stafftextureptr );
+ if (knifetextureptr) glDeleteTextures( 1, &knifetextureptr );
+ if (lightbloodknifetextureptr) glDeleteTextures( 1, &lightbloodknifetextureptr );
+ if (bloodknifetextureptr) glDeleteTextures( 1, &bloodknifetextureptr );
+ if (swordtextureptr) glDeleteTextures( 1, &swordtextureptr );
+ if (lightbloodswordtextureptr) glDeleteTextures( 1, &lightbloodswordtextureptr );
+ if (bloodswordtextureptr) glDeleteTextures( 1, &bloodswordtextureptr );
}
N network byte order
*/
+#ifndef ALREADY_DID_BINIO_STDINT
+#define ALREADY_DID_BINIO_STDINT
#if defined(BinIO_STDINT_HEADER)
#include BinIO_STDINT_HEADER
typedef float float32_t;
#endif
typedef float float32_t;
typedef double float64_t;
+#endif
#endif
typedef struct
#define BinIO_HOST_BYTE_ORDER 'H'
#define BinIO_NETWORK_BYTE_ORDER 'N'
+#ifndef ALREADY_DID_BINIO_STDINT
+#define ALREADY_DID_BINIO_STDINT
#if defined(BinIO_STDINT_HEADER)
#include BinIO_STDINT_HEADER
typedef float float32_t;
typedef float float32_t;
typedef double float64_t;
#endif
+#endif
#ifndef BinIO_INLINE
#if defined(__GNUC__)
-DPLATFORM_UNIX=1 \
-DPLATFORM_LINUX=1 \
-DUSE_SDL=1 \
+ -DTRUE=1 \
+ -DFALSE=0 \
+ -Dstricmp=strcasecmp \
INCLUDES := \
-I./SDL12/include \
else
CFLAGS += -DPLATFORM_LINUX=1
#CFLAGS += -msse -mmmx
- LDFLAGS := -lSDL
+ LDFLAGS := -lSDL -lGL -lGLU -L$(RUNDIR) -lfmod
endif
CXXFLAGS := $(CFLAGS)
Lights.cpp \
Models.cpp \
Objects.cpp \
- OpenGL_Windows.cpp \
pack.c \
pack_private.c \
Person.cpp \
unpack_private.c \
Weapons.cpp \
MacCompatibility.cpp \
- WinInput.cpp \
logger/logger.cpp \
- Driver.cc \
- Md5.cc \
+ DRIVER.CC \
+ MD5.CC \
SDLInput.cpp \
+UNUSED_SRCS := \
+ OpenGL_Windows.cpp \
-OBJS := $(SRCS:.cpp=.o)
+OBJS := $(SRCS:.CC=.o)
+OBJS := $(OBJS:.cc=.o)
+OBJS := $(OBJS:.cpp=.o)
OBJS := $(OBJS:.c=.o)
OBJS := $(OBJS:.m=.o)
OBJS := $(foreach f,$(OBJS),$(BINDIR)/$(f))
$(BINDIR)/%.o : $(SRCDIR)/%.CC
$(CXX) -o $@ $(CXXFLAGS) $<
+$(BINDIR)/%.o : $(SRCDIR)/%.cc
+ $(CXX) -o $@ $(CXXFLAGS) $<
+
$(BINDIR)/%.o : $(SRCDIR)/%.m
$(CC) -o $@ $(CFLAGS) $<
clean:
rm -rf $(BINDIR)/*.o
+ rm -rf $(BINDIR)/logger/*.o
rm -rf $(EXE)
# end of makefile ...