以下这个本论坛的下载贴中,由于有个字符串在中文系统中不能正常显示,导致游戏不能正常 运行。 n+ i2 y: m9 m% J7 ]/ {* N
修道院:导演剪辑版(The Abbey: Director's cut)0 ]0 k4 G2 X& Q' ]4 |7 @- o
https://www.chinaavg.com/forum.php?mod=viewthread&tid=147967
4 |) ^' Q' X& x4 C
5 b1 V5 R+ q( b具体信息可以参考Messages.log。修改正确后的字符串为Tomas。& q! E. U0 }1 }$ R) C. K8 b$ L b
修改处0 `- o3 X6 i" [5 y) t
《1》以下文件的内容3 g" H+ K* e! f$ Y. f
\The Abbey Directors Cut\English\Data\Game\Game.xmb
" D0 |1 c2 b+ V _《2》所有游戏的文件和目录名,只要含有那个字符串的都要修改为Tomas
; d# ]: r8 q( Z2 R. Q& I& J3 ?: k: h( Z# W 比如\English\Data\Models\Tomas! e* H' n1 X* R) Y) f( a2 V
5 a! m: `; a7 ?2 e( K" r% i
用ida pro 进行简单分析后,确定游戏是directx9的游戏,
0 b3 C- d' }3 i' S) r- .text:004F8D3B push 20h ; SDKVersion7 B$ G E7 x7 U( _: S+ g0 a- b5 S
- .text:004F8D3D mov esi, ecx; S/ l, i* L& r% L' W1 ]; x
- .text:004F8D3F call Direct3DCreate9
复制代码 7 G, x' H) u2 `1 y0 @# u$ i S7 v, u
2 p$ j {) ~/ ]) z9 X
/ e( @7 d! R8 J2 Y- o7 }
播放动画的时候,好像用了direct draw+ z" K. ]# ^3 c6 a( t
- .text:004F4200 ; int __thiscall CVideo::Create(CVideo *__hidden this)
. o$ L0 P$ x% S7 p. g' g - .text:004F4200 public ?Create@CVideo@@QAEHXZ
; r/ W" i3 A7 ^1 U5 g - .text:004F4200 ?Create@CVideo@@QAEHXZ proc near ; CODE XREF: CSystem::Create(HINSTANCE__ *,int,char *,char *,CWorld *,char const *)+380↑p
0 n3 e# i/ g3 S$ K - .text:004F4200 ; DATA XREF: .rdata:off_5C6668↓o
* \) c$ M/ B/ F4 l - .text:004F4200 push esi
3 P5 T3 z8 U: M' z/ y: D - .text:004F4201 push edi. N) Q6 l2 C2 R, B8 }$ C
- .text:004F4202 mov esi, ecx
# F2 E+ N5 R R - .text:004F4204 push 0 ; pUnkOuter
8 n0 Z- n" e2 r - .text:004F4206 lea edi, [esi+54h]
0 O3 x* m6 r% Z) g0 F - .text:004F4209 push edi ; lplpDD
) t2 u( w& ?4 P! x, } - .text:004F420A push 0 ; lpGUID
p8 }( u" C6 a8 ^. u - .text:004F420C mov byte ptr [esi+79h], 09 W& ]& f K9 g N9 T! R
- .text:004F4210 call DirectDrawCreate
复制代码 9 E& e( k% l1 B2 V4 [' I8 W
4 C2 O9 H* O" d* S& j' U
7 `: R8 Z. ]" F) y) A, e( j2 n本游戏可以窗口化,比较容易调试。
) x2 X8 j) r( |+ ~0 P# y/ V找一句画面有的字符串the son of ,找到显示函数。
! [+ ~, G4 f6 M, y+ `$ x以后我们用自己的函数替换它即可。' z0 l; Q( p. E* Z+ u, |! e
) B( O9 p- H/ [. ]. X
对话字幕断点处( ^: K+ X9 g6 a$ F
004B5AF3 |> /8A08 /mov cl, byte ptr [eax]
6 E# \4 H ?1 J/ ~% B5 U) E& v* {) a
3 Q5 F8 U9 n/ t, s9 V( w6 a
char __thiscall CFadingText::Set
1 y% O# `4 z; M(CFadingText *this, char *a2, int a3, int a4, bool a5, bool a6)7 l9 c2 r6 p+ R& E
# j( F- h/ a6 h$ T' ?% H+ F查了以下调用它的地方,有10多个,看来这个游戏所有地方的字幕应该都是调用这个显示函数了,; B& X; c) y" C! Q9 {- E
0 @; G! H; T0 I" J+ t3 @
以下是一部分0 J! \4 h6 w4 u3 H, e
- CGLCLayer::Render+97,
3 X, ?" N2 X6 P& S( d) J - CGameInterface::ShowSentence+2C,
1 I5 W5 g& r9 I& {: A! P# F - CGameInterface::CloseDiary+1A,
2 f* I) T1 p8 Q7 y/ M' N, N/ y - CGameInterface::SetDiaryText+6A, ; L8 R. T7 v* p! L$ o: L2 D' R4 o& c
- CGameInterface::OpenMainMenu+17,
% v R" k& h% l7 G% U, f - CGameInterface::AddMenu+67, u5 d, Y) Q9 h( |7 F, M5 J
- CGameInterface::OnMenuPressed+0AB, M); i; B+ g6 S4 p
- TheAbbey.CFadingText::Set
复制代码 , I) `$ A1 F$ X. e
4 j8 l! w" O+ P' g
: o. O: @) }' W0 J5 p! e
% m( q6 m$ K1 }" I6 y8 u* {- P" Z2 I7 f( ^# X ]
|