以下这个本论坛的下载贴中,由于有个字符串在中文系统中不能正常显示,导致游戏不能正常 运行。4 E' f& N6 Z( P) r% k
修道院:导演剪辑版(The Abbey: Director's cut)
3 w3 R4 U8 t, @' S% L! |. Thttps://www.chinaavg.com/forum.php?mod=viewthread&tid=147967
/ p* c. a. @2 K: B
1 F; {0 |* L% P1 @# {1 }具体信息可以参考Messages.log。修改正确后的字符串为Tomas。
$ m( g" N5 X; u# G9 A6 Z修改处
) r- J5 Y; W' I1 S, u《1》以下文件的内容
# R( [5 D# H; ?$ D* E\The Abbey Directors Cut\English\Data\Game\Game.xmb
+ h( d* F' E9 r9 S0 g( _《2》所有游戏的文件和目录名,只要含有那个字符串的都要修改为Tomas
% F/ _& d4 h4 B/ s) T. |& J 比如\English\Data\Models\Tomas
5 l. F7 m7 t) b7 \# @5 k- D% q# h6 o
用ida pro 进行简单分析后,确定游戏是directx9的游戏,9 F$ B$ m: I& U! e
- .text:004F8D3B push 20h ; SDKVersion
" d* X2 f5 J7 Q8 Q+ @ - .text:004F8D3D mov esi, ecx
6 `% z. }* n {' z w' x. ]4 B - .text:004F8D3F call Direct3DCreate9
复制代码 % y- q8 {' i. |& n1 x' a: ?, U
6 X/ L H$ D/ E2 h2 m# h0 F& D: N( k* ?) i+ U7 b
播放动画的时候,好像用了direct draw
; Z, x" D1 U- y& @( |# I2 P- .text:004F4200 ; int __thiscall CVideo::Create(CVideo *__hidden this)
. D* n2 ^! V/ ~3 [* d6 Z* ~7 u - .text:004F4200 public ?Create@CVideo@@QAEHXZ2 B& }* O: T3 r/ b
- .text:004F4200 ?Create@CVideo@@QAEHXZ proc near ; CODE XREF: CSystem::Create(HINSTANCE__ *,int,char *,char *,CWorld *,char const *)+380↑p
9 m8 P; G" n! ?6 b7 f1 g- [; @5 K - .text:004F4200 ; DATA XREF: .rdata:off_5C6668↓o
+ A5 G/ Q0 _1 [9 i. b- L) `- L" N! C5 A - .text:004F4200 push esi
" v& k/ t! x9 B8 W W" o: Y - .text:004F4201 push edi
1 a1 O3 l# I8 _ a6 Q - .text:004F4202 mov esi, ecx1 G. v" \2 h# V# E
- .text:004F4204 push 0 ; pUnkOuter; [0 {9 V- D# P
- .text:004F4206 lea edi, [esi+54h], h$ s3 N% c2 A0 P
- .text:004F4209 push edi ; lplpDD
# x/ P0 s1 r. { - .text:004F420A push 0 ; lpGUID
- U; d3 f0 q1 p' n4 B - .text:004F420C mov byte ptr [esi+79h], 0! V$ I" w. {* j" m1 f
- .text:004F4210 call DirectDrawCreate
复制代码
7 O ?# R( B8 r. w; v' i" X
6 x* [: V K! o# r- A
7 j& C3 F: {# I; \本游戏可以窗口化,比较容易调试。; p! s+ R' \, B+ O2 A+ B
找一句画面有的字符串the son of ,找到显示函数。
4 J& |# M' l0 L' E以后我们用自己的函数替换它即可。, P: G B7 @: P2 p* X* `3 n
; X1 K& B3 V+ n
对话字幕断点处3 N9 y' V* z5 a& G' o& G
004B5AF3 |> /8A08 /mov cl, byte ptr [eax]1 t& U( Z3 Y! N# @# `& O( E
7 N% S/ r: N% J8 ?' v5 j4 o$ t3 A9 o
" W. ]. H7 z7 achar __thiscall CFadingText::Set
% N# @/ p1 o4 _(CFadingText *this, char *a2, int a3, int a4, bool a5, bool a6)
; h( o, F! k7 r& ~/ t0 q8 E% X$ n7 e4 w! I6 T) q2 y
查了以下调用它的地方,有10多个,看来这个游戏所有地方的字幕应该都是调用这个显示函数了,+ q% S0 ` x$ q; S
0 y0 }4 \& B* ]7 m以下是一部分
* M* s+ Z$ \; x. C! W+ N- CGLCLayer::Render+97, ' r; o0 A P9 g" ~
- CGameInterface::ShowSentence+2C,
* h4 N3 o" x7 f @& t - CGameInterface::CloseDiary+1A,
# e* e( O/ n9 y( V; Q( M$ n - CGameInterface::SetDiaryText+6A, ( q+ w0 A1 l l3 h% m b
- CGameInterface::OpenMainMenu+17,
7 h* l$ E) H4 o1 D5 ?; K - CGameInterface::AddMenu+67, 4 ^' k& }3 u! J+ {/ \+ L1 u2 b9 K
- CGameInterface::OnMenuPressed+0AB, M)
$ c3 T) q& L( F# Q - TheAbbey.CFadingText::Set
复制代码
) f4 F( X1 i. L. e; E" \4 c
" g5 d* u8 |0 O9 S9 E0 u5 [8 @7 O5 L' N
a6 p/ I- f2 Q* J' z4 s
% p2 Q8 `2 P0 m/ T H9 D$ ]5 r
|