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

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

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

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

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

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

本帖最后由 shane007 于 2023-8-12 13:57 编辑
7 j) V, ]! t; j, q
7 I* C) u6 l; v这个游戏原本是没有字幕的,但是在Scummvm论坛上发现了一个帖子,
" w5 y  r5 N& {讨论的内容是关于在原本没有字幕的游戏上加上字幕。(最初的缘由,是为了帮助一位失聪的朋友)
& j% Z0 A8 q& a6 A' Ohttps://forums.scummvm.org/viewtopic.php?t=7168) O- a4 W3 r5 k, s$ T/ f
[Scummvm-devel] Displaying subtitles in voice-only games (narkive.com)3 p# {/ X0 q: g6 O8 y( _. ]+ R
: U5 \& ?) b/ Y* K/ `
前段时间第七访客出了25周年纪念版(The 7th Guest 25th Anniversary Edition。( W6 U) u/ X1 `  P2 L0 A- ]
在这个版本中,游戏的视频是有字幕的,因此把这个视频的字幕用到Scummvm中就成为了可能。
: }1 s0 ^4 [% t* e. f; P2 T- M" Z" f# f# o) I6 v0 a
我查看了一下最新版本的Scummvm的代码,发现老外已经加入了一部分代码。
2 J6 m7 L' K6 L在此基础上,汉化是大有希望的。此种汉化方法,也是前所未有的,如果真的实现了将会有重要意义。* d: m+ D, E- r, \1 y6 I
/ v( [& U9 \! K0 ^- p# l% W
类似游戏还有
  1. · Groovie
    5 D3 g5 ~2 F& F/ {% T0 y
  2. - The 7th Guest& z5 r) K6 ~9 u+ ], `9 r* y2 a
  3. - The 11th Hour
    8 V) m. \$ y+ \& Q  k

  4. & a' L! @1 d; B5 g4 T2 C
  5. · MADE2 R/ y- o! O' Q5 k( h3 b8 k$ A3 G
  6. - Return to Zork (descriptions are text only, while spoken dialogs lack
    , a9 A" \6 r. U
  7. any text)
    : B* T: `: C6 _0 n5 |0 h* N

  8. - H3 s/ f' |5 Q! w* ]  \
  9. · SCI 1% I: _: p7 ~$ b, l
  10. - King's Quest V (CD Version). In this case, just enabling voice and text, N6 D( T0 h2 S+ r  i5 e- k! F
  11. simultanously would allow a 3rd party to create a set of MSG files
    8 G' z% [0 ~! j6 e, z4 ^. L7 o8 t7 `3 A
  12. containing the voice transcription/translation, as it happened with Gabriel$ g) g: p$ ~- \3 e0 p$ C  k1 @
  13. Knight II.
    1 G: z  p$ r$ F. \5 C+ K

  14. : l. D2 W4 \# ^. y/ y) \! {

  15. : I8 D4 g8 g$ U/ A3 o  e  r
  16. Future engines:! a6 @+ X: @) {( ]" O
  17. ) Q. J. y9 \; k9 `- h/ c1 d
  18. · SCI 21
    6 {; \1 P. \7 e/ P& y% N/ X1 N
  19. - Gabriel Knight II: The Beast Within (Already a fan patch available in( g( o/ K+ Y) o$ X" t+ c0 B
  20. order to enable the text display feature)7 j! U4 _0 A. t4 [/ C5 b; @
  21. - Phantasmagoria- [' H& p- c1 B+ P; [5 _: x
  22. - Rama) Q( S* C1 g5 p
  23. - Shivers
    / M* y7 ?. @1 {1 X$ Z2 f. i
  24. - Phantasmagoria II: A Puzzle Of Flesh
    & Y1 T9 o: X+ P
  25. " K4 e" w7 J6 T- G) {3 `
  26. · SCI 3! c% k  _3 `8 C1 w  G3 ^
  27. - Lighthouse: The Dark Being
    ; I2 U( V; k& y$ I, Q6 d) \

  28. , c3 \  {, L1 F- y3 m7 Q
  29. · M4/MADS
    9 I: Y" a  {) o; U8 ]
  30. - Orion Burger
    ; U% ?% l2 o: z: ?

  31. 6 c- h% W' Z: m3 n: I
  32. · Mohawk
    9 [0 o6 E3 S2 v) Z7 a
  33. - Myst+ g' d& _/ n+ Z) ^! ?
  34. - Riven: The Sequel to Myst
复制代码

. X( {/ r+ ^# u; z
4 y( P2 R1 x) h" Z3 H5 R  {9 g: j8 I3 P  V5 s7 m
" {1 t* v' K' {6 f
相关代码如下
- p1 w4 g( c$ N+ z4 R
  1. bool VideoPlayer::playFrame() {, F' ~9 n) s( k; Z5 H" R7 `
  2.         bool end = true;/ m) ~: P% k: g  K$ _- L

  3. + k% O% T1 A8 r6 e  m
  4.         // Process the next frame while the file is open
      {0 ]9 i3 z# `3 J
  5.         if (_file) {
    ' N5 h: t, s% h4 Z5 U1 u8 S# [
  6.                 end = playFrameInternal();
    ; B. @$ m$ f7 k8 i% H
  7. 4 l5 w2 B- ~7 l' N& P1 A: j+ A
  8.                 _subtitles.drawSubtitle(_lastFrameTime - _startTime);, o8 e- o9 i" {+ E' b  D& M; P/ u
  9.         }
