mirror of
https://github.com/HIllya51/LunaHook.git
synced 2024-12-03 18:45:39 +08:00
engines
This commit is contained in:
parent
2df10cdf8e
commit
d3a473ac0b
@ -347,25 +347,14 @@ std::vector<ENGINE *> check_engines()
|
|||||||
new Erogos,
|
new Erogos,
|
||||||
new Silkysveryveryold,
|
new Silkysveryveryold,
|
||||||
new gazelle,
|
new gazelle,
|
||||||
};
|
// ignore engines
|
||||||
}
|
|
||||||
|
|
||||||
std::vector<ENGINE *> ignore_engines()
|
|
||||||
{
|
|
||||||
return {
|
|
||||||
|
|
||||||
new oldSystem40ini,
|
new oldSystem40ini,
|
||||||
new AdvPlayerHD,
|
new AdvPlayerHD,
|
||||||
new DPM,
|
new DPM,
|
||||||
new Escude_ignore,
|
new Escude_ignore,
|
||||||
new Chartreux,
|
new Chartreux,
|
||||||
};
|
//
|
||||||
}
|
// Put the patterns that might break other games at last
|
||||||
std::vector<ENGINE *> unsafe_check_atlast()
|
|
||||||
{
|
|
||||||
// Put the patterns that might break other games at last
|
|
||||||
|
|
||||||
return {
|
|
||||||
new UnisonShift,
|
new UnisonShift,
|
||||||
new Interheart,
|
new Interheart,
|
||||||
new Abalone,
|
new Abalone,
|
||||||
@ -398,5 +387,7 @@ std::vector<ENGINE *> unsafe_check_atlast()
|
|||||||
new ShinaRio,
|
new ShinaRio,
|
||||||
new Suika2,
|
new Suika2,
|
||||||
new KISS,
|
new KISS,
|
||||||
new EntisGLS};
|
new EntisGLS,
|
||||||
|
//
|
||||||
|
};
|
||||||
}
|
}
|
@ -21,9 +21,6 @@
|
|||||||
#include "engine64/rpcs3.h"
|
#include "engine64/rpcs3.h"
|
||||||
#include "engines/lua/lua51.h"
|
#include "engines/lua/lua51.h"
|
||||||
#include "engines/python/Renpy.h"
|
#include "engines/python/Renpy.h"
|
||||||
std::vector<ENGINE *> ignore_engines() { return {}; }
|
|
||||||
std::vector<ENGINE *> unsafe_check_atlast() { return {}; }
|
|
||||||
|
|
||||||
std::vector<ENGINE *> check_engines()
|
std::vector<ENGINE *> check_engines()
|
||||||
{
|
{
|
||||||
return {
|
return {
|
||||||
|
@ -5,8 +5,6 @@ WCHAR processName_lower[MAX_PATH];
|
|||||||
uintptr_t processStartAddress, processStopAddress;
|
uintptr_t processStartAddress, processStopAddress;
|
||||||
|
|
||||||
std::vector<ENGINE *> check_engines();
|
std::vector<ENGINE *> check_engines();
|
||||||
std::vector<ENGINE *> ignore_engines();
|
|
||||||
std::vector<ENGINE *> unsafe_check_atlast();
|
|
||||||
|
|
||||||
bool ENGINE::check_function()
|
bool ENGINE::check_function()
|
||||||
{
|
{
|
||||||
@ -76,46 +74,38 @@ bool checkengine()
|
|||||||
{
|
{
|
||||||
|
|
||||||
auto engines = check_engines();
|
auto engines = check_engines();
|
||||||
auto engineatlast = unsafe_check_atlast();
|
|
||||||
auto engineignore = ignore_engines();
|
|
||||||
std::vector<const char *> infomations = {
|
std::vector<const char *> infomations = {
|
||||||
"match failed",
|
"match failed",
|
||||||
"attach failed",
|
"attach failed",
|
||||||
"attach success"};
|
"attach success"};
|
||||||
auto allengines = {engines, engineignore, engineatlast};
|
|
||||||
int total = [allengines]()
|
|
||||||
{int _=0;for(auto eng:allengines)_+=eng.size();return _; }();
|
|
||||||
int current = 0;
|
int current = 0;
|
||||||
for (auto eng : allengines)
|
for (auto m : engines)
|
||||||
{
|
{
|
||||||
for (auto m : eng)
|
current += 1;
|
||||||
|
|
||||||
|
bool matched = safematch(m);
|
||||||
|
bool attached = matched && safeattach(m);
|
||||||
|
|
||||||
|
// ConsoleOutput("Progress %d/%d, checked engine %s, %s",current,total,m->getenginename(),infomations[matched+attached]);
|
||||||
|
// ConsoleOutput("Progress %d/%d, %s",current,total,infomations[matched+attached]);
|
||||||
|
if (matched == false)
|
||||||
|
continue;
|
||||||
|
ConsoleOutput(MatchedEngine, m->getenginename());
|
||||||
|
if (m->dontstop)
|
||||||
{
|
{
|
||||||
current += 1;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
bool matched = safematch(m);
|
if (m->is_engine_certain)
|
||||||
bool attached = matched && safeattach(m);
|
{
|
||||||
|
ConsoleOutput(ConfirmStop, m->getenginename());
|
||||||
|
return attached;
|
||||||
|
}
|
||||||
|
|
||||||
// ConsoleOutput("Progress %d/%d, checked engine %s, %s",current,total,m->getenginename(),infomations[matched+attached]);
|
if (attached)
|
||||||
// ConsoleOutput("Progress %d/%d, %s",current,total,infomations[matched+attached]);
|
{
|
||||||
if (matched == false)
|
ConsoleOutput(Attach_Stop, m->getenginename());
|
||||||
continue;
|
return true;
|
||||||
ConsoleOutput(MatchedEngine, m->getenginename());
|
|
||||||
if (m->dontstop)
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (m->is_engine_certain)
|
|
||||||
{
|
|
||||||
ConsoleOutput(ConfirmStop, m->getenginename());
|
|
||||||
return attached;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (attached)
|
|
||||||
{
|
|
||||||
ConsoleOutput(Attach_Stop, m->getenginename());
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user