forked from Public-Mirror/Textractor
versatile way
This commit is contained in:
parent
3aee03a244
commit
29d23935ad
@ -16396,28 +16396,18 @@ bool InsertShinyDaysGameHook()
|
||||
0xff,0x83,0x70,0x03,0x00,0x00,0x33,0xf6,
|
||||
0xc6,0x84,0x24,0x90,0x02,0x00,0x00,0x02
|
||||
};
|
||||
LPVOID addr = (LPVOID)0x42ad94;
|
||||
if (::memcmp(addr, bytes, sizeof(bytes)) == 0) {
|
||||
HookParam hp = {};
|
||||
hp.address = 0x42ad9c;
|
||||
hp.text_fun = SpecialGameHookShinyDays;
|
||||
hp.type = USING_UNICODE | USING_STRING | NO_CONTEXT;
|
||||
ConsoleOutput("vnreng: INSERT ShinyDays");
|
||||
NewHook(hp, "ShinyDays 1.00");
|
||||
return true;
|
||||
}
|
||||
addr = (LPVOID)0x42b7f4;
|
||||
if (::memcmp(addr, bytes, sizeof(bytes)) == 0) {
|
||||
HookParam hp = {};
|
||||
hp.address = 0x42b7fc;
|
||||
hp.text_fun = SpecialGameHookShinyDays;
|
||||
hp.type = USING_UNICODE | USING_STRING | NO_CONTEXT;
|
||||
ConsoleOutput("vnreng: INSERT ShinyDays");
|
||||
NewHook(hp, "ShinyDays 1.00d");
|
||||
return true;
|
||||
|
||||
for (auto addr : Util::SearchMemory(bytes, sizeof(bytes))) {
|
||||
HookParam hp = {};
|
||||
hp.address = addr + 0x8;
|
||||
hp.text_fun = SpecialGameHookShinyDays;
|
||||
hp.type = USING_UNICODE | USING_STRING | NO_CONTEXT;
|
||||
ConsoleOutput("Textractor: INSERT ShinyDays");
|
||||
NewHook(hp, "ShinyDays");
|
||||
return true;
|
||||
}
|
||||
|
||||
ConsoleOutput("vnreng:ShinyDays: only work for 1.00 and 1.00d");
|
||||
ConsoleOutput("Textractor:ShinyDays: pattern not found");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user