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

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

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

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

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

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

本帖最后由 shane007 于 2023-8-12 13:57 编辑 * m. R& O* i- ~% T* Q" b

' N6 h7 ~3 P# l) N% _这个游戏原本是没有字幕的,但是在Scummvm论坛上发现了一个帖子,* |9 `6 z& g# R' J: n
讨论的内容是关于在原本没有字幕的游戏上加上字幕。(最初的缘由,是为了帮助一位失聪的朋友)
$ q3 Q; n) E4 l9 W8 w; K& thttps://forums.scummvm.org/viewtopic.php?t=7168
1 B7 ]- _& X! y( ]) _, a[Scummvm-devel] Displaying subtitles in voice-only games (narkive.com)
% a: f. ^6 P1 T- X0 c! v0 j  H0 q7 U; D' d( q; x5 I) Q
前段时间第七访客出了25周年纪念版(The 7th Guest 25th Anniversary Edition。- G; d, W5 x2 ~! M/ p
在这个版本中,游戏的视频是有字幕的,因此把这个视频的字幕用到Scummvm中就成为了可能。- T$ D+ a( K. Z1 w: h$ p

3 G. y- l; v, c1 r( B我查看了一下最新版本的Scummvm的代码,发现老外已经加入了一部分代码。
* f& K, D/ V3 |0 i在此基础上,汉化是大有希望的。此种汉化方法,也是前所未有的,如果真的实现了将会有重要意义。/ D- X) }, o7 g( S7 Z" x8 d

4 {) @) q& ^/ F1 y类似游戏还有
  1. · Groovie
    : k; V! [! U' q4 T5 a# N
  2. - The 7th Guest+ z4 U; v/ h% @
  3. - The 11th Hour. z  f& j! |& Z) e" _3 V- n8 {

  4. ' [& i3 S* A! W6 j
  5. · MADE1 R2 ^( a! p! w3 q: k  n
  6. - Return to Zork (descriptions are text only, while spoken dialogs lack
    , Q9 t# W' v7 W1 d" _7 N! l9 W: Y
  7. any text)! A# s; R- A* V# Y
  8. 2 \, d( w. c7 ]& O: q
  9. · SCI 1
    % Y9 ^3 g0 y2 n# B
  10. - King's Quest V (CD Version). In this case, just enabling voice and text
      w, K1 H0 o' A
  11. simultanously would allow a 3rd party to create a set of MSG files
    4 u' Y! e* v( w0 b5 @
  12. containing the voice transcription/translation, as it happened with Gabriel
    ) a% }7 f7 b0 Q6 B6 a1 H( \
  13. Knight II.; o' J5 F2 [2 i* [) c6 w
  14. % \" `  A, R7 [3 s1 ~9 H9 K
  15. % t$ s1 ?5 S/ }" T
  16. Future engines:# ^, G3 r1 F( d
  17. 5 R! |) n) L5 Y0 t  l+ U0 Q/ X
  18. · SCI 21$ E3 a/ L1 u5 }7 \
  19. - Gabriel Knight II: The Beast Within (Already a fan patch available in' n  W- O2 ^0 i. `, O% m
  20. order to enable the text display feature)
    9 M8 _+ ?! ~- l
  21. - Phantasmagoria
    8 S) t: M) v0 k9 F5 ?  b
  22. - Rama) O, X& P7 M  M% v! q% d0 M
  23. - Shivers7 f$ @6 @9 Z; |/ ]7 W
  24. - Phantasmagoria II: A Puzzle Of Flesh
    & P/ W: y8 c# Y3 u' J7 t+ v  w
  25. : r; T- u! J7 R# J2 y$ O: n) P
  26. · SCI 3/ l$ P6 k6 v9 e: D6 e
  27. - Lighthouse: The Dark Being
    2 |- v2 b- Z9 s6 Y: c1 {/ F6 u
  28. " A7 W2 B7 O% O8 `/ a! y
  29. · M4/MADS
    # h9 U& O  l8 x. A) I- j
  30. - Orion Burger7 I6 L6 A3 u  W' O
  31. " r3 b" b# V% \4 V. A+ P6 W6 ~
  32. · Mohawk& c2 w* |& J  ]' M, b
  33. - Myst0 Y5 M& P7 W4 _$ ^5 q# B% _. E
  34. - Riven: The Sequel to Myst
