From edff23604a6ae5b46980f7b2f9e9f4f36155189a Mon Sep 17 00:00:00 2001 From: johannes Date: Tue, 6 Feb 2024 19:56:18 +0100 Subject: added write demo functions --- inc/pack.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'inc/pack.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 -/* 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 */ -- cgit v1.2.3