121212
This commit is contained in:
@@ -98,6 +98,48 @@ function L_OpenOldWindowCallBack(WindowIndex) {}
|
||||
return MLnewclosure(v, f, freeVarsCnt);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void WReplace(wchar_t* pDstOut, wchar_t* pSrcIn, wchar_t* pSrcRpl, wchar_t* pDstRpl)
|
||||
{
|
||||
wchar_t* pi = pSrcIn;
|
||||
wchar_t* po = pDstOut;
|
||||
|
||||
int nSrcRplLen = wcslen(pSrcRpl);
|
||||
int nDstRplLen = wcslen(pDstRpl);
|
||||
|
||||
wchar_t* p = NULL;
|
||||
int nLen = 0;
|
||||
|
||||
do
|
||||
{
|
||||
// 找到下一个替换点
|
||||
p = wcsstr(pi, pSrcRpl);
|
||||
|
||||
if (p != NULL)
|
||||
{
|
||||
// 拷贝上一个替换点和下一个替换点中间的字符串
|
||||
nLen = p - pi;
|
||||
|
||||
memcpy(po, pi, nLen * sizeof(wchar_t));
|
||||
|
||||
// 拷贝需要替换的字符串
|
||||
memcpy(po + nLen, pDstRpl, nDstRplLen * sizeof(wchar_t));
|
||||
}
|
||||
else
|
||||
{
|
||||
wcscpy(po, pi);
|
||||
|
||||
// 如果没有需要拷贝的字符串,说明循环应该结束
|
||||
break;
|
||||
}
|
||||
|
||||
pi = p + nSrcRplLen;
|
||||
po = po + nLen + nDstRplLen;
|
||||
|
||||
} while (p != NULL);
|
||||
}
|
||||
|
||||
typedef uint32_t(__cdecl* LSqPushStringFunc)(uint32_t v, const wchar_t* s, uint32_t l);
|
||||
LSqPushStringFunc LrealSqPushString;
|
||||
uint32_t __cdecl LMySqPushString(uint32_t v, const wchar_t* s, uint32_t l)
|
||||
@@ -106,8 +148,11 @@ uint32_t __cdecl LMySqPushString(uint32_t v, const wchar_t* s, uint32_t l)
|
||||
if (!wcscmp(s, L"getCurrentModuleDamageRate")) {
|
||||
return LrealSqPushString(v, L"L_getCurrentModuleDamageRate", l);
|
||||
}
|
||||
else if (!wcscmp(s, L"changeTrhowState_ATMage")) {
|
||||
return LrealSqPushString(v, L"changeThrowState_ATMage", l);
|
||||
}
|
||||
|
||||
wprintf(L"调用函数: %s", s);
|
||||
//wprintf(L"调用函数: %s", s);
|
||||
|
||||
return LrealSqPushString(v, s, l);
|
||||
}
|
||||
@@ -558,6 +603,9 @@ typedef int(_cdecl _sub1220590)(int a1);
|
||||
static _sub1220590* sub1220590 = (_sub1220590*)0x1220590;
|
||||
int _cdecl Newsub1220590(int a1)
|
||||
{
|
||||
if (a1 == 19082) {
|
||||
std::cout << 111 << std::endl;
|
||||
}
|
||||
static bool OpenSw = false;
|
||||
if (!OpenSw)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user