Added config.h header

This commit is contained in:
2006-08-10 05:53:33 -04:00
parent 15e49a405e
commit 421a330779
31 changed files with 218 additions and 74 deletions

1
src/.gitignore vendored
View File

@@ -1,2 +1,3 @@
*.o *.o
Makefile Makefile
config.h

View File

@@ -1,4 +1,9 @@
#pragma once #ifndef __Logger_h__
#define __Logger_h__
#if defined HAVE_CONFIG_H
#include "config.h"
#endif
namespace OpenArena namespace OpenArena
{ {
@@ -87,3 +92,5 @@ namespace OpenArena
virtual void Log(const char* message, const char* classification, MessageType type=MESSAGETYPE_INFORMATION) = 0; virtual void Log(const char* message, const char* classification, MessageType type=MESSAGETYPE_INFORMATION) = 0;
}; };
}; };
#endif

View File

@@ -1,14 +1,13 @@
#Dependencies soooo need to be fixed/finished #Dependencies soooo need to be fixed/finished
CPP = g++ -g CPP = g++ -g
INCLUDES = INCLUDES = -I/usr/X11R6/include
LD = g++ LD = g++
INCLUDEPATH = ../include
OBJECTS = screen.o bmp.o camera.o ctrls.o level.o mygl.o myglFont.o myglTexture.o physics.o player.o strmanip.o tga.o vector.o window.o keys.o main.o OBJECTS = screen.o bmp.o camera.o ctrls.o level.o mygl.o myglFont.o myglTexture.o physics.o player.o strmanip.o tga.o vector.o window.o keys.o main.o
LIBS = -L/usr/X11R6/lib -lGL -lGLU -lXxf86vm LIBS = -L/usr/X11R6/lib -lGL -lGLU -lXxf86vm
LIBRARIES = LIBRARIES =
SO_LIBS = SO_LIBS =
SO_LIBRARIES = oa_game.so oa_audio.so oa_net.so oa_video.so oa_input.so SO_LIBRARIES = oa_game.so oa_audio.so oa_net.so oa_video.so oa_input.so
CPPFLAGS = CPPFLAGS = -DHAVE_CONFIG_H
LDFLAGS = $(LIBS) LDFLAGS = $(LIBS)
.Phony: all clean install .Phony: all clean install
@@ -37,53 +36,50 @@ oa_video.so:
oa_input.so: oa_input.so:
#Object Files #Object Files
screen.o: screen.cpp $(INCLUDEPATH)/screen.h screen.o: screen.cpp screen.h config.h
$(CPP) -c -o screen.o screen.cpp $(CPP) $(CPPFLAGS)-c -o screen.o screen.cpp
bmp.o: bmp.cpp $(INCLUDEPATH)/bmp.h $(INCLUDEPATH)/mygl.h $(INCLUDEPATH)/datatypes.h $(INCLUDEPATH)/texture.h bmp.o: bmp.cpp bmp.h mygl.h datatypes.h texture.h config.h
$(CPP) -c -o bmp.o bmp.cpp $(CPP) $(CPPFLAGS)-c -o bmp.o bmp.cpp
camera.o: camera.cpp $(INCLUDEPATH)/camera.h $(INCLUDEPATH)/vector.h $(INCLUDEPATH)/mygl.h $(INCLUDEPATH)/screen.h camera.o: camera.cpp camera.h vector.h mygl.h screen.h config.h
$(CPP) -c -o camera.o camera.cpp $(CPP) $(CPPFLAGS)-c -o camera.o camera.cpp
ctrls.o: ctrls.cpp $(INCLUDEPATH)/ctrls.h $(INCLUDEPATH)/keys.h $(INCLUDEPATH)/physics.h $(INCLUDEPATH)/datatypes.h $(INCLUDEPATH)/list.h ctrls.o: ctrls.cpp ctrls.h keys.h physics.h datatypes.h list.h config.h
$(CPP) -c -o ctrls.o ctrls.cpp $(CPP) $(CPPFLAGS)-c -o ctrls.o ctrls.cpp
level.o: level.cpp $(INCLUDEPATH)/level.h $(INCLUDEPATH)/version.h level.o: level.cpp level.h version.h config.h
$(CPP) -c -o level.o level.cpp $(CPP) $(CPPFLAGS)-c -o level.o level.cpp
$(INCLUDEPATH)/level.h: $(INCLUDEPATH)/myglFont.h mygl.o: mygl.cpp mygl.h config.h
touch $(INCLUDEPATH)/level.h $(CPP) $(CPPFLAGS)-c -o mygl.o mygl.cpp
myglFont.o: myglFont.cpp myglFont.h config.h
$(CPP) $(CPPFLAGS)-c -o myglFont.o myglFont.cpp
myglTexture.o: myglTexture.cpp myglTexture.h config.h
$(CPP) $(CPPFLAGS)-c -o myglTexture.o myglTexture.cpp
physics.o: physics.cpp physics.h config.h
$(CPP) $(CPPFLAGS)-c -o physics.o physics.cpp
player.o: player.cpp player.h config.h
$(CPP) $(CPPFLAGS)-c -o player.o player.cpp
strmanip.o: strmanip.cpp strmanip.h config.h
$(CPP) $(CPPFLAGS)-c -o strmanip.o strmanip.cpp
tga.o: tga.cpp tga.h config.h
$(CPP) $(CPPFLAGS)-c -o tga.o tga.cpp
vector.o: vector.cpp vector.h config.h
$(CPP) $(CPPFLAGS)-c -o vector.o vector.cpp
window.o: window.cpp window.h config.h
$(CPP) $(CPPFLAGS)-c -o window.o window.cpp
mygl.o: mygl.cpp $(INCLUDEPATH)/mygl.h keys.o: keys.cpp keys.h config.h
$(CPP) -c -o mygl.o mygl.cpp $(CPP) $(CPPFLAGS)-c -o keys.o keys.cpp
myglFont.o: myglFont.cpp $(INCLUDEPATH)/myglFont.h main.o: linux.cpp main.h config.h
$(CPP) -c -o myglFont.o myglFont.cpp $(CPP) $(CPPFLAGS)-c -o main.o linux.cpp
myglTexture.o: myglTexture.cpp $(INCLUDEPATH)/myglTexture.h
$(CPP) -c -o myglTexture.o myglTexture.cpp
physics.o: physics.cpp $(INCLUDEPATH)/physics.h
$(CPP) -c -o physics.o physics.cpp
player.o: player.cpp $(INCLUDEPATH)/player.h
$(CPP) -c -o player.o player.cpp
strmanip.o: strmanip.cpp $(INCLUDEPATH)/strmanip.h
$(CPP) -c -o strmanip.o strmanip.cpp
tga.o: tga.cpp $(INCLUDEPATH)/tga.h
$(CPP) -c -o tga.o tga.cpp
vector.o: vector.cpp $(INCLUDEPATH)/vector.h
$(CPP) -c -o vector.o vector.cpp
window.o: window.cpp $(INCLUDEPATH)/window.h
$(CPP) -c -o window.o window.cpp
keys.o: keys.cpp $(INCLUDEPATH)/keys.h
$(CPP) -c -o keys.o keys.cpp
main.o: linux.cpp $(INCLUDEPATH)/main.h
$(CPP) -c -o main.o linux.cpp

View File

@@ -4,7 +4,7 @@ INCLUDES =
LD = g++ LD = g++
X11INCLUDEDIR = /usr/X11R6/include X11INCLUDEDIR = /usr/X11R6/include
X11LIBDIR = /usr/X11R6/lib X11LIBDIR = /usr/X11R6/lib
INCLUDE_DIRS = -I$(X11INCLUDEDIR) INCLUDE_DIRS = -I$(X11INCLUDEDIR) -DHAVE_CONFIG_H
LIBRARY_DIRS = -L$(X11LIBDIR) LIBRARY_DIRS = -L$(X11LIBDIR)
OBJECTS = screen.o bmp.o camera.o ctrls.o level.o mygl.o myglFont.o myglTexture.o player.o strmanip.o tga.o vector.o window.o keys.o main.o OBJECTS = screen.o bmp.o camera.o ctrls.o level.o mygl.o myglFont.o myglTexture.o player.o strmanip.o tga.o vector.o window.o keys.o main.o
LIBS = $(LIBRARY_DIRS) -lGL -lGLU -lXxf86vm -lX11 LIBS = $(LIBRARY_DIRS) -lGL -lGLU -lXxf86vm -lX11
@@ -19,7 +19,7 @@ all: ../OpenArena
clean: clean:
rm -f *.o rm -f *.o
if [ -f ../OpenArena/OpenArena ]; then rm ../OpenArena/OpenArena; fi if [ -f ../OpenArena ]; then rm ../OpenArena; fi
install: install:
@@ -39,47 +39,47 @@ oa_video.so:
oa_input.so: oa_input.so:
#Object Files #Object Files
screen.o: screen.cpp screen.h screen.o: screen.cpp screen.h config.h
$(CPP) -c $(INCLUDE_DIRS) -o screen.o screen.cpp $(CPP) -c $(INCLUDE_DIRS) -o screen.o screen.cpp
bmp.o: bmp.cpp bmp.h mygl.h datatypes.h texture.h bmp.o: bmp.cpp bmp.h mygl.h datatypes.h texture.h config.h
$(CPP) -c $(INCLUDE_DIRS) -o bmp.o bmp.cpp $(CPP) -c $(INCLUDE_DIRS) -o bmp.o bmp.cpp
camera.o: camera.cpp camera.h vector.h mygl.h screen.h camera.o: camera.cpp camera.h vector.h mygl.h screen.h config.h
$(CPP) -c $(INCLUDE_DIRS) -o camera.o camera.cpp $(CPP) -c $(INCLUDE_DIRS) -o camera.o camera.cpp
ctrls.o: ctrls.cpp ctrls.h keys.h datatypes.h list.h ctrls.o: ctrls.cpp ctrls.h keys.h datatypes.h list.h config.h
$(CPP) -c $(INCLUDE_DIRS) -o ctrls.o ctrls.cpp $(CPP) -c $(INCLUDE_DIRS) -o ctrls.o ctrls.cpp
level.o: level.cpp level.h version.h level.o: level.cpp level.h version.h config.h
$(CPP) -c $(INCLUDE_DIRS) -o level.o level.cpp $(CPP) -c $(INCLUDE_DIRS) -o level.o level.cpp
mygl.o: mygl.cpp mygl.h mygl.o: mygl.cpp mygl.h config.h
$(CPP) -c $(INCLUDE_DIRS) -o mygl.o mygl.cpp $(CPP) -c $(INCLUDE_DIRS) -o mygl.o mygl.cpp
myglFont.o: myglFont.cpp myglFont.h myglFont.o: myglFont.cpp myglFont.h config.h
$(CPP) -c $(INCLUDE_DIRS) -o myglFont.o myglFont.cpp $(CPP) -c $(INCLUDE_DIRS) -o myglFont.o myglFont.cpp
myglTexture.o: myglTexture.cpp myglTexture.h myglTexture.o: myglTexture.cpp myglTexture.h config.h
$(CPP) -c $(INCLUDE_DIRS) -o myglTexture.o myglTexture.cpp $(CPP) -c $(INCLUDE_DIRS) -o myglTexture.o myglTexture.cpp
player.o: player.cpp player.h player.o: player.cpp player.h config.h
$(CPP) -c $(INCLUDE_DIRS) -o player.o player.cpp $(CPP) -c $(INCLUDE_DIRS) -o player.o player.cpp
strmanip.o: strmanip.cpp strmanip.h strmanip.o: strmanip.cpp strmanip.h config.h
$(CPP) -c $(INCLUDE_DIRS) -o strmanip.o strmanip.cpp $(CPP) -c $(INCLUDE_DIRS) -o strmanip.o strmanip.cpp
tga.o: tga.cpp tga.h tga.o: tga.cpp tga.h config.h
$(CPP) -c $(INCLUDE_DIRS) -o tga.o tga.cpp $(CPP) -c $(INCLUDE_DIRS) -o tga.o tga.cpp
vector.o: vector.cpp vector.h vector.o: vector.cpp vector.h config.h
$(CPP) -c $(INCLUDE_DIRS) -o vector.o vector.cpp $(CPP) -c $(INCLUDE_DIRS) -o vector.o vector.cpp
window.o: window.cpp window.h window.o: window.cpp window.h config.h
$(CPP) -c $(INCLUDE_DIRS) -o window.o window.cpp $(CPP) -c $(INCLUDE_DIRS) -o window.o window.cpp
keys.o: keys.cpp keys.h keys.o: keys.cpp keys.h config.h
$(CPP) -c $(INCLUDE_DIRS) -o keys.o keys.cpp $(CPP) -c $(INCLUDE_DIRS) -o keys.o keys.cpp
main.o: macosx.cpp main.h main.o: macosx.cpp main.h config.h
$(CPP) -c $(INCLUDE_DIRS) -o main.o macosx.cpp $(CPP) -c $(INCLUDE_DIRS) -o main.o macosx.cpp

