以下这个本论坛的下载贴中,由于有个字符串在中文系统中不能正常显示,导致游戏不能正常 运行。2 x! U1 C$ E, v D6 N
修道院:导演剪辑版(The Abbey: Director's cut)# ~# O- T4 Y! v# h
https://www.chinaavg.com/forum.php?mod=viewthread&tid=147967$ m a" Z' \, S
. o1 k, v5 @$ ?% V
具体信息可以参考Messages.log。修改正确后的字符串为Tomas。
B" g% d' L" f) g( }. L/ M修改处
/ M5 v6 c% ?6 {, U8 K《1》以下文件的内容' t3 _4 _6 z9 w' n9 u
\The Abbey Directors Cut\English\Data\Game\Game.xmb N: V+ T' u& V7 i* S
《2》所有游戏的文件和目录名,只要含有那个字符串的都要修改为Tomas# [, q3 x0 X) u( ]
比如\English\Data\Models\Tomas% F" N# j* A% B& S: u
, |6 H" d" p; I/ j! t/ G
用ida pro 进行简单分析后,确定游戏是directx9的游戏,
- I* y5 W( |, I; s2 l4 o- .text:004F8D3B push 20h ; SDKVersion- @1 k6 S+ C% W: |/ O0 C: y
- .text:004F8D3D mov esi, ecx( O; u( K6 A- ]5 I
- .text:004F8D3F call Direct3DCreate9
复制代码 3 G! u% z9 L1 I1 m
- W6 I5 e2 B' D) X {" s
4 R* j( y+ K& c* X u& Z播放动画的时候,好像用了direct draw& i4 b4 \8 k! G* b! g3 }' m3 R1 p
- .text:004F4200 ; int __thiscall CVideo::Create(CVideo *__hidden this)) y+ l, V' V4 @3 E G3 W7 S) C9 o
- .text:004F4200 public ?Create@CVideo@@QAEHXZ
: E- R+ s' o3 z u z - .text:004F4200 ?Create@CVideo@@QAEHXZ proc near ; CODE XREF: CSystem::Create(HINSTANCE__ *,int,char *,char *,CWorld *,char const *)+380↑p
9 E5 Y3 Q! t( i% Q5 Z: Q - .text:004F4200 ; DATA XREF: .rdata:off_5C6668↓o, {% r9 Z3 w! G3 B W: a; n, g
- .text:004F4200 push esi% i; X2 ~, H5 `- w+ m4 W8 n% }
- .text:004F4201 push edi
; s8 b* x7 ?) U0 E - .text:004F4202 mov esi, ecx
- w; a2 g% ~) ?! w9 T2 H - .text:004F4204 push 0 ; pUnkOuter
1 W& p! Z' N4 n/ q, _' v0 }/ S, P - .text:004F4206 lea edi, [esi+54h]
# d' |& }% f" K - .text:004F4209 push edi ; lplpDD
! ?4 R% q" }" U' n/ q" j3 L- T - .text:004F420A push 0 ; lpGUID3 I) U+ m3 Y8 {7 _
- .text:004F420C mov byte ptr [esi+79h], 0
, H- M$ ~2 H$ Z9 M$ b: j - .text:004F4210 call DirectDrawCreate
复制代码
4 z( |; T- \* i) o$ G8 f9 E8 v- ]& v- x) j/ k1 i' j% ~, i: T, t$ e
9 V$ J4 p6 ]% p3 N# b
本游戏可以窗口化,比较容易调试。
4 G6 E- Z1 k5 y; _找一句画面有的字符串the son of ,找到显示函数。" n7 O+ n$ L9 [. [" O4 g* p% t
以后我们用自己的函数替换它即可。
3 ]& j# t5 O0 W. {
( h# W+ H, t2 F, C对话字幕断点处5 |9 f/ ?7 e {4 I U! C+ {: N
004B5AF3 |> /8A08 /mov cl, byte ptr [eax]7 j8 S# ^3 O; G) s+ T8 Z
7 X3 n. Y" }/ q* I4 a1 m
3 ]9 _+ v/ |" C% U
char __thiscall CFadingText::Set* ~ Z s2 e" N1 V! G! j
(CFadingText *this, char *a2, int a3, int a4, bool a5, bool a6)4 K+ v ?7 U' }& h0 H/ | a6 n
$ P1 P/ s% n0 `; l" S查了以下调用它的地方,有10多个,看来这个游戏所有地方的字幕应该都是调用这个显示函数了,5 D q5 d0 P- Y0 A# \$ ]: A$ F
2 M T( M' s; X
以下是一部分0 K5 [* X1 w9 P7 k. @
- CGLCLayer::Render+97,
9 h r* ^& ~ `4 w% x! y - CGameInterface::ShowSentence+2C,
! k$ T# |. P* I" H - CGameInterface::CloseDiary+1A,
4 _! u5 j+ m' a- b1 f( v - CGameInterface::SetDiaryText+6A, $ t7 i5 ?! @! |6 B. P) ^
- CGameInterface::OpenMainMenu+17,
4 Y, f! e) s& O: } - CGameInterface::AddMenu+67, 9 T$ ?8 C+ ? B! ?
- CGameInterface::OnMenuPressed+0AB, M)4 w; s5 c+ T' B u
- TheAbbey.CFadingText::Set
复制代码 4 k! A. \- o8 ]9 w8 a/ w% W
7 M4 l6 U0 E$ I9 M2 v+ g. |
1 g' \% [. j" ?! R+ b- F
' e: s9 U z; m* `% a3 K" R! ]% j
8 d8 D8 B2 {. n7 j$ F/ I |