From d8321af9f135590e303ea6d5f08253f432eaa726 Mon Sep 17 00:00:00 2001 From: Pixel Date: Fri, 26 Oct 2012 09:33:27 -0700 Subject: Small tweaks for yet another kind of script. --- VP-map.lua | 2 ++ VP-roomwork.lua | 9 +++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/VP-map.lua b/VP-map.lua index 795e2e7..334f7c7 100644 --- a/VP-map.lua +++ b/VP-map.lua @@ -96,6 +96,8 @@ VP_map = { [2294] = { dir = "MISC/SCRIPT", ext = "script", ftype = "cscript", }, + [4734] = { dir = "MISC/SCRIPT", ext = "sarc", ftype = "arcroom", }, + -- -- Videos -- diff --git a/VP-roomwork.lua b/VP-roomwork.lua index b4724f4..6aacfcf 100644 --- a/VP-roomwork.lua +++ b/VP-roomwork.lua @@ -191,12 +191,17 @@ function process_arcroom(fname, h, size, ext) return ret end elseif dump_mode and ext == "sarc" and index[i].ftype == 4 then - if script then error "Can't have two scripts in these..." end handler = function(fname, h, size, ext) if counter == 1 then + if script then error "Can't have two scripts in these..." end log("Taking text...") script = Buffer(true) script:copyfrom(h) + elseif counter == 2 then + if font then error "Can't have two fonts in these..." end + log("Taking font...") + font = Buffer(true) + font:copyfrom(h) else error("Too many files") end @@ -221,7 +226,7 @@ function process_arcroom(fname, h, size, ext) end outfile[i] = process_single_file(fname .. string.format("/%04i-%08X", i, index[i].ftype), h, index[i].size, "room", handler) if handler and script and font then - if dump_mode and counter == 3 then + if dump_mode and ext == "room" then extract_room_script(fname .. string.format("/%04i", i), script, font) elseif dump_mode then extract_simple_script(fname .. string.format("/%04i", i), script, font) -- cgit v1.2.3