mirror of
https://github.com/1dot13/source.git
synced 2026-09-02 14:36:06 +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:
@@ -13,7 +13,7 @@
|
||||
|
||||
//***********************************************
|
||||
//
|
||||
// Includes
|
||||
// Includes
|
||||
//
|
||||
//
|
||||
//***********************************************
|
||||
@@ -22,13 +22,13 @@
|
||||
|
||||
//***********************************************
|
||||
//
|
||||
// Defines and typedefs
|
||||
// Defines and typedefs
|
||||
//
|
||||
//***********************************************
|
||||
#define ORDLIST_ERROR -1
|
||||
#define ORDLIST_EQUAL 0
|
||||
#define ORDLIST_LEFT_LESS 1
|
||||
#define ORDLIST_RIGHT_LESS 2
|
||||
#define ORDLIST_ERROR -1
|
||||
#define ORDLIST_EQUAL 0
|
||||
#define ORDLIST_LEFT_LESS 1
|
||||
#define ORDLIST_RIGHT_LESS 2
|
||||
|
||||
typedef void * HCONTAINER;
|
||||
typedef HCONTAINER HSTACK;
|
||||
@@ -53,9 +53,9 @@ extern void ShutdownContainers(void);
|
||||
// Stack Functions
|
||||
// CreateStack(estimated number of items in stack, size of each item
|
||||
// Push(handle to container returned from CreateStack, data to be passed in (must be void *)
|
||||
// : returns handle to new stack
|
||||
// : returns handle to new stack
|
||||
// Pop(handle to container returned from CreateStack, data to be passed in (must be void *)
|
||||
// : returns BOOLEAN
|
||||
// : returns BOOLEAN
|
||||
// DeleteStack deletes the stack container
|
||||
// StackSize returns size of stack
|
||||
|
||||
@@ -78,51 +78,51 @@ extern BOOLEAN PeekStack(HSTACK hStack, void *data);
|
||||
// DeleteQueue(handle to container) Delete the queue container
|
||||
// : returns BOOLEAN
|
||||
|
||||
extern HQUEUE CreateQueue(UINT32 num_of_elem, UINT32 siz_of_each);
|
||||
extern HQUEUE CreateQueue(UINT32 num_of_elem, UINT32 siz_of_each);
|
||||
extern HQUEUE AddtoQueue(HQUEUE hQueue, void *data);
|
||||
extern BOOLEAN RemfromQueue(HQUEUE hQueue,void *data);
|
||||
extern BOOLEAN PeekQueue(HQUEUE hQueue, void *data);
|
||||
extern UINT32 QueueSize(HQUEUE hQueue);
|
||||
extern UINT32 QueueSize(HQUEUE hQueue);
|
||||
extern BOOLEAN DeleteQueue(HQUEUE hQueue);
|
||||
|
||||
// List Functions
|
||||
// CreateList(estimated number of items in queue, size of each item
|
||||
// AddtoList(handle to container returned from CreateQueue, data to be passed in (must be void *)
|
||||
// position where data is to be added (0...sizeof(list))
|
||||
// position where data is to be added (0...sizeof(list))
|
||||
// : returns handle to new list
|
||||
// RemfromList(handle to container returned from CreateList, variable where data is stored (must be void *)
|
||||
// position where data is to be deleted (0...sizeof(list)-1)
|
||||
// position where data is to be deleted (0...sizeof(list)-1)
|
||||
// PeekList(handle to the list, variable where peeked data is stored). Item is not deleted.
|
||||
// position where data is to be peeked (0...sizeof(list)-1)
|
||||
// position where data is to be peeked (0...sizeof(list)-1)
|
||||
// ListSize(handle to the list) returns the list size
|
||||
// DeleteList(handle to the list) Delete the list container
|
||||
|
||||
extern HLIST CreateList(UINT32 num_of_elem, UINT32 siz_of_each);
|
||||
extern HLIST AddtoList(HLIST hList, void *data, UINT32 position);
|
||||
extern HLIST CreateList(UINT32 num_of_elem, UINT32 siz_of_each);
|
||||
extern HLIST AddtoList(HLIST hList, void *data, UINT32 position);
|
||||
extern BOOLEAN RemfromList(HLIST hList,void *data, UINT32 position);
|
||||
extern BOOLEAN PeekList(HLIST hList, void *data, UINT32 position);
|
||||
extern UINT32 ListSize(HLIST hList);
|
||||
extern UINT32 ListSize(HLIST hList);
|
||||
extern BOOLEAN DeleteList(HLIST hList);
|
||||
extern BOOLEAN SwapListNode(HLIST hList, void *pdata, UINT32 uiPos);
|
||||
extern BOOLEAN StoreListNode(HLIST hList, void *pdata, UINT32 uiPos);
|
||||
|
||||
// Ordered List Functions
|
||||
// CreateOrdList(estimated number of items in ordered list, size of each item,
|
||||
// pointer to a compare function that returns info on whether the data in the ordered stack
|
||||
// is < or > the new data to be added into the ordered list.
|
||||
// pointer to a compare function that returns info on whether the data in the ordered stack
|
||||
// is < or > the new data to be added into the ordered list.
|
||||
// AddtoOrdList(handle to container returned from CreateOrdList, data to be passed in (must be void *)
|
||||
// RemfromOrdList(handle to container returned from CreateList, variable where data is stored (must be void *)
|
||||
// position where data is to be deleted (0...sizeof(list)-1)
|
||||
// position where data is to be deleted (0...sizeof(list)-1)
|
||||
// PeekOrdList(handle to the list, variable where peeked data is stored). Item is not deleted.
|
||||
// position where data is to be peeked (0...sizeof(list)-1)
|
||||
// position where data is to be peeked (0...sizeof(list)-1)
|
||||
// OrdListSize(handle to the list) returns the ordered list size
|
||||
// DeleteOrdList(handle to the list) Delete the ordered list container
|
||||
|
||||
extern HLIST CreateOrdList(UINT32 num_of_elem, UINT32 siz_of_each, INT8 (*compare)(void *,void *, UINT32));
|
||||
extern HLIST CreateOrdList(UINT32 num_of_elem, UINT32 siz_of_each, INT8 (*compare)(void *,void *, UINT32));
|
||||
extern HLIST AddtoOrdList(HLIST hList, void *data);
|
||||
extern BOOLEAN RemfromOrdList(HLIST hList,void *data, UINT32 position);
|
||||
extern BOOLEAN PeekOrdList(HLIST hList, void *data, UINT32 position);
|
||||
extern UINT32 OrdListSize(HLIST hList);
|
||||
extern UINT32 OrdListSize(HLIST hList);
|
||||
extern BOOLEAN DeleteOrdList(HLIST hList);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
Reference in New Issue
Block a user