diff options
author | Revo <projectrevotpp@hotmail.com> | 2020-09-15 21:18:12 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-15 21:18:12 -0400 |
commit | 55c1733ceb5a8176a2183fc3872cadb8bb220308 (patch) | |
tree | c7e98cbf7ce49f79fc408d195285f26200462683 /include/hashtable.h | |
parent | 27f9506eda2852ac4a9e99f1a00222c86afe317d (diff) | |
parent | 319dd22af1f7b3d8ba47cdd67dd18a3bd8e01ed2 (diff) |
Merge pull request #45 from mparisi20/master
Decompile hashtable.o
Diffstat (limited to 'include/hashtable.h')
-rw-r--r-- | include/hashtable.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/include/hashtable.h b/include/hashtable.h new file mode 100644 index 0000000..0502273 --- /dev/null +++ b/include/hashtable.h @@ -0,0 +1,35 @@ +#ifndef POKEREVO_HASHTABLE_H
+#define POKEREVO_HASHTABLE_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "darray.h"
+
+typedef s32 (*HashFunction)(void *, s32);
+
+
+typedef struct HashTable {
+ DArray **chains;
+ s32 size;
+ s32 unk8;
+ HashFunction hashFunc;
+ s32 unk10; // comparison callback?
+} HashTable;
+
+HashTable *TableNew(s32 p1, s32 p2, HashFunction hf, s32 p4, s32 p5);
+HashTable *TableNew2(s32 p1, s32 size, s32 p3, HashFunction hf, s32 p5, s32 p6);
+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, s32 p2, s32 p3);
+void *TableMapSafe2(HashTable *table, s32 p2, s32 p3);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif //POKEREVO_HASHTABLE_H
|