New Feature: a private military company allows hiring of advanced militia. For more info, see http://www.ja-galaxy-forum.com/ubbthreads.php/topics/335279#Post335279

Does not break savegame compatibility.

Requires GameDir revision >= r2130.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7457 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2014-08-30 17:34:25 +00:00
parent 5fc358f70c
commit e00897b91b
40 changed files with 1613 additions and 67 deletions
+22 -3
View File
@@ -115,6 +115,7 @@
#include "Encyclopedia_new.h"
#include "CampaignStats.h" // added by Flugente
#include "DynamicDialogue.h" // added by Flugente
#include "PMC.h" // added by Flugente
#endif
#include "BobbyR.h"
@@ -4305,6 +4306,9 @@ BOOLEAN SaveGame( int ubSaveGameID, STR16 pGameDesc )
{
ScreenMsg( FONT_MCOLOR_WHITE, MSG_ERROR, L"ERROR writing Campaign Stats");
goto FAILED_TO_SAVE;
#ifdef JA2BETAVERSION
SaveGameFilePosition( FileGetPos( hFile ), "Campaign Stats" );
#endif
}
// Flugente: dynamic dialogue
@@ -4314,9 +4318,12 @@ BOOLEAN SaveGame( int ubSaveGameID, STR16 pGameDesc )
goto FAILED_TO_SAVE;
}
#ifdef JA2BETAVERSION
SaveGameFilePosition( FileGetPos( hFile ), "Campaign Stats" );
#endif
// Flugente: PMC
if ( !SavePMC( hFile ) )
{
ScreenMsg( FONT_MCOLOR_WHITE, MSG_ERROR, L"ERROR writing PMC data" );
goto FAILED_TO_SAVE;
}
//Close the saved game file
FileClose( hFile );
@@ -5996,6 +6003,18 @@ BOOLEAN LoadSavedGame( int ubSavedGameID )
return(FALSE);
}
}
uiRelEndPerc += 1;
SetRelativeStartAndEndPercentage( 0, uiRelStartPerc, uiRelEndPerc, L"Load PMC data ..." );
RenderProgressBar( 0, 100 );
uiRelStartPerc = uiRelEndPerc;
if ( !LoadPMC( hFile ) )
{
DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String( "PMC data failed" ) );
FileClose( hFile );
return(FALSE);
}
//
//Close the saved game file