summaryrefslogtreecommitdiff
path: root/VP-miscwork.lua
diff options
context:
space:
mode:
Diffstat (limited to 'VP-miscwork.lua')
-rw-r--r--VP-miscwork.lua30
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