*** Merged Code from Multiplayer Branch Revision 2960 ***

- Virtual File System (VFS) by birdflu. This is needed for Multiplayer and is also used for Single Player. Very neat system :-)
- Multiplayer Version 1.1 + some additional features and bugfixes
* INFO: If you compile a new EXE and want to test, be sure to also use the latest SVN GameDir files in your JA2 install directory *




git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@2961 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2009-06-04 21:01:45 +00:00
parent 17f44f63e8
commit 47db604b50
301 changed files with 76701 additions and 1843 deletions
+7 -4
View File
@@ -424,7 +424,7 @@ void GameInitFinances()
if( (FileExists( FINANCES_DATA_FILE ) ) )
{
FileClearAttributes( FINANCES_DATA_FILE );
FileDelete( FINANCES_DATA_FILE );
FileDelete( FINANCES_DATA_FILE );
}
GetBalanceFromDisk( );
}
@@ -1612,6 +1612,9 @@ void GetBalanceFromDisk( void )
HWFILE hFileHandle;
INT32 iBytesRead=0;
if(!FileExists(FINANCES_DATA_FILE))
return;
// open file
hFileHandle=FileOpen( FINANCES_DATA_FILE,( FILE_OPEN_EXISTING | FILE_ACCESS_READ ), FALSE );
@@ -1620,7 +1623,7 @@ void GetBalanceFromDisk( void )
{
LaptopSaveInfo.iCurrentBalance = 0;
// close file
FileClose( hFileHandle );
FileClose( hFileHandle );
return;
}
@@ -1708,8 +1711,8 @@ UINT32 ReadInLastElementOfFinanceListAndReturnIdNumber( void )
// make sure file is more than balance size + length of 1 record - 1 byte
if ( FileGetSize( hFileHandle ) < sizeof( INT32 ) + sizeof( UINT32 ) + sizeof( UINT8 )+ sizeof(UINT8) + sizeof( INT32 ) )
{
FileClose( hFileHandle );
return 0;
FileClose( hFileHandle );
return 0;
}
// size is?