mirror of
https://github.com/ZDoom/Raze.git
synced 2025-03-13 20:42:11 +00:00
- Duke/RR: checked the rest of the code for shorts and replaced most local ones with ints.
This commit is contained in:
parent
3a73a9f8ed
commit
35b9318580
16 changed files with 27 additions and 35 deletions
|
@ -204,7 +204,7 @@ void renderMirror(int cposx, int cposy, int cposz, binangle cang, fixedhoriz cho
|
|||
|
||||
static void geometryEffect(int cposx, int cposy, int cposz, binangle cang, fixedhoriz choriz, int sect, int smoothratio)
|
||||
{
|
||||
short gs, tgsect, geosect, geoid = 0;
|
||||
int gs, tgsect, geosect, geoid = 0;
|
||||
renderDrawRoomsQ16(cposx, cposy, cposz, cang.asq16(), choriz.asq16(), sect);
|
||||
fi.animatesprites(pm_tsprite, pm_spritesortcnt, cposx, cposy, cang.asbuild(), smoothratio);
|
||||
renderDrawMasks();
|
||||
|
|
|
@ -1396,7 +1396,7 @@ static int ifcanshoottarget(DDukeActor *actor, int g_p, int g_x)
|
|||
int j;
|
||||
if (g_x > 1024)
|
||||
{
|
||||
short sclip, angdif;
|
||||
int sclip, angdif;
|
||||
|
||||
if (badguy(actor) && actor->s->xrepeat > 56)
|
||||
{
|
||||
|
@ -1644,7 +1644,7 @@ int ParseState::parse(void)
|
|||
case concmd_garybanjo:
|
||||
if (banjosound == 0)
|
||||
{
|
||||
short rnum = (krand() & 3) + 1;
|
||||
int rnum = (krand() & 3) + 1;
|
||||
if (rnum == 4)
|
||||
{
|
||||
banjosound = 262;
|
||||
|
|
|
@ -58,9 +58,7 @@ void hud_input(int plnum)
|
|||
int i, k;
|
||||
uint8_t dainv;
|
||||
struct player_struct* p;
|
||||
short unk;
|
||||
|
||||
unk = 0;
|
||||
p = &ps[plnum];
|
||||
auto pact = p->GetActor();
|
||||
|
||||
|
|
|
@ -464,7 +464,7 @@ static void shootstuff(DDukeActor* actor, int p, int sx, int sy, int sz, int sa,
|
|||
auto s = actor->s;
|
||||
int sect = s->sectnum;
|
||||
int vel, zvel;
|
||||
short scount;
|
||||
int scount;
|
||||
|
||||
if (isRRRA())
|
||||
{
|
||||
|
|
|
@ -37,10 +37,10 @@ BEGIN_DUKE_NS
|
|||
|
||||
|
||||
int myx, omyx, myxvel, myy, omyy, myyvel, myz, omyz, myzvel;
|
||||
short globalskillsound;
|
||||
int globalskillsound;
|
||||
binangle myang, omyang;
|
||||
fixedhoriz myhoriz, omyhoriz, myhorizoff, omyhorizoff;
|
||||
short mycursectnum, myjumpingcounter;
|
||||
int mycursectnum, myjumpingcounter;
|
||||
uint8_t myjumpingtoggle, myonground, myhardlanding,myreturntocenter;
|
||||
int fakemovefifoplc;
|
||||
int myxbak[MOVEFIFOSIZ], myybak[MOVEFIFOSIZ], myzbak[MOVEFIFOSIZ];
|
||||
|
@ -103,7 +103,7 @@ void fakedomovethings(void)
|
|||
struct player_struct *p;
|
||||
int i, j, k, doubvel, fz, cz, x, y;
|
||||
Collision clz, chz;
|
||||
short psect, psectlotag, tempsect, backcstat;
|
||||
int psect, psectlotag, tempsect, backcstat;
|
||||
uint8_t shrunk, spritebridge;
|
||||
ESyncBits actions;
|
||||
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
BEGIN_DUKE_NS
|
||||
|
||||
extern int myx, omyx, myxvel, myy, omyy, myyvel, myz, omyz, myzvel;
|
||||
extern short globalskillsound;
|
||||
extern short mycursectnum, myjumpingcounter;
|
||||
extern int globalskillsound;
|
||||
extern int mycursectnum, myjumpingcounter;
|
||||
extern binangle myang, omyang;
|
||||
extern fixedhoriz myhoriz, omyhoriz, myhorizoff, omyhorizoff;
|
||||
extern uint8_t myjumpingtoggle, myonground, myhardlanding,myreturntocenter;
|
||||
|
|
|
@ -52,7 +52,7 @@ int which_palookup = 9;
|
|||
void pickrandomspot(int snum)
|
||||
{
|
||||
struct player_struct *p;
|
||||
short i;
|
||||
int i;
|
||||
|
||||
p = &ps[snum];
|
||||
|
||||
|
@ -262,7 +262,7 @@ void resetplayerstats(int snum)
|
|||
|
||||
void resetweapons(int snum)
|
||||
{
|
||||
short weapon;
|
||||
int weapon;
|
||||
struct player_struct *p;
|
||||
|
||||
p = &ps[snum];
|
||||
|
@ -385,7 +385,7 @@ void resetinventory(int snum)
|
|||
void resetprestat(int snum,int g)
|
||||
{
|
||||
struct player_struct *p;
|
||||
short i;
|
||||
int i;
|
||||
|
||||
p = &ps[snum];
|
||||
|
||||
|
@ -501,7 +501,7 @@ void resetprestat(int snum,int g)
|
|||
void resetpspritevars(int g)
|
||||
{
|
||||
int i, j;
|
||||
short circ;
|
||||
int circ;
|
||||
int firstx, firsty;
|
||||
spritetype* s;
|
||||
int aimmode[MAXPLAYERS];
|
||||
|
@ -947,7 +947,7 @@ static int LoadTheMap(MapRecord *mi, struct player_struct *p, int gamemode)
|
|||
}
|
||||
|
||||
currentLevel = mi;
|
||||
short sect;
|
||||
int16_t sect; // engine still needs 16 bit here.
|
||||
engineLoadBoard(mi->fileName, isShareware(), &p->pos, &lbang, §);// &p->cursectnum);
|
||||
p->cursectnum = sect;
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ static inline void tloadtile(int tilenum, int palnum = 0)
|
|||
static void cachespritenum(spritetype *spr)
|
||||
{
|
||||
int maxc;
|
||||
short j;
|
||||
int j;
|
||||
int pal = spr->pal;
|
||||
|
||||
if (ud.monsters_off && badguy(spr)) return;
|
||||
|
@ -328,7 +328,7 @@ static void cachespritenum(spritetype *spr)
|
|||
|
||||
static void cachegoodsprites(void)
|
||||
{
|
||||
short i;
|
||||
int i;
|
||||
|
||||
tloadtile(BOTTOMSTATUSBAR);
|
||||
if (ud.multimode > 1)
|
||||
|
@ -497,7 +497,7 @@ void prelevel_r(int g)
|
|||
}
|
||||
case 42:
|
||||
{
|
||||
short ii;
|
||||
int ii;
|
||||
int childsectnum = -1;
|
||||
DukeSectIterator it(i);
|
||||
while (auto act = it.Next())
|
||||
|
|
|
@ -66,7 +66,6 @@ BEGIN_DUKE_NS
|
|||
|
||||
/*static*/ int tempsectorz[MAXSECTORS];
|
||||
/*static*/ int tempsectorpicnum[MAXSECTORS];
|
||||
//short tempcursectnum;
|
||||
|
||||
void renderView(spritetype* playersprite, int sectnum, int x, int y, int z, binangle a, fixedhoriz h, binangle rotscrnang, int smoothratio)
|
||||
{
|
||||
|
|
|
@ -214,7 +214,7 @@ bool isanearoperator(int lotag)
|
|||
|
||||
int findplayer(const DDukeActor* actor, int* d)
|
||||
{
|
||||
short j, closest_player;
|
||||
int j, closest_player;
|
||||
int x, closest;
|
||||
auto s = &actor->s->pos;
|
||||
|
||||
|
@ -249,7 +249,7 @@ int findplayer(const DDukeActor* actor, int* d)
|
|||
|
||||
int findotherplayer(int p, int* d)
|
||||
{
|
||||
short j, closest_player;
|
||||
int j, closest_player;
|
||||
int x, closest;
|
||||
|
||||
closest = 0x7fffffff;
|
||||
|
|
|
@ -614,9 +614,7 @@ bool checkhitswitch_d(int snum, int ww, DDukeActor *act)
|
|||
|
||||
void activatebysector_d(int sect, DDukeActor* activator)
|
||||
{
|
||||
short didit;
|
||||
|
||||
didit = 0;
|
||||
int didit = 0;
|
||||
|
||||
DukeSectIterator it(sect);
|
||||
while (auto act = it.Next())
|
||||
|
|
|
@ -1434,7 +1434,7 @@ void checkplayerhurt_r(struct player_struct* p, const Collision &coll)
|
|||
bool checkhitceiling_r(int sn)
|
||||
{
|
||||
auto sectp = §or[sn];
|
||||
short j;
|
||||
int j;
|
||||
|
||||
switch (sectp->ceilingpicnum)
|
||||
{
|
||||
|
@ -2506,7 +2506,7 @@ void checksectors_r(int snum)
|
|||
if (S_CheckActorSoundPlaying(pact, 27) == 0 && S_CheckActorSoundPlaying(pact, 28) == 0 && S_CheckActorSoundPlaying(pact, 29) == 0
|
||||
&& S_CheckActorSoundPlaying(pact, 257) == 0 && S_CheckActorSoundPlaying(pact, 258) == 0)
|
||||
{
|
||||
short snd = krand() % 5;
|
||||
int snd = krand() % 5;
|
||||
if (snd == 0)
|
||||
S_PlayActorSound(27, pact);
|
||||
else if (snd == 1)
|
||||
|
@ -2734,7 +2734,6 @@ void checksectors_r(int snum)
|
|||
|
||||
if (neartagsector >= 0 && (sector[neartagsector].lotag & 16384) == 0 && isanearoperator(sector[neartagsector].lotag))
|
||||
{
|
||||
short unk = 0;
|
||||
DukeSectIterator it(neartagsector);
|
||||
while (auto act = it.Next())
|
||||
{
|
||||
|
|
|
@ -642,7 +642,7 @@ int S_CheckSoundPlaying(int soundNum)
|
|||
void S_MenuSound(void)
|
||||
{
|
||||
static int menunum;
|
||||
static const short menusnds[] =
|
||||
static const uint16_t menusnds[] =
|
||||
{
|
||||
LASERTRIP_EXPLODE,
|
||||
DUKE_GRUNT,
|
||||
|
|
|
@ -435,7 +435,7 @@ void initshell(DDukeActor* actj, DDukeActor* acti, bool isshell)
|
|||
if (actj)
|
||||
{
|
||||
auto spj = actj->s;
|
||||
short snum, a;
|
||||
int snum, a;
|
||||
|
||||
if (spj->picnum == TILE_APLAYER)
|
||||
{
|
||||
|
|
|
@ -609,11 +609,8 @@ int spawn_r(int j, int pn)
|
|||
break;
|
||||
case SOUNDFX:
|
||||
{
|
||||
short tg;
|
||||
sp->cstat |= 32768;
|
||||
changespritestat(i,2);
|
||||
tg = sp->hitag;
|
||||
tg = sp->lotag;
|
||||
}
|
||||
break;
|
||||
case EXPLOSION2:
|
||||
|
|
|
@ -24,7 +24,8 @@ struct DDukeActor
|
|||
{
|
||||
uint8_t cgg;
|
||||
uint8_t spriteextra; // moved here for easier maintenance. This was originally a hacked in field in the sprite structure called 'filler'.
|
||||
short picnum, ang, extra, owner, movflag;
|
||||
short owner; // todo: make a pointer.
|
||||
short picnum, ang, extra, movflag;
|
||||
short tempang, actorstayput, dispicnum;
|
||||
short timetosleep;
|
||||
int floorz, ceilingz, lastvx, lastvy, aflags;
|
||||
|
@ -102,7 +103,7 @@ inline DDukeActor* DDukeActor::array() { return hittype; }
|
|||
|
||||
struct animwalltype
|
||||
{
|
||||
short wallnum, tag;
|
||||
int wallnum, tag;
|
||||
};
|
||||
|
||||
// Todo - put more state in here
|
||||
|
|
Loading…
Reference in a new issue