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

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

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

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

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

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

本帖最后由 shane007 于 2023-8-12 13:57 编辑 ; v" h% H3 D1 o6 H

( t; p4 H, H" f这个游戏原本是没有字幕的,但是在Scummvm论坛上发现了一个帖子,
" j  `3 }+ |9 e- z) U! K  H% B* `' U; U讨论的内容是关于在原本没有字幕的游戏上加上字幕。(最初的缘由,是为了帮助一位失聪的朋友)
3 M8 @' p2 X, _' i6 F: zhttps://forums.scummvm.org/viewtopic.php?t=7168
1 u- B& J1 d" Q" L3 K[Scummvm-devel] Displaying subtitles in voice-only games (narkive.com)
3 w' M* p- N9 d: l( s) ~/ R# a4 G- D9 `$ A( b' n
前段时间第七访客出了25周年纪念版(The 7th Guest 25th Anniversary Edition。
7 [9 V, ]+ f9 E) C在这个版本中,游戏的视频是有字幕的,因此把这个视频的字幕用到Scummvm中就成为了可能。( j& X- C* Y  E$ m1 w
7 B& P& o7 N: W1 Y- K# z8 v
我查看了一下最新版本的Scummvm的代码,发现老外已经加入了一部分代码。/ t8 b9 R  c# o3 I( x! J
在此基础上,汉化是大有希望的。此种汉化方法,也是前所未有的,如果真的实现了将会有重要意义。
0 ]: @9 ~! @# H! Q. }( j, `* h& G9 u1 C5 o& y. l/ t! Y3 y+ i- b
类似游戏还有
  1. · Groovie
    : M3 L8 Z7 o& I- \% j8 a2 G
  2. - The 7th Guest4 ]# U; r# l. N- B& `: v
  3. - The 11th Hour! S; D, n& |! C) k, y

  4.   w, V/ v6 x6 ^
  5. · MADE
    2 L" h# v: H* {0 z8 B2 \
  6. - Return to Zork (descriptions are text only, while spoken dialogs lack
    - K/ w' C# Q  F
  7. any text)7 X! }( d# G5 E% Z, A8 ^

  8. 6 B  Y4 @. V2 T6 s
  9. · SCI 1# h( r% ^2 N/ x
  10. - King's Quest V (CD Version). In this case, just enabling voice and text
    , ~, T7 [9 O1 j! U4 d8 P3 y
  11. simultanously would allow a 3rd party to create a set of MSG files( N  c4 z% T1 T* s1 E. y
  12. containing the voice transcription/translation, as it happened with Gabriel! A+ W( c3 V* P& K# n& i% P3 V
  13. Knight II.
    3 G6 C% Q/ e5 U) D8 s: ]8 r
  14. " {! c4 C. [) Q% R- }
  15. 6 `0 H0 h# X: K! [- K
  16. Future engines:
    * F2 p* F# P$ |) U0 ^3 D8 f
  17. " Y! p9 h" h! F0 \5 d4 K+ c
  18. · SCI 21
    3 e1 N, [' s7 d, _: y8 I* d
  19. - Gabriel Knight II: The Beast Within (Already a fan patch available in
    3 Z; n1 d/ f, l* c% s* z
  20. order to enable the text display feature)# \; b# O0 k$ e4 ~2 W+ R4 s8 T
  21. - Phantasmagoria0 ~2 _4 R, ]) J6 X$ j  b/ X
  22. - Rama6 _/ F3 I2 \2 v1 W
  23. - Shivers
    % U$ n' G7 _( O
  24. - Phantasmagoria II: A Puzzle Of Flesh; f' h- H7 m) z3 |! O
  25. * K6 x1 F, s$ J  j
  26. · SCI 3# t; w- q" q7 ^
  27. - Lighthouse: The Dark Being" ?& c  T% z: Y( M$ K2 I8 ~
  28. 7 w' U4 r# o2 [5 I' e! p
  29. · M4/MADS# C, O% r' `! W6 d" Y/ Z& Z$ z
  30. - Orion Burger9 C9 k6 N2 F) ^

  31. 5 L$ [6 [& `# ?  U# m
  32. · Mohawk% t$ c+ G7 Y5 [- x6 g9 o4 a! @4 k
  33. - Myst
    + S5 f/ d1 m7 I. [( n8 J- \) F
  34. - Riven: The Sequel to Myst
复制代码

1 D5 D, a# K* j% r0 z" r+ m5 f( V. P3 p) T

# [. u2 n: h+ h
6 w; Q" ~% `7 X; h相关代码如下
% {  f0 ]: S  v9 f, C' Q8 `  x2 j
  1. bool VideoPlayer::playFrame() {7 l6 C( ]' X$ |7 J' \- A; e3 C
  2.         bool end = true;) @6 |% c1 Y$ T; x5 ~

  3. / N) M9 U- {1 U3 K7 e3 {9 U7 g3 x
  4.         // Process the next frame while the file is open
    * h! T8 `4 f  d( B5 b
  5.         if (_file) {: T5 T3 A0 X% U/ A6 g
  6.                 end = playFrameInternal();
    . P, w. a0 E* H; f/ s. q

  7. ' e: X, b9 J/ d0 b; B0 ]
  8.                 _subtitles.drawSubtitle(_lastFrameTime - _startTime);# n$ Z! g$ W9 P
  9.         }
复制代码
  1. bool Subtitles::drawSubtitle(uint32 timestamp, bool force) {! W0 i5 a; S* G! s
  2.         Common::String subtitle;
    1 R0 u( a  k  _6 P' ~* }
  3.         if (_loaded) {
    & C( b8 ?! g, b( p% A/ x
  4.                 subtitle = _srtParser.getSubtitle(timestamp);& z* l* j7 Q) w
  5.         } else if (_subtitleDev) {
    8 Q2 o8 F. w/ o- C
  6.                 subtitle = _fname;, |! V* E) Z& g9 a! D
  7.                 uint32 hours, mins, secs, msecs;4 v4 ~+ R7 }6 y6 {2 N* W8 T4 F
  8.                 secs = timestamp / 1000;
    : c# a! t" |& R! ?) o& N! ?2 {# C( |6 M
  9.                 hours = secs / 3600;
    & m1 I8 t4 C8 F( ?) S# {2 z
  10.                 mins = (secs / 60) % 60;
    9 t8 ?" i* `! l$ V
  11.                 secs %= 60;
    9 P+ S7 C3 \' r& v& N- v
  12.                 msecs = timestamp % 1000;
    % B# X% a( B6 Y# Z: M5 W
  13.                 subtitle += " " + Common::String::format("%02u:%02u:%02u,%03u", hours, mins, secs, msecs);  \+ q8 R) P0 _3 n
  14.         } else {
    . _8 k& e' o5 y* L& U5 B& A
  15.                 return false;
    7 b8 Q1 F! P  |9 c' r+ l: j' j
  16.         }
    - q% k" ~5 H+ |9 q
  17. 2 O2 E8 C0 I: W4 O* G
  18.         int16 width = g_system->getOverlayWidth(),
    1 n* F. Z( N# \- i
  19.                   height = g_system->getOverlayHeight();
    4 N3 C$ Y+ x9 M  ~  l  P+ c) d% b
  20. % I; u5 I* S: F3 C! z* ^' S
  21.         if (width != _lastOverlayWidth ||
    0 k3 J* n1 \2 U5 S" F
  22.                 height != _lastOverlayHeight) {1 m  f  o' m7 Q
  23.                 _lastOverlayWidth = width;1 n, Y( Q% ^7 u# |
  24.                 _lastOverlayHeight = height;
    8 Z1 U$ O2 H; R% a4 ?
  25. / T  Q# q+ B7 h" j4 [. d0 [
  26.                 // Recalculate the real bounding box to use9 e5 q& c8 j/ [2 ]1 a8 k
  27.                 _realBBox = _requestedBBox;1 ?* o+ r' r, b. v

  28. . V7 Z+ F, W2 ]" U
  29.                 if (_realBBox.bottom > height) {0 _+ X2 ?8 |. p  A( [" m0 N
  30.                         // First try to move the bounding box. H) I7 U- ]" h5 D3 R* V1 |
  31.                         _realBBox.top -= _realBBox.bottom - height;
    7 l0 L; Y& e! d( X" L  ]
  32.                         _realBBox.bottom = height;
    5 ?2 h! p, |" _* E/ x' B& v- A- w# N
  33.                 }; e9 L- @; b' v+ t0 I
  34.                 if (_realBBox.top < 0) {
    9 [  W+ k" t- C; P# f: k1 W
  35.                         // Not enough space
    3 [* M$ o$ s, p3 Z
  36.                         _realBBox.top = 0;5 c+ U9 I3 |0 D) E$ K. ]) `
  37.                 }
    8 T5 e4 W' J* Z2 T* T5 D
  38. 7 ]* `& \9 L. @8 ^, N4 b; B
  39.                 if (_realBBox.right > width) {
    " V& ?. R0 m/ y
  40.                         // First try to move the bounding box3 Q$ G3 c! K, G  m) d
  41.                         _realBBox.left -= _realBBox.right - width;
    + a/ l/ B. N8 X: t3 u( b9 E1 }
  42.                         _realBBox.right = width;
    ) \9 t. M$ x! _& [2 k* \9 r
  43.                 }
    2 G+ N7 g; K6 F" N, r
  44.                 if (_realBBox.left < 0) {2 I. v, K- `2 [, o
  45.                         // Not enough space3 M1 L& b" F+ R* e
  46.                         _realBBox.left = 0;# n4 Z7 S1 _! J4 D4 k# k* Y1 A9 W
  47.                 }7 |& V& u9 O: h) ^, F
  48. / T! g4 i0 f, x& ?% o9 ?" v
  49.                 force = true;
    4 e8 ~6 o& C, _% {
  50.         }* L" c% N4 L( C+ S* J7 i
  51. ; }: F+ N1 S7 _+ n
  52.         if (!force && _overlayHasAlpha && subtitle == _subtitle)
    $ G0 U3 g; Y* K9 U7 {2 Y' g
  53.                 return false;& t" a5 h: F6 y" V: e

  54. 1 W6 g% C* h- d' {$ C6 l
  55.         if (force || subtitle != _subtitle) {
    , l" z& a) x( P! e, i6 j5 A
  56.                 debug(1, "%d: %s", timestamp, subtitle.c_str());
    7 a5 e  Y, [3 Q4 W7 F# E

  57. 1 c0 s! v* {& L+ o9 n
  58.                 _subtitle = subtitle;
    6 S; F( i1 R& ]6 ^
  59.                 renderSubtitle();
    & N4 L$ X. p  G- ^# b  i
  60.         }
    . s2 Z  }8 [. ~: v2 q
  61. ' M; d0 N; Q, @9 r0 V+ H- Q6 m
  62.         if (_overlayHasAlpha) {0 n  c- s( j! k1 o0 u1 u* s2 |) j
  63.                 // When we have alpha, draw the whole surface without thinking it more3 M3 g# i  L+ O2 s& s$ {- G4 T  u% l
  64.                 g_system->copyRectToOverlay(_surface->getPixels(), _surface->pitch, _realBBox.left, _realBBox.top, _realBBox.width(), _realBBox.height());6 R0 Z; C2 L2 z. L% E$ a% B+ Y7 Y
  65.         } else {: D1 [7 M6 a' ?
  66.                 // When overlay doesn't have alpha, showing it hides the underlying game screen
    6 ?. q6 k& P$ j# [0 ?
  67.                 // We force a copy of the game screen to the overlay by clearing it& ^4 S5 |4 Q* L- ?8 h! s
  68.                 // We then draw the smallest possible surface to minimize black rectangle behind text# w; H: t8 e8 z2 G* l, S
  69.                 g_system->clearOverlay();; w3 L% B$ Q5 E/ I
  70.                 g_system->copyRectToOverlay((byte *)_surface->getPixels() + _drawRect.top * _surface->pitch + _drawRect.left * _surface->format.bytesPerPixel, _surface->pitch,
    3 o; l( a0 q7 U2 E1 G
  71.                                 _realBBox.left + _drawRect.left, _realBBox.top + _drawRect.top, _drawRect.width(), _drawRect.height());
    : d1 {9 l* C0 m* Q
  72.         }
    * z+ g. a" v" h- {) `% G
  73.   h8 s  z1 t4 x
  74.         return true;
    ( f+ k/ v( U5 _9 K, X
  75. }! v) ~4 q4 C' \6 a! ^2 `6 v# [
复制代码
! @1 c) M* G/ A! I

6 B1 B! M' Y1 s6 {$ a: n  D' J0 m. ]5 {. \- w
# ^9 X2 X6 W2 N
; P7 o4 i# O6 V" y

1 V: Z5 ]+ b! o
3 ?0 @0 \4 f1 z+ O) F( k
分享到:  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日,是全球华人共同的冒险解谜类游戏家园。我们致力于提供各类冒险游戏资讯供大家学习交流。本站所有资源均不用于商业用途。

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