浏览代码

Renamed mtk_tga to tga

Thomas Buck 10 年前
父节点
当前提交
54adfac489
共有 6 个文件被更改,包括 20 次插入20 次删除
  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 查看文件

@@ -31,7 +31,7 @@ UNAME=$(shell uname -s)
31 31
 
32 32
 BASE_DEFS=$(shell sdl-config --cflags) -Iinclude -DSDL_INTERFACE \
33 33
 	-DUSING_OPENGL -DZLIB_SUPPORT -DUSING_EMITTER \
34
-	-DUSING_OPENAL -DUSING_MTK_TGA -DUSING_PTHREADS \
34
+	-DUSING_OPENAL -DUSING_TGA -DUSING_PTHREADS \
35 35
 	-DHAVE_SDL_TTF
36 36
 
37 37
 BASE_LIBS=$(shell sdl-config --libs) -lz -lstdc++ \
@@ -182,7 +182,7 @@ OBJS = \
182 182
 	$(BUILDDIR)/GLString.o \
183 183
 	$(BUILDDIR)/MatMath.o \
184 184
 	$(BUILDDIR)/Matrix.o \
185
-	$(BUILDDIR)/mtk_tga.o \
185
+	$(BUILDDIR)/tga.o \
186 186
 	$(BUILDDIR)/Network.o \
187 187
 	$(BUILDDIR)/OpenGLMesh.o \
188 188
 	$(BUILDDIR)/OpenRaider.o \
@@ -297,7 +297,7 @@ TombRaider.test:
297 297
 	@-mkdir -p $(BUILD_TEST_DIR)
298 298
 	$(CC) -Wall -Iinclude $(TR_FLAGS) -o $(BUILD_TEST_DIR)/TombRaiderTest.o -c test/TombRaider.cpp
299 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 301
 	CFLAGS="$(BASE_CFLAGS) -g $(TR_FLAGS)" \
302 302
 	LD_FLAGS="-lz -lstdc++"
303 303
 
@@ -371,7 +371,7 @@ Sound.test:
371 371
 TGA.test:
372 372
 	mkdir -p $(BUILD_TEST_DIR)
373 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 查看文件

@@ -19,8 +19,8 @@
19 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 25
 #include <stdio.h>
26 26
 

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

@@ -1,7 +1,7 @@
1 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 5
  * Author  : Terry 'Mongoose' Hendrix II
6 6
  * Website : http://www.westga.edu/~stu7440
7 7
  * Email   : stu7440@westga.edu
@@ -37,12 +37,12 @@
37 37
 #include <memory_test.h>
38 38
 #endif
39 39
 
40
-#ifdef USING_MTK_TGA
41
-#include <mtk_tga.h>
40
+#ifdef USING_TGA
41
+#include <tga.h>
42 42
 #endif
43 43
 
44
-#ifdef USING_MTK_PNG
45
-#include <mtk_png.h>
44
+#ifdef USING_PNG
45
+#include <png.h>
46 46
 #endif
47 47
 
48 48
 #ifdef HAVE_SDL_TTF
@@ -831,7 +831,7 @@ void Texture::bindTextureId(unsigned int n)
831 831
 
832 832
 void Texture::glScreenShot(char *base, unsigned int width, unsigned int height)
833 833
 {
834
-#ifdef USING_MTK_PNG
834
+#ifdef USING_PNG
835 835
   FILE *f;
836 836
   int sz = width*height;
837 837
   unsigned char *image = new unsigned char[sz*3];
@@ -1002,7 +1002,7 @@ void Texture::glScreenShot(char *base, unsigned int width, unsigned int height)
1002 1002
 
1003 1003
 int Texture::loadPNG(const char *filename)
1004 1004
 {
1005
-#ifdef USING_MTK_PNG
1005
+#ifdef USING_PNG
1006 1006
 	FILE *f;
1007 1007
 	unsigned char *image = NULL;
1008 1008
 	unsigned char *image2 = NULL;
@@ -1053,7 +1053,7 @@ int Texture::loadPNG(const char *filename)
1053 1053
 
1054 1054
 	return id;
1055 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 1057
 	return -1;
1058 1058
 #endif
1059 1059
 }
@@ -1061,7 +1061,7 @@ int Texture::loadPNG(const char *filename)
1061 1061
 
1062 1062
 int Texture::loadTGA(const char *filename)
1063 1063
 {
1064
-#ifdef USING_MTK_TGA
1064
+#ifdef USING_TGA
1065 1065
 	FILE *f;
1066 1066
 	unsigned char *image = NULL;
1067 1067
 	unsigned char *image2 = NULL;
@@ -1109,7 +1109,7 @@ int Texture::loadTGA(const char *filename)
1109 1109
 
1110 1110
 	return id;
1111 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 1113
 	return -1;
1114 1114
 #endif
1115 1115
 }

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

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

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

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

test/mtk_tga.cpp → test/tga.cpp 查看文件

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

正在加载...
取消
保存