struct packing for MSVC

This commit is contained in:
Forest Hale 2000-12-11 14:59:01 +00:00
parent 954accc1c4
commit ac3c854708

View file

@ -32,9 +32,15 @@
#include "gcc_attr.h"
#include "qtypes.h"
#if _MSC_VER
#define __attribute__(x)
#pragma pack(push, tgainclude)
#pragma pack(1)
#else
#ifndef __GNUC__
#error do some data packing magic here (#pragma pack?)
#endif
#endif
typedef struct _TargaHeader {
unsigned char id_length __attribute__((packed));
@ -51,6 +57,10 @@ typedef struct _TargaHeader {
unsigned char attributes __attribute__((packed));
} TargaHeader;
#if _MSC_VER
#pragma pack(pop, tgainclude)
#endif
byte *LoadTGA (QFile *fin);
void WriteTGAfile (const char *tganame, byte *data, int width, int height);