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

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

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

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

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

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

本帖最后由 shane007 于 2023-8-12 13:57 编辑
! Y2 B0 ]. {" N6 m- j
. _! h7 a4 V) G这个游戏原本是没有字幕的,但是在Scummvm论坛上发现了一个帖子,/ A) C. ?" x9 Q  s1 x6 I# U
讨论的内容是关于在原本没有字幕的游戏上加上字幕。(最初的缘由,是为了帮助一位失聪的朋友)1 ^! Y% e# ^! F$ G$ b) u% R9 L+ _
https://forums.scummvm.org/viewtopic.php?t=7168! S! h# v; h. b
[Scummvm-devel] Displaying subtitles in voice-only games (narkive.com)
* ^: Y; h% w: `  ]: Z9 k! b1 i4 f% T) ?& b' P3 t
前段时间第七访客出了25周年纪念版(The 7th Guest 25th Anniversary Edition。
0 o& K: [3 G  {6 m& _( r) T* Q在这个版本中,游戏的视频是有字幕的,因此把这个视频的字幕用到Scummvm中就成为了可能。
6 M6 z0 T' G/ N* M& o7 T2 `. N$ C; v8 Q7 ~) r
我查看了一下最新版本的Scummvm的代码,发现老外已经加入了一部分代码。
- @. o- c' d. O! Q8 V5 @; D; Z在此基础上,汉化是大有希望的。此种汉化方法,也是前所未有的,如果真的实现了将会有重要意义。
/ ^5 L* b9 r9 P7 A/ H0 z2 U  e) G7 G1 s( Q" K$ y
类似游戏还有
  1. · Groovie
      |- s, J8 l9 c* ^4 Y9 o; w
  2. - The 7th Guest8 Y, I& J. [% y) m; a: z8 e
  3. - The 11th Hour
    " e/ Z$ ^3 O( ~* N& c( c) W- m9 j
  4. % K' _. G/ q' V/ [0 R/ o+ O0 A
  5. · MADE
    $ r' ~! B3 @0 ]6 f- b
  6. - Return to Zork (descriptions are text only, while spoken dialogs lack
    4 ]. g& }& ^7 K# \" I1 o2 d8 M
  7. any text)
    - P% L7 `& o* J3 l0 l. _0 A
  8. " s% `3 \, F# d. ]' M
  9. · SCI 1; j5 T% G9 M* N0 m0 z
  10. - King's Quest V (CD Version). In this case, just enabling voice and text
    " d: F0 R7 }+ r4 b8 A# P$ @
  11. simultanously would allow a 3rd party to create a set of MSG files1 d2 \& d& u; A7 k/ d. X& k
  12. containing the voice transcription/translation, as it happened with Gabriel, o* ]8 }' D2 z" O, }- P# Q$ b( J& }
  13. Knight II.
    5 l5 D& J0 ]( V$ O3 P

  14. : h7 y2 f, y* \
  15. ) [3 v8 J) n- G4 r: g( Z  i
  16. Future engines:7 K+ S8 H( `! j

  17. % i( q. y, Z3 O  R6 ~7 i8 L
  18. · SCI 21
    8 k$ G! ?% I0 }9 @' e# O9 }
  19. - Gabriel Knight II: The Beast Within (Already a fan patch available in0 p. t+ O, F7 w% S" X5 c" u8 Q
  20. order to enable the text display feature)0 |# L1 _5 Z. |% x2 e! D8 n- B
  21. - Phantasmagoria
    ; F$ Z+ z4 X+ H
  22. - Rama  a/ \6 ^: e- N( }! K( q) b
  23. - Shivers& \8 _% }# ~) t- B
  24. - Phantasmagoria II: A Puzzle Of Flesh
    6 E7 b8 ]( J/ |. P$ K3 w
  25. ! Y) n: e, K& g3 _: ?8 x( }, I
  26. · SCI 3
    . Z( p) l/ F; L* B( Q/ T7 ?- P
  27. - Lighthouse: The Dark Being
    3 D' W8 X0 _! A" J+ S' z" s$ [

  28. . R. R& J2 l; `2 A
  29. · M4/MADS  b% q! Y# G! z5 {( |
  30. - Orion Burger; g" @) U' z& x

  31. ! M+ A5 g7 A5 r7 V, L
  32. · Mohawk
    3 P  M3 r" e& |( H. q+ v
  33. - Myst' o1 p% t% y: ^' V+ g9 [. \$ M
  34. - Riven: The Sequel to Myst
复制代码
, u, |4 [: Y* z8 {, o/ R1 b: ?* I
- l( c3 e, r, ]
& b/ G% w& l- F8 y
% H3 C6 K) H5 e
相关代码如下
% ~7 Q! ]  R8 h  E; A; U
  1. bool VideoPlayer::playFrame() {2 A" d9 h: Z( Y, {$ E) a
  2.         bool end = true;5 c3 u/ k: h- d& A7 N. r5 W

  3. ! g' i5 U) Z8 g3 N8 }7 W- k
  4.         // Process the next frame while the file is open- R1 L$ I8 v* M6 [: q7 ?
  5.         if (_file) {: b0 ?: ]2 q7 L$ v1 p2 P
  6.                 end = playFrameInternal();; ]4 E% L2 V1 i3 F% v1 I; A

  7.   M7 z4 W& m* Q
  8.                 _subtitles.drawSubtitle(_lastFrameTime - _startTime);9 N! Y1 z7 b. a1 c
  9.         }
复制代码
  1. bool Subtitles::drawSubtitle(uint32 timestamp, bool force) {
    3 [. j: [2 X  S7 d' i6 M  C
  2.         Common::String subtitle;
    2 d$ d6 w' u6 `1 X2 Z8 Q7 z
  3.         if (_loaded) {+ Y; r* Z' z3 P, Y
  4.                 subtitle = _srtParser.getSubtitle(timestamp);
    ; Z. U9 ^5 k' ~& ~) l9 w* t
  5.         } else if (_subtitleDev) {" e, m5 i: X- E
  6.                 subtitle = _fname;
    9 A! j8 P0 W+ c& B6 E4 _+ B
  7.                 uint32 hours, mins, secs, msecs;8 i' I* t) ]9 Q% k9 p
  8.                 secs = timestamp / 1000;* T( H( r( T( r
  9.                 hours = secs / 3600;
    2 w; W; t: a; l1 r
  10.                 mins = (secs / 60) % 60;
      Z% a- ?; ]) z- W7 K+ O
  11.                 secs %= 60;- m/ [7 |) v, y2 H* d- i1 h; i
  12.                 msecs = timestamp % 1000;( }# o; x$ }7 a' }& k% T! l
  13.                 subtitle += " " + Common::String::format("%02u:%02u:%02u,%03u", hours, mins, secs, msecs);
    ) k4 \8 \! ]7 @% p: R! r0 o/ D+ f
  14.         } else {
    ! e; g, g) W7 E! d
  15.                 return false;
    ! y1 `7 T& f4 n/ E2 P% z* p
  16.         }6 i5 L/ c8 ?" a  G, Y% I

  17. ! q0 x) h8 z& b8 Q) D
  18.         int16 width = g_system->getOverlayWidth(),
    $ w, d* s- T- L1 v* s0 }3 Y
  19.                   height = g_system->getOverlayHeight();% l9 ]4 L0 ^& t8 y% i0 g
  20. ) ^- a2 Y* y% B. T3 Y5 H0 x
  21.         if (width != _lastOverlayWidth ||3 j& L: ~) [" c  R2 _$ k
  22.                 height != _lastOverlayHeight) {
    1 G5 j1 i- D7 ~. K: [/ n
  23.                 _lastOverlayWidth = width;; @$ _" ]; g5 p4 c' r
  24.                 _lastOverlayHeight = height;
    . i! \6 V. p& @: @4 d
  25. 2 }& e  i' q/ J' A' h& o5 ^' W# [
  26.                 // Recalculate the real bounding box to use
    - f1 n" M2 c& V+ `4 q
  27.                 _realBBox = _requestedBBox;
    8 v2 @! Z4 R: Q6 k5 N7 n/ Y
  28. * t  u, ~$ c* d% h9 ]
  29.                 if (_realBBox.bottom > height) {! w5 F- @& Z, _3 U# R8 Q& g
  30.                         // First try to move the bounding box# e. d7 j; `0 z$ Z
  31.                         _realBBox.top -= _realBBox.bottom - height;1 t; q0 O0 F6 b! c6 ]0 ?9 U
  32.                         _realBBox.bottom = height;
    6 A% d' X1 X. H# G4 I
  33.                 }# I4 M7 r6 {& b! \" t& F# g
  34.                 if (_realBBox.top < 0) {* ^3 E, _, L5 I% J/ i
  35.                         // Not enough space$ q* I' {; `  F- t/ |$ Q
  36.                         _realBBox.top = 0;* \# o. ~  M( r, Q% B9 \
  37.                 }4 f- [1 V9 N2 a* S

  38. 3 @/ ~2 z; m  B5 X" K% g6 x
  39.                 if (_realBBox.right > width) {
    ! E$ y4 I  p7 j2 R9 q9 k
  40.                         // First try to move the bounding box
    $ T# x; Z0 ?, K9 u" R1 @2 v
  41.                         _realBBox.left -= _realBBox.right - width;. T# q8 F& U% w, W
  42.                         _realBBox.right = width;
    8 ~8 X; {0 z# J4 H& m0 p6 L) U
  43.                 }
    ) u1 e# K5 a3 g! u* s+ Q
  44.                 if (_realBBox.left < 0) {
    ; s. H. J3 M0 _- B
  45.                         // Not enough space1 _1 t2 @4 W$ X, K# f: }, F
  46.                         _realBBox.left = 0;  q, I" i# X& P  I) P4 v! y
  47.                 }; k/ d1 I" Z8 \0 q/ P7 B9 A

  48. & {* }, n1 j/ z! L
  49.                 force = true;
    6 m( B2 g1 P/ Q8 W% e) G
  50.         }
    5 G' j5 x4 x  d) Q  B' q$ u$ q) I- r

  51. ) u7 p, X$ _, M/ v5 O, ]6 X
  52.         if (!force && _overlayHasAlpha && subtitle == _subtitle)
    " _* C4 z  f/ L6 O5 R
  53.                 return false;
    4 W1 t6 t0 V3 P9 ?, C# V

  54. 3 N% h. _1 i% A8 ~& v
  55.         if (force || subtitle != _subtitle) {
    * K, Q5 I& {" H
  56.                 debug(1, "%d: %s", timestamp, subtitle.c_str());  }5 X5 M; ]$ j; J1 R- f

  57. 8 b# j  D1 ?6 f! `. a
  58.                 _subtitle = subtitle;
    : _) h8 {* [, m0 [) H4 m' k
  59.                 renderSubtitle();, h$ [* K( C7 p
  60.         }# g2 [( _( e# I' ?
  61. 6 |' C- f) q, g* U  b4 r8 f0 {$ x
  62.         if (_overlayHasAlpha) {* }6 Q5 f3 C& ?4 L; p3 J6 T% O$ b3 y3 V9 p* m
  63.                 // When we have alpha, draw the whole surface without thinking it more: {- y5 f8 g) A6 {, F. X. w
  64.                 g_system->copyRectToOverlay(_surface->getPixels(), _surface->pitch, _realBBox.left, _realBBox.top, _realBBox.width(), _realBBox.height());+ P6 w8 m8 ~& y& O- k
  65.         } else {: d3 u7 X, r+ E$ Y) M
  66.                 // When overlay doesn't have alpha, showing it hides the underlying game screen
    ' M6 W- e  v" ]- X+ y9 ~, N, z8 X
  67.                 // We force a copy of the game screen to the overlay by clearing it
    5 {2 i: i$ |$ p3 }/ m
  68.                 // We then draw the smallest possible surface to minimize black rectangle behind text
    - v# E; w0 h3 H# \: S9 U3 y
  69.                 g_system->clearOverlay();
    ; r* g) E; D2 I* t5 v& O4 Z
  70.                 g_system->copyRectToOverlay((byte *)_surface->getPixels() + _drawRect.top * _surface->pitch + _drawRect.left * _surface->format.bytesPerPixel, _surface->pitch,
    ; Z0 x" X6 r% f. }' h/ ]
  71.                                 _realBBox.left + _drawRect.left, _realBBox.top + _drawRect.top, _drawRect.width(), _drawRect.height());
    + E9 ?0 L5 s. g( ~3 T0 z/ Q
  72.         }9 K, W# ]1 y. k# p1 M

  73. 1 E& }5 I3 i2 t- C
  74.         return true;; H" ~9 L7 H4 O
  75. }* T2 h1 X7 i3 C. p
复制代码
( G6 ^: l& u$ x1 V( C$ i6 ]  h

: W8 p" i7 D4 `! b% U) U8 @; I6 U& L/ w: a2 Z

1 O( s6 q: V& B7 ]$ |; h( q3 g( K1 A! A( _  r; S

6 N  m$ d6 E# t- S  k) N) U$ }) a
& ?* \/ B- y; t) b. `: T
分享到:  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日,是全球华人共同的冒险解谜类游戏家园。我们致力于提供各类冒险游戏资讯供大家学习交流。本站所有资源均不用于商业用途。

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