minChars = 128;
class Compile
{
	clearNewLines = 0;
//	indenting = -1;	//no indenting
	rewriteFile = 1; //append result to the proper place in the file, do not rewrite it

	class Pass_1
	{
		class State_1
		{
			print_state1 = "%(fsmname)_%(statename) = {\n";
			indent1 = 4;
			print_state2 = "_id = %qt(statetext) call {\n";
			indent2 = 0;
			print_state3 = "%(stateinit)";
			indent3 = 4;
			print_state4 = "\n};\n";
			print_state5 = "if (isnil ""_id"") then {_id = 0};\n";
			print_state6 = "if (typename _id != typename 0) then {_id = 0};\n";
			print_state7 = "[%qt(statetext),_id,0%(statePrecondition)] spawn bis_fnc_briefingAnimate;\n";

			class Links_1
			{
				print_link0 = "time spawn {\n";
			
				indent1 = 8;
				print_link1 = "_time = _this + %(linktext);\n[_this,_time,%qt(totext)] call bis_fnc_log;\n";
				print_link2 = "_condition = if (%qt(condition) == """") then {true} else {%(condition)};\n";
				print_link3 = "waituntil {_condition && time > _time};\n";
				print_link4 = "[] call %(fsmname)_%(to);\n";
				indent2 = 4;
				print_link5 = "};\n";
			};

			indent4 = 0;
			print_state8 = "};\n";
		};
	};

	class Pass_2
	{
		print_pass1 = "\n//--- Execute\n";
		class State_1
		{
			//--- Start immediately (move to another pass)
			ifstart_on = 1;
				print_state1 = "%qt(statetext) call bis_fnc_briefinginit;\n";
				print_state2 = "[] spawn %(fsmname)_%(statename);\n\n";
			ifstart_off = 0;
		};
	};
};

class Decompile
{
	process = 1;	 //0 for not processing Decompile info
	FSMLeft	= "/*";
	FSMRight = "*/";
	class FSMPrefix
	{
		default = "";
	};
	class FSMPrefix2
	{
		default = "";
		head = "*/";
	};
	class FSMSufix
	{
		default = "";
		compile = "\n";
		state = "\n";
		head = "\n/*\n";
		link = "";
	};
	class FSMSufix2
	{
		default = "";
		compile = "";
		state = "\n";
		head = "\n";
		link = "\n";
	};
};