Ver código fonte

Silenced more warnings

Thomas Buck 11 anos atrás
pai
commit
4431281585
5 arquivos alterados com 164 adições e 165 exclusões
  1. 3
    1
      ChangeLog
  2. 11
    9
      Makefile
  3. 0
    110
      src/Texture.cpp
  4. 144
    38
      src/TombRaider.cpp
  5. 6
    7
      test/GLString.cpp

+ 3
- 1
ChangeLog Ver arquivo

6
  OpenRaider (0.1.2) xythobuz <xythobuz@xythobuz.de>
6
  OpenRaider (0.1.2) xythobuz <xythobuz@xythobuz.de>
7
 
7
 
8
 	[ 20140119 ]
8
 	[ 20140119 ]
9
-	* Removed unused TGA font parts of GLString
9
+	* Removed unused TGA font parts of GLString with slight API changes
10
+	* Modified GLString Unit Test to work with new GLString
10
 	* Removed unused glDrawGrid & glDrawAxis from SDLSystem
11
 	* Removed unused glDrawGrid & glDrawAxis from SDLSystem
12
+	* Silenced many more warnings
11
 
13
 
12
 	[ 20140118 ]
14
 	[ 20140118 ]
13
 	* Removed unused (and pretty empty) Entity class
15
 	* Removed unused (and pretty empty) Entity class

+ 11
- 9
Makefile Ver arquivo

94
 WARNINGS=-Weverything -Wno-padded -Wno-packed -Wno-documentation
94
 WARNINGS=-Weverything -Wno-padded -Wno-packed -Wno-documentation
95
 WARNINGS+=-Wno-documentation-unknown-command -Wno-format-nonliteral
95
 WARNINGS+=-Wno-documentation-unknown-command -Wno-format-nonliteral
96
 WARNINGS+=-Wno-covered-switch-default -Wno-global-constructors
96
 WARNINGS+=-Wno-covered-switch-default -Wno-global-constructors
97
-WARNINGS+=-Wno-exit-time-destructors
97
+WARNINGS+=-Wno-exit-time-destructors -Wno-c++98-compat-pedantic
98
+WARNINGS+=-Wno-disabled-macro-expansion -Wno-missing-variable-declarations
99
+WARNINGS+=-Wno-missing-prototypes
98
 
100
 
99
 WARNINGS+=-Wno-conversion -Wno-sign-conversion -Wno-shorten-64-to-32
101
 WARNINGS+=-Wno-conversion -Wno-sign-conversion -Wno-shorten-64-to-32
100
 
102
 
329
 
331
 
330
 TombRaider.test:
332
 TombRaider.test:
331
 	@-mkdir -p $(BUILD_TEST_DIR)
333
 	@-mkdir -p $(BUILD_TEST_DIR)
332
-	$(CC) $(FLAGS_ALL) -Iinclude $(TR_FLAGS) -o $(BUILD_TEST_DIR)/TombRaiderTest.o -c test/TombRaider.cpp
334
+	$(CC) $(FLAGS_ALL) $(WARNINGS) -Iinclude $(TR_FLAGS) -o $(BUILD_TEST_DIR)/TombRaiderTest.o -c test/TombRaider.cpp
333
 	$(MAKE) targets NAME=TombRaider.test BUILDDIR=$(BUILD_TEST_DIR) \
335
 	$(MAKE) targets NAME=TombRaider.test BUILDDIR=$(BUILD_TEST_DIR) \
334
 	OBJS="$(BUILD_TEST_DIR)/TombRaiderTest.o $(BUILD_TEST_DIR)/TombRaider.o $(BUILD_TEST_DIR)/TGA.o $(BUILD_TEST_DIR)/memory_test.o" \
336
 	OBJS="$(BUILD_TEST_DIR)/TombRaiderTest.o $(BUILD_TEST_DIR)/TombRaider.o $(BUILD_TEST_DIR)/TGA.o $(BUILD_TEST_DIR)/memory_test.o" \
335
 	CFLAGS="$(BASE_CFLAGS) -g $(TR_FLAGS)" \
337
 	CFLAGS="$(BASE_CFLAGS) -g $(TR_FLAGS)" \
339
 
341
 
340
 GLString.test:
342
 GLString.test:
341
 	mkdir -p $(BUILD_TEST_DIR)
343
 	mkdir -p $(BUILD_TEST_DIR)
342
-	$(CC) $(FLAGS_ALL) -Iinclude -DHAVE_SDL_TTF -DHAVE_SDL \
344
+	$(CC) $(FLAGS_ALL) $(WARNINGS) -Iinclude -DHAVE_SDL_TTF -DHAVE_SDL \
343
 	$(shell sdl-config --cflags) $(shell sdl-config --libs) \
345
 	$(shell sdl-config --cflags) $(shell sdl-config --libs) \
344
 	$(GL_LIBS) $(GL_DEFS) -lSDL_ttf -lm -lstdc++ \
346
 	$(GL_LIBS) $(GL_DEFS) -lSDL_ttf -lm -lstdc++ \
345
 	src/Texture.cpp src/GLString.cpp \
347
 	src/Texture.cpp src/GLString.cpp \
350
 Matrix.test:
352
 Matrix.test:
351
 	@-echo "Building Matrix unit test"
353
 	@-echo "Building Matrix unit test"
352
 	mkdir -p $(BUILD_TEST_DIR)
354
 	mkdir -p $(BUILD_TEST_DIR)
353
-	$(CC) $(FLAGS_ALL) -g -lm -lstdc++ -Iinclude \
355
+	$(CC) $(FLAGS_ALL) $(WARNINGS) -g -lm -lstdc++ -Iinclude \
354
 	src/Matrix.cpp src/Quaternion.cpp src/Vector3d.cpp \
356
 	src/Matrix.cpp src/Quaternion.cpp src/Vector3d.cpp \
355
 	test/Matrix.cpp -o $(BUILD_TEST_DIR)/Matrix.test
357
 	test/Matrix.cpp -o $(BUILD_TEST_DIR)/Matrix.test
356
 
358
 
357
 Math.test:
359
 Math.test:
358
 	@-echo "Building Math unit test"
360
 	@-echo "Building Math unit test"
359
 	mkdir -p $(BUILD_TEST_DIR)
361
 	mkdir -p $(BUILD_TEST_DIR)
