Skip to content

Commit

Permalink
Fixed some clang warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
tx00100xt committed Nov 21, 2023
1 parent 05bb42b commit 1d0742c
Show file tree
Hide file tree
Showing 45 changed files with 91 additions and 73 deletions.
3 changes: 3 additions & 0 deletions SamTFE/Sources/Engine/Base/Assert.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ with this program; if not, write to the Free Software Foundation, Inc.,

#ifdef PLATFORM_UNIX /* rcg10042001 */
#include "SDL_assert.h"
#ifdef PLATFORM_FREEBSD
#undef _assert
#define _assert(x, y, z) SDL_assert(0)
#endif
#include <signal.h> // raise()
#endif

Expand Down
2 changes: 1 addition & 1 deletion SamTFE/Sources/Engine/Network/Buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ CTimerValue CBlockBufferStats::GetBlockFinalTime(SLONG slSize)
if (bbs_fLatencyLimit<=0.0f && bbs_fLatencyVariation<=0.0f) {
tvLatency = CTimerValue(0.0);
} else {
tvLatency = CTimerValue(DOUBLE(bbs_fLatencyLimit+(bbs_fLatencyVariation*rand())/RAND_MAX));
tvLatency = CTimerValue(DOUBLE(bbs_fLatencyLimit+(bbs_fLatencyVariation*rand())/(float)(RAND_MAX)));
}

// start of packet receiving is later of
Expand Down
2 changes: 1 addition & 1 deletion SamTFE/Sources/Engine/Network/CPacket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ CTimerValue CPacketBufferStats::GetPacketSendTime(SLONG slSize)
if (pbs_fLatencyLimit<=0.0f && pbs_fLatencyVariation<=0.0f) {
tvLatency = CTimerValue(0.0);
} else {
tvLatency = CTimerValue(DOUBLE(pbs_fLatencyLimit+(pbs_fLatencyVariation*rand())/RAND_MAX));
tvLatency = CTimerValue(DOUBLE(pbs_fLatencyLimit+(pbs_fLatencyVariation*rand())/(float)(RAND_MAX)));
}

