summaryrefslogtreecommitdiff
path: root/VP-roomwork.lua
diff options
context:
space:
mode:
authorPixel <pixel@nobis-crew.org>2012-10-26 09:33:27 -0700
committerPixel <pixel@nobis-crew.org>2012-10-26 09:33:27 -0700
commitd8321af9f135590e303ea6d5f08253f432eaa726 (patch)
tree081e57104236fcbd77c84201a3612f87e346980c /VP-roomwork.lua
parent6f37a8a7c34fbbfa62df139bfc904288e319d140 (diff)
Small tweaks for yet another kind of script.
Diffstat (limited to 'VP-roomwork.lua')
-rw-r--r--VP-roomwork.lua9
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)