ArmsDealerInvInit.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #ifndef _ARMS_DEALER_INV_INIT__H_
  2. #define _ARMS_DEALER_INV_INIT__H_
  3. #define LAST_DEALER_ITEM -1
  4. #define NO_DEALER_ITEM 0
  5. // item suitability categories for dealer inventory initialization, virtual customer sales, and re-ordering
  6. #define ITEM_SUITABILITY_NONE 0
  7. #define ITEM_SUITABILITY_LOW 1
  8. #define ITEM_SUITABILITY_MEDIUM 2
  9. #define ITEM_SUITABILITY_HIGH 3
  10. #define ITEM_SUITABILITY_ALWAYS 4
  11. #define DEALER_BUYING 0
  12. #define DEALER_SELLING 1
  13. typedef struct
  14. {
  15. INT16 sItemIndex;
  16. UINT8 ubOptimalNumber;
  17. } DEALER_POSSIBLE_INV;
  18. typedef struct
  19. {
  20. UINT32 uiItemClass;
  21. UINT8 ubWeaponClass;
  22. BOOLEAN fAllowUsed;
  23. } ITEM_SORT_ENTRY;
  24. INT8 GetDealersMaxItemAmount( UINT8 ubDealerID, UINT16 usItemIndex );
  25. DEALER_POSSIBLE_INV *GetPointerToDealersPossibleInventory( UINT8 ubArmsDealerID );
  26. UINT8 GetCurrentSuitabilityForItem( INT8 bArmsDealer, UINT16 usItemIndex );
  27. UINT8 ChanceOfItemTransaction( INT8 bArmsDealer, UINT16 usItemIndex, BOOLEAN fDealerSelling, BOOLEAN fUsed );
  28. BOOLEAN ItemTransactionOccurs( INT8 bArmsDealer, UINT16 usItemIndex, BOOLEAN fDealerSelling, BOOLEAN fUsed );
  29. UINT8 DetermineInitialInvItems( INT8 bArmsDealerID, UINT16 usItemIndex, UINT8 ubChances, BOOLEAN fUsed);
  30. UINT8 HowManyItemsAreSold( INT8 bArmsDealerID, UINT16 usItemIndex, UINT8 ubNumInStock, BOOLEAN fUsed);
  31. UINT8 HowManyItemsToReorder(UINT8 ubWanted, UINT8 ubStillHave);
  32. int BobbyRayItemQsortCompare(const void *pArg1, const void *pArg2);
  33. int ArmsDealerItemQsortCompare(const void *pArg1, const void *pArg2);
  34. int RepairmanItemQsortCompare(const void *pArg1, const void *pArg2);
  35. int CompareItemsForSorting( UINT16 usItem1Index, UINT16 usItem2Index, UINT8 ubItem1Quality, UINT8 ubItem2Quality );
  36. UINT8 GetDealerItemCategoryNumber( UINT16 usItemIndex );
  37. BOOLEAN CanDealerItemBeSoldUsed( UINT16 usItemIndex );
  38. #endif