You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
719 B

#include <string>
#include "../../../platform/tlsf.h"
struct TGAObject {
unsigned char imageTypeCode;
short int imageWidth;
short int imageHeight;
unsigned char bitCount;
unsigned char *imageData;
// we'll force RGBA for now
struct BitMapObject {
std::string filename;
size_t width, height;
unsigned char *imageData;
// fast allocation!
static void* operator new(size_t n){
void *mem = tlsf_malloc(n);
if (mem){
return mem;
throw std::bad_alloc {};
static void operator delete(void *p){
BitMapObject *LoadTGAFile(const char *filename);