renamed all signed and unsigned chars to int8_t/uint8_t.

This commit is contained in:
Christoph Oelckers 2021-11-07 12:43:00 +01:00
parent 0eba3335c6
commit e2faeec2ce
13 changed files with 31 additions and 31 deletions

View file

@ -1429,7 +1429,7 @@ void updatesectorz(int32_t const x, int32_t const y, int32_t const z, int* const
*sectnum = -1;
}
void updatesectorneighbor(int32_t const x, int32_t const y, int16_t * const sectnum, int32_t initialMaxDistance /*= INITIALUPDATESECTORDIST*/, int32_t maxDistance /*= MAXUPDATESECTORDIST*/)
void updatesectorneighbor(int32_t const x, int32_t const y, int * const sectnum, int32_t initialMaxDistance /*= INITIALUPDATESECTORDIST*/, int32_t maxDistance /*= MAXUPDATESECTORDIST*/)
{
int const initialsectnum = *sectnum;

View file

@ -1572,8 +1572,8 @@ void moveweapons_r(void)
void movetransports_r(void)
{
char warpdir, warpspriteto;
short k, p, sectlotag;
uint8_t warpdir, warpspriteto;
int k, p, sectlotag;
int ll2, ll, onfloorz;
Collision coll;

View file

@ -415,7 +415,7 @@ void animatesprites_d(spritetype* tsprite, int& spritesortcnt, int x, int y, int
{
l = s->z - ps[p].GetActor()->floorz + (3 << 8);
if (l > 1024 && s->yrepeat > 32 && s->extra > 0)
s->yoffset = (signed char)(l / (s->yrepeat << 2));
s->yoffset = (int8_t)(l / (s->yrepeat << 2));
else s->yoffset = 0;
}

View file

@ -465,7 +465,7 @@ void animatesprites_r(spritetype* tsprite, int& spritesortcnt, int x, int y, int
{
l = s->z - ps[p].GetActor()->floorz + (3 << 8);
if (l > 1024 && s->yrepeat > 32 && s->extra > 0)
s->yoffset = (signed char)(l / (s->yrepeat << 2));
s->yoffset = (int8_t)(l / (s->yrepeat << 2));
else s->yoffset = 0;
}

View file

@ -66,7 +66,7 @@ static int ccmd_spawn(CCmdFuncPtr parm)
case 3: // cstat
cstat = (unsigned short)atol(parm->parms[2]); set |= 2;
case 2: // pal
pal = (unsigned char)atol(parm->parms[1]); set |= 1;
pal = (uint8_t)atol(parm->parms[1]); set |= 1;
case 1: // tile number
if (isdigit(parm->parms[0][0])) {
picnum = (unsigned short)atol(parm->parms[0]);

View file

@ -206,7 +206,7 @@ inline int hitscan(int x, int y, int z, int sectnum, int32_t vx, int32_t vy, int
return res;
}
inline void neartag(int32_t xs, int32_t ys, int32_t zs, int16_t sectnum, int16_t ange,
inline void neartag(int32_t xs, int32_t ys, int32_t zs, int sectnum, int ange,
int* neartagsector, int* neartagwall, DDukeActor** neartagsprite,
int32_t* neartaghitdist, int32_t neartagrange, uint8_t tagsearch)
{

View file

@ -169,7 +169,7 @@ int furthestangle(DDukeActor* snum, int angDiv);
void getglobalz(DDukeActor* s);
void OnEvent(int id, int pnum = -1, DDukeActor* snum = nullptr, int dist = -1);
DDukeActor* EGS(short whatsect, int s_x, int s_y, int s_z, short s_pn, signed char s_s, signed char s_xr, signed char s_yr, short s_a, short s_ve, int s_zv, DDukeActor* s_ow, signed char s_ss);
DDukeActor* EGS(short whatsect, int s_x, int s_y, int s_z, short s_pn, int8_t s_s, int8_t s_xr, int8_t s_yr, short s_a, short s_ve, int s_zv, DDukeActor* s_ow, int8_t s_ss);
void ceilingglass(DDukeActor* snum, int sectnum, int cnt);
void spriteglass(DDukeActor* snum, int cnt);
void lotsofcolourglass(DDukeActor* snum, int wallNum, int cnt);

View file

@ -215,7 +215,7 @@ void V_AddBlend (float r, float g, float b, float a, float v_blend[4])
void drawoverlays(double smoothratio)
{
unsigned char fader = 0, fadeg = 0, fadeb = 0, fadef = 0, tintr = 0, tintg = 0, tintb = 0, tintf = 0, dotint = 0;
uint8_t fader = 0, fadeg = 0, fadeb = 0, fadef = 0, tintr = 0, tintg = 0, tintb = 0, tintf = 0, dotint = 0;
struct player_struct* pp;
int cposx, cposy, cang;

View file

@ -2971,7 +2971,7 @@ int ConCompiler::parsecommand()
}
#endif
// syntax:
// int x, int y, short tilenum, signed char shade, char orientation
// int x, int y, short tilenum, int8_t shade, char orientation
// myospal adds char pal
// Parse: x

View file

@ -221,7 +221,7 @@ void displayweapon_d(int snum, double smoothratio)
int i, j;
int o, pal;
double weapon_sway, weapon_xoffset, gun_pos, looking_arc, kickback_pic, random_club_frame, hard_landing, look_anghalf, horiz16th, plravel;
signed char shade;
int8_t shade;
struct player_struct *p;
p = &ps[snum];
@ -813,7 +813,7 @@ void displayweapon_d(int snum, double smoothratio)
auto displayhandremote = [&]()
{
signed char remote_frames[] = { 0,1,1,2,1,1,0,0,0,0,0 };
int8_t remote_frames[] = { 0,1,1,2,1,1,0,0,0,0,0 };
weapon_xoffset = -48;

View file

@ -111,7 +111,7 @@ void displayweapon_r(int snum, double smoothratio)
int i, j;
double weapon_sway, weapon_xoffset, gun_pos, looking_arc, look_anghalf, hard_landing, TiltStatus;
char o,pal;
signed char shade;
int8_t shade;
auto p = &ps[snum];
auto kb = &p->kickback_pic;
@ -825,7 +825,7 @@ void displayweapon_r(int snum, double smoothratio)
}
else
{
signed char kb_frames[] = { 1,1,1,1,1,2,2,2,2,2,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0 };
int8_t kb_frames[] = { 1,1,1,1,1,2,2,2,2,2,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0 };
short frm = kb_frames[*kb];
rd2myospal(weapon_xoffset + 184 - look_anghalf,
looking_arc + 240 - gun_pos, SHRINKER + frm, shade, o, 0);

View file

@ -49,7 +49,7 @@ BEGIN_DUKE_NS
//
//---------------------------------------------------------------------------
DDukeActor* EGS(short whatsect, int s_x, int s_y, int s_z, short s_pn, signed char s_s, signed char s_xr, signed char s_yr, short s_a, short s_ve, int s_zv, DDukeActor* s_ow, signed char s_ss)
DDukeActor* EGS(short whatsect, int s_x, int s_y, int s_z, short s_pn, int8_t s_s, int8_t s_xr, int8_t s_yr, short s_a, short s_ve, int s_zv, DDukeActor* s_ow, int8_t s_ss)
{
int const i = insertsprite(whatsect, s_ss);

View file

@ -13,7 +13,7 @@ struct STATUSBARTYPE
{
short frag[MAXPLAYERS], got_access, last_extra, shield_amount, curr_weapon;
short ammo_amount[MAX_WEAPONS];
unsigned char inven_icon, jetpack_on, heat_on;
uint8_t inven_icon, jetpack_on, heat_on;
short firstaid_amount, steroids_amount, holoduke_amount, jetpack_amount;
short heat_amount, scuba_amount, boot_amount;
short last_weapon, weapon_pos, kickback_pic;
@ -124,9 +124,9 @@ struct TileInfo
struct user_defs
{
unsigned char god, cashman, eog;
unsigned char clipping;
unsigned char user_pals[MAXPLAYERS];
uint8_t god, cashman, eog;
uint8_t clipping;
uint8_t user_pals[MAXPLAYERS];
short from_bonus;
short last_level, secretlevel;
@ -181,8 +181,8 @@ struct player_struct
int oweapon_sway;
short weapon_pos, kickback_pic, random_club_frame;
short oweapon_pos, okickback_pic, orandom_club_frame;
unsigned char hard_landing;
unsigned char ohard_landing;
uint8_t hard_landing;
uint8_t ohard_landing;
// Store current psectlotag as determined in processinput() for use with scaling angle aiming.
short psectlotag;
@ -223,20 +223,20 @@ struct player_struct
short pycount, frag_ps;
short transporter_hold, last_full_weapon, footprintshade, boot_amount;
unsigned char on_warping_sector, footprintcount;
unsigned char hbomb_on, jumping_toggle, rapid_fire_hold, on_ground;
uint8_t on_warping_sector, footprintcount;
uint8_t hbomb_on, jumping_toggle, rapid_fire_hold, on_ground;
char name[32];
unsigned char inven_icon, buttonpalette;
uint8_t inven_icon, buttonpalette;
unsigned char jetpack_on, spritebridge, lastrandomspot;
unsigned char scuba_on, footprintpal, heat_on;
uint8_t jetpack_on, spritebridge, lastrandomspot;
uint8_t scuba_on, footprintpal, heat_on;
unsigned char holster_weapon;
unsigned char falling_counter;
unsigned char refresh_inventory;
uint8_t holster_weapon;
uint8_t falling_counter;
uint8_t refresh_inventory;
unsigned char toggle_key_flag, knuckle_incs; // ,select_dir;
unsigned char walking_snd_toggle, palookup;
uint8_t toggle_key_flag, knuckle_incs; // ,select_dir;
uint8_t walking_snd_toggle, palookup;
bool quick_kick_msg;
int max_secret_rooms, secret_rooms, max_actors_killed, actors_killed;