// script for decompiling konfigs which have name same as level in content\maps folder, e.g. l00_intro.bin, l04_riga.bin

var section1 = reader.ReadSection("loading_screen")
var section2 = section1.ReadSection("loading_label")
section2.ReadVec4("rect")
section2.ReadFP32("size")
section2.ReadVec4i("color")
section2.ReadU8("h_align")
var section3 = section1.ReadSection("press_any_key_label")
section3.ReadVec4("rect")
section3.ReadFP32("size")
section3.ReadVec4i("color")
section3.ReadU8("h_align")
var section4 = reader.ReadSection("loadsave_game_label")
var section5 = section4.ReadSection("loading_label")
section5.ReadVec4("rect")
section5.ReadFP32("size")
section5.ReadVec4i("color")
section5.ReadU8("h_align")
section5.ReadString("text_key")
var section6 = section4.ReadSection("save_complete_label")
section6.ReadVec4("rect")
section6.ReadFP32("size")
section6.ReadVec4i("color")
section6.ReadU8("h_align")
section6.ReadString("text_key")
var section7 = reader.ReadSection("loader_screens")
var section8 = section7.ReadSection("level", false) // really section name must be same as level name
section8.ReadHintStr("sound", "sound")
section8.ReadU32("sound_falloff")
section8.ReadFP32("sound_volume")
var section9 = section8.ReadArray("screens")
for(var i = 0; section9.More(); i++)
{
	var section10 = section9.ReadSection(RecStr("rec_", i, 4), false)
	section10.ReadFP32("time")
	section10.ReadBool("fade_in")
	section10.ReadHintStr("screen", "texture, str_shared")
	section10.ReadU32("sound_delay")
	section10.ReadFP32("sound_volume")
	section10.ReadHintStr("sound", "sound")
	
	var section11 = section10.ReadArray("labels")
	for(var j = 0; section11.More(); j++)
	{
		var section12 = section11.ReadSection(RecStr("rec_", j, 4), false)
		section12.ReadFP32("font_size")
		section12.ReadU32("line_spacing")
		section12.ReadVec4i("color")
		section12.ReadString("text")
		section12.ReadVec4("rect")
		section12.ReadBool("fade_in")
	}
}
var section21 = section8.ReadSection("random_hints")
section21.ReadString("prefix")
section21.ReadU16("count")
section21.ReadVec4i("color")
section21.ReadVec4("wnd_rect")
section21.ReadFP32("size")
section21.ReadU8("h_align")
