Showing
1 changed file
with
27 additions
and
18 deletions
... | @@ -84,7 +84,7 @@ bool DeterminePCEngine() | ... | @@ -84,7 +84,7 @@ bool DeterminePCEngine() |
84 | 84 | ||
85 | // 3/20/2015 jichi | 85 | // 3/20/2015 jichi |
86 | // Always insert GDI hooks even for Mono games | 86 | // Always insert GDI hooks even for Mono games |
87 | - // For example: ãæá¦?ãÆ? need GetGlyphOutlineA | 87 | + // For example: 新世黙示録 need GetGlyphOutlineA |
88 | PcHooks::hookGDIFunctions(); | 88 | PcHooks::hookGDIFunctions(); |
89 | return true; | 89 | return true; |
90 | } | 90 | } |
... | @@ -269,7 +269,7 @@ bool DetermineEngineByFile2() | ... | @@ -269,7 +269,7 @@ bool DetermineEngineByFile2() |
269 | InsertTinkerBellHook(); | 269 | InsertTinkerBellHook(); |
270 | return true; | 270 | return true; |
271 | } | 271 | } |
272 | - if (IthFindFile(L"*.vfs")) { // jichi 7/6/2014: Better to test AoiLib.dll? ja.wikipedia.org/wiki/«½«Õ«È«Ï«¦«¹««ã«é | 272 | + if (IthFindFile(L"*.vfs")) { // jichi 7/6/2014: Better to test AoiLib.dll? ja.wikipedia.org/wiki/ソフトハウスキャラ |
273 | InsertSystemAoiHook(); | 273 | InsertSystemAoiHook(); |
274 | return true; | 274 | return true; |
275 | } | 275 | } |
... | @@ -279,7 +279,7 @@ bool DetermineEngineByFile2() | ... | @@ -279,7 +279,7 @@ bool DetermineEngineByFile2() |
279 | } | 279 | } |
280 | // jichi 8/1/2014: YU-RIS engine, lots of clockup game also has this pattern | 280 | // jichi 8/1/2014: YU-RIS engine, lots of clockup game also has this pattern |
281 | if (IthFindFile(L"pac\\*.ypf") || IthFindFile(L"*.ypf")) { | 281 | if (IthFindFile(L"pac\\*.ypf") || IthFindFile(L"*.ypf")) { |
282 | - // jichi 8/14/2013: CLOCLUP: "«Î?«Ö«ì«¹«ª«Ö«ê?«¸«å" would crash the game. | 282 | + // jichi 8/14/2013: CLOCLUP: "ノーブレスオブリージュ" would crash the game. |
283 | if (!IthCheckFile(L"noblesse.exe")) | 283 | if (!IthCheckFile(L"noblesse.exe")) |
284 | InsertYurisHook(); | 284 | InsertYurisHook(); |
285 | return true; | 285 | return true; |
... | @@ -333,7 +333,7 @@ bool DetermineEngineByFile3() | ... | @@ -333,7 +333,7 @@ bool DetermineEngineByFile3() |
333 | InsertTriangleHook(); | 333 | InsertTriangleHook(); |
334 | return true; | 334 | return true; |
335 | } | 335 | } |
336 | - // jichi 2/28/2015: No longer work for "ÓÞïá¡¿??«¢«ê«¹ episode I" from Primula | 336 | + // jichi 2/28/2015: No longer work for "大正×対称アリス episode I" from Primula |
337 | //if (IthCheckFile(L"PSetup.exe")) { | 337 | //if (IthCheckFile(L"PSetup.exe")) { |
338 | // InsertPensilHook(); | 338 | // InsertPensilHook(); |
339 | // return true; | 339 | // return true; |
... | @@ -398,7 +398,7 @@ bool DetermineEngineByFile4() | ... | @@ -398,7 +398,7 @@ bool DetermineEngineByFile4() |
398 | InsertExpHook(); | 398 | InsertExpHook(); |
399 | return true; | 399 | return true; |
400 | } | 400 | } |
401 | - // jichi 2/6/2015 øÁäÌïÍ | 401 | + // jichi 2/6/2015 平安亭 |
402 | // dPi.dat, dPih.dat, dSc.dat, dSch.dat, dSo.dat, dSoh.dat, dSy.dat | 402 | // dPi.dat, dPih.dat, dSc.dat, dSch.dat, dSo.dat, dSoh.dat, dSy.dat |
403 | //if (IthCheckFile(L"dSoh.dat")) { // no idea why this file does not work | 403 | //if (IthCheckFile(L"dSoh.dat")) { // no idea why this file does not work |
404 | if (IthCheckFile(L"dSch.dat")) { | 404 | if (IthCheckFile(L"dSch.dat")) { |
... | @@ -407,7 +407,7 @@ bool DetermineEngineByFile4() | ... | @@ -407,7 +407,7 @@ bool DetermineEngineByFile4() |
407 | } | 407 | } |
408 | 408 | ||
409 | // jichi 2/28/2015: Delay checking Pensil in case something went wrong | 409 | // jichi 2/28/2015: Delay checking Pensil in case something went wrong |
410 | - // File pattern observed in [Primula] ÓÞïá¡¿??«¢«ê«¹ episode I | 410 | + // File pattern observed in [Primula] 大正×対称アリス episode I |
411 | // - PSetup.exe no longer exists | 411 | // - PSetup.exe no longer exists |
412 | // - MovieTexture.dll information shows MovieTex dynamic library, copyright Pensil 2013 | 412 | // - MovieTexture.dll information shows MovieTex dynamic library, copyright Pensil 2013 |
413 | // - ta_trial.exe information shows 2XT - Primula Adventure Engine | 413 | // - ta_trial.exe information shows 2XT - Primula Adventure Engine |
... | @@ -429,7 +429,7 @@ bool DetermineEngineByProcessName() | ... | @@ -429,7 +429,7 @@ bool DetermineEngineByProcessName() |
429 | return true; | 429 | return true; |
430 | } | 430 | } |
431 | 431 | ||
432 | - // jichi 8/19/2013: DO NOT WORK for games like¡¸«Ï«Ô«á«¢¡¹ | 432 | + // jichi 8/19/2013: DO NOT WORK for games like「ハピメア」 |
433 | //if (wcsstr(str,L"cmvs32") || wcsstr(str,L"cmvs64")) { | 433 | //if (wcsstr(str,L"cmvs32") || wcsstr(str,L"cmvs64")) { |
434 | // InsertCMVSHook(); | 434 | // InsertCMVSHook(); |
435 | // return true; | 435 | // return true; |
... | @@ -544,20 +544,27 @@ bool DetermineEngineOther() | ... | @@ -544,20 +544,27 @@ bool DetermineEngineOther() |
544 | static BYTE static_file_info[0x1000]; | 544 | static BYTE static_file_info[0x1000]; |
545 | if (IthGetFileInfo(L"*01", static_file_info)) | 545 | if (IthGetFileInfo(L"*01", static_file_info)) |
546 | if (*(DWORD*)static_file_info == 0) { | 546 | if (*(DWORD*)static_file_info == 0) { |
547 | + STATUS_INFO_LENGTH_MISMATCH; | ||
547 | static WCHAR static_search_name[MAX_PATH]; | 548 | static WCHAR static_search_name[MAX_PATH]; |
548 | LPWSTR name=(LPWSTR)(static_file_info+0x5E); | 549 | LPWSTR name=(LPWSTR)(static_file_info+0x5E); |
549 | int len = wcslen(name); | 550 | int len = wcslen(name); |
550 | - name[len - 2] = L'*'; | 551 | + name[len-2] = L'.'; |
551 | - name[len - 1] = 0; | 552 | + name[len-1] = L'e'; |
552 | - wcscpy(static_search_name, name); | 553 | + name[len] = L'x'; |
553 | - IthGetFileInfo(static_search_name, static_file_info); | 554 | + name[len+1] = L'e'; |
555 | + name[len+2] = 0; | ||
556 | + if (IthCheckFile(name)) { | ||
557 | + name[len-2] = L'*'; | ||
558 | + name[len-1] = 0; | ||
559 | + wcscpy(static_search_name,name); | ||
560 | + IthGetFileInfo(static_search_name,static_file_info); | ||
554 | union { | 561 | union { |
555 | FILE_BOTH_DIR_INFORMATION *both_info; | 562 | FILE_BOTH_DIR_INFORMATION *both_info; |
556 | DWORD addr; | 563 | DWORD addr; |
557 | }; | 564 | }; |
558 | both_info = (FILE_BOTH_DIR_INFORMATION *)static_file_info; | 565 | both_info = (FILE_BOTH_DIR_INFORMATION *)static_file_info; |
559 | //BYTE* ptr=static_file_info; | 566 | //BYTE* ptr=static_file_info; |
560 | - len = 0; | 567 | + len=0; |
561 | while (both_info->NextEntryOffset) { | 568 | while (both_info->NextEntryOffset) { |
562 | addr += both_info->NextEntryOffset; | 569 | addr += both_info->NextEntryOffset; |
563 | len++; | 570 | len++; |
... | @@ -567,6 +574,7 @@ bool DetermineEngineOther() | ... | @@ -567,6 +574,7 @@ bool DetermineEngineOther() |
567 | return true; | 574 | return true; |
568 | } | 575 | } |
569 | } | 576 | } |
577 | + } | ||
570 | 578 | ||
571 | return false; | 579 | return false; |
572 | } | 580 | } |
... | @@ -575,7 +583,7 @@ bool DetermineEngineOther() | ... | @@ -575,7 +583,7 @@ bool DetermineEngineOther() |
575 | // Put the patterns that might break other games at last | 583 | // Put the patterns that might break other games at last |
576 | bool DetermineEngineAtLast() | 584 | bool DetermineEngineAtLast() |
577 | { | 585 | { |
578 | - if (IthCheckFile(L"MovieTexture.dll") && (InsertPensilHook() || Insert2RMHook())) // MovieTexture.dll also exists in 2RM games such as Ù½íäñ2??÷ú, which is checked first | 586 | + if (IthCheckFile(L"MovieTexture.dll") && (InsertPensilHook() || Insert2RMHook())) // MovieTexture.dll also exists in 2RM games such as 母子愛2体験版, which is checked first |
579 | return true; | 587 | return true; |
580 | if (IthFindFile(L"system") && IthFindFile(L"system.dat")) { // jichi 7/31/2015 | 588 | if (IthFindFile(L"system") && IthFindFile(L"system.dat")) { // jichi 7/31/2015 |
581 | InsertAbelHook(); | 589 | InsertAbelHook(); |
... | @@ -643,7 +651,7 @@ bool DetermineEngineGeneric() | ... | @@ -643,7 +651,7 @@ bool DetermineEngineGeneric() |
643 | ret = true; | 651 | ret = true; |
644 | } | 652 | } |
645 | //} else if (IthFindFile(L"image\\*.po2") || IthFindFile(L"image\\*.jo2")) { | 653 | //} else if (IthFindFile(L"image\\*.po2") || IthFindFile(L"image\\*.jo2")) { |
646 | - // ConsoleOutput("vnreng: HarukaKanata, INSERT WideChar hooks"); // ªÏªëª«ª«ªÊª¿ | 654 | + // ConsoleOutput("vnreng: HarukaKanata, INSERT WideChar hooks"); // はるかかなた |
647 | // ret = true; | 655 | // ret = true; |
648 | //} | 656 | //} |
649 | if (ret) | 657 | if (ret) |
... | @@ -668,7 +676,7 @@ bool DetermineNoEngine() | ... | @@ -668,7 +676,7 @@ bool DetermineNoEngine() |
668 | return true; | 676 | return true; |
669 | } | 677 | } |
670 | 678 | ||
671 | - // jichi 11/22/2015: ÔÐÌÈNECRO ??÷ú | 679 | + // jichi 11/22/2015: 凍京NECRO 体験版 |
672 | if (IthFindFile(L"*.npk")) { | 680 | if (IthFindFile(L"*.npk")) { |
673 | ConsoleOutput("vnreng: IGNORE new Nitroplus"); | 681 | ConsoleOutput("vnreng: IGNORE new Nitroplus"); |
674 | return true; | 682 | return true; |
... | @@ -686,7 +694,7 @@ bool DetermineNoEngine() | ... | @@ -686,7 +694,7 @@ bool DetermineNoEngine() |
686 | return true; | 694 | return true; |
687 | } | 695 | } |
688 | 696 | ||
689 | - // jichi 2/14/2015: Guilty+ £Ò£É£Î¡¿£Ó£Å£Î (PK) | 697 | + // jichi 2/14/2015: Guilty+ RIN×SEN (PK) |
690 | if (IthCheckFile(L"rio.ini") || IthFindFile(L"*.war")) { | 698 | if (IthCheckFile(L"rio.ini") || IthFindFile(L"*.war")) { |
691 | ConsoleOutput("vnreng: IGNORE unknown ShinaRio"); | 699 | ConsoleOutput("vnreng: IGNORE unknown ShinaRio"); |
692 | return true; | 700 | return true; |
... | @@ -707,7 +715,7 @@ bool DetermineNoEngine() | ... | @@ -707,7 +715,7 @@ bool DetermineNoEngine() |
707 | return true; | 715 | return true; |
708 | } | 716 | } |
709 | 717 | ||
710 | - // jichi 4/30/2015: Skip games made from ªéª¹ª³ª¦, such as ªÈª¢ªëìÑô£ªÎ«Í«È«é«ìÞÀï× | 718 | + // jichi 4/30/2015: Skip games made from らすこう, such as とある人妻のネトラレ事情 |
711 | // It has garbage from lstrlenW. Correct text is supposed to be in TabbedTextOutA. | 719 | // It has garbage from lstrlenW. Correct text is supposed to be in TabbedTextOutA. |
712 | if (IthCheckFile(L"data_cg.dpm")) { | 720 | if (IthCheckFile(L"data_cg.dpm")) { |
713 | ConsoleOutput("vnreng: IGNORE DPM data_cg.dpm"); | 721 | ConsoleOutput("vnreng: IGNORE DPM data_cg.dpm"); |
... | @@ -770,7 +778,7 @@ bool DetermineNoEngine() | ... | @@ -770,7 +778,7 @@ bool DetermineNoEngine() |
770 | *(DWORD *)(str + i + 1) = 0x630068; //.hcb | 778 | *(DWORD *)(str + i + 1) = 0x630068; //.hcb |
771 | *(DWORD *)(str + i + 3) = 0x62; | 779 | *(DWORD *)(str + i + 3) = 0x62; |
772 | if (IthCheckFile(str)) { | 780 | if (IthCheckFile(str)) { |
773 | - ConsoleOutput("vnreng: IGNORE FVP"); // jichi 10/3/2013: such like «¢«È«ê«¨ª«ª°ªä | 781 | + ConsoleOutput("vnreng: IGNORE FVP"); // jichi 10/3/2013: such like アトリエかぐや |
774 | return true; | 782 | return true; |
775 | } | 783 | } |
776 | return false; | 784 | return false; |
... | @@ -927,6 +935,7 @@ extern "C" { | ... | @@ -927,6 +935,7 @@ extern "C" { |
927 | // MSVC libs use _chkstk for stack-probing. MinGW equivalent is _alloca. | 935 | // MSVC libs use _chkstk for stack-probing. MinGW equivalent is _alloca. |
928 | //void _alloca(); | 936 | //void _alloca(); |
929 | //void _chkstk() { _alloca(); } | 937 | //void _chkstk() { _alloca(); } |
938 | + | ||
930 | // MSVC uses security cookies to prevent some buffer overflow attacks. | 939 | // MSVC uses security cookies to prevent some buffer overflow attacks. |
931 | // provide dummy implementations. | 940 | // provide dummy implementations. |
932 | //void _fastcall __security_check_cookie(intptr_t i) {} | 941 | //void _fastcall __security_check_cookie(intptr_t i) {} | ... | ... |
-
Please register or login to post a comment