[RESOLU] SDL-Wrapper une structure
Publié : mer. 09/mai/2007 11:10
Voilà, j'ai un peu de mal à wrapper cette structure vers le purebasic :
Doc : http://fearyourself.developpez.com/tuto ... rwops/#LII
Doc : http://fearyourself.developpez.com/tuto ... rwops/#LII
Code : Tout sélectionner
typedef struct SDL_RWops {
int (*seek)(struct SDL_RWops *context, int offset, int whence);
int (*read)(struct SDL_RWops *context, void *ptr, int size, int maxnum);
int (*write)(struct SDL_RWops *context, const void *ptr, int size, int num);
int (*close)(struct SDL_RWops *context);
Uint32 type;
union {
struct {
int autoclose;
FILE *fp;
} stdio;
struct {
Uint8 *base;
Uint8 *here;
Uint8 *stop;
} mem;
struct {
void *data1;
} unknown;
} hidden;
} SDL_RWops;