Browse Source

Renamed mtk_tga to tga

Thomas Buck 11 years ago
parent
commit
54adfac489
6 changed files with 20 additions and 20 deletions
  1. 4
    4
      Makefile
  2. 2
    2
      include/tga.h
  3. 10
    10
      src/Texture.cpp
  4. 1
    1
      src/TombRaider.cpp
  5. 1
    1
      src/tga.cpp
  6. 2
    2
      test/tga.cpp

+ 4
- 4
Makefile View File

31
 
31
 
32
 BASE_DEFS=$(shell sdl-config --cflags) -Iinclude -DSDL_INTERFACE \
32
 BASE_DEFS=$(shell sdl-config --cflags) -Iinclude -DSDL_INTERFACE \
33
 	-DUSING_OPENGL -DZLIB_SUPPORT -DUSING_EMITTER \
33
 	-DUSING_OPENGL -DZLIB_SUPPORT -DUSING_EMITTER \
34
-	-DUSING_OPENAL -DUSING_MTK_TGA -DUSING_PTHREADS \
34
+	-DUSING_OPENAL -DUSING_TGA -DUSING_PTHREADS \
35
 	-DHAVE_SDL_TTF
35
 	-DHAVE_SDL_TTF
36
 
36
 
37
 BASE_LIBS=$(shell sdl-config --libs) -lz -lstdc++ \
37
 BASE_LIBS=$(shell sdl-config --libs) -lz -lstdc++ \
182
 	$(BUILDDIR)/GLString.o \
182
 	$(BUILDDIR)/GLString.o \
183
 	$(BUILDDIR)/MatMath.o \
183
 	$(BUILDDIR)/MatMath.o \
184
 	$(BUILDDIR)/Matrix.o \
184
 	$(BUILDDIR)/Matrix.o \
185
-	$(BUILDDIR)/mtk_tga.o \
185
+	$(BUILDDIR)/tga.o \
186
 	$(BUILDDIR)/Network.o \
186
 	$(BUILDDIR)/Network.o \
187
 	$(BUILDDIR)/OpenGLMesh.o \
187
 	$(BUILDDIR)/OpenGLMesh.o \
188
 	$(BUILDDIR)/OpenRaider.o \
188
 	$(BUILDDIR)/OpenRaider.o \
297
 	@-mkdir -p $(BUILD_TEST_DIR)
297
 	@-mkdir -p $(BUILD_TEST_DIR)
298
 	$(CC) -Wall -Iinclude $(TR_FLAGS) -o $(BUILD_TEST_DIR)/TombRaiderTest.o -c test/TombRaider.cpp
298
 	$(CC) -Wall -Iinclude $(TR_FLAGS) -o $(BUILD_TEST_DIR)/TombRaiderTest.o -c test/TombRaider.cpp
299
 	$(MAKE) targets NAME=TombRaider.test BUILDDIR=$(BUILD_TEST_DIR) \
299
 	$(MAKE) targets NAME=TombRaider.test BUILDDIR=$(BUILD_TEST_DIR) \
300
-	OBJS="$(BUILD_TEST_DIR)/TombRaiderTest.o $(BUILD_TEST_DIR)/TombRaider.o $(BUILD_TEST_DIR)/mtk_tga.o $(BUILD_TEST_DIR)/memory_test.o" \
300
+	OBJS="$(BUILD_TEST_DIR)/TombRaiderTest.o $(BUILD_TEST_DIR)/TombRaider.o $(BUILD_TEST_DIR)/tga.o $(BUILD_TEST_DIR)/memory_test.o" \
301
 	CFLAGS="$(BASE_CFLAGS) -g $(TR_FLAGS)" \
301
 	CFLAGS="$(BASE_CFLAGS) -g $(TR_FLAGS)" \
302
 	LD_FLAGS="-lz -lstdc++"
302
 	LD_FLAGS="-lz -lstdc++"
303
 
303
 
371
 TGA.test:
371
 TGA.test:
372
 	mkdir -p $(BUILD_TEST_DIR)
372
 	mkdir -p $(BUILD_TEST_DIR)
373
 	$(CC) $(TEST_FLAGS) \
373
 	$(CC) $(TEST_FLAGS) \
374
-		src/mtk_tga.cpp test/mtk_tga.cpp -o $(BUILD_TEST_DIR)/TGA.test
374
+		src/tga.cpp test/tga.cpp -o $(BUILD_TEST_DIR)/TGA.test
375
 
375
 
376
 #################################################################
376
 #################################################################
377
 
377
 

include/mtk_tga.h → include/tga.h View File

19
  * Mongoose - Created
19
  * Mongoose - Created
20
  ================================================================*/
20
  ================================================================*/
21
 
21
 
22
-#ifndef _MTK_TGA_H
23
-#define _MTK_TGA_H
22
+#ifndef _TGA_H
23
+#define _TGA_H
24
 
24
 
25
 #include <stdio.h>
25
 #include <stdio.h>
26
 
26
 

+ 10
- 10
src/Texture.cpp View File

1
 /* -*- Mode: C++; tab-width: 3; indent-tabs-mode: t; c-basic-offset: 3 -*- */
1
 /* -*- Mode: C++; tab-width: 3; indent-tabs-mode: t; c-basic-offset: 3 -*- */
2
 /*==========================================================================
2
 /*==========================================================================
3
  *
3
  *
4
- * Project : MTK, Freyja, OpenRaider
4
+ * Project : Freyja, OpenRaider
5
  * Author  : Terry 'Mongoose' Hendrix II
5
  * Author  : Terry 'Mongoose' Hendrix II
6
  * Website : http://www.westga.edu/~stu7440
6
  * Website : http://www.westga.edu/~stu7440
7
  * Email   : stu7440@westga.edu
7
  * Email   : stu7440@westga.edu
37
 #include <memory_test.h>
37
 #include <memory_test.h>
38
 #endif
38
 #endif
39
 
39
 
40
-#ifdef USING_MTK_TGA
41
-#include <mtk_tga.h>
40
+#ifdef USING_TGA
41
+#include <tga.h>
42
 #endif
42
 #endif
43
 
43
 
44
-#ifdef USING_MTK_PNG
45
-#include <mtk_png.h>
44
+#ifdef USING_PNG
45
+#include <png.h>
46
 #endif
46
 #endif
47
 
47
 
48
 #ifdef HAVE_SDL_TTF
48
 #ifdef HAVE_SDL_TTF
831
 
831
 
832
 void Texture::glScreenShot(char *base, unsigned int width, unsigned int height)
832
 void Texture::glScreenShot(char *base, unsigned int width, unsigned int height)
833
 {
833
 {
834
-#ifdef USING_MTK_PNG
834
+#ifdef USING_PNG
835
   FILE *f;
835
   FILE *f;
836
   int sz = width*height;
836
   int sz = width*height;
837
   unsigned char *image = new unsigned char[sz*3];
837
   unsigned char *image = new unsigned char[sz*3];
1002
 
1002
 
1003
 int Texture::loadPNG(const char *filename)
1003
 int Texture::loadPNG(const char *filename)
1004
 {
1004
 {
1005
-#ifdef USING_MTK_PNG
1005
+#ifdef USING_PNG
1006
 	FILE *f;
1006
 	FILE *f;
1007
 	unsigned char *image = NULL;
1007
 	unsigned char *image = NULL;
1008
 	unsigned char *image2 = NULL;
1008
 	unsigned char *image2 = NULL;
1053
 
1053
 
1054
 	return id;
1054
 	return id;
1055
 #else
1055
 #else
1056
-	printf("ERROR: MTK PNG support not enabled in this build\n");
1056
+	printf("ERROR: PNG support not enabled in this build\n");
1057
 	return -1;
1057
 	return -1;
1058
 #endif
1058
 #endif
1059
 }
1059
 }
1061
 
1061
 
1062
 int Texture::loadTGA(const char *filename)
1062
 int Texture::loadTGA(const char *filename)
1063
 {
1063
 {
1064
-#ifdef USING_MTK_TGA
1064
+#ifdef USING_TGA
1065
 	FILE *f;
1065
 	FILE *f;
1066
 	unsigned char *image = NULL;
1066
 	unsigned char *image = NULL;
1067
 	unsigned char *image2 = NULL;
1067
 	unsigned char *image2 = NULL;
1109
 
1109
 
1110
 	return id;
1110
 	return id;
1111
 #else
1111
 #else
1112
-	printf("ERROR: MTK TGA support not enabled in this build\n");
1112
+	printf("ERROR: TGA support not enabled in this build\n");
1113
 	return -1;
1113
 	return -1;
1114
 #endif
1114
 #endif
1115
 }
1115
 }

+ 1
- 1
src/TombRaider.cpp View File

59
 #endif
59
 #endif
60
 
60
 
61
 #ifdef __TEST_TR5_DUMP_TGA
61
 #ifdef __TEST_TR5_DUMP_TGA
62
-#include <mtk_tga.h>
62
+#include <tga.h>
63
 #endif
63
 #endif
64
 
64
 
65
 #ifdef DEBUG_MEMORY
65
 #ifdef DEBUG_MEMORY

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

27
 #include <string.h>
27
 #include <string.h>
28
 #include <stdarg.h>
28
 #include <stdarg.h>
29
 
29
 
30
-#include <mtk_tga.h>
30
+#include <tga.h>
31
 
31
 
32
 #ifdef DEBUG_MEMORY
32
 #ifdef DEBUG_MEMORY
33
 #include <memory_test.h>
33
 #include <memory_test.h>

test/mtk_tga.cpp → test/tga.cpp View File

1
 /*!
1
 /*!
2
- * \file test/mtk_tga.cpp
2
+ * \file test/tga.cpp
3
  * \brief The TGA reader Unit Test
3
  * \brief The TGA reader Unit Test
4
  *
4
  *
5
  * \author xythobuz
5
  * \author xythobuz
6
  */
6
  */
7
 #include <stdio.h>
7
 #include <stdio.h>
8
 #include <stdlib.h>
8
 #include <stdlib.h>
9
-#include <mtk_tga.h>
9
+#include <tga.h>
10
 #include "greatest.h"
10
 #include "greatest.h"
11
 
11
 
12
 //! \todo generate list?
12
 //! \todo generate list?

Loading…
Cancel
Save