mirror of
https://git.code.sf.net/p/quake/newtree
synced 2025-04-19 04:51:16 +00:00
#pragma pack for Borland C++
This commit is contained in:
parent
62ec1ccdc0
commit
ac50b14d36
1 changed files with 11 additions and 2 deletions
|
@ -32,7 +32,11 @@
|
|||
#include "gcc_attr.h"
|
||||
#include "qtypes.h"
|
||||
|
||||
#if _MSC_VER
|
||||
#if (__BORLANDC__ < 0x550)
|
||||
#define __attribute__(x)
|
||||
#pragma option -a1
|
||||
#else
|
||||
#if _MSC_VER || __BORLANDC__
|
||||
#define __attribute__(x)
|
||||
#pragma pack(push, tgainclude)
|
||||
#pragma pack(1)
|
||||
|
@ -41,6 +45,7 @@
|
|||
#error do some data packing magic here (#pragma pack?)
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
typedef struct _TargaHeader {
|
||||
unsigned char id_length __attribute__((packed));
|
||||
|
@ -57,9 +62,13 @@ typedef struct _TargaHeader {
|
|||
unsigned char attributes __attribute__((packed));
|
||||
} TargaHeader;
|
||||
|
||||
#if _MSC_VER
|
||||
#if (__BORLANDC__ < 0x550)
|
||||
#pragma option -a4
|
||||
#else
|
||||
#if _MSC_VER || __BORLANDC__
|
||||
#pragma pack(pop, tgainclude)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
byte *LoadTGA (QFile *fin);
|
||||
void WriteTGAfile (const char *tganame, byte *data, int width, int height);
|
||||
|
|
Loading…
Reference in a new issue