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

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

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

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

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

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

本帖最后由 shane007 于 2023-8-12 13:57 编辑
' {9 N/ [% m9 G, i, i$ _
4 a5 \2 q5 C' x8 \. T这个游戏原本是没有字幕的,但是在Scummvm论坛上发现了一个帖子,
5 X$ ]  s( l0 P+ n; S. `! ?讨论的内容是关于在原本没有字幕的游戏上加上字幕。(最初的缘由,是为了帮助一位失聪的朋友)9 ]  e: H+ V) n& m
https://forums.scummvm.org/viewtopic.php?t=71689 x( n0 _9 _/ D& ^& B! _5 C8 u* ?
[Scummvm-devel] Displaying subtitles in voice-only games (narkive.com)- e, W! n2 Z0 [/ z
  b' ?8 a- q4 K  G
前段时间第七访客出了25周年纪念版(The 7th Guest 25th Anniversary Edition。
. z1 r& r% @, j  i' _在这个版本中,游戏的视频是有字幕的,因此把这个视频的字幕用到Scummvm中就成为了可能。2 q! _3 D+ [$ b+ K4 ]$ v# ]
/ o9 r' P* [  w7 K) X2 F0 u
我查看了一下最新版本的Scummvm的代码,发现老外已经加入了一部分代码。
0 m% `$ k# Y: t; V3 B7 |在此基础上,汉化是大有希望的。此种汉化方法,也是前所未有的,如果真的实现了将会有重要意义。( Q! N3 s" Y# O! A! c

) @% K' h& v" b% F8 D9 Y! h+ ?类似游戏还有
  1. · Groovie4 o3 {& E+ }2 _+ l5 R
  2. - The 7th Guest0 ?9 a, P3 A, D" [
  3. - The 11th Hour
    4 x' M7 l+ U; H9 I% P1 ^* v: R% b
  4. 6 M! o. ~: T" f. I) O/ P5 C8 g0 J( c
  5. · MADE
    2 J; g( ~' d7 ^$ |0 Z
  6. - Return to Zork (descriptions are text only, while spoken dialogs lack4 {4 U" v: n2 j" I2 u7 E7 B
  7. any text)
    . O. G! `! Y6 K- I
  8. / j- o! w2 d  U8 o  E3 ]  G3 g
  9. · SCI 1
    2 \' v/ S7 G  x$ i
  10. - King's Quest V (CD Version). In this case, just enabling voice and text" p; f: L. h; T8 ]8 u$ A) ]: \
  11. simultanously would allow a 3rd party to create a set of MSG files: w% q7 Q+ f5 Q4 E/ T+ D
  12. containing the voice transcription/translation, as it happened with Gabriel
    0 T8 p3 j7 L; z3 R: [
  13. Knight II.
    - n* G' I$ }) L" C/ `

  14. 9 B( S6 m, n& C0 }7 |
  15.   i2 c' p  v  A  c! F
  16. Future engines:* M# A3 Y5 ^9 D& D6 d; a" V7 _6 @

  17. " n( e# v" X$ }# N+ {/ K( P
  18. · SCI 21
    : v& ~( {$ l- T# a/ h
  19. - Gabriel Knight II: The Beast Within (Already a fan patch available in% D6 P; t( P* [) A( u" T
  20. order to enable the text display feature)+ e0 h9 o4 Y8 @
  21. - Phantasmagoria
    * J  [0 _# K* ^
  22. - Rama
    & r* K7 b) m/ _
  23. - Shivers6 O; N5 T2 I! W# u8 b
  24. - Phantasmagoria II: A Puzzle Of Flesh( E# g, k, l# c# I& ]
  25. # T* Y; ~4 z+ U
  26. · SCI 3
    # r4 Q9 K4 p* N( n0 `. f
  27. - Lighthouse: The Dark Being
    # W- Q8 P: i; ]3 B, W

  28. 3 j6 a8 O; E/ s: J6 {: G/ H
  29. · M4/MADS
    + \; S- I' C# `5 \
  30. - Orion Burger
    0 F; ^) ?0 D/ u

  31. " v  u& o9 r& [8 g) E/ |
  32. · Mohawk) H$ l4 F* ^7 b1 b- L
  33. - Myst
      y. \0 D- r' R. _) `; C
  34. - Riven: The Sequel to Myst
复制代码
# |3 G3 A( S7 D9 t
/ z9 Y: m- @! ^* ]) f& ^

$ k3 F, F" R0 N6 H: \9 f1 @) I" k9 t6 \
相关代码如下
* c5 x; O0 Q% L! o
  1. bool VideoPlayer::playFrame() {0 f' G- m4 q5 K; N0 |* V9 x
  2.         bool end = true;& `: \& j* T1 |% k: U

  3. 5 r1 J/ W1 t/ m7 I
  4.         // Process the next frame while the file is open
    ! H+ @: w. U3 b* n( {' H
  5.         if (_file) {7 S4 H8 E( R6 ~$ c/ \
  6.                 end = playFrameInternal();+ x  @2 p7 @6 ]5 r6 L0 ~& x

  7. $ x& \+ V  R$ t9 E. B: @$ s  a
  8.                 _subtitles.drawSubtitle(_lastFrameTime - _startTime);9 s* s; W3 X  ?8 W! M- L" @7 R
  9.         }
复制代码
  1. bool Subtitles::drawSubtitle(uint32 timestamp, bool force) {
    ' B4 A. C+ Z: a7 M  k( G
  2.         Common::String subtitle;
    # j  u+ ]) b, A9 w6 N' S) R
  3.         if (_loaded) {2 D. {7 X: z8 C% |, ~
  4.                 subtitle = _srtParser.getSubtitle(timestamp);8 K  |6 N* N5 C
  5.         } else if (_subtitleDev) {* m% ?8 u& A9 [
  6.                 subtitle = _fname;! D8 G) X+ Y; P& z
  7.                 uint32 hours, mins, secs, msecs;
    : Z& h3 A5 x  b
  8.                 secs = timestamp / 1000;4 D, D9 T; _2 {! d" T! Q5 u
  9.                 hours = secs / 3600;
      i" ~; b+ x! h# v- z' u" J3 }2 h
  10.                 mins = (secs / 60) % 60;
    / m% Y- I( P5 O4 J
  11.                 secs %= 60;
    . {: d& t- {# s) |5 f; F
  12.                 msecs = timestamp % 1000;
    9 p# o/ w7 B% H' A8 q  Q
  13.                 subtitle += " " + Common::String::format("%02u:%02u:%02u,%03u", hours, mins, secs, msecs);8 U2 _* ^" C7 R! A
  14.         } else {
    ( F  Y! U! D' v' R
  15.                 return false;1 \, a5 c/ _9 z- Z2 Q
  16.         }4 S& r7 }- I0 _8 P* p. r( n
  17. 2 k3 ?) `7 C, r$ n3 ?7 Z/ ]/ X
  18.         int16 width = g_system->getOverlayWidth(),
    7 h% }2 y( D% k% u
  19.                   height = g_system->getOverlayHeight();) N7 z" U* k: ]# Z7 }  |/ l

  20. ( g9 U/ Y5 n# _7 d: p1 S
  21.         if (width != _lastOverlayWidth ||
    5 }% x6 ^% \" u
  22.                 height != _lastOverlayHeight) {
    & D1 j9 s- d' M! y$ M
  23.                 _lastOverlayWidth = width;
    , D9 r' @6 c- k6 H+ t: ?. w
  24.                 _lastOverlayHeight = height;
    " u4 [9 p$ I! ?5 ?6 _* i" W

  25. 5 u( }% K( R3 j5 I0 X
  26.                 // Recalculate the real bounding box to use
    ' C4 A3 a4 C$ k
  27.                 _realBBox = _requestedBBox;  L7 N" |+ K' M( U' |7 d

  28. " p6 m- G# P8 D4 W. p
  29.                 if (_realBBox.bottom > height) {
    ' Y, N  b; j3 M/ U  R
  30.                         // First try to move the bounding box
    " a* |# J8 R- Y
  31.                         _realBBox.top -= _realBBox.bottom - height;# G0 p* y- q6 T( c& m# p+ B
  32.                         _realBBox.bottom = height;
    - i+ X& `: b& }' _
  33.                 }4 \7 g0 C9 x, r4 c) z0 A' U4 G( G
  34.                 if (_realBBox.top < 0) {' A7 }# T/ c! ^1 Y
  35.                         // Not enough space
    2 ?, ~9 p3 J6 i6 H8 L+ V
  36.                         _realBBox.top = 0;
    # }, I; t. A/ D' B8 @
  37.                 }/ C% z- w2 @1 u+ A$ c2 r; S

  38. 5 [6 k7 f. I: ~
  39.                 if (_realBBox.right > width) {
    8 j8 f" Z$ N% ]
  40.                         // First try to move the bounding box
    3 ^. Y3 [/ O. m- M* j
  41.                         _realBBox.left -= _realBBox.right - width;
    3 d* P1 T' p6 d* o5 M
  42.                         _realBBox.right = width;
    8 `- W# Z* @( x. C$ G' q
  43.                 }
    ! [6 `) \+ p- D' g3 g
  44.                 if (_realBBox.left < 0) {
    2 L/ r* U1 Y+ ?* L5 I1 k7 {
  45.                         // Not enough space
      n' }0 T' q( V" @/ D% Q
  46.                         _realBBox.left = 0;6 R4 D+ M' L1 ]+ t' B; M1 E
  47.                 }, b! b: k0 V: n, }7 u

  48. * u0 ^" Q, @: D7 P4 G$ M
  49.                 force = true;% }4 Q) H% K: H/ o1 p" _- A) h
  50.         }1 v  D; M( _- d9 f
  51. # Q* x" U* l" D' X
  52.         if (!force && _overlayHasAlpha && subtitle == _subtitle)
    5 o& N% X1 u6 J. D
  53.                 return false;: z: u+ H" m' x# o8 W2 Y
  54. 8 b' A4 u* H  d$ K
  55.         if (force || subtitle != _subtitle) {4 `9 ]+ Y( z* a0 P
  56.                 debug(1, "%d: %s", timestamp, subtitle.c_str());
    7 }2 N4 P8 p. y5 A# O- ]

  57. ; D; R: N. d$ y2 O2 @( {* p6 G
  58.                 _subtitle = subtitle;
    8 _2 V7 a' v, u9 d$ Y& Q
  59.                 renderSubtitle();
    5 C: v8 W0 }: R2 {8 Z# r4 r
  60.         }
    0 N# [0 `' p' M3 j6 s$ U
  61. $ F) U7 A* u0 N6 {5 \' J
  62.         if (_overlayHasAlpha) {0 t$ C# \3 o6 \
  63.                 // When we have alpha, draw the whole surface without thinking it more
    / S1 M9 ?( I/ ^5 [2 m
  64.                 g_system->copyRectToOverlay(_surface->getPixels(), _surface->pitch, _realBBox.left, _realBBox.top, _realBBox.width(), _realBBox.height());* Z0 S$ _) ]/ i4 B  t: i
  65.         } else {" q6 H8 `# X$ J! ]/ f' p8 e  ~# c* k
  66.                 // When overlay doesn't have alpha, showing it hides the underlying game screen6 Z% n3 I6 H- ^+ [9 @& L
  67.                 // We force a copy of the game screen to the overlay by clearing it# V5 l  A4 X9 J# ?0 Z8 D0 ^+ l
  68.                 // We then draw the smallest possible surface to minimize black rectangle behind text' l' h$ q8 [& ]- X; {* E$ Z; D
  69.                 g_system->clearOverlay();
    # p) @  `  \. Y! h
  70.                 g_system->copyRectToOverlay((byte *)_surface->getPixels() + _drawRect.top * _surface->pitch + _drawRect.left * _surface->format.bytesPerPixel, _surface->pitch,
    ! K( h/ y0 U) _; ?" |/ Z% U% N
  71.                                 _realBBox.left + _drawRect.left, _realBBox.top + _drawRect.top, _drawRect.width(), _drawRect.height());
    & g' m* Z! X' i4 K0 S
  72.         }% \1 N8 C' T8 v! ^$ q/ ]( B

  73. " c2 ^8 E* o( A: x! m
  74.         return true;
    4 @: a5 j& ?4 K# \/ F0 v
  75. }; A# W6 u9 p4 `
复制代码

9 y, Z* p' {, Z/ I% r1 Y6 {) `
! W1 Z4 C* N0 `+ M5 b4 R& q1 n% l& Q

- \4 K+ p4 z2 E' i4 [" B' k' `) T
- x5 i/ `% C! N2 G5 f3 A
8 C- D6 a* {' x, U8 X0 o1 A
分享到:  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日,是全球华人共同的冒险解谜类游戏家园。我们致力于提供各类冒险游戏资讯供大家学习交流。本站所有资源均不用于商业用途。

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