2 Cantaveria - action adventure platform game
3 Copyright (C) 2009 2010 Evan Rinehart
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License
7 as published by the Free Software Foundation; either version 2
8 of the License, or (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to
18 The Free Software Foundation, Inc.
19 51 Franklin Street, Fifth Floor
20 Boston, MA 02110-1301, USA
23 typedef struct reader reader
;
25 reader
* data_open(char* dir
, char* filename
);
26 reader
* loader_open(char* filename
);
28 int loader_read(reader
* rd
, void* buf
, int count
);
29 int loader_readline(reader
* rd
, char* buf
, int size
);
30 int loader_scanline(reader
* rd
, char* format
, ...);
31 unsigned char* loader_readall(char* filename
, int* size
);
32 void loader_close(reader
* rd
);
33 int loader_feof(reader
* rd
);
35 list
* loader_readdir(char* path
);
36 void loader_freedirlist(list
* dirs
);
39 int read_bytes(reader
* rd
, unsigned char* out
, int count
);
40 int read_byte(reader
* rd
, int* out
);
41 int read_short(reader
* rd
, int* out
);
42 int read_int(reader
* rd
, int* out
);
43 int read_string(reader
* rd
, char** out
);