Even more conversion, lots of superfluous macro removal

This commit is contained in:
iikorni
2026-08-29 23:14:23 -05:00
parent 70e5c02355
commit de75b014b3
102 changed files with 7060 additions and 8179 deletions
+10 -10
View File
@@ -36,7 +36,7 @@ static int pr_numknownstrings;
static ddef_t *pr_fielddefs;
static ddef_t *pr_globaldefs;
qboolean pr_alpha_supported; //johnfitz
bool pr_alpha_supported; //johnfitz
int pr_effects_mask; // only enable 2021 rerelease quad/penta dlights when applicable
dstatement_t *pr_statements;
@@ -58,7 +58,7 @@ const int type_size[NUM_TYPE_SIZES] = {
};
static ddef_t *ED_FieldAtOfs (int ofs);
static qboolean ED_ParseEpair (void *base, ddef_t *key, const char *s);
static bool ED_ParseEpair (void *base, ddef_t *key, const char *s);
#define MAX_FIELD_LEN 64
#define GEFV_CACHESIZE 2
@@ -416,7 +416,7 @@ padded to 20 field width
const char *PR_GlobalString (int ofs)
{
static char line[512];
static const int lastchari = Q_COUNTOF(line) - 2;
static const int lastchari = std::size(line) - 2;
const char *s;
int i;
ddef_t *def;
@@ -447,7 +447,7 @@ const char *PR_GlobalString (int ofs)
const char *PR_GlobalStringNoContents (int ofs)
{
static char line[512];
static const int lastchari = Q_COUNTOF(line) - 2;
static const int lastchari = std::size(line) - 2;
int i;
ddef_t *def;
@@ -621,7 +621,7 @@ static void ED_PrintEdict_f (void)
if (!sv.active)
return;
i = Q_atoi (command::argv(1).value_or("").c_str());
i = std::atoi (command::argv(1).value_or("").c_str());
if (i < 0 || i >= sv.num_edicts)
{
Con_Printf("Bad edict number\n");
@@ -795,7 +795,7 @@ Can parse either fields or globals
returns false if error
=============
*/
static qboolean ED_ParseEpair (void *base, ddef_t *key, const char *s)
static bool ED_ParseEpair (void *base, ddef_t *key, const char *s)
{
int i;
char string[128];
@@ -886,7 +886,7 @@ Used for initial level load and for savegames.
void ED_ParseEdict(std::istringstream &ss, edict_t *ent)
{
ddef_t *key;
qboolean anglehack, init;
bool anglehack, init;
int n;
std::string keyname{};
@@ -954,7 +954,7 @@ void ED_ParseEdict(std::istringstream &ss, edict_t *ent)
//johnfitz -- hack to support .alpha even when progs.dat doesn't know about it
if (keyname == "alpha")
ent->alpha = ENTALPHA_ENCODE(Q_atof(token->c_str()));
ent->alpha = ENTALPHA_ENCODE(std::atof(token->c_str()));
//johnfitz
key = ED_FindField (keyname.c_str());
@@ -1078,7 +1078,7 @@ void ED_LoadFromFile (const char *data)
PR_HasGlobal
===============
*/
static qboolean PR_HasGlobal (const char *name, float value)
static bool PR_HasGlobal (const char *name, float value)
{
ddef_t *g = ED_FindGlobal (name);
return g && (g->type & ~DEF_SAVEGLOBAL) == ev_float && G_FLOAT (g->ofs) == value;
@@ -1096,7 +1096,7 @@ to avoid conflicts (e.g. Arcane Dimensions uses bit 32 for its explosions)
*/
static int PR_FindSupportedEffects (void)
{
qboolean isqex =
bool isqex =
PR_HasGlobal ("EF_QUADLIGHT", EF_QEX_QUADLIGHT) &&
(PR_HasGlobal ("EF_PENTLIGHT", EF_QEX_PENTALIGHT) || PR_HasGlobal ("EF_PENTALIGHT", EF_QEX_PENTALIGHT))
;