diff --git a/Tactical/Animation Cache.cpp b/Tactical/Animation Cache.cpp index ec30ff95..3b320c60 100644 --- a/Tactical/Animation Cache.cpp +++ b/Tactical/Animation Cache.cpp @@ -20,16 +20,16 @@ void DetermineOptimumAnimationCacheSize( ) guiCacheSize = MIN_CACHE_SIZE; } -BOOLEAN InitAnimationCache( UINT16 usSoldierID, AnimationSurfaceCacheType *pAnimCache ) +BOOLEAN InitAnimationCache( SoldierID usSoldierID, AnimationSurfaceCacheType *pAnimCache ) { UINT32 cnt; // Allocate entries - AnimDebugMsg( String( "*** Initializing anim cache surface for soldier %d", usSoldierID ) ); + AnimDebugMsg( String( "*** Initializing anim cache surface for soldier %d", usSoldierID.i ) ); pAnimCache->usCachedSurfaces = (UINT16 *) MemAlloc( sizeof( UINT16 ) * guiCacheSize ); CHECKF( pAnimCache->usCachedSurfaces!= NULL ); - AnimDebugMsg( String( "*** Initializing anim cache hit counter for soldier %d", usSoldierID ) ); + AnimDebugMsg( String( "*** Initializing anim cache hit counter for soldier %d", usSoldierID.i ) ); pAnimCache->sCacheHits = (INT16 *) MemAlloc( sizeof( UINT16) * guiCacheSize ); CHECKF( pAnimCache->sCacheHits!= NULL ); @@ -41,7 +41,7 @@ BOOLEAN InitAnimationCache( UINT16 usSoldierID, AnimationSurfaceCacheType *pAnim } pAnimCache->ubCacheSize = 0; - // Zero surface databse history for this soldeir + // Zero surface database history for this soldier ClearAnimationSurfacesUsageHistory( usSoldierID ); return( TRUE ); diff --git a/Tactical/Animation Cache.h b/Tactical/Animation Cache.h index bf2753b8..a64063c9 100644 --- a/Tactical/Animation Cache.h +++ b/Tactical/Animation Cache.h @@ -1,7 +1,7 @@ #ifndef __ANIMATION_CACHE_H #define __ANIMATION_CACHE_H -#include "types.h" +#include "Overhead Types.h" #define MAX_CACHE_SIZE 20 //#define MIN_CACHE_SIZE 2 @@ -19,11 +19,11 @@ typedef struct extern UINT32 guiCacheSize; BOOLEAN GetCachedAnimationSurface( UINT16 usSoldierID, AnimationSurfaceCacheType *pAnimCache, UINT16 usSurfaceIndex, UINT16 usCurrentAnimation ); -BOOLEAN InitAnimationCache( UINT16 usSoldierID, AnimationSurfaceCacheType *pAnimCache ); +BOOLEAN InitAnimationCache( SoldierID usSoldierID, AnimationSurfaceCacheType *pAnimCache ); void DeleteAnimationCache( UINT16 usSoldierID, AnimationSurfaceCacheType *pAnimCache ); void DetermineOptimumAnimationCacheSize( ); void UnLoadCachedAnimationSurfaces( UINT16 usSoldierID, AnimationSurfaceCacheType *pAnimCache ); -#endif \ No newline at end of file +#endif diff --git a/Tactical/Overhead.cpp b/Tactical/Overhead.cpp index eec87214..c4e2164e 100644 --- a/Tactical/Overhead.cpp +++ b/Tactical/Overhead.cpp @@ -3468,15 +3468,15 @@ void SelectSoldier( UINT16 usSoldierID, BOOLEAN fAcknowledge, BOOLEAN fForceRese BOOLEAN ResetAllAnimationCache( ) { - UINT32 cnt; - SOLDIERTYPE *pSoldier; + UINT16 cnt; + SOLDIERTYPE *pSoldier; // Loop through all mercs and make go for ( pSoldier = Menptr, cnt = 0; cnt < TOTAL_SOLDIERS; pSoldier++, cnt++ ) { if ( pSoldier != NULL ) { - InitAnimationCache( (UINT16)cnt, &(pSoldier->AnimCache) ); + InitAnimationCache( cnt, &(pSoldier->AnimCache) ); } diff --git a/Tactical/Soldier Control.cpp b/Tactical/Soldier Control.cpp index e9c55505..cbb6ce03 100644 --- a/Tactical/Soldier Control.cpp +++ b/Tactical/Soldier Control.cpp @@ -2413,7 +2413,7 @@ void SOLDIERTYPE::DoNinjaAttack( void ) } -BOOLEAN SOLDIERTYPE::CreateSoldierCommon( UINT8 ubBodyType, UINT16 usSoldierID, UINT16 usState ) +BOOLEAN SOLDIERTYPE::CreateSoldierCommon( UINT8 ubBodyType, SoldierID usSoldierID, UINT16 usState ) { BOOLEAN fSuccess = FALSE; INT32 iCounter = 0; diff --git a/Tactical/Soldier Control.h b/Tactical/Soldier Control.h index db866046..a3f90e4d 100644 --- a/Tactical/Soldier Control.h +++ b/Tactical/Soldier Control.h @@ -1656,7 +1656,7 @@ public: BOOLEAN CreateSoldierLight( void ); BOOLEAN DeleteSoldierLight( void ); - BOOLEAN CreateSoldierCommon( UINT8 ubBodyType, UINT16 usSoldierID, UINT16 usState ); + BOOLEAN CreateSoldierCommon( UINT8 ubBodyType, SoldierID usSoldierID, UINT16 usState ); // Soldier Management functions, called by Event Pump.c diff --git a/Tactical/Soldier Create.cpp b/Tactical/Soldier Create.cpp index a685dfc7..f54fc3d5 100644 --- a/Tactical/Soldier Create.cpp +++ b/Tactical/Soldier Create.cpp @@ -1189,7 +1189,7 @@ SOLDIERTYPE* TacticalCreateSoldier( SOLDIERCREATE_STRUCT *pCreateStruct, UINT16 // Copy into merc struct *MercPtrs[ Soldier.ubID ] = Soldier; // Alrighty then, we are set to create the merc, stuff after here can fail! - CHECKF( MercPtrs[ Soldier.ubID ]->CreateSoldierCommon( Soldier.ubBodyType, Soldier.ubID, STANDING ) != FALSE ); + CHECKF( Soldier.ubID->CreateSoldierCommon( Soldier.ubBodyType, Soldier.ubID, STANDING ) != FALSE ); } } else