summaryrefslogtreecommitdiff
path: root/apps/plugins/sdl/progs/quake/common.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/sdl/progs/quake/common.h')
-rw-r--r--apps/plugins/sdl/progs/quake/common.h29
1 files changed, 23 insertions, 6 deletions
diff --git a/apps/plugins/sdl/progs/quake/common.h b/apps/plugins/sdl/progs/quake/common.h
index a1ac227aff..8c6ab3a2dc 100644
--- a/apps/plugins/sdl/progs/quake/common.h
+++ b/apps/plugins/sdl/progs/quake/common.h
@@ -88,12 +88,29 @@ void InsertLinkAfter (link_t *l, link_t *after);
88 88
89extern qboolean bigendien; 89extern qboolean bigendien;
90 90
91extern short (*BigShort) (short l); 91// not safe on unaligned data
92extern short (*LittleShort) (short l); 92extern short (*BigShort) (short l);
93extern int (*BigLong) (int l); 93extern short (*LittleShort) (short l);
94extern int (*LittleLong) (int l); 94extern int (*BigLong) (int l);
95extern float (*BigFloat) (float l); 95extern int (*LittleLong) (int l);
96extern float (*LittleFloat) (float l); 96extern float (*BigFloat) (float l);
97extern float (*LittleFloat) (float l);
98
99#define LittleShortUnaligned(x) ReadLittleShort(((char*)(&(x))))
100#define BigShortUnaligned(x) ReadBigShort(((char*)&(x)))
101#define LittleLongUnaligned(x) ReadLittleLong(((char*)&(x)))
102#define BigLongUnaligned(x) ReadBigLong(((char*)&(x)))
103#define LittleFloatUnaligned(x) ReadLittleFloat(((char*)&(x)))
104#define BigFloatUnaligned(x) ReadBigFloat(((char*)&(x))
105
106
107// for unaligned
108short ReadBigShort (char *l);
109short ReadLittleShort (char *l);
110int ReadBigLong (char *l);
111int ReadLittleLong (char *l);
112float ReadBigFloat (char *l);
113float ReadLittleFloat (char *l);
97 114
98//============================================================================ 115//============================================================================
99 116