-
-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5ce2503
commit 6425bf9
Showing
5 changed files
with
103 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
module; | ||
|
||
#include <common.hxx> | ||
|
||
export module extrainfo; | ||
|
||
import common; | ||
import comvars; | ||
|
||
class ExtraInfo | ||
{ | ||
public: | ||
ExtraInfo() | ||
{ | ||
FusionFix::onInitEvent() += []() | ||
{ | ||
CIniReader iniReader(""); | ||
|
||
auto bExraInfo = iniReader.ReadInteger("MISC", "ExraInfo", 1) != 0; | ||
|
||
if (bExraInfo) | ||
{ | ||
auto pattern = hook::pattern("05 ? ? ? ? E9 ? ? ? ? E8 ? ? ? ? 84 C0"); | ||
if (!pattern.empty()) | ||
{ | ||
struct MS_PAUSED_HOOK | ||
{ | ||
void operator()(injector::reg_pack& regs) | ||
{ | ||
static std::wstring extra = L""; | ||
regs.eax += 0x78; | ||
auto s = std::wstring_view((wchar_t*)regs.eax); | ||
|
||
auto imgNum = 0; | ||
auto imgArrSize = 0; | ||
for (auto& it : *pCGameConfigReader__ms_imgFiles) | ||
{ | ||
if (it.m_hFile != -1) | ||
imgNum++; | ||
imgArrSize++; | ||
} | ||
extra = s; | ||
extra += L"~n~"; | ||
extra += L" "; | ||
extra += L"IMG Files: " + std::to_wstring(imgNum) + L" / " + std::to_wstring(imgArrSize); | ||
if (imgNum >= imgArrSize) extra += L"; WARNING: IMG Files limit reached!"; | ||
|
||
regs.eax = (uintptr_t)extra.c_str(); | ||
} | ||
}; injector::MakeInline<MS_PAUSED_HOOK>(pattern.get_first(0)); | ||
} | ||
} | ||
}; | ||
} | ||
} ExtraInfo; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters