mirror of
https://github.com/ValveSoftware/source-sdk-2013.git
synced 2024-11-24 21:01:59 +00:00
Fix bsp lump names being declared non-portably.
gcc issues warnings when encountering multicharacter constants, so we'll simply emulate them in a manner works portably. The code assumes we are using a little-endian machine - the real solution would be using using four chars instead of an enum.
This commit is contained in:
parent
63325a7174
commit
82fe37f0e6
2 changed files with 12 additions and 8 deletions
|
@ -21,12 +21,14 @@
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// This enumerations defines all the four-CC codes for the client lump names
|
// This enumerations defines all the four-CC codes for the client lump names
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
// TODO: We may have some endian considerations here!
|
||||||
|
#define GAMELUMP_MAKE_CODE(a, b, c, d) ((a) << 24 | (b) << 16 | (c) << 8 | (d) << 0)
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
GAMELUMP_DETAIL_PROPS = 'dprp',
|
GAMELUMP_DETAIL_PROPS = GAMELUMP_MAKE_CODE('d', 'p', 'r', 'p'),
|
||||||
GAMELUMP_DETAIL_PROP_LIGHTING = 'dplt',
|
GAMELUMP_DETAIL_PROP_LIGHTING = GAMELUMP_MAKE_CODE('d', 'p', 'l', 't'),
|
||||||
GAMELUMP_STATIC_PROPS = 'sprp',
|
GAMELUMP_STATIC_PROPS = GAMELUMP_MAKE_CODE('s', 'p', 'r', 'p'),
|
||||||
GAMELUMP_DETAIL_PROP_LIGHTING_HDR = 'dplh',
|
GAMELUMP_DETAIL_PROP_LIGHTING_HDR = GAMELUMP_MAKE_CODE('d', 'p', 'l', 'h'),
|
||||||
};
|
};
|
||||||
|
|
||||||
// Versions...
|
// Versions...
|
||||||
|
|
|
@ -21,12 +21,14 @@
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// This enumerations defines all the four-CC codes for the client lump names
|
// This enumerations defines all the four-CC codes for the client lump names
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
// TODO: We may have some endian considerations here!
|
||||||
|
#define GAMELUMP_MAKE_CODE(a, b, c, d) ((a) << 24 | (b) << 16 | (c) << 8 | (d) << 0)
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
GAMELUMP_DETAIL_PROPS = 'dprp',
|
GAMELUMP_DETAIL_PROPS = GAMELUMP_MAKE_CODE('d', 'p', 'r', 'p'),
|
||||||
GAMELUMP_DETAIL_PROP_LIGHTING = 'dplt',
|
GAMELUMP_DETAIL_PROP_LIGHTING = GAMELUMP_MAKE_CODE('d', 'p', 'l', 't'),
|
||||||
GAMELUMP_STATIC_PROPS = 'sprp',
|
GAMELUMP_STATIC_PROPS = GAMELUMP_MAKE_CODE('s', 'p', 'r', 'p'),
|
||||||
GAMELUMP_DETAIL_PROP_LIGHTING_HDR = 'dplh',
|
GAMELUMP_DETAIL_PROP_LIGHTING_HDR = GAMELUMP_MAKE_CODE('d', 'p', 'l', 'h'),
|
||||||
};
|
};
|
||||||
|
|
||||||
// Versions...
|
// Versions...
|
||||||
|
|
Loading…
Reference in a new issue