*** empty log message ***

This commit is contained in:
2006-07-03 05:24:31 -04:00
parent f4a841f133
commit 1fe42b753d
22 changed files with 39 additions and 244 deletions

View File

@@ -15,51 +15,29 @@
#include <cstdio>
#include <string>
#include "texture.h"
#include "Image.h"
namespace OpenArena{
class TargaImage: public Image{
private:
TargaImage();
TargaImage(uint32 width, uint32 height, uint32 bpp = 24, Image::Type type = Image::Type_RGB);
static TextureImage* LoadUncompressedTGA(FILE *); // Load an Uncompressed file
static TextureImage* LoadCompressedTGA(FILE *); // Load a Compressed file
uint32 _width;
uint32 _height;
uint32 _bpp;
Image::Type _type;
uint8 * _data;
public:
struct TGAHeader
{
GLubyte Header[12]; // File Header To Determine File Type
};
struct TGA
{
GLubyte header[6]; // Holds The First 6 Useful Bytes Of The File
GLuint bytesPerPixel; // Number Of BYTES Per Pixel (3 Or 4)
GLuint imageSize; // Amount Of Memory Needed To Hold The Image
GLuint type; // The Type Of Image, GL_RGB Or GL_RGBA
GLuint Height; // Height Of Image
GLuint Width; // Width Of Image
GLuint Bpp; // Number Of BITS Per Pixel (24 Or 32)
};
virtual uint8 * GetImageData() const;
virtual uint32 GetBitsPerPixel() const;
virtual uint32 GetBytesPerPixel() const;
virtual uint32 GetWidth() const;
virtual uint32 GetHeight() const;
virtual Image::Type GetType() const;
virtual ~TargaImage(void);
static TargaImage* CreateFromFile(const char* filename);
static TextureImage* LoadTGA(const char *filename);
struct TGAHeader
{
GLubyte Header[12]; // File Header To Determine File Type
};
struct TGA
{
GLubyte header[6]; // Holds The First 6 Useful Bytes Of The File
GLuint bytesPerPixel; // Number Of BYTES Per Pixel (3 Or 4)
GLuint imageSize; // Amount Of Memory Needed To Hold The Image
GLuint type; // The Type Of Image, GL_RGB Or GL_RGBA
GLuint Height; // Height Of Image
GLuint Width; // Width Of Image
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
};
#endif