尝试重写 dofile 文件流成功

This commit is contained in:
2022-02-15 20:31:51 +08:00
parent 6237ecd17f
commit b2d797c480
3 changed files with 35 additions and 14 deletions

View File

@@ -111,6 +111,7 @@ typedef void* (SQDOFILEFunc)(uint32_t v, const wchar_t* filename, bool retval, b
static SQDOFILEFunc* SQDOFILE = (SQDOFILEFunc*)0x1356240;
typedef void*(*SQFILE)();
//SQ_io_file_lexfeed_编码
//typedef int(LSQLEXREADFUNC)(int n);
typedef int(*LSQLEXREADFUNC)(int n);
@@ -119,7 +120,7 @@ static LSQLEXREADFUNC SQ_io_file_lexfeed_UCS2_BE = (LSQLEXREADFUNC)0x1356050;
static LSQLEXREADFUNC SQ_io_file_lexfeed_UCS2_LE = (LSQLEXREADFUNC)0x1356020;
static LSQLEXREADFUNC SQ_io_file_lexfeed_UTF8 = (LSQLEXREADFUNC)0x1355F90;
//SQfopen
typedef void* (SQfopenFunc)(const wchar_t* filename, const wchar_t* type);
typedef SQFILE* (SQfopenFunc)(const wchar_t* filename, const wchar_t* type);
static SQfopenFunc* SQfopen = (SQfopenFunc*)0x1355DC0;
//SQfread
typedef int(SQfreadFunc)(void* buffer, int a, int b, void* file);