Browse Source

moved tga code into utils

Thomas Buck 10 years ago
parent
commit
8f46787188
9 changed files with 31 additions and 31 deletions
  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 View File

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

+ 20
- 21
src/CMakeLists.txt View File

1
 # Set Source files
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 View File

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

+ 1
- 1
src/TombRaider.cpp View File

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

+ 1
- 0
src/utils/CMakeLists.txt View File

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

src/tga.cpp → src/utils/tga.cpp View File

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

+ 3
- 3
test/CMakeLists.txt View File

22
 #################################################################
22
 #################################################################
23
 
23
 
24
 # TGA Test
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
 add_executable (TGATest EXCLUDE_FROM_ALL ${TGASRCS})
26
 add_executable (TGATest EXCLUDE_FROM_ALL ${TGASRCS})
27
 set_target_properties (TGATest PROPERTIES COMPILE_FLAGS ${OpenRaider_CXX_FLAGS})
27
 set_target_properties (TGATest PROPERTIES COMPILE_FLAGS ${OpenRaider_CXX_FLAGS})
28
 
28
 
93
 
93
 
94
 # GLString Test
94
 # GLString Test
95
 set (GLSTRINGSRCS "${PROJECT_SOURCE_DIR}/test/GLString.cpp" "${PROJECT_SOURCE_DIR}/src/GLString.cpp")
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
 add_executable (GLStringTest EXCLUDE_FROM_ALL ${GLSTRINGSRCS})
97
 add_executable (GLStringTest EXCLUDE_FROM_ALL ${GLSTRINGSRCS})
98
 set_target_properties (GLStringTest PROPERTIES COMPILE_FLAGS ${OpenRaider_CXX_FLAGS})
98
 set_target_properties (GLStringTest PROPERTIES COMPILE_FLAGS ${OpenRaider_CXX_FLAGS})
99
 target_link_libraries (GLStringTest m ${GLLIBS})
99
 target_link_libraries (GLStringTest m ${GLLIBS})
108
 # TombRaider Test
108
 # TombRaider Test
109
 set (TOMB_FLAGS "-D__TEST_TR5_DUMP_TGA -D__TEST_32BIT_TEXTILES")
109
 set (TOMB_FLAGS "-D__TEST_TR5_DUMP_TGA -D__TEST_32BIT_TEXTILES")
110
 set (TOMBSRCS "${PROJECT_SOURCE_DIR}/test/TombRaider.cpp" "${PROJECT_SOURCE_DIR}/src/TombRaider.cpp")
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
 add_executable (TombRaiderTest EXCLUDE_FROM_ALL ${TOMBSRCS})
112
 add_executable (TombRaiderTest EXCLUDE_FROM_ALL ${TOMBSRCS})
113
 set_target_properties (TombRaiderTest PROPERTIES COMPILE_FLAGS "${OpenRaider_CXX_FLAGS} ${TOMB_FLAGS}")
113
 set_target_properties (TombRaiderTest PROPERTIES COMPILE_FLAGS "${OpenRaider_CXX_FLAGS} ${TOMB_FLAGS}")
114
 target_link_libraries (TombRaiderTest ${ZLIBS})
114
 target_link_libraries (TombRaiderTest ${ZLIBS})

+ 1
- 1
test/TombRaider.cpp View File

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

+ 1
- 1
test/tga.cpp View File

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

Loading…
Cancel
Save