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-roomwork.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'VP-roomwork.lua') 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