mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
bug fixes from Overhaul:
- Data type changes - Templates removed git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@871 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+17
-17
@@ -425,8 +425,8 @@ void ReinitializeUnvisitedGarrisons();
|
||||
//was made.
|
||||
#ifdef JA2BETAVERSION
|
||||
|
||||
void LogStrategicEvent( char * str, ... ); //adds a timestamp.
|
||||
void LogStrategicMsg( char * str, ... ); //doesn't use the time stamp
|
||||
void LogStrategicEvent( STR8 str, ... ); //adds a timestamp.
|
||||
void LogStrategicMsg( STR8 str, ... ); //doesn't use the time stamp
|
||||
|
||||
void ClearStrategicLog();
|
||||
#endif
|
||||
@@ -712,7 +712,7 @@ void ValidatePendingGroups()
|
||||
}
|
||||
if( iErrorsForInvalidPendingGroup )
|
||||
{
|
||||
wchar_t str[256];
|
||||
CHAR16 str[256];
|
||||
swprintf( str, L"Strategic AI: Internal error -- %d pending groups were discovered to be invalid. Please report error and send save."
|
||||
L"You can continue playing, as this has been auto-corrected. No need to send any debug files.", iErrorsForInvalidPendingGroup );
|
||||
SAIReportError( str );
|
||||
@@ -747,7 +747,7 @@ void ValidateWeights( INT32 iID )
|
||||
|
||||
if( giReinforcementPoints != iSumReinforcementPoints || giRequestPoints != iSumRequestPoints )
|
||||
{
|
||||
wchar_t str[256];
|
||||
CHAR16 str[256];
|
||||
swprintf( str, L"Strategic AI: Internal error #%02d (total request/reinforcement points). Please report error including error#. "
|
||||
L"You can continue playing, as the points have been auto-corrected. No need to send any save/debug files.", iID );
|
||||
//Correct the misalignment.
|
||||
@@ -775,7 +775,7 @@ DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"Strategic2");
|
||||
{
|
||||
#ifdef JA2BETAVERSION
|
||||
{
|
||||
wchar_t str[256];
|
||||
CHAR16 str[256];
|
||||
swprintf( str, L"Strategic AI: Internal error (invalid enemy group #%d location at %c%d, destination %c%d). Please send PRIOR save file and Strategic Decisions.txt.",
|
||||
pGroup->ubGroupID, pGroup->ubSectorY + 'A' - 1, pGroup->ubSectorX, pGroup->ubNextY + 'A' - 1, pGroup->ubNextX );
|
||||
SAIReportError( str );
|
||||
@@ -816,7 +816,7 @@ void ValidateLargeGroup( GROUP *pGroup )
|
||||
#ifdef JA2BETAVERSION
|
||||
if( pGroup->ubGroupSize > 25 )
|
||||
{
|
||||
wchar_t str[ 512 ];
|
||||
CHAR16 str[ 512 ];
|
||||
swprintf( str, L"Strategic AI warning: Enemy group containing %d soldiers "
|
||||
L"(%d admins, %d troops, %d elites) in sector %c%d. This message is a temporary test message "
|
||||
L"to evaluate a potential problems with very large enemy groups.",
|
||||
@@ -873,7 +873,7 @@ void ValidatePlayersAreInOneGroupOnly()
|
||||
GROUP *pGroup, *pOtherGroup;
|
||||
PLAYERGROUP *pPlayer;
|
||||
SOLDIERTYPE *pSoldier;
|
||||
wchar_t str[ 1024 ];
|
||||
CHAR16 str[ 1024 ];
|
||||
UINT8 ubGroupID;
|
||||
//Go through each merc slot in the player team
|
||||
iNumErrors = 0;
|
||||
@@ -1051,7 +1051,7 @@ void ValidatePlayersAreInOneGroupOnly()
|
||||
if( iNumErrors )
|
||||
{ //The first error to be detected is the one responsible for building the strings. We will simply append another string containing
|
||||
//the total number of detected errors.
|
||||
UINT16 tempstr[ 128 ];
|
||||
CHAR16 tempstr[ 128 ];
|
||||
swprintf( tempstr, L" A total of %d related errors have been detected.", iNumErrors );
|
||||
wcscat( str, tempstr );
|
||||
SAIReportError( str );
|
||||
@@ -1084,8 +1084,8 @@ void SAIReportError( STR16 wErrorString )
|
||||
}
|
||||
if( guiCurrentScreen == AIVIEWER_SCREEN )
|
||||
{
|
||||
UINT8 str[ 512 ];
|
||||
sprintf( (char *)str, "%S\n", wErrorString );
|
||||
CHAR8 str[ 512 ];
|
||||
sprintf( str, "%S\n", wErrorString );
|
||||
OutputDebugString( (LPCSTR) str );
|
||||
}
|
||||
|
||||
@@ -2098,7 +2098,7 @@ DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"Strategic5");
|
||||
{
|
||||
UINT8 ubCut;
|
||||
#ifdef JA2BETAVERSION
|
||||
wchar_t str[512];
|
||||
CHAR16 str[512];
|
||||
swprintf( str, L"Patrol group #%d in %c%d received too many reinforcements from group #%d that was created in %c%d. Size truncated from %d to %d."
|
||||
L"Please send Strategic Decisions.txt and PRIOR save.",
|
||||
pPatrolGroup->ubGroupID, pPatrolGroup->ubSectorY + 'A' - 1, pPatrolGroup->ubSectorX,
|
||||
@@ -4388,10 +4388,10 @@ void ExecuteStrategicAIAction( UINT16 usActionCode, INT16 sSectorX, INT16 sSecto
|
||||
|
||||
#ifdef JA2BETAVERSION
|
||||
|
||||
void LogStrategicMsg( char * str, ... )
|
||||
void LogStrategicMsg( STR8 str, ... )
|
||||
{
|
||||
va_list argptr;
|
||||
UINT8 string[512];
|
||||
CHAR8 string[512];
|
||||
|
||||
FILE *fp;
|
||||
|
||||
@@ -4400,7 +4400,7 @@ void LogStrategicMsg( char * str, ... )
|
||||
return;
|
||||
|
||||
va_start(argptr, str );
|
||||
vsprintf( (char *)string, str, argptr);
|
||||
vsprintf( string, str, argptr);
|
||||
va_end(argptr);
|
||||
|
||||
fprintf( fp, "%s\n", string );
|
||||
@@ -4417,10 +4417,10 @@ void LogStrategicMsg( char * str, ... )
|
||||
fclose( fp );
|
||||
}
|
||||
|
||||
void LogStrategicEvent( char * str, ... )
|
||||
void LogStrategicEvent( STR8 str, ... )
|
||||
{
|
||||
va_list argptr;
|
||||
UINT8 string[512];
|
||||
CHAR8 string[512];
|
||||
|
||||
FILE *fp;
|
||||
|
||||
@@ -4429,7 +4429,7 @@ void LogStrategicEvent( char * str, ... )
|
||||
return;
|
||||
|
||||
va_start(argptr, str );
|
||||
vsprintf( (char *)string, str, argptr);
|
||||
vsprintf( string, str, argptr);
|
||||
va_end(argptr);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user