From f8e8e6622eda179bc6f88b0c064fb2629c98fac2 Mon Sep 17 00:00:00 2001 From: johannes Date: Tue, 6 Feb 2024 12:54:10 +0100 Subject: moved reverseint to pack --- inc/demo.h | 10 +++++++++- inc/pack.h | 3 +++ 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/demo.h b/inc/demo.h index 0b398b0..25c0070 100644 --- a/inc/demo.h +++ b/inc/demo.h @@ -3,6 +3,14 @@ #include +typedef enum +{ + DEMOTICK = 0, + DEMOSNAP = 1, + DEMOMESSAGE = 2, + DEMODELTA = 3 +} demotype; + /* demoheader struct */ typedef struct { @@ -72,7 +80,7 @@ typedef union { /* demochunk struct */ typedef struct { - unsigned char type; + demotype type; chunkdata data; } demochunk; diff --git a/inc/pack.h b/inc/pack.h index d04d6ca..581bcf9 100644 --- a/inc/pack.h +++ b/inc/pack.h @@ -3,6 +3,9 @@ #include +/* reads a big endian int into an int */ +int reverseint(const unsigned char in[4]); + /* reads a teeworlds packed int from given buffer */ /* the given pointer is incremented */ int readint(unsigned char **cp); -- cgit v1.2.3