- Duke/RR: eliminated all uses of 'char' outside of text management

This commit is contained in:
Christoph Oelckers 2021-11-07 12:53:48 +01:00
parent e2faeec2ce
commit 1eeb8864a4
8 changed files with 19 additions and 19 deletions

View file

@ -89,7 +89,7 @@ static int ccmd_spawn(CCmdFuncPtr parm)
}
auto spawned = spawn(ps[myconnectindex].GetActor(), picnum);
if (set & 1) spawned->s->pal = (char)pal;
if (set & 1) spawned->s->pal = (uint8_t)pal;
if (set & 2) spawned->s->cstat = (short)cstat;
if (set & 4) spawned->s->ang = ang;
if (set & 8) {

View file

@ -929,7 +929,7 @@ void DoPlayer(bool bSet, int lVar1, int lLabelID, int lVar2, DDukeActor* sActor,
}
////////////////////
void DoWall(char bSet, int lVar1, int lLabelID, int lVar2, DDukeActor* sActor, short sPlayer, int lParm2)
void DoWall(bool bSet, int lVar1, int lLabelID, int lVar2, DDukeActor* sActor, int sPlayer, int lParm2)
{
int iWall;
int lValue;
@ -1017,7 +1017,7 @@ void DoWall(char bSet, int lVar1, int lLabelID, int lVar2, DDukeActor* sActor, s
return;
}
void DoSector(char bSet, int lVar1, int lLabelID, int lVar2, DDukeActor* sActor, short sPlayer, int lParm2)
void DoSector(bool bSet, int lVar1, int lLabelID, int lVar2, DDukeActor* sActor, int sPlayer, int lParm2)
{
int iSector;
int lValue;
@ -3513,7 +3513,7 @@ int ParseState::parse(void)
int lCases;
int lEnd;
int lCheckCase;
char bMatched;
bool bMatched;
int* lTempInsPtr;
// command format:
@ -3530,7 +3530,7 @@ int ParseState::parse(void)
lpDefault = insptr++;
lpCases = insptr;
insptr += lCases * 2;
bMatched = 0;
bMatched = false;
lTempInsPtr = insptr;
for (lCheckCase = 0; lCheckCase < lCases && !bMatched; lCheckCase++)
{
@ -3542,7 +3542,7 @@ int ParseState::parse(void)
if (parse())
break;
}
bMatched = 1;
bMatched = true;
}
}
if (!bMatched)
@ -3649,7 +3649,7 @@ int ParseState::parse(void)
void LoadActor(DDukeActor *actor, int p, int x)
{
char done;
int done;
ParseState s;
s.g_p = p; // Player ID
@ -3827,7 +3827,7 @@ quit:
void OnEvent(int iEventID, int p, DDukeActor *actor, int x)
{
char done;
int done;
if (iEventID >= MAXGAMEEVENTS)
{

View file

@ -889,7 +889,7 @@ void displayweapon_d(int snum, double smoothratio)
{
if (*kb)
{
char cycloidy[] = { 0,4,12,24,12,4,0 };
static const uint8_t cycloidy[] = { 0,4,12,24,12,4,0 };
i = Sgn(*kb >> 2);
@ -924,7 +924,7 @@ void displayweapon_d(int snum, double smoothratio)
if (*kb)
{
char cat_frames[] = { 0,0,1,1,2,2 };
static const uint8_t cat_frames[] = { 0,0,1,1,2,2 };
if (p->GetActor()->s->pal != 1)
{

View file

@ -110,13 +110,13 @@ void displayweapon_r(int snum, double smoothratio)
int cw;
int i, j;
double weapon_sway, weapon_xoffset, gun_pos, looking_arc, look_anghalf, hard_landing, TiltStatus;
char o,pal;
int pal;
int8_t shade;
auto p = &ps[snum];
auto kb = &p->kickback_pic;
o = 0;
int o = 0;
if (cl_hudinterpolation)
{
@ -789,7 +789,7 @@ void displayweapon_r(int snum, double smoothratio)
if (!(gs.displayflags & DUKE3D_NO_WIDESCREEN_PINNING)) pin = RS_ALIGN_R;
if ((*kb))
{
char cat_frames[] = { 0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 };
static const uint8_t cat_frames[] = { 0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 };
rdmyospal(weapon_xoffset + 260 - look_anghalf, looking_arc + 215 - gun_pos, FREEZE + cat_frames[*kb], -32, o | pin, pal);
}
else rdmyospal(weapon_xoffset + 260 - look_anghalf, looking_arc + 215 - gun_pos, FREEZE, shade, o | pin, pal);

View file

@ -236,7 +236,7 @@ int hitawall(struct player_struct* p, int* hitw)
DDukeActor* aim(DDukeActor* actor, int aang)
{
char gotshrinker, gotfreezer;
bool gotshrinker, gotfreezer;
int a, k, cans;
int aimstats[] = { STAT_PLAYER, STAT_DUMMYPLAYER, STAT_ACTOR, STAT_ZOMBIEACTOR };
int dx1, dy1, dx2, dy2, dx3, dy3, smax, sdist;
@ -278,8 +278,8 @@ DDukeActor* aim(DDukeActor* actor, int aang)
if (isRR())
{
gotshrinker = 0;
gotfreezer = 0;
gotshrinker = false;
gotfreezer = false;
}
else if (isWW2GI())
{

View file

@ -41,7 +41,7 @@ short globalskillsound;
binangle myang, omyang;
fixedhoriz myhoriz, omyhoriz, myhorizoff, omyhorizoff;
short mycursectnum, myjumpingcounter;
char myjumpingtoggle, myonground, myhardlanding,myreturntocenter;
uint8_t myjumpingtoggle, myonground, myhardlanding,myreturntocenter;
int fakemovefifoplc;
int myxbak[MOVEFIFOSIZ], myybak[MOVEFIFOSIZ], myzbak[MOVEFIFOSIZ];
int myhorizbak[MOVEFIFOSIZ];

View file

@ -7,7 +7,7 @@ extern short globalskillsound;
extern short mycursectnum, myjumpingcounter;
extern binangle myang, omyang;
extern fixedhoriz myhoriz, omyhoriz, myhorizoff, omyhorizoff;
extern char myjumpingtoggle, myonground, myhardlanding,myreturntocenter;
extern uint8_t myjumpingtoggle, myonground, myhardlanding,myreturntocenter;
extern int fakemovefifoplc;
extern int myxbak[MOVEFIFOSIZ], myybak[MOVEFIFOSIZ], myzbak[MOVEFIFOSIZ];
extern int myhorizbak[MOVEFIFOSIZ];

View file

@ -54,7 +54,7 @@ static inline void tloadtile(int tilenum, int palnum = 0)
static void cachespritenum(spritetype *spr)
{
char maxc;
int maxc;
short j;
int pal = spr->pal;