瀏覽代碼

moved tga code into utils

Thomas Buck 10 年之前
父節點
當前提交
8f46787188
共有 9 個檔案被更改,包括 31 行新增31 行删除
  1. 1
    1
      include/utils/tga.h
  2. 20
    21
      src/CMakeLists.txt
  3. 1
    1
      src/Texture.cpp
  4. 1
    1
      src/TombRaider.cpp
  5. 1
    0
      src/utils/CMakeLists.txt
  6. 2
    2
      src/utils/tga.cpp
  7. 3
    3
      test/CMakeLists.txt
  8. 1
    1
      test/TombRaider.cpp
  9. 1
    1
      test/tga.cpp

include/tga.h → include/utils/tga.h 查看文件

@@ -1,5 +1,5 @@
1 1
 /*!
2
- * \file include/tga.h
2
+ * \file include/utils/tga.h
3 3
  * \brief TGA image reader/writer
4 4
  *
5 5
  * \author Mongoose

+ 20
- 21
src/CMakeLists.txt 查看文件

@@ -1,25 +1,24 @@
1 1
 # Set Source files
2
-set (SRCS ${SRCS} Camera.cpp)
3
-set (SRCS ${SRCS} Emitter.cpp)
4
-set (SRCS ${SRCS} GLString.cpp)
5
-set (SRCS ${SRCS} MatMath.cpp)
6
-set (SRCS ${SRCS} Matrix.cpp)
7
-set (SRCS ${SRCS} Mesh.cpp)
8
-set (SRCS ${SRCS} Network.cpp)
9
-set (SRCS ${SRCS} OpenRaider.cpp)
10
-set (SRCS ${SRCS} Particle.cpp)
11
-set (SRCS ${SRCS} Quaternion.cpp)
12
-set (SRCS ${SRCS} Render.cpp)
13
-set (SRCS ${SRCS} SDLSystem.cpp)
14
-set (SRCS ${SRCS} SkeletalModel.cpp)
15
-set (SRCS ${SRCS} Sound.cpp)
16
-set (SRCS ${SRCS} System.cpp)
17
-set (SRCS ${SRCS} Texture.cpp)
18
-set (SRCS ${SRCS} TombRaider.cpp)
19
-set (SRCS ${SRCS} Vector3d.cpp)
20
-set (SRCS ${SRCS} ViewVolume.cpp)
21
-set (SRCS ${SRCS} World.cpp)
22
-set (SRCS ${SRCS} tga.cpp)
2
+set (SRCS ${SRCS} "Camera.cpp")
3
+set (SRCS ${SRCS} "Emitter.cpp")
4
+set (SRCS ${SRCS} "GLString.cpp")
5
+set (SRCS ${SRCS} "MatMath.cpp")
6
+set (SRCS ${SRCS} "Matrix.cpp")
7
+set (SRCS ${SRCS} "Mesh.cpp")
8
+set (SRCS ${SRCS} "Network.cpp")
9
+set (SRCS ${SRCS} "OpenRaider.cpp")
10
+set (SRCS ${SRCS} "Particle.cpp")
11
+set (SRCS ${SRCS} "Quaternion.cpp")
12
+set (SRCS ${SRCS} "Render.cpp")
13
+set (SRCS ${SRCS} "SDLSystem.cpp")
14
+set (SRCS ${SRCS} "SkeletalModel.cpp")
15
+set (SRCS ${SRCS} "Sound.cpp")
16
+set (SRCS ${SRCS} "System.cpp")
17
+set (SRCS ${SRCS} "Texture.cpp")
18
+set (SRCS ${SRCS} "TombRaider.cpp")
19
+set (SRCS ${SRCS} "Vector3d.cpp")
20
+set (SRCS ${SRCS} "ViewVolume.cpp")
21
+set (SRCS ${SRCS} "World.cpp")
23 22
 
24 23
 #################################################################
25 24
 

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

@@ -20,7 +20,7 @@
20 20
 #include <GL/glu.h>
21 21
 #endif
22 22
 
23
-#include "TGA.h"
23
+#include "utils/tga.h"
24 24
 #include "Texture.h"
25 25
 
26 26
 //Texture *gTextureManager = 0x0;

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

@@ -16,7 +16,7 @@
16 16
 #include "TombRaider.h"
17 17
 
18 18
 #ifdef __TEST_TR5_DUMP_TGA
19
-#include "TGA.h"
19
+#include "utils/tga.h"
20 20
 #endif
21 21
 
22 22
 TombRaider::TombRaider()

+ 1
- 0
src/utils/CMakeLists.txt 查看文件

@@ -1,5 +1,6 @@
1 1
 # Source files
2 2
 set (UTIL_SRCS ${UTIL_SRCS} "strings.cpp")
3
+set (UTIL_SRCS ${UTIL_SRCS} "tga.cpp")
3 4
 
4 5
 # Include directory
5 6
 include_directories ("${PROJECT_SOURCE_DIR}/include")

src/tga.cpp → src/utils/tga.cpp 查看文件

@@ -1,5 +1,5 @@
1 1
 /*!
2
- * \file src/tga.cpp
2
+ * \file src/utils/tga.cpp
3 3
  * \brief TGA image reader/writer
4 4
  *
5 5
  * \todo type should pass more info (2 bits for RGBA|RGB|GREY; val for depth)
@@ -11,7 +11,7 @@
11 11
 #include <string.h>
12 12
 #include <stdarg.h>
13 13
 
14
-#include "TGA.h"
14
+#include "utils/tga.h"
15 15
 
16 16
 int tga_check(FILE *f) {
17 17
     char buffer[10];

+ 3
- 3
test/CMakeLists.txt 查看文件

@@ -22,7 +22,7 @@ set (OpenRaider_CXX_FLAGS "${OpenRaider_CXX_FLAGS} -DUNIT_TEST")
22 22
 #################################################################
23 23
 
24 24
 # TGA Test
25
-set (TGASRCS "${PROJECT_SOURCE_DIR}/test/tga.cpp" "${PROJECT_SOURCE_DIR}/src/tga.cpp")
25
+set (TGASRCS "${PROJECT_SOURCE_DIR}/test/tga.cpp" "${PROJECT_SOURCE_DIR}/src/utils/tga.cpp")
26 26
 add_executable (TGATest EXCLUDE_FROM_ALL ${TGASRCS})
27 27
 set_target_properties (TGATest PROPERTIES COMPILE_FLAGS ${OpenRaider_CXX_FLAGS})
28 28
 
@@ -93,7 +93,7 @@ set (GLLIBS ${GLLIBS} ${OPENGL_LIBRARIES})
93 93
 
94 94
 # GLString Test
95 95
 set (GLSTRINGSRCS "${PROJECT_SOURCE_DIR}/test/GLString.cpp" "${PROJECT_SOURCE_DIR}/src/GLString.cpp")
96
-set (GLSTRINGSRCS ${GLSTRINGSRCS} "${PROJECT_SOURCE_DIR}/src/tga.cpp" "${PROJECT_SOURCE_DIR}/src/Texture.cpp")
96
+set (GLSTRINGSRCS ${GLSTRINGSRCS} "${PROJECT_SOURCE_DIR}/src/utils/tga.cpp" "${PROJECT_SOURCE_DIR}/src/Texture.cpp")
97 97
 add_executable (GLStringTest EXCLUDE_FROM_ALL ${GLSTRINGSRCS})
98 98
 set_target_properties (GLStringTest PROPERTIES COMPILE_FLAGS ${OpenRaider_CXX_FLAGS})
99 99
 target_link_libraries (GLStringTest m ${GLLIBS})
@@ -108,7 +108,7 @@ set (ZLIBS ${ZLIBS} ${ZLIB_LIBRARIES})
108 108
 # TombRaider Test
109 109
 set (TOMB_FLAGS "-D__TEST_TR5_DUMP_TGA -D__TEST_32BIT_TEXTILES")
110 110
 set (TOMBSRCS "${PROJECT_SOURCE_DIR}/test/TombRaider.cpp" "${PROJECT_SOURCE_DIR}/src/TombRaider.cpp")
111
-set (TOMBSRCS ${TOMBSRCS} "${PROJECT_SOURCE_DIR}/src/tga.cpp")
111
+set (TOMBSRCS ${TOMBSRCS} "${PROJECT_SOURCE_DIR}/src/utils/tga.cpp")
112 112
 add_executable (TombRaiderTest EXCLUDE_FROM_ALL ${TOMBSRCS})
113 113
 set_target_properties (TombRaiderTest PROPERTIES COMPILE_FLAGS "${OpenRaider_CXX_FLAGS} ${TOMB_FLAGS}")
114 114
 target_link_libraries (TombRaiderTest ${ZLIBS})

+ 1
- 1
test/TombRaider.cpp 查看文件

@@ -53,7 +53,7 @@
53 53
 #include <TombRaider.h>
54 54
 
55 55
 #ifdef __TEST_TR5_DUMP_TGA
56
-#include <TGA.h>
56
+#include <utils/tga.h>
57 57
 #endif
58 58
 
59 59
 #ifdef DEBUG_MEMORY

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

@@ -6,7 +6,7 @@
6 6
  */
7 7
 #include <stdio.h>
8 8
 #include <stdlib.h>
9
-#include <TGA.h>
9
+#include <utils/tga.h>
10 10
 #include "greatest.h"
11 11
 
12 12
 //! \todo generate list?

Loading…
取消
儲存