mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-15 20:20:54 +00:00
- fixed all issues with SWBOOL as pointed out by a type-safe wrapper class.
This commit is contained in:
parent
1a647e8104
commit
e044582aef
24 changed files with 87 additions and 52 deletions
|
@ -308,8 +308,7 @@ DoActorNoise(ANIMATORp Action, short SpriteNum)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
bool CanSeePlayer(short SpriteNum)
|
||||||
CanSeePlayer(short SpriteNum)
|
|
||||||
{
|
{
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp sp = User[SpriteNum]->SpriteP;
|
SPRITEp sp = User[SpriteNum]->SpriteP;
|
||||||
|
|
|
@ -76,7 +76,7 @@ SWBOOL ActorFlaming(short SpriteNum);
|
||||||
void DoActorSetSpeed(short SpriteNum,uint8_t speed);
|
void DoActorSetSpeed(short SpriteNum,uint8_t speed);
|
||||||
short ChooseActionNumber(short decision[]);
|
short ChooseActionNumber(short decision[]);
|
||||||
int DoActorNoise(ANIMATORp Action,short SpriteNum);
|
int DoActorNoise(ANIMATORp Action,short SpriteNum);
|
||||||
int CanSeePlayer(short SpriteNum);
|
bool CanSeePlayer(short SpriteNum);
|
||||||
int CanHitPlayer(short SpriteNum);
|
int CanHitPlayer(short SpriteNum);
|
||||||
int DoActorPickClosePlayer(short SpriteNum);
|
int DoActorPickClosePlayer(short SpriteNum);
|
||||||
int CloseRangeDist(SPRITEp sp1,SPRITEp sp2);
|
int CloseRangeDist(SPRITEp sp1,SPRITEp sp2);
|
||||||
|
|
|
@ -668,7 +668,7 @@ SWBOOL UserBreakWall(WALLp wp, short)
|
||||||
int block_flags = CSTAT_WALL_BLOCK|CSTAT_WALL_BLOCK_HITSCAN;
|
int block_flags = CSTAT_WALL_BLOCK|CSTAT_WALL_BLOCK_HITSCAN;
|
||||||
int type_flags = CSTAT_WALL_TRANSLUCENT|CSTAT_WALL_MASKED|CSTAT_WALL_1WAY;
|
int type_flags = CSTAT_WALL_TRANSLUCENT|CSTAT_WALL_MASKED|CSTAT_WALL_1WAY;
|
||||||
int flags = block_flags|type_flags;
|
int flags = block_flags|type_flags;
|
||||||
short ret = false;
|
SWBOOL ret = false;
|
||||||
|
|
||||||
SpriteNum = FindBreakSpriteMatch(match);
|
SpriteNum = FindBreakSpriteMatch(match);
|
||||||
|
|
||||||
|
|
|
@ -855,7 +855,6 @@ DoBunnyBeginJumpAttack(short SpriteNum)
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
SPRITEp sp = &sprite[SpriteNum];
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp psp = User[SpriteNum]->tgt_sp;
|
SPRITEp psp = User[SpriteNum]->tgt_sp;
|
||||||
int CanSeePlayer(short SpriteNum);
|
|
||||||
short tang;
|
short tang;
|
||||||
|
|
||||||
tang = getangle(psp->x - sp->x, psp->y - sp->y);
|
tang = getangle(psp->x - sp->x, psp->y - sp->y);
|
||||||
|
|
|
@ -103,7 +103,7 @@ bool RestartCheat(cheatseq_t* c)
|
||||||
|
|
||||||
bool RoomCheat(cheatseq_t* c)
|
bool RoomCheat(cheatseq_t* c)
|
||||||
{
|
{
|
||||||
FAF_DebugView ^= 1;
|
FAF_DebugView = !FAF_DebugView;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -161,7 +161,7 @@ bool WarpCheat(cheatseq_t* c)
|
||||||
|
|
||||||
bool EveryCheatToggle(cheatseq_t* c)
|
bool EveryCheatToggle(cheatseq_t* c)
|
||||||
{
|
{
|
||||||
EveryCheat ^= 1;
|
EveryCheat = !EveryCheat;
|
||||||
C_DoCommand("god");
|
C_DoCommand("god");
|
||||||
C_DoCommand("give weapons");
|
C_DoCommand("give weapons");
|
||||||
C_DoCommand("give items");
|
C_DoCommand("give items");
|
||||||
|
|
|
@ -97,7 +97,7 @@ extern int sw_snd_scratch;
|
||||||
int GameVersion = 20;
|
int GameVersion = 20;
|
||||||
|
|
||||||
SWBOOL NoMeters = false;
|
SWBOOL NoMeters = false;
|
||||||
SWBOOL FinishAnim = 0;
|
int FinishAnim = 0;
|
||||||
SWBOOL ReloadPrompt = false;
|
SWBOOL ReloadPrompt = false;
|
||||||
SWBOOL NewGame = false;
|
SWBOOL NewGame = false;
|
||||||
SWBOOL SavegameLoaded = false;
|
SWBOOL SavegameLoaded = false;
|
||||||
|
@ -127,7 +127,6 @@ GAME_SET gs;
|
||||||
|
|
||||||
SWBOOL PlayerTrackingMode = false;
|
SWBOOL PlayerTrackingMode = false;
|
||||||
SWBOOL SlowMode = false;
|
SWBOOL SlowMode = false;
|
||||||
SWBOOL FrameAdvanceTics = 3;
|
|
||||||
|
|
||||||
SWBOOL DebugOperate = false;
|
SWBOOL DebugOperate = false;
|
||||||
void LoadingLevelScreen(void);
|
void LoadingLevelScreen(void);
|
||||||
|
@ -292,7 +291,7 @@ void InitLevelGlobals2(void)
|
||||||
InitTimingVars();
|
InitTimingVars();
|
||||||
TotalKillable = 0;
|
TotalKillable = 0;
|
||||||
Bunny_Count = 0;
|
Bunny_Count = 0;
|
||||||
FinishAnim = 0;
|
FinishAnim = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
@ -576,7 +575,7 @@ void GameInterface::LevelCompleted(MapRecord *map, int skill)
|
||||||
if (map == nullptr)
|
if (map == nullptr)
|
||||||
{
|
{
|
||||||
STAT_Update(true);
|
STAT_Update(true);
|
||||||
FinishAnim = 0;
|
FinishAnim = false;
|
||||||
PlaySong(nullptr, ThemeSongs[0], ThemeTrack[0]);
|
PlaySong(nullptr, ThemeSongs[0], ThemeTrack[0]);
|
||||||
if (SW_SHAREWARE) gameaction = ga_creditsmenu;
|
if (SW_SHAREWARE) gameaction = ga_creditsmenu;
|
||||||
else gameaction = ga_mainmenu;
|
else gameaction = ga_mainmenu;
|
||||||
|
@ -687,7 +686,7 @@ void GameInterface::ErrorCleanup()
|
||||||
// Make sure we do not leave the game in an unstable state
|
// Make sure we do not leave the game in an unstable state
|
||||||
TerminateLevel();
|
TerminateLevel();
|
||||||
SavegameLoaded = false;
|
SavegameLoaded = false;
|
||||||
FinishAnim = 0;
|
FinishAnim = false;
|
||||||
}
|
}
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
|
|
|
@ -1926,7 +1926,7 @@ void EnemyDefaults(short SpriteNum, ACTOR_ACTION_SETp action, PERSONALITYp perso
|
||||||
void getzrangepoint(int x, int y, int z, short sectnum, int32_t* ceilz, int32_t* ceilhit, int32_t* florz, int32_t* florhit);
|
void getzrangepoint(int x, int y, int z, short sectnum, int32_t* ceilz, int32_t* ceilhit, int32_t* florz, int32_t* florhit);
|
||||||
int move_sprite(short spritenum, int xchange, int ychange, int zchange, int ceildist, int flordist, uint32_t cliptype, int numtics);
|
int move_sprite(short spritenum, int xchange, int ychange, int zchange, int ceildist, int flordist, uint32_t cliptype, int numtics);
|
||||||
int move_missile(short spritenum, int xchange, int ychange, int zchange, int ceildist, int flordist, uint32_t cliptype, int numtics);
|
int move_missile(short spritenum, int xchange, int ychange, int zchange, int ceildist, int flordist, uint32_t cliptype, int numtics);
|
||||||
int DoPickTarget(SPRITEp sp, uint32_t max_delta_ang, SWBOOL skip_targets);
|
int DoPickTarget(SPRITEp sp, uint32_t max_delta_ang, int skip_targets);
|
||||||
|
|
||||||
void change_sprite_stat(short, short);
|
void change_sprite_stat(short, short);
|
||||||
void SetOwner(short, short);
|
void SetOwner(short, short);
|
||||||
|
@ -2044,7 +2044,7 @@ extern USER puser[MAX_SW_PLAYERS_REG];
|
||||||
///////////////////////////
|
///////////////////////////
|
||||||
|
|
||||||
extern double smoothratio;
|
extern double smoothratio;
|
||||||
extern SWBOOL MoveSkip4, MoveSkip2, MoveSkip8;
|
extern int MoveSkip4, MoveSkip2, MoveSkip8;
|
||||||
|
|
||||||
#define MASTER_SWITCHING 1
|
#define MASTER_SWITCHING 1
|
||||||
|
|
||||||
|
|
|
@ -349,7 +349,7 @@ SWBOOL so_writeinterpolations(MFILE_WRITE fil)
|
||||||
int32_t i;
|
int32_t i;
|
||||||
SECTOR_OBJECTp sop;
|
SECTOR_OBJECTp sop;
|
||||||
so_interp *interp;
|
so_interp *interp;
|
||||||
SWBOOL saveisshot = false;
|
int saveisshot = 0;
|
||||||
|
|
||||||
for (sop = SectorObject, interp = so_interpdata;
|
for (sop = SectorObject, interp = so_interpdata;
|
||||||
sop < &SectorObject[MAX_SECTOR_OBJECTS]; sop++, interp++)
|
sop < &SectorObject[MAX_SECTOR_OBJECTS]; sop++, interp++)
|
||||||
|
@ -364,17 +364,17 @@ SWBOOL so_writeinterpolations(MFILE_WRITE fil)
|
||||||
MWRITE(&data->spriteofang,sizeof(data->spriteofang),1,fil);
|
MWRITE(&data->spriteofang,sizeof(data->spriteofang),1,fil);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return saveisshot;
|
return !!saveisshot;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LoadSymDataInfo(MFILE_READ fil, void **ptr);
|
int LoadSymDataInfo(MFILE_READ fil, void** ptr);
|
||||||
|
|
||||||
SWBOOL so_readinterpolations(MFILE_READ fil)
|
SWBOOL so_readinterpolations(MFILE_READ fil)
|
||||||
{
|
{
|
||||||
int32_t i;
|
int32_t i;
|
||||||
SECTOR_OBJECTp sop;
|
SECTOR_OBJECTp sop;
|
||||||
so_interp *interp;
|
so_interp *interp;
|
||||||
SWBOOL saveisshot = false;
|
int saveisshot = 0;
|
||||||
|
|
||||||
for (sop = SectorObject, interp = so_interpdata;
|
for (sop = SectorObject, interp = so_interpdata;
|
||||||
sop < &SectorObject[MAX_SECTOR_OBJECTS]; sop++, interp++)
|
sop < &SectorObject[MAX_SECTOR_OBJECTS]; sop++, interp++)
|
||||||
|
@ -393,7 +393,7 @@ SWBOOL so_readinterpolations(MFILE_READ fil)
|
||||||
interp->tic = 0;
|
interp->tic = 0;
|
||||||
interp->lasttic = synctics;
|
interp->lasttic = synctics;
|
||||||
}
|
}
|
||||||
return saveisshot;
|
return !!saveisshot;
|
||||||
}
|
}
|
||||||
|
|
||||||
END_SW_NS
|
END_SW_NS
|
||||||
|
|
|
@ -560,7 +560,7 @@ void JS_DrawCameras(PLAYERp pp, int tx, int ty, int tz)
|
||||||
if (TEST_GOTPIC(cnt + MIRRORLABEL) || ((unsigned)mirror[cnt].campic < MAXTILES && TEST_GOTPIC(mirror[cnt].campic)))
|
if (TEST_GOTPIC(cnt + MIRRORLABEL) || ((unsigned)mirror[cnt].campic < MAXTILES && TEST_GOTPIC(mirror[cnt].campic)))
|
||||||
{
|
{
|
||||||
// Do not change any global state here!
|
// Do not change any global state here!
|
||||||
bIsWallMirror = (TEST_GOTPIC(cnt + MIRRORLABEL));
|
bIsWallMirror = !!(TEST_GOTPIC(cnt + MIRRORLABEL));
|
||||||
dist = 0x7fffffff;
|
dist = 0x7fffffff;
|
||||||
|
|
||||||
if (bIsWallMirror)
|
if (bIsWallMirror)
|
||||||
|
|
|
@ -34,7 +34,47 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
#define OFF 0
|
#define OFF 0
|
||||||
#define ON 1
|
#define ON 1
|
||||||
|
|
||||||
typedef unsigned char SWBOOL;
|
class SWBOOL
|
||||||
|
{
|
||||||
|
bool value;
|
||||||
|
|
||||||
|
public:
|
||||||
|
SWBOOL(bool val) { value = val; }
|
||||||
|
SWBOOL() = default;
|
||||||
|
SWBOOL(unsigned char) = delete;
|
||||||
|
SWBOOL(signed char) = delete;
|
||||||
|
SWBOOL(char) = delete;
|
||||||
|
SWBOOL(unsigned short) = delete;
|
||||||
|
SWBOOL(short) = delete;
|
||||||
|
SWBOOL(unsigned int) = delete;
|
||||||
|
SWBOOL(int) = delete;
|
||||||
|
SWBOOL(double) = delete;
|
||||||
|
SWBOOL(float) = delete;
|
||||||
|
SWBOOL(const void *) = delete;
|
||||||
|
SWBOOL& operator=(bool v) { value = v; return *this; }
|
||||||
|
SWBOOL& operator=(char v) = delete;
|
||||||
|
SWBOOL& operator=(signed char v) = delete;
|
||||||
|
SWBOOL& operator=(unsigned char v) = delete;
|
||||||
|
SWBOOL& operator=(signed short v) = delete;
|
||||||
|
SWBOOL& operator=(unsigned short v) = delete;
|
||||||
|
SWBOOL& operator=(signed int v) = delete;
|
||||||
|
SWBOOL& operator=(unsigned int v) = delete;
|
||||||
|
SWBOOL& operator=(float v) = delete;
|
||||||
|
SWBOOL& operator=(double v) = delete;
|
||||||
|
SWBOOL& operator=(const void *v) = delete;
|
||||||
|
operator bool() { return value; }
|
||||||
|
SWBOOL& operator |=(bool b) { value |= b; return*this; }
|
||||||
|
SWBOOL& operator|=(char v) = delete;
|
||||||
|
SWBOOL& operator|=(signed char v) = delete;
|
||||||
|
SWBOOL& operator|=(unsigned char v) = delete;
|
||||||
|
SWBOOL& operator|=(signed short v) = delete;
|
||||||
|
SWBOOL& operator|=(unsigned short v) = delete;
|
||||||
|
SWBOOL& operator|=(signed int v) = delete;
|
||||||
|
SWBOOL& operator|=(unsigned int v) = delete;
|
||||||
|
SWBOOL& operator|=(float v) = delete;
|
||||||
|
SWBOOL& operator|=(double v) = delete;
|
||||||
|
SWBOOL& operator|=(const void* v) = delete;
|
||||||
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
===========================
|
===========================
|
||||||
|
|
|
@ -2384,7 +2384,7 @@ void
|
||||||
pUziAction(PANEL_SPRITEp psp)
|
pUziAction(PANEL_SPRITEp psp)
|
||||||
{
|
{
|
||||||
char shooting;
|
char shooting;
|
||||||
static SWBOOL alternate = false;
|
static int alternate = 0;
|
||||||
|
|
||||||
shooting = (psp->PlayerP->input.actions & SB_FIRE) && (psp->PlayerP->KeyPressBits & SB_FIRE);
|
shooting = (psp->PlayerP->input.actions & SB_FIRE) && (psp->PlayerP->KeyPressBits & SB_FIRE);
|
||||||
|
|
||||||
|
|
|
@ -81,7 +81,7 @@ USER puser[MAX_SW_PLAYERS_REG];
|
||||||
|
|
||||||
//int16_t gNet.MultiGameType = MULTI_GAME_NONE;
|
//int16_t gNet.MultiGameType = MULTI_GAME_NONE;
|
||||||
SWBOOL NightVision = false;
|
SWBOOL NightVision = false;
|
||||||
extern SWBOOL FinishAnim;
|
extern int FinishAnim;
|
||||||
|
|
||||||
|
|
||||||
// the smaller the number the slower the going
|
// the smaller the number the slower the going
|
||||||
|
@ -1180,7 +1180,7 @@ FAFcansee(int32_t xs, int32_t ys, int32_t zs, int16_t sects,
|
||||||
int32_t xe, int32_t ye, int32_t ze, int16_t secte);
|
int32_t xe, int32_t ye, int32_t ze, int16_t secte);
|
||||||
|
|
||||||
int
|
int
|
||||||
DoPickTarget(SPRITEp sp, uint32_t max_delta_ang, SWBOOL skip_targets)
|
DoPickTarget(SPRITEp sp, uint32_t max_delta_ang, int skip_targets)
|
||||||
{
|
{
|
||||||
#define PICK_DIST 40000L
|
#define PICK_DIST 40000L
|
||||||
|
|
||||||
|
@ -4212,7 +4212,7 @@ PlayerOnLadder(PLAYERp pp)
|
||||||
};
|
};
|
||||||
|
|
||||||
if (Prediction)
|
if (Prediction)
|
||||||
return 0;
|
return false;
|
||||||
|
|
||||||
neartag(pp->posx, pp->posy, pp->posz, pp->cursectnum, FixedToInt(pp->q16ang),
|
neartag(pp->posx, pp->posy, pp->posz, pp->cursectnum, FixedToInt(pp->q16ang),
|
||||||
&neartagsector, &neartagwall, &neartagsprite,
|
&neartagsector, &neartagwall, &neartagsprite,
|
||||||
|
|
|
@ -125,7 +125,7 @@ int SetVisHigh(void);
|
||||||
int SetVisNorm(void);
|
int SetVisNorm(void);
|
||||||
void DoWeapon(void);
|
void DoWeapon(void);
|
||||||
void HeadBobStateControl(void);
|
void HeadBobStateControl(void);
|
||||||
int DoPickTarget(SPRITEp sp, uint32_t max_delta_ang, SWBOOL skip_targets);
|
int DoPickTarget(SPRITEp sp, uint32_t max_delta_ang, int skip_targets);
|
||||||
void DoPlayer(void);
|
void DoPlayer(void);
|
||||||
void domovethings(void);
|
void domovethings(void);
|
||||||
void InitAllPlayers(void);
|
void InitAllPlayers(void);
|
||||||
|
|
|
@ -1089,7 +1089,6 @@ DoRipperBeginJumpAttack(short SpriteNum)
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
SPRITEp sp = &sprite[SpriteNum];
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp psp = User[SpriteNum]->tgt_sp;
|
SPRITEp psp = User[SpriteNum]->tgt_sp;
|
||||||
int CanSeePlayer(short SpriteNum);
|
|
||||||
short tang;
|
short tang;
|
||||||
|
|
||||||
tang = getangle(psp->x - sp->x, psp->y - sp->y);
|
tang = getangle(psp->x - sp->x, psp->y - sp->y);
|
||||||
|
|
|
@ -1096,7 +1096,6 @@ DoRipper2BeginJumpAttack(short SpriteNum)
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
SPRITEp sp = &sprite[SpriteNum];
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp psp = User[SpriteNum]->tgt_sp;
|
SPRITEp psp = User[SpriteNum]->tgt_sp;
|
||||||
int CanSeePlayer(short SpriteNum);
|
|
||||||
short tang;
|
short tang;
|
||||||
|
|
||||||
tang = getangle(psp->x - sp->x, psp->y - sp->y);
|
tang = getangle(psp->x - sp->x, psp->y - sp->y);
|
||||||
|
|
|
@ -53,7 +53,7 @@ typedef struct
|
||||||
|
|
||||||
SAVE save;
|
SAVE save;
|
||||||
|
|
||||||
SWBOOL FAF_DebugView = 0;
|
SWBOOL FAF_DebugView = false;
|
||||||
|
|
||||||
void COVERupdatesector(int32_t x, int32_t y, int16_t* newsector)
|
void COVERupdatesector(int32_t x, int32_t y, int16_t* newsector)
|
||||||
{
|
{
|
||||||
|
@ -282,7 +282,7 @@ FAFcansee(int32_t xs, int32_t ys, int32_t zs, int16_t sects,
|
||||||
// early out to regular routine
|
// early out to regular routine
|
||||||
if ((sects < 0 || !FAF_Sector(sects)) && (secte < 0 || !FAF_Sector(secte)))
|
if ((sects < 0 || !FAF_Sector(sects)) && (secte < 0 || !FAF_Sector(secte)))
|
||||||
{
|
{
|
||||||
return cansee(xs,ys,zs,sects,xe,ye,ze,secte);
|
return !!cansee(xs,ys,zs,sects,xe,ye,ze,secte);
|
||||||
}
|
}
|
||||||
|
|
||||||
// get angle
|
// get angle
|
||||||
|
@ -336,11 +336,11 @@ FAFcansee(int32_t xs, int32_t ys, int32_t zs, int16_t sects,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return cansee(xs,ys,zs,sects,xe,ye,ze,secte);
|
return !!cansee(xs,ys,zs,sects,xe,ye,ze,secte);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (plax_found)
|
if (plax_found)
|
||||||
return cansee(hitinfo.pos.x,hitinfo.pos.y,hitinfo.pos.z,newsectnum,xe,ye,ze,secte);
|
return !!cansee(hitinfo.pos.x,hitinfo.pos.y,hitinfo.pos.z,newsectnum,xe,ye,ze,secte);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -73,7 +73,7 @@ extern short Bunny_Count;
|
||||||
extern SWBOOL NewGame;
|
extern SWBOOL NewGame;
|
||||||
extern int GodMode;
|
extern int GodMode;
|
||||||
extern int FinishTimer;
|
extern int FinishTimer;
|
||||||
extern SWBOOL FinishAnim;
|
extern int FinishAnim;
|
||||||
extern int GameVersion;
|
extern int GameVersion;
|
||||||
//extern short Zombies;
|
//extern short Zombies;
|
||||||
|
|
||||||
|
|
|
@ -1625,7 +1625,7 @@ SWBOOL ComboSwitchTest(short combo_type, short match)
|
||||||
{
|
{
|
||||||
short i,nexti;
|
short i,nexti;
|
||||||
SPRITEp sp;
|
SPRITEp sp;
|
||||||
SWBOOL state;
|
int state;
|
||||||
|
|
||||||
TRAVERSE_SPRITE_STAT(headspritestat[STAT_DEFAULT], i, nexti)
|
TRAVERSE_SPRITE_STAT(headspritestat[STAT_DEFAULT], i, nexti)
|
||||||
{
|
{
|
||||||
|
|
|
@ -78,7 +78,7 @@ void PlaySpriteSound(short spritenum, int attrib_ndx, Voc3D_Flags flags);
|
||||||
void DeleteNoSoundOwner(short spritenum);
|
void DeleteNoSoundOwner(short spritenum);
|
||||||
void DeleteNoFollowSoundOwner(short spritenum);
|
void DeleteNoFollowSoundOwner(short spritenum);
|
||||||
|
|
||||||
inline SWBOOL CacheSound(int num, int type) { return false; }
|
inline bool CacheSound(int num, int type) { return false; }
|
||||||
void COVER_SetReverb(int amt);
|
void COVER_SetReverb(int amt);
|
||||||
void UnInitSound(void);
|
void UnInitSound(void);
|
||||||
void InitFX(void);
|
void InitFX(void);
|
||||||
|
|
|
@ -104,7 +104,7 @@ void SetSpikeActive(short SpriteNum)
|
||||||
else
|
else
|
||||||
short_setinterpolation(§p->floorheinum);
|
short_setinterpolation(§p->floorheinum);
|
||||||
|
|
||||||
InterpSectorSprites(sp->sectnum, ON);
|
InterpSectorSprites(sp->sectnum, true);
|
||||||
|
|
||||||
// play activate sound
|
// play activate sound
|
||||||
DoSoundSpotMatch(SP_TAG2(sp), 1, SOUND_OBJECT_TYPE);
|
DoSoundSpotMatch(SP_TAG2(sp), 1, SOUND_OBJECT_TYPE);
|
||||||
|
@ -132,7 +132,7 @@ void SetSpikeInactive(short SpriteNum)
|
||||||
else
|
else
|
||||||
short_stopinterpolation(§p->floorheinum);
|
short_stopinterpolation(§p->floorheinum);
|
||||||
|
|
||||||
InterpSectorSprites(sp->sectnum, OFF);
|
InterpSectorSprites(sp->sectnum, false);
|
||||||
|
|
||||||
// play activate sound
|
// play activate sound
|
||||||
DoSoundSpotMatch(SP_TAG2(sp), 2, SOUND_OBJECT_TYPE);
|
DoSoundSpotMatch(SP_TAG2(sp), 2, SOUND_OBJECT_TYPE);
|
||||||
|
|
|
@ -91,7 +91,7 @@ void InitWeaponRocket(PLAYERp);
|
||||||
void InitWeaponUzi(PLAYERp);
|
void InitWeaponUzi(PLAYERp);
|
||||||
|
|
||||||
SWBOOL FAF_Sector(short sectnum);
|
SWBOOL FAF_Sector(short sectnum);
|
||||||
SWBOOL MoveSkip4, MoveSkip2, MoveSkip8;
|
int MoveSkip4, MoveSkip2, MoveSkip8;
|
||||||
|
|
||||||
extern STATE s_CarryFlag[];
|
extern STATE s_CarryFlag[];
|
||||||
extern STATE s_CarryFlagNoDet[];
|
extern STATE s_CarryFlagNoDet[];
|
||||||
|
@ -1128,7 +1128,7 @@ void PreCachePachinko(void);
|
||||||
SWBOOL
|
SWBOOL
|
||||||
ActorSpawn(SPRITEp sp)
|
ActorSpawn(SPRITEp sp)
|
||||||
{
|
{
|
||||||
int ret = true;
|
bool ret = true;
|
||||||
short SpriteNum = sp - sprite;
|
short SpriteNum = sp - sprite;
|
||||||
|
|
||||||
switch (sp->picnum)
|
switch (sp->picnum)
|
||||||
|
@ -2329,7 +2329,7 @@ SpriteSetup(void)
|
||||||
sectp->floorz += amt;
|
sectp->floorz += amt;
|
||||||
u->z_tgt = u->sz;
|
u->z_tgt = u->sz;
|
||||||
|
|
||||||
MoveSpritesWithSector(sp->sectnum, amt, 0); // floor
|
MoveSpritesWithSector(sp->sectnum, amt, false); // floor
|
||||||
}
|
}
|
||||||
|
|
||||||
// set orig z
|
// set orig z
|
||||||
|
@ -2350,7 +2350,7 @@ SpriteSetup(void)
|
||||||
sectp->ceilingz += amt;
|
sectp->ceilingz += amt;
|
||||||
u->z_tgt = u->sz;
|
u->z_tgt = u->sz;
|
||||||
|
|
||||||
MoveSpritesWithSector(sp->sectnum, amt, 1); // ceiling
|
MoveSpritesWithSector(sp->sectnum, amt, true); // ceiling
|
||||||
}
|
}
|
||||||
|
|
||||||
// set orig z
|
// set orig z
|
||||||
|
|
|
@ -857,7 +857,7 @@ BossHealthMeter(void)
|
||||||
|
|
||||||
// Frank, good optimization for other levels, but it broke level 20. :(
|
// Frank, good optimization for other levels, but it broke level 20. :(
|
||||||
// I kept this but had to add a fix.
|
// I kept this but had to add a fix.
|
||||||
bosswasseen = serpwasseen|sumowasseen|zillawasseen;
|
bosswasseen = serpwasseen || sumowasseen || zillawasseen;
|
||||||
|
|
||||||
// Only show the meter when you can see the boss
|
// Only show the meter when you can see the boss
|
||||||
if ((currentLevel->levelNumber == 20 && (!serpwasseen || !sumowasseen || !zillawasseen)) || !bosswasseen)
|
if ((currentLevel->levelNumber == 20 && (!serpwasseen || !sumowasseen || !zillawasseen)) || !bosswasseen)
|
||||||
|
|
|
@ -109,7 +109,7 @@ void SetVatorActive(short SpriteNum)
|
||||||
else
|
else
|
||||||
setinterpolation(§p->floorz);
|
setinterpolation(§p->floorz);
|
||||||
|
|
||||||
InterpSectorSprites(sp->sectnum, ON);
|
InterpSectorSprites(sp->sectnum, true);
|
||||||
|
|
||||||
// play activate sound
|
// play activate sound
|
||||||
DoSoundSpotMatch(SP_TAG2(sp), 1, SOUND_OBJECT_TYPE);
|
DoSoundSpotMatch(SP_TAG2(sp), 1, SOUND_OBJECT_TYPE);
|
||||||
|
@ -137,7 +137,7 @@ void SetVatorInactive(short SpriteNum)
|
||||||
else
|
else
|
||||||
stopinterpolation(§p->floorz);
|
stopinterpolation(§p->floorz);
|
||||||
|
|
||||||
InterpSectorSprites(sp->sectnum, OFF);
|
InterpSectorSprites(sp->sectnum, false);
|
||||||
|
|
||||||
// play inactivate sound
|
// play inactivate sound
|
||||||
DoSoundSpotMatch(SP_TAG2(sp), 2, SOUND_OBJECT_TYPE);
|
DoSoundSpotMatch(SP_TAG2(sp), 2, SOUND_OBJECT_TYPE);
|
||||||
|
@ -465,13 +465,13 @@ int DoVator(short SpriteNum)
|
||||||
{
|
{
|
||||||
lptr = §p->ceilingz;
|
lptr = §p->ceilingz;
|
||||||
amt = DoVatorMove(SpriteNum, lptr);
|
amt = DoVatorMove(SpriteNum, lptr);
|
||||||
MoveSpritesWithSector(sp->sectnum, amt, 1); // ceiling
|
MoveSpritesWithSector(sp->sectnum, amt, true); // ceiling
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
lptr = §p->floorz;
|
lptr = §p->floorz;
|
||||||
amt = DoVatorMove(SpriteNum, lptr);
|
amt = DoVatorMove(SpriteNum, lptr);
|
||||||
MoveSpritesWithSector(sp->sectnum, amt, 0); // floor
|
MoveSpritesWithSector(sp->sectnum, amt, false); // floor
|
||||||
}
|
}
|
||||||
|
|
||||||
// EQUAL this entry has finished
|
// EQUAL this entry has finished
|
||||||
|
@ -626,13 +626,13 @@ int DoVatorAuto(short SpriteNum)
|
||||||
{
|
{
|
||||||
lptr = §p->ceilingz;
|
lptr = §p->ceilingz;
|
||||||
amt = DoVatorMove(SpriteNum, lptr);
|
amt = DoVatorMove(SpriteNum, lptr);
|
||||||
MoveSpritesWithSector(sp->sectnum, amt, 1); // ceiling
|
MoveSpritesWithSector(sp->sectnum, amt, true); // ceiling
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
lptr = §p->floorz;
|
lptr = §p->floorz;
|
||||||
amt = DoVatorMove(SpriteNum, lptr);
|
amt = DoVatorMove(SpriteNum, lptr);
|
||||||
MoveSpritesWithSector(sp->sectnum, amt, 0); // floor
|
MoveSpritesWithSector(sp->sectnum, amt, false); // floor
|
||||||
}
|
}
|
||||||
|
|
||||||
// EQUAL this entry has finished
|
// EQUAL this entry has finished
|
||||||
|
|
|
@ -5320,7 +5320,7 @@ ActorHealth(short SpriteNum, short amt)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
SPRITEp sp = &sprite[SpriteNum];
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
extern SWBOOL FinishAnim;
|
extern int FinishAnim;
|
||||||
|
|
||||||
if (u->ID == TRASHCAN && amt > -75)
|
if (u->ID == TRASHCAN && amt > -75)
|
||||||
{
|
{
|
||||||
|
@ -12675,7 +12675,7 @@ MissileSetPos(short Weapon, ANIMATORp DoWeapon, int dist)
|
||||||
USERp wu = User[Weapon];
|
USERp wu = User[Weapon];
|
||||||
int oldvel, oldzvel;
|
int oldvel, oldzvel;
|
||||||
int oldxc, oldyc, oldzc;
|
int oldxc, oldyc, oldzc;
|
||||||
char retval = false;
|
bool retval = false;
|
||||||
|
|
||||||
// backup values
|
// backup values
|
||||||
oldxc = wu->xchange;
|
oldxc = wu->xchange;
|
||||||
|
@ -12721,7 +12721,7 @@ TestMissileSetPos(short Weapon, ANIMATORp DoWeapon, int dist, int zvel)
|
||||||
USERp wu = User[Weapon];
|
USERp wu = User[Weapon];
|
||||||
int oldvel, oldzvel;
|
int oldvel, oldzvel;
|
||||||
int oldxc, oldyc, oldzc;
|
int oldxc, oldyc, oldzc;
|
||||||
char retval = false;
|
bool retval = false;
|
||||||
|
|
||||||
// backup values
|
// backup values
|
||||||
oldxc = wu->xchange;
|
oldxc = wu->xchange;
|
||||||
|
@ -16113,7 +16113,7 @@ WallSpriteInsideSprite(SPRITEp wsp, SPRITEp sp)
|
||||||
y1 -= mulscale16(day, mid_dist);
|
y1 -= mulscale16(day, mid_dist);
|
||||||
y2 = y1 + mulscale16(day, xsiz);
|
y2 = y1 + mulscale16(day, xsiz);
|
||||||
|
|
||||||
return clipinsideboxline(sp->x, sp->y, x1, y1, x2, y2, ((int) sp->clipdist) << 2);
|
return !!clipinsideboxline(sp->x, sp->y, x1, y1, x2, y2, ((int) sp->clipdist) << 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue