diff options
Diffstat (limited to 'VP-roomwork.lua')
-rw-r--r-- | VP-roomwork.lua | 9 |
1 files changed, 7 insertions, 2 deletions
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) |