Vehicle data is no longer saved and loaded into savegames, as it was externalised to xml a long time ago

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6093 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2013-05-24 14:25:47 +00:00
parent 42e8c48cac
commit 2bf92c7301
4 changed files with 11 additions and 36 deletions
+7 -17
View File
@@ -55,7 +55,8 @@ extern INT8 SquadMovementGroups[ ];
NEW_CAR gNewVehicle[NUM_PROFILES];
BOOLEAN SaveNewVehiclesToSaveGameFile( HWFILE hFile );
// Flugente 2013-05-12: saving and loading an array that is read from xml is utterly pointless. The loading function has to remain for compatibility reasons - please remove the next time savegame compatibility is broken
BOOLEAN LoadNewVehiclesToSaveGameFile( HWFILE hFile );
//ATE: These arrays below should all be in a large LUT which contains
@@ -182,26 +183,15 @@ void SetDriver( INT32 iID, UINT8 ubID );
void TeleportVehicleToItsClosestSector( INT32 iVehicleId, UINT8 ubGroupID );
BOOLEAN SaveNewVehiclesToSaveGameFile( HWFILE hFile )
{
UINT32 uiNumBytesWritten;
FileWrite( hFile, &gNewVehicle, sizeof( gNewVehicle), &uiNumBytesWritten );
if( uiNumBytesWritten != sizeof( gNewVehicle ) )
{
return( FALSE );
}
return( TRUE );
}
// Flugente 2013-05-12: saving and loading an array that is read from xml is utterly pointless. The loading function has to remain for compatibility reasons - please remove the next time savegame compatibility is broken
BOOLEAN LoadNewVehiclesToSaveGameFile( HWFILE hFile )
{
UINT32 uiNumBytesRead;
FileRead( hFile, &gNewVehicle, sizeof( gNewVehicle), &uiNumBytesRead );
if( uiNumBytesRead != sizeof( gNewVehicle ) )
NEW_CAR tmp[NUM_PROFILES];
FileRead( hFile, &tmp, sizeof( tmp), &uiNumBytesRead );
if( uiNumBytesRead != sizeof( tmp ) )
{
return( FALSE );
}