diff options
author | Pixel <pixel@nobis-crew.org> | 2012-10-26 09:06:13 -0700 |
---|---|---|
committer | Pixel <pixel@nobis-crew.org> | 2012-10-26 09:06:13 -0700 |
commit | 6f37a8a7c34fbbfa62df139bfc904288e319d140 (patch) | |
tree | 2c2c0651e501ae0032210dcd2c8917539efe4cd9 /VP-miscwork.lua | |
parent | d17ccb1258c40fbd6767c4e2c98b6e2462cb8987 (diff) |
And still more script types.
Diffstat (limited to 'VP-miscwork.lua')
-rw-r--r-- | VP-miscwork.lua | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/VP-miscwork.lua b/VP-miscwork.lua index cb111f3..1818b30 100644 --- a/VP-miscwork.lua +++ b/VP-miscwork.lua @@ -100,3 +100,33 @@ function process_arcgfx(fname, h, size, ext) -- return ret end +function process_cscript(fname, h, size, ext) + log("Processing " .. fname .. ".slz") + log("Extracting " .. fname .. " - format 'cscript'") + local counter = 1 + local script + local font + local handler = function(fname, h, size, ext) + if counter == 1 then + log "taking script" + script = Buffer(true) + script:copyfrom(h) + elseif counter == 2 then + log "taking font" + font = Buffer(true) + font:copyfrom(h) + else + error "Too many files" + end + counter = counter + 1 + end + + process_single_file(fname, h, h:getsize(), ext, handler) + + if not script or not font then error "Not enough files" end + if dump_mode then + extract_simple_script(fname, script, font) + end + script:destroy() + font:destroy() +end |