mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
Reworked Encyclopedia (by Moa)
- Access Encyclopedia from laptop screen - Encyclopedia can be enabled/disabled in the ja2_options.ini: ENCYCLOPEDIA - more infos: http://www.bears-pit.com/board/ubbthreads.php/topics/327315/Re_Ingame_Encyclopaedia.html#Post327315 git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6550 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -112,6 +112,7 @@
|
||||
// HEADROCK HAM 3.6: Yet another include, goddammit
|
||||
#include "Town Militia.h"
|
||||
#include "Items.h"
|
||||
#include "Encyclopedia_new.h"
|
||||
#endif
|
||||
|
||||
#include "BobbyR.h"
|
||||
@@ -4143,6 +4144,15 @@ if( !SaveNewEmailDataToSaveGameFile( hFile ) )
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
if ( !SaveEncyclopediaItemVisibility( hFile ) )
|
||||
{
|
||||
ScreenMsg( FONT_MCOLOR_WHITE, MSG_ERROR, L"ERROR writing Encyclopedia item visibility" );
|
||||
goto FAILED_TO_SAVE;
|
||||
#ifdef JA2BETAVERSION
|
||||
SaveGameFilePosition( FileGetPos( hFile), "Encyclopedia item visibility" );
|
||||
#endif
|
||||
}
|
||||
//Close the saved game file
|
||||
FileClose( hFile );
|
||||
|
||||
@@ -5753,6 +5763,21 @@ BOOLEAN LoadSavedGame( int ubSavedGameID )
|
||||
|
||||
}
|
||||
|
||||
if ( guiCurrentSaveGameVersion >= ENCYCLOPEDIA_ITEM_VISIBILITY )
|
||||
{
|
||||
// no progress bar change, loads these 16k way to fast to even notice
|
||||
if ( !LoadEncyclopediaItemVisibility( hFile ) )
|
||||
{
|
||||
DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String("LoadEncyclopediaItemVisibility failed") );
|
||||
FileClose( hFile );
|
||||
return (FALSE);
|
||||
}
|
||||
#ifdef JA2BETAVERSION
|
||||
LoadGameFilePosition( FileGetPos( hFile), "Encyclopedia item visibility" );
|
||||
#endif
|
||||
}
|
||||
else
|
||||
EncyclopediaInitItemsVisibility();
|
||||
//
|
||||
//Close the saved game file
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user