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

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

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

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

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

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

本帖最后由 shane007 于 2023-8-12 13:57 编辑 * _* f7 e4 u( Q/ b1 ^( H

% z: d! u# ?4 t  v# K  u, ~这个游戏原本是没有字幕的,但是在Scummvm论坛上发现了一个帖子,
/ `+ J1 g6 f: V1 K! ~5 ~  F讨论的内容是关于在原本没有字幕的游戏上加上字幕。(最初的缘由,是为了帮助一位失聪的朋友)
. @8 h" j7 W# X6 W! ~7 _https://forums.scummvm.org/viewtopic.php?t=7168
# K4 y) Q# q' q/ r- t! k7 o[Scummvm-devel] Displaying subtitles in voice-only games (narkive.com). c  J2 E% h4 _- d1 o/ ?

% y* g! _: l! L8 m# u4 n前段时间第七访客出了25周年纪念版(The 7th Guest 25th Anniversary Edition。
; K" i- o3 u- \* @8 g9 `在这个版本中,游戏的视频是有字幕的,因此把这个视频的字幕用到Scummvm中就成为了可能。
; q+ V3 Z) ?- R
& @1 w( }9 S* x% u  o! j: S/ S我查看了一下最新版本的Scummvm的代码,发现老外已经加入了一部分代码。8 J' w) c3 w/ x, @& m
在此基础上,汉化是大有希望的。此种汉化方法,也是前所未有的,如果真的实现了将会有重要意义。: ]6 T! Q% _, d
/ P. t8 l3 u6 q2 ~* h; x1 z
类似游戏还有
  1. · Groovie
    - P* s) b: G6 ~
  2. - The 7th Guest
    ' I5 o* _: e5 \$ f/ W; r
  3. - The 11th Hour% _+ f. t* F6 v3 f3 j" U# N

  4. 1 k/ g( {1 o( c7 P& l  l
  5. · MADE7 s+ u" g7 q) ^: q: L
  6. - Return to Zork (descriptions are text only, while spoken dialogs lack# M: d6 q1 k1 m, U3 ~  ~8 A
  7. any text)* |, z1 X- X8 l' K2 K

  8. " g* }0 `6 b: X7 y, t
  9. · SCI 1& b) w3 ~; v$ _( F+ `; _1 V. K
  10. - King's Quest V (CD Version). In this case, just enabling voice and text, m8 p3 r  Y5 l, V9 D+ A% e
  11. simultanously would allow a 3rd party to create a set of MSG files
    ! I! T  a* R' }* i; Y
  12. containing the voice transcription/translation, as it happened with Gabriel
    : S# g) Q/ v% j4 S
  13. Knight II.
    # T" _' \( w! ~" x5 |+ i2 l  y$ G; A' H
  14. 1 W# c8 Q1 {0 _

  15. ) b( T. F( \. z
  16. Future engines:
    ( v) ?) z) w% p

  17. - B  V+ o% S; C7 J' o
  18. · SCI 21; ^7 u& ^3 u! W5 N6 O5 `4 ]6 x1 x) S
  19. - Gabriel Knight II: The Beast Within (Already a fan patch available in# A5 \* u6 I  P: m  n/ ]
  20. order to enable the text display feature)
    * Y# t" ^  D, a4 V7 M
  21. - Phantasmagoria6 ~6 v: X- a# I# ?, [3 T& _
  22. - Rama
    : y9 y+ X- Z: W- ~( |1 j. u0 c6 D
  23. - Shivers+ `5 x; a4 }; }2 m, ^
  24. - Phantasmagoria II: A Puzzle Of Flesh# {# ^5 T0 L8 h+ n: D9 o
  25.   [! w+ c9 ?  K
  26. · SCI 3
      ^9 b. }  a# z- I
  27. - Lighthouse: The Dark Being1 S: B7 h- i+ W2 I9 y, ~
  28. ) _* J. p2 r$ ^; N+ l- Q* C- T: l# ~
  29. · M4/MADS% x7 M; M* j! k1 ]( E$ P
  30. - Orion Burger. T. W, d9 ]+ o/ V- N9 v
  31. $ F. k3 u, b; a% N4 J: F4 k
  32. · Mohawk
    8 [% e' _  O( h
  33. - Myst1 N) d. z$ ?6 r% Z2 t6 A* j8 k
  34. - Riven: The Sequel to Myst
复制代码

& G2 W+ W' C$ R; m, u3 T+ ^4 [0 I9 |" P

5 D2 T9 S  P' _/ h: M1 S
6 D' v0 y2 @3 h相关代码如下9 R1 `" P( F8 }, \" `0 F7 w, h' H
  1. bool VideoPlayer::playFrame() {& B7 L9 ^; o  r/ u; \
  2.         bool end = true;
    % i" I8 \* I* ^) |; u7 H" A  y

  3. ' H1 {1 j0 ?6 l* ^+ S
  4.         // Process the next frame while the file is open
    0 h* F% J  n& e9 F+ i! s
  5.         if (_file) {
    5 t& I0 ?( Z1 }
  6.                 end = playFrameInternal();
    ) D7 k: M3 x1 G* E# b

  7. - \  N- q" }9 e) k& D
  8.                 _subtitles.drawSubtitle(_lastFrameTime - _startTime);
    0 _" l# e& i& F! A7 d6 l
  9.         }
复制代码
  1. bool Subtitles::drawSubtitle(uint32 timestamp, bool force) {4 g7 ?! S% O2 A6 p- c: @$ p* k
  2.         Common::String subtitle;# i. Y# {( ]/ ^9 X' _5 I3 x
  3.         if (_loaded) {( }  F; P+ ~) }* K$ F
  4.                 subtitle = _srtParser.getSubtitle(timestamp);) Y9 o  K8 T6 ]1 g" b
  5.         } else if (_subtitleDev) {
    " j' p6 b$ F3 H; F/ _& ~. e4 }
  6.                 subtitle = _fname;
    ( X7 |7 b% O, X0 j! H! O2 g' C
  7.                 uint32 hours, mins, secs, msecs;
    + b6 I( |, w) d. F4 r% c  k0 ^
  8.                 secs = timestamp / 1000;
    # V& a1 q7 X7 {  b) ^: F) n
  9.                 hours = secs / 3600;
    ! E! L3 T, I/ f/ Q
  10.                 mins = (secs / 60) % 60;
    " w! R6 z# _2 N9 `. U
  11.                 secs %= 60;( j; l1 v0 {$ k" K1 e6 m# M
  12.                 msecs = timestamp % 1000;
    ( a% [* k% R* p' w
  13.                 subtitle += " " + Common::String::format("%02u:%02u:%02u,%03u", hours, mins, secs, msecs);
      Q; m: I' P3 n% k. a
  14.         } else {% n% y5 l3 I" q
  15.                 return false;( Z! I- F2 Q7 P/ ~8 o; N) \
  16.         }
    2 o8 [: A9 W% p  N& h" x
  17. 9 h- v) d! s0 S
  18.         int16 width = g_system->getOverlayWidth(),' }" ?$ O" n6 H( T
  19.                   height = g_system->getOverlayHeight();
      g4 [+ `/ H( g. B: ?5 i
  20. * w! n: u& S. x) e
  21.         if (width != _lastOverlayWidth ||' ?$ F' B" B. |+ A3 P8 l9 Z/ [7 z
  22.                 height != _lastOverlayHeight) {3 [" U) k" O  K9 N9 l( ~$ U
  23.                 _lastOverlayWidth = width;, k. l& e# t! H$ L
  24.                 _lastOverlayHeight = height;
    , [: W- u2 @3 p! u
  25. 4 w. E0 \3 P4 H' S2 P
  26.                 // Recalculate the real bounding box to use
    ! D6 X1 @4 h# K
  27.                 _realBBox = _requestedBBox;
    1 C- x0 w( _3 y- l/ [. s
  28. 5 A  w( L& I9 d( l% H2 _/ b/ |
  29.                 if (_realBBox.bottom > height) {
    . L; k4 B( H; s
  30.                         // First try to move the bounding box* b% o2 Q9 H( k" k
  31.                         _realBBox.top -= _realBBox.bottom - height;4 G; S4 Z% Q$ A9 \$ C
  32.                         _realBBox.bottom = height;7 P! ]" L6 G& F. t
  33.                 }
    2 ?/ v9 T+ w1 @; e
  34.                 if (_realBBox.top < 0) {' }+ e& I5 M  f0 Q5 n6 {: h- N: G
  35.                         // Not enough space* z! q$ S5 m9 Y) d0 w( O
  36.                         _realBBox.top = 0;+ x: ]3 k/ a; p/ |6 {1 |+ `
  37.                 }
      a3 x9 ^- X" ~6 Q* j) p
  38. 8 ^$ F" {- T& Y% W% u! ?0 ?! ]: Q
  39.                 if (_realBBox.right > width) {
      W( D; G2 T7 i$ o
  40.                         // First try to move the bounding box3 J, Y& p# z' o# Z, U1 C  H0 N
  41.                         _realBBox.left -= _realBBox.right - width;+ X5 ^6 E7 _2 n9 @7 k& j
  42.                         _realBBox.right = width;
    ) x! D, Y* S* O4 G
  43.                 }
    ) i8 y2 p) P) p" u: f
  44.                 if (_realBBox.left < 0) {/ C3 I8 z) i' ?
  45.                         // Not enough space9 ~' B  E) g2 Q4 ?
  46.                         _realBBox.left = 0;
    9 o! a8 K# N$ {5 g4 T
  47.                 }
    5 M- z3 d, ?0 N6 A0 j7 }1 f6 ~* Y: _
  48. / {& ?* P5 c# S9 f- r- i7 G
  49.                 force = true;
    - n7 Q8 Y& B, f: F* ?" E( m: U
  50.         }& e$ ~/ c% z8 b) l

  51. $ |4 K8 R0 P- k3 g: ?; J
  52.         if (!force && _overlayHasAlpha && subtitle == _subtitle); p: C8 |0 ^5 S8 ^
  53.                 return false;7 N7 e4 Z9 B  d2 d+ [+ S- l% J

  54. ! m2 e1 y( |; a) |
  55.         if (force || subtitle != _subtitle) {! o6 z/ S+ O" e  L3 A4 q5 X1 h0 w
  56.                 debug(1, "%d: %s", timestamp, subtitle.c_str());
    3 k$ B/ A/ x8 G1 y
  57. / j+ Q' t! q1 o; `
  58.                 _subtitle = subtitle;
    2 ?4 U- m3 _6 v9 x
  59.                 renderSubtitle();, m4 w8 B5 x* W7 I
  60.         }
    2 D, H! ]+ j; ^' T( ?$ S- o
  61. & j2 F# ~( Z. J# P
  62.         if (_overlayHasAlpha) {. S# S/ J! X( v; Z% B- `5 r
  63.                 // When we have alpha, draw the whole surface without thinking it more8 {2 @& |6 \+ z" B0 l+ V, J
  64.                 g_system->copyRectToOverlay(_surface->getPixels(), _surface->pitch, _realBBox.left, _realBBox.top, _realBBox.width(), _realBBox.height());( u+ c, p! @% n; j& e- o) E' n
  65.         } else {3 ]/ r: N! H" x8 X. Q9 G
  66.                 // When overlay doesn't have alpha, showing it hides the underlying game screen
    ! U  I' @  E" ^' l8 ]) U1 m/ G$ u
  67.                 // We force a copy of the game screen to the overlay by clearing it
    3 L: i9 }! O4 t- }8 t" w* |$ Z
  68.                 // We then draw the smallest possible surface to minimize black rectangle behind text
    * a1 K- o! s. w$ w- s7 u
  69.                 g_system->clearOverlay();
    6 W' t7 v3 @0 A& M+ K$ G! O4 Q1 ^
  70.                 g_system->copyRectToOverlay((byte *)_surface->getPixels() + _drawRect.top * _surface->pitch + _drawRect.left * _surface->format.bytesPerPixel, _surface->pitch,5 B2 `1 o. y$ x( B) `& Q" p
  71.                                 _realBBox.left + _drawRect.left, _realBBox.top + _drawRect.top, _drawRect.width(), _drawRect.height());" T0 k  w- U+ v: K: F9 z
  72.         }
    / g4 i+ ^; H& F; V: a) e# u; c

  73. ) e( Q% Z+ ~: g$ o# K; |" z1 }# d
  74.         return true;2 j; S; q& ~1 P' {7 p& Z3 a
  75. }& N8 s3 {0 d2 _0 u4 e
复制代码
/ F% N  |* X# F9 i

4 L0 T4 E4 j% P/ r3 \! J  r& O2 H; @  ^/ I' S$ t

$ T# [7 W" ~2 L6 i, N
1 t- W! S8 Q  ~  l" U! @! \! C
4 z" q$ d8 Q6 b: N8 T( J$ x
! |* |& R9 P$ _* S$ g: I
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享分享 很美好很美好1 很差劲很差劲
回复

使用道具 举报

高级模式
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日,是全球华人共同的冒险解谜类游戏家园。我们致力于提供各类冒险游戏资讯供大家学习交流。本站所有资源均不用于商业用途。

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