以下这个本论坛的下载贴中,由于有个字符串在中文系统中不能正常显示,导致游戏不能正常 运行。
/ D4 i0 m! i& ?3 i8 r5 @修道院:导演剪辑版(The Abbey: Director's cut), b d5 q, y5 S1 \& A3 s
https://www.chinaavg.com/forum.php?mod=viewthread&tid=147967
2 c$ z6 d$ ^2 U! m; i7 l5 {# L+ ~9 \* B
具体信息可以参考Messages.log。修改正确后的字符串为Tomas。" `3 U) |; H- Z6 a
修改处
; n$ i+ B6 D3 l2 \( u& t1 p《1》以下文件的内容. @. u! G5 I4 b9 N; N
\The Abbey Directors Cut\English\Data\Game\Game.xmb, U) b% H+ f/ L) v: l4 l& z1 X& \( r
《2》所有游戏的文件和目录名,只要含有那个字符串的都要修改为Tomas
, J! ~5 i7 C2 {& K& W) v3 @ 比如\English\Data\Models\Tomas: O& G: P% h2 j8 |5 l! s- u4 F1 f& O9 D
8 E+ p5 n, A# m9 J
用ida pro 进行简单分析后,确定游戏是directx9的游戏,$ K* S9 H5 z! v
- .text:004F8D3B push 20h ; SDKVersion. @* @3 `: f& J* ]% X
- .text:004F8D3D mov esi, ecx0 e; K" [+ ]2 B' V% t
- .text:004F8D3F call Direct3DCreate9
复制代码
, W' t: L2 |" Q G" h. h5 m+ L! ?6 `, O, N
) w( l. O+ m( W* ?9 f- Y$ f4 X
播放动画的时候,好像用了direct draw/ ^. q F- `4 e
- .text:004F4200 ; int __thiscall CVideo::Create(CVideo *__hidden this)
+ c) U# J# O5 P - .text:004F4200 public ?Create@CVideo@@QAEHXZ" Y+ ?! J- {% `, l/ k$ H `
- .text:004F4200 ?Create@CVideo@@QAEHXZ proc near ; CODE XREF: CSystem::Create(HINSTANCE__ *,int,char *,char *,CWorld *,char const *)+380↑p
6 B: M. D0 v7 a8 E: v& k - .text:004F4200 ; DATA XREF: .rdata:off_5C6668↓o, |. {5 {8 y/ z N, Y
- .text:004F4200 push esi
" H9 F' k. U% [7 }2 B - .text:004F4201 push edi: B- q" j( f# `) i
- .text:004F4202 mov esi, ecx
/ f z* S6 O7 L0 K5 z0 f - .text:004F4204 push 0 ; pUnkOuter8 P O& ^1 a: f: t( F' G
- .text:004F4206 lea edi, [esi+54h]8 N+ [4 x9 I! n" j: G
- .text:004F4209 push edi ; lplpDD+ @) q! g* t8 T& T. N/ d) s
- .text:004F420A push 0 ; lpGUID
0 A3 S# \: Q* }8 _" o( f* L; ?5 m1 f - .text:004F420C mov byte ptr [esi+79h], 09 X% R- J+ R) G( h! t" Y
- .text:004F4210 call DirectDrawCreate
复制代码
7 e7 O. M( k2 l" ~7 Y0 O
5 v$ Q7 R! b4 |
1 _; `' A9 f% N9 K. E* w) M本游戏可以窗口化,比较容易调试。
! O% b( h$ h1 M3 [) |6 X3 J7 R I找一句画面有的字符串the son of ,找到显示函数。1 S5 V: h. U5 f
以后我们用自己的函数替换它即可。
$ T- g; C0 |% C) V c: B+ b* R2 I1 x
对话字幕断点处$ t, H; L2 d/ b1 _* l
004B5AF3 |> /8A08 /mov cl, byte ptr [eax]) D/ p) {( D2 O# y
+ |0 X- O* {1 a3 G3 N" _0 r1 n" e; h& L; Y
char __thiscall CFadingText::Set
- t: j1 R3 x! x(CFadingText *this, char *a2, int a3, int a4, bool a5, bool a6)
; t" p5 s" ^) c* I& z+ B {
. C+ U! s$ q* J! y d查了以下调用它的地方,有10多个,看来这个游戏所有地方的字幕应该都是调用这个显示函数了,
0 y( x6 a9 M6 }2 v: U2 X c {* A6 o+ F' q, x5 ?4 @
以下是一部分5 o/ o4 Q8 H3 V" _; H1 P" F
- CGLCLayer::Render+97,
/ e( @3 t9 T+ W* @6 a% m - CGameInterface::ShowSentence+2C,
9 x' \: Q$ s3 \) ?% L - CGameInterface::CloseDiary+1A, T8 @3 h& Z7 H! I: X, y1 f
- CGameInterface::SetDiaryText+6A, - g( J! A* T$ N# ]
- CGameInterface::OpenMainMenu+17, % H1 h7 M3 N9 ?7 r/ C5 t; Y, t
- CGameInterface::AddMenu+67, ! j2 h5 k& h. W5 t# h
- CGameInterface::OnMenuPressed+0AB, M)
1 f4 O" p( f" y7 e r( x+ q - TheAbbey.CFadingText::Set
复制代码
/ Y1 y" `( j* c) U3 d6 W4 H
. R4 a! N3 w* D& U p7 p9 X
9 \) |! N2 x) @8 p/ R; B! @& P+ I" X3 q; F
! F( q0 D; S' t7 e* f |