\r
*/\r
\r
-#include "common.h"\r
-#ifdef _MSC_VERSION\r
-#include "stdint.h"\r
-#else\r
-#include <stdint.h>\r
-#endif\r
+// LordHavoc: for some reason this is being #include'd rather than treated as its own file...\r
+// LordHavoc: adapted to not require stdint.h as this is not available on MSVC++, using unsigned char instead of uint8_t and fs_offset_t instead of int64_t.\r
\r
// scaler type\r
#define LIBAVW_SCALER_BILINEAR 0\r
#define LIBAVW_PRINT_PANIC 4\r
// exported callback functions:\r
typedef void avwCallbackPrint(int, const char *);\r
-typedef int avwCallbackIoRead(void *, uint8_t *, int);\r
-typedef int64_t avwCallbackIoSeek(void *, int64_t, int);\r
-typedef int64_t avwCallbackIoSeekSize(void *);\r
+typedef int avwCallbackIoRead(void *, unsigned char *, int);\r
+typedef fs_offset_t avwCallbackIoSeek(void *, fs_offset_t, int);\r
+typedef fs_offset_t avwCallbackIoSeekSize(void *);\r
// exported functions:\r
int (*qLibAvW_Init)(avwCallbackPrint *printfunction); // init library, returns error code\r
const char *(*qLibAvW_ErrorString)(int errorcode); // get string for error code\r
}\r
\r
// IO wrapper\r
-int LibAvW_FS_Read(void *opaque, uint8_t *buf, int buf_size)\r
+int LibAvW_FS_Read(void *opaque, unsigned char *buf, int buf_size)\r
{\r
return FS_Read((qfile_t *)opaque, buf, buf_size);\r
}\r
-int64_t LibAvW_FS_Seek(void *opaque, int64_t pos, int whence)\r
+fs_offset_t LibAvW_FS_Seek(void *opaque, fs_offset_t pos, int whence)\r
{\r
- return (int64_t)FS_Seek((qfile_t *)opaque, pos, whence);\r
+ return (fs_offset_t)FS_Seek((qfile_t *)opaque, pos, whence);\r
}\r
-int64_t LibAvW_FS_SeekSize(void *opaque)\r
+fs_offset_t LibAvW_FS_SeekSize(void *opaque)\r
{\r
- return (int64_t)FS_FileSize((qfile_t *)opaque);\r
+ return (fs_offset_t)FS_FileSize((qfile_t *)opaque);\r
}\r
\r
// open as DP video stream\r