Celestial/map2xml.rb

11 lines
277 B
Ruby
Raw Normal View History

2018-05-20 04:33:10 +00:00
require "./celeste_map_reader"
require 'ruby2d'
# fn = 'app/Content/Maps/1-ForsakenCity.bin'
2018-05-20 04:34:07 +00:00
ARGV.each do |fn|
base = File.basename(fn, ".bin")
2018-05-20 04:34:07 +00:00
a = CelesteMapReader.new(fn)
File.open("#{base}.xml", "wb") { |f| f.write a.root.inspect }
a.write_json("#{base}.json")
2018-05-20 04:34:07 +00:00
end