冒险解谜游戏中文网 ChinaAVG

标题: 【汉化资料】为无字幕游戏添加中文字幕的新思路 [打印本页]

作者: shane007    时间: 2009-3-21 06:56
标题: 【汉化资料】为无字幕游戏添加中文字幕的新思路
有一些AVG没有字幕,比如天生罪犯,旧版的东方快车谋杀案。
" k$ S# K; ~$ a8 E& S最近想出来一个为这些文件添加中文字幕的思路。! S$ n/ V" p/ }! n+ S7 V

, E$ j, k9 b( F+ T+ d7 E* O这些AVG虽然不显示字幕,但是会播放语音文件。8 x% E/ R) P, v$ c  u
我的思路是用OD在内存里寻找语音文件名,然后下内存断点,游戏在读取语音文件的时候会被断下来,往下走的话肯定会调用播放语音文件的函数,可以用NOP大法来确认。, x! V$ f! B) [, G/ c% @/ J

0 H* m  n0 u7 e4 h5 G所谓NOP大法,就是把某个CALL改为NOP语句,如果语音文件不被播放了,那么这个CALL肯定和语音文件播放有关,再按F7追进去用NOP大法找就行。直到找到最关键的那个播放语音文件的函数。3 F7 H/ I; D5 {1 Z1 N

# g9 \  L! T; |* s2 J  Y! Z" x找到以后,在某个寄存器里应该有一个语音文件名,我们可以把它看作一个字幕ID,在调用播放语音文件的函数前用JMP方法插入一段我们自己的代码。调用exttextouw等函数就可以输出字幕ID。% ^8 `) I& J# ^8 V
* Y: h! Q  s; D8 a) g9 h7 Z7 {5 r
最后在外部用HOOK方法,在exttextouw函数内把字幕ID替换为中文字幕即可。7 y3 m: w; o% v9 S) f
" e' }" S: E0 ?2 x9 h% N5 c
局限性
) p0 B8 ?: m0 E1 e( L' _0 _4 v只能适用于对话字模,不播放语音文件的字幕,如物品名就无法用此法。
作者: 慕容枫叶    时间: 2009-3-21 07:49
还有一些问题。8 @/ Z; g, Z5 M9 B! ]
添加中文字幕的话(当然对一些喜欢看字幕游戏来说是好消息)3 b5 j. P9 k# ^2 o# ]9 D4 l
大小会不会影响呢?* w% R. O6 n2 ?  K+ n
还有。
# x* u: l. g4 O' @+ i" P5 f9 R9 Z目前HOOK有没有突破呢?毕竟一些人都在用别的系统平台。比如LINUX  WIN7 VISTA之类的。
作者: firendless    时间: 2009-3-21 07:59
Introduction# @; Z0 i( {* C: h$ o, @
In the Microsoft® Windows™ operating system, a hook is a mechanism by which a function can intercept events (messages, mouse actions, keystrokes) before they reach an application. The function can act on events and, in some cases, modify or discard them. Functions that receive events are called filter functions and are classified according to the type of event they intercept. For example, a filter function might want to receive all keyboard or mouse events. For Windows to call a filter function, the filter function must be installed—that is, attached—to a Windows hook (for example, to a keyboard hook). Attaching one or more filter functions to a hook is known as setting a hook. If a hook has more than one filter function attached, Windows maintains a chain of filter functions. The most recently installed function is at the beginning of the chain, and the least recently installed function is at the end.
- c6 y  e  [3 h9 L2 H% m  B3 ]8 c) K0 i
  |9 b; Y9 q" _! o+ kWhen a hook has one or more filter functions attached and an event occurs that triggers the hook, Windows calls the first filter function in the filter function chain. This action is known as calling the hook. For example, if a filter function is attached to the CBT hook and an event that triggers the hook occurs (for example, a window is about to be created), Windows calls the CBT hook by calling the first function in the filter function chain.
) l4 A7 s% p" t0 _) ]
  y- c, V8 z% C8 y0 U( g8 E其他平台的用不了,如果用WIN模拟器还是Win平台就没问题。




欢迎光临 冒险解谜游戏中文网 ChinaAVG (https://chinaavg.com/) Powered by Discuz! X3.2