复制代码
) K5 u0 M# y: {$ w
: F& p) }% Z% o' `  c
; Z  A- ]; {8 H) L2 e$ Q8 D
* }8 y5 }+ j! v0 `5 c3 y4 D
相关代码如下# H# `- e" T! c4 f
  1. bool VideoPlayer::playFrame() {
    " P  M3 ^  S2 h, ?+ D. D
  2.         bool end = true;
    ' D' g4 R) v8 \( I
  3. 4 M9 Y1 D) U" P
  4.         // Process the next frame while the file is open
    $ L% h1 A" h$ r5 |6 k% Z* ?; o) P# i
  5.         if (_file) {
    2 [: M2 i! [* t, I# E5 N3 F
  6.                 end = playFrameInternal();4 x. O+ {& M# b  T+ u" U0 _

  7. 2 g" Y; v# j( k2 i% G) B, Z' t, L
  8.                 _subtitles.drawSubtitle(_lastFrameTime - _startTime);
    # U' q( l1 A8 H- r, b6 u
  9.         }
复制代码
  1. bool Subtitles::drawSubtitle(uint32 timestamp, bool force) {0 q! B$ v, \8 z/ I
  2.         Common::String subtitle;- d) C- n- u+ |7 ^8 G
  3.         if (_loaded) {
    4 T" B1 j5 H5 S  L( D" Z9 P
  4.                 subtitle = _srtParser.getSubtitle(timestamp);# @% Y/ ^6 @7 w8 p
  5.         } else if (_subtitleDev) {
    ; l6 @" p  r; J7 O( [5 Y9 c
  6.                 subtitle = _fname;
    . p4 n: [2 ?7 d4 f  Z/ u% L
  7.                 uint32 hours, mins, secs, msecs;6 E# H6 f0 M6 \& v* d9 x# s
  8.                 secs = timestamp / 1000;
    4 l+ B! [9 c3 H2 |2 t) s
  9.                 hours = secs / 3600;2 M4 N) c6 a, r0 Z: W; H7 V5 [
  10.                 mins = (secs / 60) % 60;
    7 w/ B$ A8 z8 e4 s
  11.                 secs %= 60;
    , N3 v% Z1 _0 a' R" K) L& l) N
  12.                 msecs = timestamp % 1000;
    # {& d, p) w9 w8 x8 E
  13.                 subtitle += " " + Common::String::format("%02u:%02u:%02u,%03u", hours, mins, secs, msecs);
    + K9 T, p( W) n5 C  n8 v2 V
  14.         } else {
    " H" Q; W- |2 F4 E7 w* a/ i
  15.                 return false;' L" W& C; T  f/ j
  16.         }0 {1 V, y: O: a/ W% k1 B# S

  17. ( q$ G( E  O( V* t$ i! L, N! n
  18.         int16 width = g_system->getOverlayWidth(),
    ' B) B" ~. z( s" m
  19.                   height = g_system->getOverlayHeight();( @+ z; e0 a7 \% T

  20. ) X$ u$ P9 [3 k: t. H# A
  21.         if (width != _lastOverlayWidth ||
    # y" t$ C0 H4 g  o5 W
  22.                 height != _lastOverlayHeight) {
    / o2 ]) A9 O3 u! o2 T
  23.                 _lastOverlayWidth = width;. F- \9 Z' t% ~5 m1 |
  24.                 _lastOverlayHeight = height;
    2 s8 O# h' B5 v

  25.   N, a3 n( O; a" [2 N
  26.                 // Recalculate the real bounding box to use# z$ I% [. y4 j" V; `
  27.                 _realBBox = _requestedBBox;- t2 @. |! z' D! m3 `

  28. # ]8 F2 Q* M. v4 {' @# `# {2 r- }
  29.                 if (_realBBox.bottom > height) {0 p: |+ v8 h4 u0 H& L. k. I. H" H6 ~
  30.                         // First try to move the bounding box( W5 H9 z. M' C
  31.                         _realBBox.top -= _realBBox.bottom - height;
    9 g7 L* U: o0 ]  [* P
  32.                         _realBBox.bottom = height;, V. u* E- ~, w. l& d) J
  33.                 }8 F& @3 C0 q. t: {2 p
  34.                 if (_realBBox.top < 0) {
    ( P* g( p5 ?8 ^, I8 j6 D
  35.                         // Not enough space& w4 M1 w6 }* A, n$ {$ |2 Y
  36.                         _realBBox.top = 0;. e' Y$ y4 U6 X, y! x3 a
  37.                 }
    5 l2 z: I. K/ J0 ], ^8 v5 U

  38. & e! Q5 N% Z: S8 w9 C& l
  39.                 if (_realBBox.right > width) {
    3 V! N1 }8 ^" [& I
  40.                         // First try to move the bounding box
    $ D/ c8 e1 w+ e7 F% K, r
  41.                         _realBBox.left -= _realBBox.right - width;
    % \4 R% Z6 J4 u! d
  42.                         _realBBox.right = width;7 `4 H& l2 A7 y
  43.                 }
    # a3 M& k' n0 R6 l8 g
  44.                 if (_realBBox.left < 0) {5 f2 q3 Y1 b# k1 O$ l
  45.                         // Not enough space; Q$ l( [3 s' B  J
  46.                         _realBBox.left = 0;
    ( C$ z5 W7 n) _8 n
  47.                 }
    7 y4 |( z+ ~$ \: O# P7 x9 P2 i

  48. ( e- g2 ]" [& B2 `/ |
  49.                 force = true;5 l8 o4 z3 \0 A/ O; y/ N2 {
  50.         }0 R& A# b, v6 N7 s

  51. 1 G" ?7 R0 j3 k. x3 Q2 B1 {: X
  52.         if (!force && _overlayHasAlpha && subtitle == _subtitle)# ]7 B* e% O1 g; y, C
  53.                 return false;
    - A3 y8 W+ _+ s8 z& V

  54. 4 M' a- n# Z' W9 B/ j8 e! f+ J
  55.         if (force || subtitle != _subtitle) {2 M- {9 a" Q" M$ P1 ^
  56.                 debug(1, "%d: %s", timestamp, subtitle.c_str());% {0 Y% s! g8 x) b. _. S4 o

  57. # F1 x  C8 P" n" F
  58.                 _subtitle = subtitle;7 j+ a( v9 }; e$ `: s. C6 C
  59.                 renderSubtitle();
    ) K9 {6 k- n$ ^( d
  60.         }# Z1 p$ m+ D7 r; A" K; q0 U8 Z' N0 X
  61. ) [7 w0 Y) \) Z& r! h
  62.         if (_overlayHasAlpha) {
    5 z, Z! S) |; F- J5 p* W) y# y
  63.                 // When we have alpha, draw the whole surface without thinking it more4 {, b3 X/ x6 ]0 J5 R! D! v- p3 _* h
  64.                 g_system->copyRectToOverlay(_surface->getPixels(), _surface->pitch, _realBBox.left, _realBBox.top, _realBBox.width(), _realBBox.height());
    . ?. o5 F/ `+ S
  65.         } else {* p! s% J" ~7 @$ K) ~) A: r! V
  66.                 // When overlay doesn't have alpha, showing it hides the underlying game screen
    1 X: B  Z* K7 X4 h% N6 B
  67.                 // We force a copy of the game screen to the overlay by clearing it9 i# w+ W# V0 Q7 [0 _" v
  68.                 // We then draw the smallest possible surface to minimize black rectangle behind text
    . E* [0 A) a/ X; }9 J( p
  69.                 g_system->clearOverlay();
    , G4 O7 {6 m$ ~
  70.                 g_system->copyRectToOverlay((byte *)_surface->getPixels() + _drawRect.top * _surface->pitch + _drawRect.left * _surface->format.bytesPerPixel, _surface->pitch,$ |7 }( W, e) k, z
  71.                                 _realBBox.left + _drawRect.left, _realBBox.top + _drawRect.top, _drawRect.width(), _drawRect.height());% ?& |0 ^2 V" O  W- l7 W" ~! H  k
  72.         }' f7 g3 y/ P+ C( O

  73. * D; S0 j  ~+ h% Y$ u7 C$ w7 b
  74.         return true;" r/ B- z5 Z: J
  75. }8 Y, F* V# \2 {, N
复制代码

6 S- k9 S4 L/ g5 N8 [% H8 `/ S2 N2 E6 `; Z4 w2 Y7 c

5 X" a, f5 v! c: S& }
. `: F% J, V8 k  v5 i, I" `% Z8 _  F( r$ E
& E2 H2 X! |% {' w/ [: \' a
6 e5 q' Y& Y/ V+ S3 h! W2 E
分享到:  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日,是全球华人共同的冒险解谜类游戏家园。我们致力于提供各类冒险游戏资讯供大家学习交流。本站所有资源均不用于商业用途。

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