复制代码
  1. bool Subtitles::drawSubtitle(uint32 timestamp, bool force) {  R2 N% ]7 Y1 p$ J; k' x
  2.         Common::String subtitle;
    , O; l1 k1 Z" r" I+ h
  3.         if (_loaded) {: x0 M3 r- v* ]1 d
  4.                 subtitle = _srtParser.getSubtitle(timestamp);: J& G% e  F7 c6 h) n
  5.         } else if (_subtitleDev) {5 J# T' g7 z' q! F8 U5 S, V$ G
  6.                 subtitle = _fname;
    8 s# m' E3 D5 y1 a2 X" ^9 m9 r
  7.                 uint32 hours, mins, secs, msecs;+ [3 t* a9 e+ T6 q$ O! ^
  8.                 secs = timestamp / 1000;
    / O% s8 |' S8 p
  9.                 hours = secs / 3600;
    1 r/ l+ J" E  h( [: M
  10.                 mins = (secs / 60) % 60;( m7 `+ z  K0 X" m2 F4 U
  11.                 secs %= 60;. y  U4 r# H; w8 l* h
  12.                 msecs = timestamp % 1000;
    6 F6 B; z2 D! d; y8 Z/ M. \* }, N
  13.                 subtitle += " " + Common::String::format("%02u:%02u:%02u,%03u", hours, mins, secs, msecs);4 }5 w- `) a  |+ o" f
  14.         } else {
    1 E( m' d/ F; c! q$ O! ~* D
  15.                 return false;0 r' }' B. A  x4 U4 u) B# r
  16.         }
    ' }4 A! @3 w; g0 d9 ^# ~

  17. ; }% a* H8 ^) D
  18.         int16 width = g_system->getOverlayWidth(),4 c1 u8 v/ t% d' c/ M: ], B4 y, `& [
  19.                   height = g_system->getOverlayHeight();- T9 r. @6 }  W* W( r* R

  20. - C. g6 P8 z  Z3 W
  21.         if (width != _lastOverlayWidth ||# {% g; ?0 E6 r- _' d, a
  22.                 height != _lastOverlayHeight) {
      P7 M4 Q& y' V/ S- B; K9 L
  23.                 _lastOverlayWidth = width;
    / p3 B* j/ U5 W5 V
  24.                 _lastOverlayHeight = height;
    # S8 L" h# `' c: e

  25. % _3 }( T0 _, l; M. v' M* r
  26.                 // Recalculate the real bounding box to use% `( h5 R$ @' T3 I# O' S5 U
  27.                 _realBBox = _requestedBBox;) F- a6 C5 P% k, c- L* p
  28. 3 p. ~9 G+ u% }* W. k# t. a& X7 Z
  29.                 if (_realBBox.bottom > height) {
    % r2 m, o' |! t+ h6 @
  30.                         // First try to move the bounding box
    ) y0 `1 h% m8 [5 y6 C; s
  31.                         _realBBox.top -= _realBBox.bottom - height;4 b3 m% M' |4 }# X9 v, g' v7 C8 |
  32.                         _realBBox.bottom = height;
    " P' a8 t( `! `; v
  33.                 }" X( c  T, l  J% P- r* m2 @
  34.                 if (_realBBox.top < 0) {
    $ a& n# o9 c* k( B& W; E
  35.                         // Not enough space  V: q' k+ M8 l% b; ?8 B! }; m
  36.                         _realBBox.top = 0;$ \. o7 s7 D. J$ _& \) P
  37.                 }
    + F* q  V' n, q3 S% F
  38. ' k- F; m" z$ x1 a3 u
  39.                 if (_realBBox.right > width) {
    / n( D3 f- Q1 W7 H" n4 {
  40.                         // First try to move the bounding box
    ) m9 t3 c$ U  W4 v* k5 U/ \
  41.                         _realBBox.left -= _realBBox.right - width;
    , D: W; f0 K+ ^6 ?
  42.                         _realBBox.right = width;
    ; X; H) Z9 M. B3 s( F+ o% g# {
  43.                 }2 f" T" S; F* q9 q* w2 Q
  44.                 if (_realBBox.left < 0) {
    ) v1 S9 }; {, i; F) r9 }3 m/ d
  45.                         // Not enough space
    : \0 _& o; G6 {' F2 e
  46.                         _realBBox.left = 0;
    , i7 Q( x+ ?2 i" k
  47.                 }' U3 X  V5 O' |: G4 @9 V
  48. " D- d8 z0 S4 C$ G
  49.                 force = true;
    9 `, [3 j& l  D
  50.         }
    * x2 X# ^8 g# V+ L/ p  q7 D* n7 r
  51. 6 m1 b* F6 A# x" B3 q5 R7 z& q
  52.         if (!force && _overlayHasAlpha && subtitle == _subtitle)8 S* n4 @" R3 [0 T  w/ T
  53.                 return false;- `& h  p/ N5 w3 k6 m

  54. ( V* D1 E+ y  v, L- w0 o$ Q( o! b
  55.         if (force || subtitle != _subtitle) {
    + t, h5 G3 h" {2 i, s
  56.                 debug(1, "%d: %s", timestamp, subtitle.c_str());& B7 V. O* W& \  ~7 y
  57. ; I5 o! s! x' T" k2 f( k
  58.                 _subtitle = subtitle;6 j( s0 D) s' q3 a/ m: X
  59.                 renderSubtitle();
    ) `8 f, o  E* V/ }
  60.         }& ?0 _$ y6 I) r: i- B" j

  61. 4 z' m( w( i% C4 E3 }
  62.         if (_overlayHasAlpha) {3 r$ ~  \" _' ?6 y2 J
  63.                 // When we have alpha, draw the whole surface without thinking it more
      S; _8 I6 p$ g# r  {* q/ }( s
  64.                 g_system->copyRectToOverlay(_surface->getPixels(), _surface->pitch, _realBBox.left, _realBBox.top, _realBBox.width(), _realBBox.height());  p3 k& u5 p. y$ S/ l( ^
  65.         } else {
    0 U/ n' K: z, t9 ]2 |: V: P
  66.                 // When overlay doesn't have alpha, showing it hides the underlying game screen9 P9 ?5 m1 M( N1 R, a; ^6 n0 b
  67.                 // We force a copy of the game screen to the overlay by clearing it: R5 c# I+ h9 [
  68.                 // We then draw the smallest possible surface to minimize black rectangle behind text# X2 s% n- O4 ^# p7 Y
  69.                 g_system->clearOverlay();( T" P+ t0 T" b. ^
  70.                 g_system->copyRectToOverlay((byte *)_surface->getPixels() + _drawRect.top * _surface->pitch + _drawRect.left * _surface->format.bytesPerPixel, _surface->pitch,
    & ~& h8 N/ v3 D" U
  71.                                 _realBBox.left + _drawRect.left, _realBBox.top + _drawRect.top, _drawRect.width(), _drawRect.height());
    2 W0 r; ?" m+ R1 ~4 F) F
  72.         }  A9 n0 Q' M2 v0 t
  73. 9 n. I2 S6 ]3 G6 ^/ P, ^1 \
  74.         return true;9 `, ^1 Z7 r8 H: [
  75. }) M; c; }' C4 D
复制代码

/ g4 E. m; I9 F" d
& E. W8 q/ Q: R8 G1 L. ?
( t  A6 v- F- Q% V
0 ]$ o. }6 Y6 Z0 `/ U" c) f- w7 g1 g/ A" `: k# p: N  W
# d# n; G8 ?% b

1 @) O( H  l+ g) U
分享到:  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日,是全球华人共同的冒险解谜类游戏家园。我们致力于提供各类冒险游戏资讯供大家学习交流。本站所有资源均不用于商业用途。

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