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

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

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

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

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

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

本帖最后由 shane007 于 2023-8-12 13:57 编辑
* r$ i( T$ U# o# O$ I, z: e4 o& `9 S$ u# E- ?8 W; `
这个游戏原本是没有字幕的,但是在Scummvm论坛上发现了一个帖子,7 I( ^5 \. e6 Y8 Z
讨论的内容是关于在原本没有字幕的游戏上加上字幕。(最初的缘由,是为了帮助一位失聪的朋友), B* f( T4 ]: n- _4 r
https://forums.scummvm.org/viewtopic.php?t=7168& {  @1 N7 }% D+ ~
[Scummvm-devel] Displaying subtitles in voice-only games (narkive.com)& o0 ^6 L* j: o) q4 T
% h. V  `0 f+ ^6 a) ~& B! c
前段时间第七访客出了25周年纪念版(The 7th Guest 25th Anniversary Edition。
+ u" x0 C0 [0 g  V在这个版本中,游戏的视频是有字幕的,因此把这个视频的字幕用到Scummvm中就成为了可能。
1 b" @  l7 e8 d, s! Y* ^% f" Q* t- _- V# m% H, m( k/ H0 W
我查看了一下最新版本的Scummvm的代码,发现老外已经加入了一部分代码。
+ v$ R1 C9 e9 C. z9 W5 S2 u在此基础上,汉化是大有希望的。此种汉化方法,也是前所未有的,如果真的实现了将会有重要意义。
/ m6 E2 ~! m, J8 L$ e* j% \# _
* q1 p+ Z% k/ R* U( p类似游戏还有
  1. · Groovie/ y" w: q+ R$ `8 i: O
  2. - The 7th Guest- k* }8 T6 `! N9 s1 `3 \
  3. - The 11th Hour
    + y, _7 w0 A! ~0 D8 w$ N. |

  4. . g3 K3 t* T4 k. g/ {0 U
  5. · MADE
    5 _$ S7 H8 r/ X7 a1 G
  6. - Return to Zork (descriptions are text only, while spoken dialogs lack3 g0 x. z9 K" W7 V# B) Q8 |
  7. any text)) k( O6 R: k( G  `# e
  8. 2 \/ D# ^7 Z; x. N8 S
  9. · SCI 1: o! i5 w; a0 R3 L2 p% h
  10. - King's Quest V (CD Version). In this case, just enabling voice and text0 I* ~& f2 `& L7 G
  11. simultanously would allow a 3rd party to create a set of MSG files
    ; k1 Q' [$ S* ^0 j4 ]* O9 k
  12. containing the voice transcription/translation, as it happened with Gabriel
    2 Q. Q  O* m5 }
  13. Knight II.+ C* M1 g8 H" U$ }. d6 E; z

  14. ! V: V. d  U" W2 ?4 {

  15. 4 v9 M( Z2 c, ~6 a; U+ F3 I3 H
  16. Future engines:! O6 [, G( b+ z5 k6 n$ I: O4 ^
  17. 5 r( J- u9 D* Q2 x3 z/ K9 n
  18. · SCI 213 q$ E8 d* p+ w8 h4 o
  19. - Gabriel Knight II: The Beast Within (Already a fan patch available in
    & B$ Y5 X- r- |3 V) ]% H& H
  20. order to enable the text display feature)5 j8 r8 N) G/ _. n7 s5 j
  21. - Phantasmagoria
    ' ?( Q' D3 h/ \, l* e
  22. - Rama
    ( P1 J+ `) e# b( q/ f! i
  23. - Shivers
    " Z0 Z: N  Z$ l
  24. - Phantasmagoria II: A Puzzle Of Flesh
    ' k! h/ o% w& Y2 K  |, `
  25. ( E6 X% M/ o1 U' a: \
  26. · SCI 3. w! q3 [8 k! q5 z+ z1 I* F
  27. - Lighthouse: The Dark Being  q) O( b5 B+ V/ d, v% k5 c
  28. 1 s( T8 h) s) i8 }1 N9 D8 [4 \
  29. · M4/MADS
    " q: y4 E  \+ O
  30. - Orion Burger. [& |7 t" [. h+ k3 E

  31. . k8 n8 u% v7 W
  32. · Mohawk
    ) S  R" }/ S% G! J0 W2 e0 G
  33. - Myst/ C. V; N8 m3 e) W8 `1 U
  34. - Riven: The Sequel to Myst
复制代码

6 Y* q$ I* z6 C) V1 `# L6 R& G. D
( l2 x: F' N: G* ?4 A" [8 V3 a. W5 T% n& |, B4 B* l' ?

* `: V9 |6 A: h( g8 b4 Q6 i# f相关代码如下
- C" [6 K& ^( B% ], c7 f/ e
  1. bool VideoPlayer::playFrame() {
    ) A% a% O( P* x$ `# V: v# _) j; R
  2.         bool end = true;( Q$ o2 Q" `' `
  3. ) B; y, P& t7 v/ k& ~$ U5 G: x
  4.         // Process the next frame while the file is open
    : Y7 ^9 j5 u: n1 ~3 N
  5.         if (_file) {
    / g) H( `' O+ Y( @* [
  6.                 end = playFrameInternal();
    * b' W& `, ]  b. X9 u3 _

  7. 5 I6 D0 b& [, e- r; |! n
  8.                 _subtitles.drawSubtitle(_lastFrameTime - _startTime);# J2 D7 w6 l1 f
  9.         }
复制代码
  1. bool Subtitles::drawSubtitle(uint32 timestamp, bool force) {6 z2 l& b7 q' _
  2.         Common::String subtitle;
    ' p' n  z1 L: J/ p; U
  3.         if (_loaded) {
    - ]( o9 g+ x' `' _8 P; M
  4.                 subtitle = _srtParser.getSubtitle(timestamp);
    $ F+ X# J% e; \/ h, y
  5.         } else if (_subtitleDev) {/ T2 b5 V( Q1 p. z0 R
  6.                 subtitle = _fname;# @9 H9 D( h0 ^3 h' A
  7.                 uint32 hours, mins, secs, msecs;' i& v( S: |: B1 k. E" f' q
  8.                 secs = timestamp / 1000;
    ' X  z- T7 v/ ~0 t
  9.                 hours = secs / 3600;
    % F, J& a9 c9 m4 E5 a# Y
  10.                 mins = (secs / 60) % 60;" q1 I- E/ W! Y) L1 \
  11.                 secs %= 60;! f- ~, p  G' x7 P
  12.                 msecs = timestamp % 1000;
    ! @8 o' }+ P  O- t- y  q  a( R
  13.                 subtitle += " " + Common::String::format("%02u:%02u:%02u,%03u", hours, mins, secs, msecs);
    - a$ Y# g& ?) v6 M# h5 N0 e+ @0 o
  14.         } else {0 a" S/ X$ n/ Y2 I# ^' w: r7 a
  15.                 return false;% [2 ?1 z, N$ p( r
  16.         }
    , ^! f" D: v8 l! x( ?% U. s8 i# @

  17. 5 }8 W+ C7 y3 [! K$ s. w' R
  18.         int16 width = g_system->getOverlayWidth(),
    & T9 h5 w! s/ n3 g  C1 h
  19.                   height = g_system->getOverlayHeight();
    , E1 @" m% b9 w" K* q& v
  20. " c2 {0 [+ o3 J: S! ?8 E" m5 Y
  21.         if (width != _lastOverlayWidth ||* g& W6 h! q) a! _2 s. A$ c$ t* \
  22.                 height != _lastOverlayHeight) {! Y* Q4 k; q" a$ _
  23.                 _lastOverlayWidth = width;
    9 X9 k  C5 n7 n7 d/ o
  24.                 _lastOverlayHeight = height;
    . q4 _3 C' v0 B' s* G+ d
  25. ) L4 U" ], s$ N* V+ b; H) J" W' J
  26.                 // Recalculate the real bounding box to use9 z; L5 V/ q8 r/ G% q
  27.                 _realBBox = _requestedBBox;& C0 t* K4 S$ T# e/ n& V. c) m* ~
  28. + z! I0 x3 M( K  X2 M7 a9 _6 b3 S
  29.                 if (_realBBox.bottom > height) {7 {9 I  L+ |8 h* B$ x- ^
  30.                         // First try to move the bounding box
    ; Z/ t+ l  k& I7 i0 ~; `
  31.                         _realBBox.top -= _realBBox.bottom - height;. T* I/ K. K! P4 A0 f3 ?6 d* P8 {
  32.                         _realBBox.bottom = height;
    . U1 T7 z5 f# G/ H
  33.                 }
    " D  q4 t7 ?. B( B, k9 s. Z
  34.                 if (_realBBox.top < 0) {4 K0 X0 {6 y% |/ g0 g
  35.                         // Not enough space; I& U5 f, o8 ]: Q! f2 Y+ E: h& K
  36.                         _realBBox.top = 0;
    * V2 [0 R6 e, X2 t$ h4 k
  37.                 }
    2 O) S8 v* \. h( [) _  r$ k" z
  38. ' r/ X+ E7 }$ Q
  39.                 if (_realBBox.right > width) {2 K* L: c; M* v; D
  40.                         // First try to move the bounding box0 I+ T; r! f9 P
  41.                         _realBBox.left -= _realBBox.right - width;% D; s" p& Y; @$ I9 F  H% h
  42.                         _realBBox.right = width;1 }. G! J) W, [
  43.                 }) X7 I. a! a% x
  44.                 if (_realBBox.left < 0) {
    - g$ ]) `% x/ P# G+ w3 {! l  h7 @
  45.                         // Not enough space
    . e5 W. ~, B, h3 w# D
  46.                         _realBBox.left = 0;
    5 c. ]* }) H/ x1 S% T
  47.                 }
    : y, g! ^, F) o/ z" c

  48. / U, [: L) z/ f1 [
  49.                 force = true;
      Z- H% w3 Y/ e
  50.         }
    9 S; V5 V4 o/ p& R
  51. 0 B  B5 y1 s- O
  52.         if (!force && _overlayHasAlpha && subtitle == _subtitle)
    ) x/ f# j4 n1 I  l
  53.                 return false;
    4 w/ n. ^, ]" ]2 O5 a

  54. : v6 o7 j' O! Q$ ^
  55.         if (force || subtitle != _subtitle) {
    0 {. I. w, F- d+ c
  56.                 debug(1, "%d: %s", timestamp, subtitle.c_str());2 y5 v2 ^9 r4 m( k& E. ~

  57. / ^! j5 Q: z7 {/ J) u. g
  58.                 _subtitle = subtitle;
    # v8 M8 n6 R4 _! W0 T7 {4 f
  59.                 renderSubtitle();2 W6 ]$ E. z* }9 r0 e$ G9 v+ M( t
  60.         }
    & r' x$ F$ o; r: k) x' K; D
  61. 8 T  D4 a, F6 t
  62.         if (_overlayHasAlpha) {
    ( u: d9 A- V+ n( B: @; k& E4 K
  63.                 // When we have alpha, draw the whole surface without thinking it more2 d' V' a' p, m: c+ _/ A* t
  64.                 g_system->copyRectToOverlay(_surface->getPixels(), _surface->pitch, _realBBox.left, _realBBox.top, _realBBox.width(), _realBBox.height());7 p/ H' _) ^' x0 P, ]5 ]- Q
  65.         } else {
    / e$ c& R3 D' ~# e
  66.                 // When overlay doesn't have alpha, showing it hides the underlying game screen
    4 T$ ]& _( d. ^. P2 W
  67.                 // We force a copy of the game screen to the overlay by clearing it, K  {5 k! |2 m' `" \
  68.                 // We then draw the smallest possible surface to minimize black rectangle behind text
    $ g" O) f) q+ Z9 V9 Y$ w
  69.                 g_system->clearOverlay();+ u: w4 U5 _3 s6 y2 _& i
  70.                 g_system->copyRectToOverlay((byte *)_surface->getPixels() + _drawRect.top * _surface->pitch + _drawRect.left * _surface->format.bytesPerPixel, _surface->pitch,
    4 c' v! y: p: K& S7 e: Y3 f' ~
  71.                                 _realBBox.left + _drawRect.left, _realBBox.top + _drawRect.top, _drawRect.width(), _drawRect.height());' k4 q5 x) _9 V+ S
  72.         }
    " B. ]4 [; {. A1 Q4 e

  73. : Y% d2 v; L  g9 \" @% W2 s& n' U
  74.         return true;+ x0 x- A, f+ t, ?
  75. }
    5 z& `) w9 S5 r- I
复制代码

. {# S% U1 m( r& B. \! C: ^
" J5 F( {4 M( ?
/ F1 p/ n6 f) d' ~7 f* d- b( d* U% ]9 @7 a9 y" B3 y

9 U. s9 u6 i8 y# p) Q1 B% o& r
) \# f3 s6 f- H" [, K- i7 u0 K: l+ @. N; v3 O9 U& e
分享到:  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日,是全球华人共同的冒险解谜类游戏家园。我们致力于提供各类冒险游戏资讯供大家学习交流。本站所有资源均不用于商业用途。

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