Commit 16a1d7dc authored by Vladimir Serbinenko's avatar Vladimir Serbinenko
Browse files

Ensure that all enums are 32-bit

This is needed to load files from disk on 3ds
parent 8c6ec56b
......@@ -144,7 +144,8 @@ typedef enum {
ca_demostart, // starting up a demo
ca_connected, // netchan_t established, waiting for svc_serverdata
ca_onserver, // processing data lists, donwloading, etc
ca_active // everything is in, so frames can be rendered
ca_active, // everything is in, so frames can be rendered
ENSURE_INT_CACTIVE = 0x70000000
} cactive_t;
typedef enum {
......@@ -152,7 +153,8 @@ typedef enum {
dl_model,
dl_sound,
dl_skin,
dl_single
dl_single,
ENSURE_INT_DLTYPE = 0x70000000
} dltype_t; // download type
//
......
......@@ -37,7 +37,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
typedef enum {
ss_dead, // no map loaded
ss_loading, // spawning level edicts
ss_active // actively running
ss_active, // actively running
ENSURE_INT_SERVER_STATE = 0x70000000
} server_state_t;
// some qc commands are only valid before the server has finished
......@@ -108,7 +109,8 @@ typedef enum {
cs_zombie, // client has been disconnected, but don't reuse
// connection for a couple seconds
cs_connected, // has been assigned to a client_t, but not in game yet
cs_spawned // client is fully in game
cs_spawned, // client is fully in game
ENSURE_INT_CLIENT_STATE = 0x70000000
} client_state_t;
typedef struct {
......@@ -429,7 +431,7 @@ void SV_SetMoveVars(void);
//
// svonly.c
//
typedef enum { RD_NONE, RD_CLIENT, RD_PACKET } redirect_t;
typedef enum { RD_NONE, RD_CLIENT, RD_PACKET, ENSURE_INT_REDIRECT = 0x70000000 } redirect_t;
void SV_BeginRedirect(redirect_t rd);
void SV_EndRedirect(void);
......
......@@ -44,7 +44,8 @@ typedef enum _bgm_player
{
BGM_NONE = -1,
BGM_MIDIDRV = 1,
BGM_STREAMER
BGM_STREAMER,
ENSURE_INT_BGMPLAYER = 0x70000000
} bgm_player_t;
typedef struct music_handler_s
......
......@@ -92,7 +92,8 @@ typedef enum {
ca_disconnected, // full screen console with no connection
ca_connected, // valid netcon, doing signons...
ca_firstupdate, // waiting for first update (final signon stage)
ca_active // signons complete, frames can be rendered
ca_active, // signons complete, frames can be rendered
ENSURE_INT_CACTIVE = 0x70000000
} cactive_t;
//
......
......@@ -92,7 +92,8 @@ typedef struct stree_root *(*cmd_arg_f)(const char *);
typedef enum {
src_client, /* came in over a net connection as a clc_stringcmd
host_client will be valid during this state. */
src_command /* from the command buffer */
src_command, /* from the command buffer */
ENSURE_INT_CMD_SOURCE = 0x70000000
} cmd_source_t;
extern cmd_source_t cmd_source;
......
......@@ -43,7 +43,8 @@ typedef struct {
typedef enum {
pt_static, pt_grav, pt_slowgrav, pt_fire, pt_explode, pt_explode2,
pt_blob, pt_blob2
pt_blob, pt_blob2,
ENSURE_INT_PTYPE = 0x70000000
} ptype_t;
// !!! if this is changed, it must be changed in d_ifacea.h too !!!
......
......@@ -272,7 +272,9 @@ typedef enum {
K_AUX30,
K_AUX31,
K_AUX32,
K_LAST
K_LAST,
ENSURE_INT_KNUM = 0x70000000
} knum_t;
typedef enum {
......@@ -280,7 +282,8 @@ typedef enum {
key_console,
key_message,
key_menu,
key_none
key_none,
ENSURE_INT_KEYDEST = 0x70000000
} keydest_t;
extern keydest_t key_dest;
......
......@@ -349,7 +349,7 @@ static INLINE sw_aliashdr_t *SW_Aliashdr(aliashdr_t *h)
// Whole model
//
typedef enum { mod_brush, mod_sprite, mod_alias } modtype_t;
typedef enum { mod_brush, mod_sprite, mod_alias, ENSURE_INT_MODTYPE = 0x70000000 } modtype_t;
#define EF_ROCKET 1 // leave a trail
#define EF_GRENADE 2 // leave a trail
......
......@@ -40,12 +40,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
// must match definition in spritegn.h
#ifndef SYNCTYPE_T
#define SYNCTYPE_T
typedef enum { ST_SYNC = 0, ST_RAND } synctype_t;
typedef enum { ST_SYNC = 0, ST_RAND, ENSURE_INT_SYNCTYPE = 0x70000000 } synctype_t;
#endif
typedef enum { ALIAS_SINGLE = 0, ALIAS_GROUP } aliasframetype_t;
typedef enum { ALIAS_SINGLE = 0, ALIAS_GROUP, ENSURE_INT_ALIASFRAMETYPE = 0x70000000 } aliasframetype_t;
typedef enum { ALIAS_SKIN_SINGLE = 0, ALIAS_SKIN_GROUP } aliasskintype_t;
typedef enum { ALIAS_SKIN_SINGLE = 0, ALIAS_SKIN_GROUP, ENSURE_INT_ALIAS_SKIN_TYPE = 0x70000000 } aliasskintype_t;
typedef struct {
int ident;
......
......@@ -44,7 +44,7 @@ typedef int etype_t;
#else
typedef enum {
ev_void, ev_string, ev_float, ev_vector, ev_entity, ev_field,
ev_function, ev_pointer
ev_function, ev_pointer, ENSURE_INT_ETYPE = 0x70000000
} etype_t;
#endif
......
......@@ -34,7 +34,7 @@ typedef unsigned char byte;
typedef enum{ false, true };
typedef int qboolean;
#else
typedef enum{ false, true } qboolean;
typedef enum{ false, true, ENSURE_INT_QBOOL = 0x70000000 } qboolean;
#endif
#ifndef offsetof
......
......@@ -38,7 +38,7 @@ static float entity_rotation[3][3];
int r_currentbkey;
typedef enum { touchessolid, drawnode, nodrawnode } solidstate_t;
typedef enum { touchessolid, drawnode, nodrawnode, ENSURE_INT_SOLID_STATE = 0x70000000 } solidstate_t;
#define MAX_BMODEL_VERTS 500 // 6K
#define MAX_BMODEL_EDGES 1000 // 12K
......
......@@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "progs.h"
#include "client.h"
typedef enum { ss_loading, ss_active } server_state_t;
typedef enum { ss_loading, ss_active, ENSURE_INT_SERVER_STATE = 0x70000000 } server_state_t;
typedef struct {
qboolean active; // false if only a net client
......
......@@ -43,7 +43,8 @@ typedef enum {
STREAM_NONE = -1,
STREAM_INIT,
STREAM_PAUSE,
STREAM_PLAY
STREAM_PLAY,
ENSURE_INT_STREAM_STATUS = 0x70000000
} stream_status_t;
typedef struct snd_codec_s snd_codec_t;
......
......@@ -67,7 +67,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
// must match definition in modelgen.h
#ifndef SYNCTYPE_T
#define SYNCTYPE_T
typedef enum { ST_SYNC = 0, ST_RAND } synctype_t;
typedef enum { ST_SYNC = 0, ST_RAND, ENSURE_INT_SYNCTYPE = 0x70000000 } synctype_t;
#endif
// TODO: shorten these?
......@@ -103,7 +103,7 @@ typedef struct {
float interval;
} dspriteinterval_t;
typedef enum { SPR_SINGLE = 0, SPR_GROUP } spriteframetype_t;
typedef enum { SPR_SINGLE = 0, SPR_GROUP, ENSURE_INT_SPRITEFRAMTYPE = 0x70000000 } spriteframetype_t;
typedef struct {
spriteframetype_t type;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment