#!/usr/bin/env ruby

require 'textgen'

images = {
    "m_horsen" => "horizontal",
    "m_versen" => "vertical",
    "m_compat" => "Doom Compatibility",
    "m_generl" => "General",
    "m_setup"  => "Setup",
    "m_keybnd" => "Key Bindings",
    "m_auto"   => "Automap",
    "m_chat"   => "Chat Strings",
    "m_enem"   => "Enemies",
    "m_stat"   => "Status Bar/HUD",
    "m_weap"   => "Weapons",
    "m_mess"   => "Messages",
    "m_feat"   => "Features",
    "m_multi"  => "Multiplayer",
    "m_about"  => "About",
    "m_demos"  => "Demos",
    "m_wad"    => "Load WAD",
    "m_sound"  => "Sound options",
    "m_video"  => "Video options",
    "m_mouse"  => "Mouse options",
    "m_hud"    => "Heads up display",
    "m_enem"   => "Enemies",
}

Dir.mkdir("prboom-imgs")
Dir.mkdir("prboom-imgs/graphics")

images.each_pair do |lumpname, text|
    image = gen_text(text)
    image.write("prboom-imgs/graphics/#{lumpname}.gif")
end

File.open("prboom-imgs/wadinfo.txt", "w") do |file|
    file.puts "[graphics]"

    images.each_key do |lumpname|
        file.puts lumpname
    end
end


