ioapi_mem.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #ifndef quickcocos2dx_ioapi_mem_h
  2. #define quickcocos2dx_ioapi_mem_h
  3. #include "ioapi.h"
  4. namespace cocos2d {
  5. voidpf ZCALLBACK fopen_mem_func OF((
  6. voidpf opaque,
  7. const char* filename,
  8. int mode));
  9. voidpf ZCALLBACK fopen_mem_func64_32 OF((
  10. voidpf opaque,
  11. const void* filename,
  12. int mode));
  13. uLong ZCALLBACK fread_mem_func OF((
  14. voidpf opaque,
  15. voidpf stream,
  16. void* buf,
  17. uLong size));
  18. uLong ZCALLBACK fwrite_mem_func OF((
  19. voidpf opaque,
  20. voidpf stream,
  21. const void* buf,
  22. uLong size));
  23. long ZCALLBACK ftell_mem_func OF((
  24. voidpf opaque,
  25. voidpf stream));
  26. long ZCALLBACK fseek_mem_func OF((
  27. voidpf opaque,
  28. voidpf stream,
  29. uLong offset,
  30. int origin));
  31. int ZCALLBACK fclose_mem_func OF((
  32. voidpf opaque,
  33. voidpf stream));
  34. int ZCALLBACK ferror_mem_func OF((
  35. voidpf opaque,
  36. voidpf stream));
  37. void fill_memory_filefunc64_32 (zlib_filefunc64_32_def* pzlib_filefunc_def);
  38. typedef struct ourmemory_s {
  39. void *base; /* Base of the region of memory we're using */
  40. uLong size; /* Size of the region of memory we're using */
  41. uLong limit; /* Furthest we've written */
  42. uLong cur_offset; /* Current offset in the area */
  43. } ourmemory_t;
  44. }
  45. #endif