// time when the packet should be sent is max of
Expand Down
2 changes: 1 addition & 1 deletion SamTFE/Sources/Engine/Network/CommunicationInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1319,7 +1319,7 @@ void CCommunicationInterface::UpdateMasterBuffers()
}
// there might be more to do
bSomethingDone = TRUE;
} else if (net_fDropPackets <= 0 || (FLOAT(rand())/RAND_MAX) > net_fDropPackets) {
} else if (net_fDropPackets <= 0 || (FLOAT(rand())/(float)(RAND_MAX)) > net_fDropPackets) {
// if no packet drop emulation (or the packet is not dropped), form the packet
// and add it to the end of the UDP Master's input buffer
ppaNewPacket = new CPacket;
Expand Down
4 changes: 4 additions & 0 deletions SamTFE/Sources/Engine/Rendering/RenCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -879,7 +879,9 @@ void CRenderer::AddSpansToScene(void)

_pfRenderProfile.StartTimer(CRenderProfile::PTI_ADDSPANSTOSCENE);
UBYTE *pubShadow = re_pubShadow+re_slShadowWidth*re_iCurrentScan;
#ifndef NDEBUG
INDEX ctPixels = 0;
#endif
// for all spans in the current line
for( INDEX iSpan=0; iSpan<ctSpans; iSpan++)
{ // get span start and stop I from edges
Expand Down Expand Up @@ -908,7 +910,9 @@ void CRenderer::AddSpansToScene(void)
re_bSomeDarkExists = TRUE;
}
// add to pixel counter
#ifndef NDEBUG
ctPixels+=pixLen;
#endif
}
ASSERT(ctPixels<=re_pixSizeI);
_pfRenderProfile.StopTimer(CRenderProfile::PTI_ADDSPANSTOSCENE);
Expand Down
4 changes: 2 additions & 2 deletions SamTFE/Sources/Engine/Ska/RMRender.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -487,8 +487,8 @@ FLOAT RM_TestRayCastHit( CModelInstance &mi, FLOATmatrix3D &mRotation, FLOAT3D &
const FLOAT3D &vTarget,FLOAT fOldDistance,INDEX *piBoneID)
{
FLOAT fDistance = 1E6f;
static int i=0;
i++;
//static int i=0;
//i++;

BOOL bTemp = _bTransformBonelessModelToViewSpace;
_bTransformBonelessModelToViewSpace = TRUE;
Expand Down
4 changes: 2 additions & 2 deletions SamTFE/Sources/Engine/Templates/BSP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -981,8 +981,8 @@ void BSPCutter<Type, iDimensions>::CutPolygon(BSPPolygon<Type, iDimensions> &bpo

// if the polygon is on the split plane
} else {
BSPNode<Type, iDimensions> *pbnFront; // front node (relative to the polygon orientation)
BSPNode<Type, iDimensions> *pbnBack; // back node (relative to the polygon orientation)
BSPNode<Type, iDimensions> *pbnFront = nullptr; // front node (relative to the polygon orientation)
BSPNode<Type, iDimensions> *pbnBack = nullptr; // back node (relative to the polygon orientation)

// check the direction of the polygon with the front direction of the split plane
Type tDirection = (Vector<Type, iDimensions> &)bpoPolygon%(Vector<Type, iDimensions> &)bn;
Expand Down
4 changes: 2 additions & 2 deletions SamTFE/Sources/Entities/Boneman.es
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ functions:
case 2: iAnim = BONEMAN_ANIM_WOUNDCRITICAL03; break;
case 3: iAnim = BONEMAN_ANIM_FALL01; break;
case 4: iAnim = BONEMAN_ANIM_FALL02; break;
default: ASSERTALWAYS("Boneman unknown damage");
default: iAnim = BONEMAN_ANIM_WOUNDCRITICAL01; //ASSERTALWAYS("Boneman unknown damage");
}
StartModelAnim(iAnim, 0);
DeactivateRunningSound();
Expand All @@ -129,7 +129,7 @@ functions:
switch (IRnd()%2) {
case 0: iAnim = BONEMAN_ANIM_DEATHTOBACK; break;
case 1: iAnim = BONEMAN_ANIM_DEATHTOFRONT; break;
default: ASSERTALWAYS("Boneman unknown death");
default: iAnim = BONEMAN_ANIM_DEATHTOBACK; //ASSERTALWAYS("Boneman unknown death");
}
StartModelAnim(iAnim, 0);
DeactivateRunningSound();
Expand Down
4 changes: 2 additions & 2 deletions SamTFE/Sources/Entities/Catman.es
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ functions:
case 0: iAnim = CATMAN_ANIM_WOUND01; break;
case 1: iAnim = CATMAN_ANIM_WOUND02; break;
case 2: iAnim = CATMAN_ANIM_WOUND03; break;
default: ASSERTALWAYS("Catman unknown damage");
default: iAnim = CATMAN_ANIM_WOUND01; //ASSERTALWAYS("Catman unknown damage");
}
StartModelAnim(iAnim, 0);
return iAnim;
Expand All @@ -79,7 +79,7 @@ functions:
switch (IRnd()%2) {
case 0: iAnim = CATMAN_ANIM_DEATH01; break;
case 1: iAnim = CATMAN_ANIM_DEATH02; break;
default: ASSERTALWAYS("Catman unknown death");
default: iAnim = CATMAN_ANIM_DEATH01; //ASSERTALWAYS("Catman unknown death");
}
StartModelAnim(iAnim, 0);
return iAnim;
Expand Down
4 changes: 2 additions & 2 deletions SamTFE/Sources/Entities/Cyborg.es
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ functions:
case 1: iAnim = CYBORG_ANIM_WOUND02; break;
case 2: iAnim = CYBORG_ANIM_WOUND03; break;
case 3: iAnim = CYBORG_ANIM_WOUND04; break;
default: ASSERTALWAYS("Cyborg unknown damage");
default: iAnim = CYBORG_ANIM_WOUND01; //ASSERTALWAYS("Cyborg unknown damage");
}
StartModelAnim(iAnim, 0);
return iAnim;
Expand All @@ -139,7 +139,7 @@ functions:
switch (IRnd()%2) {
case 0: iAnim = CYBORG_ANIM_DEATH01; break;
case 1: iAnim = CYBORG_ANIM_DEATH02; break;
default: ASSERTALWAYS("Cyborg unknown death");
default: iAnim = CYBORG_ANIM_DEATH01; //ASSERTALWAYS("Cyborg unknown death");
}
StartModelAnim(iAnim, 0);
return iAnim;
Expand Down
6 changes: 3 additions & 3 deletions SamTFE/Sources/Entities/Dragonman.es
Original file line number Diff line number Diff line change
Expand Up @@ -166,14 +166,14 @@ functions:
switch (IRnd()%2) {
case 0: iAnim = DRAGONMAN_ANIM_AIRWOUNDSLIGHT; break;
case 1: iAnim = DRAGONMAN_ANIM_AIRWOUND02CRITICAL; break;
default: ASSERTALWAYS("Dragonman unknown fly damage");
default: iAnim = DRAGONMAN_ANIM_AIRWOUNDSLIGHT; //ASSERTALWAYS("Dragonman unknown fly damage");
}
} else {
switch (IRnd()%3) {
case 0: iAnim = DRAGONMAN_ANIM_GROUNDWOUNDCRITICALBACK; break;
case 1: iAnim = DRAGONMAN_ANIM_GROUNDWOUNDCRITICALFRONT; break;
case 2: iAnim = DRAGONMAN_ANIM_GROUNDWOUNDCRITICALBACK2; break;
default: ASSERTALWAYS("Dragonman unknown ground damage");
default: iAnim = DRAGONMAN_ANIM_GROUNDWOUNDCRITICALBACK; //ASSERTALWAYS("Dragonman unknown ground damage");
}
}
StartModelAnim(iAnim, 0);
Expand All @@ -189,7 +189,7 @@ functions:
switch (IRnd()%2) {
case 0: iAnim = DRAGONMAN_ANIM_GROUNDDEATHBACK; break;
case 1: iAnim = DRAGONMAN_ANIM_GROUNDDEATHFRONT; break;
default: ASSERTALWAYS("Dragonman unknown ground death");
default: iAnim = DRAGONMAN_ANIM_GROUNDDEATHBACK; //ASSERTALWAYS("Dragonman unknown ground death");
}
}
StartModelAnim(iAnim, 0);
Expand Down
3 changes: 2 additions & 1 deletion SamTFE/Sources/Entities/Eyeman.es
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ functions:
switch (IRnd()%2) {
case 0: iAnim = EYEMAN_ANIM_MORPHWOUND01; break;
case 1: iAnim = EYEMAN_ANIM_MORPHWOUND02; break;
default: ASSERTALWAYS("Eyeman unknown fly damage");
default: iAnim = EYEMAN_ANIM_MORPHWOUND01; //ASSERTALWAYS("Eyeman unknown fly damage");
}
} else {
FLOAT3D vFront;
Expand All @@ -165,6 +165,7 @@ functions:
case 0: iAnim = EYEMAN_ANIM_WOUND03; break;
case 1: iAnim = EYEMAN_ANIM_WOUND06; break;
case 2: iAnim = EYEMAN_ANIM_WOUND07; break;
default: iAnim = EYEMAN_ANIM_WOUND03;
}
} else {
if (fDamageDir<0) {
Expand Down
4 changes: 2 additions & 2 deletions SamTFE/Sources/Entities/Fishman.es
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,14 @@ functions:
switch (IRnd()%2) {
case 0: iAnim = FISHMAN_ANIM_WATERWOUND01; break;
case 1: iAnim = FISHMAN_ANIM_WATERWOUND02; break;
default: ASSERTALWAYS("Fishman unknown liquid damage");
default: iAnim = FISHMAN_ANIM_WATERWOUND01; //ASSERTALWAYS("Fishman unknown liquid damage");
}
} else {
switch (IRnd()%3) {
case 0: iAnim = FISHMAN_ANIM_GROUNDWOUND03; break;
case 1: iAnim = FISHMAN_ANIM_GROUNDWOUND04; break;
case 2: iAnim = FISHMAN_ANIM_GROUNDWOUND05; break;
default: ASSERTALWAYS("Fishman unknown ground damage");
default: iAnim = FISHMAN_ANIM_GROUNDWOUND03; //ASSERTALWAYS("Fishman unknown ground damage");
}
}
StartModelAnim(iAnim, 0);
Expand Down
4 changes: 2 additions & 2 deletions SamTFE/Sources/Entities/Mamutman.es
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ functions:
INDEX iAnim;
switch (IRnd()%2) {
case 0: iAnim = MAMUTMAN_ANIM_DEATH01; break;
case 1: iAnim = MAMUTMAN_ANIM_DEATH01; break;
default: ASSERTALWAYS("Mamutman unknown death");
case 1: iAnim = MAMUTMAN_ANIM_DEATH02; break;
default: iAnim = MAMUTMAN_ANIM_DEATH01; //ASSERTALWAYS("Mamutman unknown death");
}
StartModelAnim(iAnim, 0);
return iAnim;
Expand Down
2 changes: 1 addition & 1 deletion SamTFE/Sources/Entities/Mantaman.es
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ functions:
switch (IRnd()%2) {
case 0: iAnim = MANTAMAN_ANIM_WOUND01; break;
case 1: iAnim = MANTAMAN_ANIM_WOUND02; break;
default: ASSERTALWAYS("Mantaman unknown liquid damage");
default: iAnim = MANTAMAN_ANIM_WOUND01; //ASSERTALWAYS("Mantaman unknown liquid damage");
}
StartModelAnim(iAnim, 0);
return iAnim;
Expand Down
2 changes: 1 addition & 1 deletion SamTFE/Sources/Entities/Scorpman.es
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ functions:
case 0: iAnim = SCORPMAN_ANIM_WOUND01; break;
case 1: iAnim = SCORPMAN_ANIM_WOUND02; break;
case 2: iAnim = SCORPMAN_ANIM_WOUND03; break;
default: ASSERTALWAYS("Scorpman unknown damage");
default: iAnim = SCORPMAN_ANIM_WOUND01; //ASSERTALWAYS("Scorpman unknown damage");
}
StartModelAnim(iAnim, 0);
MinigunOff();
Expand Down
4 changes: 2 additions & 2 deletions SamTFE/Sources/EntitiesMP/Boneman.es
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ functions:
case 2: iAnim = BONEMAN_ANIM_WOUNDCRITICAL03; break;
case 3: iAnim = BONEMAN_ANIM_FALL01; break;
case 4: iAnim = BONEMAN_ANIM_FALL02; break;
default: ASSERTALWAYS("Boneman unknown damage");
default: iAnim = BONEMAN_ANIM_WOUNDCRITICAL01; //ASSERTALWAYS("Boneman unknown damage");
}
StartModelAnim(iAnim, 0);
DeactivateRunningSound();
Expand All @@ -144,7 +144,7 @@ functions:
switch (IRnd()%2) {
case 0: iAnim = BONEMAN_ANIM_DEATHTOBACK; break;
case 1: iAnim = BONEMAN_ANIM_DEATHTOFRONT; break;
default: ASSERTALWAYS("Boneman unknown death");
default: iAnim = BONEMAN_ANIM_DEATHTOBACK; //ASSERTALWAYS("Boneman unknown death");
}
StartModelAnim(iAnim, 0);
DeactivateRunningSound();
Expand Down
6 changes: 3 additions & 3 deletions SamTFE/Sources/EntitiesMP/Dragonman.es
Original file line number Diff line number Diff line change
Expand Up @@ -181,14 +181,14 @@ functions:
switch (IRnd()%2) {
case 0: iAnim = DRAGONMAN_ANIM_AIRWOUNDSLIGHT; break;
case 1: iAnim = DRAGONMAN_ANIM_AIRWOUND02CRITICAL; break;
default: ASSERTALWAYS("Dragonman unknown fly damage");
default: iAnim = DRAGONMAN_ANIM_AIRWOUNDSLIGHT; //ASSERTALWAYS("Dragonman unknown fly damage");
}
} else {
switch (IRnd()%3) {
case 0: iAnim = DRAGONMAN_ANIM_GROUNDWOUNDCRITICALBACK; break;
case 1: iAnim = DRAGONMAN_ANIM_GROUNDWOUNDCRITICALFRONT; break;
case 2: iAnim = DRAGONMAN_ANIM_GROUNDWOUNDCRITICALBACK2; break;
default: ASSERTALWAYS("Dragonman unknown ground damage");
default: iAnim = DRAGONMAN_ANIM_GROUNDWOUNDCRITICALBACK; //ASSERTALWAYS("Dragonman unknown ground damage");
}
}
StartModelAnim(iAnim, 0);
Expand All @@ -204,7 +204,7 @@ functions:
switch (IRnd()%2) {
case 0: iAnim = DRAGONMAN_ANIM_GROUNDDEATHBACK; break;
case 1: iAnim = DRAGONMAN_ANIM_GROUNDDEATHFRONT; break;
default: ASSERTALWAYS("Dragonman unknown ground death");
default: iAnim = DRAGONMAN_ANIM_GROUNDDEATHBACK; //ASSERTALWAYS("Dragonman unknown ground death");
}
}
StartModelAnim(iAnim, 0);
Expand Down
3 changes: 2 additions & 1 deletion SamTFE/Sources/EntitiesMP/Eyeman.es
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ functions:
switch (IRnd()%2) {
case 0: iAnim = EYEMAN_ANIM_MORPHWOUND01; break;
case 1: iAnim = EYEMAN_ANIM_MORPHWOUND02; break;
default: ASSERTALWAYS("Eyeman unknown fly damage");
default: iAnim = EYEMAN_ANIM_MORPHWOUND01; //ASSERTALWAYS("Eyeman unknown fly damage");
}
} else {
FLOAT3D vFront;
Expand All @@ -185,6 +185,7 @@ functions:
case 0: iAnim = EYEMAN_ANIM_WOUND03; break;
case 1: iAnim = EYEMAN_ANIM_WOUND06; break;
case 2: iAnim = EYEMAN_ANIM_WOUND07; break;
default: iAnim = EYEMAN_ANIM_WOUND03;
}
} else {
if (fDamageDir<0) {
Expand Down
2 changes: 1 addition & 1 deletion SamTFE/Sources/EntitiesMP/Scorpman.es
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ functions:
case 0: iAnim = SCORPMAN_ANIM_WOUND01; break;
case 1: iAnim = SCORPMAN_ANIM_WOUND02; break;
case 2: iAnim = SCORPMAN_ANIM_WOUND03; break;
default: ASSERTALWAYS("Scorpman unknown damage");
default: iAnim = SCORPMAN_ANIM_WOUND01; //ASSERTALWAYS("Scorpman unknown damage");
}
StartModelAnim(iAnim, 0);
MinigunOff();
Expand Down
6 changes: 3 additions & 3 deletions SamTFE/Sources/GameMP/Controls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,9 @@ CTString ReadTextLine(CTStream &strm, const CTString &strKeyword, BOOL bTranslat

void CControls::Load_t( CTFileName fnFile)
{
char achrLine[ 1024];
char achrName[ 1024];
char achrID[ 1024];
char achrLine[ 1025];
char achrName[ 1025];
char achrID[ 1025];
char achrActionName[ 1025];

// open script file for reading
Expand Down
8 changes: 4 additions & 4 deletions SamTFE/Sources/SeriousSam/GLSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ void InitGLSettings(void)
{
ASSERT(_lhSettings.IsEmpty());

char achrLine [1024];
char achrRenderer[1024];
char achrDesc [1024];
char achrScript [1024];
char achrLine [1025];
char achrRenderer[1025];
char achrDesc [1025];
char achrScript [1025];

CTFileStream strmFile;
try
Expand Down
2 changes: 1 addition & 1 deletion SamTFE/Sources/SeriousSam/SeriousSam.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1607,7 +1607,7 @@ void CheckModReload(void)
MessageBoxA(0, "Error launching the Mod!\n", "Serious Sam", MB_OK|MB_ICONERROR);
#else
execl((const char *)argv[0],(const char *)argv[1],(const char *)argv[2],(const char *)argv[3], \
(const char *)argv[4],(const char *)argv[5],(const char *)argv[6],(const char *)argv[7]);
(const char *)argv[4],(const char *)argv[5],(const char *)argv[6],(const char *)argv[7], nullptr);
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR,
"Serious Sam",
"Error launching the Mod!\n",
Expand Down
3 changes: 3 additions & 0 deletions SamTSE/Sources/Engine/Base/Assert.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ with this program; if not, write to the Free Software Foundation, Inc.,

#ifdef PLATFORM_UNIX /* rcg10042001 */
#include "SDL_assert.h"
#ifdef PLATFORM_FREEBSD
#undef _assert
#define _assert(x, y, z) SDL_assert(0)
#endif
#include <signal.h> // raise()
#endif

Expand Down
2 changes: 1 addition & 1 deletion SamTSE/Sources/Engine/Network/Buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ CTimerValue CBlockBufferStats::GetBlockFinalTime(SLONG slSize)
if (bbs_fLatencyLimit<=0.0f && bbs_fLatencyVariation<=0.0f) {
tvLatency = CTimerValue(0.0);
} else {
tvLatency = CTimerValue(DOUBLE(bbs_fLatencyLimit+(bbs_fLatencyVariation*rand())/RAND_MAX));
tvLatency = CTimerValue(DOUBLE(bbs_fLatencyLimit+(bbs_fLatencyVariation*rand())/(float)(RAND_MAX)));
}

// start of packet receiving is later of
Expand Down
2 changes: 1 addition & 1 deletion SamTSE/Sources/Engine/Network/CPacket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ CTimerValue CPacketBufferStats::GetPacketSendTime(SLONG slSize)
if (pbs_fLatencyLimit<=0.0f && pbs_fLatencyVariation<=0.0f) {
tvLatency = CTimerValue(0.0);
} else {
tvLatency = CTimerValue(DOUBLE(pbs_fLatencyLimit+(pbs_fLatencyVariation*rand())/RAND_MAX));
tvLatency = CTimerValue(DOUBLE(pbs_fLatencyLimit+(pbs_fLatencyVariation*rand())/(float)(RAND_MAX)));
}

// time when the packet should be sent is max of
Expand Down
2 changes: 1 addition & 1 deletion SamTSE/Sources/Engine/Network/CommunicationInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1319,7 +1319,7 @@ void CCommunicationInterface::UpdateMasterBuffers()
}
// there might be more to do
bSomethingDone = TRUE;
} else if (net_fDropPackets <= 0 || (FLOAT(rand())/RAND_MAX) > net_fDropPackets) {
} else if (net_fDropPackets <= 0 || (FLOAT(rand())/(float)(RAND_MAX)) > net_fDropPackets) {
// if no packet drop emulation (or the packet is not dropped), form the packet
// and add it to the end of the UDP Master's input buffer
ppaNewPacket = new CPacket;
Expand Down
4 changes: 4 additions & 0 deletions SamTSE/Sources/Engine/Rendering/RenCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -879,7 +879,9 @@ void CRenderer::AddSpansToScene(void)

_pfRenderProfile.StartTimer(CRenderProfile::PTI_ADDSPANSTOSCENE);
UBYTE *pubShadow = re_pubShadow+re_slShadowWidth*re_iCurrentScan;
#ifndef NDEBUG
INDEX ctPixels = 0;
#endif
// for all spans in the current line
for( INDEX iSpan=0; iSpan<ctSpans; iSpan++)
{ // get span start and stop I from edges
Expand Down Expand Up @@ -908,7 +910,9 @@ void CRenderer::AddSpansToScene(void)
re_bSomeDarkExists = TRUE;
}
// add to pixel counter
#ifndef NDEBUG
ctPixels+=pixLen;
#endif
}
ASSERT(ctPixels<=re_pixSizeI);
_pfRenderProfile.StopTimer(CRenderProfile::PTI_ADDSPANSTOSCENE);
Expand Down
4 changes: 2 additions & 2 deletions SamTSE/Sources/Engine/Ska/RMRender.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -487,8 +487,8 @@ FLOAT RM_TestRayCastHit( CModelInstance &mi, FLOATmatrix3D &mRotation, FLOAT3D &
const FLOAT3D &vTarget,FLOAT fOldDistance,INDEX *piBoneID)
{
FLOAT fDistance = 1E6f;
static int i=0;
i++;
//static int i=0;
//i++;

BOOL bTemp = _bTransformBonelessModelToViewSpace;
_bTransformBonelessModelToViewSpace = TRUE;
Expand Down
Loading

0 comments on commit 1d0742c

Please sign in to comment.