mirror of
https://git.code.sf.net/p/quake/newtree
synced 2024-11-10 06:42:26 +00:00
true64 attempt two
This commit is contained in:
parent
cf16e6c5d7
commit
5a889df497
1 changed files with 16 additions and 17 deletions
|
@ -34,8 +34,9 @@
|
|||
|
||||
#ifndef __GNUC__
|
||||
# if defined (__DECC) && defined (__ALPHA)
|
||||
# pragma nomember_alignment
|
||||
// uses __unaligned
|
||||
# else
|
||||
# define __unaligned
|
||||
# if defined (__BORLANDC__) || defined (_MSC_VER)
|
||||
# if (defined(__BORLANDC__) && (__BORLANDC__ < 0x550))
|
||||
# pragma option -a1
|
||||
|
@ -47,21 +48,23 @@
|
|||
# error do some data packing magic here (#pragma pack?)
|
||||
# endif
|
||||
# endif
|
||||
#else
|
||||
# define __unaligned
|
||||
#endif
|
||||
|
||||
typedef struct _TargaHeader {
|
||||
unsigned char id_length __attribute__((packed));
|
||||
unsigned char colormap_type __attribute__((packed));
|
||||
unsigned char image_type __attribute__((packed));
|
||||
unsigned short colormap_index __attribute__((packed));
|
||||
unsigned short colormap_length __attribute__((packed));
|
||||
unsigned char colormap_size __attribute__((packed));
|
||||
unsigned short x_origin __attribute__((packed));
|
||||
unsigned short y_origin __attribute__((packed));
|
||||
unsigned short width __attribute__((packed));
|
||||
unsigned short height __attribute__((packed));
|
||||
unsigned char pixel_size __attribute__((packed));
|
||||
unsigned char attributes __attribute__((packed));
|
||||
__unaligned unsigned char id_length __attribute__((packed));
|
||||
__unaligned unsigned char colormap_type __attribute__((packed));
|
||||
__unaligned unsigned char image_type __attribute__((packed));
|
||||
__unaligned unsigned short colormap_index __attribute__((packed));
|
||||
__unaligned unsigned short colormap_length __attribute__((packed));
|
||||
__unaligned unsigned char colormap_size __attribute__((packed));
|
||||
__unaligned unsigned short x_origin __attribute__((packed));
|
||||
__unaligned unsigned short y_origin __attribute__((packed));
|
||||
__unaligned unsigned short width __attribute__((packed));
|
||||
__unaligned unsigned short height __attribute__((packed));
|
||||
__unaligned unsigned char pixel_size __attribute__((packed));
|
||||
__unaligned unsigned char attributes __attribute__((packed));
|
||||
} TargaHeader;
|
||||
|
||||
#if defined (__BORLANDC__) || defined (_MSC_VER)
|
||||
|
@ -70,10 +73,6 @@ typedef struct _TargaHeader {
|
|||
# else
|
||||
# pragma pack(pop, tgainclude)
|
||||
# endif
|
||||
#else
|
||||
# if defined (__DECC) && defined (__ALPHA)
|
||||
# pragma member_alignment
|
||||
# endif
|
||||
#endif
|
||||
|
||||
byte *LoadTGA (QFile *fin);
|
||||
|
|
Loading…
Reference in a new issue