View File

@@ -1,6 +1,10 @@
#ifndef MODEL_H_ #ifndef MODEL_H_
#define MODEL_H_ #define MODEL_H_
#if defined HAVE_CONFIG_H
#include "config.h"
#endif
namespace OpenArena namespace OpenArena
{ {

View File

@@ -1,4 +1,10 @@
#pragma once #ifndef __NullVideoPlugin_h__
#define __NullVideoPlugin_h__
#if defined HAVE_CONFIG_H
#include "config.h"
#endif
#include "VideoPlugin.h" #include "VideoPlugin.h"
namespace OpenArena namespace OpenArena
@@ -90,3 +96,5 @@ namespace OpenArena
}; };
}; };
#endif

View File

@@ -1,4 +1,9 @@
#pragma once #ifndef __Plugin_h__
#define __Plugin_h__
#if defined HAVE_CONFIG_H
#include "config.h"
#endif
namespace OpenArena namespace OpenArena
{ {
@@ -41,4 +46,6 @@ namespace OpenArena
}; };
}; };
#endif

View File

@@ -1,4 +1,9 @@
#pragma once #ifndef __PluginManager_h__
#define __PluginManager_h___
#if defined HAVE_CONFIG_H
#include "config.h"
#endif
#include "list.h" #include "list.h"
#include "Plugin.h" #include "Plugin.h"
@@ -104,4 +109,6 @@ namespace OpenArena
*/ */
VideoPlugin* GetDefaultVideoPlugin(void); VideoPlugin* GetDefaultVideoPlugin(void);
}; };
}; };
#endif

