本帖最后由 shane007 于 2011-4-29 06:41 编辑
4 Q* f2 K1 d9 E8 p$ t0 D
! D' G9 t! D! S: E; |! N- ^. n勤快的老外又放出了这个好东西,配合quickbms使用。: r3 r4 U$ r/ k1 a! _' X( |4 b
好多小游戏都是用Shockwave Director做的,包括神秘视线。- d' V3 o% E! E( d
如果能做出打包器的话,就又能解决好多游戏的汉化了。- # Shockwave Director dcr/dir/dxr/cst dumper
* c" L F7 ^+ Z* V- D$ _ - # script for QuickBMS http://aluigi.org/papers.htm#quickbms
0 z0 P7 p" O4 D9 r3 F - . R5 t3 ~/ t7 M1 N0 d8 \
- quickbmsver 0.4.11
4 s( Y) g4 U* Z' W - getdstring RIFX_SIGN 4
# N5 W4 `( ^8 ~' \1 V2 O - if RIFX_SIGN == "RIFX"- K5 K$ d: p( D% d
- endian big4 x) `) _7 A; j M/ n
- elif RIFX_SIGN == "XFIR"9 O4 n9 N5 O1 }5 ?+ y2 t
- endian little
; j9 ^- A0 A, B+ S* | - else
7 V2 s( P8 {! _- K Z3 L0 l. Z, Q' F - cleanexit6 Q9 z `& W0 I; O5 u$ N1 P
- endif
8 f0 w& N* N( n) A& J5 V" } R9 N - get SIZE long% K2 U" e" s8 Q, D6 f+ j7 D
- get SIGN long' _( x+ V. x* x' O# c+ h7 h
- if SIGN == 0x4647444d
" P! S0 ?8 x3 G6 k% D h$ B - get NAME fullname* j2 M2 _+ d& C2 E8 L* V; O
- get FOLDER current_folder
* D! L; Z! Y0 g' P4 O - print "\nyou must use offzip with this file:\nhttp://aluigi.org/mytoolz.htm#offzip\n\n offzip -a \"%NAME%\" \"%FOLDER%\" 0"
, H$ j6 ]. R: R9 b- |- J - cleanexit
5 [& U+ x+ e. W6 J - endif C+ m- q+ v) D7 K
m8 `4 c+ u4 @2 B" x- set FIRST = 17 D5 o/ j! B- \ `
- for i = 0( d% c" k8 i' n1 a" l
- savepos CURR_OFFSET
/ a& j. W% g4 ?/ y, k& `' S - getdstring SIGN 4
( K/ H0 B4 |8 R - if RIFX_SIGN != "RIFX"7 Z ^* C* ~2 J. A9 x& L+ ?
- string SIGN r= SIGN' ` F8 V/ i4 k" a- u
- endif& z5 U, F5 G6 e0 I
- ; o/ j6 d6 `: E: C& V
- math SKIP_SIZE = 0x103 l H3 S- m# e( i5 x2 a
- if SIGN == ""; q; g' S1 m$ C; V
- cleanexit% D$ S# r" Q# b) B1 S% ^
- elif SIGN == "RIFX"% T" p& { Y8 U) X( q
- elif SIGN == "imap"
- S. _; P' D0 w: v% \% \ - if FIRST != 0
# X% ^. t! L+ q: W6 r& O - get DUMMY long+ K3 M8 @& @0 K: j" J0 o2 l
- get DUMMY long5 \* c' N& Q$ ?1 L/ E/ i
- get OFFSET long
5 c9 C4 q, t& i4 I) D$ \ - if OFFSET > CURR_OFFSET
. `+ T& ^, S5 A ?4 A* q: a# ^ - goto OFFSET; ] M1 g. W2 ]1 n$ i
- math SKIP_SIZE = 0
3 `" y* h4 O. |' d9 z; v" U - endif: | g& w4 C4 [" b$ x
- endif0 R# I1 w; d* c
- elif SIGN == "mmap"! ^* p5 s1 ~9 F4 P0 n
- if FIRST != 0
8 Q8 @& Z0 ?2 V, w - math SKIP_SIZE = 0x1c
$ g" R. z: y: G4 b - set FIRST = 0
) s' Z. x8 o) O1 o" g" f - endif% N& J v/ L: j4 ?8 c
- # filters start here
; Q3 z! e: M8 v2 B' f/ S" O - elif SIGN == "VERS"% D0 }2 X c# P; i1 w
- elif SIGN == "CASt"
7 D0 S8 l8 M- \$ `0 o - elif SIGN == "CAS*"
6 Q! K9 {5 X( v, e2 _+ Y$ b - elif SIGN == "Lctx"
- F3 K4 Z- O5 n y- L! d) v - elif SIGN == "LctX"" V9 a, [0 j8 \9 q
- elif SIGN == "Lnam"
+ B! Y* S. T- |4 G - elif SIGN == "Lscr", J+ S0 G) }( P' ^
- elif SIGN == "Cinf"
1 O* o. t1 v$ |8 P* W% I3 J2 ~ - elif SIGN == "GRID"3 N: t" r/ y! p6 M( }+ g
- elif SIGN == "FCOL"
1 Y# {+ C+ O; L6 Q( {$ b3 L6 z1 _ - elif SIGN == "MCsL"' C, S$ h2 h9 C6 f5 h
- elif SIGN == "DRCF"; Q2 g; q u0 Z4 b
- #elif SIGN == "BITD" # 16bit images
; J# g. l8 x/ p/ L - #elif SIGN == "ALFA" # alpha channel3 U- }8 ~0 c0 k5 m
- #elif SIGN == "sndS" # 16bit audio
) \- |; E! L: [& L$ I9 a - elif SIGN == "sndH"8 L% A, X* d5 G+ |; X( C9 Y
- elif SIGN == "Sord"$ C/ b& C2 ^/ k
- elif SIGN == "free"
0 `' {5 m' X f; B& C+ Z - elif SIGN == "junk"
+ h+ E# c$ f3 V7 t% M - elif SIGN == "Thum"; O3 _, n1 x1 I! z1 c
- elif SIGN == "KEY*"
2 \- s- g3 H# o - elif SIGN == "FXmp"7 F" Q( \+ {- s: O* `+ T* m. s
- elif SIGN == "Fmap"
# S7 m' i3 \9 m, U - elif SIGN == "PUBL"
5 }) b2 z# W# j$ n - elif SIGN == "SCRF"7 Z. A9 ^6 b# f6 T N
- elif SIGN == "VWFI"
3 d: D0 F( u5 t" P2 D* n - elif SIGN == "VWSC"
! j6 [" K% w' R$ D2 A - elif SIGN == "VWLB"
: r# n7 ?% l" K7 Q1 r - elif SIGN == "VWTL"
. P0 u" j5 `# F8 `$ O8 U - elif SIGN == "XTRl"# U; z4 C' f* W
- elif SIGN == "ccl "' V# w- w: f C3 ^ l3 Q/ }, Q8 i# S
- elif SIGN == "SCVW"0 ~6 n7 k1 V h9 k ~$ g! z
- elif SIGN == "Lval"
* |/ G) Q5 G/ B& Q5 V - elif SIGN == "cupt"
% n6 D5 i1 v8 D - elif SIGN == "CLUT"9 s: i" f& g, A
- # filters end here! J6 ]& Y& L3 W2 a3 `3 {
- else5 C3 N, [) I5 }4 y7 X
- # skip the above ones and dump the others- e4 ^: ^7 w' E5 e: M
- math SKIP_SIZE = -1& w; E3 Y8 {& }! z; D0 j
- endif, N3 O2 _; X/ b9 T+ H/ I
- 4 x E- R9 F6 M1 d# D
- if SKIP_SIZE < 0+ M! E- M5 F& B8 N; @0 d- u
- get SIZE long
# T& h% b% I7 u! D E) P7 Z5 Q1 ^ - get OFFSET long
* }: p# ?; H4 \ X p - if SIZE > 81 {8 D# e9 m+ s' ~' d- R7 x
- math OFFSET += 81 z- D& S7 X8 t4 T/ M& Q
- math SIZE -= 8 j& ?; P( q! W# L- G5 N6 G
- set NAME string ""
' h& j8 b. k; O+ Q - if SIGN == "XMED"1 C6 X' O1 E; W& x/ ^
- elif SIGN == "ediM", e6 M' U: ^# X# j1 H4 Z
- else
( a8 @; H" R1 u& J r$ H2 ? - set NAME string SIGN
# _# [# {: v d4 X - string NAME += /$ a, d5 n* q. D4 P8 x7 V& X$ V0 {
- string NAME += i; O* @8 i& y* t2 W. w) H# L
- string NAME += ".dat"% u+ }! Q. o9 r9 n0 W/ H
- endif
6 M% I [) f$ k% j6 i) N6 n - log NAME OFFSET SIZE
- H2 m7 ^' F) J& l - endif
2 l# r9 `0 j1 p& a# S; ~+ Q# Z: O - get DUMMY long
6 A8 s" r+ g$ n1 q - get DUMMY long$ p4 G! A+ d% ?' [- }( y8 z: L
- else
* r3 r/ M: p" f1 `+ t, ~ - getdstring DUMMY SKIP_SIZE" U+ w y/ g5 N8 J( ?+ z
- endif
7 K, u; T$ {7 f3 e+ t - next i. K6 ^# g- G. k P' |
复制代码 |