本帖最后由 shane007 于 2011-4-29 06:41 编辑
8 n4 R! y+ `6 M0 n/ m3 N& [
! ]3 a% ]6 y( m勤快的老外又放出了这个好东西,配合quickbms使用。
( @* {7 @0 I) i, z8 v好多小游戏都是用Shockwave Director做的,包括神秘视线。
& T1 @% c b" C5 r# E如果能做出打包器的话,就又能解决好多游戏的汉化了。- # Shockwave Director dcr/dir/dxr/cst dumper9 s4 D$ |( R: S/ d/ ]" N1 J
- # script for QuickBMS http://aluigi.org/papers.htm#quickbms
$ F" C/ ?6 s9 _/ n3 x, P; @" b: s
1 H; U* j) l |0 q; `8 [$ l1 Y- quickbmsver 0.4.114 @8 b0 M0 A; ~
- getdstring RIFX_SIGN 4
/ e/ D3 a. \4 `' y4 U" ] - if RIFX_SIGN == "RIFX"
( [0 q: r/ k: ]9 y' S0 ^1 \' g - endian big
2 ~0 H6 k$ K/ f" J2 \2 l* |, h1 F7 a - elif RIFX_SIGN == "XFIR"
+ U C+ A, W; ~5 n8 K - endian little
& n: j0 J0 L2 \6 L7 l6 } - else1 b/ D3 D. h, y9 W o
- cleanexit! |/ p" q9 L. C9 K. T
- endif' B5 f( w# P, j5 {. H$ g
- get SIZE long, w2 \3 o' @" y# `1 L2 g @; p
- get SIGN long# l) h8 ~ @; W7 }, _: q8 f/ |
- if SIGN == 0x4647444d+ H( k" j0 B3 z
- get NAME fullname Z6 k/ b: l7 w7 W
- get FOLDER current_folder {8 H: ^. v4 v
- print "\nyou must use offzip with this file:\nhttp://aluigi.org/mytoolz.htm#offzip\n\n offzip -a \"%NAME%\" \"%FOLDER%\" 0"
) B, b% o% ^' ^( z& c3 {) e - cleanexit4 F; u$ ~# u: k0 @% S( L" a5 W$ @
- endif5 H g7 c& c* s+ z1 ?+ X" Y; H( z
7 @9 s4 i# ]' y1 H( u {- set FIRST = 1
% f8 R* S& G5 B2 |0 P: } - for i = 0$ R% ]+ ~3 y9 j; }9 p+ \0 x( k4 @
- savepos CURR_OFFSET6 i; o% Z8 S% m/ b9 l3 _2 l6 `( I
- getdstring SIGN 4* D, u* E) E5 D* k: b: z" E- y
- if RIFX_SIGN != "RIFX"
0 F2 h1 B( [1 N: \ - string SIGN r= SIGN/ M- H/ C2 i* f* _. ]2 f, t& M9 g0 ^
- endif
2 e9 Q& P0 C& j3 S1 G' v
+ U) U! _( k, i/ a$ T( ~- math SKIP_SIZE = 0x10# U" H9 ]1 ]0 i V' y7 G6 v
- if SIGN == ""* ^3 ^- x" g3 b T6 _' O# ~
- cleanexit' I9 x8 M1 ^( f a9 [
- elif SIGN == "RIFX"
4 O& B6 `+ g9 t$ R) P3 I* \$ y- X - elif SIGN == "imap"; V9 F0 X/ I# V# O+ H
- if FIRST != 0
& I/ B# o; u# N( \! } - get DUMMY long
7 t' g' `( H5 q - get DUMMY long) I6 I% `! T. E: I& {( X
- get OFFSET long% Y. H$ [/ Q7 [+ F+ s) O
- if OFFSET > CURR_OFFSET6 V3 J& b- d; m- {: b- u2 w
- goto OFFSET j- o) [6 L8 t' z9 Z8 [5 t
- math SKIP_SIZE = 0
: ]0 A" g/ ? b+ j' W1 F - endif
b, q/ t. \9 b8 o0 e! P2 @& D. z R - endif& t$ }1 N" `9 g& M1 ]( s
- elif SIGN == "mmap"
; q/ Q+ e) A$ r% @2 V( K2 j - if FIRST != 0
; }- \) o8 F0 Y - math SKIP_SIZE = 0x1c6 M: `5 W1 `( E4 v; l, g
- set FIRST = 07 X. k% E: K. {* j1 H1 z% ?
- endif
/ u; G9 i0 O$ H9 S - # filters start here
: p+ U7 r2 X- U# G) ], o - elif SIGN == "VERS", O9 j2 Q5 N- y3 F/ R- r
- elif SIGN == "CASt"
. P/ v. c- _0 f$ S, O0 `+ `* Q - elif SIGN == "CAS*"
( n; B$ O |: @# C9 O" D3 e - elif SIGN == "Lctx") ?# ^7 v* T2 Q6 a0 h5 T6 r1 L) e
- elif SIGN == "LctX"
( R- }6 v7 t6 e! W* G - elif SIGN == "Lnam"
9 d4 F; y' e8 P6 v) e1 i - elif SIGN == "Lscr"( b' E; b' P2 \$ B. G& E; [: R5 a! u
- elif SIGN == "Cinf"
% x7 N( A1 ?2 C - elif SIGN == "GRID"% N6 {: n( @0 w" c
- elif SIGN == "FCOL"
/ G, B% h3 Z$ X2 L: D u+ [ - elif SIGN == "MCsL"
_2 N: I" R" ?) Q - elif SIGN == "DRCF"- W3 m0 C+ }0 ^# z
- #elif SIGN == "BITD" # 16bit images7 V1 K3 R( ?6 K1 V( P! T
- #elif SIGN == "ALFA" # alpha channel
3 e2 P; m( o/ E$ A2 S - #elif SIGN == "sndS" # 16bit audio# i+ {) d, e( s* t
- elif SIGN == "sndH"! G( M' ?. ?# Z$ L$ Y
- elif SIGN == "Sord"
( E! F& d! V' X - elif SIGN == "free"
) M+ L5 g* D2 J - elif SIGN == "junk"4 i/ U4 o5 d. D
- elif SIGN == "Thum"
' Q6 S* [) W1 p+ C4 g+ x - elif SIGN == "KEY*"
6 s# r' L# h& I6 {- x! P' Y - elif SIGN == "FXmp"
, @2 `8 o0 `! M9 e2 b* N - elif SIGN == "Fmap"4 q8 X( o4 P3 g5 P
- elif SIGN == "PUBL"3 Z* X2 T9 C1 o9 l9 I
- elif SIGN == "SCRF"6 f# T* d/ U( H6 i& {4 i% ^
- elif SIGN == "VWFI"+ M6 e8 j) Z, l# U; v' m0 r* Z# i
- elif SIGN == "VWSC"
5 J# | C' P- E6 M7 k$ ]! X - elif SIGN == "VWLB"6 }, i1 b9 W" D+ v' ? w/ U: c0 {
- elif SIGN == "VWTL"( A; D/ |# q! y* Q1 Q% @
- elif SIGN == "XTRl"
5 K" }/ k% V, m% e - elif SIGN == "ccl "
5 }/ R _0 w: [7 v - elif SIGN == "SCVW"
8 `# j) _9 u+ o - elif SIGN == "Lval"
) }! c3 X( _$ x- N - elif SIGN == "cupt"
B/ f; b K1 N" q$ g6 i8 u - elif SIGN == "CLUT"( g, ]' _+ o+ X5 d
- # filters end here. ]' U G; ^2 j M% z4 s* Y# Z
- else
3 k3 Q' T1 b" ^& @ - # skip the above ones and dump the others9 c& P8 M$ A* t5 r) [$ v0 ?
- math SKIP_SIZE = -10 z2 N* j5 ~0 k( [/ u
- endif
" ?6 u4 w; t0 u. A - - x. s' ^# C0 y3 b
- if SKIP_SIZE < 0, g* g; _2 v6 Q" Y
- get SIZE long
; L* y+ k, ^ k - get OFFSET long
5 o5 j0 R$ a& j6 p ? - if SIZE > 8
4 r' ]; S! j8 E$ v$ J# [4 k - math OFFSET += 8: V$ D! e3 y# [1 ]
- math SIZE -= 8
5 a) \" {& W. |2 I0 | - set NAME string ""/ Q5 k0 j: ^; s# M/ U
- if SIGN == "XMED"- A5 D1 u" m. n2 S3 T4 U
- elif SIGN == "ediM"9 ~2 M3 b4 h. u0 w) @
- else
/ Y8 F' g7 ?* f7 ` - set NAME string SIGN( _" l+ s9 P* ]% U( C* d* M
- string NAME += /1 B, F4 ] E5 z1 k
- string NAME += i, I6 P- V8 e5 Z0 q; C' }
- string NAME += ".dat"6 c7 @ t6 R; s: _/ V
- endif( e5 Q" A) F; S+ s `
- log NAME OFFSET SIZE
, V" U! V0 J5 w! R - endif3 B0 a }; _- \+ B# Y8 e. J* J
- get DUMMY long' J( W/ f2 _+ L/ T* O% @3 N" c
- get DUMMY long
# o6 [, ~4 J2 g# d - else1 E+ v) U$ \: v, d( e
- getdstring DUMMY SKIP_SIZE
1 G7 d& Y- l* C. g$ L - endif1 k0 B6 L s& @( Z* W9 ~3 I
- next i3 z; |- Y2 G; n
复制代码 |