Fix interpolation in title screen replays
[neverball] / share / binary.h
1 #ifndef BINARY_H
2 #define BINARY_H
3
4 #include <stdio.h>
5 #include <stdlib.h>
6 #include <string.h>
7
8 #include "fs.h"
9
10 /*---------------------------------------------------------------------------*/
11
12 #define FLOAT_BYTES     4
13 #define INDEX_BYTES     4
14 #define SHORT_BYTES     2
15 #define ARRAY_BYTES(n)  (FLOAT_BYTES * (n))
16 #define STRING_BYTES(s) (strlen(s) + 1)
17
18 void put_float(fs_file, float);
19 void put_index(fs_file, int);
20 void put_short(fs_file, short);
21 void put_array(fs_file, const float *, size_t);
22
23 void get_float(fs_file, float *);
24 void get_index(fs_file, int   *);
25 void get_short(fs_file, short *);
26 void get_array(fs_file, float *, size_t);
27
28 void put_string(fs_file fout, const char *);
29 void get_string(fs_file fin, char *, int );
30
31 /*---------------------------------------------------------------------------*/
32
33 #endif