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
	{
		noDecompile = 1;
		indent_1 = 0;
		print_1 = "\n#define _CAMPAIGN	1\n";
		class State
		{
			//--- Class
			print_1 = "class %(statetext): MissionDefault\n{\n";
			indent_1 = 8;
			print_2 = "%(stateinit)\n";

			//--- Successful endings
			iffinal_no = -1;
			class Links
			{
				print_3b = "%(totext) = %(totext);\n";
				print_3c = "%(totext)_1 = %(totext);\n";
				print_3d = "%(totext)_2 = %(totext);\n";
				print_3e = "%(totext)_3 = %(totext);\n";
				print_3f = "%(totext)_4 = %(totext);\n";
				print_3g = "%(totext)_5 = %(totext);\n";
				print_3h = "%(totext)_6 = %(totext);\n";
 				iftofinal_both = 0;
			}

			//--- Links
			print_3 = "links[] = {%qt(statetext)";
			indent_4 = 0;
			class Links_2
			{
				print_1 = ",%qt(totext)";
			};
			print_4 = "};\n";
			indent_5 = 8;

			//--- Final state - no ending
			iffinal_yes = 1;
			print_5 = "links[] = {%qt(statetext),""end1""};\n";
			iffinal_both = 0;

			//--- Required missions
			print_30 = "linkConditions[] = {""""";
			indent_40 = 0;
			class Links_3
			{
				print_1 = ",%qt(condition)";
			};
			print_40 = "};\n";
			indent_50 = 8;

			//--- Fail endings
			print_7 = "lost = %(statetext);\n";
			print_8 = "lost_1 = %(statetext);\n";
			print_9 = "lost_2 = %(statetext);\n";
			print_10 = "lost_3 = %(statetext);\n";
			print_11 = "lost_4 = %(statetext);\n";
			print_12 = "lost_5 = %(statetext);\n";
			print_13 = "lost_6 = %(statetext);\n";

			//--- Paths
			print_14 = "template = %(statetext).%(statePrecondition);\n";
			print_15 = "terrain = %(statePrecondition);\n";
			//print_16 = "overviewPicture = hsim\\missions_f\\data\\overview_%(statetext)_ca.paa;\n";
			//print_17 = "overviewText = $STR_A3_OVERVIEW_%(statetext);\n\n";

			//--- Include description.ext
			print_18 = "#ifndef _DISABLE_DESCRIPTION\n";
			print_19 = "class Description\n";
			print_20 = "{\n";
			indent_60 = 16;
			print_21 = "#include ""Missions\\%(statetext).%(statePrecondition)\\description.ext""\n";
			indent_70 = 8;
			print_22 = "};\n";
			print_23 = "#endif\n";

			indent_3 = 0;
			print_29 = "};\n";
		};
	};
	class PassSystem
	{
		indent = 0;
		noDecompile = 0;
		print_ifdefstart = "#ifdef _EMPTY\n";
		print_comment1 = "//////////////////////////////////////////////////////////////\n";
		print_comment2 = "// FSM System\n";
		print_comment3 = "//////////////////////////////////////////////////////////////\n";
		class State
		{
			print_init = "%(stateinit)\n";
			print_condition = "%(stateprecondition)\n";
			class Links
			{
				print_condition = "//--- Link: %(condition) %(action) %(condPrecondition)\n";
			};
		};
		print_ifdefend = "\n#endif\n";
	};
};

class Decompile
{
	process = 1;	 //0 for not processing Decompile info
	FSMLeft	= "/*";
	FSMRight = "*/";
	class FSMPrefix
	{
		default = "";
		fsmFunctionDeclaration = "";
		fsmFunctionPrefix = "";
		fsmFunctionSufix = "";
		setFinal = "";
		stateprecondition = "";
		condprecondition = "";
		globalprefix = "";
		link = "";
	};
	class FSMPrefix2
	{
		default = "";
		head = "*/";
		condition = "";
		condprecondition = "";
		action = "";
		fsmFunctionDeclaration = "";
		fsmFunctionPrefix = "";
		fsmFunctionSufix = "";
		setFinal = "";
		stateinit = "";
		stateprecondition = "";
		globalprefix = "";
	};
	class FSMSufix
	{
		default = "";
		compile = "";
		state = "";
		head = "/*";
		link = "";
		condition = "";
		condprecondition = "";
		action = "";
		fsmFunctionDeclaration = "";
		fsmFunctionPrefix = "";
		fsmFunctionSufix = "";
		setFinal = "";
		stateinit = "";
		stateprecondition = "";
		globalprefix = "";
	};
	class FSMSufix2
	{
		default = "";
		compile = "";
		state = "";
		head = "";
		link = "";
		fsmFunctionDeclaration = "";
		fsmFunctionPrefix = "";
		fsmFunctionSufix = "";
		setFinal = "";
		condprecondition = "";
		stateprecondition = "";
		globalprefix = "";
	};
};