Moved LoadTGA into namespace OpenArena

~g2k
This commit is contained in:
2006-06-18 14:41:27 -04:00
parent 695531ce19
commit e18fd98a46
2 changed files with 28 additions and 22 deletions

View File

@@ -10,13 +10,14 @@
#include <string> #include <string>
#include "texture.h" #include "texture.h"
struct TGAHeader namespace OpenArena{
{ struct TGAHeader
{
GLubyte Header[12]; // File Header To Determine File Type GLubyte Header[12]; // File Header To Determine File Type
}; };
struct TGA struct TGA
{ {
GLubyte header[6]; // Holds The First 6 Useful Bytes Of The File GLubyte header[6]; // Holds The First 6 Useful Bytes Of The File
GLuint bytesPerPixel; // Number Of BYTES Per Pixel (3 Or 4) GLuint bytesPerPixel; // Number Of BYTES Per Pixel (3 Or 4)
GLuint imageSize; // Amount Of Memory Needed To Hold The Image GLuint imageSize; // Amount Of Memory Needed To Hold The Image
@@ -24,13 +25,13 @@ struct TGA
GLuint Height; // Height Of Image GLuint Height; // Height Of Image
GLuint Width; // Width Of Image GLuint Width; // Width Of Image
GLuint Bpp; // Number Of BITS Per Pixel (24 Or 32) GLuint Bpp; // Number Of BITS Per Pixel (24 Or 32)
};
TextureImage* LoadTGA(const char *filename);
const GLubyte uTGAcompare[12] = {0,0,2, 0,0,0,0,0,0,0,0,0}; // Uncompressed TGA Header
const GLubyte cTGAcompare[12] = {0,0,10,0,0,0,0,0,0,0,0,0}; // Compressed TGA Header
TextureImage* LoadUncompressedTGA(FILE *); // Load an Uncompressed file
TextureImage* LoadCompressedTGA(FILE *); // Load a Compressed file
}; };
TextureImage* LoadTGA(const char *filename);
const GLubyte uTGAcompare[12] = {0,0,2, 0,0,0,0,0,0,0,0,0}; // Uncompressed TGA Header
const GLubyte cTGAcompare[12] = {0,0,10,0,0,0,0,0,0,0,0,0}; // Compressed TGA Header
TextureImage* LoadUncompressedTGA(FILE *); // Load an Uncompressed file
TextureImage* LoadCompressedTGA(FILE *); // Load a Compressed file
#endif #endif

View File

@@ -1,6 +1,10 @@
#include "../include/tga.h" #include "../include/tga.h"
#ifdef WIN32
#pragma warning(disable:4996)
#endif
namespace OpenArena{
TextureImage* LoadTGA(const char * filename) TextureImage* LoadTGA(const char * filename)
{ {
TGAHeader tgaheader; TGAHeader tgaheader;
@@ -662,3 +666,4 @@ TextureImage* LoadCompressedTGA(FILE * fTGA)
return image; return image;
} }
*/ */
};