Update inventory arrays to be vectors. Add class for inventory. Change some structs that use inventories to classes to provide constructors, destructors, etc. Note that with this update all file operations should still be compatible with previous files.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@973 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
SpaceViking
2007-06-15 03:05:04 +00:00
parent ac41de3515
commit 2cd3521e3f
5 changed files with 25 additions and 11 deletions
+5 -2
View File
@@ -1695,8 +1695,9 @@ BOOLEAN SaveWorld( const STR8 puiFilename )
// Write tileset ID
FileWrite( hfile, &giCurrentTilesetID, sizeof( INT32 ), &uiBytesWritten );
// WDS - Clean up inventory handling
// Write SOLDIER CONTROL SIZE
uiSoldierSize = sizeof( SOLDIERTYPE );
uiSoldierSize = SIZEOF_SOLDIERTYPE_POD; //SIZEOF_SOLDIERTYPE;
FileWrite( hfile, &uiSoldierSize, sizeof( INT32 ), &uiBytesWritten );
@@ -2477,7 +2478,9 @@ BOOLEAN EvaluateWorld( STR8 pSector, UINT8 ubLevel )
}
if( basic.fDetailedPlacement )
{ //skip static priority placement
LOADDATA( &priority, pBuffer, sizeof( SOLDIERCREATE_STRUCT ) );
// WDS - Clean up inventory handling
LOADDATA( &priority, pBuffer, SIZEOF_SOLDIERCREATE_STRUCT_POD); //SIZEOF_SOLDIERCREATE_STRUCT );
priority.CopyOldDataToNew();
if( priority.ubProfile != NO_PROFILE )
pTeam->ubProfile++;
else