View File

@@ -1,4 +1,10 @@
#pragma once #ifndef __VideoPlugin_h__
#define __VideoPlugin_h__
#if defined HAVE_CONFIG_H
#include "config.h"
#endif
#include "Plugin.h" #include "Plugin.h"
#include "window.h" #include "window.h"
#include "datatypes.h" #include "datatypes.h"
@@ -76,4 +82,6 @@ namespace OpenArena
bool fullscreen = false, bool fullscreen = false,
const char* title = NULL) = 0; const char* title = NULL) = 0;
}; };
}; };
#endif

View File

@@ -1,4 +1,10 @@
#pragma once #ifndef __WindowsLogger_h__
#define __WindowsLogger_h__
#if defined HAVE_CONFIG_H
#include "config.h"
#endif
#include "logger.h" #include "logger.h"
#include "datatypes.h" #include "datatypes.h"
@@ -143,4 +149,6 @@ namespace OpenArena
*/ */
virtual ~WindowsLogger(); virtual ~WindowsLogger();
}; };
}; };
#endif

View File

@@ -1,6 +1,10 @@
#ifndef __bmp_h__ #ifndef __bmp_h__
#define __bmp_h__ #define __bmp_h__
#if defined HAVE_CONFIG_H
#include "config.h"
#endif
#include "texture.h" #include "texture.h"
namespace OpenArena{ namespace OpenArena{

View File

@@ -6,6 +6,10 @@
#ifndef __camera_h__ #ifndef __camera_h__
#define __camera_h__ #define __camera_h__
#if defined HAVE_CONFIG_H
#include "config.h"
#endif
#include <cmath> #include <cmath>
#ifdef WIN32 #ifdef WIN32
#include <windows.h> //Currently used for mouse stuff this should be replaced by oa_input #include <windows.h> //Currently used for mouse stuff this should be replaced by oa_input

View File

@@ -1,3 +1,10 @@
#ifndef __ctrls_h__
#define __ctrls_h__
#if defined HAVE_CONFIG_H
#include "config.h"
#endif
#include "keys.h" #include "keys.h"
#include "datatypes.h" #include "datatypes.h"
#include "list.h" #include "list.h"
@@ -98,3 +105,5 @@ namespace OpenArena{
list<uint8> rollRight; list<uint8> rollRight;
}; };
}; };
#endif