360
-	$(CC) $(FLAGS_ALL) -g -lm -lstdc++ -Iinclude \
362
+	$(CC) $(FLAGS_ALL) $(WARNINGS) -g -lm -lstdc++ -Iinclude \
361
 	src/MatMath.cpp src/Vector3d.cpp test/MatMath.cpp -o $(BUILD_TEST_DIR)/Math.test
363
 	src/MatMath.cpp src/Vector3d.cpp test/MatMath.cpp -o $(BUILD_TEST_DIR)/Math.test
362
 
364
 
363
 #################################################################
365
 #################################################################
364
 
366
 
365
 Memory.test:
367
 Memory.test:
366
 	mkdir -p $(BUILD_TEST_DIR)
368
 	mkdir -p $(BUILD_TEST_DIR)
367
-	$(CC) $(FLAGS_ALL) -g -lstdc++ -Iinclude \
369
+	$(CC) $(FLAGS_ALL) $(WARNINGS) -g -lstdc++ -Iinclude \
368
 	-DDEBUG_MEMORY -DDEBUG_MEMORY_ERROR \
370
 	-DDEBUG_MEMORY -DDEBUG_MEMORY_ERROR \
369
 	src/memory_test.cpp test/memory_test.cpp -o $(BUILD_TEST_DIR)/memory_test.test
371
 	src/memory_test.cpp test/memory_test.cpp -o $(BUILD_TEST_DIR)/memory_test.test
370
 
372
 
372
 
374
 
373
 Network.test:
375
 Network.test:
374
 	mkdir -p $(BUILD_TEST_DIR)
376
 	mkdir -p $(BUILD_TEST_DIR)
375
-	$(CC) $(TEST_FLAGS) \
377
+	$(CC) $(TEST_FLAGS) $(WARNINGS) \
376
 	src/Network.cpp test/Network.cpp -o $(BUILD_TEST_DIR)/Network.test
378
 	src/Network.cpp test/Network.cpp -o $(BUILD_TEST_DIR)/Network.test
377
 
379
 
378
 #################################################################
380
 #################################################################
379
 
381
 
380
 Sound.test:
382
 Sound.test:
381
 	mkdir -p $(BUILD_TEST_DIR)
383
 	mkdir -p $(BUILD_TEST_DIR)
382
-	$(CC) $(TEST_FLAGS) \
384
+	$(CC) $(TEST_FLAGS) $(WARNINGS) \
383
 		-DUSING_OPENAL $(AUDIO_LIBS) $(AUDIO_DEFS) \
385
 		-DUSING_OPENAL $(AUDIO_LIBS) $(AUDIO_DEFS) \
384
 		src/Sound.cpp test/Sound.cpp -o $(BUILD_TEST_DIR)/Sound.test
386
 		src/Sound.cpp test/Sound.cpp -o $(BUILD_TEST_DIR)/Sound.test
385
 
387
 
387
 
389
 
388
 TGA.test:
390
 TGA.test:
389
 	mkdir -p $(BUILD_TEST_DIR)
391
 	mkdir -p $(BUILD_TEST_DIR)
390
-	$(CC) $(TEST_FLAGS) \
392
+	$(CC) $(TEST_FLAGS) $(WARNINGS) \
391
 		src/TGA.cpp test/TGA.cpp -o $(BUILD_TEST_DIR)/TGA.test
393
 		src/TGA.cpp test/TGA.cpp -o $(BUILD_TEST_DIR)/TGA.test
392
 
394
 
393
 #################################################################
395
 #################################################################

+ 0
- 110
src/Texture.cpp Ver arquivo

41
 #include <TGA.h>
41
 #include <TGA.h>
42
 #endif
42
 #endif
43
 
43
 
44
-#ifdef USING_PNG
45
-#include <png.h>
46
-#endif
47
-
48
 #ifdef HAVE_SDL_TTF
44
 #ifdef HAVE_SDL_TTF
49
 #include <SDL/SDL_ttf.h>
45
 #include <SDL/SDL_ttf.h>
50
 #endif
46
 #endif
831
 
827
 
832
 void Texture::glScreenShot(char *base, unsigned int width, unsigned int height)
828
 void Texture::glScreenShot(char *base, unsigned int width, unsigned int height)
833
 {
829
 {
834
-#ifdef USING_PNG
835
-  FILE *f;
836
-  int sz = width*height;
837
-  unsigned char *image = new unsigned char[sz*3];
838
-  char filename[1024];
839
-  static int count = 0;
840
-  bool done = false;
841
-
842
-
843
-  if (!image)
844
-  {
845
-    printf("glScreenShot> ERROR: Couldn't allocate image!\n");
846
-    return;
847
-  }
848
-
849
-  while (!done)
850
-  {
851
-    snprintf(filename, 1024, "%s-%03i.png", base, count++);
852
-
853
-    f = fopen(filename, "rb");
854
-
855
-    if (f)
856
-      fclose(f);
857
-    else
858
-      done = true;
859
-  }
860
-
861
-  f = fopen(filename, "wb");
862
-
863
-  if (!f)
864
-  {
865
-    printf("glScreenShot> ERROR: Couldn't write screenshot.\n");
866
-    perror("glScreenShot> ERROR: ");
867
-    return;
868
-  }
869
-
870
-  // Capture frame buffer
871
-  glReadPixels(0, 0, width, height, GL_RGB, GL_UNSIGNED_BYTE, image);
872
-
873
-  mtk_image__png_save(f, image, width, height, 3);
874
-  fclose(f);
875
-
876
-  delete [] image;
877
-
878
-  printf("glScreenShot> Took screenshot '%s'.\n", filename);
879
-#else
880
   FILE *f;
830
   FILE *f;
881
   int sz = width*height;
831
   int sz = width*height;
882
   unsigned char *image = new unsigned char[sz*3];
832
   unsigned char *image = new unsigned char[sz*3];
996
   delete [] image;
946
   delete [] image;
997
 
947
 
998
   printf("Took screenshot '%s'.\n", filename);
948
   printf("Took screenshot '%s'.\n", filename);
999
-#endif
1000
-}
1001
-
1002
-
1003
-int Texture::loadPNG(const char *filename)
1004
-{
1005
-#ifdef USING_PNG
1006
-	FILE *f;
1007
-	unsigned char *image = NULL;
1008
-	unsigned char *image2 = NULL;
1009
-	unsigned int w, h;
1010
-	char type;
1011
-	int id = -1;
1012
-
1013
-
1014
-	f = fopen(filename, "rb");
1015
-
1016
-	if (!f)
1017
-	{
1018
-		perror("Couldn't load file");
1019
-	}
1020
-	else if (!mtk_image__png_check(f))
1021
-	{
1022
-		mtk_image__png_load(f, &image, &w, &h, &type);
1023
-
1024
-		type += 2;
1025
-
1026
-		image2 = scaleBuffer(image, w, h, (type == 4) ? 4 : 3);
1027
-
1028
-		if (image2)
1029
-		{
1030
-			image = image2;
1031
-			w = h = 256;
1032
-		}
1033
-
1034
-		if (image)
1035
-		{
1036
-			id = loadBuffer(image, w, h,
1037
-								 (type == 4) ? RGBA : RGB,
1038
-								 (type == 4) ? 32 : 24);
1039
-
1040
-			delete [] image;
1041
-		}
1042
-
1043
-		if (f)
1044
-		{
1045
-			fclose(f);
1046
-		}
1047
-	}
1048
-
1049
-	if (id == -1)
1050
-	{
1051
-		printf("Texture::loadPNG> ERROR: Failed to load '%s'\n", filename);
1052
-	}
1053
-
1054
-	return id;
1055
-#else
1056
-	printf("ERROR: PNG support not enabled in this build\n");
1057
-	return -1;
1058
-#endif
1059
 }
949
 }
1060
 
950
 
1061
 
951
 

+ 144
- 38
src/TombRaider.cpp Ver arquivo

251
 	 **************************************************************************/
251
 	 **************************************************************************/
252
 
252
 
253
 	int start_anim;
253
 	int start_anim;
254
-	int next_start_anim;
254
+	int next_start_anim = 0xFFFF;
255
 	tr2_moveable_t *last_moveable = 0x0;
255
 	tr2_moveable_t *last_moveable = 0x0;
256
 	tr2_moveable_t *moveable = 0x0;
256
 	tr2_moveable_t *moveable = 0x0;
257
 	tr2_moveable_t *next_moveable = 0x0;
257
 	tr2_moveable_t *next_moveable = 0x0;
439
    case 0xfffffff0:           // bogus
439
    case 0xfffffff0:           // bogus
440
    case 0x00345254:           // "TR4\0"
440
    case 0x00345254:           // "TR4\0"
441
 		return 0;
441
 		return 0;
442
-     break;
443
    default:
442
    default:
444
 		;
443
 		;
445
    }
444
    }
892
 
891
 
893
        if (mEngineVersion >= TR_VERSION_3)
892
        if (mEngineVersion >= TR_VERSION_3)
894
        {
893
        {
895
-			 int j;
896
-
897
 			 for (j = 0; j < _rooms[i].room_data.num_rectangles; ++j)
894
 			 for (j = 0; j < _rooms[i].room_data.num_rectangles; ++j)
898
 	       {
895
 	       {
899
 				 _rooms[i].room_data.rectangles[j].texture &= 0x7fff;
896
 				 _rooms[i].room_data.rectangles[j].texture &= 0x7fff;
927
 
924
 
928
        if (mEngineVersion >= TR_VERSION_3)
925
        if (mEngineVersion >= TR_VERSION_3)
929
        {
926
        {
930
-			 int j;
931
-
932
 			 for (j = 0; j < _rooms[i].room_data.num_triangles; ++j)
927
 			 for (j = 0; j < _rooms[i].room_data.num_triangles; ++j)
933
 			 {
928
 			 {
934
 				 _rooms[i].room_data.triangles[j].texture &= 0x7fff;
929
 				 _rooms[i].room_data.triangles[j].texture &= 0x7fff;
961
 
956
 
962
 			if (mEngineVersion >= TR_VERSION_3)
957
 			if (mEngineVersion >= TR_VERSION_3)
963
 	      {
958
 	      {
964
-				int j;
965
-
966
 				for (j = 0; j < _rooms[i].room_data.num_sprites; j++)
959
 				for (j = 0; j < _rooms[i].room_data.num_sprites; j++)
967
 	         {
960
 	         {
968
 					_rooms[i].room_data.sprites[j].texture &= 0x7fff;
961
 					_rooms[i].room_data.sprites[j].texture &= 0x7fff;
1978
 #endif
1971
 #endif
1979
 		}
1972
 		}
1980
 		break;
1973
 		break;
1974
+    case TR_VERSION_2:
1975
+    case TR_VERSION_3:
1976
+    case TR_VERSION_5:
1977
+    case TR_VERSION_UNKNOWN:
1981
 	default:
1978
 	default:
1982
 		//! \fixme (Endian) Read bit32 / int32_t
1979
 		//! \fixme (Endian) Read bit32 / int32_t
1983
 		Fread(&mNumSampleIndices, 4, 1, f);
1980
 		Fread(&mNumSampleIndices, 4, 1, f);
1984
 		printDebug("Load", "mNumSampleIndices = %i", mNumSampleIndices);
1981
 		printDebug("Load", "mNumSampleIndices = %i", mNumSampleIndices);
1985
-
1986
 		if (mNumSampleIndices > 0)
1982
 		if (mNumSampleIndices > 0)
1987
 		{
1983
 		{
1988
 			mSampleIndices = new int[mNumSampleIndices];
1984
 			mSampleIndices = new int[mNumSampleIndices];
1989
 			//! \fixme (Endian)
1985
 			//! \fixme (Endian)
1990
 			Fread(mSampleIndices, 4, mNumSampleIndices, f);
1986
 			Fread(mSampleIndices, 4, mNumSampleIndices, f);
1991
 		}
1987
 		}
1988
+        break;
1992
    }
1989
    }
1993
 
1990
 
1994
 #ifdef ZLIB_SUPPORT
1991
 #ifdef ZLIB_SUPPORT
2150
 		//color[2] = (_palette8[index].b & 0xfd) / 64.0;
2147
 		//color[2] = (_palette8[index].b & 0xfd) / 64.0;
2151
 		color[3] = 1.0;
2148
 		color[3] = 1.0;
2152
 		break;
2149
 		break;
2150
+    case TR_VERSION_2:
2151
+    case TR_VERSION_3:
2152
+    case TR_VERSION_4:
2153
+    case TR_VERSION_5:
2154
+    case TR_VERSION_UNKNOWN:
2153
 	default:
2155
 	default:
2154
 		color[0] = (float)(_palette16[index] & 0xff) / 256.0;
2156
 		color[0] = (float)(_palette16[index] & 0xff) / 256.0;
2155
 		color[1] = (float)((_palette16[index] >> 8) & 0xff) / 256.0;
2157
 		color[1] = (float)((_palette16[index] >> 8) & 0xff) / 256.0;
2225
 	case TR_VERSION_1:
2227
 	case TR_VERSION_1:
2226
 		getColor(mMeshes[meshIndex].coloured_rectangles[faceIndex].texture & 0xff, color);
2228
 		getColor(mMeshes[meshIndex].coloured_rectangles[faceIndex].texture & 0xff, color);
2227
 		break;
2229
 		break;
2230
+    case TR_VERSION_2:
2231
+    case TR_VERSION_3:
2232
+    case TR_VERSION_4:
2233
+    case TR_VERSION_5:
2234
+    case TR_VERSION_UNKNOWN:
2228
 	default:
2235
 	default:
2229
 		getColor((mMeshes[meshIndex].coloured_rectangles[faceIndex].texture>>8) & 0xff, color);
2236
 		getColor((mMeshes[meshIndex].coloured_rectangles[faceIndex].texture>>8) & 0xff, color);
2230
 	}
2237
 	}
2251
 		getColor(mMeshes[meshIndex].coloured_triangles[faceIndex].texture & 0xff,
2258
 		getColor(mMeshes[meshIndex].coloured_triangles[faceIndex].texture & 0xff,
2252
 					color);
2259
 					color);
2253
 		break;
2260
 		break;
2261
+    case TR_VERSION_2:
2262
+    case TR_VERSION_3:
2263
+    case TR_VERSION_4:
2264
+    case TR_VERSION_5:
2265
+    case TR_VERSION_UNKNOWN:
2254
 	default:
2266
 	default:
2255
 		getColor((mMeshes[meshIndex].coloured_triangles[faceIndex].texture>>8) & 0xff,
2267
 		getColor((mMeshes[meshIndex].coloured_triangles[faceIndex].texture>>8) & 0xff,
2256
 					color);
2268
 					color);
2493
 			case TR_VERSION_4:
2505
 			case TR_VERSION_4:
2494
 			case TR_VERSION_3:
2506
 			case TR_VERSION_3:
2495
 				colorValue /= 16384.0;
2507
 				colorValue /= 16384.0;
2508
+                //! \fixme Should we really fall through here?!?
2509
+                break; // just testing -- xythobuz, 20140119
2510
+
2511
+            case TR_VERSION_1:
2512
+            case TR_VERSION_2:
2513
+            case TR_VERSION_5:
2514
+            case TR_VERSION_UNKNOWN:
2496
 			default:
2515
 			default:
2497
 				colorValue = (1.0 - (colorValue / 8192.0));
2516
 				colorValue = (1.0 - (colorValue / 8192.0));
2498
 				break;
2517
 				break;
2522
 	switch (getEngine())
2541
 	switch (getEngine())
2523
 	{
2542
 	{
2524
 	case TR_VERSION_UNKNOWN:
2543
 	case TR_VERSION_UNKNOWN:
2544
+	default:
2525
 		break;
2545
 		break;
2526
-	default: // TR1-TR5
2546
+
2547
+    case TR_VERSION_1:
2548
+    case TR_VERSION_2:
2549
+    case TR_VERSION_3:
2550
+    case TR_VERSION_4:
2551
+    case TR_VERSION_5:
2527
       xyzA[0] = (unsigned short)_boxes[index].xmin * 1024.0;
2552
       xyzA[0] = (unsigned short)_boxes[index].xmin * 1024.0;
2528
       xyzA[1] = (short)_boxes[index].true_floor;
2553
       xyzA[1] = (short)_boxes[index].true_floor;
2529
       xyzA[2] = (unsigned short)_boxes[index].zmin * 1024.0;
2554
       xyzA[2] = (unsigned short)_boxes[index].zmin * 1024.0;
2553
 	switch (getEngine())
2578
 	switch (getEngine())
2554
 	{
2579
 	{
2555
 	case TR_VERSION_UNKNOWN:
2580
 	case TR_VERSION_UNKNOWN:
2581
+	default:
2556
 		break;
2582
 		break;
2557
-	default:  // TR1-TR5
2583
+    case TR_VERSION_1:
2584
+    case TR_VERSION_2:
2585
+    case TR_VERSION_3:
2586
+    case TR_VERSION_4:
2587
+    case TR_VERSION_5:
2558
 		return _num_boxes;
2588
 		return _num_boxes;
2559
 	}
2589
 	}
2560
 
2590
 
2712
 	{
2742
 	{
2713
 	case TR_VERSION_UNKNOWN:
2743
 	case TR_VERSION_UNKNOWN:
2714
 		return -1;
2744
 		return -1;
2715
-		break;
2716
 	case TR_VERSION_1:
2745
 	case TR_VERSION_1:
2717
 	case TR_VERSION_2:
2746
 	case TR_VERSION_2:
2718
 	case TR_VERSION_3:
2747
 	case TR_VERSION_3:
2838
 		break;
2867
 		break;
2839
 	case TR_VERSION_5:
2868
 	case TR_VERSION_5:
2840
 		return mRoomsTR5[roomIndex].numRoomLights;
2869
 		return mRoomsTR5[roomIndex].numRoomLights;
2841
-		break;
2870
+    case TR_VERSION_1:
2871
+    case TR_VERSION_2:
2872
+    case TR_VERSION_3:
2873
+    case TR_VERSION_4:
2842
 	default:
2874
 	default:
2843
 		return _rooms[roomIndex].num_lights;
2875
 		return _rooms[roomIndex].num_lights;
2844
 	}
2876
 	}
2859
 	switch (getEngine())
2891
 	switch (getEngine())
2860
 	{
2892
 	{
2861
 	case TR_VERSION_UNKNOWN:
2893
 	case TR_VERSION_UNKNOWN:
2894
+	default:
2862
 		return -1;
2895
 		return -1;
2863
-		break;
2864
 	case TR_VERSION_5:
2896
 	case TR_VERSION_5:
2865
 		count = NumStaticMeshes();
2897
 		count = NumStaticMeshes();
2866
 
2898
 
2880
 			}
2912
 			}
2881
 		}
2913
 		}
2882
 		break;
2914
 		break;
2883
-	default:  // TR1-TR4
2915
+    case TR_VERSION_1:
2916
+    case TR_VERSION_2:
2917
+    case TR_VERSION_3:
2918
+    case TR_VERSION_4:
2884
 		count = NumStaticMeshes();
2919
 		count = NumStaticMeshes();
2885
 
2920
 
2886
 		for (i = 0; i < count; ++i)
2921
 		for (i = 0; i < count; ++i)
2912
 	switch (getEngine())
2947
 	switch (getEngine())
2913
 	{
2948
 	{
2914
 	case TR_VERSION_UNKNOWN:
2949
 	case TR_VERSION_UNKNOWN:
2950
+	default:
2915
 		break;
2951
 		break;
2916
 	case TR_VERSION_5:
2952
 	case TR_VERSION_5:
2917
 		return mRoomsTR5[roomIndex].numStaticMeshes;
2953
 		return mRoomsTR5[roomIndex].numStaticMeshes;
2918
-		break;
2919
-	default:  // TR1-TR4
2954
+    case TR_VERSION_1:
2955
+    case TR_VERSION_2:
2956
+    case TR_VERSION_3:
2957
+    case TR_VERSION_4:
2920
 		return _rooms[roomIndex].num_static_meshes;
2958
 		return _rooms[roomIndex].num_static_meshes;
2921
 	}
2959
 	}
2922
 
2960
 
2934
 	switch (getEngine())
2972
 	switch (getEngine())
2935
 	{
2973
 	{
2936
 	case TR_VERSION_UNKNOWN:
2974
 	case TR_VERSION_UNKNOWN:
2975
+	default:
2937
 		break;
2976
 		break;
2938
 	case TR_VERSION_5:
2977
 	case TR_VERSION_5:
2939
 		*adjoiningRoom = mRoomsTR5[roomIndex].doors[index].adjoining_room;
2978
 		*adjoiningRoom = mRoomsTR5[roomIndex].doors[index].adjoining_room;
2955
 		vertices[10] = mRoomsTR5[roomIndex].doors[index].vertices[3].y;
2994
 		vertices[10] = mRoomsTR5[roomIndex].doors[index].vertices[3].y;
2956
 		vertices[11] = mRoomsTR5[roomIndex].doors[index].vertices[3].z;
2995
 		vertices[11] = mRoomsTR5[roomIndex].doors[index].vertices[3].z;
2957
 		break;
2996
 		break;
2958
-	default:  // TR1-TR4
2997
+    case TR_VERSION_1:
2998
+    case TR_VERSION_2:
2999
+    case TR_VERSION_3:
3000
+    case TR_VERSION_4:
2959
 		*adjoiningRoom = _rooms[roomIndex].portals[index].adjoining_room;
3001
 		*adjoiningRoom = _rooms[roomIndex].portals[index].adjoining_room;
2960
 
3002
 
2961
 		normal[0] = _rooms[roomIndex].portals[index].normal.x;// / NORMAL_SCALE;
3003
 		normal[0] = _rooms[roomIndex].portals[index].normal.x;// / NORMAL_SCALE;
2988
 	switch (getEngine())
3030
 	switch (getEngine())
2989
 	{
3031
 	{
2990
 	case TR_VERSION_UNKNOWN:
3032
 	case TR_VERSION_UNKNOWN:
3033
+	default:
2991
 		break;
3034
 		break;
2992
 	case TR_VERSION_5:
3035
 	case TR_VERSION_5:
2993
 		return mRoomsTR5[roomIndex].numDoors;
3036
 		return mRoomsTR5[roomIndex].numDoors;
2994
-		break;
2995
-	default:  // TR1-TR4
3037
+    case TR_VERSION_1:
3038
+    case TR_VERSION_2:
3039
+    case TR_VERSION_3:
3040
+    case TR_VERSION_4:
2996
 		return _rooms[roomIndex].num_portals;
3041
 		return _rooms[roomIndex].num_portals;
2997
 	}
3042
 	}
2998
 
3043
 
3013
 	switch (getEngine())
3058
 	switch (getEngine())
3014
 	{
3059
 	{
3015
 	case TR_VERSION_UNKNOWN:
3060
 	case TR_VERSION_UNKNOWN:
3061
+	default:
3016
 		break;
3062
 		break;
3017
 	case TR_VERSION_5:
3063
 	case TR_VERSION_5:
3018
 		for (i = 0, count = 0; i < mRoomsTR5[roomIndex].numLayers; ++i)
3064
 		for (i = 0, count = 0; i < mRoomsTR5[roomIndex].numLayers; ++i)
3041
 			count += mRoomsTR5[roomIndex].layers[i].numLayerRectangles;
3087
 			count += mRoomsTR5[roomIndex].layers[i].numLayerRectangles;
3042
 		}
3088
 		}
3043
 		break;
3089
 		break;
3044
-	default:
3090
+    case TR_VERSION_1:
3091
+    case TR_VERSION_2:
3092
+    case TR_VERSION_3:
3093
+    case TR_VERSION_4:
3045
 		tIndex = _rooms[roomIndex].room_data.rectangles[rectangleIndex].texture;
3094
 		tIndex = _rooms[roomIndex].room_data.rectangles[rectangleIndex].texture;
3046
 		*texture = _object_textures[tIndex].tile;
3095
 		*texture = _object_textures[tIndex].tile;
3047
 		*flags = 0;
3096
 		*flags = 0;
3082
 	switch (getEngine())
3131
 	switch (getEngine())
3083
 	{
3132
 	{
3084
 	case TR_VERSION_UNKNOWN:
3133
 	case TR_VERSION_UNKNOWN:
3134
+	default:
3085
 		break;
3135
 		break;
3086
 	case TR_VERSION_5:
3136
 	case TR_VERSION_5:
3087
 		for (i = 0, count = 0; i < mRoomsTR5[roomIndex].numLayers; ++i)
3137
 		for (i = 0, count = 0; i < mRoomsTR5[roomIndex].numLayers; ++i)
3090
 		}
3140
 		}
3091
 
3141
 
3092
 		return count;
3142
 		return count;
3093
-		break;
3094
-	default:
3143
+    case TR_VERSION_1:
3144
+    case TR_VERSION_2:
3145
+    case TR_VERSION_3:
3146
+    case TR_VERSION_4:
3095
 		return ((_rooms[roomIndex].room_data.num_rectangles < 0) ? 0 :
3147
 		return ((_rooms[roomIndex].room_data.num_rectangles < 0) ? 0 :
3096
 				  _rooms[roomIndex].room_data.num_rectangles);
3148
 				  _rooms[roomIndex].room_data.num_rectangles);
3097
 	}
3149
 	}
3119
 	switch (getEngine())
3171
 	switch (getEngine())
3120
 	{
3172
 	{
3121
 	case TR_VERSION_UNKNOWN:
3173
 	case TR_VERSION_UNKNOWN:
3174
+	default:
3122
 		break;
3175
 		break;
3123
 	case TR_VERSION_5:
3176
 	case TR_VERSION_5:
3124
 		*floorDataIndex = mRoomsTR5[roomIndex].sectors[index].fd_index;
3177
 		*floorDataIndex = mRoomsTR5[roomIndex].sectors[index].fd_index;
3135
 		*floor = mRoomsTR5[roomIndex].sectors[index].floor * 256.0f;
3188
 		*floor = mRoomsTR5[roomIndex].sectors[index].floor * 256.0f;
3136
 		*ceiling = mRoomsTR5[roomIndex].sectors[index].ceiling * 256.0f;
3189
 		*ceiling = mRoomsTR5[roomIndex].sectors[index].ceiling * 256.0f;
3137
 		break;
3190
 		break;
3138
-	default:
3191
+    case TR_VERSION_1:
3192
+    case TR_VERSION_2:
3193
+    case TR_VERSION_3:
3194
+    case TR_VERSION_4:
3139
 		*floorDataIndex = _rooms[roomIndex].sector_list[index].fd_index;
3195
 		*floorDataIndex = _rooms[roomIndex].sector_list[index].fd_index;
3140
 		*boxIndex = _rooms[roomIndex].sector_list[index].box_index;
3196
 		*boxIndex = _rooms[roomIndex].sector_list[index].box_index;
3141
 		*roomBelow = _rooms[roomIndex].sector_list[index].room_below;
3197
 		*roomBelow = _rooms[roomIndex].sector_list[index].room_below;
3183
 	switch (getEngine())
3239
 	switch (getEngine())
3184
 	{
3240
 	{
3185
 	case TR_VERSION_UNKNOWN:
3241
 	case TR_VERSION_UNKNOWN:
3242
+	default:
3186
 		break;
3243
 		break;
3187
 	case TR_VERSION_5:
3244
 	case TR_VERSION_5:
3188
 		// width of sector list
3245
 		// width of sector list
3193
 
3250
 
3194
 		return (mRoomsTR5[roomIndex].numZSectors *
3251
 		return (mRoomsTR5[roomIndex].numZSectors *
3195
 				  mRoomsTR5[roomIndex].numXSectors);
3252
 				  mRoomsTR5[roomIndex].numXSectors);
3196
-	default:
3253
+    case TR_VERSION_1:
3254
+    case TR_VERSION_2:
3255
+    case TR_VERSION_3:
3256
+    case TR_VERSION_4:
3197
 		// width of sector list
3257
 		// width of sector list
3198
 		*zSectorsCount = _rooms[roomIndex].num_zsectors;
3258
 		*zSectorsCount = _rooms[roomIndex].num_zsectors;
3199
 
3259
 
3355
 	switch (getEngine())
3415
 	switch (getEngine())
3356
 	{
3416
 	{
3357
 	case TR_VERSION_UNKNOWN:
3417
 	case TR_VERSION_UNKNOWN:
3418
+	default:
3358
 		break;
3419
 		break;
3359
 	case TR_VERSION_5:
3420
 	case TR_VERSION_5:
3360
 		return 0; // No room sprites in TRC
3421
 		return 0; // No room sprites in TRC
3361
-		break;
3362
-	default:
3422
+    case TR_VERSION_1:
3423
+    case TR_VERSION_2:
3424
+    case TR_VERSION_3:
3425
+    case TR_VERSION_4:
3363
 		return ((_rooms[roomIndex].room_data.num_sprites < 0) ?
3426
 		return ((_rooms[roomIndex].room_data.num_sprites < 0) ?
3364
 				  0 : _rooms[roomIndex].room_data.num_sprites);
3427
 				  0 : _rooms[roomIndex].room_data.num_sprites);
3365
 	}
3428
 	}
3380
 	switch (getEngine())
3443
 	switch (getEngine())
3381
 	{
3444
 	{
3382
 	case TR_VERSION_UNKNOWN:
3445
 	case TR_VERSION_UNKNOWN:
3446
+	default:
3383
 		break;
3447
 		break;
3384
 	case TR_VERSION_5:
3448
 	case TR_VERSION_5:
3385
 		for (i = 0, count = 0; i < mRoomsTR5[roomIndex].numLayers; ++i)
3449
 		for (i = 0, count = 0; i < mRoomsTR5[roomIndex].numLayers; ++i)
3408
 			count += mRoomsTR5[roomIndex].layers[i].numLayerTriangles;
3472
 			count += mRoomsTR5[roomIndex].layers[i].numLayerTriangles;
3409
 		}
3473
 		}
3410
 		break;
3474
 		break;
3411
-	default:
3475
+    case TR_VERSION_1:
3476
+    case TR_VERSION_2:
3477
+    case TR_VERSION_3:
3478
+    case TR_VERSION_4:
3412
 		tIndex = _rooms[roomIndex].room_data.triangles[triangleIndex].texture;
3479
 		tIndex = _rooms[roomIndex].room_data.triangles[triangleIndex].texture;
3413
 		*texture = _object_textures[tIndex].tile;
3480
 		*texture = _object_textures[tIndex].tile;
3414
 		*flags = 0;
3481
 		*flags = 0;
3454
 	switch (getEngine())
3521
 	switch (getEngine())
3455
 	{
3522
 	{
3456
 	case TR_VERSION_UNKNOWN:
3523
 	case TR_VERSION_UNKNOWN:
3524
+	default:
3457
 		break;
3525
 		break;
3458
 	case TR_VERSION_5:
3526
 	case TR_VERSION_5:
3459
 		for (i = 0, count = 0; i < mRoomsTR5[index].numLayers; ++i)
3527
 		for (i = 0, count = 0; i < mRoomsTR5[index].numLayers; ++i)
3461
 			count += mRoomsTR5[index].layers[i].numLayerTriangles;
3529
 			count += mRoomsTR5[index].layers[i].numLayerTriangles;
3462
 		}
3530
 		}
3463
 
3531
 
3464
-		// FIXME!!!
3532
+		//! \fixme !!!
3465
 		break;
3533
 		break;
3466
-	default:
3534
+    case TR_VERSION_1:
3535
+    case TR_VERSION_2:
3536
+    case TR_VERSION_3:
3537
+    case TR_VERSION_4:
3467
 		// Generate textured triangles
3538
 		// Generate textured triangles
3468
 		count = ((_rooms[index].room_data.num_triangles < 0) ? 0 :
3539
 		count = ((_rooms[index].room_data.num_triangles < 0) ? 0 :
3469
 					_rooms[index].room_data.num_triangles);
3540
 					_rooms[index].room_data.num_triangles);
3521
 	switch (getEngine())
3592
 	switch (getEngine())
3522
 	{
3593
 	{
3523
 	case TR_VERSION_UNKNOWN:
3594
 	case TR_VERSION_UNKNOWN:
3595
+	default:
3524
 		break;
3596
 		break;
3525
 	case TR_VERSION_5:
3597
 	case TR_VERSION_5:
3526
 		for (i = 0, count = 0; i < mRoomsTR5[roomIndex].numLayers; ++i)
3598
 		for (i = 0, count = 0; i < mRoomsTR5[roomIndex].numLayers; ++i)
3529
 		}
3601
 		}
3530
 
3602
 
3531
 		return count;
3603
 		return count;
3532
-		break;
3533
-	default:
3604
+    case TR_VERSION_1:
3605
+    case TR_VERSION_2:
3606
+    case TR_VERSION_3:
3607
+    case TR_VERSION_4:
3534
 		return ((_rooms[roomIndex].room_data.num_triangles < 0) ? 0 :
3608
 		return ((_rooms[roomIndex].room_data.num_triangles < 0) ? 0 :
3535
 				  _rooms[roomIndex].room_data.num_triangles);
3609
 				  _rooms[roomIndex].room_data.num_triangles);
3536
 	}
3610
 	}
3551
 	switch (getEngine())
3625
 	switch (getEngine())
3552
 	{
3626
 	{
3553
 	case TR_VERSION_5:
3627
 	case TR_VERSION_5:
3554
-		// FIXME!!!
3628
+		//! \fixme !!!
3555
 		print("getRoomVertex", "Error: No TRC implementation is the answer");
3629
 		print("getRoomVertex", "Error: No TRC implementation is the answer");
3556
 		break;
3630
 		break;
3631
+    case TR_VERSION_1:
3632
+    case TR_VERSION_2:
3633
+    case TR_VERSION_3:
3634
+    case TR_VERSION_4:
3635
+    case TR_VERSION_UNKNOWN:
3557
 	default:
3636
 	default:
3558
 		vertex = &_rooms[index].room_data.vertices[i].vertex;
3637
 		vertex = &_rooms[index].room_data.vertices[i].vertex;
3559
 
3638
 
3585
 			rgba[2] = color_value + ((float)_rooms[index].room_light_colour.b /
3664
 			rgba[2] = color_value + ((float)_rooms[index].room_light_colour.b /
3586
 											 mRoomVertexLightingFactor);
3665
 											 mRoomVertexLightingFactor);
3587
 			break;
3666
 			break;
3667
+        case TR_VERSION_2:
3668
+        case TR_VERSION_5: // Not really...
3669
+        case TR_VERSION_UNKNOWN:
3588
 		default:
3670
 		default:
3589
 			color_value = _rooms[index].room_data.vertices[i].lighting1;
3671
 			color_value = _rooms[index].room_data.vertices[i].lighting1;
3590
 			color_value = (1.1 - (color_value / 8192.0));
3672
 			color_value = (1.1 - (color_value / 8192.0));
3634
 	switch (getEngine())
3716
 	switch (getEngine())
3635
 	{
3717
 	{
3636
 	case TR_VERSION_UNKNOWN:
3718
 	case TR_VERSION_UNKNOWN:
3719
+	default:
3637
 		break;
3720
 		break;
3638
 	case TR_VERSION_5:
3721
 	case TR_VERSION_5:
3639
 		*vertexCount = count;
3722
 		*vertexCount = count;
3667
 			}
3750
 			}
3668
 		}
3751
 		}
3669
 		break;
3752
 		break;
3670
-	default:
3753
+    case TR_VERSION_1:
3754
+    case TR_VERSION_2:
3755
+    case TR_VERSION_3:
3756
+    case TR_VERSION_4:
3671
 		*vertexCount = count;
3757
 		*vertexCount = count;
3672
 		*vertices = new float[count*3];
3758
 		*vertices = new float[count*3];
3673
 		*normalCount = 0;  //! \fixme Do some TR1-TR4 levels support normals here?
3759
 		*normalCount = 0;  //! \fixme Do some TR1-TR4 levels support normals here?
3695
 				color_value = _rooms[roomIndex].room_data.vertices[i].lighting1;
3781
 				color_value = _rooms[roomIndex].room_data.vertices[i].lighting1;
3696
 				color_value /= 16384.0;
3782
 				color_value /= 16384.0;
3697
 				break;
3783
 				break;
3784
+            case TR_VERSION_2:
3785
+            case TR_VERSION_5:
3786
+            case TR_VERSION_UNKNOWN:
3698
 			default:
3787
 			default:
3699
 				color_value = _rooms[roomIndex].room_data.vertices[i].lighting1;
3788
 				color_value = _rooms[roomIndex].room_data.vertices[i].lighting1;
3700
 				color_value = (1.1 - (color_value / 8192.0));
3789
 				color_value = (1.1 - (color_value / 8192.0));
3716
 							  ((float)_rooms[roomIndex].room_light_colour.b /
3805
 							  ((float)_rooms[roomIndex].room_light_colour.b /
3717
 								mRoomVertexLightingFactor));
3806
 								mRoomVertexLightingFactor));
3718
 				break;
3807
 				break;
3808
+            case TR_VERSION_1:
3809
+            case TR_VERSION_2:
3810
+            case TR_VERSION_5:
3811
+            case TR_VERSION_UNKNOWN:
3719
 			default:
3812
 			default:
3720
 				rgba[0] = color_value;
3813
 				rgba[0] = color_value;
3721
 				rgba[1] = color_value;
3814
 				rgba[1] = color_value;
3752
 	switch (getEngine())
3845
 	switch (getEngine())
3753
 	{
3846
 	{
3754
 	case TR_VERSION_UNKNOWN:
3847
 	case TR_VERSION_UNKNOWN:
3848
+	default:
3755
 		break;
3849
 		break;
3756
 	case TR_VERSION_5:
3850
 	case TR_VERSION_5:
3757
 		for (i = 0, count = 0; i < mRoomsTR5[roomIndex].numLayers; ++i)
3851
 		for (i = 0, count = 0; i < mRoomsTR5[roomIndex].numLayers; ++i)
3760
 		}
3854
 		}
3761
 
3855
 
3762
 		return count;
3856
 		return count;
3763
-		break;
3764
-	default:
3857
+    case TR_VERSION_1:
3858
+    case TR_VERSION_2:
3859
+    case TR_VERSION_3:
3860
+    case TR_VERSION_4:
3765
 		return ((_rooms[roomIndex].room_data.num_vertices < 0) ? 0 :
3861
 		return ((_rooms[roomIndex].room_data.num_vertices < 0) ? 0 :
3766
 				  _rooms[roomIndex].room_data.num_vertices);
3862
 				  _rooms[roomIndex].room_data.num_vertices);
3767
 	}
3863
 	}
3792
 	case TR_VERSION_4:
3888
 	case TR_VERSION_4:
3793
 		id = 459;
3889
 		id = 459;
3794
 		break;
3890
 		break;
3891
+    case TR_VERSION_1:
3892
+    case TR_VERSION_5:
3893
+    case TR_VERSION_UNKNOWN:
3795
 	default:
3894
 	default:
3796
 		return -1;
3895
 		return -1;
3797
 	}
3896
 	}
3989
 	case TR_VERSION_5:
4088
 	case TR_VERSION_5:
3990
 		getRiffDataTR4(index, bytes, data);
4089
 		getRiffDataTR4(index, bytes, data);
3991
 		break;
4090
 		break;
4091
+    case TR_VERSION_UNKNOWN:
3992
 	default:
4092
 	default:
3993
 		;
4093
 		;
3994
 	}
4094
 	}
