- code cleanup mostly from Brent Johnson (Nonomori), a very few from me

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@508 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Lesh
2006-09-06 19:10:08 +00:00
parent f205c1f620
commit 6df124efd7
34 changed files with 174 additions and 175 deletions
+5 -5
View File
@@ -263,12 +263,12 @@ void InternalIgniteExplosion( UINT8 ubOwner, INT16 sX, INT16 sY, INT16 sZ, INT16
// No explosive but an attacker with HE ammo.
if ( !( Item[ usItem ].usItemClass & IC_EXPLOSV ) && ubOwner != NOBODY)
{
ExpParams.ubTypeID = Explosive[AmmoTypes[MercPtrs[ubOwner]->inv[MercPtrs[ubOwner]->ubAttackingHand ].ubGunAmmoType].highExplosive].ubAnimationID;
ExpParams.ubTypeID = (INT8)Explosive[AmmoTypes[MercPtrs[ubOwner]->inv[MercPtrs[ubOwner]->ubAttackingHand ].ubGunAmmoType].highExplosive].ubAnimationID;
// return;
}
else // just normal explosives should get here
{
ExpParams.ubTypeID = Explosive[ Item[ usItem ].ubClassIndex ].ubAnimationID;
ExpParams.ubTypeID = (INT8)Explosive[ Item[ usItem ].ubClassIndex ].ubAnimationID;
}
// Callahan end
@@ -1100,7 +1100,7 @@ BOOLEAN ExplosiveDamageStructureAtGridNo( STRUCTURE * pCurrent, STRUCTURE **ppNe
// Get tile type
GetTileType( pNode->usIndex, &uiTileType );
// Check if we are a fountain!
if ( stricmp( gTilesets[ giCurrentTilesetID ].TileSurfaceFilenames[ uiTileType ], "fount1.sti" ) == 0 )
if ( _stricmp( gTilesets[ giCurrentTilesetID ].TileSurfaceFilenames[ uiTileType ], "fount1.sti" ) == 0 )
{
// Yes we are!
// Remove water....
@@ -2458,7 +2458,7 @@ void SpreadEffect( INT16 sGridNo, UINT8 ubRadius, UINT16 usItem, UINT8 ubOwner,
if ( fSubsequent != BLOOD_SPREAD_EFFECT )
{
MakeNoise( NOBODY, sGridNo, bLevel, gpWorldLevelData[sGridNo].ubTerrainID, Explosive[ Item [ usItem ].ubClassIndex ].ubVolume, NOISE_EXPLOSION );
MakeNoise( NOBODY, sGridNo, bLevel, gpWorldLevelData[sGridNo].ubTerrainID, (UINT8)Explosive[ Item [ usItem ].ubClassIndex ].ubVolume, NOISE_EXPLOSION );
}
}
@@ -3017,7 +3017,7 @@ void HandleExplosionQueue( void )
}
else if ( pObj->usBombItem == TRIP_FLARE )
{
NewLightEffect( sGridNo, Explosive[pObj->usItem].ubDuration, Explosive[pObj->usItem].ubStartRadius );
NewLightEffect( sGridNo, (UINT8)Explosive[pObj->usItem].ubDuration, (UINT8)Explosive[pObj->usItem].ubStartRadius );
RemoveItemFromPool( sGridNo, gWorldBombs[ uiWorldBombIndex ].iItemIndex, ubLevel );
}
else
+7 -7
View File
@@ -26,8 +26,8 @@
#include "SaveLoadGame.h"
INT8 FromWorldFlagsToSmokeType( UINT8 ubWorldFlags );
UINT8 FromSmokeTypeToWorldFlags( INT8 bType );
INT8 FromWorldFlagsToSmokeType( UINT16 ubWorldFlags );
UINT16 FromSmokeTypeToWorldFlags( INT8 bType );
@@ -80,7 +80,7 @@ void RecountSmokeEffects( void )
// Returns NO_SMOKE_EFFECT if none there...
INT8 GetSmokeEffectOnTile( INT16 sGridNo, INT8 bLevel )
{
UINT8 ubExtFlags;
UINT16 ubExtFlags;
ubExtFlags = gpWorldLevelData[ sGridNo ].ubExtFlags[ bLevel ];
@@ -95,7 +95,7 @@ INT8 GetSmokeEffectOnTile( INT16 sGridNo, INT8 bLevel )
}
INT8 FromWorldFlagsToSmokeType( UINT8 ubWorldFlags )
INT8 FromWorldFlagsToSmokeType( UINT16 ubWorldFlags )
{
if ( ubWorldFlags & MAPELEMENT_EXT_SMOKE )
{
@@ -124,7 +124,7 @@ INT8 FromWorldFlagsToSmokeType( UINT8 ubWorldFlags )
}
UINT8 FromSmokeTypeToWorldFlags( INT8 bType )
UINT16 FromSmokeTypeToWorldFlags( INT8 bType )
{
switch( bType )
{
@@ -227,8 +227,8 @@ INT32 NewSmokeEffect( INT16 sGridNo, UINT16 usItem, INT8 bLevel, UINT8 ubOwner )
pSmoke->ubDuration = Explosive[ Item[ usItem ].ubClassIndex ].ubDuration;
pSmoke->ubRadius = Explosive[ Item[ usItem ].ubClassIndex ].ubStartRadius;
pSmoke->ubDuration = (UINT8)Explosive[ Item[ usItem ].ubClassIndex ].ubDuration;
pSmoke->ubRadius = (UINT8)Explosive[ Item[ usItem ].ubClassIndex ].ubStartRadius;
pSmoke->bAge = 0;
pSmoke->fAllocated = TRUE;
pSmoke->bType = bSmokeEffectType;
+2 -2
View File
@@ -557,7 +557,7 @@ void UpdateAniTiles( )
// CHECK IF WE SHOULD BE DISPLAYING TRANSLUCENTLY!
if ( pNode->sCurrentFrame == pNode->ubKeyFrame2 )
{
UINT8 ubExpType;
UINT16 ubExpType;
switch( pNode->uiKeyFrame2Code )
{
@@ -576,7 +576,7 @@ void UpdateAniTiles( )
}
else
{
SpreadEffect( pNode->sGridNo, Explosive[ Item[ (UINT16)pNode->uiUserData ].ubClassIndex ].ubRadius, (UINT16)pNode->uiUserData, (UINT8)pNode->ubUserData2, FALSE, gExplosionData[ pNode->uiUserData3 ].Params.bLevel, -1 );
SpreadEffect( pNode->sGridNo, (UINT8)Explosive[ Item[ (UINT16)pNode->uiUserData ].ubClassIndex ].ubRadius, (UINT16)pNode->uiUserData, (UINT8)pNode->ubUserData2, FALSE, gExplosionData[ pNode->uiUserData3 ].Params.bLevel, -1 );
}
// Forfait any other animations this frame....
return;
+2 -2
View File
@@ -85,7 +85,7 @@ BOOLEAN InitTileCache( )
SET_ERROR( "Cannot load tilecache JSD: %s", gpTileCacheStructInfo[ cnt ].Filename );
}
#endif
if ( stricmp( gpTileCacheStructInfo[ cnt ].zRootName, "l_dead1" ) == 0 )
if ( _stricmp( gpTileCacheStructInfo[ cnt ].zRootName, "l_dead1" ) == 0 )
{
giDefaultStructIndex = cnt;
}
@@ -370,7 +370,7 @@ void GetRootName( INT8 * pDestStr, INT8 * pSrcStr )
}
// Now remove extension...
cEndOfName = strchr( (const char *)pDestStr, '.' );
cEndOfName = strchr( (char *)pDestStr, '.' );
if (cEndOfName != NULL)
{
*cEndOfName = '\0';
+1 -1
View File
@@ -188,7 +188,7 @@ void SetRaisedObjectFlag( char *cFilename, TILE_IMAGERY *pTileSurf )
GetRootName( (INT8 *)cRootFile, (INT8 *)cFilename );
while( ubRaisedObjectFiles[ cnt ][ 0 ] != '1' )
{
if ( stricmp( ubRaisedObjectFiles[ cnt ], cRootFile ) == 0 )
if ( _stricmp( ubRaisedObjectFiles[ cnt ], cRootFile ) == 0 )
{
pTileSurf->bRaisedObjectType = TRUE;
}
+1 -1
View File
@@ -3098,7 +3098,7 @@ INT32 iCount;
for(iCount=0; iCount < MAX_LIGHT_TEMPLATES; iCount++)
{
if((pLightNames[iCount]!=NULL) && !(stricmp(pFilename, pLightNames[iCount])))
if((pLightNames[iCount]!=NULL) && !(_stricmp(pFilename, pLightNames[iCount])))
return(iCount);
}
+1 -1
View File
@@ -2521,7 +2521,7 @@ DebugMsg(TOPIC_JA2,DBG_LEVEL_3,String("physics.cpp line 2337"));
{
//we cannot create the light source above the ground, or on a roof. The system doesnt support it.
AddItemToPool( pObject->sGridNo, &( pObject->Obj ), 1, 1, 0, -1 );
}
}
else
{
// Add a light effect...
+1
View File
@@ -2987,6 +2987,7 @@ BOOLEAN LoadWorld( UINT8 * puiFilename )
{
UINT32 uiNums[37];
LOADDATA( uiNums, pBuffer, 37 * sizeof( INT32 ) );
dMajorMapVersion = 5.00;
}
SetRelativeStartAndEndPercentage( 0, 58, 59, L"Loading room information..." );