冒险解谜游戏中文网 ChinaAVG

标题: Shockwave Director dcr/dir/dxr/cst dumper [打印本页]

作者: shane007    时间: 2011-4-29 06:39
标题: Shockwave Director dcr/dir/dxr/cst dumper
本帖最后由 shane007 于 2011-4-29 06:41 编辑 0 Q+ {* I' Z% f, x
$ M0 s: S# _+ X
勤快的老外又放出了这个好东西,配合quickbms使用。, y6 d, N  {" B1 G/ A( G
好多小游戏都是用Shockwave Director做的,包括神秘视线。
' n) d6 A6 Z0 n8 k! w如果能做出打包器的话,就又能解决好多游戏的汉化了。
  1. # Shockwave Director dcr/dir/dxr/cst dumper
    * ^9 }( A4 A) ^5 @- \  {
  2. # script for QuickBMS http://aluigi.org/papers.htm#quickbms
    / o6 _" `* f, h

  3. * t3 l; Z6 U- Y) F! X
  4. quickbmsver 0.4.11. h4 R( k& A3 j$ k7 `6 |
  5. getdstring RIFX_SIGN 44 r- v/ @1 w+ _
  6. if RIFX_SIGN == "RIFX"& s4 T* r; l- X% d: v4 k) N
  7.     endian big
    5 J/ j5 V$ B6 s- _( }5 D: [
  8. elif RIFX_SIGN == "XFIR"1 k; u" _; [" K4 Y1 J" ]$ ]
  9.     endian little
    / W5 D9 ~! e6 w! h. u; ^/ I. G
  10. else/ H: d9 E& b1 \0 t
  11.     cleanexit! a  m* J: [5 u
  12. endif
    , I% v( V, p& U  X2 K: x
  13. get SIZE long' l8 |# C9 t2 ^5 H6 `
  14. get SIGN long
    $ B  @$ `3 U: ?1 h3 X
  15. if SIGN == 0x4647444d! d$ b1 O0 S* ^& r! U  O
  16.     get NAME fullname5 q# W$ j, V( W' A5 t0 v! m# Y
  17.     get FOLDER current_folder  ?1 Y% V) g& L" \; B( h
  18.     print "\nyou must use offzip with this file:\nhttp://aluigi.org/mytoolz.htm#offzip\n\n  offzip -a \"%NAME%\" \"%FOLDER%\" 0"4 k6 ^' q& N+ d0 V  S
  19.     cleanexit
    ( ?: [9 H- C# T! N
  20. endif
    - d+ K* ^' E5 H" {( O" A, I6 u

  21. 0 x$ A) ~( N9 ?( d
  22. set FIRST = 1
    & U4 L* F9 v7 r5 f6 h" K7 h
  23. for i = 04 P! L: g  y5 i6 Y
  24.     savepos CURR_OFFSET& d/ ~0 s9 y9 y( B! w
  25.     getdstring SIGN 4
    ) @. k, c- O& Z: W$ |( O2 ?
  26.     if RIFX_SIGN != "RIFX"6 v# A! |0 x6 W: X2 D
  27.         string SIGN r= SIGN
    + G0 k/ c% b( w. u6 {4 ]# I0 h" G$ _
  28.     endif
    : x2 I, L) Z, Y6 u8 ~) P5 ]

  29. 7 T) N5 C& i, C
  30.     math SKIP_SIZE = 0x10
    / e" l# t. f7 @4 h* g, T* Z
  31.     if SIGN == ""
    : V7 z( s  t. d- w9 \% D1 ^8 X9 F
  32.         cleanexit8 u8 p  Z3 ?. V
  33.     elif SIGN == "RIFX": B6 O9 h. M2 J, L6 T, J/ w
  34.     elif SIGN == "imap"/ G' g+ J" C9 I
  35.         if FIRST != 0! R& a1 V* D; H% Z, B
  36.             get DUMMY long- a( l$ p) v# i- `
  37.             get DUMMY long; V. ]7 i$ s8 q( V% V* d! ]' l1 r" k
  38.             get OFFSET long& r. G& b* a7 i  J5 y. y& C: E
  39.             if OFFSET > CURR_OFFSET# K: T/ `7 y5 B3 Z9 O
  40.                 goto OFFSET  X9 V. F. p, U! {2 |
  41.                 math SKIP_SIZE = 0
    : e; b6 @  y+ p+ |, j8 N! J$ A
  42.             endif  y' ?7 i' _' Y
  43.         endif. t/ K4 X# A5 C4 H: n" ^- ^3 s
  44.     elif SIGN == "mmap"
    . \" a6 f4 d1 ~
  45.         if FIRST != 03 P" k0 j. T) `* M
  46.             math SKIP_SIZE = 0x1c4 E5 k8 f) [# G4 c' \
  47.             set FIRST = 07 o$ G9 N$ h6 B& C7 p
  48.         endif$ Y: V" d8 M7 q
  49.     # filters start here: g( d. X) i5 w' M  ?. ]$ e( c
  50.     elif SIGN == "VERS"  w% B1 z- Q1 B8 c+ e
  51.     elif SIGN == "CASt"* x1 ?. e1 r  T* [  n
  52.     elif SIGN == "CAS*"
    ! l  d! s% |, J: o, |: c: n
  53.     elif SIGN == "Lctx"
    / |2 i0 c5 G2 Q3 H2 G
  54.     elif SIGN == "LctX"9 _9 g' v+ I/ A9 y6 z5 |
  55.     elif SIGN == "Lnam"
    2 Q% t/ J  x$ R& \; F- S8 F  r, w
  56.     elif SIGN == "Lscr", t! m4 x9 d3 r& N7 c/ t5 N% ]
  57.     elif SIGN == "Cinf"
    & H) B. `# `% M  A' B
  58.     elif SIGN == "GRID"
    # V, G: P. g" b2 T  p
  59.     elif SIGN == "FCOL"
    * I9 a) c8 T* a/ ?" P( l8 [
  60.     elif SIGN == "MCsL"
    , A, a; V* m! I3 O: Z6 p8 G$ Q
  61.     elif SIGN == "DRCF"/ B" A6 N& S% S- {) y' `3 z
  62.     #elif SIGN == "BITD"    # 16bit images3 i  H3 j9 Z; o
  63.     #elif SIGN == "ALFA"    # alpha channel
    4 p( i# j( {& m$ B7 }# w9 t
  64.     #elif SIGN == "sndS"    # 16bit audio1 v; p  V: a  L( e
  65.     elif SIGN == "sndH"
    $ ^+ O/ M- L% @7 W, T! S7 D* z# I
  66.     elif SIGN == "Sord") C- f! u/ E2 Q6 j! q6 ]1 p
  67.     elif SIGN == "free"& \% n6 k7 d3 T# ~4 t& E
  68.     elif SIGN == "junk"
    ' q) |) a9 E6 m! z+ P
  69.     elif SIGN == "Thum"
    3 M& v1 u: f6 p$ T9 i6 n; u: F
  70.     elif SIGN == "KEY*"1 t" t0 M& ?( z- R
  71.     elif SIGN == "FXmp"
    9 L( c( i, A! r) h
  72.     elif SIGN == "Fmap"8 P. u" T: o3 B+ j
  73.     elif SIGN == "PUBL". Y3 M& I" M( r# G7 O3 v
  74.     elif SIGN == "SCRF"# q- ~9 {) R# S9 z+ W+ M
  75.     elif SIGN == "VWFI"" Z$ ^& O* t  }. o! Z4 \1 n
  76.     elif SIGN == "VWSC"
    " B/ [$ M! K) z* \' s
  77.     elif SIGN == "VWLB"
    : z# d: N7 J9 f1 J# o* ]
  78.     elif SIGN == "VWTL"
    7 n6 j) o& f1 S5 Q
  79.     elif SIGN == "XTRl"* d  ~( r7 Y: X, Q1 K! p8 I5 c
  80.     elif SIGN == "ccl "
    ( I! I2 `% `  V+ o0 Y
  81.     elif SIGN == "SCVW"
    3 J( q) t) X1 U* A
  82.     elif SIGN == "Lval"
    ! X6 C" ?  \9 u* F+ I4 H# n$ L( ]* X
  83.     elif SIGN == "cupt"
    3 G% m4 K( w9 ?& J2 D# ?# K
  84.     elif SIGN == "CLUT"* a* g5 M5 T% W. M3 w
  85.     # filters end here6 t  `# |1 X' Z
  86.     else- C0 Q# j' y% O& F$ G( V- Y3 {
  87.         # skip the above ones and dump the others) P# e% K" l- v- P
  88.         math SKIP_SIZE = -18 x. f! ]3 K% b+ C# }0 _2 h
  89.     endif8 {, g+ J1 F; _& _  s6 J& ~
  90. " j( b5 y5 x+ ^( x- L- j2 m& O
  91.     if SKIP_SIZE < 0
    $ ]2 q% `  V# D6 v
  92.         get SIZE long1 h/ m7 F# H8 x* v) v
  93.         get OFFSET long
      S3 c1 |2 ~; ]
  94.         if SIZE > 8& [( M( s% K9 ]6 o' i% L
  95.             math OFFSET += 8, ]3 e" K5 I) k2 |; ]; A6 Z
  96.             math SIZE   -= 8# q. Q2 H0 t* L0 U9 C- a4 t! ?
  97.             set NAME string ""
    % \7 m9 {5 L: P$ W* C
  98.             if SIGN == "XMED"
    ; \8 e. C  `2 Q: q" J  o
  99.             elif SIGN == "ediM"
    0 ~& w5 Y( n! m1 ]! h* m9 j
  100.             else
    ' v6 S0 P! y- I& i' A" ]! L- [
  101.                 set NAME string SIGN$ m1 d5 J5 d5 `6 d' {. u
  102.                 string NAME += /
    : R4 ^, M, F3 w2 m. v" D6 }* t; l
  103.                 string NAME += i
    / f1 ^0 y( x& k- p5 A
  104.                 string NAME += ".dat"
    2 M  X! U2 J* w; _5 U
  105.             endif
    ( ?& x# N+ X# }1 k' m
  106.             log NAME OFFSET SIZE
    3 M1 i! N& R- j
  107.         endif6 R5 @0 L. ~8 T8 g& C& i
  108.         get DUMMY long4 x- C; f2 x, T. D+ }# B
  109.         get DUMMY long1 a, W! e" I* [
  110.     else9 E8 p! G- R) @- G( I0 B) ~
  111.         getdstring DUMMY SKIP_SIZE
    " c7 F" A$ G' R* h" }3 {
  112.     endif
    % t; b3 Y( h) L2 s/ w( V
  113. next i4 N  R* V/ F6 n+ N2 g
复制代码
[attach]21042[/attach]




欢迎光临 冒险解谜游戏中文网 ChinaAVG (https://chinaavg.com/) Powered by Discuz! X3.2