4016
 	case TR_VERSION_5:
4116
 	case TR_VERSION_5:
4017
 		count = mNumTR4Samples;
4117
 		count = mNumTR4Samples;
4018
 		break;
4118
 		break;
4119
+    case TR_VERSION_UNKNOWN:
4019
 	default:
4120
 	default:
4020
 		count = 0;
4121
 		count = 0;
4021
 	}
4122
 	}
4042
 	switch (getEngine())
4143
 	switch (getEngine())
4043
 	{
4144
 	{
4044
 	case TR_VERSION_UNKNOWN:
4145
 	case TR_VERSION_UNKNOWN:
4146
+    default:
4045
 		break;
4147
 		break;
4046
 	case TR_VERSION_5:
4148
 	case TR_VERSION_5:
4047
 		if (index < _num_rooms &&
4149
 		if (index < _num_rooms &&
4705
       print("Fread", "ERROR: Failed fread. Should Abort. @ 0x%x", offset);
4807
       print("Fread", "ERROR: Failed fread. Should Abort. @ 0x%x", offset);
4706
       reset();
4808
       reset();
4707
       exit(2);
4809
       exit(2);
4708
-      return -1;
4810
+      // return -1; // Unreachable anyways
4709
    }
4811
    }
4710
 
4812
 
4711
    return count;
4813
    return count;
4748
 										 unsigned int **offsets,
4850
 										 unsigned int **offsets,
4749
 										 unsigned int numOffsets)
4851
 										 unsigned int numOffsets)
