diff options
author | Ben Longbons <b.r.longbons@gmail.com> | 2011-09-10 16:12:07 -0700 |
---|---|---|
committer | Ben Longbons <b.r.longbons@gmail.com> | 2011-09-10 16:12:07 -0700 |
commit | f841b6fdcc802e73d52da0e67ee192c0c2c1c7e1 (patch) | |
tree | d9b013ab252968ec1e90e721f7b2ab819af0acb0 /src/common/grfio.h | |
parent | 5939e1bec75f2550d3ce109b9cd9a5d22c0626c2 (diff) | |
parent | 723fb5d3431b847526c433a13aa74485cfb564a3 (diff) | |
download | tmwa-f841b6fdcc802e73d52da0e67ee192c0c2c1c7e1.tar.gz tmwa-f841b6fdcc802e73d52da0e67ee192c0c2c1c7e1.tar.bz2 tmwa-f841b6fdcc802e73d52da0e67ee192c0c2c1c7e1.tar.xz tmwa-f841b6fdcc802e73d52da0e67ee192c0c2c1c7e1.zip |
Merge commit '723fb5d3431b847526c433a13aa74485cfb564a3'
Diffstat (limited to 'src/common/grfio.h')
-rw-r--r-- | src/common/grfio.h | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/src/common/grfio.h b/src/common/grfio.h index 5d3f69c..4919a7b 100644 --- a/src/common/grfio.h +++ b/src/common/grfio.h @@ -1,16 +1,17 @@ -// $Id: grfio.h,v 1.1.1.1 2004/09/10 17:44:49 MagicalTux Exp $ -#ifndef _GRFIO_H_ -#define _GRFIO_H_ +/// Accessor to the .gat map virtual files +// Note .gat files are mapped to .wlk files by data/resnametable.txt +// Note that there currently is a 1-1 correlation between them, +// but it is possible for a single .wlk to have multiple .gats reference it +#ifndef GRFIO_H +#define GRFIO_H -void grfio_init (char *); // GRFIO Initialize -int grfio_add (char *); // GRFIO Resource file add -void *grfio_read (char *); // GRFIO data file read -void *grfio_reads (char *, int *); // GRFIO data file read & size get -int grfio_size (char *); // GRFIO data file size get +/// Load file into memory +# define grfio_read(resourcename) grfio_reads (resourcename, NULL) +/// Load file into memory and possibly record length +// For some reason, this allocates an extra 1024 bytes at the end +void *grfio_reads (const char *resourcename, size_t *size); +/// Get size of file +// This is only called once, and that is to check the existence of a file. +size_t grfio_size (const char *resourcename) __attribute__((deprecated)); -// Accessor to GRF filenames -char *grfio_setdatafile (const char *str); -char *grfio_setadatafile (const char *str); -char *grfio_setsdatafile (const char *str); - -#endif // _GRFIO_H_ +#endif // GRFIO_H |