mirror of
https://github.com/1dot13/source.git
synced 2026-08-19 14:20:30 +02:00
Merged New Inventory Project into main branch
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1871 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -41,22 +41,47 @@ enum
|
||||
#define ARMS_INV_PLAYERS_ITEM_HAS_BEEN_EVALUATED 0x00000080 // The Players item has been evaluated
|
||||
|
||||
|
||||
typedef struct
|
||||
class OLD_INVENTORY_IN_SLOT_101
|
||||
{
|
||||
BOOLEAN fActive;
|
||||
public:
|
||||
BOOLEAN fActive;
|
||||
INT16 sItemIndex;
|
||||
UINT32 uiFlags;
|
||||
OBJECTTYPE ItemObject;
|
||||
UINT8 ubLocationOfObject; //An enum value for the location of the item ( either in the arms dealers inventory, one of the offer areas or in the users inventory)
|
||||
UINT32 uiFlags;
|
||||
OLD_OBJECTTYPE_101 oldItemObject;
|
||||
UINT8 ubLocationOfObject; //An enum value for the location of the item ( either in the arms dealers inventory, one of the offer areas or in the users inventory)
|
||||
INT8 bSlotIdInOtherLocation;
|
||||
|
||||
UINT8 ubIdOfMercWhoOwnsTheItem;
|
||||
UINT32 uiItemPrice; //Only used for the players item that have been evaluated
|
||||
UINT32 uiItemPrice; //Only used for the players item that have been evaluated
|
||||
|
||||
INT16 sSpecialItemElement; // refers to which special item element an item in a dealer's inventory area
|
||||
// occupies. -1 Means the item is "perfect" and has no associated special item.
|
||||
INT16 sSpecialItemElement; // refers to which special item element an item in a dealer's inventory area
|
||||
// occupies. -1 Means the item is "perfect" and has no associated special item.
|
||||
};
|
||||
|
||||
} INVENTORY_IN_SLOT;
|
||||
class INVENTORY_IN_SLOT
|
||||
{
|
||||
public:
|
||||
BOOLEAN Save(HWFILE hFile);
|
||||
BOOLEAN Load(HWFILE hFile);
|
||||
INVENTORY_IN_SLOT() {initialize();};
|
||||
INVENTORY_IN_SLOT& operator=(OLD_INVENTORY_IN_SLOT_101& src);
|
||||
void initialize();
|
||||
BOOLEAN fActive;
|
||||
INT16 sItemIndex;
|
||||
UINT32 uiFlags;
|
||||
UINT8 ubLocationOfObject; //An enum value for the location of the item ( either in the arms dealers inventory, one of the offer areas or in the users inventory)
|
||||
INT16 bSlotIdInOtherLocation;
|
||||
|
||||
UINT8 ubIdOfMercWhoOwnsTheItem;
|
||||
UINT32 uiItemPrice; //Only used for the players item that have been evaluated
|
||||
|
||||
UINT32 uiRepairDoneTime; //so that we can sort repairman's inventory easily
|
||||
|
||||
char endOfPod;
|
||||
OBJECTTYPE ItemObject;
|
||||
};
|
||||
|
||||
#define SIZEOF_INVENTORY_IN_SLOT_POD offsetof (INVENTORY_IN_SLOT, endOfPod)
|
||||
|
||||
|
||||
|
||||
@@ -88,14 +113,16 @@ UINT32 ShopKeeperScreenInit( void );
|
||||
UINT32 ShopKeeperScreenHandle( void );
|
||||
UINT32 ShopKeeperScreenShutdown( void );
|
||||
|
||||
bool ArmsDealerItemQsortCompare(INVENTORY_IN_SLOT& pInvSlot1, INVENTORY_IN_SLOT& pInvSlot2);
|
||||
bool RepairmanItemQsortCompare(INVENTORY_IN_SLOT& pInvSlot1, INVENTORY_IN_SLOT& pInvSlot2);
|
||||
|
||||
|
||||
void EnterShopKeeperInterfaceScreen( UINT8 ubArmsDealer );
|
||||
|
||||
|
||||
void DrawHatchOnInventory( UINT32 uiSurface, UINT16 usPosX, UINT16 usPosY, UINT16 usWidth, UINT16 usHeight );
|
||||
void DrawHatchOnInventory( UINT32 uiSurface, UINT16 usPosX, UINT16 usPosY, UINT16 usWidth, UINT16 usHeight, UINT16 usColor = 0 );
|
||||
BOOLEAN ShouldSoldierDisplayHatchOnItem( UINT8 ubProfileID, INT16 sSlotNum );
|
||||
INT8 AddItemToPlayersOfferArea( UINT8 ubProfileID, INVENTORY_IN_SLOT* pInvSlot, INT8 bSlotIdInOtherLocation );
|
||||
INT8 AddItemToPlayersOfferArea( UINT8 ubProfileID, INVENTORY_IN_SLOT* pInvSlot, INT16 bSlotIdInOtherLocation );
|
||||
void ConfirmToDeductMoneyFromPlayersAccountMessageBoxCallBack( UINT8 bExitValue );
|
||||
void ConfirmDontHaveEnoughForTheDealerMessageBoxCallBack( UINT8 bExitValue );
|
||||
|
||||
@@ -104,7 +131,7 @@ void SetSkiCursor( UINT16 usCursor );
|
||||
|
||||
void InitShopKeeperSubTitledText( STR16 pString );
|
||||
|
||||
void AddItemToPlayersOfferAreaAfterShopKeeperOpen( OBJECTTYPE *pItemObject, INT8 bPreviousInvPos );
|
||||
void AddItemToPlayersOfferAreaAfterShopKeeperOpen( OBJECTTYPE *pItemObject);
|
||||
|
||||
void BeginSkiItemPointer( UINT8 ubSource, INT8 bSlotNum, BOOLEAN fOfferToDealerFirst );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user