4750
 {
4852
 {
4751
-	unsigned int i, j, riffCount, state;
4853
+	unsigned int i, j = 0, riffCount, state;
4752
 
4854
 
4753
 	*offsets = new unsigned int[numOffsets];
4855
 	*offsets = new unsigned int[numOffsets];
4754
 
4856
 
4985
 				}
5087
 				}
4986
 			}
5088
 			}
4987
 			break;
5089
 			break;
5090
+        case TR_VERSION_1:
5091
+        case TR_VERSION_2:
5092
+        case TR_VERSION_5:
5093
+        case TR_VERSION_UNKNOWN:
4988
 		default:
5094
 		default:
4989
 			;
5095
 			;
4990
 		}
5096
 		}

+ 6
- 7
test/GLString.cpp Ver arquivo

107
 void init_gl(unsigned int width, unsigned int height)
107
 void init_gl(unsigned int width, unsigned int height)
108
 {
108
 {
109
     int i;
109
     int i;
110
-	int id;
111
     const char *errorText = "TEXT->glPrintf> ERROR code %i\n";
110
     const char *errorText = "TEXT->glPrintf> ERROR code %i\n";
112
 
111
 
113
 	// Setup GL
112
 	// Setup GL
125
 	gTexture.setFlag(Texture::fUseMipmaps);
124
 	gTexture.setFlag(Texture::fUseMipmaps);
126
 	gTexture.setMaxTextureCount(32);
125
 	gTexture.setMaxTextureCount(32);
127
 
126
 
128
-    id = gTexture.loadFontTTF("data/test.ttf", 32, 126 - 32);  // ASCII
127
+    gTexture.loadFontTTF("data/test.ttf", 32, 126 - 32);  // ASCII
129
 
128
 
130
-	TEXT->Init(4, 1, &id);
131
-    i = TEXT->glPrintf((width/2)-50, height/2-32, 0, "OpenRaider");
129
+	TEXT->Init(4);
130
+    i = TEXT->glPrintf((width/2)-50, height/2-32, "OpenRaider");
132
     if (i) {
131
     if (i) {
133
         printf(errorText, i);
132
         printf(errorText, i);
134
     }
133
     }
135
-	i = TEXT->glPrintf((width/2)-50, height/2, 0, "GLString");
134
+	i = TEXT->glPrintf((width/2)-50, height/2, "GLString");
136
 	if (i) {
135
 	if (i) {
137
 	    printf(errorText, i);
136
 	    printf(errorText, i);
138
 	}
137
 	}
139
 	TEXT->Scale(1.2);
138
 	TEXT->Scale(1.2);
140
-	i = TEXT->glPrintf((width/2)-100, height/2+32, 0, "Unit Test by Mongoose");
139
+	i = TEXT->glPrintf((width/2)-100, height/2+32, "Unit Test by Mongoose");
141
 	if (i) {
140
 	if (i) {
142
         printf(errorText, i);
141
         printf(errorText, i);
143
     }
142
     }
144
-	i = TEXT->glPrintf((width/2)-100, height/2+64, 0, "ported to TTF by xythobuz");
143
+	i = TEXT->glPrintf((width/2)-100, height/2+64, "ported to TTF by xythobuz");
145
 	if (i) {
144
 	if (i) {
146
         printf(errorText, i);
145
         printf(errorText, i);
147
 	}
146
 	}

Carregando…
Cancelar
Salvar