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

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

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

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

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

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

本帖最后由 shane007 于 2023-8-12 13:57 编辑 & c9 a. Y5 \! l# ?8 H! D3 x' u
( e, i3 o3 I2 q* O" m, A
这个游戏原本是没有字幕的,但是在Scummvm论坛上发现了一个帖子,
% G/ |- U9 |8 j讨论的内容是关于在原本没有字幕的游戏上加上字幕。(最初的缘由,是为了帮助一位失聪的朋友)
( ?& V9 y' ?9 L! L% Rhttps://forums.scummvm.org/viewtopic.php?t=7168
- Z; e8 `% k5 {2 O/ z6 e- u3 V[Scummvm-devel] Displaying subtitles in voice-only games (narkive.com)
5 i! Z* ]3 N$ ?* v4 Y. q$ s
  b4 n. z" d. W4 v1 }4 D6 e前段时间第七访客出了25周年纪念版(The 7th Guest 25th Anniversary Edition。
  y. x/ S5 ~9 Y0 R9 G8 C' m9 ?在这个版本中,游戏的视频是有字幕的,因此把这个视频的字幕用到Scummvm中就成为了可能。9 b; O/ S1 e, [  j4 @# ^5 M
* @2 m' e& g& ?
我查看了一下最新版本的Scummvm的代码,发现老外已经加入了一部分代码。/ ^& V/ K( O9 D2 s- u3 I* O
在此基础上,汉化是大有希望的。此种汉化方法,也是前所未有的,如果真的实现了将会有重要意义。
% e! m8 w0 u5 l7 c7 p* Y* i: ~  S) d: A2 K2 S
类似游戏还有
  1. · Groovie
    - Y) _% n% w0 V( {# ?; Z- c
  2. - The 7th Guest
    # B/ B) x1 L6 g; S3 x, d1 P
  3. - The 11th Hour
    $ [5 v+ T# v, ]7 A

  4. % A4 p* h# t6 u/ ^) y- O
  5. · MADE
    6 p! d1 b$ E+ E( ~7 U9 X2 b, G; i
  6. - Return to Zork (descriptions are text only, while spoken dialogs lack% M) V  H. J. `( q0 y: f
  7. any text)1 P  _' _$ L5 B7 A4 h; m
  8. 2 }% P$ K' C7 G2 z* a2 V  ~
  9. · SCI 1- P) P! p8 g7 \/ w# z
  10. - King's Quest V (CD Version). In this case, just enabling voice and text6 a3 e6 _- H/ g  c
  11. simultanously would allow a 3rd party to create a set of MSG files
    ( @* w8 R6 L* [: x6 O7 o
  12. containing the voice transcription/translation, as it happened with Gabriel
    1 A. C5 w- L( e
  13. Knight II.
    " U7 o& Z8 z) _4 z! X' J* e: l# K
  14. 3 S; N8 N" M3 ^$ @& L$ `; i; E) Q, C
  15.   S2 c! h$ P) i5 m2 Z; X
  16. Future engines:
    ; W! I* Z2 n4 i; O4 e
  17. # E% i$ _* K0 _1 i( k
  18. · SCI 21" d9 s  F  J9 m& }# J; _" {6 r( R
  19. - Gabriel Knight II: The Beast Within (Already a fan patch available in2 v8 Z2 E1 \) i) R$ t4 f! G
  20. order to enable the text display feature); t+ U9 @4 _! b4 A; O3 {
  21. - Phantasmagoria
    3 U# P( O2 R' F4 Z, ~, x
  22. - Rama/ a& B% Y4 t, A! c4 ]6 N5 J2 }; S
  23. - Shivers
    ( L# z9 H7 {+ P- K8 W) \' }: O
  24. - Phantasmagoria II: A Puzzle Of Flesh8 B7 p& P' j' _( c0 t% p
  25. " j3 u! Y5 g) h  n2 |1 \
  26. · SCI 33 m2 K7 h9 G0 N2 _, j) m3 U) e
  27. - Lighthouse: The Dark Being9 d% T7 L' X9 l6 I9 n& _
  28. / D' Z& A5 c4 ^$ K* a
  29. · M4/MADS
    7 b! i7 j* r2 t  u# ~- \4 x5 p
  30. - Orion Burger
    * m/ R5 b5 l+ o8 E0 v0 y! }

  31. 5 R2 `  Q$ ~1 [
  32. · Mohawk
    . i: e7 A7 b4 y0 ?+ m3 E8 w
  33. - Myst
    2 z3 T0 t5 g/ \2 v
  34. - Riven: The Sequel to Myst
复制代码
  z4 c" u3 m5 `2 [; s/ x
& j4 f' q, i8 v/ o. i" F) U* z1 ^
8 ^+ r( y: M1 s8 _% @" I

2 o# H" Z' y* a% o3 U* ~3 i相关代码如下
9 j: T% I  J2 a
  1. bool VideoPlayer::playFrame() {
    2 Y% Y) H" r+ e+ \) Z* z. t
  2.         bool end = true;" z# N5 I/ _+ Z3 W9 z9 F

  3. # M3 G3 U8 s0 V7 D% Z7 L( x5 V
  4.         // Process the next frame while the file is open0 {# D3 l' V; o, K  u
  5.         if (_file) {) P6 _) ^! b4 O) M3 Q) t
  6.                 end = playFrameInternal();
    , l* B& E2 c$ S, w6 X( p
  7. 6 _6 U! f( U  s' ]" j
  8.                 _subtitles.drawSubtitle(_lastFrameTime - _startTime);
    ' c8 U$ @$ @% O
  9.         }
复制代码
  1. bool Subtitles::drawSubtitle(uint32 timestamp, bool force) {
    / c+ x6 B; s9 j3 t
  2.         Common::String subtitle;" ^# l2 A9 q: F2 w
  3.         if (_loaded) {5 ?: M$ F1 b. p6 R! I
  4.                 subtitle = _srtParser.getSubtitle(timestamp);/ I; M: b9 X$ Q+ X0 S: |
  5.         } else if (_subtitleDev) {$ }% B; [- `" m3 S4 V4 u6 i
  6.                 subtitle = _fname;- V4 T& z$ d# X1 k: r0 Z% E  t
  7.                 uint32 hours, mins, secs, msecs;
    3 I7 p3 p  L' x
  8.                 secs = timestamp / 1000;
    , r. ]* D( h% V+ i9 Y2 H$ Y
  9.                 hours = secs / 3600;7 K3 ?1 E; A+ k! c$ A5 M0 J* N
  10.                 mins = (secs / 60) % 60;4 L5 ~/ j4 j; F8 T' n5 o5 b
  11.                 secs %= 60;
    ; O4 a8 \2 p9 t$ h% G
  12.                 msecs = timestamp % 1000;
    2 z. Q, D- s( U
  13.                 subtitle += " " + Common::String::format("%02u:%02u:%02u,%03u", hours, mins, secs, msecs);6 \. N$ i" i1 V" ^* r2 T
  14.         } else {
    % m, ~& ~! g# a+ D. M. I2 L5 F
  15.                 return false;' p8 {( f, b, f& Q% L
  16.         }
    4 P* D9 O% f9 g9 l+ |. [0 n
  17. 8 f9 k8 b6 `: t( m4 Y* `
  18.         int16 width = g_system->getOverlayWidth(),
    6 G1 `2 O) ]# w5 B! J2 q! K
  19.                   height = g_system->getOverlayHeight();% N. r7 C7 M9 H; z# [+ D
  20. " l# ^) {8 I2 m8 C0 @% T* M
  21.         if (width != _lastOverlayWidth ||8 {) |9 ~' x* P( ^6 g  w% n% \1 a
  22.                 height != _lastOverlayHeight) {
    0 M7 B5 [+ y# i8 ~1 Q
  23.                 _lastOverlayWidth = width;
    6 t  p3 L9 S+ g7 l  w9 {  h
  24.                 _lastOverlayHeight = height;
    % r& B* x; J( m9 i
  25. / z% J  k% e9 w6 Z5 G$ o4 x- }
  26.                 // Recalculate the real bounding box to use7 B4 H7 E* Z% E# z
  27.                 _realBBox = _requestedBBox;/ |$ L* o7 F& y8 t/ Q0 [9 L1 ^; j

  28. + I& H* ]9 m! @- S! w7 Q$ t
  29.                 if (_realBBox.bottom > height) {
    : O! u0 }" }; \* }6 p4 y4 h2 y/ S
  30.                         // First try to move the bounding box0 P$ W6 g  `/ k/ ]) P0 l
  31.                         _realBBox.top -= _realBBox.bottom - height;1 D% z! Z2 {, h$ ~2 L) E/ }' j4 a- s4 X
  32.                         _realBBox.bottom = height;
    ! p1 o4 n7 |! K% g8 C
  33.                 }
    # ^8 c' O( `$ P# u
  34.                 if (_realBBox.top < 0) {2 c3 s; J! m+ Z* C: b2 T; ?- ]0 p
  35.                         // Not enough space
    1 n6 m- |$ }, O1 v2 Q4 O
  36.                         _realBBox.top = 0;- ~# [5 C# _; l7 U1 u6 B- _. U
  37.                 }0 ?2 X2 e$ m* K/ O1 B) n
  38. / A) @8 G+ j4 T( ?4 ~
  39.                 if (_realBBox.right > width) {8 g- S/ g0 n/ T* o* |% O. J
  40.                         // First try to move the bounding box- P9 t1 ~5 }6 K7 K# e9 z2 U* v
  41.                         _realBBox.left -= _realBBox.right - width;1 R( E- [( o' i9 Z' z6 D( |
  42.                         _realBBox.right = width;, g+ x- A- L# ^; ~: ]* d0 Z6 H
  43.                 }, \+ W& b% c8 J  r2 Q0 \- ]) I' w
  44.                 if (_realBBox.left < 0) {
    % V& Q  C/ s/ v( ]
  45.                         // Not enough space
    5 A: u( d( A* y1 T# N, S  W2 W- i
  46.                         _realBBox.left = 0;8 O9 ?7 t2 W, s2 e  C) Z/ r
  47.                 }' S+ w( m! }3 Y$ |5 R% V/ Y
  48. ( A* u2 A0 r0 C* Z% Y. b3 X5 y
  49.                 force = true;
    1 `/ g. R! b. C$ r- J4 X- c0 f/ |
  50.         }, h8 M0 K2 I. J
  51. , m8 R3 [: ^$ r! u5 t6 g( j
  52.         if (!force && _overlayHasAlpha && subtitle == _subtitle)" H: f0 Z- w/ S: r& k, p
  53.                 return false;# U! ?8 p. {( d" x6 {; D" P7 S
  54. : ]! w$ h$ i4 o3 ?: \# c* q
  55.         if (force || subtitle != _subtitle) {: k& k  ]2 y% d; n1 ]
  56.                 debug(1, "%d: %s", timestamp, subtitle.c_str());
    3 P  |! l8 W: V$ I8 P* ~8 |! r

  57. + ~$ e/ h  f, H/ Z% f! c7 ^% W
  58.                 _subtitle = subtitle;- S& }# g0 q! D! d6 g) W6 w& p
  59.                 renderSubtitle();
    ! P( C$ Y: W7 p( ]: C$ j6 Y, r
  60.         }" S: p. p) {5 R3 e5 C$ }6 B

  61. 7 E# |4 S6 b  @2 V9 A4 I
  62.         if (_overlayHasAlpha) {
    # m* G4 L$ X" g
  63.                 // When we have alpha, draw the whole surface without thinking it more/ t5 C# E+ a' L; ]3 M
  64.                 g_system->copyRectToOverlay(_surface->getPixels(), _surface->pitch, _realBBox.left, _realBBox.top, _realBBox.width(), _realBBox.height());0 @- i8 r  r/ b5 g7 u$ X* G
  65.         } else {
    ( B6 o( z9 a0 _. z. _' [
  66.                 // When overlay doesn't have alpha, showing it hides the underlying game screen
    $ V  c( a* E* k# G/ |' T
  67.                 // We force a copy of the game screen to the overlay by clearing it5 A  R6 ^! A' h/ a8 E1 {4 |/ L
  68.                 // We then draw the smallest possible surface to minimize black rectangle behind text
    % Q" L+ m) ~( Y( [& t9 z* D! Q
  69.                 g_system->clearOverlay();
    # O# j6 ^2 v( a" ]. o) f7 q
  70.                 g_system->copyRectToOverlay((byte *)_surface->getPixels() + _drawRect.top * _surface->pitch + _drawRect.left * _surface->format.bytesPerPixel, _surface->pitch,, w  h6 x- t# Z0 \* y' I
  71.                                 _realBBox.left + _drawRect.left, _realBBox.top + _drawRect.top, _drawRect.width(), _drawRect.height());
    # L; e7 W- M, K/ K  [
  72.         }  L# V1 F; @) n) d* D
  73. " v' E& \: r$ y" I- r+ M
  74.         return true;5 k  t. o: j( p' m: Y) R1 r
  75. }3 d0 S( R! X6 F: D
复制代码

" a# ~+ `. w" O4 Q
- d$ T- b* N% J1 M5 ~3 C" |, {, D" T6 T$ X6 S0 r

, R4 Y* t# L" }( h/ [% g. d4 d( B5 t. M! L' R: K6 ?1 n# U

; x9 t- D/ m9 \. f7 A9 F
1 ]) d4 D& h, s2 r) k/ @0 Y! 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日,是全球华人共同的冒险解谜类游戏家园。我们致力于提供各类冒险游戏资讯供大家学习交流。本站所有资源均不用于商业用途。

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