mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-18 06:51:47 +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;
|
#ifndef WORDS_BIGENDIAN
|
||||||
extern short (*BigShort) (short l);
|
#define BigShort ShortSwap
|
||||||
extern short (*LittleShort) (short l);
|
#define LittleShort ShortNoSwap
|
||||||
extern int (*BigLong) (int l);
|
#define BigLong LongSwap
|
||||||
extern int (*LittleLong) (int l);
|
#define LittleLong LongNoSwap
|
||||||
extern float (*BigFloat) (float l);
|
#define BigFloat FloatSwap
|
||||||
extern float (*LittleFloat) (float l);
|
#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 ShortSwap (short l);
|
||||||
short ShortNoSwap (short l);
|
short ShortNoSwap (short l);
|
||||||
|
|
|
@ -45,20 +45,8 @@ static __attribute__ ((unused)) const char rcsid[] =
|
||||||
|
|
||||||
#ifndef WORDS_BIGENDIAN
|
#ifndef WORDS_BIGENDIAN
|
||||||
qboolean bigendien = false;;
|
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
|
#else
|
||||||
qboolean bigendien = true;;
|
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
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue