GBFileOpen can open resource now
This commit is contained in:
parent
b66cf8068a
commit
cc46e0fc32
8 changed files with 174 additions and 38 deletions
|
|
@ -8,9 +8,11 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
GBDECL GBFile GBFileOpen(GBEngine engine, const char* path);
|
||||
GBDECL int GBFileRead(GBFile file, void* out, int size);
|
||||
GBDECL void GBFileClose(GBFile file);
|
||||
GBDECL GBFile GBFileOpen(GBEngine engine, const char* path);
|
||||
GBDECL int GBFileRead(GBFile file, void* out, int size);
|
||||
GBDECL void GBFileSeek(GBFile file, int pos);
|
||||
GBDECL unsigned int GBFileSize(GBFile file);
|
||||
GBDECL void GBFileClose(GBFile file);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
/* gl_shader.c */
|
||||
GBDECL int GBGLShaderPrepare(GLuint* shader, const char* vs, const char* fs);
|
||||
GBDECL int GBGLShaderPrepare(GBEngine engine, GLuint* shader, const char* vs, const char* fs);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
GBDECL GBResource GBResourceOpen(GBEngine engine, const char* path);
|
||||
GBDECL void* GBResourceGet(GBResource resource, const char* name, unsigned int* size);
|
||||
GBDECL void GBResourceClose(GBResource resource);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
|||
|
|
@ -48,7 +48,10 @@ struct _GBEngine {
|
|||
};
|
||||
|
||||
struct _GBFile {
|
||||
FILE* fp;
|
||||
FILE* fp;
|
||||
unsigned char* data;
|
||||
unsigned int size;
|
||||
unsigned int seek;
|
||||
};
|
||||
|
||||
struct _GBResource {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue