Subversion Repositories Kolibri OS

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
298 serge 1
// Emacs style mode select   -*- C++ -*-
2
//-----------------------------------------------------------------------------
3
//
4
// $Id:$
5
//
6
// Copyright (C) 1993-1996 by id Software, Inc.
7
//
8
// This source is available for distribution and/or modification
9
// only under the terms of the DOOM Source Code License as
10
// published by id Software. All rights reserved.
11
//
12
// The source is distributed in the hope that it will be useful,
13
// but WITHOUT ANY WARRANTY; without even the implied warranty of
14
// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
15
// for more details.
16
//
17
// DESCRIPTION:
18
//	Endianess handling, swapping 16bit and 32bit.
19
//
20
//-----------------------------------------------------------------------------
21
 
22
 
23
#ifndef __M_SWAP__
24
#define __M_SWAP__
25
 
26
 
27
#ifdef __GNUG__
28
#pragma interface
29
#endif
30
 
31
 
32
// Endianess handling.
33
// WAD files are stored little endian.
34
#ifdef sparc
35
#define __BIG_ENDIAN__
36
#endif
37
#ifdef __BEOS__
38
#include 
39
#if B_HOST_IS_BENDIAN
40
#define __BIG_ENDIAN__
41
#endif
42
#endif
43
#ifdef __BIG_ENDIAN__
44
#define SHORT(x)	((short)SwapSHORT((unsigned short) (x)))
45
#define LONG(x)         ((long)SwapLONG((unsigned long) (x)))
46
#else
47
#define SHORT(x)	(x)
48
#define LONG(x)         (x)
49
#endif
50
 
51
 
52
 
53
 
54
#endif
55
//-----------------------------------------------------------------------------
56
//
57
// $Log:$
58
//
59
//-----------------------------------------------------------------------------