diff options
author | Revo <projectrevotpp@hotmail.com> | 2020-10-31 18:29:54 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-31 18:29:54 -0400 |
commit | b78fc344a7db4386fc086e96107ed9f5f6cf45ae (patch) | |
tree | c93cb32ab858dae70b15b1c4943ee8e771dadbde /include/SDK/DWC/gamespy/hashtable.h | |
parent | f13fcff4a5f496e8bc1fa4ff759698d9ac37c478 (diff) | |
parent | 9ba8186ce645c468f66eed98034db0127f3e3199 (diff) |
Merge pull request #154 from mparisi20/master
decompile code_801DCE6C.o, move gamespy, and add standard C system headers
Diffstat (limited to 'include/SDK/DWC/gamespy/hashtable.h')
-rw-r--r-- | include/SDK/DWC/gamespy/hashtable.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/include/SDK/DWC/gamespy/hashtable.h b/include/SDK/DWC/gamespy/hashtable.h new file mode 100644 index 0000000..beb4812 --- /dev/null +++ b/include/SDK/DWC/gamespy/hashtable.h @@ -0,0 +1,34 @@ +#ifndef POKEREVO_HASHTABLE_H
+#define POKEREVO_HASHTABLE_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <DWC/gamespy/darray.h>
+
+typedef s32 (*HashFunction)(void *, s32);
+
+typedef struct HashTable {
+ DArray **chains;
+ s32 size;
+ DtorFunction dtor;
+ HashFunction hashFunc;
+ CompareFunction compar;
+} HashTable;
+
+HashTable *TableNew(u32 p1, s32 p2, HashFunction hf, CompareFunction cmp, DtorFunction dtor);
+HashTable *TableNew2(u32 p1, s32 size, s32 p3, HashFunction hf, CompareFunction cmp, DtorFunction dtor);
+void TableFree(HashTable *table);
+s32 TableCount(HashTable *table);
+void TableEnter(HashTable *table, void *elem);
+BOOL TableRemove(HashTable *table, void *elem);
+void *TableLookup(HashTable *table, void *elem);
+void TableMapSafe(HashTable *table, MapFunction p2, s32 p3);
+void *TableMapSafe2(HashTable *table, MapFunction p2, s32 p3);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif //POKEREVO_HASHTABLE_H
|