]>
git.bts.cx Git - benzene.git/blob - src/bz/resources/resource.h
1 #ifndef BZ_RESOURCES_RESOURCE_H
2 #define BZ_RESOURCES_RESOURCE_H
4 #include <bz/memory/arena.h>
5 #include <bz/types/common.h>
11 typedef struct BZResource BZResource
;
12 typedef BZResource
* BZResourceID
;
14 extern BZResourceID
bzResourcesOpenResource(const char *type
, const char *identifierFmt
, ...);
15 extern void bzResourcesCloseResource(BZResourceID resource
);
17 // FIXME, these should really be resource handles or something.
18 extern size_t bzResourcesFileLength(BZResourceID resource
);
19 extern size_t bzResourcesTell(BZResourceID resource
);
20 extern size_t bzResourcesSeek(BZResourceID resource
, size_t position
);
21 extern size_t bzResourcesReadBytes(BZResourceID resource
, void *outputBuffer
, size_t numBytes
);