diff options
| author | johannes <johannes.herman@gmail.com> | 2024-02-06 19:56:18 +0100 |
|---|---|---|
| committer | johannes <johannes.herman@gmail.com> | 2024-02-06 19:56:18 +0100 |
| commit | edff23604a6ae5b46980f7b2f9e9f4f36155189a (patch) | |
| tree | 6b811e7538f5cacb0f63c2bf0a3783e8356b0597 /inc/pack.h | |
| parent | ec6a5c1ff3bb7731e17b798f9bbfdb0aedf94baa (diff) | |
added write demo functions
Diffstat (limited to 'inc/pack.h')
| -rw-r--r-- | inc/pack.h | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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 */ |
