Zone file cannot have blank graphics filenames. Started on drawing.
[cantaveria.git] / loader.h
blob3319a06172f79ed80f1ccccc871dee05bf6c7a57
1 /*
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);
34 list* loader_readdir(char* path);
35 void loader_freedirlist(list* dirs);
37 /*binary i/o*/
38 int read_bytes(reader* rd, unsigned char* out, int count);
39 int read_byte(reader* rd, int* out);
40 int read_short(reader* rd, int* out);
41 int read_int(reader* rd, int* out);
42 int read_string(reader* rd, char** out);