From 6f37a8a7c34fbbfa62df139bfc904288e319d140 Mon Sep 17 00:00:00 2001 From: Pixel Date: Fri, 26 Oct 2012 09:06:13 -0700 Subject: And still more script types. --- VP-miscwork.lua | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'VP-miscwork.lua') 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 -- cgit v1.2.3