设为首页收藏本站官方微博

其他 【Scummvm汉化 #3】The 7th Guest 第七访客 #1 字幕篇

[复制链接]
查看: 258|回复: 0
打印 上一主题 下一主题

[其他] 【Scummvm汉化 #3】The 7th Guest 第七访客 #1 字幕篇

跳转到指定楼层
楼主
发表于 2023-8-12 13:38 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

【Scummvm汉化 #3】The 7th Guest 第七访客 #1 字幕篇

本帖最后由 shane007 于 2023-8-12 13:57 编辑
' X- s' P( J1 \' P0 z1 _( t4 }" s& c; p6 A0 f
这个游戏原本是没有字幕的,但是在Scummvm论坛上发现了一个帖子,8 U+ J0 y, Q  O7 p* H
讨论的内容是关于在原本没有字幕的游戏上加上字幕。(最初的缘由,是为了帮助一位失聪的朋友)
0 `! Q! ?5 ?: c* Ahttps://forums.scummvm.org/viewtopic.php?t=7168/ _( t* w- U0 n
[Scummvm-devel] Displaying subtitles in voice-only games (narkive.com)8 I% n8 u! Q: J
- h# ~7 Y1 |1 t& r8 [
前段时间第七访客出了25周年纪念版(The 7th Guest 25th Anniversary Edition。
/ I! Z6 H0 t& A2 C' Q' `' h9 T9 f* k% @在这个版本中,游戏的视频是有字幕的,因此把这个视频的字幕用到Scummvm中就成为了可能。
/ H1 p1 I" a" W$ e3 b9 m: _6 e% x# H5 r
我查看了一下最新版本的Scummvm的代码,发现老外已经加入了一部分代码。
9 o% \; V" j0 a在此基础上,汉化是大有希望的。此种汉化方法,也是前所未有的,如果真的实现了将会有重要意义。2 q& e4 p; l) E8 M2 E$ R2 `
- c" j2 g8 L+ H# O/ \0 [
类似游戏还有
  1. · Groovie1 f( g6 A7 D% T0 K) @/ H
  2. - The 7th Guest
    ( P5 z& `8 a* C: A
  3. - The 11th Hour# A/ g9 B' q) W) Z! T

  4. % `+ z( b4 Z: E! F6 Y% R+ f9 s
  5. · MADE
    ) E) q. j# [" T, b
  6. - Return to Zork (descriptions are text only, while spoken dialogs lack. u1 N+ v* u% S: r
  7. any text)! I# I( h- k; s5 ^* `3 O3 q$ ~

  8. - b% y$ l7 \" Q) y0 P
  9. · SCI 1
    % |. q/ c2 l3 k& N0 P
  10. - King's Quest V (CD Version). In this case, just enabling voice and text4 W% T! [/ d6 n+ L+ p
  11. simultanously would allow a 3rd party to create a set of MSG files
    ( t! c5 k/ X; g* x8 _  q
  12. containing the voice transcription/translation, as it happened with Gabriel
    ; ~( {+ Y; Q: z6 M* T5 e- L7 _4 P! {, X# @
  13. Knight II.
    0 T) X, p* E. S' @5 ?, ?& H9 m
  14. ' R& x4 Y  U6 Z! W+ Y9 n  k
  15. 8 b* ?- `+ B! ~
  16. Future engines:1 M) S8 w) v& t# d6 K2 e
  17. ' J$ }- i+ F; L8 q# w" R
  18. · SCI 21
    2 q  q9 k! T* g6 {
  19. - Gabriel Knight II: The Beast Within (Already a fan patch available in
    + ~8 {' B7 s& ~- _
  20. order to enable the text display feature)
    8 D6 N! {  l' C' t4 @
  21. - Phantasmagoria
    2 L$ i7 d! q( j% C; ~
  22. - Rama$ p7 }! M1 p0 p/ z3 G
  23. - Shivers, ^9 e% n* l: O) }6 M, V* V8 }
  24. - Phantasmagoria II: A Puzzle Of Flesh
    5 f2 s9 v! |) Q+ J9 g

  25. ( R$ Y: S' p* g$ |3 {
  26. · SCI 3/ n* i2 Y! r5 }5 P8 E3 c
  27. - Lighthouse: The Dark Being7 @! G8 o1 t3 J) T6 M- O
  28. $ P6 @' {, v/ \7 {/ h8 n# i# ]
  29. · M4/MADS
    8 u) k+ C5 C9 F$ X1 s' g
  30. - Orion Burger
    / Z( f5 C9 `+ A2 n
  31. / X( }& j' d$ f: ^+ B
  32. · Mohawk* f2 a& x+ y# c' o% u0 }  v
  33. - Myst
    6 i5 X' V3 ], e  M
  34. - Riven: The Sequel to Myst
复制代码

- Y0 T/ R5 U+ Y2 [  M5 A6 w- d. p* S7 S9 K( d: B6 ?. l, p

. g, O1 ?3 f4 D) B$ \
# }* G  G7 ]9 e  k( s+ _, @4 c相关代码如下
* `& Z5 Q, c2 b  [2 T% y8 g
  1. bool VideoPlayer::playFrame() {
    ' w1 S8 Q5 T$ y' S1 l# C
  2.         bool end = true;
    4 ]* @* |8 n2 `' E3 }3 L) K
  3. 6 Z4 c3 ~4 O& E  A! d
  4.         // Process the next frame while the file is open0 n  e  I8 ?- L
  5.         if (_file) {6 y. v9 D+ l0 d5 j- M/ z
  6.                 end = playFrameInternal();1 N  Z- I& S' }! M2 Q/ g
  7. 3 ~9 S; b& s2 Q
  8.                 _subtitles.drawSubtitle(_lastFrameTime - _startTime);
    ( p' ]8 Z9 x/ H) X, `
  9.         }
复制代码
  1. bool Subtitles::drawSubtitle(uint32 timestamp, bool force) {
    , W* M9 u* z& Q: }" r
  2.         Common::String subtitle;4 {, d/ f: N/ D, I/ C
  3.         if (_loaded) {
    & s* S9 Y& Y+ n( }, I+ o
  4.                 subtitle = _srtParser.getSubtitle(timestamp);0 S& j0 m4 ~) a: [- _6 Z
  5.         } else if (_subtitleDev) {, C% B0 o  w7 W; a0 L9 P$ n
  6.                 subtitle = _fname;
    : s7 v( F/ S. x; R
  7.                 uint32 hours, mins, secs, msecs;
    7 B: U8 ?$ L# B" p$ o3 R
  8.                 secs = timestamp / 1000;
    & `/ g. @8 n! K7 |, K
  9.                 hours = secs / 3600;
    6 }0 `! |6 a9 j8 X
  10.                 mins = (secs / 60) % 60;
    $ g* Z* u! [1 e  x
  11.                 secs %= 60;
    7 k( g. Q$ V! z
  12.                 msecs = timestamp % 1000;
    5 ]- x( k; K( l! [1 v$ p
  13.                 subtitle += " " + Common::String::format("%02u:%02u:%02u,%03u", hours, mins, secs, msecs);
    , u4 [5 [6 M. ^$ q, W
  14.         } else {' u# L9 H4 I: X. `1 d% w# B
  15.                 return false;/ j' s0 B: l; R
  16.         }
    * y2 P, z2 C- S, U
  17. * Y' c: _; Q) R
  18.         int16 width = g_system->getOverlayWidth(),3 b  P* t: X. \; s
  19.                   height = g_system->getOverlayHeight();. O6 ]+ Q& Q7 `0 }0 B2 J

  20. , o" |% X! R, |
  21.         if (width != _lastOverlayWidth ||) K' n: |$ h0 @$ Q# C- q
  22.                 height != _lastOverlayHeight) {3 U; j: G: \/ m2 `& Y
  23.                 _lastOverlayWidth = width;
    6 ^/ z; D& N6 @" k) }7 a
  24.                 _lastOverlayHeight = height;1 d$ _4 @9 Y/ K( ]
  25.   l4 `5 {; G6 c- g+ n5 c: j' S9 y: k
  26.                 // Recalculate the real bounding box to use
    ' X5 c; G9 P# f& ~
  27.                 _realBBox = _requestedBBox;0 ~1 x; G" ^& z

  28. 6 A( i' k/ c: t# Y
  29.                 if (_realBBox.bottom > height) {% Y2 l* l. {4 j+ R% N
  30.                         // First try to move the bounding box
    5 O1 \1 n6 K/ k/ o! |9 a
  31.                         _realBBox.top -= _realBBox.bottom - height;+ T/ \$ x0 B  G
  32.                         _realBBox.bottom = height;
    8 }# M# V9 {7 C) t! C0 i5 b
  33.                 }# [* ], [* W4 z& W, e. z
  34.                 if (_realBBox.top < 0) {
    , [6 ?( a* l& f* P7 P3 M1 X
  35.                         // Not enough space
    8 g0 s" O2 D1 o  K* p, M5 L
  36.                         _realBBox.top = 0;
    ) B2 T" b+ P) n# u: v
  37.                 }
    ; i& J! X- H4 ~) T
  38. 0 m: c# U, X; b- |
  39.                 if (_realBBox.right > width) {, n/ h: _" M7 G, S' _
  40.                         // First try to move the bounding box
    3 {- e; F0 K! ?; B! `/ a! ?
  41.                         _realBBox.left -= _realBBox.right - width;
    $ s( Q# m  _1 _9 p
  42.                         _realBBox.right = width;# \/ G7 Y$ x& D5 L, G
  43.                 }
    7 d& D9 z% `. I2 @! I
  44.                 if (_realBBox.left < 0) {6 Q) G. a6 A3 `3 H% J' d8 U
  45.                         // Not enough space' a+ v9 W/ h% K
  46.                         _realBBox.left = 0;2 n# X! m: U4 J% l1 d0 M2 `/ j% ?' g
  47.                 }
    + n4 Y8 f" E' b7 V" |- `
  48. 0 o1 y/ k9 m$ X
  49.                 force = true;
    & H: m6 }( I  L6 h  v
  50.         }
    3 Z0 K2 D, a" ?; U1 q9 d) J

  51.   r- J. A9 A1 c9 A
  52.         if (!force && _overlayHasAlpha && subtitle == _subtitle)1 F8 p8 [/ ?5 }
  53.                 return false;: U1 m* d' ]! J5 ?
  54. 6 N0 E6 b) m0 ~! P( W% v1 i" F+ o
  55.         if (force || subtitle != _subtitle) {
    ) W. |+ s. t9 G" I' @5 ^  m
  56.                 debug(1, "%d: %s", timestamp, subtitle.c_str());
    * L+ @, B' t4 \( A' {
  57.   h$ S, ^3 u, r  B" e
  58.                 _subtitle = subtitle;
    4 x- u6 }- J/ b% g2 e, F. ]" [) r( G
  59.                 renderSubtitle();1 j, a3 c! ~  T% j
  60.         }0 s# V" s" x+ E! a" r! X) j9 r  V
  61. ( Y( _# S9 c3 B. x/ O$ Z
  62.         if (_overlayHasAlpha) {* y' E# G% B* J5 z
  63.                 // When we have alpha, draw the whole surface without thinking it more
    - U( c. O- x. k8 D: R4 {
  64.                 g_system->copyRectToOverlay(_surface->getPixels(), _surface->pitch, _realBBox.left, _realBBox.top, _realBBox.width(), _realBBox.height());
    7 N7 F& O" f+ j- ^! E2 {) E' n
  65.         } else {1 H4 u# P  F3 |
  66.                 // When overlay doesn't have alpha, showing it hides the underlying game screen
    8 _5 y4 ^& _" M1 f5 @4 d
  67.                 // We force a copy of the game screen to the overlay by clearing it
    + H# G( q- g- f4 g' O( e
  68.                 // We then draw the smallest possible surface to minimize black rectangle behind text1 d6 s  [; Q. n* h. P( x
  69.                 g_system->clearOverlay();
    ' Y- y$ e5 X6 ], K* p
  70.                 g_system->copyRectToOverlay((byte *)_surface->getPixels() + _drawRect.top * _surface->pitch + _drawRect.left * _surface->format.bytesPerPixel, _surface->pitch,0 N' H# r) A4 \5 l
  71.                                 _realBBox.left + _drawRect.left, _realBBox.top + _drawRect.top, _drawRect.width(), _drawRect.height());+ R. e# `4 ?9 @& g& x
  72.         }
    8 ?9 C9 k. M/ X' r
  73. ) }5 r4 B$ p- @. |+ V
  74.         return true;9 o& K, J. ~& `- ^! B
  75. }9 f6 }5 ]9 @; T2 S3 A* L
复制代码
* L- u+ A: g  W* x6 h

1 p: p; v8 R  T# k  A4 ]& j7 i$ w: H* o8 f# O. T! f

% W$ P! s7 E( U5 W* h0 L2 c5 v
1 B" f1 n! I$ b/ N; L1 r
. Z7 M- u* ^8 o1 z/ J; G! k% Y% \6 C% d
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享分享 很美好很美好 很差劲很差劲
回复

使用道具 举报

高级模式
B Color Image Link Quote Code Smilies

本版积分规则

冒险解谜游戏中文网 ChinaAVG

官方微博官方微信号小黑屋 微信玩家群  

(C) ChinaAVG 2004 - 2019 All Right Reserved. Powered by Discuz! X3.2
辽ICP备11008827号 | 桂公网安备 45010702000051号

冒险,与你同在。 冒险解谜游戏中文网ChinaAVG诞生于2004年9月9日,是全球华人共同的冒险解谜类游戏家园。我们致力于提供各类冒险游戏资讯供大家学习交流。本站所有资源均不用于商业用途。

快速回复 返回顶部 返回列表