Space Viking's many mercs changes plus numerous generic bug fixes

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@2498 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
SpaceViking
2009-01-15 01:26:13 +00:00
parent f64f58fbf8
commit f26095d86f
138 changed files with 3493 additions and 3265 deletions
+1 -1
View File
@@ -472,7 +472,7 @@ INT16 FindClosestClimbPoint( SOLDIERTYPE *pSoldier, INT16 sStartGridNo, INT16 sD
#else
UINT8 ubNumClimbSpots;
INT16 * psClimbSpots;
UINT8 ubLoop;
UINT8 ubLoop;
#endif
INT16 sDistance, sClosestDistance = 1000, sClosestSpot= NOWHERE;
+4 -1
View File
@@ -1220,7 +1220,7 @@ void ExplosiveDamageGridNo( INT16 sGridNo, INT16 sWoundAmt, UINT32 uiDist, BOOLE
STRUCTURE * pBaseStructure;
INT16 sDesiredLevel;
DB_STRUCTURE_TILE **ppTile;
UINT8 ubLoop, ubLoop2;
UINT8 ubLoop, ubLoop2;
INT16 sNewGridNo, sNewGridNo2, sBaseGridNo;
BOOLEAN fToBreak = FALSE;
BOOLEAN fMultiStructure = FALSE;
@@ -3010,6 +3010,8 @@ void HandleExplosionQueue( void )
}
uiCurrentTime = GetJA2Clock();
// WDS 07/25/2008 - Avoid error where gWorldItems and/or gWorldBombs is nil
if (gWorldBombs && gWorldItems) {
for ( uiIndex = 0; uiIndex < gubElementsOnExplosionQueue; uiIndex++ )
{
if ( gExplosionQueue[ uiIndex ].fExists && uiCurrentTime >= gExplosionQueue[ uiIndex ].uiTimeStamp )
@@ -3070,6 +3072,7 @@ void HandleExplosionQueue( void )
gExplosionQueue[ uiIndex ].fExists = FALSE;
}
}
}
// See if we can reduce the # of elements on the queue that we have recorded
// Easier to do it at this time rather than in the loop above
+3 -2
View File
@@ -1087,8 +1087,9 @@ void ChooseMapEdgepoints( MAPEDGEPOINTINFO *pMapEdgepointInfo, UINT8 ubStrategic
UINT16 usSlots, usCurrSlot;
INT16 *psTempArray = NULL;
AssertMsg( ubNumDesiredPoints > 0 && ubNumDesiredPoints <= 32,
String( "ChooseMapEdgepoints: Desired points = %d, valid range is 1-32", ubNumDesiredPoints ) );
// WDS 07/20/2008 - beta 4 problem
// AssertMsg( ubNumDesiredPoints > 0 && ubNumDesiredPoints <= 32,
// String( "ChooseMapEdgepoints: Desired points = %d, valid range is 1-32", ubNumDesiredPoints ) );
//First validate and get access to the correct array based on strategic direction.
//We will use the selected array to choose insertion gridno's.
switch( ubStrategicInsertionCode )
+3 -2
View File
@@ -3,13 +3,14 @@
#include "types.h"
#include "Fileman.h"
#include "Overhead Types.h"
#include "strategic.h"
typedef struct MAPEDGEPOINTINFO
{
UINT8 ubNumPoints;
UINT8 ubStrategicInsertionCode;
INT16 sGridNo[ 32 ];
INT16 sGridNo[ LARGEST_NUMBER_IN_ANY_GROUP ];
}MAPEDGEPOINTINFO;
UINT16 ChooseMapEdgepoint( UINT8 *ubStrategicInsertionCode, UINT8 lastValidICode );
@@ -82,4 +83,4 @@ void HideMapEdgepoints();
#endif
#endif
+1 -1
View File
@@ -192,7 +192,7 @@ void ExamineGridNoForSlantRoofExtraGraphic( INT16 sCheckGridNo )
{
LEVELNODE *pNode = NULL;
STRUCTURE *pStructure, *pBase;
UINT8 ubLoop;
UINT8 ubLoop;
DB_STRUCTURE_TILE ** ppTile;
INT16 sGridNo;
UINT16 usIndex;
+1 -1
View File
@@ -605,7 +605,7 @@ UINT8 gTileTypeLogicalHeight[ NUMBEROFTILETYPES ] =
void SetSpecificDatabaseValues( UINT16 usType, UINT16 uiDatabaseElem, TILE_ELEMENT *TileElement, BOOLEAN fUseRaisedObjectType )
{
UINT8 ubLoop;
UINT8 ubLoop;
INT16 sIndexDiff;
UINT32 cnt;
+9 -9
View File
@@ -763,7 +763,7 @@ BOOLEAN OkayToAddStructureToTile( INT16 sBaseGridNo, INT16 sCubeOffset, DB_STRUC
BOOLEAN InternalOkayToAddStructureToWorld( INT16 sBaseGridNo, INT8 bLevel, DB_STRUCTURE_REF * pDBStructureRef, INT16 sExclusionID, BOOLEAN fIgnorePeople )
{
UINT8 ubLoop;
UINT8 ubLoop;
INT16 sCubeOffset;
CHECKF( pDBStructureRef );
@@ -844,8 +844,8 @@ STRUCTURE * InternalAddStructureToWorld( INT16 sBaseGridNo, INT8 bLevel, DB_STRU
STRUCTURE * pBaseStructure;
DB_STRUCTURE * pDBStructure;
DB_STRUCTURE_TILE ** ppTile;
UINT8 ubLoop;
UINT8 ubLoop2;
UINT8 ubLoop;
UINT8 ubLoop2;
INT16 sBaseTileHeight=-1;
UINT16 usStructureID;
@@ -1066,7 +1066,7 @@ BOOLEAN DeleteStructureFromWorld( STRUCTURE * pStructure )
STRUCTURE * pBaseStructure;
DB_STRUCTURE_TILE ** ppTile;
STRUCTURE * pCurrent;
UINT8 ubLoop, ubLoop2;
UINT8 ubLoop, ubLoop2;
UINT8 ubNumberOfTiles;
INT16 sBaseGridNo, sGridNo;
UINT16 usStructureID;
@@ -1329,7 +1329,7 @@ INT16 GetBaseTile( STRUCTURE * pStructure )
INT8 StructureHeight( STRUCTURE * pStructure )
{
// return the height of an object from 1-4
UINT8 ubLoopX, ubLoopY;
UINT8 ubLoopX, ubLoopY;
PROFILE * pShape;
UINT8 ubShapeValue;
INT8 bLoopZ;
@@ -1462,7 +1462,7 @@ INT8 GetStructureTargetHeight( INT16 sGridNo, BOOLEAN fOnRoof )
INT8 StructureBottomLevel( STRUCTURE * pStructure )
{
// return the bottom level of an object, from 1-4
UINT8 ubLoopX, ubLoopY;
UINT8 ubLoopX, ubLoopY;
PROFILE * pShape;
UINT8 ubShapeValue;
INT8 bLoopZ;
@@ -1502,7 +1502,7 @@ INT8 StructureBottomLevel( STRUCTURE * pStructure )
BOOLEAN StructureDensity( STRUCTURE * pStructure, UINT8 * pubLevel0, UINT8 * pubLevel1, UINT8 * pubLevel2, UINT8 * pubLevel3 )
{
UINT8 ubLoopX, ubLoopY;
UINT8 ubLoopX, ubLoopY;
UINT8 ubShapeValue;
PROFILE * pShape;
@@ -1854,7 +1854,7 @@ void DebugStructurePage1( void )
BOOLEAN AddZStripInfoToVObject( HVOBJECT hVObject, STRUCTURE_FILE_REF * pStructureFileRef, BOOLEAN fFromAnimation, INT16 sSTIStartIndex )
{
UINT32 uiLoop;
UINT8 ubLoop2;
UINT8 ubLoop2;
UINT8 ubNumIncreasing = 0;
UINT8 ubNumStable = 0;
UINT8 ubNumDecreasing = 0;
@@ -2344,7 +2344,7 @@ INT8 GetBlockingStructureInfo( INT16 sGridNo, INT8 bDir, INT8 bNextDir, INT8 bLe
UINT8 StructureFlagToType( UINT32 uiFlag )
{
UINT8 ubLoop;
UINT8 ubLoop;
UINT32 uiBit = STRUCTURE_GENERIC;
for ( ubLoop = 8; ubLoop < 32; ubLoop++ )
+1 -1
View File
@@ -642,7 +642,7 @@ UINT8 gTileTypeMovementCost[ NUM_TERRAIN_TYPES ] =
void CreateTileDatabase( )
{
UINT32 cnt1, cnt2;
UINT8 ubLoop;
UINT8 ubLoop;
UINT32 NumRegions;
PTILE_IMAGERY TileSurf;
TILE_ELEMENT TileElement;
+1 -1
View File
@@ -665,7 +665,7 @@ void CompileWorldTerrainIDs( void )
INT16 sTempGridNo;
LEVELNODE * pNode;
TILE_ELEMENT * pTileElement;
UINT8 ubLoop;
UINT8 ubLoop;
for( sGridNo = 0; sGridNo < WORLD_MAX; sGridNo++ )
{