瀏覽代碼

using sdl2-config for include path

Thomas Buck 10 年之前
父節點
當前提交
bdae1c57a6

+ 1
- 3
Makefile 查看文件

@@ -28,7 +28,7 @@ UNAME=$(shell uname -s)
28 28
 # -DMULTITEXTURE			Add OpenGL multitexturing
29 29
 # -DUSING_EMITTER_IN_GAME	Run particle test in game
30 30
 
31
-BASE_DEFS=-Iinclude -DUSING_EMITTER
31
+BASE_DEFS=-Iinclude $(shell sdl2-config --cflags | sed "s/-I/-isystem /g") -DUSING_EMITTER
32 32
 
33 33
 BASE_LIBS=$(shell sdl2-config --libs) -lz -lstdc++ \
34 34
 	-lpthread -lSDL2_ttf
@@ -43,8 +43,6 @@ AUDIO_LIBS += -framework OpenAL
43 43
 AUDIO_LIBS += -L/usr/local/lib
44 44
 AUDIO_DEFS += -isystem /usr/local/include
45 45
 GL_LIBS += -framework OpenGL
46
-GL_LIBS += -L/opt/local/lib
47
-GL_DEFS += -isystem /opt/local/include
48 46
 else
49 47
 AUDIO_LIBS += -lopenal -lalut
50 48
 GL_LIBS += -lGL -lGLU

+ 1
- 1
README.md 查看文件

@@ -39,7 +39,7 @@ Basically, OpenRaider depends on the following:
39 39
 
