Nuke qboolean from orbit

I never liked it, but with C2x coming out, it's best to handle bools
properly. I haven't gone through all the uses of int as bool (I'll leave
that for fixing when I encounter them), but this gets QF working with
both c2x (really, gnu2x because of raw strings).
This commit is contained in:
Bill Currie 2023-06-13 18:06:11 +09:00
parent 9871b44d68
commit dbd3d6502a
273 changed files with 894 additions and 897 deletions

View file

@ -69,7 +69,7 @@ static plugin_list_t server_plugin_list[] = {
SERVER_PLUGIN_LIST
};
qboolean is_server = true;
bool is_server = true;
static cbuf_t *mst_cbuf;

View file

@ -326,7 +326,7 @@ typedef void *(GLAPIENTRY *QF_glXGetProcAddressARB) (const GLubyte *procName);
typedef const GLubyte *(GLAPIENTRY *QF_wglGetExtensionsStringEXT) (void);
/* QuakeForge extension functions */
qboolean QFGL_ExtensionPresent (const char *);
bool QFGL_ExtensionPresent (const char *);
void *QFGL_ExtensionAddress (const char *);
#endif // __qfgl_ext_h_

View file

@ -42,6 +42,6 @@
#undef QFGL_NEED
#undef QFGL_WANT
qboolean GLF_FindFunctions (void);
bool GLF_FindFunctions (void);
#endif // __QF_GL_funcs_h_

View file

@ -49,7 +49,7 @@ void gl_Draw_Line (int x0, int y0, int x1, int y1, int c);
void gl_Draw_TextBox (int x, int y, int width, int lines, byte alpha);
void gl_Draw_FadeScreen (void);
void gl_Draw_BlendScreen (quat_t color);
struct qpic_s *gl_Draw_CachePic (const char *path, qboolean alpha);
struct qpic_s *gl_Draw_CachePic (const char *path, bool alpha);
void gl_Draw_UncachePic (const char *path);
struct qpic_s *gl_Draw_MakePic (int width, int height, const byte *data);
void gl_Draw_DestroyPic (struct qpic_s *pic);

View file

@ -43,7 +43,7 @@ extern int lm_src_blend, lm_dest_blend;
extern model_t *gl_currentmodel;
extern GLuint gl_lightmap_textures[MAX_LIGHTMAPS];
extern qboolean gl_lightmap_modified[MAX_LIGHTMAPS];
extern bool gl_lightmap_modified[MAX_LIGHTMAPS];
extern instsurf_t *gl_lightmap_polys;
extern glRect_t gl_lightmap_rectchange[MAX_LIGHTMAPS];

View file

@ -34,7 +34,7 @@
#define SKY_TEX 2000 // Quake 2 environment sky
extern qboolean gl_skyloaded;
extern bool gl_skyloaded;
extern vec5_t gl_skyvec[6][4];
extern GLuint gl_solidskytexture;
extern GLuint gl_alphaskytexture;

View file

@ -38,14 +38,14 @@ extern int gl_solid_format;
extern int gl_lightmap_format;
extern int gl_filter_min;
extern int gl_filter_max;
extern qboolean gl_Anisotropy;
extern bool gl_Anisotropy;
extern float gl_aniso;
extern GLuint gl_part_tex;
struct tex_s;
void GL_Upload8 (const byte *data, int width, int height, qboolean mipmap, qboolean alpha);
void GL_Upload8_EXT (const byte *data, int width, int height, qboolean mipmap, qboolean alpha);
int GL_LoadTexture (const char *identifier, int width, int height, const byte *data, qboolean mipmap, qboolean alpha, int bytesperpixel);
void GL_Upload8 (const byte *data, int width, int height, bool mipmap, bool alpha);
void GL_Upload8_EXT (const byte *data, int width, int height, bool mipmap, bool alpha);
int GL_LoadTexture (const char *identifier, int width, int height, const byte *data, bool mipmap, bool alpha, int bytesperpixel);
int GL_LoadTex (const char *identifier, int mips, struct tex_s *tex);
int GL_FindTexture (const char *identifier);

View file

@ -39,13 +39,13 @@ extern QF_glActiveTexture qglActiveTexture;
extern QF_glMultiTexCoord2f qglMultiTexCoord2f;
extern QF_glMultiTexCoord2fv qglMultiTexCoord2fv;
extern int gl_mtex_active_tmus;
extern qboolean gl_mtex_capable;
extern qboolean gl_mtex_fullbright;
extern bool gl_mtex_capable;
extern bool gl_mtex_fullbright;
extern GLenum gl_mtex_enum;
extern qboolean gl_combine_capable;
extern bool gl_combine_capable;
extern float gl_rgb_scale;
extern qboolean gl_feature_mach64;
extern bool gl_feature_mach64;
extern float gldepthmin, gldepthmax;
extern int gl_use_bgra;
extern int gl_tess;

View file

@ -43,7 +43,7 @@
#undef QFGL_NEED
#undef QFGL_WANT
qboolean EGLF_FindFunctions (void);
void *QFEGL_ProcAddress (void *handle, const char *name, qboolean);
bool EGLF_FindFunctions (void);
void *QFEGL_ProcAddress (void *handle, const char *name, bool);
#endif // __QF_GLSL_funcs_h_

View file

@ -50,7 +50,7 @@ void glsl_LineGraph (int x, int y, int *h_vals, int count, int height);
void glsl_Draw_TextBox (int x, int y, int width, int lines, byte alpha);
void glsl_Draw_FadeScreen (void);
void glsl_Draw_BlendScreen (quat_t color);
struct qpic_s *glsl_Draw_CachePic (const char *path, qboolean alpha);
struct qpic_s *glsl_Draw_CachePic (const char *path, bool alpha);
void glsl_Draw_UncachePic (const char *path);
struct qpic_s *glsl_Draw_MakePic (int width, int height, const byte *data);
void glsl_Draw_DestroyPic (struct qpic_s *pic);

View file

