summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
Diffstat (limited to 'inc')
-rw-r--r--inc/demo.h6
-rw-r--r--inc/pack.h7
2 files changed, 10 insertions, 3 deletions
diff --git a/inc/demo.h b/inc/demo.h
index 6a8a04a..379c3e8 100644
--- a/inc/demo.h
+++ b/inc/demo.h
@@ -34,7 +34,7 @@ typedef struct
typedef struct
{
unsigned char sha256[32];
- unsigned char *data;
+ char *data;
} demomap;
typedef struct
@@ -110,4 +110,8 @@ int readdemomap(FILE *demofile, demomap *map, int mapsize, unsigned char version
/* Will allocate memory if chunk is snap, delta or message */
int readdemochunk(FILE *demofile, demochunk *chunk, unsigned char version);
+int writedemoheader(FILE *outfile, demoheader *header);
+int writedemotimeline(FILE *outfile, demotimeline *timeline);
+int writedemomap(FILE *outfile, demomap *map, int mapsize, unsigned char version);
+
#endif // DEMO_H
diff --git a/inc/pack.h b/inc/pack.h
index 581bcf9..55ebf4e 100644
--- a/inc/pack.h
+++ b/inc/pack.h
@@ -3,8 +3,11 @@
#include <stdio.h>
-/* reads a big endian int into an int */
-int reverseint(const unsigned char in[4]);
+/* turns a big endian int into an int */
+int frombigendian(const unsigned char in[4]);
+
+/* writes an int into a big endian int in given buffer */
+void tobigendian(const int in, unsigned char out[4]);
/* reads a teeworlds packed int from given buffer */
/* the given pointer is incremented */