void __cdecl EXDclareButtonIcon(jass::jstring_t path) { std::string str_path = jass::from_trigstring(jass::from_string(path)); fake::g_history[ToFileName(str_path)] = str_path; }
void SimpleCrawler::saveHtml(const string& fnHtml,const char* html) { ofstream out("html/"+ToFileName(fnHtml)+".txt"); out<<html; out.close(); }
int __stdcall SFileLoadFile(const char* filepath, const void** buffer_ptr, uint32_t* size_ptr, uint32_t reserve_size, OVERLAPPED* overlapped_ptr) { if (!buffer_ptr || !filepath) { return base::std_call<int>(real::SFileLoadFile, filepath, buffer_ptr, size_ptr, reserve_size, overlapped_ptr); } if (read_virtual_button_blp(filepath, buffer_ptr, size_ptr, reserve_size, overlapped_ptr)) { g_lastfilepath = filepath; return 1; } int suc = base::std_call<int>(real::SFileLoadFile, filepath, buffer_ptr, size_ptr, reserve_size, overlapped_ptr); if (suc) { g_lastfilepath = filepath; return suc; } #define DisString "replaceabletextures\\commandbuttonsdisabled\\dis" #define StrLen(s) (sizeof(s) - 1) if (0 == _strnicmp(filepath, DisString, StrLen(DisString))) { const char* filename = filepath + StrLen(DisString); if (0 != _stricmp(ToFileName(g_lastfilepath).c_str(), filename)) { for (const char* cur = filename;; cur += 3) { auto it = g_history.find(cur); if (it != g_history.end()) { suc = disable_button_blp(it->second.c_str(), buffer_ptr, size_ptr, reserve_size); break; } if (0 != _strnicmp(cur, "dis", 3)) { break; } } } else { suc = disable_button_blp(g_lastfilepath.c_str(), buffer_ptr, size_ptr, reserve_size); if (suc) { g_history[filename] = g_lastfilepath; } else { if (0 == _strnicmp(g_lastfilepath.c_str(), DisString, StrLen(DisString))) { for (const char* cur = g_lastfilepath.c_str() + StrLen(DisString);; cur += 3) { auto it = g_history.find(cur); if (it != g_history.end()) { suc = disable_button_blp(it->second.c_str(), buffer_ptr, size_ptr, reserve_size); if (suc) { g_history[filename] = it->second; } break; } if (0 != _strnicmp(cur, "dis", 3)) { break; } } } } } } g_lastfilepath = filepath; if (overlapped_ptr && overlapped_ptr->hEvent) ::SetEvent(overlapped_ptr->hEvent); return suc; }