mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-17 22:50:51 +00:00
make LittleLong and co defines rather than function pointers
This commit is contained in:
parent
599ae15490
commit
c026e61d22
2 changed files with 15 additions and 19 deletions
|
@ -53,13 +53,21 @@
|
|||
|
||||
//============================================================================
|
||||
|
||||
extern qboolean bigendien;
|
||||
extern short (*BigShort) (short l);
|
||||
extern short (*LittleShort) (short l);
|
||||
extern int (*BigLong) (int l);
|
||||
extern int (*LittleLong) (int l);
|
||||
extern float (*BigFloat) (float l);
|
||||
extern float (*LittleFloat) (float l);
|
||||
#ifndef WORDS_BIGENDIAN
|
||||
#define BigShort ShortSwap
|
||||
#define LittleShort ShortNoSwap
|
||||
#define BigLong LongSwap
|
||||
#define LittleLong LongNoSwap
|
||||
#define BigFloat FloatSwap
|
||||
#define LittleFloat FloatNoSwap
|
||||
#else
|
||||
#define BigShort ShortNoSwap
|
||||
#define LittleShort ShortSwap
|
||||
#define BigLong LongNoSwap
|
||||
#define LittleLong LongSwap
|
||||
#define BigFloat FloatNoSwap
|
||||
#define LittleFloat FloatSwap
|
||||
#endif
|
||||
|
||||
short ShortSwap (short l);
|
||||
short ShortNoSwap (short l);
|
||||
|
|
|
@ -45,20 +45,8 @@ static __attribute__ ((unused)) const char rcsid[] =
|
|||
|
||||
#ifndef WORDS_BIGENDIAN
|
||||
qboolean bigendien = false;;
|
||||
short (*BigShort) (short l) = ShortSwap;
|
||||
short (*LittleShort) (short l) = ShortNoSwap;
|
||||
int (*BigLong) (int l) = LongSwap;
|
||||
int (*LittleLong) (int l) = LongNoSwap;
|
||||
float (*BigFloat) (float l) = FloatSwap;
|
||||
float (*LittleFloat) (float l) = FloatNoSwap;
|
||||
#else
|
||||
qboolean bigendien = true;;
|
||||
short (*BigShort) (short l) = ShortNoSwap;
|
||||
short (*LittleShort) (short l) = ShortSwap;
|
||||
int (*BigLong) (int l) = LongNoSwap;
|
||||
int (*LittleLong) (int l) = LongSwap;
|
||||
float (*BigFloat) (float l) = FloatNoSwap;
|
||||
float (*LittleFloat) (float l) = FloatSwap;
|
||||
#endif
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue