mireado

fix last updating

TO DO:
5pb4
mono2
...@@ -12465,7 +12465,7 @@ static bool InsertNewPal2Hook() ...@@ -12465,7 +12465,7 @@ static bool InsertNewPal2Hook()
12465 0x83,0xec, 0x7c, // 0124E223 83ec 7c sub esp,0x7C 12465 0x83,0xec, 0x7c, // 0124E223 83ec 7c sub esp,0x7C
12466 0xa1, XX4, // 0124E226 a1 788D2901 mov eax,dword ptr ds:[0x2f008c] 12466 0xa1, XX4, // 0124E226 a1 788D2901 mov eax,dword ptr ds:[0x2f008c]
12467 0x33,0xc5, // 0124E22B 33c5 xor eax,ebp 12467 0x33,0xc5, // 0124E22B 33c5 xor eax,ebp
12468 - 0x89,0x45, 0xfc // 0124E22D 8945 FC mov dword ptr ss:[ebp-0x8],eax 12468 + 0x89,0x45, 0xfc, // 0124E22D 8945 FC mov dword ptr ss:[ebp-0x8],eax ; mireado : small update
12469 0xe8 // 0136e230 e8 call 01377800 12469 0xe8 // 0136e230 e8 call 01377800
12470 }; 12470 };
12471 ULONG range = min(module_limit_ - module_base_, MAX_REL_ADDR); 12471 ULONG range = min(module_limit_ - module_base_, MAX_REL_ADDR);
...@@ -13918,51 +13918,6 @@ bool Insert5pbHook3() ...@@ -13918,51 +13918,6 @@ bool Insert5pbHook3()
13918 //DisableGDIHooks(); 13918 //DisableGDIHooks();
13919 return true; 13919 return true;
13920 } 13920 }
13921 -
13922 -void SpecialHook5pb4(DWORD esp_base, HookParam *, BYTE index, DWORD *data, DWORD *split, DWORD *len)
13923 -{
13924 - // Text in arg1, name in arg2
13925 - if (LPCSTR text = (LPCSTR)argof(index+1, esp_base))
13926 - if (*text) {
13927 - if (index) // trim spaces in character name
13928 - while (*text == ' ') text++;
13929 - size_t sz = ::strlen(text);
13930 - if (index)
13931 - while (sz && text[sz-1] == ' ') sz--;
13932 - *data = (DWORD)text;
13933 - *len = sz;
13934 - *split = FIXED_SPLIT_VALUE << index;
13935 - }
13936 -}
13937 -bool Insert5pbHook4()
13938 -{
13939 - const BYTE bytes[] = { // function starts
13940 - 0x55, // 0025A130 55 PUSH EBP
13941 - 0x8b,0xec, // 0025A131 8BEC MOV EBP,ESP
13942 - 0x56, // 0025A133 56 PUSH ESI
13943 - 0xff,0x75
13944 - };
13945 - ULONG addr = MemDbg::findBytes(bytes, sizeof(bytes), module_base_, module_limit_);
13946 - //GROWL_DWORD3(addr, module_base_,module_limit_);
13947 - if (!addr) {
13948 - ConsoleOutput("vnreng:5pb4: pattern not found");
13949 - return false;
13950 - }
13951 -
13952 - HookParam hp = {};
13953 - hp.address = addr;
13954 - hp.type = USING_STRING|NO_CONTEXT;
13955 - hp.text_fun = SpecialHook5pb4;
13956 - hp.extra_text_count = 1; // extract character name in arg1
13957 - hp.filter_fun = NewLineCharToSpaceFilter; // replace '\n' by ' '
13958 - ConsoleOutput("vnreng: INSERT 5pb4");
13959 - NewHook(hp, "5pb4");
13960 - // GDI functions are not used by 5pb games anyway.
13961 - //ConsoleOutput("vnreng:5pb: disable GDI hooks");
13962 - //DisableGDIHooks();
13963 - return true;
13964 -}
13965 -
13966 } // unnamed namespace 13921 } // unnamed namespace
13967 13922
13968 bool Insert5pbHook() 13923 bool Insert5pbHook()
......