最近想汉化一个游戏,用的是WolfRPG2.10
http://www.silversecond.com/WolfRPGEditor
由于Wolf的Editor使用日文字体无法输入简体中文,于是通过汉化Editor使其支持中文输入。
2.10版有一个设置可以选择游戏中使用的编码,但似乎不能用。
通过测试发现汉化后的Editor设置游戏字体的功能正常(我是用的是微软雅黑)但是游戏主程序Game.exe仍然只显示日文字符集边界内的文字,其它文字则以???代替。
我查找了CMP XXX,81/9f/e0/fc的结构,发现有11处,我全修改之后,还是???
跟踪了一下,刷新文字显示是调用了下面的代码,但是自己能力问题看不懂,希望能的得到指教
0046F1C0 /$ 55 PUSH EBP
0046F1C1 |. 8BEC MOV EBP,ESP
0046F1C3 |. 83EC 08 SUB ESP,8
0046F1C6 |. C745 F8 00000>MOV DWORD PTR SS:[EBP-8],0
0046F1CD |. C745 FC 00000>MOV DWORD PTR SS:[EBP-4],0
0046F1D4 |. EB 09 JMP SHORT Game_-_?0046F1DF
0046F1D6 |> 8B45 FC /MOV EAX,DWORD PTR SS:[EBP-4]
0046F1D9 |. 83C0 01 |ADD EAX,1
0046F1DC |. 8945 FC |MOV DWORD PTR SS:[EBP-4],EAX
0046F1DF |> 8B4D 08 MOV ECX,DWORD PTR SS:[EBP+8]
0046F1E2 |. 034D FC |ADD ECX,DWORD PTR SS:[EBP-4]
0046F1E5 |. 0FBE11 |MOVSX EDX,BYTE PTR DS:[ECX]
0046F1E8 |. 85D2 |TEST EDX,EDX
0046F1EA |. 0F84 FB000000 |JE Game_-_?0046F2EB
0046F1F0 |. 837D F8 00 |CMP DWORD PTR SS:[EBP-8],0
0046F1F4 |. 75 4F |JNZ SHORT Game_-_?0046F245
0046F1F6 |. 8B45 08 |MOV EAX,DWORD PTR SS:[EBP+8]
0046F1F9 |. 0345 FC |ADD EAX,DWORD PTR SS:[EBP-4]
0046F1FC |. 0FB608 |MOVZX ECX,BYTE PTR DS:[EAX]
0046F1FF |. 81F9 81000000 |CMP ECX,81
0046F205 |. 7C 10 |JL SHORT Game_-_?0046F217
0046F207 |. 8B55 08 |MOV EDX,DWORD PTR SS:[EBP+8]
0046F20A |. 0355 FC |ADD EDX,DWORD PTR SS:[EBP-4]
0046F20D |. 0FB602 |MOVZX EAX,BYTE PTR DS:[EDX]
0046F210 |. 3D FE000000 |CMP EAX,0FE
0046F215 |. 7E 22 |JLE SHORT Game_-_?0046F239
0046F217 |> 8B4D 08 |MOV ECX,DWORD PTR SS:[EBP+8]
0046F21A |. 034D FC |ADD ECX,DWORD PTR SS:[EBP-4]
0046F21D |. 0FB611 |MOVZX EDX,BYTE PTR DS:[ECX]
0046F220 |. 81FA E0000000 |CMP EDX,0E0
0046F226 |. 7C 1D |JL SHORT Game_-_?0046F245
0046F228 |. 8B45 08 |MOV EAX,DWORD PTR SS:[EBP+8]
0046F22B |. 0345 FC |ADD EAX,DWORD PTR SS:[EBP-4]
0046F22E |. 0FB608 |MOVZX ECX,BYTE PTR DS:[EAX]
0046F231 |. 81F9 FE000000 |CMP ECX,0FE
0046F237 |. 7F 0C |JG SHORT Game_-_?0046F245
0046F239 |> C745 F8 01000>|MOV DWORD PTR SS:[EBP-8],1
0046F240 |. E9 94000000 |JMP Game_-_?0046F2D9
0046F245 |> 837D F8 01 |CMP DWORD PTR SS:[EBP-8],1
0046F249 |. 75 36 |JNZ SHORT Game_-_?0046F281
0046F24B |. 8B55 08 |MOV EDX,DWORD PTR SS:[EBP+8]
0046F24E |. 0355 FC |ADD EDX,DWORD PTR SS:[EBP-4]
0046F251 |. 0FB602 |MOVZX EAX,BYTE PTR DS:[EDX]
0046F254 |. 83F8 7F |CMP EAX,7F
0046F257 |. 74 28 |JE SHORT Game_-_?0046F281
0046F259 |. 8B4D 08 |MOV ECX,DWORD PTR SS:[EBP+8]
0046F25C |. 034D FC |ADD ECX,DWORD PTR SS:[EBP-4]
0046F25F |. 0FB611 |MOVZX EDX,BYTE PTR DS:[ECX]
0046F262 |. 83FA 40 |CMP EDX,40
0046F265 |. 7C 1A |JL SHORT Game_-_?0046F281
0046F267 |. 8B45 08 |MOV EAX,DWORD PTR SS:[EBP+8]
0046F26A |. 0345 FC |ADD EAX,DWORD PTR SS:[EBP-4]
0046F26D |. 0FB608 |MOVZX ECX,BYTE PTR DS:[EAX]
0046F270 |. 81F9 FC000000 |CMP ECX,0FC
0046F276 |. 7F 09 |JG SHORT Game_-_?0046F281
0046F278 |. C745 F8 02000>|MOV DWORD PTR SS:[EBP-8],2
0046F27F |. EB 58 |JMP SHORT Game_-_?0046F2D9
0046F281 |> 837D F8 02 |CMP DWORD PTR SS:[EBP-8],2
0046F285 |. 75 4B |JNZ SHORT Game_-_?0046F2D2
0046F287 |. 8B55 08 |MOV EDX,DWORD PTR SS:[EBP+8]
0046F28A |. 0355 FC |ADD EDX,DWORD PTR SS:[EBP-4]
0046F28D |. 0FB602 |MOVZX EAX,BYTE PTR DS:[EDX]
0046F290 |. 3D 81000000 |CMP EAX,81
0046F295 |. 7C 11 |JL SHORT Game_-_?0046F2A8
0046F297 |. 8B4D 08 |MOV ECX,DWORD PTR SS:[EBP+8]
0046F29A |. 034D FC |ADD ECX,DWORD PTR SS:[EBP-4]
0046F29D |. 0FB611 |MOVZX EDX,BYTE PTR DS:[ECX]
0046F2A0 |. 81FA FE000000 |CMP EDX,0FE
0046F2A6 |. 7E 21 |JLE SHORT Game_-_?0046F2C9
0046F2A8 |> 8B45 08 |MOV EAX,DWORD PTR SS:[EBP+8]
0046F2AB |. 0345 FC |ADD EAX,DWORD PTR SS:[EBP-4]
0046F2AE |. 0FB608 |MOVZX ECX,BYTE PTR DS:[EAX]
0046F2B1 |. 81F9 E0000000 |CMP ECX,0E0
0046F2B7 |. 7C 19 |JL SHORT Game_-_?0046F2D2
0046F2B9 |. 8B55 08 |MOV EDX,DWORD PTR SS:[EBP+8]
0046F2BC |. 0355 FC |ADD EDX,DWORD PTR SS:[EBP-4]
0046F2BF |. 0FB602 |MOVZX EAX,BYTE PTR DS:[EDX]
0046F2C2 |. 3D FE000000 |CMP EAX,0FE
0046F2C7 |. 7F 09 |JG SHORT Game_-_?0046F2D2
0046F2C9 |> C745 F8 01000>|MOV DWORD PTR SS:[EBP-8],1
0046F2D0 |. EB 07 |JMP SHORT Game_-_?0046F2D9
0046F2D2 |> C745 F8 00000>|MOV DWORD PTR SS:[EBP-8],0
0046F2D9 |> 8B4D FC |MOV ECX,DWORD PTR SS:[EBP-4]
0046F2DC |. 3B4D 0C |CMP ECX,DWORD PTR SS:[EBP+C]
0046F2DF |. 75 05 |JNZ SHORT Game_-_?0046F2E6
0046F2E1 |. 8B45 F8 |MOV EAX,DWORD PTR SS:[EBP-8]
0046F2E4 |. EB 07 |JMP SHORT Game_-_?0046F2ED
0046F2E6 |>^ E9 EBFEFFFF \JMP Game_-_?0046F1D6
0046F2EB |> 33C0 XOR EAX,EAX
0046F2ED |> 8BE5 MOV ESP,EBP
0046F2EF |. 5D POP EBP
0046F2F0 \. C3 RETN
[ 此帖被jsnthyj在2013-10-21 18:39重新编辑 ]