40 40
 On Mac OS X 10.9 with [XCode](https://developer.apple.com/xcode/) and [MacPorts](http://www.macports.org) installed, the following should be enough to get all dependencies that are available as port:
41 41
 
42
-    sudo port install zlib cmake libsdl2 libsdl2_ttf
42
+    sudo port install zlib libsdl2 libsdl2_ttf cmake
43 43
 
44 44
 A similar command for the package manager of your favorite Linux Distribution should do the trick.
45 45
 

+ 1
- 1
include/BoundingVolume.h 查看文件

@@ -8,7 +8,7 @@
8 8
 #ifndef _BOUNDINGVOLUME_H_
9 9
 #define _BOUNDINGVOLUME_H_
10 10
 
11
-#include <MatMath.h>
11
+#include "MatMath.h"
12 12
 
13 13
 /*!
14 14
  * \brief Defines a 3D sphere.

+ 3
- 3
include/Camera.h 查看文件

@@ -7,9 +7,9 @@
7 7
 #ifndef _CAMERA_H_
8 8
 #define _CAMERA_H_
9 9
 
10
-#include <MatMath.h>
11
-#include <Matrix.h>
12
-#include <Quaternion.h>
10
+#include "MatMath.h"
11
+#include "Matrix.h"
12
+#include "Quaternion.h"
13 13
 
14 14
 /*!
15 15
  * \brief Commands for interactive camera control

+ 1
- 1
include/Emitter.h 查看文件

@@ -8,7 +8,7 @@
8 8
 #ifndef _EMITTER_H_
9 9
 #define _EMITTER_H_
10 10
 
11
-#include <Particle.h>
11
+#include "Particle.h"
12 12
 
13 13
 /*!
14 14
  * \brief Particle emitter class.

+ 1
- 1
include/Light.h 查看文件

@@ -7,7 +7,7 @@
7 7
 #ifndef _LIGHT_H_
8 8
 #define _LIGHT_H_
9 9
 
10
-#include <MatMath.h>
10
+#include "MatMath.h"
11 11
 
12 12
 /*!
13 13
  * \brief The GL light class

+ 3
- 3
include/Matrix.h 查看文件

@@ -8,9 +8,9 @@
8 8
 #ifndef _MATRIX_H_
9 9
 #define _MATRIX_H_
10 10
 
11
-#include <MatMath.h>
12
-#include <Quaternion.h>
13
-#include <Vector3d.h>
11
+#include "MatMath.h"
12
+#include "Quaternion.h"
13
+#include "Vector3d.h"
14 14
 
15 15
 
16 16
 /*!

+ 1
- 1
include/Mesh.h 查看文件

@@ -10,7 +10,7 @@
10 10
 #ifndef _OPENGLMESH_H_
11 11
 #define _OPENGLMESH_H_
12 12
 
13
-#include <MatMath.h>
13
+#include "MatMath.h"
14 14
 
15 15
 /*!
16 16
  * \brief OpenGL Mesh

+ 10
- 9
include/OpenRaider.h 查看文件

@@ -8,16 +8,17 @@
8 8
 #ifndef _OPENRAIDER_H_
9 9
 #define _OPENRAIDER_H_
10 10
 
11
-#include <List.h>
12 11
 #include <map>
13
-#include <Vector.h>
14
-#include <TombRaider.h>
15
-#include <Camera.h>
16
-#include <Render.h>
17
-#include <Sound.h>
18
-#include <SDLSystem.h>
19
-#include <Network.h>
20
-#include <World.h>
12
+
13
+#include "List.h"
14
+#include "Vector.h"
15
+#include "TombRaider.h"
16
+#include "Camera.h"
17
+#include "Render.h"
18
+#include "Sound.h"
19
+#include "SDLSystem.h"
20
+#include "Network.h"
21
+#include "World.h"
21 22
 
22 23
 /*!
23 24
  * \brief OpenRaider key events.

+ 1
- 1
include/Particle.h 查看文件

@@ -8,7 +8,7 @@
8 8
 #ifndef _PARTICLE_H_
9 9
 #define _PARTICLE_H_
10 10
 
11
-#include <MatMath.h>
11
+#include "MatMath.h"
12 12
 
13 13
 /*!
14 14
  * \brief Partcle systems atomic base

+ 1
- 1
include/Quaternion.h 查看文件

@@ -8,7 +8,7 @@
8 8
 #ifndef _QUATERNION_H_
9 9
 #define _QUATERNION_H_
10 10
 
11
-#include <MatMath.h>
11
+#include "MatMath.h"
12 12
 
13 13
 /*!
14 14
  * \brief Quaternion

+ 12
- 12
include/Render.h 查看文件

@@ -8,20 +8,20 @@
8 8
 #ifndef _RENDER_H_
9 9
 #define _RENDER_H_
10 10
 
11
-#include <List.h>
12
-#include <Vector.h>
13
-#include <Matrix.h>
14
-#include <ViewVolume.h>
15
-#include <Light.h>
16
-#include <World.h>
17
-#include <SkeletalModel.h>
18
-#include <Mesh.h>
19
-#include <Texture.h>
20
-#include <Camera.h>
21
-#include <GLString.h>
11
+#include "List.h"
12
+#include "Vector.h"
13
+#include "Matrix.h"
14
+#include "ViewVolume.h"
15
+#include "Light.h"
16
+#include "World.h"
17
+#include "SkeletalModel.h"
18
+#include "Mesh.h"
19
+#include "Texture.h"
20
+#include "Camera.h"
21
+#include "GLString.h"
22 22
 
23 23
 #ifdef USING_EMITTER
24
-#include <Emitter.h>
24
+#include "Emitter.h"
25 25
 #endif
26 26
 
27 27
 /*!

+ 3
- 2
include/SDLSystem.h 查看文件

@@ -8,8 +8,9 @@
8 8
 #ifndef _SDLSYSTEM_H_
9 9
 #define _SDLSYSTEM_H_
10 10
 
11
-#include <SDL2/SDL.h>
12
-#include <System.h>
11
+#include "SDL.h"
12
+
13
+#include "System.h"
13 14
 
14 15
 /*!
15 16
  * \brief SDL System interface implementation

+ 2
- 2
include/SkeletalModel.h 查看文件

@@ -12,8 +12,8 @@
12 12
 #ifndef _SKELETALMODEL_H_
13 13
 #define _SKELETALMODEL_H_
14 14
 
15
-#include <Vector.h>
16
-#include <MatMath.h>
15
+#include "Vector.h"
16
+#include "MatMath.h"
17 17
 
18 18
 typedef struct {
19 19
     int mesh;

+ 2
- 1
include/System.h 查看文件

@@ -12,7 +12,8 @@
12 12
 #define _SYSTEM_H_
13 13
 
14 14
 #include <map>
15
-#include <Vector.h>
15
+
16
+#include "Vector.h"
16 17
 
17 18
 //! \todo Replace with unicode compatible key codes
18 19
 #define SYS_MOUSE_LEFT    6000

+ 1
- 1
include/Vector3d.h 查看文件

@@ -8,7 +8,7 @@
8 8
 #ifndef _VECTOR3D_H_
9 9
 #define _VECTOR3D_H_
10 10
 
11
-#include <MatMath.h>
11
+#include "MatMath.h"
12 12
 
13 13
 /*!
14 14
  * \brief 3D Math Vector

+ 2
- 2
include/ViewVolume.h 查看文件

@@ -8,8 +8,8 @@
8 8
 #ifndef _VIEWVOLUME_H_
9 9
 #define _VIEWVOLUME_H_
10 10
 
11
-#include <Matrix.h>
12
-#include <BoundingVolume.h>
11
+#include "Matrix.h"
12
+#include "BoundingVolume.h"
13 13
 
14 14
 /*!
15 15
  * \brief Viewing Volume for culling use

+ 4
- 4
include/World.h 查看文件

@@ -11,12 +11,12 @@
11 11
 #define BAD_BLOOD  //!< \todo For temp rendering use
12 12
 
13 13
 #ifdef BAD_BLOOD
14
-#include <SkeletalModel.h>
14
+#include "SkeletalModel.h"
15 15
 #endif
16 16
 
17
-#include <List.h>
18
-#include <Vector.h>
19
-#include <MatMath.h>
17
+#include "List.h"
18
+#include "Vector.h"
19
+#include "MatMath.h"
20 20
 
21 21
 // Mirrors TombRaider class' room flags really
22 22
 typedef enum {

+ 2
- 2
src/Camera.cpp 查看文件

@@ -8,8 +8,8 @@
8 8
 #include <stdio.h>
9 9
 #include <math.h>
10 10
 
11
-#include <MatMath.h>
12
-#include <Camera.h>
11
+#include "MatMath.h"
12
+#include "Camera.h"
13 13
 
14 14
 unsigned int Camera::mCounter = 0;
15 15
 

+ 2
- 1
src/Emitter.cpp 查看文件

@@ -8,6 +8,7 @@
8 8
 #include <stdlib.h>
9 9
 #include <string.h>
10 10
 #include <stdio.h>
11
+
11 12
 #ifdef __APPLE__
12 13
 #include <OpenGL/gl.h>
13 14
 #include <OpenGL/glu.h>
@@ -16,7 +17,7 @@
16 17
 #include <GL/glu.h>
17 18
 #endif
18 19
 
19
-#include <Emitter.h>
20
+#include "Emitter.h"
20 21
 
21 22
 vec_t Emitter::mFrustum[6][4];
22 23
 

+ 3
- 2
src/GLString.cpp 查看文件

@@ -10,14 +10,15 @@
10 10
 #include <stdio.h>
11 11
 #include <stdlib.h>
12 12
 #include <stdarg.h>
13
+
13 14
 #ifdef __APPLE__
14 15
 #include <OpenGL/gl.h>
15 16
 #else
16 17
 #include <GL/gl.h>
17 18
 #endif
18 19
 
19
-#include <Texture.h>
20
-#include <GLString.h>
20
+#include "Texture.h"
21
+#include "GLString.h"
21 22
 
22 23
 GLString::GLString() {
23 24
     _num_string_max = 0;

+ 3
- 3
src/MatMath.cpp 查看文件

@@ -10,9 +10,9 @@
10 10
 #include <math.h>
11 11
 #include <float.h>
12 12
 
13
-#include <MatMath.h>
14
-#include <Vector3d.h>
15
-#include <Matrix.h>
13
+#include "MatMath.h"
14
+#include "Vector3d.h"
15
+#include "Matrix.h"
16 16
 
17 17
 bool equalEpsilon(vec_t a, vec_t b) {
18 18
     vec_t epsilon = FLT_EPSILON;

+ 1
- 1
src/Matrix.cpp 查看文件

@@ -8,7 +8,7 @@
8 8
 #include <stdio.h>
9 9
 #include <math.h>
10 10
 
11
-#include <Matrix.h>
11
+#include "Matrix.h"
12 12
 
13 13
 Matrix::Matrix() {
14 14
     setIdentity();

+ 1
- 1
src/Mesh.cpp 查看文件

@@ -11,7 +11,7 @@
11 11
 #include <GL/gl.h>
12 12
 #endif
13 13
 
14
-#include <Mesh.h>
14
+#include "Mesh.h"
15 15
 
16 16
 
17 17
 ////////////////////////////////////////////////////////////

+ 2
- 3
src/Network.cpp 查看文件

@@ -5,8 +5,6 @@
5 5
  * \author Mongoose
6 6
  */
7 7
 
8
-#include <Network.h>
9
-
10 8
 #include <unistd.h>
11 9
 #include <signal.h>
12 10
 #include <string.h>
@@ -22,7 +20,8 @@
22 20
 #include <arpa/inet.h>
23 21
 #include <stdlib.h>
24 22
 
25
-#include <MatMath.h> // Random Number
23
+#include "MatMath.h" // Random Number
24
+#include "Network.h"
26 25
 
27 26
 //#define LOCAL_BCAST
28 27
 #define MAX_CLIENTS 32

+ 4
- 4
src/OpenRaider.cpp 查看文件

@@ -14,10 +14,10 @@
14 14
 #include <sys/types.h>
15 15
 #include <dirent.h>
16 16
 
17
-#include <World.h>
18
-#include <SkeletalModel.h>
19
-#include <TombRaider1.h> // tmp stop-gap
20
-#include <OpenRaider.h>
17
+#include "World.h"
18
+#include "SkeletalModel.h"
19
+#include "TombRaider1.h" // tmp stop-gap
20
+#include "OpenRaider.h"
21 21
 
22 22
 enum OpenRaiderText { textConsole = 2, textMenu = 3, textOutput = 4 };
23 23
 

+ 1
- 1
src/Particle.cpp 查看文件

@@ -8,7 +8,7 @@
8 8
 #include <stdlib.h>
9 9
 #include <stdio.h>
10 10
 
11
-#include <Particle.h>
11
+#include "Particle.h"
12 12
 
13 13
 Particle::Particle()
14 14
 {

+ 1
- 1
src/Quaternion.cpp 查看文件

@@ -7,7 +7,7 @@
7 7
 
8 8
 #include <math.h>
9 9
 
10
-#include <Quaternion.h>
10
+#include "Quaternion.h"
11 11
 
12 12
 Quaternion::Quaternion() {
13 13
     mW = 0;

+ 3
- 2
src/Render.cpp 查看文件

@@ -12,15 +12,16 @@
12 12
 #include <GL/gl.h>
13 13
 #include <GL/glu.h>
14 14
 #endif
15
+
15 16
 #include <stdlib.h>
16 17
 #include <math.h>
17 18
 #include <string.h>
18 19
 
19 20
 #ifdef USING_EMITTER
20
-#include <Emitter.h>
21
+#include "Emitter.h"
21 22
 #endif
22 23
 
23
-#include <Render.h>
24
+#include "Render.h"
24 25
 
25 26
 extern entity_t *LARA;
26 27
 extern World gWorld;

+ 3
- 3
src/SDLSystem.cpp 查看文件

@@ -10,10 +10,10 @@
10 10
 #include <string.h>
11 11
 #include <cmath>
12 12
 
13
-#include <SDL2/SDL_opengl.h>
13
+#include "SDL_opengl.h"
14 14
 
15
-#include <MatMath.h>
16
-#include <SDLSystem.h>
15
+#include "MatMath.h"
16
+#include "SDLSystem.h"
17 17
 
18 18
 unsigned int *gWidth = 0x0;
19 19
 unsigned int *gHeight = 0x0;

+ 1
- 1
src/SkeletalModel.cpp 查看文件

@@ -5,7 +5,7 @@
5 5
  * \author Mongoose
6 6
  */
7 7
 
8
-#include <SkeletalModel.h>
8
+#include "SkeletalModel.h"
9 9
 
10 10
 ////////////////////////////////////////////////////////////
11 11
 // Constructors

+ 3
- 3
src/Sound.cpp 查看文件

@@ -9,13 +9,13 @@
9 9
 #ifdef __APPLE__
10 10
 #include <OpenAL/al.h>
11 11
 #include <OpenAL/alc.h>
12
-#include <AL/alut.h>
13 12
 #else
14 13
 #include <AL/al.h>
15 14
 #include <AL/alc.h>
16
-#include <AL/alut.h>
17 15
 #endif
18 16
 
17
+#include <AL/alut.h>
18
+
19 19
 #include <time.h>
20 20
 #include <stdio.h>
21 21
 #include <stdlib.h>
@@ -25,7 +25,7 @@
25 25
 #include <fcntl.h>
26 26
 #include <unistd.h>
27 27
 
28
-#include <Sound.h>
28
+#include "Sound.h"
29 29
 
30 30
 Sound::Sound()
31 31
 {

+ 2
- 2
src/System.cpp 查看文件

@@ -28,8 +28,8 @@
28 28
 #include <sys/time.h>
29 29
 #endif
30 30
 
31
-#include <MatMath.h>
32
-#include <System.h>
31
+#include "MatMath.h"
32
+#include "System.h"
33 33
 
34 34
 ////////////////////////////////////////////////////////////
35 35
 // Constructors

+ 3
- 3
src/Texture.cpp 查看文件

@@ -10,7 +10,7 @@
10 10
 #include <stdio.h>
11 11
 #include <stdarg.h>
12 12
 
13
-#include <SDL2/SDL_ttf.h>
13
+#include "SDL_ttf.h"
14 14
 
15 15
 #ifdef __APPLE__
16 16
 #include <OpenGL/gl.h>
@@ -20,8 +20,8 @@
20 20
 #include <GL/glu.h>
21 21
 #endif
22 22
 
23
-#include <TGA.h>
24
-#include <Texture.h>
23
+#include "TGA.h"
24
+#include "Texture.h"
25 25
 
26 26
 //Texture *gTextureManager = 0x0;
27 27
 gl_font_t *gFontTest = 0x0;

+ 3
- 3
src/TombRaider.cpp 查看文件

@@ -50,12 +50,12 @@
50 50
 #include <string.h>
51 51
 #include <stdarg.h>
52 52
 
53
-#include <TombRaider.h>
54
-
55 53
 #include <zlib.h>
56 54
 
55
+#include "TombRaider.h"
56
+
57 57
 #ifdef __TEST_TR5_DUMP_TGA
58
-#include <TGA.h>
58
+#include "TGA.h"
59 59
 #endif
60 60
 
61 61
 TombRaider::TombRaider()

+ 1
- 1
src/Vector3d.cpp 查看文件

@@ -7,7 +7,7 @@
7 7
 
8 8
 #include <math.h>
9 9
 
10
-#include <Vector3d.h>
10
+#include "Vector3d.h"
11 11
 
12 12
 Vector3d::Vector3d() {
13 13
     mVec[0] = mVec[1] = mVec[2] = 0.0f;

+ 1
- 1
src/ViewVolume.cpp 查看文件

@@ -9,7 +9,7 @@
9 9
 
10 10
 #include <math.h>
11 11
 
12
-#include <ViewVolume.h>
12
+#include "ViewVolume.h"
13 13
 
14 14
 ViewVolume::ViewVolume() {
15 15
     mFrustum[0][0] = mFrustum[0][1] = mFrustum[0][2] = mFrustum[0][3] = 0.0f;

+ 1
- 1
src/World.cpp 查看文件

@@ -7,7 +7,7 @@
7 7
 
8 8
 #include <math.h>
9 9
 
10
-#include <World.h>
10
+#include "World.h"
11 11
 
12 12
 
13 13
 ////////////////////////////////////////////////////////////

+ 1
- 1
src/tga.cpp 查看文件

@@ -11,7 +11,7 @@
11 11
 #include <string.h>
12 12
 #include <stdarg.h>
13 13
 
14
-#include <TGA.h>
14
+#include "TGA.h"
15 15
 
16 16
 int tga_check(FILE *f) {
17 17
     char buffer[10];

Loading…
取消
儲存