Merged from revision: 7380

Fixes (by Buggler)
- Fixed lost items when autoplace stacks from sector inventory to vehicle inventory
- Changed autoplace items priority to stacking first; previous order: specialized pockets > stacking > other pockets
- Improved autoplace stacks logic from sector inventory
- Fixed OIV vehicle inventory figure sti not loaded

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7381 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2014-08-09 11:06:08 +00:00
parent 1e0738d644
commit b4af6cec69
5 changed files with 193 additions and 121 deletions
+21 -15
View File
@@ -1435,18 +1435,19 @@ BOOLEAN InitInvSlotInterface( INV_REGION_DESC *pRegionDesc , INV_REGION_DESC *pC
FilenameForBPP("INTERFACE\\inventory_figure_female_H.sti", VObjectDesc.ImageFile);
CHECKF( AddVideoObject( &VObjectDesc, &(guiBodyInvVO[ 3 ][ 1 ] ) ) );
// Kaiden: Vehicle Inventory change - Added two new STI's for Vehicle Inventory
// Feel free to change them to more appropriate pictures, I just blanked out
// the body image for now, I'm no graphics artist.
//VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
//FilenameForBPP("INTERFACE\\inventory_figure_Vehicle.sti",
//VObjectDesc.ImageFile);
//CHECKF( AddVideoObject( &VObjectDesc, &(guiBodyInvVO[ 4 ][ 0 ] ) ) );
if(UsingNewInventorySystem() == false)
{
// Kaiden: Vehicle Inventory change - Added two new STI's for Vehicle Inventory
// Feel free to change them to more appropriate pictures, I just blanked out
// the body image for now, I'm no graphics artist.
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
FilenameForBPP("INTERFACE\\inventory_figure_Vehicle.sti", VObjectDesc.ImageFile);
CHECKF( AddVideoObject( &VObjectDesc, &(guiBodyInvVO[ 4 ][ 0 ] ) ) );
//VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
//FilenameForBPP("INTERFACE\\inventory_figure_Vehicle_h.sti",
//VObjectDesc.ImageFile);
//CHECKF( AddVideoObject( &VObjectDesc, &(guiBodyInvVO[ 4 ][ 1 ] ) ) );
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
FilenameForBPP("INTERFACE\\inventory_figure_Vehicle_h.sti", VObjectDesc.ImageFile);
CHECKF( AddVideoObject( &VObjectDesc, &(guiBodyInvVO[ 4 ][ 1 ] ) ) );
}
// add gold key graphic
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
@@ -1580,12 +1581,17 @@ void ShutdownInvSlotInterface( )
DeleteVideoObjectFromIndex( guiBodyInvVO[ 2 ][ 0 ] );
DeleteVideoObjectFromIndex( guiBodyInvVO[ 1 ][ 0 ] );
DeleteVideoObjectFromIndex( guiBodyInvVO[ 3 ][ 0 ] );
//DeleteVideoObjectFromIndex( guiBodyInvVO[ 4 ][ 0 ] );
DeleteVideoObjectFromIndex( guiBodyInvVO[ 0 ][ 1 ] );
DeleteVideoObjectFromIndex( guiBodyInvVO[ 2 ][ 1 ] );
DeleteVideoObjectFromIndex( guiBodyInvVO[ 1 ][ 1 ] );
DeleteVideoObjectFromIndex( guiBodyInvVO[ 3 ][ 1 ] );
//DeleteVideoObjectFromIndex( guiBodyInvVO[ 4 ][ 1 ] );
if(UsingNewInventorySystem() == false)
{
DeleteVideoObjectFromIndex( guiBodyInvVO[ 4 ][ 0 ] );
DeleteVideoObjectFromIndex( guiBodyInvVO[ 4 ][ 1 ] );
}
DeleteVideoObjectFromIndex( guiGoldKeyVO );
@@ -1615,9 +1621,9 @@ void RenderInvBodyPanel( SOLDIERTYPE *pSoldier, INT16 sX, INT16 sY )
// Kaiden: Vehicle Inventory change - Added IF Test, Else function call was
// the original statement
if ( (gGameExternalOptions.fVehicleInventory) && (pSoldier->flags.uiStatusFlags & SOLDIER_VEHICLE) )
if ( (gGameExternalOptions.fVehicleInventory) && (pSoldier->flags.uiStatusFlags & SOLDIER_VEHICLE) && UsingNewInventorySystem() == false )
{
//BltVideoObjectFromIndex( guiSAVEBUFFER, guiBodyInvVO[4][0], 0, sX, sY, VO_BLT_SRCTRANSPARENCY, NULL );
BltVideoObjectFromIndex( guiSAVEBUFFER, guiBodyInvVO[4][bSubImageIndex], 0, sX, sY, VO_BLT_SRCTRANSPARENCY, NULL );
}
else
{