mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
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@970 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -3431,7 +3431,8 @@ void CreateTempPlayerMerc()
|
||||
UINT8 ubID;
|
||||
|
||||
//Init the merc create structure with basic information
|
||||
memset( &MercCreateStruct, 0, sizeof( MercCreateStruct ) );
|
||||
// WDS - Clean up inventory handling
|
||||
//memset( &MercCreateStruct, 0, sizeof( MercCreateStruct ) );
|
||||
MercCreateStruct.bTeam = SOLDIER_CREATE_AUTO_TEAM;
|
||||
MercCreateStruct.ubProfile = GetUnusedMercProfileID();
|
||||
MercCreateStruct.sSectorX = gpAR->ubSectorX;
|
||||
|
||||
@@ -941,7 +941,9 @@ void SetUpHelicopterForPlayer( INT16 sX, INT16 sY )
|
||||
|
||||
Assert( iHelicopterVehicleId != -1 );
|
||||
|
||||
memset( &SoldierSkyRider, 0, sizeof( SOLDIERTYPE ) );
|
||||
// WDS - Clean up inventory handling
|
||||
//memset( &SoldierSkyRider, 0, SIZEOF_SOLDIERTYPE );
|
||||
SoldierSkyRider.initialize();
|
||||
SoldierSkyRider.ubProfile = SKYRIDER;
|
||||
SoldierSkyRider.bLife = 80;
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
#include "Text.h"
|
||||
#include "Font Control.h"
|
||||
#include "strategicmap.h"
|
||||
#include "World Items.h"
|
||||
#include "Tactical Save.h"
|
||||
#include "Soldier Control.h"
|
||||
#include "Overhead.h"
|
||||
|
||||
@@ -1804,9 +1804,11 @@ INT32 SetUpDropItemListForMerc( UINT32 uiMercId )
|
||||
DropKeysInKeyRing( MercPtrs[ uiMercId ], NOWHERE, 0, 0, TRUE, iSlotIndex, FALSE );
|
||||
|
||||
// zero out profiles
|
||||
memset( ( gMercProfiles[ Menptr[ uiMercId ].ubProfile ].bInvStatus ), 0, sizeof( UINT8 ) * 19 );
|
||||
memset( ( gMercProfiles[ Menptr[ uiMercId ].ubProfile ].bInvNumber ), 0, sizeof( UINT8 ) * 19 );
|
||||
memset( ( gMercProfiles[ Menptr[ uiMercId ].ubProfile ].inv ), 0, sizeof( UINT16 ) * 19 );
|
||||
// WDS - Clean up inventory handling
|
||||
//memset( ( gMercProfiles[ Menptr[ uiMercId ].ubProfile ].bInvStatus ), 0, sizeof( UINT8 ) * 19 );
|
||||
//memset( ( gMercProfiles[ Menptr[ uiMercId ].ubProfile ].bInvNumber ), 0, sizeof( UINT8 ) * 19 );
|
||||
//memset( ( gMercProfiles[ Menptr[ uiMercId ].ubProfile ].inv ), 0, sizeof( UINT16 ) * 19 );
|
||||
gMercProfiles[ Menptr[ uiMercId ].ubProfile ].clearInventory();
|
||||
|
||||
return( iSlotIndex );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user