看了一下惊恐鬼屋Scratches这个游戏。( K) M& r" w6 v8 t, E% m
包文件有2个,scratches.res和scream.res,$ y- P; F! k2 y
包文件的格式如下,可以用Game Extractor来解开。, z- Q* e. G$ T* c: z2 ?" j+ s d
http://wiki.xentax.com/index.php/Scratches_RES
' t6 y! B8 U) X; k从scratches.res里面解出一个font-michael.tga文件,就是在游戏利用的字体。% G" i/ U" D, N: b V
scream.res里面也有一个字体文件,但是游戏好像没有用到。
- Z: g) Q# A5 x1 E7 B" y
' w z& V8 r" k, ?8 p {& a9 s# g用OD调试后,发现这是一个使用opengl API的游戏。. g3 L9 b3 I, v! R8 P5 D6 m
在某句字幕上下了内存断点,断下来之后找到了和显示有关的代码段。+ h& }# z( F" k1 w
+ K% H; c+ T8 h' T0 K5 o7 I0040C5D0 /$ 53 push ebx4 \1 s3 l# y4 B4 H) f0 B
0040C5D1 |. 51 push ecx
7 S- X, f( `; v: o5 x5 |9 E* Z9 c! I0040C5D2 |. 52 push edx0 u2 H( B4 [; l' e: J
0040C5D3 |. 56 push esi* M' y! l) ^# q& ~* }7 T
0040C5D4 |. 57 push edi5 e; ~& m _ J
0040C5D5 |. 55 push ebp
. T3 f% n6 _/ W/ W+ {2 O v0040C5D6 |. 81EC 10010000 sub esp, 110
% j& H6 }' ?/ R) i8 I; U0040C5DC |. 89C6 mov esi, eax
5 i ^; V4 T; ^. _! ]' |0040C5DE |. 89C7 mov edi, eax* A m; C, v' ]7 L2 U& q* f0 a
0040C5E0 |. 29C9 sub ecx, ecx# m( z: k) N) @$ F
0040C5E2 |. 49 dec ecx, k. t9 Q# A) P3 b# y
0040C5E3 |. 31C0 xor eax, eax C) m) b- l) k
0040C5E5 |. F2:AE repne scas byte ptr es:[edi]( W" ^1 J! E' @( ]
0040C5E7 |. F7D1 not ecx
3 ]# u+ \8 }' R' I4 ^0040C5E9 |. 49 dec ecx# U* y" A5 m) [
0040C5EA |. 31DB xor ebx, ebx$ j9 b% t; ~# ^! u8 t) D
0040C5EC |. 31ED xor ebp, ebp! [2 S1 B) u9 ] }9 [' E& \
0040C5EE |. 81F9 00010000 cmp ecx, 100
! w! R' Z H6 D9 J: f4 [* b0040C5F4 |. 72 0D jb short 0040C603
7 H( `2 A# I' c2 c+ B0040C5F6 |. 81C4 10010000 add esp, 110
) {4 A r- W* y/ T0040C5FC |. 5D pop ebp+ t1 e! |& Q" l( h# e
0040C5FD |. 5F pop edi9 ?. G: }) O& r- t
0040C5FE |. 5E pop esi' ]0 c+ ~( W9 G
0040C5FF |. 5A pop edx$ D# I8 f1 o8 X$ o" V# B
0040C600 |. 59 pop ecx* O, d0 h; t$ Z- Q( Q
0040C601 |. 5B pop ebx) g& _' a3 [8 i
0040C602 |. C3 retn
& ^8 Q" h+ @/ w4 u8 W1 H- w0040C603 |> 89E7 mov edi, esp/ z2 A/ s9 `* A' @
0040C605 |. 57 push edi* ~& E8 ]. Z8 e# B0 L
0040C606 |> 8A06 /mov al, byte ptr [esi]
$ \& f) w# V- p" ]# @$ Q8 c0040C608 |. 8807 |mov byte ptr [edi], al2 _& p/ D# N. X0 {% J! n
0040C60A |. 3C 00 |cmp al, 0
4 k- X4 G7 x+ \' |" j( ~* s' N) c F0040C60C |. 74 10 |je short 0040C61E
( ]3 ?, g7 |5 q/ T2 O0040C60E |. 8A46 01 |mov al, byte ptr [esi+1]- w9 m8 k/ j* H' t) k) m
0040C611 |. 83C6 02 |add esi, 2& v( A; h1 S! C/ K9 g
0040C614 |. 8847 01 |mov byte ptr [edi+1], al5 y, ?0 t4 ~, ~4 |% q
0040C617 |. 83C7 02 |add edi, 2( t* n' I3 J: S0 H
0040C61A |. 3C 00 |cmp al, 0
2 U, s! ^# U% t6 u. a6 z7 q) ?; w% u0040C61C |.^ 75 E8 \jnz short 0040C606
3 G; a' a8 i: l9 S0040C61E |> 5F pop edi) Z. a# a" {0 e7 d5 }8 X# b- g, N
0040C61F |. 8A1424 mov dl, byte ptr [esp]
* ?& c* |; a O. V# L+ g0040C622 |. 89E0 mov eax, esp1 m o" V$ i- x' D
0040C624 |. 84D2 test dl, dl
0 A! E! Z; x' i9 B t) m' h+ l r0040C626 |. 74 09 je short 0040C631
u8 Z N* C6 E( T0040C628 |> 8A70 01 /mov dh, byte ptr [eax+1], q9 \+ g4 e) q W: r
0040C62B |. 40 |inc eax
7 _' g/ \2 Y3 a" Y0040C62C |. 45 |inc ebp
" u2 G( |3 e. W6 c, E3 z0040C62D |. 84F6 |test dh, dh; X, z$ N0 L$ s: }% F- D
0040C62F |.^ 75 F7 \jnz short 0040C628
6 L' B, ^* C6 [3 J# j( v# p0040C631 |> 81FD D2000000 cmp ebp, 0D26 \4 q+ @1 Q* x3 k
0040C637 |. 0F8E 61010000 jle 0040C79E
6 N+ o# V5 v+ y z: H0 r5 E2 o0040C63D |. 89EA mov edx, ebp4 x/ F3 a) q! \1 G6 R, K
0040C63F |. 89E8 mov eax, ebp$ u- K% I' l- o" W
0040C641 |. C1FA 1F sar edx, 1F
9 S, n% p: k# |6 O- X2 T" x1 T( h0040C644 |. C1E2 02 shl edx, 2& b1 K8 l/ b- H. o
0040C647 |. 1BC2 sbb eax, edx
/ w0 U% o- P6 A) C0040C649 |. C1F8 02 sar eax, 21 W3 q* v4 M0 y/ r" B9 W
0040C64C |. 89C7 mov edi, eax
O' J( ~6 M& Z; W0040C64E |. C78424 040100>mov dword ptr [esp+104], 32 k/ _) S* `/ \+ n
0040C659 |> 89E0 mov eax, esp
: \4 r$ L+ T7 W+ N7 n0040C65B |. 31D2 xor edx, edx
; e: G0 ]; W. S0040C65D |. 8A0C24 mov cl, byte ptr [esp]
: {$ j! r9 K$ @4 | m( U0040C660 |. 8915 8477EF02 mov dword ptr [2EF7784], edx$ I+ r' i4 {) ] [/ M& T& @
0040C666 |. 8915 8C77EF02 mov dword ptr [2EF778C], edx. }" m/ z8 U5 L; N& a9 [$ Q
0040C66C |. 899424 080100>mov dword ptr [esp+108], edx
2 t# e$ Z% w% T! X: W7 N0 D0040C673 |. 89E2 mov edx, esp
3 G. A, H4 Q5 [1 c" ?% A w) `0040C675 |. 84C9 test cl, cl
5 l5 u4 R% W) e( C6 F0040C677 |. 0F84 89000000 je 0040C7062 h+ f4 d \5 M+ v9 u8 _5 f
0040C67D |. 8B8C24 040100>mov ecx, dword ptr [esp+104]
! W: o9 h+ _ B. p; B2 `0040C684 |. 4F dec edi% ]6 j8 C, g4 {( R4 d' N# [
0040C685 |. C1E1 02 shl ecx, 2) M: P5 y: m7 Z/ j8 b
0040C688 |. 89BC24 000100>mov dword ptr [esp+100], edi4 i& H7 H) l8 E& y& [3 a, y' W" N
0040C68F |. 898C24 0C0100>mov dword ptr [esp+10C], ecx
, {, M1 ~ a1 k9 G0040C696 |> 8A0A mov cl, byte ptr [edx]7 |& h' r) s: H [$ N/ K7 S: N
0040C698 |. 80F9 20 cmp cl, 20" K; Z, O; f+ d. X, h; ]
0040C69B |. 0F85 6A010000 jnz 0040C80B
2 J, {" {0 P3 M* ?3 V+ j0040C6A1 |. 3B9C24 000100>cmp ebx, dword ptr [esp+100]% ^* N0 b* t: p7 h/ z% r
0040C6A8 |. 7C 53 jl short 0040C6FD2 p8 a* | w: S% y
0040C6AA |. 8BBC24 0C0100>mov edi, dword ptr [esp+10C]
+ l4 W* M3 l0 e: q* h" `0040C6B1 |. C602 00 mov byte ptr [edx], 0
- s; ], K% F' J6 {! l R- u0040C6B4 |. 89C6 mov esi, eax
& q7 N, g; F7 A. s' P$ C0040C6B6 |. 8BBF 7477EF02 mov edi, dword ptr [edi+2EF7774]
; `$ o+ P6 B8 [, {# T- j6 Z& E0040C6BC |. 31DB xor ebx, ebx: u$ j' u' B! O- C/ W6 L a
0040C6BE |. 57 push edi
* h' }( d z% S: T7 L5 A3 n0040C6BF |> 8A06 /mov al, byte ptr [esi]
9 g% G1 e) n/ x0040C6C1 |. 8807 |mov byte ptr [edi], al! U# e' _) L6 O1 b/ [( L4 W" |
0040C6C3 |. 3C 00 |cmp al, 0! D; t, `7 ^4 `/ l/ r3 Y* N. P0 G, @
0040C6C5 |. 74 10 |je short 0040C6D7
5 H" Y! s7 T$ E0040C6C7 |. 8A46 01 |mov al, byte ptr [esi+1]
% D% ]4 L5 T4 A" ^6 L- u, Y0040C6CA |. 83C6 02 |add esi, 29 w# G0 q- _; e( ? {3 O3 h$ k' _1 @
0040C6CD |. 8847 01 |mov byte ptr [edi+1], al* i4 s; G; L9 C% j: r9 p2 M* b
0040C6D0 |. 83C7 02 |add edi, 2- g E" c9 [2 T9 R! {9 g
0040C6D3 |. 3C 00 |cmp al, 0
, A# h- G4 z1 H1 {0040C6D5 |.^ 75 E8 \jnz short 0040C6BF% h# L3 C2 u+ V/ `- y$ B( H
0040C6D7 |> 5F pop edi2 ^* Q- E' l2 J( ?2 |" |5 o! S
0040C6D8 |. 8D42 01 lea eax, dword ptr [edx+1]
" E. F( P1 A0 o, O0040C6DB |. 8BBC24 0C0100>mov edi, dword ptr [esp+10C]
2 b9 e" W) ]8 S; ?% B% o0040C6E2 |. 8B9424 080100>mov edx, dword ptr [esp+108]
# v2 \6 {& y5 X9 q+ D3 l2 c0040C6E9 |. 83EF 04 sub edi, 4; x8 {, I( C1 q, L" r
0040C6EC |. 42 inc edx
8 i9 d7 ~$ N5 ^ c& k m4 M6 T, {% ^. d0040C6ED |. 89BC24 0C0100>mov dword ptr [esp+10C], edi
! P' T' Y# f8 [1 b& t3 h0040C6F4 |. 899424 080100>mov dword ptr [esp+108], edx0 c' o1 f. D5 N9 h& ?* @& N
0040C6FB |. 89C2 mov edx, eax2 Z" @5 n' \" p+ G9 J3 N
0040C6FD |> 43 inc ebx
7 Y! I* g3 M; {* ?0040C6FE |. 8A6A 01 mov ch, byte ptr [edx+1]
: a; w9 E9 a& q) i0040C701 |. 42 inc edx
' P' f' d3 {, X6 Z3 D g; c0040C702 |. 84ED test ch, ch
# T8 G U8 z& M3 r0040C704 |.^ 75 90 jnz short 0040C6967 m. R0 v: {6 |8 A: e" Z/ J) B
0040C706 |> 83FD 10 cmp ebp, 10' a5 W% u7 ]3 n
0040C709 |. 7F 05 jg short 0040C710 A" v' Q6 J& j9 T& d5 b
0040C70B |. BD 20000000 mov ebp, 20! a, D* l, d2 W4 }; g$ r: J
0040C710 |> 8B9424 040100>mov edx, dword ptr [esp+104]' M' [2 Y3 Y$ _! H1 W u; l
0040C717 |. 2B9424 080100>sub edx, dword ptr [esp+108]' U, P+ C5 i! Q
0040C71E |. 85D2 test edx, edx
0 _, v) Y+ r8 G! |0040C720 |. 7C 23 jl short 0040C745" j( g8 \: N) @0 o$ v5 F) o
0040C722 |. 89C6 mov esi, eax# a; l9 A. ^2 |
0040C724 |. 8B3C95 7477EF>mov edi, dword ptr [edx*4+2EF7774]( Q) p8 ]9 }. f
0040C72B |. 57 push edi8 p& m U8 u6 x* m: ^/ }" r1 R
0040C72C |> 8A06 /mov al, byte ptr [esi]5 \/ I6 q8 u- C( d, w
0040C72E |. 8807 |mov byte ptr [edi], al
, J! h. z* h' f3 |0040C730 |. 3C 00 |cmp al, 0
0 j9 \1 [! }+ k0040C732 |. 74 10 |je short 0040C744& B, Q- {8 p- o! \6 ]4 Q; K
0040C734 |. 8A46 01 |mov al, byte ptr [esi+1]
4 g% b, A! B: L6 V+ {! q0 z0040C737 |. 83C6 02 |add esi, 2
V! p- M7 p" z8 O0040C73A |. 8847 01 |mov byte ptr [edi+1], al* ^7 k% A& p9 K& T" p( m4 |% G
0040C73D |. 83C7 02 |add edi, 2
5 K. I7 r% \2 I3 u7 s1 Z" n' Y0040C740 |. 3C 00 |cmp al, 0& {+ t- q' N9 A$ ^" K
0040C742 |.^ 75 E8 \jnz short 0040C72C
( Z: L2 _' k- o0040C744 |> 5F pop edi O/ V4 m( Y: v! a2 r0 g( c& c2 K
0040C745 |> E8 E6500100 call 00421830
2 S) |( L! |$ V$ u4 q0 I0040C74A |. A3 8877EF02 mov dword ptr [2EF7788], eax* \+ g {0 j/ ]4 q, S3 T. D
0040C74F |. 8B8424 040100>mov eax, dword ptr [esp+104]8 R; C, q0 R% ] `9 C5 v8 {
0040C756 |. 40 inc eax
8 I/ x8 B% g+ ^5 n. h0 c0040C757 |. A3 8477EF02 mov dword ptr [2EF7784], eax; j6 k& J/ H+ ^; T) E
0040C75C |. C705 8C77EF02>mov dword ptr [2EF778C], 1
7 U/ `/ h6 [" h' r0040C766 |. B8 64000000 mov eax, 64) o4 k( Z% b0 g8 [+ t/ ?. C v, V) I
0040C76B |. 89C2 mov edx, eax
c+ U$ ~1 e0 i- v% s! O" G0040C76D |. 8B0D E880EF02 mov ecx, dword ptr [2EF80E8]9 p" [( q/ ~( u9 j6 z5 B0 h! r
0040C773 |. C1FA 1F sar edx, 1F' m% |. c; L$ e; R% e" k
0040C776 |. F7F9 idiv ecx
. ?2 m- c2 n; B0 L0040C778 |. 89C3 mov ebx, eax
: |/ Q/ E( K8 _( w; R0040C77A |. 89EA mov edx, ebp
& u$ O+ t l. z( M0040C77C |. 89E8 mov eax, ebp
8 b% U) q; d0 }6 I( l* F0040C77E |. C1FA 1F sar edx, 1F
: e/ O5 n" W( a5 L5 i7 h0040C781 |. C1E2 04 shl edx, 4
2 q7 B C3 z' e( L6 \9 o0 M4 M0040C784 |. 1BC2 sbb eax, edx
; R$ I' o8 v: R' s7 |% x0040C786 |. C1F8 04 sar eax, 4" a% C& x1 K2 T! R2 d% C# R
0040C789 |. 01C3 add ebx, eax
& c7 X" u7 P1 q( p; k, a1 M# u0040C78B |. 891D 9077EF02 mov dword ptr [2EF7790], ebx3 ~5 b0 E& h# S A' |& Z/ M) ]
0040C791 |. 81C4 10010000 add esp, 110* Y0 }: g3 S3 t
0040C797 |. 5D pop ebp
0 S- w% n5 t, f0 t' e# v& X/ Q0040C798 |. 5F pop edi
0 s+ T: V: W* @) C* J0040C799 |. 5E pop esi
. L4 K! \' j% I' G; I* S7 a0040C79A |. 5A pop edx
0 Q3 j( m. D* w0040C79B |. 59 pop ecx
0 d4 b$ e! f8 r+ v0040C79C |. 5B pop ebx* u" y9 k3 }. ~! z; ?1 @/ v
0040C79D |. C3 retn
8 |8 E2 K! G& I0040C79E |> 81FD 8C000000 cmp ebp, 8C
+ r+ A) G" I' e; `0040C7A4 |. 7C 28 jl short 0040C7CE) I% J/ l! n8 J; v& _" O" E
0040C7A6 |. 81FD D2000000 cmp ebp, 0D2
/ h" v+ b5 q- K4 Q* X! _0040C7AC |. 7F 20 jg short 0040C7CE
/ I' x; x7 D; f# h0 g7 j+ m0040C7AE |. B9 03000000 mov ecx, 3; G4 {# o1 j" ^% t4 t) @4 ]- p
0040C7B3 |. 89EA mov edx, ebp
$ J9 [- g1 k, |4 c0040C7B5 |. 89E8 mov eax, ebp+ A! f3 p3 N& Q
0040C7B7 |. C1FA 1F sar edx, 1F' d0 [. W7 H( A# d8 p
0040C7BA |. F7F9 idiv ecx
8 g) D9 ^7 ]4 v+ V& a/ D* I0040C7BC |. C78424 040100>mov dword ptr [esp+104], 24 {( Y4 ?% {5 x: W! l5 g
0040C7C7 |. 89C7 mov edi, eax1 l1 s' O6 ?6 B. u1 M& H3 x) H7 \
0040C7C9 |.^ E9 8BFEFFFF jmp 0040C6597 P( ~ T% v( p% m- x
0040C7CE |> 83FD 46 cmp ebp, 46
: p% ]' w0 ^1 s& ^0040C7D1 |. 7C 25 jl short 0040C7F89 v$ J, x$ {4 ?( H7 v
0040C7D3 |. 81FD 8C000000 cmp ebp, 8C
/ q" f1 G5 W' z5 G0040C7D9 |. 7F 1D jg short 0040C7F8
. ~8 b; M5 ^. R% w) }% h0040C7DB |. 89EA mov edx, ebp2 f5 K! k- ?0 t$ R: ?
0040C7DD |. 89E8 mov eax, ebp
( F/ m' H2 s0 b6 q# h( p, E0040C7DF |. C1FA 1F sar edx, 1F
" d6 |* b2 R2 ~4 }& G9 J. W0040C7E2 |. 2BC2 sub eax, edx
$ m. f+ G2 c+ w1 k9 k; T4 p0040C7E4 |. D1F8 sar eax, 1# b. x$ a% e3 q
0040C7E6 |. C78424 040100>mov dword ptr [esp+104], 1
" }! d& x- o& G' q9 y# F/ k; d' T0040C7F1 |. 89C7 mov edi, eax
: \1 E: H5 j, A- F. R# `0040C7F3 |.^ E9 61FEFFFF jmp 0040C659( o/ w5 q8 G! U
0040C7F8 |> 31D2 xor edx, edx0 {$ W' I$ k. L, d
0040C7FA |. BF 46000000 mov edi, 46
! `; U% n4 Z7 `. i3 V* L0 {0040C7FF |. 899424 040100>mov dword ptr [esp+104], edx9 S! V. n# a3 I4 f& l' d
0040C806 |.^ E9 4EFEFFFF jmp 0040C659
2 U* n5 t- a v& R5 M P7 q5 A0040C80B |> 80F9 7C cmp cl, 7C- [- z) i" j) `- q* v: c
0040C80E |.^ 0F85 E9FEFFFF jnz 0040C6FD
! l' a, M, N7 r; }7 x/ u7 {8 B2 z6 e0040C814 |. C602 20 mov byte ptr [edx], 20& E* N# ]1 \! a
0040C817 \.^ E9 E1FEFFFF jmp 0040C6FD
1 s& {/ G, _/ P
: m" F$ F# y4 |* }+ k- @在scratches.sc和scream.sc里面有lua的脚本,保存有字体文件名。
+ ]0 d9 t5 ~- x/ X" t估计要汉化就要在上面的代码段下功夫了,以后继续研究。( j* x& S* f8 f- J) W
: @; u' w r2 J0 ?8 @找到2个俄文的补丁,也许对以后研究有用。
4 s) \& O" K3 F: U* E, J7 r' Bhttp://www.megaupload.com/?d=EZH6X672
2 q. g! q y3 \5 ?8 o1 Whttp://rapidshare.com/files/94227080/ScratchesDC.7z |