mirror of
https://git.code.sf.net/p/quake/newtree
synced 2024-11-22 20:21:38 +00:00
struct packing for MSVC
This commit is contained in:
parent
954accc1c4
commit
ac3c854708
1 changed files with 10 additions and 0 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue