mirror of
https://github.com/jmarshall23/CnC_Remastered_Collection.git
synced 2026-08-12 16:10:54 +02:00
32 lines
834 B
C
32 lines
834 B
C
// Image.h
|
|
//
|
|
|
|
#define MAX_IMAGE_FRAMES 256
|
|
#define MAX_HOUSE_COLORS 8
|
|
struct Image_t {
|
|
Image_t();
|
|
~Image_t();
|
|
|
|
char name[512];
|
|
int64_t namehash;
|
|
unsigned int image[MAX_HOUSE_COLORS][MAX_IMAGE_FRAMES];
|
|
unsigned int numAnimFrames;
|
|
int width;
|
|
int height;
|
|
int renderwidth;
|
|
int renderheight;
|
|
void* IconMapPtr;
|
|
};
|
|
|
|
__forceinline Image_t::Image_t() {
|
|
IconMapPtr = NULL;
|
|
numAnimFrames = 0;
|
|
}
|
|
|
|
__forceinline Image_t::~Image_t() {
|
|
}
|
|
|
|
Image_t* Image_LoadImage(const char* name, bool loadAnims = false, bool loadHouseColor = false);
|
|
Image_t* Image_CreateImageFrom8Bit(const char* name, int Width, int Height, unsigned char* data, unsigned char *remap = NULL);
|
|
Image_t* Find_Image(const char* name);
|
|
void Image_Add8BitImage(Image_t* image, int HouseId, int ShapeID, int Width, int Height, unsigned char* data, unsigned char* remap); |