View File

@@ -1,6 +1,10 @@
#ifndef __datatypes_h__ #ifndef __datatypes_h__
#define __datatypes_h__ #define __datatypes_h__
#if defined HAVE_CONFIG_H
#include "config.h"
#endif
#ifdef WIN32 //Make this MSVC something #ifdef WIN32 //Make this MSVC something
typedef unsigned __int8 uint8; typedef unsigned __int8 uint8;
typedef unsigned __int16 uint16; typedef unsigned __int16 uint16;

View File

@@ -1,3 +1,10 @@
#ifndef __geometry_h__
#define __geometry_h__
#if defined HAVE_CONFIG_H
#include "config.h"
#endif
#include "vector.h" #include "vector.h"
#include "myglTexture.h" #include "myglTexture.h"
@@ -34,3 +41,5 @@ namespace OpenArena
}; };
}; };
#endif

View File

@@ -1,4 +1,9 @@
#pragma once #ifndef __image_h__
#define __image_h__
#if defined HAVE_CONFIG_H
#include "config.h"
#endif
#include "datatypes.h" #include "datatypes.h"
@@ -154,3 +159,4 @@ namespace OpenArena
}; };
}; };
#endif

View File

@@ -1,6 +1,10 @@
#ifndef __keys_h__ #ifndef __keys_h__
#define __keys_h__ #define __keys_h__
#if defined HAVE_CONFIG_H
#include "config.h"
#endif
namespace OpenArena namespace OpenArena
{ {
/*! /*!

View File

@@ -1,6 +1,10 @@
#ifndef __LEVEL_H__ #ifndef __LEVEL_H__
#define __LEVEL_H__ #define __LEVEL_H__
#if defined HAVE_CONFIG_H
#include "config.h"
#endif
#ifdef WIN32 #ifdef WIN32
#include <windows.h> //prolly used for alot but should be removed #include <windows.h> //prolly used for alot but should be removed
#endif #endif

View File

@@ -1,6 +1,10 @@
#ifndef __list_h__ #ifndef __list_h__
#define __list_h__ #define __list_h__
#if defined HAVE_CONFIG_H
#include "config.h"
#endif
#include <cstdlib> #include <cstdlib>
#pragma warning(disable:4715) #pragma warning(disable:4715)

View File

@@ -1,6 +1,10 @@
#ifndef __main_h__ #ifndef __main_h__
#define __main_h__ #define __main_h__
#if defined HAVE_CONFIG_H
#include "config.h"
#endif
#ifdef WIN32 #ifdef WIN32
#include <windows.h> // Header file for windows #include <windows.h> // Header file for windows
#endif #endif

View File

@@ -1,7 +1,13 @@
#ifndef __mydefs_h__ #ifndef __mydefs_h__
#define __mydefs_h__ #define __mydefs_h__
#if defined HAVE_CONFIG_H
#include "config.h"
#endif
#ifdef WIN32 //This whole file is windows specific right now #ifdef WIN32 //This whole file is windows specific right now
#include <windows.h> #include <windows.h>
static HWND g_hWnd = NULL; static HWND g_hWnd = NULL;
#endif #endif
#endif #endif

View File

@@ -1,6 +1,10 @@
#ifndef __MYGL_H__ #ifndef __MYGL_H__
#define __MYGL_H__ #define __MYGL_H__
#if defined HAVE_CONFIG_H
#include "config.h"
#endif
#ifdef WIN32 #ifdef WIN32
#include <windows.h> //Remove if possible #include <windows.h> //Remove if possible
#include <GL/gl.h> #include <GL/gl.h>

View File

@@ -1,6 +1,10 @@
#ifndef __glPrint_h__ #ifndef __glPrint_h__
#define __glPrint_h__ #define __glPrint_h__
#if defined HAVE_CONFIG_H
#include "config.h"
#endif
#include "mygl.h" #include "mygl.h"
namespace OpenArena namespace OpenArena

View File

@@ -1,6 +1,10 @@
#ifndef __myglTexture_h__ #ifndef __myglTexture_h__
#define __myglTexture_h__ #define __myglTexture_h__
#if defined HAVE_CONFIG_H
#include "config.h"
#endif
#include <string> #include <string>
#include "datatypes.h" #include "datatypes.h"
#include "mygl.h" #include "mygl.h"

View File

@@ -1,6 +1,10 @@
#ifndef __PLAYER_H__ #ifndef __PLAYER_H__
#define __PLAYER_H__ #define __PLAYER_H__
#if defined HAVE_CONFIG_H
#include "config.h"
#endif
#include "camera.h" #include "camera.h"
#include "ctrls.h" #include "ctrls.h"

View File

@@ -2,6 +2,10 @@
#define __screen_h__ #define __screen_h__
#include <string> #include <string>
#if defined HAVE_CONFIG_H
#include "config.h"
#endif
using namespace std; using namespace std;
namespace OpenArena namespace OpenArena
{ {

View File

@@ -1,6 +1,10 @@
#ifndef __strmanip_h__ #ifndef __strmanip_h__
#define __strmanip_h__ #define __strmanip_h__
#if defined HAVE_CONFIG_H
#include "config.h"
#endif
#include <string> #include <string>
#include <cmath> #include <cmath>
#include "keys.h" #include "keys.h"

View File

@@ -1,6 +1,10 @@
#ifndef __texture_h__ #ifndef __texture_h__
#define __texture_h__ #define __texture_h__
#if defined HAVE_CONFIG_H
#include "config.h"
#endif
namespace OpenArena namespace OpenArena
{ {
/*! /*!

View File

@@ -1,6 +1,10 @@
#ifndef __TGA_H__ #ifndef __TGA_H__
#define __TGA_H__ #define __TGA_H__
#if defined HAVE_CONFIG_H
#include "config.h"
#endif
#pragma comment(lib, "OpenGL32.lib") #pragma comment(lib, "OpenGL32.lib")
#ifdef WIN32 #ifdef WIN32
#include <windows.h> //I think this was only needed because gl.h uses it #include <windows.h> //I think this was only needed because gl.h uses it

View File

@@ -1,6 +1,10 @@
#ifndef __vector_h__ #ifndef __vector_h__
#define __vector_h__ #define __vector_h__
#if defined HAVE_CONFIG_H
#include "config.h"
#endif
#include <cmath> #include <cmath>
namespace OpenArena{ namespace OpenArena{
/*! /*!

View File

@@ -1,6 +1,10 @@
#ifndef __WorldDefs_h__ #ifndef __WorldDefs_h__
#define __WorldDefs_h__ #define __WorldDefs_h__
#if defined HAVE_CONFIG_H
#include "config.h"
#endif
#include "level.h" #include "level.h"
static OpenArena::Level level; static OpenArena::Level level;