@ -38,7 +38,7 @@ typedef struct shader_s {
typedef struct shaderparam_s {
const char *name;
qboolean uniform;
bool uniform;
int location;
} shaderparam_t;

View file

@ -66,7 +66,7 @@ void Vulkan_Draw_TextBox (int x, int y, int width, int lines, byte alpha,
struct vulkan_ctx_s *ctx);
void Vulkan_Draw_FadeScreen (struct vulkan_ctx_s *ctx);
void Vulkan_Draw_BlendScreen (quat_t color, struct vulkan_ctx_s *ctx);
struct qpic_s *Vulkan_Draw_CachePic (const char *path, qboolean alpha,
struct qpic_s *Vulkan_Draw_CachePic (const char *path, bool alpha,
struct vulkan_ctx_s *ctx);
void Vulkan_Draw_UncachePic (const char *path, struct vulkan_ctx_s *ctx);
struct qpic_s *Vulkan_Draw_MakePic (int width, int height, const byte *data,

View file

@ -65,7 +65,7 @@ typedef struct cbuf_s {
} state;
int (*unknown_command)(void); // handle unkown commands. !0 = handled
qboolean strict; // Should we tolerate unknown commands?
bool strict; // Should we tolerate unknown commands?
double resumetime; // Time when stack can be executed again
void *data; // Pointer to interpreter data

View file

@ -31,7 +31,7 @@
#include "QF/qtypes.h"
int CDAudio_Init(void);
void CDAudio_Play(int track, qboolean looping);
void CDAudio_Play(int track, bool looping);
void CDAudio_Stop(void);
void CDAudio_Pause(void);
void CDAudio_Resume(void);

View file

@ -44,7 +44,7 @@ classDecl (ArrayListIterator, Iterator,
ArrayList *list;
unsigned int pos;
unsigned int smods;
qboolean alive;
bool alive;
ObjRefs_t allrefs;
);
#define ARRAYLISTITERATOR(o) ((ArrayListIterator *)(o))

View file

@ -38,9 +38,9 @@
classDecl (Collection, Object,
unsigned int count;
Class *type;
qboolean methodDecl (Collection, add, Object *o);
bool methodDecl (Collection, add, Object *o);
Object * methodDecl (Collection, remove, Object *o);
qboolean methodDecl (Collection, contains, Object *o);
bool methodDecl (Collection, contains, Object *o);
Iterator * methodDecl (Collection, iterator);
);
#define COLLECTION(o) ((Collection *)(o))

View file

@ -35,7 +35,7 @@
classDecl (Iterator, Object,
Object * methodDecl (Iterator, next);
qboolean methodDecl (Iterator, hasNext);
bool methodDecl (Iterator, hasNext);
);
#define ITERATOR(o) ((Iterator *)(o))

View file

@ -35,9 +35,9 @@
classDecl (List, Collection,
unsigned int smods;
qboolean methodDecl (List, set, unsigned int index, Object *o);
bool methodDecl (List, set, unsigned int index, Object *o);
Object * methodDecl (List, get, unsigned int index);
qboolean methodDecl (List, insertAt, unsigned int index, Object *o);
bool methodDecl (List, insertAt, unsigned int index, Object *o);
Object * methodDecl (List, removeAt, unsigned int index);
);
#define LIST(o) ((List *)(o))

View file

@ -65,7 +65,7 @@ int Cmd_AddDataCommand (const char *cmd_name, xdatacmd_t function,
void *data, const char *description);
int Cmd_RemoveCommand (const char *cmd_name);
qboolean Cmd_Exists (const char *cmd_name);
bool Cmd_Exists (const char *cmd_name);
const char *Cmd_CompleteCommand (const char *partial) __attribute__((pure));
int Cmd_CompleteCountPossible (const char *partial) __attribute__((pure));
const char **Cmd_CompleteBuildList (const char *partial);

View file

@ -62,7 +62,7 @@ extern struct plugin_s *con_module;
extern struct console_data_s con_data;
//extern int con_totallines;
//extern qboolean con_initialized;
//extern bool con_initialized;
//extern byte *con_chars;
void Con_DrawConsole (void);

View file

@ -110,7 +110,7 @@ const char *Cvar_VarString (const cvar_t *var);
// called by Cmd_ExecuteString when Cmd_Argv(0) doesn't match a known
// command. Returns true if the command was a variable reference that
// was handled. (print or change)
qboolean Cvar_Command (void);
bool Cvar_Command (void);
// Writes lines containing "set variable value" for all variables
// with the archive flag set to true.

View file

@ -206,7 +206,7 @@ void Draw_BlendScreen (quat_t color);
\return pointer qpic data.
\note Up to MAX_CACHED_PICS qpics can be loaded at a time this way
*/
qpic_t *Draw_CachePic (const char *path, qboolean alpha);
qpic_t *Draw_CachePic (const char *path, bool alpha);
/** Remove a qpic from the qpic cache.

View file

@ -108,7 +108,7 @@ typedef struct gib_classdesc_s {
(obj), (mesg)))
void GIB_Class_Create (gib_classdesc_t *desc);
gib_object_t *GIB_Object_Create (const char *classname, qboolean classobj);
gib_object_t *GIB_Object_Create (const char *classname, bool classobj);
void GIB_Object_Destroy (gib_object_t *obj);
void GIB_Object_Incref (gib_object_t *obj);
void GIB_Object_Decref (gib_object_t *obj);
@ -142,7 +142,7 @@ typedef struct gib_buffer_data_s {
struct gib_script_s *script;
struct gib_tree_s *program, *ip;
struct dstring_s *arg_composite;
qboolean waitret;
bool waitret;
struct gib_sstack_s {
struct gib_dsarray_s {
struct dstring_s **dstrs;
@ -179,7 +179,7 @@ struct dstring_s *GIB_Return (const char *str);
void GIB_Error (const char *type, const char *fmt, ...) __attribute__((format(PRINTF, 2, 3)));
void GIB_Builtin_Add (const char *name, void (*func) (void));
void GIB_Builtin_Remove (const char *name);
qboolean GIB_Builtin_Exists (const char *name);
bool GIB_Builtin_Exists (const char *name);
// Event interface
@ -202,7 +202,7 @@ unsigned int GIB_Thread_Count (void) __attribute__((pure));
// Init interface
void GIB_Init (qboolean sandbox);
void GIB_Init (bool sandbox);
// Handle interface

View file

@ -47,7 +47,7 @@ typedef struct info_key_s {
const char *value;
} info_key_t;
qboolean Info_FilterForKey (const char *key, const char **filter_list) __attribute__((pure));
bool Info_FilterForKey (const char *key, const char **filter_list) __attribute__((pure));
void Info_Print (info_t *info);
int Info_CurrentSize (info_t *info) __attribute__((pure));

View file

@ -127,8 +127,8 @@ int IMT_CreateSwitcher (const char *switcher_name,
void IMT_BindAxis (imt_t *imt, int axis_num, in_axis_t *axis,
const in_recipe_t *recipe);
void IMT_BindButton (imt_t *imt, int button, const char *binding);
qboolean IMT_ProcessAxis (int axis, int value);
qboolean IMT_ProcessButton (int button, int state);
bool IMT_ProcessAxis (int axis, int value);
bool IMT_ProcessButton (int button, int state);
void IMT_Init (void);
void IMT_Shutdown (void);
struct plitem_s;

View file

@ -72,8 +72,8 @@ struct joy_axis {
struct joy_axis_button *axis_buttons; // if axis button
};
extern qboolean joy_found; // Joystick present?
extern qboolean joy_active; // Joystick in use?
extern bool joy_found; // Joystick present?
extern bool joy_active; // Joystick in use?
struct joy_button {
int old;

View file

@ -50,12 +50,12 @@ typedef struct llist_s {
/// \param element The item being deleted.
/// \param userdata Pointer to user data supplied to llist_new().
void (*freedata)(void *element, void *userdata);
qboolean (*cmpdata)(const void *element, const void *comparison,
bool (*cmpdata)(const void *element, const void *comparison,
void *userdata);
void *userdata;
} llist_t;
typedef qboolean (*llist_iterator_t)(void *element, llist_node_t *node);
typedef bool (*llist_iterator_t)(void *element, llist_node_t *node);
#define LLIST_ICAST(x) (llist_iterator_t)(x)
#define LLIST_DATA(node, type) ((type *)((node)->data))
@ -73,7 +73,7 @@ typedef qboolean (*llist_iterator_t)(void *element, llist_node_t *node);
passed to the other functions accessing the list.
*/
llist_t *llist_new (void (*freedata)(void *element, void *userdata),
qboolean (*cmpdata)(const void *element,
bool (*cmpdata)(const void *element,
const void *comparison,
void *userdata),
void *userdata);

View file

@ -173,15 +173,15 @@ void RotatePointAroundVector (vec3_t dst, const vec3_t axis,
VectorNegate ((sp)->normal, (dp)->normal); \
} while (0)
GNU89INLINE inline qboolean R_CullBox (const plane_t *frustum, const vec3_t mins, const vec3_t maxs) __attribute__((pure));
GNU89INLINE inline qboolean R_CullSphere (const plane_t *frustum, const vec3_t origin, const float radius);
GNU89INLINE inline bool R_CullBox (const plane_t *frustum, const vec3_t mins, const vec3_t maxs) __attribute__((pure));
GNU89INLINE inline bool R_CullSphere (const plane_t *frustum, const vec3_t origin, const float radius);
#ifndef IMPLEMENT_R_Cull
GNU89INLINE inline
#else
VISIBLE
#endif
qboolean
bool
R_CullBox (const plane_t *frustum, const vec3_t mins, const vec3_t maxs)
{
int i;
@ -200,7 +200,7 @@ GNU89INLINE inline
#else
VISIBLE
#endif
qboolean
bool
R_CullSphere (const plane_t *frustum, const vec3_t origin, const float radius)
{
int i;

View file

@ -161,7 +161,7 @@ typedef struct msurface_s {
byte styles[MAXLIGHTMAPS];
int cached_light[MAXLIGHTMAPS]; // values currently used in lightmap
qboolean cached_dlight; // true if dynamic light in cache
bool cached_dlight; // true if dynamic light in cache
int model_index; ///< < 0: instance, 0 main, > 0: sub
} msurface_t;
@ -387,9 +387,9 @@ typedef struct model_s {
char path[MAX_QPATH];
char name[MAX_QPATH];
const struct vpath_s *vpath;// virtual path where this model was found
qboolean needload; // bmodels and sprites don't cache normally
bool needload; // bmodels and sprites don't cache normally
aliashdr_t *aliashdr; // if not null, alias model is not cached
qboolean hasfullbrights;
bool hasfullbrights;
modtype_t type;
int numframes;
@ -408,7 +408,7 @@ typedef struct model_s {
vec3_t mins, maxs;
// solid volume for clipping
qboolean clipbox;
bool clipbox;
vec3_t clipmins, clipmaxs;
// brush model
@ -428,7 +428,7 @@ typedef struct model_s {
void Mod_Init (void);
void Mod_Init_Cvars (void);
void Mod_ClearAll (void);
model_t *Mod_ForName (const char *name, qboolean crash);
model_t *Mod_ForName (const char *name, bool crash);
void Mod_TouchModel (const char *name);
void Mod_UnloadModel (model_t *model);
// brush specific

View file

@ -59,7 +59,7 @@ void MSG_PokeLongBE (sizebuf_t *sb, unsigned offset, int c);
typedef struct msg_s {
unsigned readcount;
qboolean badread; // set if a read goes beyond end of message
bool badread; // set if a read goes beyond end of message
sizebuf_t *message;
size_t badread_string_size;
char *badread_string;

View file

@ -81,7 +81,7 @@ typedef struct Object_s {
struct Object_s *next;
struct String_s * methodDecl(Object, toString);
ObjRefs_t * methodDecl(Object, allRefs);
qboolean methodDecl(Object, finalize);
bool methodDecl(Object, finalize);
void *data;
} Object;
@ -103,11 +103,11 @@ classDecl (Class, Object,
);
#define CLASS(o) ((Class *)(o))
Object *Object_Create (Class *cl, qboolean perm);
Object *Object_Create (Class *cl, bool perm);
void Object_Delete (Object *obj);
Object *Object_Retain (Object *obj);
Object *Object_Release (Object *obj);
qboolean Object_InstanceOf (Object *obj, Class *cl);
bool Object_InstanceOf (Object *obj, Class *cl);
void Object_AddToRoot (Object *obj);
void Object_RemoveFromRoot (Object *obj);
void Object_Init (void);

View file

@ -63,7 +63,7 @@ typedef struct
\warning Uses Hunk_TempAlloc() to allocate the output PCX content.
*/
pcx_t *EncodePCX (const byte *data, int width, int height, int rowbytes,
const byte *palette, qboolean flip, int *length);
const byte *palette, bool flip, int *length);
/**
Load a texture from a PCX file.
@ -76,6 +76,6 @@ pcx_t *EncodePCX (const byte *data, int width, int height, int rowbytes,
\return A pointer to the texture.
\warning Uses Hunk_TempAlloc() to allocate the texture.
*/
struct tex_s *LoadPCX (QFile *f, qboolean convert, const byte *pal, int load);
struct tex_s *LoadPCX (QFile *f, bool convert, const byte *pal, int load);
#endif//__QF_pcx_h

View file

@ -292,7 +292,7 @@ int PL_D_NumKeys (const plitem_t *dict) __attribute__((pure));
\note the dictionary becomes the owner of the value.
*/
qboolean PL_D_AddObject (plitem_t *dict, const char *key, plitem_t *value);
bool PL_D_AddObject (plitem_t *dict, const char *key, plitem_t *value);
/** Copy contents of one dictionary into another.
@ -306,7 +306,7 @@ qboolean PL_D_AddObject (plitem_t *dict, const char *key, plitem_t *value);
\return true if values were copied, false if nothing was copied (either
dictionary is null, or not a dictionary, or if \a srcDict was empty)
*/
qboolean PL_D_Extend (plitem_t *dstDict, plitem_t *srcDict);
bool PL_D_Extend (plitem_t *dstDict, plitem_t *srcDict);
/** Add an item to an array.
@ -318,7 +318,7 @@ qboolean PL_D_Extend (plitem_t *dstDict, plitem_t *srcDict);
\note the array becomes the owner of the added item.
*/
qboolean PL_A_AddObject (plitem_t *array, plitem_t *item);
bool PL_A_AddObject (plitem_t *array, plitem_t *item);
/** Append contents of one array to another.
@ -330,7 +330,7 @@ qboolean PL_A_AddObject (plitem_t *array, plitem_t *item);
\return true if values were copied, false if nothing was copied (either
array is null, or not an array, or if \a srcArray was empty)
*/
qboolean PL_A_Extend (plitem_t *dstArray, plitem_t *srcArray);
bool PL_A_Extend (plitem_t *dstArray, plitem_t *srcArray);
/** Retrieve the number of items in an array.
@ -352,7 +352,7 @@ int PL_A_NumObjects (const plitem_t *array) __attribute__((pure));
\note the array becomes the owner of the added item.
*/
qboolean PL_A_InsertObjectAtIndex (plitem_t *array, plitem_t *item, int index);
bool PL_A_InsertObjectAtIndex (plitem_t *array, plitem_t *item, int index);
/** Remove a value from an array object.
The array items will be shifted to fill the resulting hole.

View file

@ -104,7 +104,7 @@ extern char *fs_pluginpath;
Function prototypes
*/
plugin_t *PI_LoadPlugin (const char *, const char *);
qboolean PI_UnloadPlugin (plugin_t *);
bool PI_UnloadPlugin (plugin_t *);
void PI_RegisterPlugins (plugin_list_t *);
void PI_Init (void);

View file

@ -34,7 +34,7 @@ typedef struct cd_funcs_s {
void (*init) (void);
void (*cd_f) (void); //
void (*pause) (void);
void (*play) (int, qboolean);
void (*play) (int, bool);
void (*resume) (void);
void (*update) (void);
} cd_funcs_t;

View file

@ -104,7 +104,7 @@ typedef struct vid_render_funcs_s {
void (*Draw_TextBox) (int x, int y, int width, int lines, byte alpha);
void (*Draw_FadeScreen) (void);
void (*Draw_BlendScreen) (quat_t color);
qpic_t *(*Draw_CachePic) (const char *path, qboolean alpha);
qpic_t *(*Draw_CachePic) (const char *path, bool alpha);
void (*Draw_UncachePic) (const char *path);
qpic_t *(*Draw_MakePic) (int width, int height, const byte *data);
void (*Draw_DestroyPic) (qpic_t *pic);
@ -155,9 +155,9 @@ typedef struct vid_render_data_s {
int *scr_viewsize;
int *graphheight;
float min_wateralpha;
qboolean force_fullscreen;
qboolean inhibit_viewmodel;
qboolean paused;
bool force_fullscreen;
bool inhibit_viewmodel;
bool paused;
int lineadj;
entity_t view_model; //FIXME still?!?
double frametime;

View file

@ -321,7 +321,7 @@ void PR_BoundsCheck (progs_t *pr, int addr, etype_t type);
///@{
struct edict_s {
qboolean free;
bool free;
progs_t *pr; ///< progs owning this edict
pr_uint_t entnum; ///< number of this entity
pr_uint_t edict; ///< offset of this entity in pr_edict_area
@ -336,7 +336,7 @@ void ED_Free (progs_t *pr, edict_t *ed);
edict_t *ED_EdictNum(progs_t *pr, pr_uint_t n) __attribute__((pure));
pr_uint_t ED_NumForEdict(progs_t *pr, edict_t *e) __attribute__((pure));
void ED_Count (progs_t *pr);
qboolean PR_EdictValid (progs_t *pr, pr_uint_t e) __attribute__((pure));
bool PR_EdictValid (progs_t *pr, pr_uint_t e) __attribute__((pure));
// pr_debug.c
void ED_Print (progs_t *pr, edict_t *ed, const char *fieldname);
@ -347,7 +347,7 @@ void ED_PrintNum (progs_t *pr, pr_int_t ent, const char *fieldname);
struct script_s;
struct plitem_s;
struct hashctx_s;
qboolean ED_ParseEpair (progs_t *pr, pr_type_t *base, pr_def_t *key,
bool ED_ParseEpair (progs_t *pr, pr_type_t *base, pr_def_t *key,
const char *s);
struct plitem_s *ED_EntityDict (progs_t *pr, edict_t *ed);
struct plitem_s *ED_GlobalsDict (progs_t *pr);
@ -1493,14 +1493,14 @@ int PR_LoadStrings (progs_t *pr);
\param num string index to be validated
\return true if the index is valid, false otherwise
*/
qboolean PR_StringValid (progs_t *pr, pr_string_t num) __attribute__((pure));
bool PR_StringValid (progs_t *pr, pr_string_t num) __attribute__((pure));
/** Check if a string is valid and mutable.
\param pr pointer to ::progs_t VM struct
\param num string index to be checked
\return true if the string is valid and mutable, false otherwise
*/
qboolean PR_StringMutable (progs_t *pr, pr_string_t num) __attribute__((pure));
bool PR_StringMutable (progs_t *pr, pr_string_t num) __attribute__((pure));
/** Convert a string index to a C string.
\param pr pointer to ::progs_t VM struct
@ -2170,7 +2170,7 @@ struct progs_s {
///@{
int pr_argc; //FIXME need a good way to ensure it is correct
qboolean pr_trace;
bool pr_trace;
int pr_trace_depth;
bfunction_t *pr_xfunction;
int pr_xstatement;

View file

@ -73,7 +73,7 @@
#define LittleFloat FloatSwap
#endif
extern qboolean bigendien;
extern bool bigendien;
uint16_t _ShortSwap (uint16_t l) __attribute__((const));
uint16_t _ShortNoSwap (uint16_t l) __attribute__((const));

View file

@ -52,21 +52,19 @@
typedef uint8_t byte;
#endif
#if __STDC_VERSION__ < 202000
#ifndef _DEF_BOOL_
# define _DEF_BOOL_
// KJB Undefined true and false defined in SciTech's DEBUG.H header
#ifdef __cplusplus
# define __bool_true_false_are_defined
#endif
# ifdef __bool_true_false_are_defined
typedef enum {q_false = false, q_true = true} qboolean;
//#define true q_true;
//#define false q_false;
# else
#undef true
#undef false
typedef enum {false, true} qboolean;
# ifdef __cplusplus
# define __bool_true_false_are_defined
# endif
# ifndef __bool_true_false_are_defined
# undef true
# undef false
typedef enum {false, true} bool;
# endif
#endif
#endif
// From mathlib...

View file

@ -71,11 +71,11 @@ typedef struct vpath_s vpath_t;
typedef struct findfile_s {
const vpath_t *vpath; ///< vpath in which file was found
qboolean in_pak; ///< if true, path refers to a pak file rather
///< than a directory
const char *realname; ///< the name of the file as found (may have
///< .gz appended, or .ogg substituded for
///< .wav) does not include the path
bool in_pak; ///< if true, path refers to a pak file rather
///< than a directory
} findfile_t;
/** Cached information about the current game directory. \see \ref dirconf.

View file

@ -44,15 +44,15 @@ void SCR_UpdateScreen_legacy (struct transform_s camera, double realtime,
SCR_Func *scr_funcs);
void SCR_SetFOV (float fov);
// control whether the 3d viewport is user-controlled or always fullscreen
void SCR_SetFullscreen (qboolean fullscreen);
void SCR_SetFullscreen (bool fullscreen);
void SCR_SetBottomMargin (int lines);
void SCR_NewScene (struct scene_s *scene);
extern int r_timegraph;
extern int r_zgraph;
extern int scr_copytop;
extern qboolean scr_skipupdate;
extern int scr_copytop;
extern bool scr_skipupdate;
struct view_pos_s;
void R_TimeGraph (struct view_pos_s abs, struct view_pos_s len);

View file

@ -33,7 +33,7 @@ typedef struct script_s {
/// The current (or next when unget is true) token
struct dstring_s *token;
/// True if the last token has been pushed back.
qboolean unget;
bool unget;
/// current position within the script
const char *p;
/// name of the file being processed. used only for error reporting
@ -79,7 +79,7 @@ void Script_Start (script_t *script, const char *file, const char *data);
\return True if a token is available, false if end of file
or end of line (if crossline is false) has been hit
*/
qboolean Script_TokenAvailable (script_t *script, qboolean crossline);
bool Script_TokenAvailable (script_t *script, bool crossline);
/** Get the next token. Generates an error and exits the program if no token
is available and crossline is false.
@ -87,7 +87,7 @@ qboolean Script_TokenAvailable (script_t *script, qboolean crossline);
\param crossline True to allow passing \n
\return True on success, false on failure (no token available)
*/
qboolean Script_GetToken (script_t *script, qboolean crossline);
bool Script_GetToken (script_t *script, bool crossline);
/** Unget the current token. Only one level of unget is supported.
\param script The script_t object being parsed

View file

@ -37,8 +37,8 @@
typedef struct sizebuf_s
{
qboolean allowoverflow; // if false, do a Sys_Error
qboolean overflowed; // set to true if the buffer size failed
bool allowoverflow; // if false, do a Sys_Error
bool overflowed; // set to true if the buffer size failed
byte *data;
unsigned maxsize;
unsigned cursize;

View file

@ -50,7 +50,7 @@
typedef struct skin_s {
const char *name;
qboolean valid; // the skin was found
bool valid; // the skin was found
struct tex_s *texels;
byte *colormap;
int texnum;

View file

@ -35,8 +35,8 @@
#define VID_GRADES (1 << VID_CBITS)
typedef struct {
qboolean initialized;
qboolean is8bit;
bool initialized;
bool is8bit;
byte *gammatable; // 256
const byte *basepal; // 256 * 3
byte *palette; // 256 * 3
@ -48,7 +48,7 @@ typedef struct {
unsigned width;
unsigned height;
int numpages;
qboolean recalc_refdef; // if true, recalc vid-based stuff
bool recalc_refdef; // if true, recalc vid-based stuff
struct vid_internal_s *vid_internal;
struct viddef_listener_set_s *onPaletteChanged;
@ -63,7 +63,7 @@ typedef void (*viddef_listener_t) (void *data, const viddef_t *viddef);
extern unsigned int d_8to24table[256]; //FIXME nq/qw uses
extern qboolean vid_gamma_avail;
extern bool vid_gamma_avail;
void VID_Init_Cvars (void);

View file

@ -114,7 +114,7 @@ winding_t *WindingVectors (const winding_t *w, int unit);
on the font side of the plane, or NULL if the winding has
been clipped away.
*/
winding_t *ClipWinding (winding_t *in, struct plane_s *split, qboolean keepon);
winding_t *ClipWinding (winding_t *in, struct plane_s *split, bool keepon);
/** Divide a winding by a plane, producing one or two windings.

View file

@ -118,7 +118,7 @@ void Z_SetTag (memzone_t *zone, void *ptr, int tag);
memhunk_t *Hunk_Init (void *buf, size_t size);
void Hunk_Print (memhunk_t *hunk, qboolean all);
void Hunk_Print (memhunk_t *hunk, bool all);
void Hunk_Check (memhunk_t *hunk);
void *Hunk_RawAlloc (memhunk_t *hunk, size_t size) __attribute__((nonnull(1)));
void *Hunk_RawAllocName (memhunk_t *hunk, size_t size, const char *name) __attribute__((nonnull(1)));

View file

@ -45,7 +45,7 @@ void locs_load(const char *filename);
void locs_mark (vec4f_t loc, const char *desc);
int locs_nearest (vec4f_t loc) __attribute__((pure));
void locs_reset (void);
void locs_save (const char *filename, qboolean gz);
void locs_save (const char *filename, bool gz);
void map_to_loc (const char *mapname, char *filename);
void locs_draw (double time, vec4f_t simorg);

View file

@ -31,7 +31,7 @@
#ifndef __client_sbar_h
#define __client_sbar_h
extern qboolean sbar_showscores;
extern bool sbar_showscores;
struct player_info_s;
void Sbar_Init (int *stats, float *item_gettime);

View file

@ -114,7 +114,7 @@ void CL_ParseTEnt_qw (struct msg_s *net_message, double time,
TEntContext_t *ctx);
void CL_ParseParticleEffect (struct msg_s *net_message);
void CL_ClearProjectiles (void);
void CL_ParseProjectiles (struct msg_s *net_message, qboolean nail2,
void CL_ParseProjectiles (struct msg_s *net_message, bool nail2,
TEntContext_t *ctx);
#endif//__client_temp_entities_h

View file

@ -86,7 +86,7 @@ typedef struct viewstate_s {
// pitch drifting vars
float idealpitch;
float pitchvel;
qboolean nodrift;
bool nodrift;
float driftmove;
double laststop;
@ -112,6 +112,6 @@ void V_SetContentsColor (viewstate_t *vs, int contents);
void V_ParseDamage (struct msg_s *net_message, viewstate_t *vs);
void V_PrepBlend (viewstate_t *vs);
extern qboolean noclip_anglehack;
extern bool noclip_anglehack;
#endif // __client_view_h

View file

@ -55,7 +55,7 @@ void Win_CreateWindow (int width, int height);
void Win_Init_Cvars (void);
void Win_UpdateWindowStatus (int x, int y);
void Win_SetCaption (const char *text);
qboolean Win_SetGamma (double gamma);
bool Win_SetGamma (double gamma);
struct vid_internal_s;
struct gl_ctx_s *Win_GL_Context (struct vid_internal_s *);

View file

@ -57,12 +57,12 @@ extern int x_height;
extern int x_shmeventtype;
extern Time x_time;
extern Time x_mouse_time;
extern qboolean oktodraw;
extern qboolean x_have_focus;
extern bool oktodraw;
extern bool x_have_focus;
qboolean X11_AddEvent (int event, void (*event_handler)(XEvent *));
qboolean X11_RemoveEvent (int event, void (*event_handler)(XEvent *));
qboolean X11_SetGamma (double);
bool X11_AddEvent (int event, void (*event_handler)(XEvent *));
bool X11_RemoveEvent (int event, void (*event_handler)(XEvent *));
bool X11_SetGamma (double);
void X11_CloseDisplay (void);
void X11_CreateNullCursor (void);
void X11_CreateWindow (int, int);

View file

@ -113,23 +113,23 @@ typedef struct
} zpointdesc_t;
extern int r_drawflat;
extern int r_framecount; // sequence # of current frame since Quake
// started
extern qboolean r_drawpolys; // 1 if driver wants clipped polygons
// rather than a span list
extern qboolean r_drawculledpolys; // 1 if driver wants clipped polygons that
// have been culled by the edge list
extern qboolean r_worldpolysbacktofront; // 1 if driver wants polygons
// delivered back to front rather
// than front to back
extern qboolean r_recursiveaffinetriangles; // true if a driver wants to use
// recursive triangular subdivison
// and vertex drawing via
// D_PolysetDrawFinalVerts() past
// a certain distance (normally
// used only by the software
// driver)
extern qboolean r_dowarp;
extern int r_framecount; // sequence # of current frame since Quake
// started
extern bool r_drawpolys; // 1 if driver wants clipped polygons
// rather than a span list
extern bool r_drawculledpolys; // 1 if driver wants clipped polygons that
// have been culled by the edge list
extern bool r_worldpolysbacktofront; // 1 if driver wants polygons
// delivered back to front rather
// than front to back
extern bool r_recursiveaffinetriangles; // true if a driver wants to use
// recursive triangular subdivison
// and vertex drawing via
// D_PolysetDrawFinalVerts() past
// a certain distance (normally
// used only by the software
// driver)
extern bool r_dowarp;
extern affinetridesc_t r_affinetridesc;
extern spritedesc_t r_spritedesc;

View file

@ -65,7 +65,7 @@ typedef struct sspan_s {
extern float scale_for_mip;
extern qboolean d_roverwrapped;
extern bool d_roverwrapped;
extern surfcache_t *sc_rover;
extern surfcache_t *d_initial_rover;

View file

@ -38,7 +38,7 @@
Check for the presence of the XFree86-DGA support in the X server
*/
qboolean VID_CheckDGA (Display *, int *, int *, int *)
bool VID_CheckDGA (Display *, int *, int *, int *)
#ifndef HAVE_DGA // FIXME
__attribute__((const))
#endif
@ -50,7 +50,7 @@ qboolean VID_CheckDGA (Display *, int *, int *, int *)
Check for the presence of the XFree86-VMode X server extension
*/
qboolean VID_CheckVMode (Display *, int *, int *)
bool VID_CheckVMode (Display *, int *, int *)
#ifndef HAVE_DGA // FIXME
__attribute__((const))
#endif

View file

@ -36,4 +36,4 @@ typedef struct gib_builtin_s {
} gib_builtin_t;
gib_builtin_t *GIB_Builtin_Find (const char *name);
void GIB_Builtin_Init (qboolean sandbox);
void GIB_Builtin_Init (bool sandbox);

View file

@ -44,7 +44,7 @@ typedef struct gib_function_s {
struct hashtab_s *globals;
struct llist_s *arglist;
unsigned int minargs;
qboolean exported;
bool exported;
} gib_function_t;
gib_function_t *GIB_Function_Define (const char *name, const char *text, gib_tree_t *program, gib_script_t *script, hashtab_t *globals);

View file

@ -30,7 +30,7 @@
#include "gib_tree.h"
qboolean GIB_Escaped (const char *str, int i);
bool GIB_Escaped (const char *str, int i);
char GIB_Parse_Match_Brace (const char *str, unsigned int *i);
char GIB_Parse_Match_Backtick (const char *str, unsigned int *i);
@ -41,7 +41,7 @@ char GIB_Parse_Match_Var (const char *str, unsigned int *i);
gib_tree_t *GIB_Parse_Lines (const char *program, unsigned int pofs);
gib_tree_t *GIB_Parse_Embedded (gib_tree_t *token);
extern qboolean gib_parse_error;
extern bool gib_parse_error;
void GIB_Parse_Error (const char *msg, unsigned int pos);
const char *GIB_Parse_ErrorMsg (void) __attribute__((pure));
unsigned int GIB_Parse_ErrorPos (void) __attribute__((pure));

View file

@ -48,9 +48,9 @@ typedef struct gib_domain_s {
} gib_domain_t;
gib_var_t *GIB_Var_Get (hashtab_t *first, hashtab_t *second, const char *key);
gib_var_t *GIB_Var_Get_Complex (hashtab_t **first, hashtab_t **second, char *key, unsigned int *ind, qboolean create);
gib_var_t *GIB_Var_Get_Very_Complex (hashtab_t ** first, hashtab_t ** second, dstring_t *key, unsigned int start, unsigned int *ind, qboolean create);
void GIB_Var_Assign (gib_var_t *var, unsigned int index, dstring_t **values, unsigned int numv, qboolean shrink);
gib_var_t *GIB_Var_Get_Complex (hashtab_t **first, hashtab_t **second, char *key, unsigned int *ind, bool create);
gib_var_t *GIB_Var_Get_Very_Complex (hashtab_t ** first, hashtab_t ** second, dstring_t *key, unsigned int start, unsigned int *ind, bool create);
void GIB_Var_Assign (gib_var_t *var, unsigned int index, dstring_t **values, unsigned int numv, bool shrink);
hashtab_t *GIB_Domain_Get (const char *name);
hashtab_t *GIB_Var_Hash_New (void);

View file

@ -30,7 +30,7 @@
#include "QF/qtypes.h"
extern qboolean mouseactive;
extern bool mouseactive;
extern float mouse_x, mouse_y;
void IN_UpdateClipCursor (void);

View file

@ -43,7 +43,7 @@ int Datagram_Init (void);
\param state True to enable, false to disable.
*/
void Datagram_Listen (qboolean state);
void Datagram_Listen (bool state);
/** Search for hosts (servers) on the local network.
@ -54,7 +54,7 @@ void Datagram_Listen (qboolean state);
\param xmit True to send the broadcast, falst to only listen.
*/
void Datagram_SearchForHosts (qboolean xmit);
void Datagram_SearchForHosts (bool xmit);
/** Connect to the specified host.
@ -104,7 +104,7 @@ int Datagram_SendUnreliableMessage (qsocket_t *sock, sizebuf_t *data);
\param sock The socket to check.
\return True if the packet can be sent.
*/
qboolean Datagram_CanSendMessage (qsocket_t *sock);
bool Datagram_CanSendMessage (qsocket_t *sock);
/** Check if an unreliable message can be sent to the socket.
@ -113,7 +113,7 @@ qboolean Datagram_CanSendMessage (qsocket_t *sock);
\param sock The socket to check.
\return True if the packet can be sent.
*/
qboolean Datagram_CanSendUnreliableMessage (qsocket_t *sock);
bool Datagram_CanSendUnreliableMessage (qsocket_t *sock);
/** Close the socket.

View file

@ -37,15 +37,15 @@
///@{
int Loop_Init (void);
void Loop_Listen (qboolean state);
void Loop_SearchForHosts (qboolean xmit);
void Loop_Listen (bool state);
void Loop_SearchForHosts (bool xmit);
qsocket_t *Loop_Connect (const char *host);
qsocket_t *Loop_CheckNewConnections (void);
int Loop_GetMessage (qsocket_t *sock);
int Loop_SendMessage (qsocket_t *sock, sizebuf_t *data);
int Loop_SendUnreliableMessage (qsocket_t *sock, sizebuf_t *data);
qboolean Loop_CanSendMessage (qsocket_t *sock);
qboolean Loop_CanSendUnreliableMessage (qsocket_t *sock);
bool Loop_CanSendMessage (qsocket_t *sock);
bool Loop_CanSendUnreliableMessage (qsocket_t *sock);
void Loop_Close (qsocket_t *sock);
void Loop_Shutdown (void);

View file

@ -55,7 +55,7 @@ void UDP_Shutdown (void);
\param state True to open the socket, false to close it.
*/
void UDP_Listen (qboolean state);
void UDP_Listen (bool state);
/** Open a single socket on the specified port.

View file

@ -38,13 +38,13 @@
#define VCR_MAX_MESSAGE 4
int VCR_Init (void);
void VCR_Listen (qboolean state);
void VCR_SearchForHosts (qboolean xmit);
void VCR_Listen (bool state);
void VCR_SearchForHosts (bool xmit);
qsocket_t *VCR_Connect (const char *host);
qsocket_t *VCR_CheckNewConnections (void);
int VCR_GetMessage (qsocket_t *sock);
int VCR_SendMessage (qsocket_t *sock, sizebuf_t *data);
qboolean VCR_CanSendMessage (qsocket_t *sock);
bool VCR_CanSendMessage (qsocket_t *sock);
void VCR_Close (qsocket_t *sock);
void VCR_Shutdown (void);

View file

@ -42,7 +42,7 @@ extern WSADATA winsockdata;
int WINS_Init (void);
void WINS_Shutdown (void);
void WINS_Listen (qboolean state);
void WINS_Listen (bool state);
int WINS_OpenSocket (int port);
int WINS_CloseSocket (int socket);
int WINS_Connect (int socket, netadr_t *addr);

View file

@ -92,7 +92,7 @@ void NET_Init (int port);
\return True if successfully read, otherwise false.
*/
qboolean NET_GetPacket (void);
bool NET_GetPacket (void);
/** Send a data packet out to the network.
@ -110,7 +110,7 @@ void NET_SendPacket (int length, const void *data, netadr_t to);
\param b The second address to compare.
\return True of the addresses match, otherwise false.
*/
qboolean NET_CompareAdr (netadr_t a, netadr_t b) __attribute__((const));
bool NET_CompareAdr (netadr_t a, netadr_t b) __attribute__((const));
/** Compare two network addresses.
@ -120,7 +120,7 @@ qboolean NET_CompareAdr (netadr_t a, netadr_t b) __attribute__((const));
\param b The second address to compare.
\return True of the addresses match, otherwise false.
*/
qboolean NET_CompareBaseAdr (netadr_t a, netadr_t b) __attribute__((const));
bool NET_CompareBaseAdr (netadr_t a, netadr_t b) __attribute__((const));
/** Convert an address to a string.
@ -157,7 +157,7 @@ const char *NET_BaseAdrToString (netadr_t a);
\param[out] a The resulting address of the conversion.
\return True if the conversion is successful, otherwise false.
*/
qboolean NET_StringToAdr (const char *s, netadr_t *a);
bool NET_StringToAdr (const char *s, netadr_t *a);
///@}
@ -225,7 +225,7 @@ typedef enum {
} ncqport_e;
typedef struct netchan_s {
qboolean fatal_error; ///< True if the message overflowed
bool fatal_error; ///< True if the message overflowed
double last_received; ///< Time the last packet was received.
@ -343,7 +343,7 @@ void Netchan_OutOfBandPrint (netadr_t adr, const char *format, ...)
\param chan The netchan representing the connection.
*/
qboolean Netchan_Process (netchan_t *chan);
bool Netchan_Process (netchan_t *chan);
/** Initialize a new connection.
@ -360,7 +360,7 @@ void Netchan_Setup (netchan_t *chan, netadr_t adr, int qport, ncqport_e flags);
\param chan The netchan representing the connection.
\return True if the connection isn't chocked.
*/
qboolean Netchan_CanPacket (netchan_t *chan) __attribute__((pure));
bool Netchan_CanPacket (netchan_t *chan) __attribute__((pure));
/** Check if a reliable packet can be sent to the connection.
@ -368,7 +368,7 @@ qboolean Netchan_CanPacket (netchan_t *chan) __attribute__((pure));
\return True if there is no outstanding reliable packet and the
connection isn't chocked.
*/
qboolean Netchan_CanReliable (netchan_t *chan) __attribute__((pure));
bool Netchan_CanReliable (netchan_t *chan) __attribute__((pure));
/** Send a packet.

View file

@ -166,9 +166,9 @@ typedef struct qsocket_s {
/// \name socket status
//@{
qboolean disconnected; ///< Socket is not in use.
qboolean canSend; ///< Socket can send a message.
qboolean sendNext;
bool disconnected; ///< Socket is not in use.
bool canSend; ///< Socket can send a message.
bool sendNext;
//@}
/// \name socket drivers
@ -296,7 +296,7 @@ struct qsocket_s *NET_Connect (const char *host);
\param sock The qsocket representing the connection.
\return True if the message can be sent.
*/
qboolean NET_CanSendMessage (qsocket_t *sock);
bool NET_CanSendMessage (qsocket_t *sock);
/** Read a single message from the connection into net_message.
@ -378,12 +378,12 @@ typedef struct _PollProcedure {
*/
void SchedulePollProcedure(PollProcedure *pp, double timeOffset);
extern qboolean tcpipAvailable;
extern char my_tcpip_address[NET_NAMELEN];
extern bool tcpipAvailable;
extern char my_tcpip_address[NET_NAMELEN];
extern qboolean slistInProgress;
extern qboolean slistSilent;
extern qboolean slistLocal;
extern bool slistInProgress;
extern bool slistSilent;
extern bool slistLocal;
extern char *hostname;
@ -398,11 +398,11 @@ extern QFile *vcrFile;
typedef struct {
const char *name;
qboolean initialized;
bool initialized;
int controlSock;
int (*Init) (void);
void (*Shutdown) (void);
void (*Listen) (qboolean state);
void (*Listen) (bool state);
int (*OpenSocket) (int port);
int (*CloseSocket) (int socket);
int (*Connect) (int socket, netadr_t *addr);
@ -431,17 +431,17 @@ extern net_landriver_t net_landrivers[MAX_NET_DRIVERS];
typedef struct {
const char *name;
qboolean initialized;
bool initialized;
int (*Init) (void);
void (*Listen) (qboolean state);
void (*SearchForHosts) (qboolean xmit);
void (*Listen) (bool state);
void (*SearchForHosts) (bool xmit);
qsocket_t *(*Connect) (const char *host);
qsocket_t *(*CheckNewConnections) (void);
int (*QGetMessage) (qsocket_t *sock);
int (*QSendMessage) (qsocket_t *sock, sizebuf_t *data);
int (*SendUnreliableMessage) (qsocket_t *sock, sizebuf_t *data);
qboolean (*CanSendMessage) (qsocket_t *sock);
qboolean (*CanSendUnreliableMessage) (qsocket_t *sock);
bool (*CanSendMessage) (qsocket_t *sock);
bool (*CanSendUnreliableMessage) (qsocket_t *sock);
void (*Close) (qsocket_t *sock);
void (*Shutdown) (void);
int controlSock;

View file

@ -58,9 +58,9 @@ typedef struct {
int oldbuttons;
int oldonground;
float waterjumptime;
qboolean dead;
qboolean flying;
qboolean add_grav;
bool dead;
bool flying;
bool add_grav;
int spectator;
// world state
@ -109,7 +109,7 @@ void Pmove_Init_Cvars (void);
int PM_HullPointContents (hull_t *hull, int num, const vec3_t p) __attribute__((pure));
int PM_PointContents (const vec3_t point) __attribute__((pure));
qboolean PM_TestPlayerPosition (const vec3_t point);
bool PM_TestPlayerPosition (const vec3_t point);
trace_t PM_PlayerMove (const vec3_t start, const vec3_t stop);
#endif // _PMOVE_H

View file

@ -131,14 +131,14 @@ void R_ClearPolyList (void);
void R_DrawPolyList (void);
// Surface cache related ==========
extern qboolean r_cache_thrash; // set if thrashing the surface cache
extern bool r_cache_thrash; // set if thrashing the surface cache
// current entity info
extern qboolean insubmodel;
extern vec3_t r_worldmodelorg;
extern bool insubmodel;
extern vec3_t r_worldmodelorg;
extern mat4f_t glsl_projection;
extern mat4f_t glsl_view;
extern mat4f_t glsl_projection;
extern mat4f_t glsl_view;
union refframe_s;
void R_SetFrustum (plane_t *frustum, const union refframe_s *frame,
@ -245,7 +245,7 @@ extern auxvert_t *pauxverts;
extern float ziscale;
extern float aliastransform[3][4];
qboolean R_AliasCheckBBox (struct entity_s ent);
bool R_AliasCheckBBox (struct entity_s ent);
// turbulence stuff =======================================
@ -290,7 +290,7 @@ void R_AliasClipTriangle (mtriangle_t *ptri);
extern double r_time1;
extern int r_frustum_indexes[4*6];
extern int r_maxsurfsseen, r_maxedgesseen;
extern qboolean r_dowarpold, r_viewchanged;
extern bool r_dowarpold, r_viewchanged;
extern int r_clipflags;

View file

@ -101,7 +101,7 @@ typedef struct surf_s {
void *data; // associated data like msurface_t
uint32_t render_id;
float nearzi; // nearest 1/z on surface, for mipmapping
qboolean insubmodel;
bool insubmodel;
float d_ziorigin, d_zistepu, d_zistepv;
int pad[2]; // to 64 bytes (FIXME not for 64-bit)

View file

@ -47,7 +47,7 @@ typedef struct varray_t2f_c4f_n3f_v3f_s {
GLfloat vertex[3];
} varray_t2f_c4f_n3f_v3f_t;
extern qboolean gl_va_capable;
extern bool gl_va_capable;
extern int vaelements;
extern varray_t2f_c4ub_v3f_t *gl_spriteVertexArray;

View file

@ -12,7 +12,7 @@ typedef struct gl_ctx_s {
void (*choose_visual) (struct gl_ctx_s *ctx);
void (*create_context) (struct gl_ctx_s *ctx, int core);
void (*init_gl) (void);
void *(*get_proc_address) (const char *name, qboolean crit);
void *(*get_proc_address) (const char *name, bool crit);
void (*end_rendering) (void);
mat4f_t projection;

View file

@ -40,7 +40,7 @@ void VID_GetWindowSize (int def_w, int def_h);
void VID_SetWindowSize (int width, int height);
void VID_InitGamma (const byte *);
qboolean VID_SetGamma (double);
bool VID_SetGamma (double);
void VID_UpdateGamma (void);
void VID_MakeColormaps (void);

View file

@ -76,9 +76,9 @@ typedef enum {MS_WINDOWED, MS_FULLSCREEN, MS_FULLDIB, MS_UNINIT} modestate_t;
extern modestate_t modestate;
extern qboolean WinNT;
extern bool WinNT;
extern qboolean winsock_lib_initialized;
extern bool winsock_lib_initialized;
#ifdef SPLASH_SCREEN
extern HWND hwnd_dialog;

View file

@ -33,7 +33,7 @@
#include "QF/model.h"
typedef struct {
qboolean present;
bool present;
vec3_t laggedpos;
} laggedentinfo_t;
@ -44,9 +44,9 @@ typedef enum {
} trace_e;
typedef struct trace_s {
qboolean allsolid; // if true, plane is not valid
qboolean startsolid; // if true, the initial point was in a solid area
qboolean inopen, inwater;
bool allsolid; // if true, plane is not valid
bool startsolid; // if true, the initial point was in a solid area
bool inopen, inwater;
float fraction; // time completed, 1.0 = didn't hit anything
vec3_t extents; // 1/2 size of traced box
trace_e type; // type of trace to perform
@ -92,7 +92,7 @@ void SV_UnlinkEdict (struct edict_s *ent);
// so it doesn't clip against itself
// flags ent->v.modified
void SV_LinkEdict (struct edict_s *ent, qboolean touch_triggers);
void SV_LinkEdict (struct edict_s *ent, bool touch_triggers);
// Needs to be called any time an entity changes origin, mins, maxs, or solid
// flags ent->v.modified
// sets ent->v.absmin and ent->v.absmax

View file

@ -64,7 +64,7 @@ CDAudio_Pause (void)
}
VISIBLE void
CDAudio_Play (int track, qboolean looping)
CDAudio_Play (int track, bool looping)
{
if (cdmodule)
cdmodule->functions->cd->play (track, looping);

View file

@ -71,10 +71,10 @@ static general_data_t plugin_info_general_data;
static general_funcs_t plugin_info_general_funcs;
/* global status variables. */
static qboolean playing = false;
static qboolean wasPlaying = false;
static qboolean mus_enabled = false;
static qboolean ogglistvalid = false;
static bool playing = false;
static bool wasPlaying = false;
static bool mus_enabled = false;
static bool ogglistvalid = false;
/* sound resources */
static channel_t *cd_channel;
@ -294,7 +294,7 @@ I_OGGMus_Resume (void)
/* start playing, if we've got a play_list.
* cry if we can't find a file to play */
static void
I_OGGMus_Play (int track, qboolean looping)
I_OGGMus_Play (int track, bool looping)
{
/* alrighty. grab the list, map track to filename. grab filename from data
resources, attach sound to play, loop. */

View file

@ -66,11 +66,11 @@ static general_data_t plugin_info_general_data;
static general_funcs_t plugin_info_general_funcs;
static cd_funcs_t plugin_info_cd_funcs;
static qboolean cdValid = false;
static qboolean playing = false;
static qboolean wasPlaying = false;
static qboolean mus_enabled = false;
static qboolean playLooping = false;
static bool cdValid = false;
static bool playing = false;
static bool wasPlaying = false;
static bool mus_enabled = false;
static bool playLooping = false;
static float cdvolume;
static byte remap[100];
static byte playTrack;
@ -174,7 +174,7 @@ I_CDAudio_Stop (void)
}
static void
I_CDAudio_Play (int track, qboolean looping)
I_CDAudio_Play (int track, bool looping)
{
struct cdrom_tocentry entry0;
struct cdrom_tocentry entry1;

View file

@ -56,10 +56,10 @@ static general_data_t plugin_info_general_data;
static general_funcs_t plugin_info_general_funcs;
static cd_funcs_t plugin_info_cd_funcs;
static qboolean cdValid = false;
static qboolean initialized = false;
static qboolean enabled = true;
static qboolean playLooping = false;
static bool cdValid = false;
static bool initialized = false;
static bool enabled = true;
static bool playLooping = false;
static SDL_CD *cd_id;
static float cdvolume = 1.0;
@ -113,7 +113,7 @@ I_CDAudio_Stop (void)
}
static void
I_CDAudio_Play (int track, qboolean looping)
I_CDAudio_Play (int track, bool looping)
{
/* Initialize cd_stat to avoid warning */
/* XXX - Does this default value make sense? */

View file

@ -53,9 +53,9 @@ static general_funcs_t plugin_info_general_funcs;
static cd_funcs_t plugin_info_cd_funcs;
static qboolean initialized = false;
static qboolean enabled = true;
static qboolean playLooping = false;
static bool initialized = false;
static bool enabled = true;
static bool playLooping = false;
static float cdvolume;
static byte remap[100];
static byte playTrack;
@ -126,7 +126,7 @@ I_SGI_Pause (void)
}
void
I_SGI_Play (int track, qboolean looping)
I_SGI_Play (int track, bool looping)
{
int maxtrack = I_SGI_MaxTrack ();

View file

@ -48,12 +48,12 @@ static general_data_t plugin_info_general_data;
static general_funcs_t plugin_info_general_funcs;
static cd_funcs_t plugin_info_cd_funcs;
static qboolean cdValid = false;
static qboolean playing = false;
static qboolean wasPlaying = false;
static qboolean initialized = false;
static qboolean enabled = false;
static qboolean playLooping = false;
static bool cdValid = false;
static bool playing = false;
static bool wasPlaying = false;
static bool initialized = false;
static bool enabled = false;
static bool playLooping = false;
static float cdvolume;
static byte remap[100];
static byte playTrack;
@ -61,7 +61,7 @@ static byte maxTrack;
static UINT wDeviceID;
static void I_CDAudio_Play (int track, qboolean looping);
static void I_CDAudio_Play (int track, bool looping);
static void I_CDAudio_Stop (void);
static float bgmvolume;
@ -201,7 +201,7 @@ I_CDAudio_Pause (void)
}
static void
I_CDAudio_Play (int track, qboolean looping)
I_CDAudio_Play (int track, bool looping)
{
DWORD dwReturn;
MCI_PLAY_PARMS mciPlayParms;

View file

@ -79,15 +79,15 @@ static int sessionNo;
//static int xmmsPid = '0';
//static int sigNo = '2';
static qboolean playing = false;
static bool playing = false;
// no idea why I have wasPlaying, pbly this code was based on cd_linux.c :/
static qboolean wasPlaying = false;
static qboolean musEnabled = true;
static bool wasPlaying = false;
static bool musEnabled = true;
static void I_XMMS_Running(void);
static void I_XMMS_Stop(void);
static void I_XMMS_Play(int, qboolean);
static void I_XMMS_Play(int, bool);
static void I_XMMS_Pause(void);
static void I_XMMS_Resume(void);
static void I_XMMS_Next(void);
@ -178,7 +178,7 @@ I_XMMS_Stop (void) // stop playing
// Play
// start it playing, (unless disabled)
static void
I_XMMS_Play (int track, qboolean looping) // looping for compatability
I_XMMS_Play (int track, bool looping) // looping for compatability
{
if (!musEnabled)
return;

View file

@ -89,7 +89,7 @@ static set_t static_channels = SET_STATIC_ARRAY (static_channel_bits);
static channel_t *ambient_channels[NUM_AMBIENTS];
static qboolean snd_ambient = 1;
static bool snd_ambient = 1;
static sfx_t *ambient_sfx[NUM_AMBIENTS];
static vec_t sound_nominal_clip_dist = 1000.0;

View file

@ -99,7 +99,7 @@ static ret (*qf##func) params;
#include "alsa_funcs_list.h"
#undef QF_ALSA_NEED
static qboolean
static bool
load_libasound (void)
{
if (!(alsa_handle = dlopen ("libasound.so.2", RTLD_GLOBAL | RTLD_NOW))) {

View file

@ -51,9 +51,9 @@ HRESULT (WINAPI * pDirectSoundCreate) (GUID FAR * lpGUID,
typedef enum { SIS_SUCCESS, SIS_FAILURE, SIS_NOTAVAIL } sndinitstat;
static qboolean dsound_init;
static qboolean snd_firsttime = true;
static qboolean primary_format_set;
static bool dsound_init;
static bool snd_firsttime = true;
static bool primary_format_set;
static int sample16;
@ -111,7 +111,7 @@ static cvar_t snd_bits_cvar = {
.value = { .type = &cexpr_int, .value = &snd_bits },
};
static DWORD *DSOUND_LockBuffer (snd_t *snd, qboolean lockit);
static DWORD *DSOUND_LockBuffer (snd_t *snd, bool lockit);
static void
SNDDMA_Init_Cvars (void)
@ -436,7 +436,7 @@ SNDDMA_shutdown (snd_t *snd)
}
static DWORD *
DSOUND_LockBuffer (snd_t *snd, qboolean lockit)
DSOUND_LockBuffer (snd_t *snd, bool lockit)
{
int reps;

View file

@ -45,7 +45,7 @@
typedef enum { SIS_SUCCESS, SIS_FAILURE, SIS_NOTAVAIL } sndinitstat;
static qboolean snd_firsttime = true;
static bool snd_firsttime = true;
static int sample16;
static int snd_sent, snd_completed;
@ -68,7 +68,7 @@ static HWAVEOUT hWaveOut;
static DWORD gSndBufSize;
static qboolean SNDDMA_InitWav (snd_t *snd);
static bool SNDDMA_InitWav (snd_t *snd);
static int snd_stereo;
static cvar_t snd_stereo_cvar = {
@ -161,7 +161,7 @@ FreeSound (void)
Crappy windows multimedia base
*/
static qboolean
static bool
SNDDMA_InitWav (snd_t *snd)
{
int i;

View file

@ -227,7 +227,7 @@ beam_clear (beam_t *b)
}
static inline void
beam_setup (beam_t *b, qboolean settransform, double time, TEntContext_t *ctx)
beam_setup (beam_t *b, bool settransform, double time, TEntContext_t *ctx)
{
tent_t *tent;
float d;
@ -688,7 +688,7 @@ CL_ClearProjectiles (void)
Nails are passed as efficient temporary entities
*/
void
CL_ParseProjectiles (qmsg_t *net_message, qboolean nail2, TEntContext_t *ctx)
CL_ParseProjectiles (qmsg_t *net_message, bool nail2, TEntContext_t *ctx)
{
tent_t *tent;
tent_t *head = 0, **tail = &head;

View file

@ -638,7 +638,7 @@ V_PrepBlend (viewstate_t *vs)
|| (vs->force_cshifts & INFO_CSHIFT_POWERUP))
V_CalcPowerupCshift (vs);
qboolean cshift_changed = false;
bool cshift_changed = false;
for (i = 0; i < NUM_CSHIFTS; i++) {
if (vs->cshifts[i].percent != vs->prev_cshifts[i].percent) {

View file

@ -198,7 +198,7 @@ locs_reset (void)
}
void
locs_save (const char *filename, qboolean gz)
locs_save (const char *filename, bool gz)
{
int i;
QFile *locfd;

View file

@ -332,14 +332,14 @@ static qpic_t *sb_face_quad;
static qpic_t *sb_face_invuln;
static qpic_t *sb_face_invis_invuln;
qboolean sbar_showscores;
static qboolean sbar_showteamscores;
bool sbar_showscores;
static bool sbar_showteamscores;
static int sb_lines; // scan lines to draw
static qpic_t *rsb_teambord; // PGM 01/19/97 - team color border
//static qboolean largegame = false;
//static bool largegame = false;
char *fs_fraglog;
static cvar_t fs_fraglog_cvar = {
@ -662,7 +662,7 @@ static draw_charbuffer_t *sb_spectator;
int scoreboardlines, scoreboardteams;
static void
Sbar_SortFrags (qboolean includespec)
Sbar_SortFrags (bool includespec)
{
int i, j, k;

View file

@ -158,8 +158,8 @@ static con_state_t con_state;
static int con_event_id;
static int con_saved_focos;
static qboolean con_debuglog;
static qboolean chat_team;
static bool con_debuglog;
static bool chat_team;
static dstring_t *c_print_buffer;
static dstring_t *dlbar;
static dstring_t *old_gamedir = 0;
@ -226,7 +226,7 @@ static float notify_times[NOTIFY_LINES + 1];
static int notify_head;
static int notify_tail;
static qboolean con_initialized;
static bool con_initialized;
static inline void *
con_getcomponent (view_t view, uint32_t comp)

View file

@ -137,7 +137,7 @@ static cvar_t sv_use_curses_cvar = {
#ifdef HAVE_NCURSES
static void key_event (knum_t key, short unicode, qboolean down);
static void key_event (knum_t key, short unicode, bool down);
enum {
sv_resize_x = 1,
@ -563,7 +563,7 @@ process_input (void)
}
static void
key_event (knum_t key, short unicode, qboolean down)
key_event (knum_t key, short unicode, bool down)
{
int ovf = view_offset;
sv_view_t *window;

View file

@ -239,7 +239,7 @@ ED_NumForEdict (progs_t *pr, edict_t *e)
return b;
}
qboolean
bool
PR_EdictValid (progs_t *pr, pr_uint_t e)
{
if (!pr->num_edicts) {

View file

@ -212,7 +212,7 @@ ED_NewString (progs_t *pr, const char *string)
Can parse either fields or globals
returns false if error
*/
VISIBLE qboolean
VISIBLE bool
ED_ParseEpair (progs_t *pr, pr_type_t *base, pr_def_t *key, const char *s)
{
pr_def_t *def;

View file

@ -377,7 +377,7 @@ get_string (progs_t *pr, pr_string_t num)
}
}
VISIBLE qboolean
VISIBLE bool
PR_StringValid (progs_t *pr, pr_string_t num)
{
if (num >= 0) {
@ -386,7 +386,7 @@ PR_StringValid (progs_t *pr, pr_string_t num)
return get_strref (pr->pr_string_resources, num) != 0;
}
VISIBLE qboolean
VISIBLE bool
PR_StringMutable (progs_t *pr, pr_string_t num)
{
strref_t *sr;
@ -770,7 +770,7 @@ I_DoPrint (dstring_t *tmp, dstring_t *result, fmt_item_t *formatting)
fmt_item_t *current = formatting;
while (current) {
qboolean doPrecision, doWidth;
bool doPrecision, doWidth;
doPrecision = -1 != current->precision;
doWidth = 0 != (current->flags & FMT_WIDTH);

View file

@ -116,7 +116,7 @@ GIB_Builtin_Remove (const char *name)
Hash_Free (gib_builtins, del);
}
VISIBLE qboolean
VISIBLE bool
GIB_Builtin_Exists (const char *name)
{
return Hash_Find (gib_builtins, name) ? true : false;
@ -1046,7 +1046,7 @@ gib_builtin_shutdown (void *data)
}
void
GIB_Builtin_Init (qboolean sandbox)
GIB_Builtin_Init (bool sandbox)
{
if (sandbox)

View file

@ -188,7 +188,7 @@ Object_Class_New_f (gib_object_t *obj, gib_method_t *method, void *data,
static const char **g_occ_reply;
static unsigned int g_occ_i = 0;
static qboolean occ_iterator (gib_class_t *class, void *unused)
static bool occ_iterator (gib_class_t *class, void *unused)
{
g_occ_reply[g_occ_i++] = class->name;
return false;
@ -282,7 +282,7 @@ typedef struct Thread_class_s {
typedef struct Thread_s {
gib_object_t *obj;
cbuf_t *thread;
qboolean ended;
bool ended;
} Thread_t;
static int

View file

@ -203,7 +203,7 @@ GIB_Execute (cbuf_t * cbuf)
unsigned int index;
gib_var_t *var;
int i;
qboolean super;
bool super;
static const char **mesg = NULL;
static int maxmesg = 0;

View file

@ -163,7 +163,7 @@ static unsigned int g_fpa_argc;
static hashtab_t *g_fpa_zero = 0;
static unsigned int g_fpa_i, g_fpa_ind;
static qboolean fpa_iterate (char *arg, llist_node_t *node)
static bool fpa_iterate (char *arg, llist_node_t *node)
{
gib_var_t *var = GIB_Var_Get_Complex (&GIB_DATA(g_fpa_cbuf)->locals, &g_fpa_zero,
arg, &g_fpa_ind, true);
@ -210,7 +210,7 @@ static unsigned int g_fpad_argc;
static hashtab_t *g_fpad_zero = 0;
static unsigned int g_fpad_i, g_fpad_ind;
static qboolean fpad_iterate (char *arg, llist_node_t *node)
static bool fpad_iterate (char *arg, llist_node_t *node)
{
gib_var_t *var;

Some files were not shown because too many files have changed in this diff Show more