以下这个本论坛的下载贴中,由于有个字符串在中文系统中不能正常显示,导致游戏不能正常 运行。
- T& n! D# k* p. E% }$ N! w修道院:导演剪辑版(The Abbey: Director's cut)
- G. B7 E1 h; U: Fhttps://www.chinaavg.com/forum.php?mod=viewthread&tid=147967
7 e+ Q" b! J6 [8 c R' y
6 c( E, O2 y5 v2 D具体信息可以参考Messages.log。修改正确后的字符串为Tomas。9 t% y8 L% I) E5 M/ I3 c% p5 E* {
修改处7 ?5 _4 d/ D+ N3 z" n5 `- l: V4 |1 Q
《1》以下文件的内容
- v. n7 U3 @( j0 ?\The Abbey Directors Cut\English\Data\Game\Game.xmb6 a5 M! K+ C' ?. s9 i( ~
《2》所有游戏的文件和目录名,只要含有那个字符串的都要修改为Tomas1 C% d' V7 L. Q$ Z
比如\English\Data\Models\Tomas
% [( u5 v) ~ A4 b5 ~( u G A0 m" I5 g8 |, H
用ida pro 进行简单分析后,确定游戏是directx9的游戏,
/ c% u- }# S8 [' v6 H9 e5 _, K# A4 V- .text:004F8D3B push 20h ; SDKVersion4 ~! t0 U2 f* O; ^9 z& L
- .text:004F8D3D mov esi, ecx
) a' t9 j! j+ l M3 S% Q$ |) g- w - .text:004F8D3F call Direct3DCreate9
复制代码
, R; _: {' Q, j- C+ k# L5 ^7 J7 k' h$ ~" ?+ k5 g
* K" X2 Q2 w) R1 C" a播放动画的时候,好像用了direct draw
7 q4 a& \/ }" D4 P% m0 S- .text:004F4200 ; int __thiscall CVideo::Create(CVideo *__hidden this)" c1 |8 ]! s, H( a9 W- n; @3 e1 j
- .text:004F4200 public ?Create@CVideo@@QAEHXZ
% D) H$ D! M) f' X$ M" g: n$ O - .text:004F4200 ?Create@CVideo@@QAEHXZ proc near ; CODE XREF: CSystem::Create(HINSTANCE__ *,int,char *,char *,CWorld *,char const *)+380↑p
/ f( C2 G! T r - .text:004F4200 ; DATA XREF: .rdata:off_5C6668↓o* B1 u# z. s! ~$ x# V. W) M- M
- .text:004F4200 push esi
+ o# L. e4 u4 u; w3 Z7 @0 z" g - .text:004F4201 push edi0 n3 c; V1 T: H, `" }6 a
- .text:004F4202 mov esi, ecx, U) J$ p& p: ~1 f% f5 I% v+ B2 u4 ]
- .text:004F4204 push 0 ; pUnkOuter2 ]& R* A) w4 X' b& P3 N
- .text:004F4206 lea edi, [esi+54h]. T% T" _3 j- w! J A' N& a
- .text:004F4209 push edi ; lplpDD
9 S6 f7 C D8 a, j" ]9 A6 Y' f* x& }$ g - .text:004F420A push 0 ; lpGUID
2 I3 j3 L4 [$ h9 {% G8 s - .text:004F420C mov byte ptr [esi+79h], 0
7 Q8 e9 o, p8 D( B8 l0 v6 ^ - .text:004F4210 call DirectDrawCreate
复制代码
9 ?# @: B+ s6 { W4 S; k: w- x# S: }) k7 [( ^' |5 Q5 E3 J* y
O' X4 v8 m- b) m' m
本游戏可以窗口化,比较容易调试。2 s6 g0 N. \; [7 G1 Z
找一句画面有的字符串the son of ,找到显示函数。
' W( u% |1 e+ c8 O$ F+ e以后我们用自己的函数替换它即可。2 Q3 P2 x" K. n9 n0 {
% E6 N& A& v$ P# G
对话字幕断点处
/ t; `) ]) r( X6 ]5 } z8 j; I004B5AF3 |> /8A08 /mov cl, byte ptr [eax]
1 f6 p1 y* r9 J
@# w" |! S. j/ W5 N# X. K( r5 S/ H# ^( h0 m8 c5 P
char __thiscall CFadingText::Set
6 p# |, N+ W& G6 h, @( u(CFadingText *this, char *a2, int a3, int a4, bool a5, bool a6)% Q6 L/ E, J3 m" h X/ y$ y
; O7 N+ k5 ^+ M" [6 N$ T) m; H
查了以下调用它的地方,有10多个,看来这个游戏所有地方的字幕应该都是调用这个显示函数了,4 ^( H$ a0 z }' O: F
( [, E: b" \6 c/ V; l' R; I" s以下是一部分
P0 s, d6 B$ O4 ~8 ?5 g- CGLCLayer::Render+97, % H0 g+ N( ]) Z, l R
- CGameInterface::ShowSentence+2C,
2 ^; I+ p o% j- X ?) y - CGameInterface::CloseDiary+1A,
+ U: n! C& ~( z; R8 H/ ~$ \4 s+ k - CGameInterface::SetDiaryText+6A,
9 L% O/ A( j. {& G - CGameInterface::OpenMainMenu+17,
2 `+ l) e6 {% j' \+ ` - CGameInterface::AddMenu+67, / s& _& S5 [" W
- CGameInterface::OnMenuPressed+0AB, M)
3 @8 Y% Z J( ^; m - TheAbbey.CFadingText::Set
复制代码 8 s, j/ [9 i# G; L/ ]
! g! T0 u" S8 B9 j1 [6 m+ H
& y8 y% f5 j7 ^3 |1 }* ^( d9 H% s* f! Z! ^& e* x
; v+ @6 z+ z3 }5 y; p% ?
|