以下这个本论坛的下载贴中,由于有个字符串在中文系统中不能正常显示,导致游戏不能正常 运行。
1 o; x" P D# E# m% G$ T- H4 E+ j' h修道院:导演剪辑版(The Abbey: Director's cut)
X3 R" B7 r! i2 N4 [. Phttps://www.chinaavg.com/forum.php?mod=viewthread&tid=147967( _! ]/ Z& J! g2 e. _
8 X. a% D: @7 K" _/ s
具体信息可以参考Messages.log。修改正确后的字符串为Tomas。) b$ m# T. Z U! S
修改处
! d+ Q0 J% A6 h, J1 G《1》以下文件的内容/ J% b! j. d) m9 r
\The Abbey Directors Cut\English\Data\Game\Game.xmb( d7 P1 A/ }) T$ W8 c2 H9 F
《2》所有游戏的文件和目录名,只要含有那个字符串的都要修改为Tomas
8 L) c8 l0 R: `1 H 比如\English\Data\Models\Tomas8 _5 Z, h' r- u) y' B9 z) _
3 M5 _! T2 P& Z用ida pro 进行简单分析后,确定游戏是directx9的游戏,
: f# |* E7 ~" A1 A/ U* ^- .text:004F8D3B push 20h ; SDKVersion
2 w# ?+ O- c3 N7 z3 P+ o4 G; M' n - .text:004F8D3D mov esi, ecx5 Z- X0 E# F7 B0 i6 I
- .text:004F8D3F call Direct3DCreate9
复制代码
* N8 _& ]) N' K0 {# H; g! S. X- ]1 u# \/ |1 q/ ?
- l* H$ C6 f; Z! ] h( F
播放动画的时候,好像用了direct draw
) \+ X! R$ q0 |1 q$ [- .text:004F4200 ; int __thiscall CVideo::Create(CVideo *__hidden this)( m7 \3 t: W$ ~3 N- ~4 g
- .text:004F4200 public ?Create@CVideo@@QAEHXZ
?. T( ]0 a" x" \, [/ N5 b - .text:004F4200 ?Create@CVideo@@QAEHXZ proc near ; CODE XREF: CSystem::Create(HINSTANCE__ *,int,char *,char *,CWorld *,char const *)+380↑p+ ^0 X8 T8 M) e5 a) M) w
- .text:004F4200 ; DATA XREF: .rdata:off_5C6668↓o
+ a$ a5 v' l/ S# ]5 Y - .text:004F4200 push esi8 }' O ?- C) r' j1 e2 h
- .text:004F4201 push edi
3 o) {% A0 W8 K" s* f' S) Z - .text:004F4202 mov esi, ecx4 n, P# P7 V4 \( @% |7 U6 v
- .text:004F4204 push 0 ; pUnkOuter
) l' o. ^0 b& A: {% Z6 A - .text:004F4206 lea edi, [esi+54h]7 c6 ]; Q! ^7 h( i( q
- .text:004F4209 push edi ; lplpDD
% K y2 L7 S% z5 ` - .text:004F420A push 0 ; lpGUID
, e% F- z: U' @4 a. \+ M. S/ Z - .text:004F420C mov byte ptr [esi+79h], 0
) i: I! M9 B9 K G3 c/ U) K - .text:004F4210 call DirectDrawCreate
复制代码 . v9 ]: V g- o3 H' I
" ^$ c9 [7 W: j3 O) d2 x) O" ^: ~* x0 i/ Q
本游戏可以窗口化,比较容易调试。0 U/ {3 o% B- _% g s9 J* b b- b
找一句画面有的字符串the son of ,找到显示函数。. K& H. S' F8 K& w4 X
以后我们用自己的函数替换它即可。
9 B7 k. o4 m0 B% P$ M$ s2 N6 s5 a& q% I0 B
对话字幕断点处
" K, w& Q- Q7 L4 |, {' R. T' T z, O004B5AF3 |> /8A08 /mov cl, byte ptr [eax]/ O' `; j% V: w ~' F- o% [" |3 M
0 ^# [5 H3 ]" A% L; I
2 t! E6 M& Q# l/ t- F6 c! E& Schar __thiscall CFadingText::Set
8 e! ~" ~( V v8 q(CFadingText *this, char *a2, int a3, int a4, bool a5, bool a6)
8 j# E3 E8 v; U" C3 O
6 B& O$ ?8 r2 u- r4 D* P查了以下调用它的地方,有10多个,看来这个游戏所有地方的字幕应该都是调用这个显示函数了,& F& o7 x |8 a; }
/ i6 r- ~& O `" Q以下是一部分2 x- v8 l1 f, r/ S" B: _! {7 o8 J
- CGLCLayer::Render+97,
+ B3 c {) ?. B9 |+ t8 Y - CGameInterface::ShowSentence+2C,
5 B( s" d$ g# `$ N+ |8 Y0 L$ T, R - CGameInterface::CloseDiary+1A,
7 U+ a/ Z, T R" Q4 I f - CGameInterface::SetDiaryText+6A,
+ B6 G) k* z$ s% _ - CGameInterface::OpenMainMenu+17, 0 S# Q/ c0 M& N, g5 g
- CGameInterface::AddMenu+67, % g# M1 g) I, ?. V% Y
- CGameInterface::OnMenuPressed+0AB, M)0 c& w2 Q6 l: V; P* l
- TheAbbey.CFadingText::Set
复制代码
" J2 D& ]; S; D3 h9 c
8 a" H: X5 s: Q4 V# Z r/ a" t5 E' h6 ~' B
; `/ q; Z4 ?' g2 L' C* T4 K: h( Z+ ?; @6 J" ]# H
|