summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMax <mparisi@stevens.edu>2020-09-16 13:27:01 -0400
committerMax <mparisi@stevens.edu>2020-09-16 13:27:01 -0400
commit7186cb8a4161764b8b51a4917cb9040a53f42142 (patch)
tree9e651e8d9791f5000a48f002568facf73bcf8cd8 /include
parent319dd22af1f7b3d8ba47cdd67dd18a3bd8e01ed2 (diff)
ArrayNew, Free, Length, Nth and Append. Labeling and updates to heaaders
Diffstat (limited to 'include')
-rw-r--r--include/darray.h8
-rw-r--r--include/hashtable.h4
-rw-r--r--include/nonport.h16
3 files changed, 22 insertions, 6 deletions
diff --git a/include/darray.h b/include/darray.h
index f20cb82..2859cd4 100644
--- a/include/darray.h
+++ b/include/darray.h
@@ -7,14 +7,14 @@ extern "C" {
typedef struct DArray {
s32 size;
- s32 unk4;
+ s32 capacity;
u32 elementSz;
- s32 unkC;
- s32 unk10;
+ s32 growAmount;
+ s32 unk10; // TODO destructor callback?
char *buf;
} DArray;
-void *ArrayNew(s32 p1, s32 p3, s32 p6);
+void *ArrayNew(u32 p1, s32 p2, s32 p3);
void *ArrayNth(DArray *p1, s32 p2);
void *ArrayMapBackwards2(DArray *p1, s32 p2, s32 p3);
diff --git a/include/hashtable.h b/include/hashtable.h
index 0502273..b4c0ad5 100644
--- a/include/hashtable.h
+++ b/include/hashtable.h
@@ -18,8 +18,8 @@ typedef struct HashTable {
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);
+HashTable *TableNew(u32 p1, s32 p2, HashFunction hf, s32 p4, s32 p5);
+HashTable *TableNew2(u32 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);
diff --git a/include/nonport.h b/include/nonport.h
new file mode 100644
index 0000000..2cc5146
--- /dev/null
+++ b/include/nonport.h
@@ -0,0 +1,16 @@
+#ifndef POKEREVO_NONPORT_H
+#define POKEREVO_NONPORT_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void *gsimalloc(u32 sz);
+
+void gsifree(void *ptr);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif //POKEREVO_NONPORT_H