########################################################################
#
# Battletech gauge configuration script
# 2-18-97 sgm
#
########################################################################
#
# modeMasks:  These values are very closely associated with the
#             mode mask values defined in MECHSUB.HPP.
#
########################################################################

cameraInit
{
	#--------------------------------------
	# Mission review port configuration
	#--------------------------------------
	configure(
		0,
		sec,
		0,
		0x00FF,
		native,rgb,mrpal.pcc
	);
	port = sec;
	#--------------------------------------
	# Mission review gauges
	#--------------------------------------
  offset=(  0,240); PlayerStatus(D,ModeAlwaysActive,1,helv15.pcc,0,11,3,1);
  offset=(160,240); PlayerStatus(E,ModeAlwaysActive,2,helv15.pcc,0,11,3,1);
  offset=(320,240); PlayerStatus(F,ModeAlwaysActive,3,helv15.pcc,0,11,3,1);
  offset=(480,240); PlayerStatus(G,ModeAlwaysActive,4,helv15.pcc,0,11,3,1);
  offset=(  0,  0); PlayerStatus(D,ModeAlwaysActive,5,helv15.pcc,0,11,3,1);
  offset=(160,  0); PlayerStatus(E,ModeAlwaysActive,6,helv15.pcc,0,11,3,1);
  offset=(320,  0); PlayerStatus(F,ModeAlwaysActive,7,helv15.pcc,0,11,3,1);
  offset=(480,  0); PlayerStatus(G,ModeAlwaysActive,8,helv15.pcc,0,11,3,1);
}

########################################################################
# Vehicles
########################################################################

#=======================================================================
# Black Jack
#=======================================================================
BlkjackInit
{
	#--------------------------------------
	# Normal initialization
	#--------------------------------------
	MechInit;
	#--------------------------------------
	# Heat screen mech image
	#--------------------------------------
	port = Heat;
	offset = (150,140);
	bgBitMap(
		ModeAlwaysActive,
		jakht.pcc,
		0,
		255,
		0
	);
	#--------------------------------------
	# Auxiliary gauges
	#--------------------------------------
	vehicleSubSystems(
		qjak0.pcc,
		qjak1.pcc,
		qjak2.pcc,
		qjak3.pcc,
		qjak4.pcc,
		qjak5.pcc,
		qjak6.pcc,
		qjak7.pcc
	);
	#--------------------------------------
	# Secondary
	#--------------------------------------
	offset = (0,0);
	Secondary1;

	port = sec;
	#--------------------------------------
	# Armor damage color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryDamage,
		jakdama.pcc,
		1       #opaque
	);
	colorMapArmor;

	# front
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		60,
		adpal.pcc,adpal2.pcc,
		dz_dtorso,dz_hip,dz_ltorso,dz_utorso,
		unused,unused,unused,unused
	);

	#left
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		61,
		adpal.pcc,adpal2.pcc,
		dz_luleg,dz_ldleg,dz_lfoot,dz_hip,dz_ltorso,
		unused,unused,unused
	);

	#right
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		62,
		adpal.pcc,adpal2.pcc,
		dz_ruleg,dz_rdleg,dz_rfoot,dz_hip,dz_rtorso,
		unused,unused,unused
	);

	#back
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		63,
		adpal.pcc,adpal2.pcc,
		dz_reardtorso,dz_rearrtorso,dz_hip,dz_rearltorso,dz_rearutorso,
		unused,unused,unused
	);

	#--------------------------------------
	# Critical damage color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryCritical,
		jakcrit.pcc,
		1       #opaque
	);

	#         color palette 'a  '   palette 'b'     subsystem
	#            -- --------------- --------------- ------------
cmCrit(H,ModeSecondaryCritical,32,adpal.pcc,adpal2.pcc,GeneratorA);
cmCrit(I,ModeSecondaryCritical,33,adpal.pcc,adpal2.pcc,GeneratorB);
cmCrit(J,ModeSecondaryCritical,34,adpal.pcc,adpal2.pcc,GeneratorC);
cmCrit(K,ModeSecondaryCritical,35,adpal.pcc,adpal2.pcc,GeneratorD);
cmCrit(L,ModeSecondaryCritical,36,adpal.pcc,adpal2.pcc,Condenser1);
cmCrit(M,ModeSecondaryCritical,37,adpal.pcc,adpal2.pcc,Condenser2);
cmCrit(N,ModeSecondaryCritical,38,adpal.pcc,adpal2.pcc,Condenser3);
cmCrit(O,ModeSecondaryCritical,39,adpal.pcc,adpal2.pcc,Condenser4);
cmCrit(H,ModeSecondaryCritical,40,adpal.pcc,adpal2.pcc,Condenser5);
cmCrit(I,ModeSecondaryCritical,41,adpal.pcc,adpal2.pcc,Condenser6);
cmCrit(K,ModeSecondaryCritical,42,adpal.pcc,adpal2.pcc,HUD);
cmCrit(L,ModeSecondaryCritical,43,adpal.pcc,adpal2.pcc,Avionics);
cmCrit(M,ModeSecondaryCritical,44,adpal.pcc,adpal2.pcc,Gyroscope);
cmCrit(N,ModeSecondaryCritical,45,adpal.pcc,adpal2.pcc,Torso);
cmCrit(O,ModeSecondaryCritical,46,adpal.pcc,adpal2.pcc,GAUSS_1);
cmCrit(H,ModeSecondaryCritical,47,adpal.pcc,adpal2.pcc,GAUSS_2);
cmCrit(I,ModeSecondaryCritical,48,adpal.pcc,adpal2.pcc,ERSLaser_1);
cmCrit(J,ModeSecondaryCritical,49,adpal.pcc,adpal2.pcc,ERSLaser_2);
cmCrit(K,ModeSecondaryCritical,50,adpal.pcc,adpal2.pcc,ERSLaser_3);
cmCrit(L,ModeSecondaryCritical,51,adpal.pcc,adpal2.pcc,ERSLaser_4);
cmCrit(M,ModeSecondaryCritical,52,adpal.pcc,adpal2.pcc,NRK15_1);
cmCrit(N,ModeSecondaryCritical,53,adpal.pcc,adpal2.pcc,NRK15_2);
cmCrit(O,ModeSecondaryCritical,54,adpal.pcc,adpal2.pcc,AmmoBinGAUSS_1);
cmCrit(H,ModeSecondaryCritical,55,adpal.pcc,adpal2.pcc,AmmoBinGAUSS_2);
cmCrit(I,ModeSecondaryCritical,56,adpal.pcc,adpal2.pcc,AmmoBinNRK15_1);
cmCrit(J,ModeSecondaryCritical,57,adpal.pcc,adpal2.pcc,AmmoBinNRK15_2);
cmCrit(K,ModeSecondaryCritical,58,adpal.pcc,adpal2.pcc,Myomers);
	#--------------------------------------
	# Heat level color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryHeat,
		jakheat.pcc,
		1       #opaque
	);

	#         color palette 'a  '   palette 'b'     subsystem
	#            -- --------------- --------------- ------------
cmHeat(H,ModeSecondaryHeat,32,heatpal.pcc,heatpal2.pcc,GeneratorA);
cmHeat(I,ModeSecondaryHeat,33,heatpal.pcc,heatpal2.pcc,GeneratorB);
cmHeat(J,ModeSecondaryHeat,34,heatpal.pcc,heatpal2.pcc,GeneratorC);
cmHeat(K,ModeSecondaryHeat,35,heatpal.pcc,heatpal2.pcc,GeneratorD);
cmHeat(L,ModeSecondaryHeat,36,heatpal.pcc,heatpal2.pcc,Condenser1);
cmHeat(M,ModeSecondaryHeat,37,heatpal.pcc,heatpal2.pcc,Condenser2);
cmHeat(N,ModeSecondaryHeat,38,heatpal.pcc,heatpal2.pcc,Condenser3);
cmHeat(O,ModeSecondaryHeat,39,heatpal.pcc,heatpal2.pcc,Condenser4);
cmHeat(H,ModeSecondaryHeat,40,heatpal.pcc,heatpal2.pcc,Condenser5);
cmHeat(I,ModeSecondaryHeat,41,heatpal.pcc,heatpal2.pcc,Condenser6);
cmHeat(K,ModeSecondaryHeat,42,heatpal.pcc,heatpal2.pcc,HUD);
cmHeat(L,ModeSecondaryHeat,43,heatpal.pcc,heatpal2.pcc,Avionics);
cmHeat(M,ModeSecondaryHeat,44,heatpal.pcc,heatpal2.pcc,Gyroscope);
cmHeat(N,ModeSecondaryHeat,45,heatpal.pcc,heatpal2.pcc,Torso);
cmHeat(O,ModeSecondaryHeat,46,heatpal.pcc,heatpal2.pcc,GAUSS_1);
cmHeat(H,ModeSecondaryHeat,47,heatpal.pcc,heatpal2.pcc,GAUSS_2);
cmHeat(I,ModeSecondaryHeat,48,heatpal.pcc,heatpal2.pcc,ERSLaser_1);
cmHeat(J,ModeSecondaryHeat,49,heatpal.pcc,heatpal2.pcc,ERSLaser_2);
cmHeat(K,ModeSecondaryHeat,50,heatpal.pcc,heatpal2.pcc,ERSLaser_3);
cmHeat(L,ModeSecondaryHeat,51,heatpal.pcc,heatpal2.pcc,ERSLaser_4);
cmHeat(M,ModeSecondaryHeat,52,heatpal.pcc,heatpal2.pcc,NRK15_1);
cmHeat(N,ModeSecondaryHeat,53,heatpal.pcc,heatpal2.pcc,NRK15_2);
cmHeat(O,ModeSecondaryHeat,54,heatpal.pcc,heatpal2.pcc,AmmoBinGAUSS_1);
cmHeat(H,ModeSecondaryHeat,55,heatpal.pcc,heatpal2.pcc,AmmoBinGAUSS_2);
cmHeat(I,ModeSecondaryHeat,56,heatpal.pcc,heatpal2.pcc,AmmoBinNRK15_1);
cmHeat(J,ModeSecondaryHeat,57,heatpal.pcc,heatpal2.pcc,AmmoBinNRK15_2);
cmHeat(K,ModeSecondaryHeat,58,heatpal.pcc,heatpal2.pcc,Myomers);

	#
	# We only have room for 28 critical systems (palette allocation)
	# Therefore, the following systems are ignored:

#       cmHeat(P1,????,heatpal.pcc,heatpal2.pcc,HUD);
#       cmHeat(P1,????,heatpal.pcc,heatpal2.pcc,Reservoir);
}

#=======================================================================
# Firestarter
#=======================================================================
FirstrtrInit
{
	#--------------------------------------
	# Normal initialization
	#--------------------------------------
	MechInit;
	#--------------------------------------
	# Heat screen mech image
	#--------------------------------------
	port = Heat;
	offset = (150,140);
	bgBitMap(
		ModeAlwaysActive,
		firht.pcc,
		0,
		255,
		0
	);
	#--------------------------------------
	# Auxiliary gauges
	#--------------------------------------
	vehicleSubSystems(
		qfir0.pcc,
		qfir1.pcc,
		qfir2.pcc,
		qfir3.pcc,
		qfir4.pcc,
		qfir5.pcc,
		qfir6.pcc,
		qfir7.pcc
	);
	#--------------------------------------
	# Secondary
	#--------------------------------------
	offset = (0,0);
	Secondary1;

	port = sec;
	#--------------------------------------
	# Armor damage color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryDamage,
		firdama.pcc,
		1       #opaque
	);
	colorMapArmor;

	# front
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		60,
		adpal.pcc,adpal2.pcc,
		dz_dtorso,dz_hip,dz_ftorso,dz_utorso,
		unused,unused,unused,unused
	);

	#left
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		61,
		adpal.pcc,adpal2.pcc,
		dz_luleg,dz_ldleg,dz_lfoot,dz_hip,dz_ltorso,
		unused,unused,unused
	);

	#right
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		62,
		adpal.pcc,adpal2.pcc,
		dz_ruleg,dz_rdleg,dz_rfoot,dz_hip,dz_rtorso,
		unused,unused,unused
	);

	#back
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		63,
		adpal.pcc,adpal2.pcc,
		dz_reardtorso,dz_rearrtorso,dz_hip,dz_rearltorso,dz_rearutorso,
		dz_btorso,unused,unused
	);

	#--------------------------------------
	# Critical damage color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryCritical,
		fircrit.pcc,
		1       #opaque
	);

	#         color palette 'a  '   palette 'b'     subsystem
	#            -- --------------- --------------- ------------
cmCrit(H,ModeSecondaryCritical,32,adpal.pcc,adpal2.pcc,GeneratorA);
cmCrit(I,ModeSecondaryCritical,33,adpal.pcc,adpal2.pcc,GeneratorB);
cmCrit(J,ModeSecondaryCritical,34,adpal.pcc,adpal2.pcc,GeneratorC);
cmCrit(K,ModeSecondaryCritical,35,adpal.pcc,adpal2.pcc,GeneratorD);
cmCrit(L,ModeSecondaryCritical,36,adpal.pcc,adpal2.pcc,Condenser1);
cmCrit(M,ModeSecondaryCritical,37,adpal.pcc,adpal2.pcc,Condenser2);
cmCrit(N,ModeSecondaryCritical,38,adpal.pcc,adpal2.pcc,Condenser3);
cmCrit(O,ModeSecondaryCritical,39,adpal.pcc,adpal2.pcc,Condenser4);
cmCrit(H,ModeSecondaryCritical,40,adpal.pcc,adpal2.pcc,Condenser5);
cmCrit(I,ModeSecondaryCritical,41,adpal.pcc,adpal2.pcc,Condenser6);
cmCrit(K,ModeSecondaryCritical,42,adpal.pcc,adpal2.pcc,HUD);
cmCrit(L,ModeSecondaryCritical,43,adpal.pcc,adpal2.pcc,Avionics);
cmCrit(M,ModeSecondaryCritical,44,adpal.pcc,adpal2.pcc,Gyroscope);
cmCrit(N,ModeSecondaryCritical,45,adpal.pcc,adpal2.pcc,Torso);
cmCrit(O,ModeSecondaryCritical,46,adpal.pcc,adpal2.pcc,STRK4);
cmCrit(H,ModeSecondaryCritical,47,adpal.pcc,adpal2.pcc,LLaser);
cmCrit(I,ModeSecondaryCritical,48,adpal.pcc,adpal2.pcc,ERMLaser_1);
cmCrit(J,ModeSecondaryCritical,49,adpal.pcc,adpal2.pcc,ERMLaser_2);
cmCrit(K,ModeSecondaryCritical,50,adpal.pcc,adpal2.pcc,ERSLaser_1);
cmCrit(L,ModeSecondaryCritical,51,adpal.pcc,adpal2.pcc,ERSLaser_2);
cmCrit(M,ModeSecondaryCritical,52,adpal.pcc,adpal2.pcc,AmmoBinSTRK4);
cmCrit(K,ModeSecondaryCritical,58,adpal.pcc,adpal2.pcc,Myomers);
	#--------------------------------------
	# Heat level color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryHeat,
		firheat.pcc,
		1       #opaque
	);

	#         color palette 'a  '   palette 'b'     subsystem
	#            -- --------------- --------------- ------------
cmHeat(H,ModeSecondaryHeat,32,heatpal.pcc,heatpal2.pcc,GeneratorA);
cmHeat(I,ModeSecondaryHeat,33,heatpal.pcc,heatpal2.pcc,GeneratorB);
cmHeat(J,ModeSecondaryHeat,34,heatpal.pcc,heatpal2.pcc,GeneratorC);
cmHeat(K,ModeSecondaryHeat,35,heatpal.pcc,heatpal2.pcc,GeneratorD);
cmHeat(L,ModeSecondaryHeat,36,heatpal.pcc,heatpal2.pcc,Condenser1);
cmHeat(M,ModeSecondaryHeat,37,heatpal.pcc,heatpal2.pcc,Condenser2);
cmHeat(N,ModeSecondaryHeat,38,heatpal.pcc,heatpal2.pcc,Condenser3);
cmHeat(O,ModeSecondaryHeat,39,heatpal.pcc,heatpal2.pcc,Condenser4);
cmHeat(H,ModeSecondaryHeat,40,heatpal.pcc,heatpal2.pcc,Condenser5);
cmHeat(I,ModeSecondaryHeat,41,heatpal.pcc,heatpal2.pcc,Condenser6);
cmHeat(K,ModeSecondaryHeat,42,heatpal.pcc,heatpal2.pcc,HUD);
cmHeat(L,ModeSecondaryHeat,43,heatpal.pcc,heatpal2.pcc,Avionics);
cmHeat(M,ModeSecondaryHeat,44,heatpal.pcc,heatpal2.pcc,Gyroscope);
cmHeat(N,ModeSecondaryHeat,45,heatpal.pcc,heatpal2.pcc,Torso);
cmHeat(O,ModeSecondaryHeat,46,heatpal.pcc,heatpal2.pcc,STRK4);
cmHeat(H,ModeSecondaryHeat,47,heatpal.pcc,heatpal2.pcc,LLaser);
cmHeat(I,ModeSecondaryHeat,48,heatpal.pcc,heatpal2.pcc,ERMLaser_1);
cmHeat(J,ModeSecondaryHeat,49,heatpal.pcc,heatpal2.pcc,ERMLaser_2);
cmHeat(K,ModeSecondaryHeat,50,heatpal.pcc,heatpal2.pcc,ERSLaser_1);
cmHeat(L,ModeSecondaryHeat,51,heatpal.pcc,heatpal2.pcc,ERSLaser_1);
cmHeat(M,ModeSecondaryHeat,52,heatpal.pcc,heatpal2.pcc,AmmoBinSTRK4);
cmHeat(K,ModeSecondaryHeat,58,heatpal.pcc,heatpal2.pcc,Myomers);

	#
	# We only have room for 28 critical systems (palette allocation)
	# Therefore, the following systems are ignored:

#       cmHeat(P1,????,heatpal.pcc,heatpal2.pcc,HUD);
#       cmHeat(P1,????,heatpal.pcc,heatpal2.pcc,Reservoir);
}

#=======================================================================
# Strider
#=======================================================================
StriderInit
{
	#--------------------------------------
	# Normal initialization
	#--------------------------------------
	MechInit;
	#--------------------------------------
	# Heat screen mech image
	#--------------------------------------
	port = Heat;
	offset = (150,140);
	bgBitMap(
		ModeAlwaysActive,
		stiht.pcc,
		0,
		255,
		0
	);
	#--------------------------------------
	# Auxiliary gauges
	#--------------------------------------
	vehicleSubSystems(
		qsti0.pcc,
		qsti1.pcc,
		qsti2.pcc,
		qsti3.pcc,
		qsti4.pcc,
		qsti5.pcc,
		qsti6.pcc,
		qsti7.pcc
	);
	#--------------------------------------
	# Secondary
	#--------------------------------------
	offset = (0,0);
	Secondary1;

	port = sec;
	#--------------------------------------
	# Armor damage color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryDamage,
		stidama.pcc,
		1       #opaque
	);

	colorMapArmor;

	# front
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		60,
		adpal.pcc,adpal2.pcc,
		dz_dtorso,dz_ftorso,dz_hip,dz_ltorso,dz_utorso,
		unused,unused,unused
	);

	#left
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		61,
		adpal.pcc,adpal2.pcc,
		dz_luleg,dz_ldleg,dz_lfoot,dz_hip,dz_ltorso,
		unused,unused,unused
	);

	#right
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		62,
		adpal.pcc,adpal2.pcc,
		dz_ruleg,dz_rdleg,dz_rfoot,dz_hip,dz_rtorso,
		unused,unused,unused
	);

	#back
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		63,
		adpal.pcc,adpal2.pcc,
		dz_reardtorso,dz_rearrtorso,dz_hip,dz_rearltorso,dz_rearutorso,
		unused,unused,unused
	);

	#--------------------------------------
	# Critical damage color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryCritical,
		sticrit.pcc,
		1       #opaque
	);

	#         color palette 'a  '   palette 'b'     subsystem
	#            -- --------------- --------------- ------------
cmCrit(H,ModeSecondaryCritical,32,adpal.pcc,adpal2.pcc,GeneratorA);
cmCrit(I,ModeSecondaryCritical,33,adpal.pcc,adpal2.pcc,GeneratorB);
cmCrit(J,ModeSecondaryCritical,34,adpal.pcc,adpal2.pcc,GeneratorC);
cmCrit(K,ModeSecondaryCritical,35,adpal.pcc,adpal2.pcc,GeneratorD);
cmCrit(L,ModeSecondaryCritical,36,adpal.pcc,adpal2.pcc,Condenser1);
cmCrit(M,ModeSecondaryCritical,37,adpal.pcc,adpal2.pcc,Condenser2);
cmCrit(N,ModeSecondaryCritical,38,adpal.pcc,adpal2.pcc,Condenser3);
cmCrit(O,ModeSecondaryCritical,39,adpal.pcc,adpal2.pcc,Condenser4);
cmCrit(H,ModeSecondaryCritical,40,adpal.pcc,adpal2.pcc,Condenser5);
cmCrit(I,ModeSecondaryCritical,41,adpal.pcc,adpal2.pcc,Condenser6);
cmCrit(K,ModeSecondaryCritical,42,adpal.pcc,adpal2.pcc,HUD);
cmCrit(L,ModeSecondaryCritical,43,adpal.pcc,adpal2.pcc,Avionics);
cmCrit(M,ModeSecondaryCritical,44,adpal.pcc,adpal2.pcc,Gyroscope);
cmCrit(N,ModeSecondaryCritical,45,adpal.pcc,adpal2.pcc,Torso);
cmCrit(O,ModeSecondaryCritical,46,adpal.pcc,adpal2.pcc,LRM5_1);
cmCrit(H,ModeSecondaryCritical,47,adpal.pcc,adpal2.pcc,LRM5_2);
cmCrit(I,ModeSecondaryCritical,48,adpal.pcc,adpal2.pcc,LRM5_3);
cmCrit(J,ModeSecondaryCritical,49,adpal.pcc,adpal2.pcc,MLaser_1);
cmCrit(K,ModeSecondaryCritical,50,adpal.pcc,adpal2.pcc,MLaser_2);
cmCrit(L,ModeSecondaryCritical,51,adpal.pcc,adpal2.pcc,SLaser_1);
cmCrit(M,ModeSecondaryCritical,52,adpal.pcc,adpal2.pcc,SLaser_2);
cmCrit(N,ModeSecondaryCritical,55,adpal.pcc,adpal2.pcc,AmmoBinLRM5_1);
cmCrit(O,ModeSecondaryCritical,56,adpal.pcc,adpal2.pcc,AmmoBinLRM5_2);
cmCrit(H,ModeSecondaryCritical,57,adpal.pcc,adpal2.pcc,AmmoBinLRM5_3);
cmCrit(I,ModeSecondaryCritical,58,adpal.pcc,adpal2.pcc,Myomers);

	#--------------------------------------
	# Heat level color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryHeat,
		stiheat.pcc,
		1       #opaque
	);

	#         color palette 'a  '   palette 'b'     subsystem
	#            -- --------------- --------------- ------------
cmHeat(H,ModeSecondaryHeat,32,heatpal.pcc,heatpal2.pcc,GeneratorA);
cmHeat(I,ModeSecondaryHeat,33,heatpal.pcc,heatpal2.pcc,GeneratorB);
cmHeat(J,ModeSecondaryHeat,34,heatpal.pcc,heatpal2.pcc,GeneratorC);
cmHeat(K,ModeSecondaryHeat,35,heatpal.pcc,heatpal2.pcc,GeneratorD);
cmHeat(L,ModeSecondaryHeat,36,heatpal.pcc,heatpal2.pcc,Condenser1);
cmHeat(M,ModeSecondaryHeat,37,heatpal.pcc,heatpal2.pcc,Condenser2);
cmHeat(N,ModeSecondaryHeat,38,heatpal.pcc,heatpal2.pcc,Condenser3);
cmHeat(O,ModeSecondaryHeat,39,heatpal.pcc,heatpal2.pcc,Condenser4);
cmHeat(H,ModeSecondaryHeat,40,heatpal.pcc,heatpal2.pcc,Condenser5);
cmHeat(I,ModeSecondaryHeat,41,heatpal.pcc,heatpal2.pcc,Condenser6);
cmHeat(K,ModeSecondaryHeat,42,heatpal.pcc,heatpal2.pcc,HUD);
cmHeat(L,ModeSecondaryHeat,43,heatpal.pcc,heatpal2.pcc,Avionics);
cmHeat(M,ModeSecondaryHeat,44,heatpal.pcc,heatpal2.pcc,Gyroscope);
cmHeat(N,ModeSecondaryHeat,45,heatpal.pcc,heatpal2.pcc,Torso);
cmHeat(O,ModeSecondaryHeat,46,heatpal.pcc,heatpal2.pcc,LRM5_1);
cmHeat(H,ModeSecondaryHeat,47,heatpal.pcc,heatpal2.pcc,LRM5_2);
cmHeat(I,ModeSecondaryHeat,48,heatpal.pcc,heatpal2.pcc,LRM5_3);
cmHeat(J,ModeSecondaryHeat,49,heatpal.pcc,heatpal2.pcc,MLaser_1);
cmHeat(K,ModeSecondaryHeat,50,heatpal.pcc,heatpal2.pcc,MLaser_2);
cmHeat(L,ModeSecondaryHeat,51,heatpal.pcc,heatpal2.pcc,SLaser_1);
cmHeat(M,ModeSecondaryHeat,52,heatpal.pcc,heatpal2.pcc,SLaser_2);
cmHeat(N,ModeSecondaryHeat,55,heatpal.pcc,heatpal2.pcc,AmmoBinLRM5_1);
cmHeat(N,ModeSecondaryHeat,56,heatpal.pcc,heatpal2.pcc,AmmoBinLRM5_2);
cmHeat(N,ModeSecondaryHeat,57,heatpal.pcc,heatpal2.pcc,AmmoBinLRM5_3);
cmHeat(I,ModeSecondaryHeat,58,heatpal.pcc,heatpal2.pcc,Myomers);
}

#=======================================================================
# Raptor
#=======================================================================
RaptorInit
{
	#--------------------------------------
	# Normal initialization
	#--------------------------------------
	MechInit;
	#--------------------------------------
	# Heat screen mech image
	#--------------------------------------
	port = Heat;
	offset = (150,140);
	bgBitMap(
		ModeAlwaysActive,
		rapht.pcc,
		0,
		255,
		0
	);
	#--------------------------------------
	# Auxiliary gauges
	#--------------------------------------
	vehicleSubSystems(
		qrap0.pcc,
		qrap1.pcc,
		qrap2.pcc,
		qrap3.pcc,
		qrap4.pcc,
		qrap5.pcc,
		qrap6.pcc,
		qrap7.pcc
	);
	#--------------------------------------
	# Secondary
	#--------------------------------------
	offset = (0,0);
	Secondary1;

	port = sec;
	#--------------------------------------
	# Armor damage color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryDamage,
		rapdama.pcc,
		1       #opaque
	);

	colorMapArmor;

	# front
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		60,
		adpal.pcc,adpal2.pcc,
		dz_dtorso,dz_ftorso,dz_hip,dz_ltorso,dz_utorso,
		unused,unused,unused
	);

	#left
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		61,
		adpal.pcc,adpal2.pcc,
		dz_luleg,dz_ldleg,dz_lfoot,dz_hip,dz_ltorso,
		unused,unused,unused
	);

	#right
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		62,
		adpal.pcc,adpal2.pcc,
		dz_ruleg,dz_rdleg,dz_rfoot,dz_hip,dz_rtorso,
		unused,unused,unused
	);

	#back
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		63,
		adpal.pcc,adpal2.pcc,
		dz_reardtorso,dz_rearrtorso,dz_hip,dz_rearltorso,dz_rearutorso,
		unused,unused,unused
	);

	#--------------------------------------
	# Critical damage color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryCritical,
		rapcrit.pcc,
		1       #opaque
	);

	#         color palette 'a  '   palette 'b'     subsystem
	#            -- --------------- --------------- ------------
cmCrit(H,ModeSecondaryCritical,32,adpal.pcc,adpal2.pcc,GeneratorA);
cmCrit(I,ModeSecondaryCritical,33,adpal.pcc,adpal2.pcc,GeneratorB);
cmCrit(J,ModeSecondaryCritical,34,adpal.pcc,adpal2.pcc,GeneratorC);
cmCrit(K,ModeSecondaryCritical,35,adpal.pcc,adpal2.pcc,GeneratorD);
cmCrit(L,ModeSecondaryCritical,36,adpal.pcc,adpal2.pcc,Condenser1);
cmCrit(M,ModeSecondaryCritical,37,adpal.pcc,adpal2.pcc,Condenser2);
cmCrit(N,ModeSecondaryCritical,38,adpal.pcc,adpal2.pcc,Condenser3);
cmCrit(O,ModeSecondaryCritical,39,adpal.pcc,adpal2.pcc,Condenser4);
cmCrit(H,ModeSecondaryCritical,40,adpal.pcc,adpal2.pcc,Condenser5);
cmCrit(I,ModeSecondaryCritical,41,adpal.pcc,adpal2.pcc,Condenser6);
cmCrit(K,ModeSecondaryCritical,42,adpal.pcc,adpal2.pcc,HUD);
cmCrit(L,ModeSecondaryCritical,43,adpal.pcc,adpal2.pcc,Avionics);
cmCrit(M,ModeSecondaryCritical,44,adpal.pcc,adpal2.pcc,Gyroscope);
cmCrit(N,ModeSecondaryCritical,45,adpal.pcc,adpal2.pcc,Torso);
cmCrit(O,ModeSecondaryCritical,46,adpal.pcc,adpal2.pcc,LRM5_1);
cmCrit(H,ModeSecondaryCritical,47,adpal.pcc,adpal2.pcc,LRM5_2);
cmCrit(I,ModeSecondaryCritical,48,adpal.pcc,adpal2.pcc,LRM5_3);
cmCrit(J,ModeSecondaryCritical,49,adpal.pcc,adpal2.pcc,MLaser_1);
cmCrit(K,ModeSecondaryCritical,50,adpal.pcc,adpal2.pcc,MLaser_2);
cmCrit(L,ModeSecondaryCritical,51,adpal.pcc,adpal2.pcc,SLaser_1);
cmCrit(M,ModeSecondaryCritical,52,adpal.pcc,adpal2.pcc,SLaser_2);
cmCrit(N,ModeSecondaryCritical,55,adpal.pcc,adpal2.pcc,AmmoBinLRM5_1);
cmCrit(O,ModeSecondaryCritical,56,adpal.pcc,adpal2.pcc,AmmoBinLRM5_2);
cmCrit(H,ModeSecondaryCritical,57,adpal.pcc,adpal2.pcc,AmmoBinLRM5_3);
cmCrit(I,ModeSecondaryCritical,58,adpal.pcc,adpal2.pcc,Myomers);

	#--------------------------------------
	# Heat level color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryHeat,
		rapheat.pcc,
		1       #opaque
	);

	#         color palette 'a  '   palette 'b'     subsystem
	#            -- --------------- --------------- ------------
cmHeat(H,ModeSecondaryHeat,32,heatpal.pcc,heatpal2.pcc,GeneratorA);
cmHeat(I,ModeSecondaryHeat,33,heatpal.pcc,heatpal2.pcc,GeneratorB);
cmHeat(J,ModeSecondaryHeat,34,heatpal.pcc,heatpal2.pcc,GeneratorC);
cmHeat(K,ModeSecondaryHeat,35,heatpal.pcc,heatpal2.pcc,GeneratorD);
cmHeat(L,ModeSecondaryHeat,36,heatpal.pcc,heatpal2.pcc,Condenser1);
cmHeat(M,ModeSecondaryHeat,37,heatpal.pcc,heatpal2.pcc,Condenser2);
cmHeat(N,ModeSecondaryHeat,38,heatpal.pcc,heatpal2.pcc,Condenser3);
cmHeat(O,ModeSecondaryHeat,39,heatpal.pcc,heatpal2.pcc,Condenser4);
cmHeat(H,ModeSecondaryHeat,40,heatpal.pcc,heatpal2.pcc,Condenser5);
cmHeat(I,ModeSecondaryHeat,41,heatpal.pcc,heatpal2.pcc,Condenser6);
cmHeat(K,ModeSecondaryHeat,42,heatpal.pcc,heatpal2.pcc,HUD);
cmHeat(L,ModeSecondaryHeat,43,heatpal.pcc,heatpal2.pcc,Avionics);
cmHeat(M,ModeSecondaryHeat,44,heatpal.pcc,heatpal2.pcc,Gyroscope);
cmHeat(N,ModeSecondaryHeat,45,heatpal.pcc,heatpal2.pcc,Torso);
cmHeat(O,ModeSecondaryHeat,46,heatpal.pcc,heatpal2.pcc,LRM5_1);
cmHeat(H,ModeSecondaryHeat,47,heatpal.pcc,heatpal2.pcc,LRM5_2);
cmHeat(I,ModeSecondaryHeat,48,heatpal.pcc,heatpal2.pcc,LRM5_3);
cmHeat(J,ModeSecondaryHeat,49,heatpal.pcc,heatpal2.pcc,MLaser_1);
cmHeat(K,ModeSecondaryHeat,50,heatpal.pcc,heatpal2.pcc,MLaser_2);
cmHeat(L,ModeSecondaryHeat,51,heatpal.pcc,heatpal2.pcc,SLaser_1);
cmHeat(M,ModeSecondaryHeat,52,heatpal.pcc,heatpal2.pcc,SLaser_2);
cmHeat(N,ModeSecondaryHeat,55,heatpal.pcc,heatpal2.pcc,AmmoBinLRM5_1);
cmHeat(N,ModeSecondaryHeat,56,heatpal.pcc,heatpal2.pcc,AmmoBinLRM5_2);
cmHeat(N,ModeSecondaryHeat,57,heatpal.pcc,heatpal2.pcc,AmmoBinLRM5_3);
cmHeat(I,ModeSecondaryHeat,58,heatpal.pcc,heatpal2.pcc,Myomers);
}


#=======================================================================
# Avatar
#=======================================================================
AvatarInit
{
	#--------------------------------------
	# Normal initialization
	#--------------------------------------
	MechInit;
	#--------------------------------------
	# Heat screen mech image
	#--------------------------------------
	port = Heat;
	offset = (150,140);
	bgBitMap(
		ModeAlwaysActive,
		avaht.pcc,
		0,
		255,
		0
	);
	#--------------------------------------
	# Auxiliary gauges
	#--------------------------------------
	vehicleSubSystems(
		qava0.pcc,
		qava1.pcc,
		qava2.pcc,
		qava3.pcc,
		qava4.pcc,
		qava5.pcc,
		qava6.pcc,
		qava7.pcc
	);
	#--------------------------------------
	# Secondary
	#--------------------------------------
	offset = (0,0);
	Secondary1;

	port = sec;
	#--------------------------------------
	# Armor damage color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryDamage,
		avadama.pcc,
		1       #opaque
	);

	colorMapArmor;

	# front
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		60,
		adpal.pcc,adpal2.pcc,
		dz_dtorso,dz_ftorso,dz_hip,dz_ltorso,dz_utorso,
		unused,unused,unused
	);

	#left
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		61,
		adpal.pcc,adpal2.pcc,
		dz_luleg,dz_ldleg,dz_lfoot,dz_hip,dz_ltorso,
		unused,unused,unused
	);

	#right
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		62,
		adpal.pcc,adpal2.pcc,
		dz_ruleg,dz_rdleg,dz_rfoot,dz_hip,dz_rtorso,
		unused,unused,unused
	);

	#back
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		63,
		adpal.pcc,adpal2.pcc,
		dz_reardtorso,dz_rearrtorso,dz_hip,dz_rearltorso,dz_rearutorso,
		unused,unused,unused
	);

	#--------------------------------------
	# Critical damage color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryCritical,
		avacrit.pcc,
		1       #opaque
	);

	#         color palette 'a  '   palette 'b'     subsystem
	#            -- --------------- --------------- ------------
cmCrit(H,ModeSecondaryCritical,32,adpal.pcc,adpal2.pcc,GeneratorA);
cmCrit(I,ModeSecondaryCritical,33,adpal.pcc,adpal2.pcc,GeneratorB);
cmCrit(J,ModeSecondaryCritical,34,adpal.pcc,adpal2.pcc,GeneratorC);
cmCrit(K,ModeSecondaryCritical,35,adpal.pcc,adpal2.pcc,GeneratorD);
cmCrit(L,ModeSecondaryCritical,36,adpal.pcc,adpal2.pcc,Condenser1);
cmCrit(M,ModeSecondaryCritical,37,adpal.pcc,adpal2.pcc,Condenser2);
cmCrit(N,ModeSecondaryCritical,38,adpal.pcc,adpal2.pcc,Condenser3);
cmCrit(O,ModeSecondaryCritical,39,adpal.pcc,adpal2.pcc,Condenser4);
cmCrit(H,ModeSecondaryCritical,40,adpal.pcc,adpal2.pcc,Condenser5);
cmCrit(I,ModeSecondaryCritical,41,adpal.pcc,adpal2.pcc,Condenser6);
cmCrit(K,ModeSecondaryCritical,42,adpal.pcc,adpal2.pcc,HUD);
cmCrit(L,ModeSecondaryCritical,43,adpal.pcc,adpal2.pcc,Avionics);
cmCrit(M,ModeSecondaryCritical,44,adpal.pcc,adpal2.pcc,Gyroscope);
cmCrit(N,ModeSecondaryCritical,45,adpal.pcc,adpal2.pcc,Torso);
cmCrit(O,ModeSecondaryCritical,46,adpal.pcc,adpal2.pcc,AFC50);
cmCrit(H,ModeSecondaryCritical,47,adpal.pcc,adpal2.pcc,LRM10_1);
cmCrit(I,ModeSecondaryCritical,48,adpal.pcc,adpal2.pcc,LRM10_2);
cmCrit(J,ModeSecondaryCritical,49,adpal.pcc,adpal2.pcc,ERLLaser_1);
cmCrit(K,ModeSecondaryCritical,50,adpal.pcc,adpal2.pcc,ERLLaser_2);
cmCrit(L,ModeSecondaryCritical,51,adpal.pcc,adpal2.pcc,ERMLaser_1);
cmCrit(M,ModeSecondaryCritical,52,adpal.pcc,adpal2.pcc,ERMLaser_2);
cmCrit(N,ModeSecondaryCritical,53,adpal.pcc,adpal2.pcc,ERMLaser_3);
cmCrit(O,ModeSecondaryCritical,54,adpal.pcc,adpal2.pcc,ERMLaser_4);
cmCrit(H,ModeSecondaryCritical,55,adpal.pcc,adpal2.pcc,AmmoBinAFC50);
cmCrit(I,ModeSecondaryCritical,56,adpal.pcc,adpal2.pcc,AmmoBinLRM10_1);
cmCrit(J,ModeSecondaryCritical,57,adpal.pcc,adpal2.pcc,AmmoBinLRM10_2);
cmCrit(K,ModeSecondaryCritical,58,adpal.pcc,adpal2.pcc,Myomers);

	#--------------------------------------
	# Heat level color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryHeat,
		avaheat.pcc,
		1       #opaque
	);

	#         color palette 'a  '   palette 'b'     subsystem
	#            -- --------------- --------------- ------------
cmHeat(H,ModeSecondaryHeat,32,heatpal.pcc,heatpal2.pcc,GeneratorA);
cmHeat(I,ModeSecondaryHeat,33,heatpal.pcc,heatpal2.pcc,GeneratorB);
cmHeat(J,ModeSecondaryHeat,34,heatpal.pcc,heatpal2.pcc,GeneratorC);
cmHeat(K,ModeSecondaryHeat,35,heatpal.pcc,heatpal2.pcc,GeneratorD);
cmHeat(L,ModeSecondaryHeat,36,heatpal.pcc,heatpal2.pcc,Condenser1);
cmHeat(M,ModeSecondaryHeat,37,heatpal.pcc,heatpal2.pcc,Condenser2);
cmHeat(N,ModeSecondaryHeat,38,heatpal.pcc,heatpal2.pcc,Condenser3);
cmHeat(O,ModeSecondaryHeat,39,heatpal.pcc,heatpal2.pcc,Condenser4);
cmHeat(H,ModeSecondaryHeat,40,heatpal.pcc,heatpal2.pcc,Condenser5);
cmHeat(I,ModeSecondaryHeat,41,heatpal.pcc,heatpal2.pcc,Condenser6);
cmHeat(K,ModeSecondaryHeat,42,heatpal.pcc,heatpal2.pcc,HUD);
cmHeat(L,ModeSecondaryHeat,43,heatpal.pcc,heatpal2.pcc,Avionics);
cmHeat(M,ModeSecondaryHeat,44,heatpal.pcc,heatpal2.pcc,Gyroscope);
cmHeat(N,ModeSecondaryHeat,45,heatpal.pcc,heatpal2.pcc,Torso);
cmHeat(O,ModeSecondaryHeat,46,heatpal.pcc,heatpal2.pcc,AFC50);
cmHeat(H,ModeSecondaryHeat,47,heatpal.pcc,heatpal2.pcc,LRM10_1);
cmHeat(I,ModeSecondaryHeat,48,heatpal.pcc,heatpal2.pcc,LRM10_2);
cmHeat(J,ModeSecondaryHeat,49,heatpal.pcc,heatpal2.pcc,ERLLaser_1);
cmHeat(K,ModeSecondaryHeat,50,heatpal.pcc,heatpal2.pcc,ERLLaser_2);
cmHeat(L,ModeSecondaryHeat,51,heatpal.pcc,heatpal2.pcc,ERMLaser_1);
cmHeat(M,ModeSecondaryHeat,52,heatpal.pcc,heatpal2.pcc,ERMLaser_2);
cmHeat(N,ModeSecondaryHeat,53,heatpal.pcc,heatpal2.pcc,ERMLaser_3);
cmHeat(O,ModeSecondaryHeat,54,heatpal.pcc,heatpal2.pcc,ERMLaser_4);
cmHeat(H,ModeSecondaryHeat,55,heatpal.pcc,heatpal2.pcc,AmmoBinAFC50);
cmHeat(I,ModeSecondaryHeat,56,heatpal.pcc,heatpal2.pcc,AmmoBinLRM10_1);
cmHeat(J,ModeSecondaryHeat,57,heatpal.pcc,heatpal2.pcc,AmmoBinLRM10_2);
cmHeat(K,ModeSecondaryHeat,58,heatpal.pcc,heatpal2.pcc,Myomers);
}

#=======================================================================
# Avatar V1
#=======================================================================
Ava1Init
{
	#--------------------------------------
	# Normal initialization
	#--------------------------------------
	MechInit;
	#--------------------------------------
	# Heat screen mech image
	#--------------------------------------
	port = Heat;
	offset = (150,140);
	bgBitMap(
		ModeAlwaysActive,
		avaht.pcc,
		0,
		255,
		0
	);
	#--------------------------------------
	# Auxiliary gauges
	#--------------------------------------
	vehicleSubSystems(
		qava0.pcc,
		qava1.pcc,
		qava2.pcc,
		qava3.pcc,
		qava4.pcc,
		qava5.pcc,
		qava6.pcc,
		qava7.pcc
	);
	#--------------------------------------
	# Secondary
	#--------------------------------------
	offset = (0,0);
	Secondary1;

	port = sec;
	#--------------------------------------
	# Armor damage color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryDamage,
		avadama.pcc,
		1       #opaque
	);

	colorMapArmor;

	# front
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		60,
		adpal.pcc,adpal2.pcc,
		dz_dtorso,dz_ftorso,dz_hip,dz_ltorso,dz_utorso,
		unused,unused,unused
	);

	#left
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		61,
		adpal.pcc,adpal2.pcc,
		dz_luleg,dz_ldleg,dz_lfoot,dz_hip,dz_ltorso,
		unused,unused,unused
	);

	#right
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		62,
		adpal.pcc,adpal2.pcc,
		dz_ruleg,dz_rdleg,dz_rfoot,dz_hip,dz_rtorso,
		unused,unused,unused
	);

	#back
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		63,
		adpal.pcc,adpal2.pcc,
		dz_reardtorso,dz_rearrtorso,dz_hip,dz_rearltorso,dz_rearutorso,
		unused,unused,unused
	);

	#--------------------------------------
	# Critical damage color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryCritical,
		ava1crit.pcc,
		1       #opaque
	);

	#         color palette 'a  '   palette 'b'     subsystem
	#            -- --------------- --------------- ------------
cmCrit(H,ModeSecondaryCritical,32,adpal.pcc,adpal2.pcc,GeneratorA);
cmCrit(I,ModeSecondaryCritical,33,adpal.pcc,adpal2.pcc,GeneratorB);
cmCrit(J,ModeSecondaryCritical,34,adpal.pcc,adpal2.pcc,GeneratorC);
cmCrit(K,ModeSecondaryCritical,35,adpal.pcc,adpal2.pcc,GeneratorD);
cmCrit(L,ModeSecondaryCritical,36,adpal.pcc,adpal2.pcc,Condenser1);
cmCrit(M,ModeSecondaryCritical,37,adpal.pcc,adpal2.pcc,Condenser2);
cmCrit(N,ModeSecondaryCritical,38,adpal.pcc,adpal2.pcc,Condenser3);
cmCrit(O,ModeSecondaryCritical,39,adpal.pcc,adpal2.pcc,Condenser4);
cmCrit(H,ModeSecondaryCritical,40,adpal.pcc,adpal2.pcc,Condenser5);
cmCrit(I,ModeSecondaryCritical,41,adpal.pcc,adpal2.pcc,Condenser6);
cmCrit(K,ModeSecondaryCritical,42,adpal.pcc,adpal2.pcc,HUD);
cmCrit(L,ModeSecondaryCritical,43,adpal.pcc,adpal2.pcc,Avionics);
cmCrit(M,ModeSecondaryCritical,44,adpal.pcc,adpal2.pcc,Gyroscope);
cmCrit(N,ModeSecondaryCritical,45,adpal.pcc,adpal2.pcc,Torso);
cmCrit(O,ModeSecondaryCritical,46,adpal.pcc,adpal2.pcc,AFC100);
cmCrit(H,ModeSecondaryCritical,47,adpal.pcc,adpal2.pcc,LRM5);
cmCrit(I,ModeSecondaryCritical,48,adpal.pcc,adpal2.pcc,SRM2);
cmCrit(J,ModeSecondaryCritical,49,adpal.pcc,adpal2.pcc,PPC);
cmCrit(K,ModeSecondaryCritical,50,adpal.pcc,adpal2.pcc,ERMLaser_1);
cmCrit(L,ModeSecondaryCritical,51,adpal.pcc,adpal2.pcc,ERMLaser_2);
cmCrit(M,ModeSecondaryCritical,52,adpal.pcc,adpal2.pcc,AmmoBinAFC100);
cmCrit(N,ModeSecondaryCritical,53,adpal.pcc,adpal2.pcc,AmmoBinLRM5);
cmCrit(O,ModeSecondaryCritical,54,adpal.pcc,adpal2.pcc,AmmoBinSRM2);
cmCrit(H,ModeSecondaryCritical,58,adpal.pcc,adpal2.pcc,Myomers);

	#--------------------------------------
	# Heat level color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryHeat,
		ava1heat.pcc,
		1       #opaque
	);

	#         color palette 'a  '   palette 'b'     subsystem
	#            -- --------------- --------------- ------------
cmHeat(H,ModeSecondaryHeat,32,heatpal.pcc,heatpal2.pcc,GeneratorA);
cmHeat(I,ModeSecondaryHeat,33,heatpal.pcc,heatpal2.pcc,GeneratorB);
cmHeat(J,ModeSecondaryHeat,34,heatpal.pcc,heatpal2.pcc,GeneratorC);
cmHeat(K,ModeSecondaryHeat,35,heatpal.pcc,heatpal2.pcc,GeneratorD);
cmHeat(L,ModeSecondaryHeat,36,heatpal.pcc,heatpal2.pcc,Condenser1);
cmHeat(M,ModeSecondaryHeat,37,heatpal.pcc,heatpal2.pcc,Condenser2);
cmHeat(N,ModeSecondaryHeat,38,heatpal.pcc,heatpal2.pcc,Condenser3);
cmHeat(O,ModeSecondaryHeat,39,heatpal.pcc,heatpal2.pcc,Condenser4);
cmHeat(H,ModeSecondaryHeat,40,heatpal.pcc,heatpal2.pcc,Condenser5);
cmHeat(I,ModeSecondaryHeat,41,heatpal.pcc,heatpal2.pcc,Condenser6);
cmHeat(K,ModeSecondaryHeat,42,heatpal.pcc,heatpal2.pcc,HUD);
cmHeat(L,ModeSecondaryHeat,43,heatpal.pcc,heatpal2.pcc,Avionics);
cmHeat(M,ModeSecondaryHeat,44,heatpal.pcc,heatpal2.pcc,Gyroscope);
cmHeat(N,ModeSecondaryHeat,45,heatpal.pcc,heatpal2.pcc,Torso);
cmHeat(O,ModeSecondaryHeat,46,heatpal.pcc,heatpal2.pcc,AFC100);
cmHeat(H,ModeSecondaryHeat,47,heatpal.pcc,heatpal2.pcc,LRM5);
cmHeat(I,ModeSecondaryHeat,48,heatpal.pcc,heatpal2.pcc,SRM2);
cmHeat(J,ModeSecondaryHeat,49,heatpal.pcc,heatpal2.pcc,PPC);
cmHeat(K,ModeSecondaryHeat,50,heatpal.pcc,heatpal2.pcc,ERMLaser_1);
cmHeat(L,ModeSecondaryHeat,51,heatpal.pcc,heatpal2.pcc,ERMLaser_2);
cmHeat(M,ModeSecondaryHeat,52,heatpal.pcc,heatpal2.pcc,AmmoBinAFC100);
cmHeat(N,ModeSecondaryHeat,53,heatpal.pcc,heatpal2.pcc,AmmoBinLRM5);
cmHeat(O,ModeSecondaryHeat,54,heatpal.pcc,heatpal2.pcc,AmmoBinSRM2);
cmHeat(H,ModeSecondaryHeat,58,heatpal.pcc,heatpal2.pcc,Myomers);
}

#=======================================================================
# Avatar V2
#=======================================================================
Ava2Init
{
	#--------------------------------------
	# Normal initialization
	#--------------------------------------
	MechInit;
	#--------------------------------------
	# Heat screen mech image
	#--------------------------------------
	port = Heat;
	offset = (150,140);
	bgBitMap(
		ModeAlwaysActive,
		ava2ht.pcc,
		0,
		255,
		0
	);
	#--------------------------------------
	# Auxiliary gauges
	#--------------------------------------
	vehicleSubSystems(
		qava20.pcc,
		qava21.pcc,
		qava22.pcc,
		qava23.pcc,
		qava24.pcc,
		qava25.pcc,
		qava26.pcc,
		qava27.pcc
	);
	#--------------------------------------
	# Secondary
	#--------------------------------------
	offset = (0,0);
	Secondary1;

	port = sec;
	#--------------------------------------
	# Armor damage color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryDamage,
		ava2dama.pcc,
		1       #opaque
	);

	colorMapArmor;

	# front
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		60,
		adpal.pcc,adpal2.pcc,
		dz_dtorso,dz_ftorso,dz_hip,dz_ltorso,dz_utorso,
		unused,unused,unused
	);

	#left
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		61,
		adpal.pcc,adpal2.pcc,
		dz_luleg,dz_ldleg,dz_lfoot,dz_hip,dz_ltorso,
		unused,unused,unused
	);

	#right
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		62,
		adpal.pcc,adpal2.pcc,
		dz_ruleg,dz_rdleg,dz_rfoot,dz_hip,dz_rtorso,
		unused,unused,unused
	);

	#back
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		63,
		adpal.pcc,adpal2.pcc,
		dz_reardtorso,dz_rearrtorso,dz_hip,dz_rearltorso,dz_rearutorso,
		unused,unused,unused
	);

	#--------------------------------------
	# Critical damage color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryCritical,
		ava2crit.pcc,
		1       #opaque
	);

	#         color palette 'a  '   palette 'b'     subsystem
	#            -- --------------- --------------- ------------
cmCrit(H,ModeSecondaryCritical,32,adpal.pcc,adpal2.pcc,GeneratorA);
cmCrit(I,ModeSecondaryCritical,33,adpal.pcc,adpal2.pcc,GeneratorB);
cmCrit(J,ModeSecondaryCritical,34,adpal.pcc,adpal2.pcc,GeneratorC);
cmCrit(K,ModeSecondaryCritical,35,adpal.pcc,adpal2.pcc,GeneratorD);
cmCrit(L,ModeSecondaryCritical,36,adpal.pcc,adpal2.pcc,Condenser1);
cmCrit(M,ModeSecondaryCritical,37,adpal.pcc,adpal2.pcc,Condenser2);
cmCrit(N,ModeSecondaryCritical,38,adpal.pcc,adpal2.pcc,Condenser3);
cmCrit(O,ModeSecondaryCritical,39,adpal.pcc,adpal2.pcc,Condenser4);
cmCrit(H,ModeSecondaryCritical,40,adpal.pcc,adpal2.pcc,Condenser5);
cmCrit(I,ModeSecondaryCritical,41,adpal.pcc,adpal2.pcc,Condenser6);
cmCrit(K,ModeSecondaryCritical,42,adpal.pcc,adpal2.pcc,HUD);
cmCrit(L,ModeSecondaryCritical,43,adpal.pcc,adpal2.pcc,Avionics);
cmCrit(M,ModeSecondaryCritical,44,adpal.pcc,adpal2.pcc,Gyroscope);
cmCrit(N,ModeSecondaryCritical,45,adpal.pcc,adpal2.pcc,Torso);
cmCrit(O,ModeSecondaryCritical,46,adpal.pcc,adpal2.pcc,AFC5_1);
cmCrit(H,ModeSecondaryCritical,47,adpal.pcc,adpal2.pcc,AFC5_2);
cmCrit(I,ModeSecondaryCritical,48,adpal.pcc,adpal2.pcc,AFC5_3);
cmCrit(J,ModeSecondaryCritical,49,adpal.pcc,adpal2.pcc,AFC5_4);
cmCrit(K,ModeSecondaryCritical,50,adpal.pcc,adpal2.pcc,ERSLaser_1);
cmCrit(L,ModeSecondaryCritical,51,adpal.pcc,adpal2.pcc,ERSLaser_2);
cmCrit(M,ModeSecondaryCritical,52,adpal.pcc,adpal2.pcc,NRK_1);
cmCrit(N,ModeSecondaryCritical,53,adpal.pcc,adpal2.pcc,NRK_2);
cmCrit(O,ModeSecondaryCritical,56,adpal.pcc,adpal2.pcc,AmmoBinNRK_1);
cmCrit(H,ModeSecondaryCritical,57,adpal.pcc,adpal2.pcc,AmmoBinNRK_2);
cmCrit(I,ModeSecondaryCritical,58,adpal.pcc,adpal2.pcc,Myomers);

	#--------------------------------------
	# Heat level color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryHeat,
		ava2heat.pcc,
		1       #opaque
	);

	#         color palette 'a  '   palette 'b'     subsystem
	#            -- --------------- --------------- ------------
cmHeat(H,ModeSecondaryHeat,32,heatpal.pcc,heatpal2.pcc,GeneratorA);
cmHeat(I,ModeSecondaryHeat,33,heatpal.pcc,heatpal2.pcc,GeneratorB);
cmHeat(J,ModeSecondaryHeat,34,heatpal.pcc,heatpal2.pcc,GeneratorC);
cmHeat(K,ModeSecondaryHeat,35,heatpal.pcc,heatpal2.pcc,GeneratorD);
cmHeat(L,ModeSecondaryHeat,36,heatpal.pcc,heatpal2.pcc,Condenser1);
cmHeat(M,ModeSecondaryHeat,37,heatpal.pcc,heatpal2.pcc,Condenser2);
cmHeat(N,ModeSecondaryHeat,38,heatpal.pcc,heatpal2.pcc,Condenser3);
cmHeat(O,ModeSecondaryHeat,39,heatpal.pcc,heatpal2.pcc,Condenser4);
cmHeat(H,ModeSecondaryHeat,40,heatpal.pcc,heatpal2.pcc,Condenser5);
cmHeat(I,ModeSecondaryHeat,41,heatpal.pcc,heatpal2.pcc,Condenser6);
cmHeat(K,ModeSecondaryHeat,42,heatpal.pcc,heatpal2.pcc,HUD);
cmHeat(L,ModeSecondaryHeat,43,heatpal.pcc,heatpal2.pcc,Avionics);
cmHeat(M,ModeSecondaryHeat,44,heatpal.pcc,heatpal2.pcc,Gyroscope);
cmHeat(N,ModeSecondaryHeat,45,heatpal.pcc,heatpal2.pcc,Torso);
cmHeat(O,ModeSecondaryHeat,46,heatpal.pcc,heatpal2.pcc,AFC5_1);
cmHeat(H,ModeSecondaryHeat,47,heatpal.pcc,heatpal2.pcc,AFC5_2);
cmHeat(I,ModeSecondaryHeat,48,heatpal.pcc,heatpal2.pcc,AFC5_3);
cmHeat(J,ModeSecondaryHeat,49,heatpal.pcc,heatpal2.pcc,AFC5_4);
cmHeat(K,ModeSecondaryHeat,50,heatpal.pcc,heatpal2.pcc,ERSLaser_1);
cmHeat(L,ModeSecondaryHeat,51,heatpal.pcc,heatpal2.pcc,ERSLaser_2);
cmHeat(M,ModeSecondaryHeat,52,heatpal.pcc,heatpal2.pcc,NRK5_1);
cmHeat(N,ModeSecondaryHeat,53,heatpal.pcc,heatpal2.pcc,NRK5_2);
cmHeat(O,ModeSecondaryHeat,54,heatpal.pcc,heatpal2.pcc,AmmoBinNRK5_1);
cmHeat(H,ModeSecondaryHeat,54,heatpal.pcc,heatpal2.pcc,AmmoBinNRK5_2);
cmHeat(I,ModeSecondaryHeat,58,heatpal.pcc,heatpal2.pcc,Myomers);
}

#=======================================================================
# Sunder
#=======================================================================
SunderInit
{
	#--------------------------------------
	# Normal initialization
	#--------------------------------------
	MechInit;
	#--------------------------------------
	# Heat screen mech image
	#--------------------------------------
	port = Heat;
	offset = (150,140);
	bgBitMap(
		ModeAlwaysActive,
		sundht.pcc,
		0,
		255,
		0
	);
	#--------------------------------------
	# Auxiliary gauges
	#--------------------------------------
	vehicleSubSystems(
		qsun0.pcc,
		qsun1.pcc,
		qsun2.pcc,
		qsun3.pcc,
		qsun4.pcc,
		qsun5.pcc,
		qsun6.pcc,
		qsun7.pcc
	);
	#--------------------------------------
	# Secondary
	#--------------------------------------
	offset = (0,0);
	Secondary1;

	port = sec;
	#--------------------------------------
	# Armor damage color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryDamage,
		sundama.pcc,
		1       #opaque
	);

	colorMapArmor;

	# front
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		60,
		adpal.pcc,adpal2.pcc,
		dz_dtorso,dz_ftorso,dz_hip,dz_ltorso,dz_utorso,
		unused,unused,unused
	);

	#left
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		61,
		adpal.pcc,adpal2.pcc,
		dz_luleg,dz_ldleg,dz_lfoot,dz_hip,dz_ltorso,
		unused,unused,unused
	);

	#right
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		62,
		adpal.pcc,adpal2.pcc,
		dz_ruleg,dz_rdleg,dz_rfoot,dz_hip,dz_rtorso,
		unused,unused,unused
	);

	#back
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		63,
		adpal.pcc,adpal2.pcc,
		dz_reardtorso,dz_rearrtorso,dz_hip,dz_rearltorso,dz_rearutorso,
		unused,unused,unused
	);

	#--------------------------------------
	# Critical damage color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryCritical,
		suncrit.pcc,
		1       #opaque
	);

	#         color palette 'a  '   palette 'b'     subsystem
	#            -- --------------- --------------- ------------
cmCrit(H,ModeSecondaryCritical,32,adpal.pcc,adpal2.pcc,GeneratorA);
cmCrit(I,ModeSecondaryCritical,33,adpal.pcc,adpal2.pcc,GeneratorB);
cmCrit(J,ModeSecondaryCritical,34,adpal.pcc,adpal2.pcc,GeneratorC);
cmCrit(K,ModeSecondaryCritical,35,adpal.pcc,adpal2.pcc,GeneratorD);
cmCrit(L,ModeSecondaryCritical,36,adpal.pcc,adpal2.pcc,Condenser1);
cmCrit(M,ModeSecondaryCritical,37,adpal.pcc,adpal2.pcc,Condenser2);
cmCrit(N,ModeSecondaryCritical,38,adpal.pcc,adpal2.pcc,Condenser3);
cmCrit(O,ModeSecondaryCritical,39,adpal.pcc,adpal2.pcc,Condenser4);
cmCrit(H,ModeSecondaryCritical,40,adpal.pcc,adpal2.pcc,Condenser5);
cmCrit(I,ModeSecondaryCritical,41,adpal.pcc,adpal2.pcc,Condenser6);
cmCrit(K,ModeSecondaryCritical,42,adpal.pcc,adpal2.pcc,HUD);
cmCrit(L,ModeSecondaryCritical,43,adpal.pcc,adpal2.pcc,Avionics);
cmCrit(M,ModeSecondaryCritical,44,adpal.pcc,adpal2.pcc,Gyroscope);
cmCrit(N,ModeSecondaryCritical,45,adpal.pcc,adpal2.pcc,Torso);
cmCrit(O,ModeSecondaryCritical,46,adpal.pcc,adpal2.pcc,AFC100);
cmCrit(H,ModeSecondaryCritical,47,adpal.pcc,adpal2.pcc,AFC25);
cmCrit(I,ModeSecondaryCritical,48,adpal.pcc,adpal2.pcc,LRM10);
cmCrit(J,ModeSecondaryCritical,49,adpal.pcc,adpal2.pcc,ERMLaser_1);
cmCrit(K,ModeSecondaryCritical,50,adpal.pcc,adpal2.pcc,ERMLaser_2);
cmCrit(L,ModeSecondaryCritical,51,adpal.pcc,adpal2.pcc,MLaser_1);
cmCrit(M,ModeSecondaryCritical,52,adpal.pcc,adpal2.pcc,MLaser_2);
cmCrit(N,ModeSecondaryCritical,53,adpal.pcc,adpal2.pcc,ERSLaser_1);
cmCrit(O,ModeSecondaryCritical,54,adpal.pcc,adpal2.pcc,ERSLaser_2);
cmCrit(H,ModeSecondaryCritical,55,adpal.pcc,adpal2.pcc,AmmoBinAFC100);
cmCrit(I,ModeSecondaryCritical,56,adpal.pcc,adpal2.pcc,AmmoBinAFC25);
cmCrit(J,ModeSecondaryCritical,57,adpal.pcc,adpal2.pcc,AmmoBinLRM10);
cmCrit(K,ModeSecondaryCritical,58,adpal.pcc,adpal2.pcc,Myomers);

	#--------------------------------------
	# Heat level color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryHeat,
		sunheat.pcc,
		1       #opaque
	);

	#         color palette 'a  '   palette 'b'     subsystem
	#            -- --------------- --------------- ------------
cmHeat(H,ModeSecondaryHeat,32,heatpal.pcc,heatpal2.pcc,GeneratorA);
cmHeat(I,ModeSecondaryHeat,33,heatpal.pcc,heatpal2.pcc,GeneratorB);
cmHeat(J,ModeSecondaryHeat,34,heatpal.pcc,heatpal2.pcc,GeneratorC);
cmHeat(K,ModeSecondaryHeat,35,heatpal.pcc,heatpal2.pcc,GeneratorD);
cmHeat(L,ModeSecondaryHeat,36,heatpal.pcc,heatpal2.pcc,Condenser1);
cmHeat(M,ModeSecondaryHeat,37,heatpal.pcc,heatpal2.pcc,Condenser2);
cmHeat(N,ModeSecondaryHeat,38,heatpal.pcc,heatpal2.pcc,Condenser3);
cmHeat(O,ModeSecondaryHeat,39,heatpal.pcc,heatpal2.pcc,Condenser4);
cmHeat(H,ModeSecondaryHeat,40,heatpal.pcc,heatpal2.pcc,Condenser5);
cmHeat(I,ModeSecondaryHeat,41,heatpal.pcc,heatpal2.pcc,Condenser6);
cmHeat(K,ModeSecondaryHeat,42,heatpal.pcc,heatpal2.pcc,HUD);
cmHeat(L,ModeSecondaryHeat,43,heatpal.pcc,heatpal2.pcc,Avionics);
cmHeat(M,ModeSecondaryHeat,44,heatpal.pcc,heatpal2.pcc,Gyroscope);
cmHeat(N,ModeSecondaryHeat,45,heatpal.pcc,heatpal2.pcc,Torso);
cmHeat(O,ModeSecondaryHeat,46,heatpal.pcc,heatpal2.pcc,AFC100);
cmHeat(H,ModeSecondaryHeat,47,heatpal.pcc,heatpal2.pcc,AFC25);
cmHeat(I,ModeSecondaryHeat,48,heatpal.pcc,heatpal2.pcc,LRM10);
cmHeat(J,ModeSecondaryHeat,49,heatpal.pcc,heatpal2.pcc,ERMLaser_1);
cmHeat(K,ModeSecondaryHeat,50,heatpal.pcc,heatpal2.pcc,ERMLaser_2);
cmHeat(L,ModeSecondaryHeat,51,heatpal.pcc,heatpal2.pcc,MLaser_1);
cmHeat(M,ModeSecondaryHeat,52,heatpal.pcc,heatpal2.pcc,MLaser_2);
cmHeat(N,ModeSecondaryHeat,53,heatpal.pcc,heatpal2.pcc,ERSLaser_1);
cmHeat(O,ModeSecondaryHeat,54,heatpal.pcc,heatpal2.pcc,ERSLaser_2);
cmHeat(H,ModeSecondaryHeat,55,heatpal.pcc,heatpal2.pcc,AmmoBinAFC100);
cmHeat(I,ModeSecondaryHeat,56,heatpal.pcc,heatpal2.pcc,AmmoBinAFC25);
cmHeat(J,ModeSecondaryHeat,57,heatpal.pcc,heatpal2.pcc,AmmoBinLRM10);
cmHeat(K,ModeSecondaryHeat,58,heatpal.pcc,heatpal2.pcc,Myomers);
}

#=======================================================================
# Sunder V1
#=======================================================================
Snd1Init
{
	#--------------------------------------
	# Normal initialization
	#--------------------------------------
	MechInit;
	#--------------------------------------
	# Heat screen mech image
	#--------------------------------------
	port = Heat;
	offset = (150,140);
	bgBitMap(
		ModeAlwaysActive,
		sundht.pcc,
		0,
		255,
		0
	);
	#--------------------------------------
	# Auxiliary gauges
	#--------------------------------------
	vehicleSubSystems(
		qsun0.pcc,
		qsun1.pcc,
		qsun2.pcc,
		qsun3.pcc,
		qsun4.pcc,
		qsun5.pcc,
		qsun6.pcc,
		qsun7.pcc
	);
	#--------------------------------------
	# Secondary
	#--------------------------------------
	offset = (0,0);
	Secondary1;

	port = sec;
	#--------------------------------------
	# Armor damage color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryDamage,
		sundama.pcc,
		1       #opaque
	);

	colorMapArmor;

	# front
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		60,
		adpal.pcc,adpal2.pcc,
		dz_dtorso,dz_ftorso,dz_hip,dz_ltorso,dz_utorso,
		unused,unused,unused
	);

	#left
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		61,
		adpal.pcc,adpal2.pcc,
		dz_luleg,dz_ldleg,dz_lfoot,dz_hip,dz_ltorso,
		unused,unused,unused
	);

	#right
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		62,
		adpal.pcc,adpal2.pcc,
		dz_ruleg,dz_rdleg,dz_rfoot,dz_hip,dz_rtorso,
		unused,unused,unused
	);

	#back
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		63,
		adpal.pcc,adpal2.pcc,
		dz_reardtorso,dz_rearrtorso,dz_hip,dz_rearltorso,dz_rearutorso,
		unused,unused,unused
	);

	#--------------------------------------
	# Critical damage color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryCritical,
		snd1crit.pcc,
		1       #opaque
	);

	#         color palette 'a  '   palette 'b'     subsystem
	#            -- --------------- --------------- ------------
cmCrit(H,ModeSecondaryCritical,32,adpal.pcc,adpal2.pcc,GeneratorA);
cmCrit(I,ModeSecondaryCritical,33,adpal.pcc,adpal2.pcc,GeneratorB);
cmCrit(J,ModeSecondaryCritical,34,adpal.pcc,adpal2.pcc,GeneratorC);
cmCrit(K,ModeSecondaryCritical,35,adpal.pcc,adpal2.pcc,GeneratorD);
cmCrit(L,ModeSecondaryCritical,36,adpal.pcc,adpal2.pcc,Condenser1);
cmCrit(M,ModeSecondaryCritical,37,adpal.pcc,adpal2.pcc,Condenser2);
cmCrit(N,ModeSecondaryCritical,38,adpal.pcc,adpal2.pcc,Condenser3);
cmCrit(O,ModeSecondaryCritical,39,adpal.pcc,adpal2.pcc,Condenser4);
cmCrit(H,ModeSecondaryCritical,40,adpal.pcc,adpal2.pcc,Condenser5);
cmCrit(I,ModeSecondaryCritical,41,adpal.pcc,adpal2.pcc,Condenser6);
cmCrit(K,ModeSecondaryCritical,42,adpal.pcc,adpal2.pcc,HUD);
cmCrit(L,ModeSecondaryCritical,43,adpal.pcc,adpal2.pcc,Avionics);
cmCrit(M,ModeSecondaryCritical,44,adpal.pcc,adpal2.pcc,Gyroscope);
cmCrit(N,ModeSecondaryCritical,45,adpal.pcc,adpal2.pcc,Torso);
cmCrit(O,ModeSecondaryCritical,46,adpal.pcc,adpal2.pcc,PPC_1);
cmCrit(H,ModeSecondaryCritical,47,adpal.pcc,adpal2.pcc,PPC_2);
cmCrit(I,ModeSecondaryCritical,48,adpal.pcc,adpal2.pcc,PPC_3);
cmCrit(J,ModeSecondaryCritical,49,adpal.pcc,adpal2.pcc,AFC25);
cmCrit(K,ModeSecondaryCritical,50,adpal.pcc,adpal2.pcc,LRM5);
cmCrit(L,ModeSecondaryCritical,51,adpal.pcc,adpal2.pcc,ERSLaser);
cmCrit(M,ModeSecondaryCritical,57,adpal.pcc,adpal2.pcc,AmmoBinLRM5);
cmCrit(N,ModeSecondaryCritical,58,adpal.pcc,adpal2.pcc,AmmoBinAFC25);
cmCrit(O,ModeSecondaryCritical,59,adpal.pcc,adpal2.pcc,Myomers);

	#--------------------------------------
	# Heat level color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryHeat,
		snd1heat.pcc,
		1       #opaque
	);

	#         color palette 'a  '   palette 'b'     subsystem
	#            -- --------------- --------------- ------------
cmHeat(H,ModeSecondaryHeat,32,heatpal.pcc,heatpal2.pcc,GeneratorA);
cmHeat(I,ModeSecondaryHeat,33,heatpal.pcc,heatpal2.pcc,GeneratorB);
cmHeat(J,ModeSecondaryHeat,34,heatpal.pcc,heatpal2.pcc,GeneratorC);
cmHeat(K,ModeSecondaryHeat,35,heatpal.pcc,heatpal2.pcc,GeneratorD);
cmHeat(L,ModeSecondaryHeat,36,heatpal.pcc,heatpal2.pcc,Condenser1);
cmHeat(M,ModeSecondaryHeat,37,heatpal.pcc,heatpal2.pcc,Condenser2);
cmHeat(N,ModeSecondaryHeat,38,heatpal.pcc,heatpal2.pcc,Condenser3);
cmHeat(O,ModeSecondaryHeat,39,heatpal.pcc,heatpal2.pcc,Condenser4);
cmHeat(H,ModeSecondaryHeat,40,heatpal.pcc,heatpal2.pcc,Condenser5);
cmHeat(I,ModeSecondaryHeat,41,heatpal.pcc,heatpal2.pcc,Condenser6);
cmHeat(K,ModeSecondaryHeat,42,heatpal.pcc,heatpal2.pcc,HUD);
cmHeat(L,ModeSecondaryHeat,43,heatpal.pcc,heatpal2.pcc,Avionics);
cmHeat(M,ModeSecondaryHeat,44,heatpal.pcc,heatpal2.pcc,Gyroscope);
cmHeat(N,ModeSecondaryHeat,45,heatpal.pcc,heatpal2.pcc,Torso);
cmHeat(O,ModeSecondaryHeat,46,heatpal.pcc,heatpal2.pcc,PPC_1);
cmHeat(H,ModeSecondaryHeat,47,heatpal.pcc,heatpal2.pcc,PPC_2);
cmHeat(I,ModeSecondaryHeat,48,heatpal.pcc,heatpal2.pcc,PPC_3);
cmHeat(J,ModeSecondaryHeat,49,heatpal.pcc,heatpal2.pcc,AFC25);
cmHeat(K,ModeSecondaryHeat,50,heatpal.pcc,heatpal2.pcc,LRM5);
cmHeat(L,ModeSecondaryHeat,51,heatpal.pcc,heatpal2.pcc,ERSLaser);
cmHeat(M,ModeSecondaryHeat,57,heatpal.pcc,heatpal2.pcc,AmmoBinLRM5);
cmHeat(N,ModeSecondaryHeat,58,heatpal.pcc,heatpal2.pcc,AmmoBinAFC25);
cmHeat(O,ModeSecondaryHeat,59,heatpal.pcc,heatpal2.pcc,Myomers);
}

#=======================================================================
# Sunder V2
#=======================================================================
Snd2Init
{
	#--------------------------------------
	# Normal initialization
	#--------------------------------------
	MechInit;
	#--------------------------------------
	# Heat screen mech image
	#--------------------------------------
	port = Heat;
	offset = (150,140);
	bgBitMap(
		ModeAlwaysActive,
		snd2ht.pcc,
		0,
		255,
		0
	);
	#--------------------------------------
	# Auxiliary gauges
	#--------------------------------------
	vehicleSubSystems(
		qsun0.pcc,
		qsun1.pcc,
		qsun2.pcc,
		qsun3.pcc,
		qsun4.pcc,
		qsun5.pcc,
		qsun6.pcc,
		qsun7.pcc
	);
	#--------------------------------------
	# Secondary
	#--------------------------------------
	offset = (0,0);
	Secondary1;

	port = sec;
	#--------------------------------------
	# Armor damage color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryDamage,
		snd2dama.pcc,
		1       #opaque
	);

	colorMapArmor;

	# front
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		60,
		adpal.pcc,adpal2.pcc,
		dz_dtorso,dz_ftorso,dz_hip,dz_ltorso,dz_utorso,
		unused,unused,unused
	);

	#left
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		61,
		adpal.pcc,adpal2.pcc,
		dz_luleg,dz_ldleg,dz_lfoot,dz_hip,dz_ltorso,
		unused,unused,unused
	);

	#right
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		62,
		adpal.pcc,adpal2.pcc,
		dz_ruleg,dz_rdleg,dz_rfoot,dz_hip,dz_rtorso,
		unused,unused,unused
	);

	#back
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		63,
		adpal.pcc,adpal2.pcc,
		dz_reardtorso,dz_rearrtorso,dz_hip,dz_rearltorso,dz_rearutorso,
		unused,unused,unused
	);

	#--------------------------------------
	# Critical damage color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryCritical,
		snd2crit.pcc,
		1       #opaque
	);

	#         color palette 'a  '   palette 'b'     subsystem
	#            -- --------------- --------------- ------------
cmCrit(H,ModeSecondaryCritical,32,adpal.pcc,adpal2.pcc,GeneratorA);
cmCrit(I,ModeSecondaryCritical,33,adpal.pcc,adpal2.pcc,GeneratorB);
cmCrit(J,ModeSecondaryCritical,34,adpal.pcc,adpal2.pcc,GeneratorC);
cmCrit(K,ModeSecondaryCritical,35,adpal.pcc,adpal2.pcc,GeneratorD);
cmCrit(L,ModeSecondaryCritical,36,adpal.pcc,adpal2.pcc,Condenser1);
cmCrit(M,ModeSecondaryCritical,37,adpal.pcc,adpal2.pcc,Condenser2);
cmCrit(N,ModeSecondaryCritical,38,adpal.pcc,adpal2.pcc,Condenser3);
cmCrit(O,ModeSecondaryCritical,39,adpal.pcc,adpal2.pcc,Condenser4);
cmCrit(H,ModeSecondaryCritical,40,adpal.pcc,adpal2.pcc,Condenser5);
cmCrit(I,ModeSecondaryCritical,41,adpal.pcc,adpal2.pcc,Condenser6);
cmCrit(K,ModeSecondaryCritical,42,adpal.pcc,adpal2.pcc,HUD);
cmCrit(L,ModeSecondaryCritical,43,adpal.pcc,adpal2.pcc,Avionics);
cmCrit(M,ModeSecondaryCritical,44,adpal.pcc,adpal2.pcc,Gyroscope);
cmCrit(N,ModeSecondaryCritical,45,adpal.pcc,adpal2.pcc,Torso);
cmCrit(O,ModeSecondaryCritical,46,adpal.pcc,adpal2.pcc,PPC_1);
cmCrit(H,ModeSecondaryCritical,47,adpal.pcc,adpal2.pcc,MLaser_1);
cmCrit(I,ModeSecondaryCritical,48,adpal.pcc,adpal2.pcc,MLaser_2);
cmCrit(J,ModeSecondaryCritical,49,adpal.pcc,adpal2.pcc,MLaser_3);
cmCrit(K,ModeSecondaryCritical,50,adpal.pcc,adpal2.pcc,MLaser_4);
cmCrit(L,ModeSecondaryCritical,51,adpal.pcc,adpal2.pcc,MLaser_5);
cmCrit(M,ModeSecondaryCritical,52,adpal.pcc,adpal2.pcc,MLaser_6);
cmCrit(N,ModeSecondaryCritical,53,adpal.pcc,adpal2.pcc,AFC25_1);
cmCrit(O,ModeSecondaryCritical,54,adpal.pcc,adpal2.pcc,AFC25_2);
cmCrit(H,ModeSecondaryCritical,55,adpal.pcc,adpal2.pcc,SRM6);
cmCrit(I,ModeSecondaryCritical,57,adpal.pcc,adpal2.pcc,AmmoBinSRM6);
cmCrit(J,ModeSecondaryCritical,58,adpal.pcc,adpal2.pcc,Myomers);

	#--------------------------------------
	# Heat level color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryHeat,
		snd2heat.pcc,
		1       #opaque
	);

	#         color palette 'a  '   palette 'b'     subsystem
	#            -- --------------- --------------- ------------
cmHeat(H,ModeSecondaryHeat,32,heatpal.pcc,heatpal2.pcc,GeneratorA);
cmHeat(I,ModeSecondaryHeat,33,heatpal.pcc,heatpal2.pcc,GeneratorB);
cmHeat(J,ModeSecondaryHeat,34,heatpal.pcc,heatpal2.pcc,GeneratorC);
cmHeat(K,ModeSecondaryHeat,35,heatpal.pcc,heatpal2.pcc,GeneratorD);
cmHeat(L,ModeSecondaryHeat,36,heatpal.pcc,heatpal2.pcc,Condenser1);
cmHeat(M,ModeSecondaryHeat,37,heatpal.pcc,heatpal2.pcc,Condenser2);
cmHeat(N,ModeSecondaryHeat,38,heatpal.pcc,heatpal2.pcc,Condenser3);
cmHeat(O,ModeSecondaryHeat,39,heatpal.pcc,heatpal2.pcc,Condenser4);
cmHeat(H,ModeSecondaryHeat,40,heatpal.pcc,heatpal2.pcc,Condenser5);
cmHeat(I,ModeSecondaryHeat,41,heatpal.pcc,heatpal2.pcc,Condenser6);
cmHeat(K,ModeSecondaryHeat,42,heatpal.pcc,heatpal2.pcc,HUD);
cmHeat(L,ModeSecondaryHeat,43,heatpal.pcc,heatpal2.pcc,Avionics);
cmHeat(M,ModeSecondaryHeat,44,heatpal.pcc,heatpal2.pcc,Gyroscope);
cmHeat(N,ModeSecondaryHeat,45,heatpal.pcc,heatpal2.pcc,Torso);
cmHeat(O,ModeSecondaryHeat,46,heatpal.pcc,heatpal2.pcc,PPC_1);
cmHeat(H,ModeSecondaryHeat,47,heatpal.pcc,heatpal2.pcc,MLaser_1);
cmHeat(I,ModeSecondaryHeat,48,heatpal.pcc,heatpal2.pcc,MLaser_2);
cmHeat(J,ModeSecondaryHeat,49,heatpal.pcc,heatpal2.pcc,MLaser_3);
cmHeat(K,ModeSecondaryHeat,50,heatpal.pcc,heatpal2.pcc,MLaser_4);
cmHeat(L,ModeSecondaryHeat,51,heatpal.pcc,heatpal2.pcc,MLaser_5);
cmHeat(M,ModeSecondaryHeat,52,heatpal.pcc,heatpal2.pcc,MLaser_6);
cmHeat(N,ModeSecondaryHeat,53,heatpal.pcc,heatpal2.pcc,AFC25_1);
cmHeat(O,ModeSecondaryHeat,54,heatpal.pcc,heatpal2.pcc,AFC25_2);
cmHeat(H,ModeSecondaryHeat,55,heatpal.pcc,heatpal2.pcc,SRM6);
cmHeat(I,ModeSecondaryHeat,57,heatpal.pcc,heatpal2.pcc,AmmoBinSRM6);
cmHeat(J,ModeSecondaryHeat,58,heatpal.pcc,heatpal2.pcc,Myomers);
}

#=======================================================================
# Blackhawk
#=======================================================================
BlkhawkInit
{
	#--------------------------------------
	# Normal initialization
	#--------------------------------------
	MechInit;
	#--------------------------------------
	# Heat screen mech image
	#--------------------------------------
	port = Heat;
	offset = (150,140);
	bgBitMap(
		ModeAlwaysActive,
		blhht.pcc,
		0,
		255,
		0
	);
	#--------------------------------------
	# Auxiliary gauges
	#--------------------------------------
	vehicleSubSystems(
		qblh0.pcc,
		qblh1.pcc,
		qblh2.pcc,
		qblh3.pcc,
		qblh4.pcc,
		qblh5.pcc,
		qblh6.pcc,
		qblh7.pcc
	);
	#--------------------------------------
	# Secondary
	#--------------------------------------
	offset = (0,0);
	Secondary1;

	port = sec;
	#--------------------------------------
	# Armor damage color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryDamage,
		blhdama.pcc,
		1       #opaque
	);

	colorMapArmor;

	# front
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		60,
		adpal.pcc,adpal2.pcc,
		dz_dtorso,dz_ltorso,dz_utorso,
		unused,unused,unused,unused,unused
	);

	#left
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		61,
		adpal.pcc,adpal2.pcc,
		dz_luleg,dz_ldleg,dz_lfoot,dz_ltorso,
		unused,unused,unused,unused
	);

	#right
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		62,
		adpal.pcc,adpal2.pcc,
		dz_ruleg,dz_rdleg,dz_rfoot,dz_rtorso,
		unused,unused,unused,unused
	);

	#back
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		63,
		adpal.pcc,adpal2.pcc,
		dz_reardtorso,dz_rearrtorso,dz_rearltorso,dz_rearutorso,
		unused,unused,unused,unused
	);

	#--------------------------------------
	# Critical damage color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryCritical,
		blhcrit.pcc,
		1       #opaque
	);

	#         color palette 'a  '   palette 'b'     subsystem
	#            -- --------------- --------------- ------------
cmCrit(H,ModeSecondaryCritical,32,adpal.pcc,adpal2.pcc,GeneratorA);
cmCrit(I,ModeSecondaryCritical,33,adpal.pcc,adpal2.pcc,GeneratorB);
cmCrit(J,ModeSecondaryCritical,34,adpal.pcc,adpal2.pcc,GeneratorC);
cmCrit(K,ModeSecondaryCritical,35,adpal.pcc,adpal2.pcc,GeneratorD);
cmCrit(L,ModeSecondaryCritical,36,adpal.pcc,adpal2.pcc,Condenser1);
cmCrit(M,ModeSecondaryCritical,37,adpal.pcc,adpal2.pcc,Condenser2);
cmCrit(N,ModeSecondaryCritical,38,adpal.pcc,adpal2.pcc,Condenser3);
cmCrit(O,ModeSecondaryCritical,39,adpal.pcc,adpal2.pcc,Condenser4);
cmCrit(H,ModeSecondaryCritical,40,adpal.pcc,adpal2.pcc,Condenser5);
cmCrit(I,ModeSecondaryCritical,41,adpal.pcc,adpal2.pcc,Condenser6);
cmCrit(J,ModeSecondaryCritical,42,adpal.pcc,adpal2.pcc,HUD);
cmCrit(K,ModeSecondaryCritical,43,adpal.pcc,adpal2.pcc,Avionics);
cmCrit(L,ModeSecondaryCritical,44,adpal.pcc,adpal2.pcc,Gyroscope);
cmCrit(M,ModeSecondaryCritical,45,adpal.pcc,adpal2.pcc,Torso);
cmCrit(N,ModeSecondaryCritical,46,adpal.pcc,adpal2.pcc,SRM6_1);
cmCrit(O,ModeSecondaryCritical,47,adpal.pcc,adpal2.pcc,SRM6_2);
cmCrit(H,ModeSecondaryCritical,48,adpal.pcc,adpal2.pcc,ERLLaser);
cmCrit(I,ModeSecondaryCritical,49,adpal.pcc,adpal2.pcc,ERMLaser_4);
cmCrit(J,ModeSecondaryCritical,50,adpal.pcc,adpal2.pcc,ERMLaser_2);
cmCrit(K,ModeSecondaryCritical,51,adpal.pcc,adpal2.pcc,ERMLaser_3);
cmCrit(L,ModeSecondaryCritical,52,adpal.pcc,adpal2.pcc,ERMLaser_1);
cmCrit(M,ModeSecondaryCritical,53,adpal.pcc,adpal2.pcc,ERMLaser_5);
cmCrit(N,ModeSecondaryCritical,54,adpal.pcc,adpal2.pcc,ERSLaser_1);
cmCrit(O,ModeSecondaryCritical,55,adpal.pcc,adpal2.pcc,ERSLaser_2);
cmCrit(H,ModeSecondaryCritical,56,adpal.pcc,adpal2.pcc,AmmoBinSRM6_1);
cmCrit(I,ModeSecondaryCritical,57,adpal.pcc,adpal2.pcc,AmmoBinSRM6_2);
cmCrit(J,ModeSecondaryCritical,58,adpal.pcc,adpal2.pcc,Myomers);
	#--------------------------------------
	# Heat level color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryHeat,
		blhheat.pcc,
		1       #opaque
	);

	#         color palette 'a  '   palette 'b'     subsystem
	#            -- --------------- --------------- ------------
cmHeat(H,ModeSecondaryHeat,32,heatpal.pcc,heatpal2.pcc,GeneratorA);
cmHeat(I,ModeSecondaryHeat,33,heatpal.pcc,heatpal2.pcc,GeneratorB);
cmHeat(J,ModeSecondaryHeat,34,heatpal.pcc,heatpal2.pcc,GeneratorC);
cmHeat(K,ModeSecondaryHeat,35,heatpal.pcc,heatpal2.pcc,GeneratorD);
cmHeat(L,ModeSecondaryHeat,36,heatpal.pcc,heatpal2.pcc,Condenser1);
cmHeat(M,ModeSecondaryHeat,37,heatpal.pcc,heatpal2.pcc,Condenser2);
cmHeat(N,ModeSecondaryHeat,38,heatpal.pcc,heatpal2.pcc,Condenser3);
cmHeat(O,ModeSecondaryHeat,39,heatpal.pcc,heatpal2.pcc,Condenser4);
cmHeat(H,ModeSecondaryHeat,40,heatpal.pcc,heatpal2.pcc,Condenser5);
cmHeat(I,ModeSecondaryHeat,41,heatpal.pcc,heatpal2.pcc,Condenser6);
cmHeat(J,ModeSecondaryHeat,42,heatpal.pcc,heatpal2.pcc,HUD);
cmHeat(K,ModeSecondaryHeat,43,heatpal.pcc,heatpal2.pcc,Avionics);
cmHeat(L,ModeSecondaryHeat,44,heatpal.pcc,heatpal2.pcc,Gyroscope);
cmHeat(M,ModeSecondaryHeat,45,heatpal.pcc,heatpal2.pcc,Torso);
cmHeat(N,ModeSecondaryHeat,46,heatpal.pcc,heatpal2.pcc,SRM6_1);
cmHeat(O,ModeSecondaryHeat,47,heatpal.pcc,heatpal2.pcc,SRM6_2);
cmHeat(H,ModeSecondaryHeat,48,heatpal.pcc,heatpal2.pcc,ERLLaser);
cmHeat(I,ModeSecondaryHeat,49,heatpal.pcc,heatpal2.pcc,ERMLaser_4);
cmHeat(J,ModeSecondaryHeat,50,heatpal.pcc,heatpal2.pcc,ERMLaser_2);
cmHeat(K,ModeSecondaryHeat,51,heatpal.pcc,heatpal2.pcc,ERMLaser_3);
cmHeat(L,ModeSecondaryHeat,52,heatpal.pcc,heatpal2.pcc,ERMLaser_1);
cmHeat(M,ModeSecondaryHeat,53,heatpal.pcc,heatpal2.pcc,ERMLaser_5);
cmHeat(N,ModeSecondaryHeat,54,heatpal.pcc,heatpal2.pcc,ERSLaser_1);
cmHeat(O,ModeSecondaryHeat,55,heatpal.pcc,heatpal2.pcc,ERSLaser_2);
cmHeat(H,ModeSecondaryHeat,56,heatpal.pcc,heatpal2.pcc,AmmoBinSRM6_1);
cmHeat(I,ModeSecondaryHeat,57,heatpal.pcc,heatpal2.pcc,AmmoBinSRM6_2);
cmHeat(J,ModeSecondaryHeat,58,heatpal.pcc,heatpal2.pcc,Myomers);
}

#=======================================================================
# Blackhawk V1
#=======================================================================
Bhk1Init
{
	#--------------------------------------
	# Normal initialization
	#--------------------------------------
	MechInit;
	#--------------------------------------
	# Heat screen mech image
	#--------------------------------------
	port = Heat;
	offset = (150,140);
	bgBitMap(
		ModeAlwaysActive,
		blhht.pcc,
		0,
		255,
		0
	);
	#--------------------------------------
	# Auxiliary gauges
	#--------------------------------------
	vehicleSubSystems(
		qblh0.pcc,
		qblh1.pcc,
		qblh2.pcc,
		qblh3.pcc,
		qblh4.pcc,
		qblh5.pcc,
		qblh6.pcc,
		qblh7.pcc
	);
	#--------------------------------------
	# Secondary
	#--------------------------------------
	offset = (0,0);
	Secondary1;

	port = sec;
	#--------------------------------------
	# Armor damage color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryDamage,
		blhdama.pcc,
		1       #opaque
	);

	colorMapArmor;

	# front
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		60,
		adpal.pcc,adpal2.pcc,
		dz_dtorso,dz_ltorso,dz_utorso,
		unused,unused,unused,unused,unused
	);

	#left
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		61,
		adpal.pcc,adpal2.pcc,
		dz_luleg,dz_ldleg,dz_lfoot,dz_ltorso,
		unused,unused,unused,unused
	);

	#right
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		62,
		adpal.pcc,adpal2.pcc,
		dz_ruleg,dz_rdleg,dz_rfoot,dz_rtorso,
		unused,unused,unused,unused
	);

	#back
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		63,
		adpal.pcc,adpal2.pcc,
		dz_reardtorso,dz_rearrtorso,dz_rearltorso,dz_rearutorso,
		unused,unused,unused,unused
	);

	#--------------------------------------
	# Critical damage color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryCritical,
		bhk1crit.pcc,
		1       #opaque
	);

	#         color palette 'a  '   palette 'b'     subsystem
	#            -- --------------- --------------- ------------
cmCrit(H,ModeSecondaryCritical,32,adpal.pcc,adpal2.pcc,GeneratorA);
cmCrit(I,ModeSecondaryCritical,33,adpal.pcc,adpal2.pcc,GeneratorB);
cmCrit(J,ModeSecondaryCritical,34,adpal.pcc,adpal2.pcc,GeneratorC);
cmCrit(K,ModeSecondaryCritical,35,adpal.pcc,adpal2.pcc,GeneratorD);
cmCrit(L,ModeSecondaryCritical,36,adpal.pcc,adpal2.pcc,Condenser1);
cmCrit(M,ModeSecondaryCritical,37,adpal.pcc,adpal2.pcc,Condenser2);
cmCrit(N,ModeSecondaryCritical,38,adpal.pcc,adpal2.pcc,Condenser3);
cmCrit(O,ModeSecondaryCritical,39,adpal.pcc,adpal2.pcc,Condenser4);
cmCrit(H,ModeSecondaryCritical,40,adpal.pcc,adpal2.pcc,Condenser5);
cmCrit(I,ModeSecondaryCritical,41,adpal.pcc,adpal2.pcc,Condenser6);
cmCrit(J,ModeSecondaryCritical,42,adpal.pcc,adpal2.pcc,HUD);
cmCrit(K,ModeSecondaryCritical,43,adpal.pcc,adpal2.pcc,Avionics);
cmCrit(L,ModeSecondaryCritical,44,adpal.pcc,adpal2.pcc,Gyroscope);
cmCrit(M,ModeSecondaryCritical,45,adpal.pcc,adpal2.pcc,Torso);
cmCrit(N,ModeSecondaryCritical,46,adpal.pcc,adpal2.pcc,SRM6_1);
cmCrit(O,ModeSecondaryCritical,47,adpal.pcc,adpal2.pcc,SRM6_2);
cmCrit(H,ModeSecondaryCritical,48,adpal.pcc,adpal2.pcc,PPC_1);
cmCrit(I,ModeSecondaryCritical,49,adpal.pcc,adpal2.pcc,PPC_2);
cmCrit(J,ModeSecondaryCritical,50,adpal.pcc,adpal2.pcc,ERMLaser_1);
cmCrit(K,ModeSecondaryCritical,51,adpal.pcc,adpal2.pcc,ERMLaser_3);
cmCrit(L,ModeSecondaryCritical,52,adpal.pcc,adpal2.pcc,ERMLaser_2);
cmCrit(M,ModeSecondaryCritical,53,adpal.pcc,adpal2.pcc,AmmoBinSRM6_1);
cmCrit(N,ModeSecondaryCritical,54,adpal.pcc,adpal2.pcc,AmmoBinSRM6_2);
cmCrit(O,ModeSecondaryCritical,58,adpal.pcc,adpal2.pcc,Myomers);
	#--------------------------------------
	# Heat level color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryHeat,
		bhk1heat.pcc,
		1       #opaque
	);

	#         color palette 'a  '   palette 'b'     subsystem
	#            -- --------------- --------------- ------------
cmHeat(H,ModeSecondaryHeat,32,heatpal.pcc,heatpal2.pcc,GeneratorA);
cmHeat(I,ModeSecondaryHeat,33,heatpal.pcc,heatpal2.pcc,GeneratorB);
cmHeat(J,ModeSecondaryHeat,34,heatpal.pcc,heatpal2.pcc,GeneratorC);
cmHeat(K,ModeSecondaryHeat,35,heatpal.pcc,heatpal2.pcc,GeneratorD);
cmHeat(L,ModeSecondaryHeat,36,heatpal.pcc,heatpal2.pcc,Condenser1);
cmHeat(M,ModeSecondaryHeat,37,heatpal.pcc,heatpal2.pcc,Condenser2);
cmHeat(N,ModeSecondaryHeat,38,heatpal.pcc,heatpal2.pcc,Condenser3);
cmHeat(O,ModeSecondaryHeat,39,heatpal.pcc,heatpal2.pcc,Condenser4);
cmHeat(H,ModeSecondaryHeat,40,heatpal.pcc,heatpal2.pcc,Condenser5);
cmHeat(I,ModeSecondaryHeat,41,heatpal.pcc,heatpal2.pcc,Condenser6);
cmHeat(J,ModeSecondaryHeat,42,heatpal.pcc,heatpal2.pcc,HUD);
cmHeat(K,ModeSecondaryHeat,43,heatpal.pcc,heatpal2.pcc,Avionics);
cmHeat(L,ModeSecondaryHeat,44,heatpal.pcc,heatpal2.pcc,Gyroscope);
cmHeat(M,ModeSecondaryHeat,45,heatpal.pcc,heatpal2.pcc,Torso);
cmHeat(N,ModeSecondaryHeat,46,heatpal.pcc,heatpal2.pcc,SRM6_1);
cmHeat(O,ModeSecondaryHeat,47,heatpal.pcc,heatpal2.pcc,SRM6_2);
cmHeat(H,ModeSecondaryHeat,48,heatpal.pcc,heatpal2.pcc,PPC_1);
cmHeat(I,ModeSecondaryHeat,49,heatpal.pcc,heatpal2.pcc,PPC_2);
cmHeat(J,ModeSecondaryHeat,50,heatpal.pcc,heatpal2.pcc,ERMLaser_1);
cmHeat(K,ModeSecondaryHeat,51,heatpal.pcc,heatpal2.pcc,ERMLaser_3);
cmHeat(L,ModeSecondaryHeat,52,heatpal.pcc,heatpal2.pcc,ERMLaser_2);
cmHeat(M,ModeSecondaryHeat,53,heatpal.pcc,heatpal2.pcc,AmmoBinSRM6_1);
cmHeat(N,ModeSecondaryHeat,54,heatpal.pcc,heatpal2.pcc,AmmoBinSRM6_2);
cmHeat(O,ModeSecondaryHeat,58,heatpal.pcc,heatpal2.pcc,Myomers);
}

#=======================================================================
# Loki
#=======================================================================

LokiInit
{
	#--------------------------------------
	# Normal initialization
	#--------------------------------------
	MechInit;
	#--------------------------------------
	# Heat screen mech image
	#--------------------------------------
	port = Heat;
	offset = (150,140);
	bgBitMap(
		ModeAlwaysActive,
		lokiht.pcc,
		0,
		255,
		0
	);
	#--------------------------------------
	# Auxiliary gauges
	#--------------------------------------
	vehicleSubSystems(
		qloki0.pcc,
		qloki1.pcc,
		qloki2.pcc,
		qloki3.pcc,
		qloki4.pcc,
		qloki5.pcc,
		qloki6.pcc,
		qloki7.pcc
	);
	#--------------------------------------
	# Secondary
	#--------------------------------------
	offset = (0,0);
	Secondary1;

	port = sec;
	#--------------------------------------
	# Armor damage color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryDamage,
		lokidama.pcc,
		1       #opaque
	);

	colorMapArmor;

	# front
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		60,
		adpal.pcc,adpal2.pcc,
		dz_dtorso,dz_ftorso,dz_hip,dz_ltorso,dz_utorso,
		unused,unused,unused
	);

	#left
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		61,
		adpal.pcc,adpal2.pcc,
		dz_luleg,dz_ldleg,dz_lfoot,dz_hip,dz_ltorso,
		unused,unused,unused
	);

	#right
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		62,
		adpal.pcc,adpal2.pcc,
		dz_ruleg,dz_rdleg,dz_rfoot,dz_hip,dz_rtorso,
		unused,unused,unused
	);

	#back
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		63,
		adpal.pcc,adpal2.pcc,
		dz_reardtorso,dz_rearrtorso,dz_hip,dz_rearltorso,dz_rearutorso,
		unused,unused,unused
	);

	#--------------------------------------
	# Critical damage color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryCritical,
		lokicrit.pcc,
		1       #opaque
	);

	#         color palette 'a  '   palette 'b'     subsystem
	#            -- --------------- --------------- ------------

cmCrit(H,ModeSecondaryCritical,32,adpal.pcc,adpal2.pcc,GeneratorA);
cmCrit(I,ModeSecondaryCritical,33,adpal.pcc,adpal2.pcc,GeneratorB);
cmCrit(J,ModeSecondaryCritical,34,adpal.pcc,adpal2.pcc,GeneratorC);
cmCrit(K,ModeSecondaryCritical,35,adpal.pcc,adpal2.pcc,GeneratorD);
cmCrit(L,ModeSecondaryCritical,36,adpal.pcc,adpal2.pcc,Condenser1);
cmCrit(M,ModeSecondaryCritical,37,adpal.pcc,adpal2.pcc,Condenser2);
cmCrit(N,ModeSecondaryCritical,38,adpal.pcc,adpal2.pcc,Condenser3);
cmCrit(O,ModeSecondaryCritical,39,adpal.pcc,adpal2.pcc,Condenser4);
cmCrit(H,ModeSecondaryCritical,40,adpal.pcc,adpal2.pcc,Condenser5);
cmCrit(I,ModeSecondaryCritical,41,adpal.pcc,adpal2.pcc,Condenser6);
cmCrit(K,ModeSecondaryCritical,42,adpal.pcc,adpal2.pcc,HUD);
cmCrit(L,ModeSecondaryCritical,43,adpal.pcc,adpal2.pcc,Avionics);
cmCrit(M,ModeSecondaryCritical,44,adpal.pcc,adpal2.pcc,Gyroscope);
cmCrit(N,ModeSecondaryCritical,45,adpal.pcc,adpal2.pcc,Torso);
cmCrit(O,ModeSecondaryCritical,46,adpal.pcc,adpal2.pcc,AFC50_1);
cmCrit(H,ModeSecondaryCritical,47,adpal.pcc,adpal2.pcc,AFC50_2);
cmCrit(I,ModeSecondaryCritical,48,adpal.pcc,adpal2.pcc,SRM4);
cmCrit(J,ModeSecondaryCritical,49,adpal.pcc,adpal2.pcc,ERMLaser_1);
cmCrit(K,ModeSecondaryCritical,50,adpal.pcc,adpal2.pcc,ERMLaser_2);
cmCrit(L,ModeSecondaryCritical,51,adpal.pcc,adpal2.pcc,ERSLaser_1);
cmCrit(M,ModeSecondaryCritical,52,adpal.pcc,adpal2.pcc,ERSLaser_2);
cmCrit(N,ModeSecondaryCritical,53,adpal.pcc,adpal2.pcc,AmmoBinAFC50_1);
cmCrit(O,ModeSecondaryCritical,54,adpal.pcc,adpal2.pcc,AmmoBinAFC50_2);
cmCrit(H,ModeSecondaryCritical,55,adpal.pcc,adpal2.pcc,AmmoBinSRM4);
cmCrit(I,ModeSecondaryCritical,58,adpal.pcc,adpal2.pcc,Myomers);


	#--------------------------------------
	# Heat level color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryHeat,
		lokiheat.pcc,
		1       #opaque
	);

	#         color palette 'a  '   palette 'b'     subsystem
	#            -- --------------- --------------- ------------
cmHeat(H,ModeSecondaryHeat,32,heatpal.pcc,heatpal2.pcc,GeneratorA);
cmHeat(I,ModeSecondaryHeat,33,heatpal.pcc,heatpal2.pcc,GeneratorB);
cmHeat(J,ModeSecondaryHeat,34,heatpal.pcc,heatpal2.pcc,GeneratorC);
cmHeat(K,ModeSecondaryHeat,35,heatpal.pcc,heatpal2.pcc,GeneratorD);
cmHeat(L,ModeSecondaryHeat,36,heatpal.pcc,heatpal2.pcc,Condenser1);
cmHeat(M,ModeSecondaryHeat,37,heatpal.pcc,heatpal2.pcc,Condenser2);
cmHeat(N,ModeSecondaryHeat,38,heatpal.pcc,heatpal2.pcc,Condenser3);
cmHeat(O,ModeSecondaryHeat,39,heatpal.pcc,heatpal2.pcc,Condenser4);
cmHeat(H,ModeSecondaryHeat,40,heatpal.pcc,heatpal2.pcc,Condenser5);
cmHeat(I,ModeSecondaryHeat,41,heatpal.pcc,heatpal2.pcc,Condenser6);
cmHeat(K,ModeSecondaryHeat,42,heatpal.pcc,heatpal2.pcc,HUD);
cmHeat(L,ModeSecondaryHeat,43,heatpal.pcc,heatpal2.pcc,Avionics);
cmHeat(M,ModeSecondaryHeat,44,heatpal.pcc,heatpal2.pcc,Gyroscope);
cmHeat(N,ModeSecondaryHeat,45,heatpal.pcc,heatpal2.pcc,Torso);
cmHeat(O,ModeSecondaryHeat,46,heatpal.pcc,heatpal2.pcc,AFC50_1);
cmHeat(H,ModeSecondaryHeat,47,heatpal.pcc,heatpal2.pcc,AFC50_2);
cmHeat(I,ModeSecondaryHeat,48,heatpal.pcc,heatpal2.pcc,SRM4);
cmHeat(J,ModeSecondaryHeat,49,heatpal.pcc,heatpal2.pcc,ERMLaser_1);
cmHeat(K,ModeSecondaryHeat,50,heatpal.pcc,heatpal2.pcc,ERMLaser_2);
cmHeat(L,ModeSecondaryHeat,51,heatpal.pcc,heatpal2.pcc,ERSLaser_1);
cmHeat(M,ModeSecondaryHeat,52,heatpal.pcc,heatpal2.pcc,ERSLaser_2);
cmHeat(N,ModeSecondaryHeat,53,heatpal.pcc,heatpal2.pcc,AmmoBinAFC50_1);
cmHeat(O,ModeSecondaryHeat,54,heatpal.pcc,heatpal2.pcc,AmmoBinAFC50_2);
cmHeat(H,ModeSecondaryHeat,55,heatpal.pcc,heatpal2.pcc,AmmoBinSRM4);
cmHeat(I,ModeSecondaryHeat,58,heatpal.pcc,heatpal2.pcc,Myomers);
}

#=======================================================================
# Loki V1
#=======================================================================

Lok1Init
{
	#--------------------------------------
	# Normal initialization
	#--------------------------------------
	MechInit;
	#--------------------------------------
	# Heat screen mech image
	#--------------------------------------
	port = Heat;
	offset = (150,140);
	bgBitMap(
		ModeAlwaysActive,
		lok1ht.pcc,
		0,
		255,
		0
	);
	#--------------------------------------
	# Auxiliary gauges
	#--------------------------------------
	vehicleSubSystems(
		qlok10.pcc,
		qlok11.pcc,
		qlok12.pcc,
		qlok13.pcc,
		qlok14.pcc,
		qlok15.pcc,
		qlok16.pcc,
		qlok17.pcc
	);
	#--------------------------------------
	# Secondary
	#--------------------------------------
	offset = (0,0);
	Secondary1;

	port = sec;
	#--------------------------------------
	# Armor damage color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryDamage,
		lok1dama.pcc,
		1       #opaque
	);

	colorMapArmor;

	# front
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		60,
		adpal.pcc,adpal2.pcc,
		dz_dtorso,dz_ftorso,dz_hip,dz_ltorso,dz_utorso,
		unused,unused,unused
	);

	#left
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		61,
		adpal.pcc,adpal2.pcc,
		dz_luleg,dz_ldleg,dz_lfoot,dz_hip,dz_ltorso,
		unused,unused,unused
	);

	#right
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		62,
		adpal.pcc,adpal2.pcc,
		dz_ruleg,dz_rdleg,dz_rfoot,dz_hip,dz_rtorso,
		unused,unused,unused
	);

	#back
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		63,
		adpal.pcc,adpal2.pcc,
		dz_reardtorso,dz_rearrtorso,dz_hip,dz_rearltorso,dz_rearutorso,
		unused,unused,unused
	);

	#--------------------------------------
	# Critical damage color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryCritical,
		lok1crit.pcc,
		1       #opaque
	);

	#         color palette 'a  '   palette 'b'     subsystem
	#            -- --------------- --------------- ------------

cmCrit(H,ModeSecondaryCritical,32,adpal.pcc,adpal2.pcc,GeneratorA);
cmCrit(I,ModeSecondaryCritical,33,adpal.pcc,adpal2.pcc,GeneratorB);
cmCrit(J,ModeSecondaryCritical,34,adpal.pcc,adpal2.pcc,GeneratorC);
cmCrit(K,ModeSecondaryCritical,35,adpal.pcc,adpal2.pcc,GeneratorD);
cmCrit(L,ModeSecondaryCritical,36,adpal.pcc,adpal2.pcc,Condenser1);
cmCrit(M,ModeSecondaryCritical,37,adpal.pcc,adpal2.pcc,Condenser2);
cmCrit(N,ModeSecondaryCritical,38,adpal.pcc,adpal2.pcc,Condenser3);
cmCrit(O,ModeSecondaryCritical,39,adpal.pcc,adpal2.pcc,Condenser4);
cmCrit(H,ModeSecondaryCritical,40,adpal.pcc,adpal2.pcc,Condenser5);
cmCrit(I,ModeSecondaryCritical,41,adpal.pcc,adpal2.pcc,Condenser6);
cmCrit(K,ModeSecondaryCritical,42,adpal.pcc,adpal2.pcc,HUD);
cmCrit(L,ModeSecondaryCritical,43,adpal.pcc,adpal2.pcc,Avionics);
cmCrit(M,ModeSecondaryCritical,44,adpal.pcc,adpal2.pcc,Gyroscope);
cmCrit(N,ModeSecondaryCritical,45,adpal.pcc,adpal2.pcc,Torso);
cmCrit(O,ModeSecondaryCritical,46,adpal.pcc,adpal2.pcc,SRM4);
cmCrit(H,ModeSecondaryCritical,47,adpal.pcc,adpal2.pcc,PPC_1);
cmCrit(I,ModeSecondaryCritical,48,adpal.pcc,adpal2.pcc,PPC_2);
cmCrit(J,ModeSecondaryCritical,49,adpal.pcc,adpal2.pcc,LLaser_1);
cmCrit(K,ModeSecondaryCritical,50,adpal.pcc,adpal2.pcc,LLaser_2);
cmCrit(L,ModeSecondaryCritical,51,adpal.pcc,adpal2.pcc,MLaser_1);
cmCrit(M,ModeSecondaryCritical,52,adpal.pcc,adpal2.pcc,MLaser_2);
cmCrit(N,ModeSecondaryCritical,53,adpal.pcc,adpal2.pcc,SLaser_1);
cmCrit(O,ModeSecondaryCritical,54,adpal.pcc,adpal2.pcc,SLaser_2);
cmCrit(H,ModeSecondaryCritical,55,adpal.pcc,adpal2.pcc,AmmoBinSRM4);
cmCrit(I,ModeSecondaryCritical,58,adpal.pcc,adpal2.pcc,Myomers);


	#--------------------------------------
	# Heat level color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryHeat,
		lok1heat.pcc,
		1       #opaque
	);

	#         color palette 'a  '   palette 'b'     subsystem
	#            -- --------------- --------------- ------------
cmHeat(H,ModeSecondaryHeat,32,heatpal.pcc,heatpal2.pcc,GeneratorA);
cmHeat(I,ModeSecondaryHeat,33,heatpal.pcc,heatpal2.pcc,GeneratorB);
cmHeat(J,ModeSecondaryHeat,34,heatpal.pcc,heatpal2.pcc,GeneratorC);
cmHeat(K,ModeSecondaryHeat,35,heatpal.pcc,heatpal2.pcc,GeneratorD);
cmHeat(L,ModeSecondaryHeat,36,heatpal.pcc,heatpal2.pcc,Condenser1);
cmHeat(M,ModeSecondaryHeat,37,heatpal.pcc,heatpal2.pcc,Condenser2);
cmHeat(N,ModeSecondaryHeat,38,heatpal.pcc,heatpal2.pcc,Condenser3);
cmHeat(O,ModeSecondaryHeat,39,heatpal.pcc,heatpal2.pcc,Condenser4);
cmHeat(H,ModeSecondaryHeat,40,heatpal.pcc,heatpal2.pcc,Condenser5);
cmHeat(I,ModeSecondaryHeat,41,heatpal.pcc,heatpal2.pcc,Condenser6);
cmHeat(K,ModeSecondaryHeat,42,heatpal.pcc,heatpal2.pcc,HUD);
cmHeat(L,ModeSecondaryHeat,43,heatpal.pcc,heatpal2.pcc,Avionics);
cmHeat(M,ModeSecondaryHeat,44,heatpal.pcc,heatpal2.pcc,Gyroscope);
cmHeat(N,ModeSecondaryHeat,45,heatpal.pcc,heatpal2.pcc,Torso);
cmHeat(O,ModeSecondaryHeat,46,heatpal.pcc,heatpal2.pcc,SRM4);
cmHeat(H,ModeSecondaryHeat,47,heatpal.pcc,heatpal2.pcc,PPC_1);
cmHeat(I,ModeSecondaryHeat,48,heatpal.pcc,heatpal2.pcc,PPC_2);
cmHeat(J,ModeSecondaryHeat,49,heatpal.pcc,heatpal2.pcc,LLaser_1);
cmHeat(K,ModeSecondaryHeat,50,heatpal.pcc,heatpal2.pcc,LLaser_2);
cmHeat(L,ModeSecondaryHeat,51,heatpal.pcc,heatpal2.pcc,MLaser_1);
cmHeat(M,ModeSecondaryHeat,52,heatpal.pcc,heatpal2.pcc,MLaser_2);
cmHeat(N,ModeSecondaryHeat,53,heatpal.pcc,heatpal2.pcc,SLaser_1);
cmHeat(O,ModeSecondaryHeat,54,heatpal.pcc,heatpal2.pcc,SLaser_2);
cmHeat(H,ModeSecondaryHeat,55,heatpal.pcc,heatpal2.pcc,AmmoBinSRM4);
cmHeat(I,ModeSecondaryHeat,58,heatpal.pcc,heatpal2.pcc,Myomers);
}

#=======================================================================
# Loki V2
#=======================================================================

Lok2Init
{
	#--------------------------------------
	# Normal initialization
	#--------------------------------------
	MechInit;
	#--------------------------------------
	# Heat screen mech image
	#--------------------------------------
	port = Heat;
	offset = (150,140);
	bgBitMap(
		ModeAlwaysActive,
		lokiht.pcc,
		0,
		255,
		0
	);
	#--------------------------------------
	# Auxiliary gauges
	#--------------------------------------
	vehicleSubSystems(
		qloki0.pcc,
		qloki1.pcc,
		qloki2.pcc,
		qloki3.pcc,
		qloki4.pcc,
		qloki5.pcc,
		qloki6.pcc,
		qloki7.pcc
	);
	#--------------------------------------
	# Secondary
	#--------------------------------------
	offset = (0,0);
	Secondary1;

	port = sec;
	#--------------------------------------
	# Armor damage color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryDamage,
		lokidama.pcc,
		1       #opaque
	);

	colorMapArmor;

	# front
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		60,
		adpal.pcc,adpal2.pcc,
		dz_dtorso,dz_ftorso,dz_hip,dz_ltorso,dz_utorso,
		unused,unused,unused
	);

	#left
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		61,
		adpal.pcc,adpal2.pcc,
		dz_luleg,dz_ldleg,dz_lfoot,dz_hip,dz_ltorso,
		unused,unused,unused
	);

	#right
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		62,
		adpal.pcc,adpal2.pcc,
		dz_ruleg,dz_rdleg,dz_rfoot,dz_hip,dz_rtorso,
		unused,unused,unused
	);

	#back
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		63,
		adpal.pcc,adpal2.pcc,
		dz_reardtorso,dz_rearrtorso,dz_hip,dz_rearltorso,dz_rearutorso,
		unused,unused,unused
	);

	#--------------------------------------
	# Critical damage color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryCritical,
		lok2crit.pcc,
		1       #opaque
	);

	#         color palette 'a  '   palette 'b'     subsystem
	#            -- --------------- --------------- ------------

cmCrit(H,ModeSecondaryCritical,32,adpal.pcc,adpal2.pcc,GeneratorA);
cmCrit(I,ModeSecondaryCritical,33,adpal.pcc,adpal2.pcc,GeneratorB);
cmCrit(J,ModeSecondaryCritical,34,adpal.pcc,adpal2.pcc,GeneratorC);
cmCrit(K,ModeSecondaryCritical,35,adpal.pcc,adpal2.pcc,GeneratorD);
cmCrit(L,ModeSecondaryCritical,36,adpal.pcc,adpal2.pcc,Condenser1);
cmCrit(M,ModeSecondaryCritical,37,adpal.pcc,adpal2.pcc,Condenser2);
cmCrit(N,ModeSecondaryCritical,38,adpal.pcc,adpal2.pcc,Condenser3);
cmCrit(O,ModeSecondaryCritical,39,adpal.pcc,adpal2.pcc,Condenser4);
cmCrit(H,ModeSecondaryCritical,40,adpal.pcc,adpal2.pcc,Condenser5);
cmCrit(I,ModeSecondaryCritical,41,adpal.pcc,adpal2.pcc,Condenser6);
cmCrit(K,ModeSecondaryCritical,42,adpal.pcc,adpal2.pcc,HUD);
cmCrit(L,ModeSecondaryCritical,43,adpal.pcc,adpal2.pcc,Avionics);
cmCrit(M,ModeSecondaryCritical,44,adpal.pcc,adpal2.pcc,Gyroscope);
cmCrit(N,ModeSecondaryCritical,45,adpal.pcc,adpal2.pcc,Torso);
cmCrit(O,ModeSecondaryCritical,46,adpal.pcc,adpal2.pcc,SRM4);
cmCrit(H,ModeSecondaryCritical,47,adpal.pcc,adpal2.pcc,PPC);
cmCrit(I,ModeSecondaryCritical,48,adpal.pcc,adpal2.pcc,GAUSS);
cmCrit(J,ModeSecondaryCritical,49,adpal.pcc,adpal2.pcc,AFC25);
cmCrit(K,ModeSecondaryCritical,50,adpal.pcc,adpal2.pcc,MLaser_1);
cmCrit(L,ModeSecondaryCritical,51,adpal.pcc,adpal2.pcc,MLaser_2);
cmCrit(M,ModeSecondaryCritical,52,adpal.pcc,adpal2.pcc,MLaser_3);
cmCrit(N,ModeSecondaryCritical,53,adpal.pcc,adpal2.pcc,SLaser_1);
cmCrit(O,ModeSecondaryCritical,54,adpal.pcc,adpal2.pcc,SLaser_2);
cmCrit(H,ModeSecondaryCritical,55,adpal.pcc,adpal2.pcc,AmmoBinSRM4);
cmCrit(I,ModeSecondaryCritical,56,adpal.pcc,adpa12.pcc,AmmoBinGAUSS);
cmCrit(J,ModeSecondaryCritical,57,adpal.pcc,adpa12.pcc,AmmoBinAFC25);
cmCrit(K,ModeSecondaryCritical,58,adpal.pcc,adpal2.pcc,Myomers);


	#--------------------------------------
	# Heat level color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryHeat,
		lok2heat.pcc,
		1       #opaque
	);

	#         color palette 'a  '   palette 'b'     subsystem
	#            -- --------------- --------------- ------------
cmHeat(H,ModeSecondaryHeat,32,heatpal.pcc,heatpal2.pcc,GeneratorA);
cmHeat(I,ModeSecondaryHeat,33,heatpal.pcc,heatpal2.pcc,GeneratorB);
cmHeat(J,ModeSecondaryHeat,34,heatpal.pcc,heatpal2.pcc,GeneratorC);
cmHeat(K,ModeSecondaryHeat,35,heatpal.pcc,heatpal2.pcc,GeneratorD);
cmHeat(L,ModeSecondaryHeat,36,heatpal.pcc,heatpal2.pcc,Condenser1);
cmHeat(M,ModeSecondaryHeat,37,heatpal.pcc,heatpal2.pcc,Condenser2);
cmHeat(N,ModeSecondaryHeat,38,heatpal.pcc,heatpal2.pcc,Condenser3);
cmHeat(O,ModeSecondaryHeat,39,heatpal.pcc,heatpal2.pcc,Condenser4);
cmHeat(H,ModeSecondaryHeat,40,heatpal.pcc,heatpal2.pcc,Condenser5);
cmHeat(I,ModeSecondaryHeat,41,heatpal.pcc,heatpal2.pcc,Condenser6);
cmHeat(K,ModeSecondaryHeat,42,heatpal.pcc,heatpal2.pcc,HUD);
cmHeat(L,ModeSecondaryHeat,43,heatpal.pcc,heatpal2.pcc,Avionics);
cmHeat(M,ModeSecondaryHeat,44,heatpal.pcc,heatpal2.pcc,Gyroscope);
cmHeat(N,ModeSecondaryHeat,45,heatpal.pcc,heatpal2.pcc,Torso);
cmHeat(O,ModeSecondaryHeat,46,heatpal.pcc,heatpal2.pcc,SRM4);
cmHeat(H,ModeSecondaryHeat,47,heatpal.pcc,heatpal2.pcc,PPC);
cmHeat(I,ModeSecondaryHeat,48,heatpal.pcc,heatpal2.pcc,GAUSS);
cmHeat(J,ModeSecondaryHeat,49,heatpal.pcc,heatpal2.pcc,AFC25);
cmHeat(K,ModeSecondaryHeat,50,heatpal.pcc,heatpal2.pcc,MLaser_1);
cmHeat(L,ModeSecondaryHeat,51,heatpal.pcc,heatpal2.pcc,MLaser_2);
cmHeat(M,ModeSecondaryHeat,52,heatpal.pcc,heatpal2.pcc,MLaser_3);
cmHeat(N,ModeSecondaryHeat,53,heatpal.pcc,heatpal2.pcc,SLaser_1);
cmHeat(O,ModeSecondaryHeat,54,heatpal.pcc,heatpal2.pcc,SLaser_2);
cmHeat(H,ModeSecondaryHeat,55,heatpal.pcc,heatpal2.pcc,AmmoBinSRM4);
cmHeat(I,ModeSecondaryHeat,56,heatpal.pcc,heatpal2.pcc,AmmoBinGAUSS);
cmHeat(J,ModeSecondaryHeat,57,heatpal.pcc,heatpal2.pcc,AmmoBinAFC25);
cmHeat(K,ModeSecondaryHeat,58,heatpal.pcc,heatpal2.pcc,Myomers);
}

#=======================================================================
# Madcat
#=======================================================================
MadcatInit
{
	#--------------------------------------
	# Normal initialization
	#--------------------------------------
	MechInit;
	#--------------------------------------
	# Heat screen mech image
	#--------------------------------------
	port = Heat;
	offset = (150,140);
	bgBitMap(
		ModeAlwaysActive,
		madht.pcc,
		0,
		255,
		0
	);
	#--------------------------------------
	# Auxiliary gauges
	#--------------------------------------
	vehicleSubSystems(
		qmad0.pcc,
		qmad1.pcc,
		qmad2.pcc,
		qmad3.pcc,
		qmad4.pcc,
		qmad5.pcc,
		qmad6.pcc,
		qmad7.pcc
	);
	#--------------------------------------
	# Secondary
	#--------------------------------------
	offset = (0,0);
	Secondary1;

	port = sec;
	#--------------------------------------
	# Armor damage color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryDamage,
		maddama.pcc,
		1       #opaque
	);

	colorMapArmor;

	# front
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		60,
		adpal.pcc,adpal2.pcc,
		dz_dtorso,dz_ftorso,dz_hip,dz_ltorso,dz_utorso,
		unused,unused,unused
	);

	#left
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		61,
		adpal.pcc,adpal2.pcc,
		dz_luleg,dz_ldleg,dz_lfoot,dz_hip,dz_ltorso,
		unused,unused,unused
	);

	#right
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		62,
		adpal.pcc,adpal2.pcc,
		dz_ruleg,dz_rdleg,dz_rfoot,dz_hip,dz_rtorso,
		unused,unused,unused
	);

	#back
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		63,
		adpal.pcc,adpal2.pcc,
		dz_reardtorso,dz_rearrtorso,dz_hip,dz_rearltorso,dz_rearutorso,
		unused,unused,unused
	);

	#--------------------------------------
	# Critical damage color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryCritical,
		madcrit.pcc,
		1       #opaque
	);

	#         color palette 'a  '   palette 'b'     subsystem
	#            -- --------------- --------------- ------------
cmCrit(H,ModeSecondaryCritical,32,adpal.pcc,adpal2.pcc,GeneratorA);
cmCrit(I,ModeSecondaryCritical,33,adpal.pcc,adpal2.pcc,GeneratorB);
cmCrit(J,ModeSecondaryCritical,34,adpal.pcc,adpal2.pcc,GeneratorC);
cmCrit(K,ModeSecondaryCritical,35,adpal.pcc,adpal2.pcc,GeneratorD);
cmCrit(L,ModeSecondaryCritical,36,adpal.pcc,adpal2.pcc,Condenser1);
cmCrit(M,ModeSecondaryCritical,37,adpal.pcc,adpal2.pcc,Condenser2);
cmCrit(N,ModeSecondaryCritical,38,adpal.pcc,adpal2.pcc,Condenser3);
cmCrit(O,ModeSecondaryCritical,39,adpal.pcc,adpal2.pcc,Condenser4);
cmCrit(H,ModeSecondaryCritical,40,adpal.pcc,adpal2.pcc,Condenser5);
cmCrit(I,ModeSecondaryCritical,41,adpal.pcc,adpal2.pcc,Condenser6);
cmCrit(K,ModeSecondaryCritical,42,adpal.pcc,adpal2.pcc,HUD);
cmCrit(L,ModeSecondaryCritical,43,adpal.pcc,adpal2.pcc,Avionics);
cmCrit(M,ModeSecondaryCritical,44,adpal.pcc,adpal2.pcc,Gyroscope);
cmCrit(N,ModeSecondaryCritical,45,adpal.pcc,adpal2.pcc,Torso);
cmCrit(O,ModeSecondaryCritical,46,adpal.pcc,adpal2.pcc,AFC100);
cmCrit(H,ModeSecondaryCritical,47,adpal.pcc,adpal2.pcc,LRM15_1);
cmCrit(I,ModeSecondaryCritical,48,adpal.pcc,adpal2.pcc,LRM15_2);
cmCrit(J,ModeSecondaryCritical,49,adpal.pcc,adpal2.pcc,ERLLaser);
cmCrit(K,ModeSecondaryCritical,50,adpal.pcc,adpal2.pcc,ERSLaser_1);
cmCrit(L,ModeSecondaryCritical,51,adpal.pcc,adpal2.pcc,ERSLaser_2);
cmCrit(M,ModeSecondaryCritical,52,adpal.pcc,adpal2.pcc,AmmoBinAFC100);
cmCrit(N,ModeSecondaryCritical,53,adpal.pcc,adpal2.pcc,AmmoBinLRM15_1);
cmCrit(O,ModeSecondaryCritical,54,adpal.pcc,adpal2.pcc,AmmoBinLRM15_2);
cmCrit(H,ModeSecondaryCritical,58,adpal.pcc,adpal2.pcc,Myomers);

	#--------------------------------------
	# Heat level color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryHeat,
		madheat.pcc,
		1       #opaque
	);

	#         color palette 'a  '   palette 'b'     subsystem
	#            -- --------------- --------------- ------------
cmHeat(H,ModeSecondaryHeat,32,heatpal.pcc,heatpal2.pcc,GeneratorA);
cmHeat(I,ModeSecondaryHeat,33,heatpal.pcc,heatpal2.pcc,GeneratorB);
cmHeat(J,ModeSecondaryHeat,34,heatpal.pcc,heatpal2.pcc,GeneratorC);
cmHeat(K,ModeSecondaryHeat,35,heatpal.pcc,heatpal2.pcc,GeneratorD);
cmHeat(L,ModeSecondaryHeat,36,heatpal.pcc,heatpal2.pcc,Condenser1);
cmHeat(M,ModeSecondaryHeat,37,heatpal.pcc,heatpal2.pcc,Condenser2);
cmHeat(N,ModeSecondaryHeat,38,heatpal.pcc,heatpal2.pcc,Condenser3);
cmHeat(O,ModeSecondaryHeat,39,heatpal.pcc,heatpal2.pcc,Condenser4);
cmHeat(H,ModeSecondaryHeat,40,heatpal.pcc,heatpal2.pcc,Condenser5);
cmHeat(I,ModeSecondaryHeat,41,heatpal.pcc,heatpal2.pcc,Condenser6);
cmHeat(K,ModeSecondaryHeat,42,heatpal.pcc,heatpal2.pcc,HUD);
cmHeat(L,ModeSecondaryHeat,43,heatpal.pcc,heatpal2.pcc,Avionics);
cmHeat(M,ModeSecondaryHeat,44,heatpal.pcc,heatpal2.pcc,Gyroscope);
cmHeat(N,ModeSecondaryHeat,45,heatpal.pcc,heatpal2.pcc,Torso);
cmHeat(O,ModeSecondaryHeat,46,heatpal.pcc,heatpal2.pcc,AFC100);
cmHeat(H,ModeSecondaryHeat,47,heatpal.pcc,heatpal2.pcc,LRM15_1);
cmHeat(I,ModeSecondaryHeat,48,heatpal.pcc,heatpal2.pcc,LRM15_2);
cmHeat(J,ModeSecondaryHeat,49,heatpal.pcc,heatpal2.pcc,ERLLaser);
cmHeat(K,ModeSecondaryHeat,50,heatpal.pcc,heatpal2.pcc,ERSLaser_1);
cmHeat(L,ModeSecondaryHeat,51,heatpal.pcc,heatpal2.pcc,ERSLaser_2);
cmHeat(M,ModeSecondaryHeat,52,heatpal.pcc,heatpal2.pcc,AmmoBinAFC100);
cmHeat(N,ModeSecondaryHeat,53,heatpal.pcc,heatpal2.pcc,AmmoBinLRM15_1);
cmHeat(O,ModeSecondaryHeat,54,heatpal.pcc,heatpal2.pcc,AmmoBinLRM15_2);
cmHeat(H,ModeSecondaryHeat,58,heatpal.pcc,heatpal2.pcc,Myomers);
}

#=======================================================================
# Madcat V1
#=======================================================================
Mad1Init
{
	#--------------------------------------
	# Normal initialization
	#--------------------------------------
	MechInit;
	#--------------------------------------
	# Heat screen mech image
	#--------------------------------------
	port = Heat;
	offset = (150,140);
	bgBitMap(
		ModeAlwaysActive,
		mad1ht.pcc,
		0,
		255,
		0
	);
	#--------------------------------------
	# Auxiliary gauges
	#--------------------------------------
	vehicleSubSystems(
		qmad10.pcc,
		qmad11.pcc,
		qmad12.pcc,
		qmad13.pcc,
		qmad14.pcc,
		qmad15.pcc,
		qmad16.pcc,
		qmad17.pcc
	);
	#--------------------------------------
	# Secondary
	#--------------------------------------
	offset = (0,0);
	Secondary1;

	port = sec;
	#--------------------------------------
	# Armor damage color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryDamage,
		mad1dama.pcc,
		1       #opaque
	);

	colorMapArmor;

	# front
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		60,
		adpal.pcc,adpal2.pcc,
		dz_dtorso,dz_ftorso,dz_hip,dz_ltorso,dz_utorso,
		unused,unused,unused
	);

	#left
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		61,
		adpal.pcc,adpal2.pcc,
		dz_luleg,dz_ldleg,dz_lfoot,dz_hip,dz_ltorso,
		unused,unused,unused
	);

	#right
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		62,
		adpal.pcc,adpal2.pcc,
		dz_ruleg,dz_rdleg,dz_rfoot,dz_hip,dz_rtorso,
		unused,unused,unused
	);

	#back
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		63,
		adpal.pcc,adpal2.pcc,
		dz_reardtorso,dz_rearrtorso,dz_hip,dz_rearltorso,dz_rearutorso,
		unused,unused,unused
	);

	#--------------------------------------
	# Critical damage color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryCritical,
		mad1crit.pcc,
		1       #opaque
	);

	#         color palette 'a  '   palette 'b'     subsystem
	#            -- --------------- --------------- ------------
cmCrit(H,ModeSecondaryCritical,32,adpal.pcc,adpal2.pcc,GeneratorA);
cmCrit(I,ModeSecondaryCritical,33,adpal.pcc,adpal2.pcc,GeneratorB);
cmCrit(J,ModeSecondaryCritical,34,adpal.pcc,adpal2.pcc,GeneratorC);
cmCrit(K,ModeSecondaryCritical,35,adpal.pcc,adpal2.pcc,GeneratorD);
cmCrit(L,ModeSecondaryCritical,36,adpal.pcc,adpal2.pcc,Condenser1);
cmCrit(M,ModeSecondaryCritical,37,adpal.pcc,adpal2.pcc,Condenser2);
cmCrit(N,ModeSecondaryCritical,38,adpal.pcc,adpal2.pcc,Condenser3);
cmCrit(O,ModeSecondaryCritical,39,adpal.pcc,adpal2.pcc,Condenser4);
cmCrit(H,ModeSecondaryCritical,40,adpal.pcc,adpal2.pcc,Condenser5);
cmCrit(I,ModeSecondaryCritical,41,adpal.pcc,adpal2.pcc,Condenser6);
cmCrit(K,ModeSecondaryCritical,42,adpal.pcc,adpal2.pcc,HUD);
cmCrit(L,ModeSecondaryCritical,43,adpal.pcc,adpal2.pcc,Avionics);
cmCrit(M,ModeSecondaryCritical,44,adpal.pcc,adpal2.pcc,Gyroscope);
cmCrit(N,ModeSecondaryCritical,45,adpal.pcc,adpal2.pcc,Torso);
cmCrit(O,ModeSecondaryCritical,46,adpal.pcc,adpal2.pcc,AFC25_1);
cmCrit(H,ModeSecondaryCritical,47,adpal.pcc,adpal2.pcc,AFC25_2);
cmCrit(I,ModeSecondaryCritical,48,adpal.pcc,adpal2.pcc,LRM10_1);
cmCrit(J,ModeSecondaryCritical,49,adpal.pcc,adpal2.pcc,LRM10_2);
cmCrit(K,ModeSecondaryCritical,50,adpal.pcc,adpal2.pcc,MLaser1);
cmCrit(L,ModeSecondaryCritical,51,adpal.pcc,adpal2.pcc,MLaser3);
cmCrit(M,ModeSecondaryCritical,52,adpal.pcc,adpal2.pcc,MLaser4);
cmCrit(N,ModeSecondaryCritical,53,adpal.pcc,adpal2.pcc,MLaser2);
cmCrit(O,ModeSecondaryCritical,54,adpal.pcc,adpal2.pcc,AmmoBinAFC25_1);
cmCrit(H,ModeSecondaryCritical,55,adpal.pcc,adpal2.pcc,AmmoBinAFC25_2);
cmCrit(I,ModeSecondaryCritical,56,adpal.pcc,adpal2.pcc,AmmoBinLRM10_1);
cmCrit(J,ModeSecondaryCritical,57,adpal.pcc,adpal2.pcc,AmmoBinLRM10_2);
cmCrit(K,ModeSecondaryCritical,58,adpal.pcc,adpal2.pcc,Myomers);

	#--------------------------------------
	# Heat level color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryHeat,
		mad1heat.pcc,
		1       #opaque
	);

	#         color palette 'a  '   palette 'b'     subsystem
	#            -- --------------- --------------- ------------
cmHeat(H,ModeSecondaryHeat,32,heatpal.pcc,heatpal2.pcc,GeneratorA);
cmHeat(I,ModeSecondaryHeat,33,heatpal.pcc,heatpal2.pcc,GeneratorB);
cmHeat(J,ModeSecondaryHeat,34,heatpal.pcc,heatpal2.pcc,GeneratorC);
cmHeat(K,ModeSecondaryHeat,35,heatpal.pcc,heatpal2.pcc,GeneratorD);
cmHeat(L,ModeSecondaryHeat,36,heatpal.pcc,heatpal2.pcc,Condenser1);
cmHeat(M,ModeSecondaryHeat,37,heatpal.pcc,heatpal2.pcc,Condenser2);
cmHeat(N,ModeSecondaryHeat,38,heatpal.pcc,heatpal2.pcc,Condenser3);
cmHeat(O,ModeSecondaryHeat,39,heatpal.pcc,heatpal2.pcc,Condenser4);
cmHeat(H,ModeSecondaryHeat,40,heatpal.pcc,heatpal2.pcc,Condenser5);
cmHeat(I,ModeSecondaryHeat,41,heatpal.pcc,heatpal2.pcc,Condenser6);
cmHeat(K,ModeSecondaryHeat,42,heatpal.pcc,heatpal2.pcc,HUD);
cmHeat(L,ModeSecondaryHeat,43,heatpal.pcc,heatpal2.pcc,Avionics);
cmHeat(M,ModeSecondaryHeat,44,heatpal.pcc,heatpal2.pcc,Gyroscope);
cmHeat(N,ModeSecondaryHeat,45,heatpal.pcc,heatpal2.pcc,Torso);
cmHeat(O,ModeSecondaryHeat,46,heatpal.pcc,heatpal2.pcc,AFC25_1);
cmHeat(H,ModeSecondaryHeat,47,heatpal.pcc,heatpal2.pcc,AFC25_2);
cmHeat(I,ModeSecondaryHeat,48,heatpal.pcc,heatpal2.pcc,LRM10_1);
cmHeat(J,ModeSecondaryHeat,49,heatpal.pcc,heatpal2.pcc,LRM10_2);
cmHeat(K,ModeSecondaryHeat,50,heatpal.pcc,heatpal2.pcc,MLaser1);
cmHeat(L,ModeSecondaryHeat,51,heatpal.pcc,heatpal2.pcc,MLaser3);
cmHeat(M,ModeSecondaryHeat,52,heatpal.pcc,heatpal2.pcc,MLaser4);
cmHeat(N,ModeSecondaryHeat,53,heatpal.pcc,heatpal2.pcc,MLaser2);
cmHeat(O,ModeSecondaryHeat,54,heatpal.pcc,heatpal2.pcc,AmmoBinAFC25_1);
cmHeat(H,ModeSecondaryHeat,55,heatpal.pcc,heatpal2.pcc,AmmoBinAFC25_2);
cmHeat(I,ModeSecondaryHeat,56,heatpal.pcc,heatpal2.pcc,AmmoBinLRM10_1);
cmHeat(J,ModeSecondaryHeat,57,heatpal.pcc,heatpal2.pcc,AmmoBinLRM10_2);
cmHeat(K,ModeSecondaryHeat,58,heatpal.pcc,heatpal2.pcc,Myomers);
}

#=======================================================================
# Madcat V2
#=======================================================================
Mad2Init
{
	#--------------------------------------
	# Normal initialization
	#--------------------------------------
	MechInit;
	#--------------------------------------
	# Heat screen mech image
	#--------------------------------------
	port = Heat;
	offset = (150,140);
	bgBitMap(
		ModeAlwaysActive,
		mad2ht.pcc,
		0,
		255,
		0
	);
	#--------------------------------------
	# Auxiliary gauges
	#--------------------------------------
	vehicleSubSystems(
		qmad20.pcc,
		qmad21.pcc,
		qmad22.pcc,
		qmad23.pcc,
		qmad24.pcc,
		qmad25.pcc,
		qmad26.pcc,
		qmad27.pcc
	);
	#--------------------------------------
	# Secondary
	#--------------------------------------
	offset = (0,0);
	Secondary1;

	port = sec;
	#--------------------------------------
	# Armor damage color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryDamage,
		mad2dama.pcc,
		1       #opaque
	);

	colorMapArmor;

	# front
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		60,
		adpal.pcc,adpal2.pcc,
		dz_dtorso,dz_ftorso,dz_hip,dz_ltorso,dz_utorso,
		unused,unused,unused
	);

	#left
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		61,
		adpal.pcc,adpal2.pcc,
		dz_luleg,dz_ldleg,dz_lfoot,dz_hip,dz_ltorso,
		unused,unused,unused
	);

	#right
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		62,
		adpal.pcc,adpal2.pcc,
		dz_ruleg,dz_rdleg,dz_rfoot,dz_hip,dz_rtorso,
		unused,unused,unused
	);

	#back
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		63,
		adpal.pcc,adpal2.pcc,
		dz_reardtorso,dz_rearrtorso,dz_hip,dz_rearltorso,dz_rearutorso,
		unused,unused,unused
	);

	#--------------------------------------
	# Critical damage color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryCritical,
		mad2crit.pcc,
		1       #opaque
	);

	#         color palette 'a  '   palette 'b'     subsystem
	#            -- --------------- --------------- ------------
cmCrit(H,ModeSecondaryCritical,32,adpal.pcc,adpal2.pcc,GeneratorA);
cmCrit(I,ModeSecondaryCritical,33,adpal.pcc,adpal2.pcc,GeneratorB);
cmCrit(J,ModeSecondaryCritical,34,adpal.pcc,adpal2.pcc,GeneratorC);
cmCrit(K,ModeSecondaryCritical,35,adpal.pcc,adpal2.pcc,GeneratorD);
cmCrit(L,ModeSecondaryCritical,36,adpal.pcc,adpal2.pcc,Condenser1);
cmCrit(M,ModeSecondaryCritical,37,adpal.pcc,adpal2.pcc,Condenser2);
cmCrit(N,ModeSecondaryCritical,38,adpal.pcc,adpal2.pcc,Condenser3);
cmCrit(O,ModeSecondaryCritical,39,adpal.pcc,adpal2.pcc,Condenser4);
cmCrit(H,ModeSecondaryCritical,40,adpal.pcc,adpal2.pcc,Condenser5);
cmCrit(I,ModeSecondaryCritical,41,adpal.pcc,adpal2.pcc,Condenser6);
cmCrit(K,ModeSecondaryCritical,42,adpal.pcc,adpal2.pcc,HUD);
cmCrit(L,ModeSecondaryCritical,43,adpal.pcc,adpal2.pcc,Avionics);
cmCrit(M,ModeSecondaryCritical,44,adpal.pcc,adpal2.pcc,Gyroscope);
cmCrit(N,ModeSecondaryCritical,45,adpal.pcc,adpal2.pcc,Torso);
cmCrit(O,ModeSecondaryCritical,46,adpal.pcc,adpal2.pcc,AFC50);
cmCrit(H,ModeSecondaryCritical,47,adpal.pcc,adpal2.pcc,ERPPC);
cmCrit(I,ModeSecondaryCritical,48,adpal.pcc,adpal2.pcc,LRM15);
cmCrit(J,ModeSecondaryCritical,49,adpal.pcc,adpal2.pcc,SRM6_1);
cmCrit(K,ModeSecondaryCritical,50,adpal.pcc,adpal2.pcc,SRM6_2);
cmCrit(L,ModeSecondaryCritical,51,adpal.pcc,adpal2.pcc,ERMLaser_1);
cmCrit(M,ModeSecondaryCritical,52,adpal.pcc,adpal2.pcc,ERMLaser_2);
cmCrit(N,ModeSecondaryCritical,53,adpal.pcc,adpal2.pcc,AmmoBinAFC50);
cmCrit(O,ModeSecondaryCritical,54,adpal.pcc,adpal2.pcc,AmmoBinLRM15);
cmCrit(h,ModeSecondaryCritical,55,adpal.pcc,adpal2.pcc,AmmoBinSRM6_1);
cmCrit(I,ModeSecondaryCritical,56,adpal.pcc,adpal2.pcc,AmmoBinSRM6_2);
cmCrit(J,ModeSecondaryCritical,58,adpal.pcc,adpal2.pcc,Myomers);

	#--------------------------------------
	# Heat level color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryHeat,
		mad2heat.pcc,
		1       #opaque
	);

	#         color palette 'a  '   palette 'b'     subsystem
	#            -- --------------- --------------- ------------
cmHeat(H,ModeSecondaryHeat,32,heatpal.pcc,heatpal2.pcc,GeneratorA);
cmHeat(I,ModeSecondaryHeat,33,heatpal.pcc,heatpal2.pcc,GeneratorB);
cmHeat(J,ModeSecondaryHeat,34,heatpal.pcc,heatpal2.pcc,GeneratorC);
cmHeat(K,ModeSecondaryHeat,35,heatpal.pcc,heatpal2.pcc,GeneratorD);
cmHeat(L,ModeSecondaryHeat,36,heatpal.pcc,heatpal2.pcc,Condenser1);
cmHeat(M,ModeSecondaryHeat,37,heatpal.pcc,heatpal2.pcc,Condenser2);
cmHeat(N,ModeSecondaryHeat,38,heatpal.pcc,heatpal2.pcc,Condenser3);
cmHeat(O,ModeSecondaryHeat,39,heatpal.pcc,heatpal2.pcc,Condenser4);
cmHeat(H,ModeSecondaryHeat,40,heatpal.pcc,heatpal2.pcc,Condenser5);
cmHeat(I,ModeSecondaryHeat,41,heatpal.pcc,heatpal2.pcc,Condenser6);
cmHeat(K,ModeSecondaryHeat,42,heatpal.pcc,heatpal2.pcc,HUD);
cmHeat(L,ModeSecondaryHeat,43,heatpal.pcc,heatpal2.pcc,Avionics);
cmHeat(M,ModeSecondaryHeat,44,heatpal.pcc,heatpal2.pcc,Gyroscope);
cmHeat(N,ModeSecondaryHeat,45,heatpal.pcc,heatpal2.pcc,Torso);
cmHeat(O,ModeSecondaryHeat,46,heatpal.pcc,heatpal2.pcc,AFC50);
cmHeat(H,ModeSecondaryHeat,47,heatpal.pcc,heatpal2.pcc,ERPPC);
cmHeat(I,ModeSecondaryHeat,48,heatpal.pcc,heatpal2.pcc,LRM15);
cmHeat(J,ModeSecondaryHeat,49,heatpal.pcc,heatpal2.pcc,SRM6_1);
cmHeat(K,ModeSecondaryHeat,50,heatpal.pcc,heatpal2.pcc,SRM6_2);
cmHeat(L,ModeSecondaryHeat,51,heatpal.pcc,heatpal2.pcc,ERMLaser_1);
cmHeat(M,ModeSecondaryHeat,52,heatpal.pcc,heatpal2.pcc,ERMLaser_2);
cmHeat(N,ModeSecondaryHeat,53,heatpal.pcc,heatpal2.pcc,AmmoBinAFC50);
cmHeat(O,ModeSecondaryHeat,54,heatpal.pcc,heatpal2.pcc,AmmoBinLRM15);
cmHeat(H,ModeSecondaryHeat,55,heatpal.pcc,heatpal2.pcc,AmmoBinSRM6_1);
cmHeat(I,ModeSecondaryHeat,56,heatpal.pcc,heatpal2.pcc,AmmoBinSRM6_2);
cmHeat(J,ModeSecondaryHeat,58,heatpal.pcc,heatpal2.pcc,Myomers);
}

#=======================================================================
# Vulture
#=======================================================================
VultureInit
{
	#--------------------------------------
	# Normal initialization
	#--------------------------------------
	MechInit;
	#--------------------------------------
	# Heat screen mech image
	#--------------------------------------
	port = Heat;
	offset = (150,140);
	bgBitMap(
		ModeAlwaysActive,
		vultht.pcc,
		0,
		255,
		0
	);
	#--------------------------------------
	# Auxiliary gauges
	#--------------------------------------
	vehicleSubSystems(
		qvult0.pcc,
		qvult1.pcc,
		qvult2.pcc,
		qvult3.pcc,
		qvult4.pcc,
		qvult5.pcc,
		qvult6.pcc,
		qvult7.pcc
	);
	#--------------------------------------
	# Secondary
	#--------------------------------------
	offset = (0,0);
	Secondary1;

	port = sec;
	#--------------------------------------
	# Armor damage color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryDamage,
		vultdama.pcc,
		1       #opaque
	);
	colorMapArmor;

	# front
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		60,
		adpal.pcc,adpal2.pcc,
		dz_dtorso,dz_hip,dz_ltorso,dz_utorso,
		unused,unused,unused,unused
	);

	#left
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		61,
		adpal.pcc,adpal2.pcc,
		dz_luleg,dz_ldleg,dz_lfoot,dz_hip,dz_ltorso,
		unused,unused,unused
	);

	#right
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		62,
		adpal.pcc,adpal2.pcc,
		dz_ruleg,dz_rdleg,dz_rfoot,dz_hip,dz_rtorso,
		unused,unused,unused
	);

	#back
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		63,
		adpal.pcc,adpal2.pcc,
		dz_reardtorso,dz_rearrtorso,dz_hip,dz_rearltorso,dz_rearutorso,
		unused,unused,unused
	);

	#--------------------------------------
	# Critical damage color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryCritical,
		vultcrit.pcc,
		1       #opaque
	);

	#         color palette 'a  '   palette 'b'     subsystem
	#            -- --------------- --------------- ------------
cmCrit(H,ModeSecondaryCritical,32,adpal.pcc,adpal2.pcc,GeneratorA);
cmCrit(I,ModeSecondaryCritical,33,adpal.pcc,adpal2.pcc,GeneratorB);
cmCrit(J,ModeSecondaryCritical,34,adpal.pcc,adpal2.pcc,GeneratorC);
cmCrit(K,ModeSecondaryCritical,35,adpal.pcc,adpal2.pcc,GeneratorD);
cmCrit(L,ModeSecondaryCritical,36,adpal.pcc,adpal2.pcc,Condenser1);
cmCrit(M,ModeSecondaryCritical,37,adpal.pcc,adpal2.pcc,Condenser2);
cmCrit(N,ModeSecondaryCritical,38,adpal.pcc,adpal2.pcc,Condenser3);
cmCrit(O,ModeSecondaryCritical,39,adpal.pcc,adpal2.pcc,Condenser4);
cmCrit(H,ModeSecondaryCritical,40,adpal.pcc,adpal2.pcc,Condenser5);
cmCrit(I,ModeSecondaryCritical,41,adpal.pcc,adpal2.pcc,Condenser6);
cmCrit(K,ModeSecondaryCritical,42,adpal.pcc,adpal2.pcc,HUD);
cmCrit(L,ModeSecondaryCritical,43,adpal.pcc,adpal2.pcc,Avionics);
cmCrit(M,ModeSecondaryCritical,44,adpal.pcc,adpal2.pcc,Gyroscope);
cmCrit(N,ModeSecondaryCritical,45,adpal.pcc,adpal2.pcc,Torso);
cmCrit(O,ModeSecondaryCritical,46,adpal.pcc,adpal2.pcc,LRM20_1);
cmCrit(H,ModeSecondaryCritical,47,adpal.pcc,adpal2.pcc,LRM20_2);
cmCrit(I,ModeSecondaryCritical,48,adpal.pcc,adpal2.pcc,LLaser_1);
cmCrit(J,ModeSecondaryCritical,49,adpal.pcc,adpal2.pcc,LLaser_2);
cmCrit(K,ModeSecondaryCritical,50,adpal.pcc,adpal2.pcc,ERMLaser_1);
cmCrit(L,ModeSecondaryCritical,51,adpal.pcc,adpal2.pcc,ERMLaser_2);
cmCrit(M,ModeSecondaryCritical,52,adpal.pcc,adpal2.pcc,ERSLaser_1);
cmCrit(N,ModeSecondaryCritical,53,adpal.pcc,adpal2.pcc,ERSLaser_2);
cmCrit(O,ModeSecondaryCritical,54,adpal.pcc,adpal2.pcc,AmmoBinLRM20_1);
cmCrit(H,ModeSecondaryCritical,55,adpal.pcc,adpal2.pcc,AmmoBinLRM20_2);
cmCrit(I,ModeSecondaryCritical,58,adpal.pcc,adpal2.pcc,Myomers);
	#--------------------------------------
	# Heat level color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryHeat,
		vultheat.pcc,
		1       #opaque
	);

	#         color palette 'a  '   palette 'b'     subsystem
	#            -- --------------- --------------- ------------
cmHeat(H,ModeSecondaryHeat,32,heatpal.pcc,heatpal2.pcc,GeneratorA);
cmHeat(I,ModeSecondaryHeat,33,heatpal.pcc,heatpal2.pcc,GeneratorB);
cmHeat(J,ModeSecondaryHeat,34,heatpal.pcc,heatpal2.pcc,GeneratorC);
cmHeat(K,ModeSecondaryHeat,35,heatpal.pcc,heatpal2.pcc,GeneratorD);
cmHeat(L,ModeSecondaryHeat,36,heatpal.pcc,heatpal2.pcc,Condenser1);
cmHeat(M,ModeSecondaryHeat,37,heatpal.pcc,heatpal2.pcc,Condenser2);
cmHeat(N,ModeSecondaryHeat,38,heatpal.pcc,heatpal2.pcc,Condenser3);
cmHeat(O,ModeSecondaryHeat,39,heatpal.pcc,heatpal2.pcc,Condenser4);
cmHeat(H,ModeSecondaryHeat,40,heatpal.pcc,heatpal2.pcc,Condenser5);
cmHeat(I,ModeSecondaryHeat,41,heatpal.pcc,heatpal2.pcc,Condenser6);
cmHeat(K,ModeSecondaryHeat,42,heatpal.pcc,heatpal2.pcc,HUD);
cmHeat(L,ModeSecondaryHeat,43,heatpal.pcc,heatpal2.pcc,Avionics);
cmHeat(M,ModeSecondaryHeat,44,heatpal.pcc,heatpal2.pcc,Gyroscope);
cmHeat(N,ModeSecondaryHeat,45,heatpal.pcc,heatpal2.pcc,Torso);
cmHeat(O,ModeSecondaryHeat,46,heatpal.pcc,heatpal2.pcc,LRM20_1);
cmHeat(H,ModeSecondaryHeat,47,heatpal.pcc,heatpal2.pcc,LRM20_2);
cmHeat(I,ModeSecondaryHeat,48,heatpal.pcc,heatpal2.pcc,LLaser_1);
cmHeat(J,ModeSecondaryHeat,49,heatpal.pcc,heatpal2.pcc,LLaser_2);
cmHeat(K,ModeSecondaryHeat,50,heatpal.pcc,heatpal2.pcc,ERMLaser_1);
cmHeat(L,ModeSecondaryHeat,51,heatpal.pcc,heatpal2.pcc,ERMLaser_2);
cmHeat(M,ModeSecondaryHeat,52,heatpal.pcc,heatpal2.pcc,ERSLaser_1);
cmHeat(N,ModeSecondaryHeat,53,heatpal.pcc,heatpal2.pcc,ERSLaser_2);
cmHeat(O,ModeSecondaryHeat,54,heatpal.pcc,heatpal2.pcc,AmmoBinLRM20_1);
cmHeat(H,ModeSecondaryHeat,55,heatpal.pcc,heatpal2.pcc,AmmoBinLRM20_2);
cmHeat(I,ModeSecondaryHeat,58,heatpal.pcc,heatpal2.pcc,Myomers);
}

#=======================================================================
# Vulture V1
#=======================================================================
Vul1Init
{
	#--------------------------------------
	# Normal initialization
	#--------------------------------------
	MechInit;
	#--------------------------------------
	# Heat screen mech image
	#--------------------------------------
	port = Heat;
	offset = (150,140);
	bgBitMap(
		ModeAlwaysActive,
		vul1ht.pcc,
		0,
		255,
		0
	);
	#--------------------------------------
	# Auxiliary gauges
	#--------------------------------------
	vehicleSubSystems(
		qvul10.pcc,
		qvul11.pcc,
		qvul12.pcc,
		qvul13.pcc,
		qvul14.pcc,
		qvul15.pcc,
		qvul16.pcc,
		qvul17.pcc
	);
	#--------------------------------------
	# Secondary
	#--------------------------------------
	offset = (0,0);
	Secondary1;

	port = sec;
	#--------------------------------------
	# Armor damage color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryDamage,
		vul1dama.pcc,
		1       #opaque
	);
	colorMapArmor;

	# front
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		60,
		adpal.pcc,adpal2.pcc,
		dz_dtorso,dz_hip,dz_ltorso,dz_utorso,
		unused,unused,unused,unused
	);

	#left
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		61,
		adpal.pcc,adpal2.pcc,
		dz_luleg,dz_ldleg,dz_lfoot,dz_hip,dz_ltorso,
		unused,unused,unused
	);

	#right
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		62,
		adpal.pcc,adpal2.pcc,
		dz_ruleg,dz_rdleg,dz_rfoot,dz_hip,dz_rtorso,
		unused,unused,unused
	);

	#back
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		63,
		adpal.pcc,adpal2.pcc,
		dz_reardtorso,dz_rearrtorso,dz_hip,dz_rearltorso,dz_rearutorso,
		unused,unused,unused
	);

	#--------------------------------------
	# Critical damage color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryCritical,
		vul1crit.pcc,
		1       #opaque
	);

	#         color palette 'a  '   palette 'b'     subsystem
	#            -- --------------- --------------- ------------
cmCrit(H,ModeSecondaryCritical,32,adpal.pcc,adpal2.pcc,GeneratorA);
cmCrit(I,ModeSecondaryCritical,33,adpal.pcc,adpal2.pcc,GeneratorB);
cmCrit(J,ModeSecondaryCritical,34,adpal.pcc,adpal2.pcc,GeneratorC);
cmCrit(K,ModeSecondaryCritical,35,adpal.pcc,adpal2.pcc,GeneratorD);
cmCrit(L,ModeSecondaryCritical,36,adpal.pcc,adpal2.pcc,Condenser1);
cmCrit(M,ModeSecondaryCritical,37,adpal.pcc,adpal2.pcc,Condenser2);
cmCrit(N,ModeSecondaryCritical,38,adpal.pcc,adpal2.pcc,Condenser3);
cmCrit(O,ModeSecondaryCritical,39,adpal.pcc,adpal2.pcc,Condenser4);
cmCrit(H,ModeSecondaryCritical,40,adpal.pcc,adpal2.pcc,Condenser5);
cmCrit(I,ModeSecondaryCritical,41,adpal.pcc,adpal2.pcc,Condenser6);
cmCrit(K,ModeSecondaryCritical,42,adpal.pcc,adpal2.pcc,HUD);
cmCrit(L,ModeSecondaryCritical,43,adpal.pcc,adpal2.pcc,Avionics);
cmCrit(M,ModeSecondaryCritical,44,adpal.pcc,adpal2.pcc,Gyroscope);
cmCrit(N,ModeSecondaryCritical,45,adpal.pcc,adpal2.pcc,Torso);
cmCrit(O,ModeSecondaryCritical,46,adpal.pcc,adpal2.pcc,LRM15_1);
cmCrit(H,ModeSecondaryCritical,47,adpal.pcc,adpal2.pcc,LRM15_2);
cmCrit(I,ModeSecondaryCritical,48,adpal.pcc,adpal2.pcc,PPC_1);
cmCrit(J,ModeSecondaryCritical,49,adpal.pcc,adpal2.pcc,PPC_2);
cmCrit(K,ModeSecondaryCritical,50,adpal.pcc,adpal2.pcc,ERSLaser_3);
cmCrit(L,ModeSecondaryCritical,51,adpal.pcc,adpal2.pcc,ERSLaser_1);
cmCrit(M,ModeSecondaryCritical,52,adpal.pcc,adpal2.pcc,ERSLaser_2);
cmCrit(N,ModeSecondaryCritical,53,adpal.pcc,adpal2.pcc,ERSLaser_4);
cmCrit(O,ModeSecondaryCritical,54,adpal.pcc,adpal2.pcc,AmmoBinLRM15_1);
cmCrit(H,ModeSecondaryCritical,55,adpal.pcc,adpal2.pcc,AmmoBinLRM15_2);
cmCrit(I,ModeSecondaryCritical,58,adpal.pcc,adpal2.pcc,Myomers);
	#--------------------------------------
	# Heat level color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryHeat,
		vul1heat.pcc,
		1       #opaque
	);

	#         color palette 'a  '   palette 'b'     subsystem
	#            -- --------------- --------------- ------------
cmHeat(H,ModeSecondaryHeat,32,heatpal.pcc,heatpal2.pcc,GeneratorA);
cmHeat(I,ModeSecondaryHeat,33,heatpal.pcc,heatpal2.pcc,GeneratorB);
cmHeat(J,ModeSecondaryHeat,34,heatpal.pcc,heatpal2.pcc,GeneratorC);
cmHeat(K,ModeSecondaryHeat,35,heatpal.pcc,heatpal2.pcc,GeneratorD);
cmHeat(L,ModeSecondaryHeat,36,heatpal.pcc,heatpal2.pcc,Condenser1);
cmHeat(M,ModeSecondaryHeat,37,heatpal.pcc,heatpal2.pcc,Condenser2);
cmHeat(N,ModeSecondaryHeat,38,heatpal.pcc,heatpal2.pcc,Condenser3);
cmHeat(O,ModeSecondaryHeat,39,heatpal.pcc,heatpal2.pcc,Condenser4);
cmHeat(H,ModeSecondaryHeat,40,heatpal.pcc,heatpal2.pcc,Condenser5);
cmHeat(I,ModeSecondaryHeat,41,heatpal.pcc,heatpal2.pcc,Condenser6);
cmHeat(K,ModeSecondaryHeat,42,heatpal.pcc,heatpal2.pcc,HUD);
cmHeat(L,ModeSecondaryHeat,43,heatpal.pcc,heatpal2.pcc,Avionics);
cmHeat(M,ModeSecondaryHeat,44,heatpal.pcc,heatpal2.pcc,Gyroscope);
cmHeat(N,ModeSecondaryHeat,45,heatpal.pcc,heatpal2.pcc,Torso);
cmHeat(O,ModeSecondaryHeat,46,heatpal.pcc,heatpal2.pcc,LRM15_1);
cmHeat(H,ModeSecondaryHeat,47,heatpal.pcc,heatpal2.pcc,LRM15_2);
cmHeat(I,ModeSecondaryHeat,48,heatpal.pcc,heatpal2.pcc,PPC_1);
cmHeat(J,ModeSecondaryHeat,49,heatpal.pcc,heatpal2.pcc,PPC_2);
cmHeat(K,ModeSecondaryHeat,50,heatpal.pcc,heatpal2.pcc,ERSLaser_3);
cmHeat(L,ModeSecondaryHeat,51,heatpal.pcc,heatpal2.pcc,ERSLaser_1);
cmHeat(M,ModeSecondaryHeat,52,heatpal.pcc,heatpal2.pcc,ERSLaser_2);
cmHeat(N,ModeSecondaryHeat,53,heatpal.pcc,heatpal2.pcc,ERSLaser_4);
cmHeat(O,ModeSecondaryHeat,54,heatpal.pcc,heatpal2.pcc,AmmoBinLRM15_1);
cmHeat(H,ModeSecondaryHeat,55,heatpal.pcc,heatpal2.pcc,AmmoBinLRM15_2);
cmHeat(I,ModeSecondaryHeat,58,heatpal.pcc,heatpal2.pcc,Myomers);
}

#=======================================================================
# Vulture V2
#=======================================================================
Vul2Init
{
	#--------------------------------------
	# Normal initialization
	#--------------------------------------
	MechInit;
	#--------------------------------------
	# Heat screen mech image
	#--------------------------------------
	port = Heat;
	offset = (150,140);
	bgBitMap(
		ModeAlwaysActive,
		vul2ht.pcc,
		0,
		255,
		0
	);
	#--------------------------------------
	# Auxiliary gauges
	#--------------------------------------
	vehicleSubSystems(
		qvul20.pcc,
		qvul21.pcc,
		qvul22.pcc,
		qvul23.pcc,
		qvul24.pcc,
		qvul25.pcc,
		qvul26.pcc,
		qvul27.pcc
	);
	#--------------------------------------
	# Secondary
	#--------------------------------------
	offset = (0,0);
	Secondary1;

	port = sec;
	#--------------------------------------
	# Armor damage color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryDamage,
		vul2dama.pcc,
		1       #opaque
	);
	colorMapArmor;

	# front
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		60,
		adpal.pcc,adpal2.pcc,
		dz_dtorso,dz_hip,dz_ltorso,dz_utorso,
		unused,unused,unused,unused
	);

	#left
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		61,
		adpal.pcc,adpal2.pcc,
		dz_luleg,dz_ldleg,dz_lfoot,dz_hip,dz_ltorso,
		unused,unused,unused
	);

	#right
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		62,
		adpal.pcc,adpal2.pcc,
		dz_ruleg,dz_rdleg,dz_rfoot,dz_hip,dz_rtorso,
		unused,unused,unused
	);

	#back
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		63,
		adpal.pcc,adpal2.pcc,
		dz_reardtorso,dz_rearrtorso,dz_hip,dz_rearltorso,dz_rearutorso,
		unused,unused,unused
	);

	#--------------------------------------
	# Critical damage color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryCritical,
		vul2crit.pcc,
		1       #opaque
	);

	#         color palette 'a  '   palette 'b'     subsystem
	#            -- --------------- --------------- ------------
cmCrit(H,ModeSecondaryCritical,32,adpal.pcc,adpal2.pcc,GeneratorA);
cmCrit(I,ModeSecondaryCritical,33,adpal.pcc,adpal2.pcc,GeneratorB);
cmCrit(J,ModeSecondaryCritical,34,adpal.pcc,adpal2.pcc,GeneratorC);
cmCrit(K,ModeSecondaryCritical,35,adpal.pcc,adpal2.pcc,GeneratorD);
cmCrit(L,ModeSecondaryCritical,36,adpal.pcc,adpal2.pcc,Condenser1);
cmCrit(M,ModeSecondaryCritical,37,adpal.pcc,adpal2.pcc,Condenser2);
cmCrit(N,ModeSecondaryCritical,38,adpal.pcc,adpal2.pcc,Condenser3);
cmCrit(O,ModeSecondaryCritical,39,adpal.pcc,adpal2.pcc,Condenser4);
cmCrit(H,ModeSecondaryCritical,40,adpal.pcc,adpal2.pcc,Condenser5);
cmCrit(I,ModeSecondaryCritical,41,adpal.pcc,adpal2.pcc,Condenser6);
cmCrit(K,ModeSecondaryCritical,42,adpal.pcc,adpal2.pcc,HUD);
cmCrit(L,ModeSecondaryCritical,43,adpal.pcc,adpal2.pcc,Avionics);
cmCrit(M,ModeSecondaryCritical,44,adpal.pcc,adpal2.pcc,Gyroscope);
cmCrit(N,ModeSecondaryCritical,45,adpal.pcc,adpal2.pcc,Torso);
cmCrit(O,ModeSecondaryCritical,46,adpal.pcc,adpal2.pcc,SLaser_1);
cmCrit(H,ModeSecondaryCritical,47,adpal.pcc,adpal2.pcc,SLaser_2);
cmCrit(I,ModeSecondaryCritical,48,adpal.pcc,adpal2.pcc,SLaser_3);
cmCrit(J,ModeSecondaryCritical,49,adpal.pcc,adpal2.pcc,SLaser_4);
cmCrit(K,ModeSecondaryCritical,50,adpal.pcc,adpal2.pcc,STRK6_1);
cmCrit(L,ModeSecondaryCritical,51,adpal.pcc,adpal2.pcc,STRK6_2);
cmCrit(M,ModeSecondaryCritical,52,adpal.pcc,adpal2.pcc,STRK6_3);
cmCrit(N,ModeSecondaryCritical,53,adpal.pcc,adpal2.pcc,STRK6_4);
cmCrit(O,ModeSecondaryCritical,54,adpal.pcc,adpal2.pcc,STRK6_5);
cmCrit(H,ModeSecondaryCritical,55,adpal.pcc,adpal2.pcc,STRK6_6);
cmCrit(I,ModeSecondaryCritical,58,adpal.pcc,adpal2.pcc,Myomers);
	#--------------------------------------
	# Heat level color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryHeat,
		vul2heat.pcc,
		1       #opaque
	);

	#         color palette 'a  '   palette 'b'     subsystem
	#            -- --------------- --------------- ------------
cmHeat(H,ModeSecondaryHeat,32,heatpal.pcc,heatpal2.pcc,GeneratorA);
cmHeat(I,ModeSecondaryHeat,33,heatpal.pcc,heatpal2.pcc,GeneratorB);
cmHeat(J,ModeSecondaryHeat,34,heatpal.pcc,heatpal2.pcc,GeneratorC);
cmHeat(K,ModeSecondaryHeat,35,heatpal.pcc,heatpal2.pcc,GeneratorD);
cmHeat(L,ModeSecondaryHeat,36,heatpal.pcc,heatpal2.pcc,Condenser1);
cmHeat(M,ModeSecondaryHeat,37,heatpal.pcc,heatpal2.pcc,Condenser2);
cmHeat(N,ModeSecondaryHeat,38,heatpal.pcc,heatpal2.pcc,Condenser3);
cmHeat(O,ModeSecondaryHeat,39,heatpal.pcc,heatpal2.pcc,Condenser4);
cmHeat(H,ModeSecondaryHeat,40,heatpal.pcc,heatpal2.pcc,Condenser5);
cmHeat(I,ModeSecondaryHeat,41,heatpal.pcc,heatpal2.pcc,Condenser6);
cmHeat(K,ModeSecondaryHeat,42,heatpal.pcc,heatpal2.pcc,HUD);
cmHeat(L,ModeSecondaryHeat,43,heatpal.pcc,heatpal2.pcc,Avionics);
cmHeat(M,ModeSecondaryHeat,44,heatpal.pcc,heatpal2.pcc,Gyroscope);
cmHeat(N,ModeSecondaryHeat,45,heatpal.pcc,heatpal2.pcc,Torso);
cmHeat(O,ModeSecondaryHeat,46,adpal.pcc,adpal2.pcc,SLaser_1);
cmHeat(H,ModeSecondaryHeat,47,adpal.pcc,adpal2.pcc,SLaser_2);
cmHeat(I,ModeSecondaryHeat,48,adpal.pcc,adpal2.pcc,SLaser_3);
cmHeat(J,ModeSecondaryHeat,49,adpal.pcc,adpal2.pcc,SLaser_4);
cmHeat(K,ModeSecondaryHeat,50,adpal.pcc,adpal2.pcc,STRK6_1);
cmHeat(L,ModeSecondaryHeat,51,adpal.pcc,adpal2.pcc,STRK6_2);
cmHeat(M,ModeSecondaryHeat,52,adpal.pcc,adpal2.pcc,STRK6_3);
cmHeat(N,ModeSecondaryHeat,53,adpal.pcc,adpal2.pcc,STRK6_4);
cmHeat(O,ModeSecondaryHeat,54,adpal.pcc,adpal2.pcc,STRK6_5);
cmHeat(H,ModeSecondaryHeat,55,adpal.pcc,adpal2.pcc,STRK6_6);
cmHeat(I,ModeSecondaryHeat,58,heatpal.pcc,heatpal2.pcc,Myomers);
}

#=======================================================================
# Thor
#=======================================================================
ThorInit
{
	#--------------------------------------
	# Normal initialization
	#--------------------------------------
	MechInit;
	#--------------------------------------
	# Heat screen mech image
	#--------------------------------------
	port = Heat;
	offset = (150,140);
	bgBitMap(
		ModeAlwaysActive,
		thorht.pcc,
		0,
		255,
		0
	);
	#--------------------------------------
	# Auxiliary gauges
	#--------------------------------------
	vehicleSubSystems(
		qthor0.pcc,
		qthor1.pcc,
		qthor2.pcc,
		qthor3.pcc,
		qthor4.pcc,
		qthor5.pcc,
		qthor6.pcc,
		qthor7.pcc
	);
	#--------------------------------------
	# Secondary
	#--------------------------------------
	offset = (0,0);
	Secondary1;

	port = sec;
	#--------------------------------------
	# Armor damage color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryDamage,
		thordama.pcc,
		1       #opaque
	);
	colorMapArmor;

	# front
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		60,
		adpal.pcc,adpal2.pcc,
		dz_dtorso,dz_hip,dz_ltorso,dz_utorso,
		unused,unused,unused,unused
	);

	#left
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		61,
		adpal.pcc,adpal2.pcc,
		dz_luleg,dz_ldleg,dz_lfoot,dz_hip,dz_ltorso,
		unused,unused,unused
	);

	#right
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		62,
		adpal.pcc,adpal2.pcc,
		dz_ruleg,dz_rdleg,dz_rfoot,dz_hip,dz_rtorso,
		unused,unused,unused
	);

	#back
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		63,
		adpal.pcc,adpal2.pcc,
		dz_reardtorso,dz_rearrtorso,dz_hip,dz_rearltorso,dz_rearutorso,
		unused,unused,unused
	);

	#--------------------------------------
	# Critical damage color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryCritical,
		thorcrit.pcc,
		1       #opaque
	);

	#         color palette 'a  '   palette 'b'     subsystem
	#            -- --------------- --------------- ------------
cmCrit(H,ModeSecondaryCritical,32,adpal.pcc,adpal2.pcc,GeneratorA);
cmCrit(I,ModeSecondaryCritical,33,adpal.pcc,adpal2.pcc,GeneratorB);
cmCrit(J,ModeSecondaryCritical,34,adpal.pcc,adpal2.pcc,GeneratorC);
cmCrit(K,ModeSecondaryCritical,35,adpal.pcc,adpal2.pcc,GeneratorD);
cmCrit(L,ModeSecondaryCritical,36,adpal.pcc,adpal2.pcc,Condenser1);
cmCrit(M,ModeSecondaryCritical,37,adpal.pcc,adpal2.pcc,Condenser2);
cmCrit(N,ModeSecondaryCritical,38,adpal.pcc,adpal2.pcc,Condenser3);
cmCrit(O,ModeSecondaryCritical,39,adpal.pcc,adpal2.pcc,Condenser4);
cmCrit(H,ModeSecondaryCritical,40,adpal.pcc,adpal2.pcc,Condenser5);
cmCrit(I,ModeSecondaryCritical,41,adpal.pcc,adpal2.pcc,Condenser6);
cmCrit(K,ModeSecondaryCritical,42,adpal.pcc,adpal2.pcc,HUD);
cmCrit(L,ModeSecondaryCritical,43,adpal.pcc,adpal2.pcc,Avionics);
cmCrit(M,ModeSecondaryCritical,44,adpal.pcc,adpal2.pcc,Gyroscope);
cmCrit(N,ModeSecondaryCritical,45,adpal.pcc,adpal2.pcc,Torso);
cmCrit(O,ModeSecondaryCritical,46,adpal.pcc,adpal2.pcc,LRM15);
cmCrit(H,ModeSecondaryCritical,47,adpal.pcc,adpal2.pcc,ERPPC_1);
cmCrit(I,ModeSecondaryCritical,48,adpal.pcc,adpal2.pcc,ERPPC_2);
cmCrit(J,ModeSecondaryCritical,49,adpal.pcc,adpal2.pcc,LLaser);
cmCrit(K,ModeSecondaryCritical,50,adpal.pcc,adpal2.pcc,ERMLaser);
cmCrit(L,ModeSecondaryCritical,51,adpal.pcc,adpal2.pcc,ERSLaser_1);
cmCrit(M,ModeSecondaryCritical,52,adpal.pcc,adpal2.pcc,ERSLaser_2);
cmCrit(N,ModeSecondaryCritical,53,adpal.pcc,adpal2.pcc,AmmoBinLRM15);
cmCrit(I,ModeSecondaryCritical,58,adpal.pcc,adpal2.pcc,Myomers);
	#--------------------------------------
	# Heat level color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryHeat,
		thorheat.pcc,
		1       #opaque
	);

	#         color palette 'a  '   palette 'b'     subsystem
	#            -- --------------- --------------- ------------
cmHeat(H,ModeSecondaryHeat,32,heatpal.pcc,heatpal2.pcc,GeneratorA);
cmHeat(I,ModeSecondaryHeat,33,heatpal.pcc,heatpal2.pcc,GeneratorB);
cmHeat(J,ModeSecondaryHeat,34,heatpal.pcc,heatpal2.pcc,GeneratorC);
cmHeat(K,ModeSecondaryHeat,35,heatpal.pcc,heatpal2.pcc,GeneratorD);
cmHeat(L,ModeSecondaryHeat,36,heatpal.pcc,heatpal2.pcc,Condenser1);
cmHeat(M,ModeSecondaryHeat,37,heatpal.pcc,heatpal2.pcc,Condenser2);
cmHeat(N,ModeSecondaryHeat,38,heatpal.pcc,heatpal2.pcc,Condenser3);
cmHeat(O,ModeSecondaryHeat,39,heatpal.pcc,heatpal2.pcc,Condenser4);
cmHeat(H,ModeSecondaryHeat,40,heatpal.pcc,heatpal2.pcc,Condenser5);
cmHeat(I,ModeSecondaryHeat,41,heatpal.pcc,heatpal2.pcc,Condenser6);
cmHeat(K,ModeSecondaryHeat,42,heatpal.pcc,heatpal2.pcc,HUD);
cmHeat(L,ModeSecondaryHeat,43,heatpal.pcc,heatpal2.pcc,Avionics);
cmHeat(M,ModeSecondaryHeat,44,heatpal.pcc,heatpal2.pcc,Gyroscope);
cmHeat(N,ModeSecondaryHeat,45,heatpal.pcc,heatpal2.pcc,Torso);
cmHeat(O,ModeSecondaryHeat,46,heatpal.pcc,heatpal2.pcc,LRM15);
cmHeat(H,ModeSecondaryHeat,47,heatpal.pcc,heatpal2.pcc,ERPPC_1);
cmHeat(I,ModeSecondaryHeat,48,heatpal.pcc,heatpal2.pcc,ERPPC_2);
cmHeat(J,ModeSecondaryHeat,49,heatpal.pcc,heatpal2.pcc,LLaser);
cmHeat(K,ModeSecondaryHeat,50,heatpal.pcc,heatpal2.pcc,ERMLaser);
cmHeat(L,ModeSecondaryHeat,51,heatpal.pcc,heatpal2.pcc,ERSLaser_1);
cmHeat(M,ModeSecondaryHeat,52,heatpal.pcc,heatpal2.pcc,ERSLaser_2);
cmHeat(N,ModeSecondaryHeat,53,heatpal.pcc,heatpal2.pcc,AmmoBinLRM15);
cmHeat(I,ModeSecondaryHeat,58,heatpal.pcc,heatpal2.pcc,Myomers);

	#
	# We only have room for 28 critical systems (palette allocation)
	# Therefore, the following systems are ignored:

#       cmHeat(P1,????,heatpal.pcc,heatpal2.pcc,HUD);
#       cmHeat(P1,????,heatpal.pcc,heatpal2.pcc,Reservoir);
}

#=======================================================================
# Thor V1
#=======================================================================
Thr1Init
{
	#--------------------------------------
	# Normal initialization
	#--------------------------------------
	MechInit;
	#--------------------------------------
	# Heat screen mech image
	#--------------------------------------
	port = Heat;
	offset = (150,140);
	bgBitMap(
		ModeAlwaysActive,
		thorht.pcc,
		0,
		255,
		0
	);
	#--------------------------------------
	# Auxiliary gauges
	#--------------------------------------
	vehicleSubSystems(
		qthor0.pcc,
		qthor1.pcc,
		qthor2.pcc,
		qthor3.pcc,
		qthor4.pcc,
		qthor5.pcc,
		qthor6.pcc,
		qthor7.pcc
	);
	#--------------------------------------
	# Secondary
	#--------------------------------------
	offset = (0,0);
	Secondary1;

	port = sec;
	#--------------------------------------
	# Armor damage color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryDamage,
		thordama.pcc,
		1       #opaque
	);
	colorMapArmor;

	# front
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		60,
		adpal.pcc,adpal2.pcc,
		dz_dtorso,dz_hip,dz_ltorso,dz_utorso,
		unused,unused,unused,unused
	);

	#left
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		61,
		adpal.pcc,adpal2.pcc,
		dz_luleg,dz_ldleg,dz_lfoot,dz_hip,dz_ltorso,
		unused,unused,unused
	);

	#right
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		62,
		adpal.pcc,adpal2.pcc,
		dz_ruleg,dz_rdleg,dz_rfoot,dz_hip,dz_rtorso,
		unused,unused,unused
	);

	#back
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		63,
		adpal.pcc,adpal2.pcc,
		dz_reardtorso,dz_rearrtorso,dz_hip,dz_rearltorso,dz_rearutorso,
		unused,unused,unused
	);

	#--------------------------------------
	# Critical damage color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryCritical,
		thr1crit.pcc,
		1       #opaque
	);

	#         color palette 'a  '   palette 'b'     subsystem
	#            -- --------------- --------------- ------------
cmCrit(H,ModeSecondaryCritical,32,adpal.pcc,adpal2.pcc,GeneratorA);
cmCrit(I,ModeSecondaryCritical,33,adpal.pcc,adpal2.pcc,GeneratorB);
cmCrit(J,ModeSecondaryCritical,34,adpal.pcc,adpal2.pcc,GeneratorC);
cmCrit(K,ModeSecondaryCritical,35,adpal.pcc,adpal2.pcc,GeneratorD);
cmCrit(L,ModeSecondaryCritical,36,adpal.pcc,adpal2.pcc,Condenser1);
cmCrit(M,ModeSecondaryCritical,37,adpal.pcc,adpal2.pcc,Condenser2);
cmCrit(N,ModeSecondaryCritical,38,adpal.pcc,adpal2.pcc,Condenser3);
cmCrit(O,ModeSecondaryCritical,39,adpal.pcc,adpal2.pcc,Condenser4);
cmCrit(H,ModeSecondaryCritical,40,adpal.pcc,adpal2.pcc,Condenser5);
cmCrit(I,ModeSecondaryCritical,41,adpal.pcc,adpal2.pcc,Condenser6);
cmCrit(K,ModeSecondaryCritical,42,adpal.pcc,adpal2.pcc,HUD);
cmCrit(L,ModeSecondaryCritical,43,adpal.pcc,adpal2.pcc,Avionics);
cmCrit(M,ModeSecondaryCritical,44,adpal.pcc,adpal2.pcc,Gyroscope);
cmCrit(N,ModeSecondaryCritical,45,adpal.pcc,adpal2.pcc,Torso);
cmCrit(O,ModeSecondaryCritical,46,adpal.pcc,adpal2.pcc,AFC25_1);
cmCrit(H,ModeSecondaryCritical,47,adpal.pcc,adpal2.pcc,AFC25_2);
cmCrit(I,ModeSecondaryCritical,48,adpal.pcc,adpal2.pcc,LRM10);
cmCrit(J,ModeSecondaryCritical,49,adpal.pcc,adpal2.pcc,LLaser_1);
cmCrit(K,ModeSecondaryCritical,50,adpal.pcc,adpal2.pcc,LLaser_2);
cmCrit(L,ModeSecondaryCritical,51,adpal.pcc,adpal2.pcc,ERSLaser_1);
cmCrit(M,ModeSecondaryCritical,52,adpal.pcc,adpal2.pcc,ERSLaser_2);
cmCrit(N,ModeSecondaryCritical,53,adpal.pcc,adpal2.pcc,ERSLaser_3);
cmCrit(O,ModeSecondaryCritical,54,adpal.pcc,adpal2.pcc,ERSLaser_4);
cmCrit(H,ModeSecondaryCritical,55,adpal.pcc,adpal2.pcc,AmmoBinAFC25_1);
cmCrit(I,ModeSecondaryCritical,56,adpal.pcc,adpal2.pcc,AmmoBinAFC25_2);
cmCrit(J,ModeSecondaryCritical,57,adpal.pcc,adpal2.pcc,AmmoBinLRM10);
cmCrit(I,ModeSecondaryCritical,58,adpal.pcc,adpal2.pcc,Myomers);
	#--------------------------------------
	# Heat level color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryHeat,
		thr1heat.pcc,
		1       #opaque
	);

	#         color palette 'a  '   palette 'b'     subsystem
	#            -- --------------- --------------- ------------
cmHeat(H,ModeSecondaryHeat,32,heatpal.pcc,heatpal2.pcc,GeneratorA);
cmHeat(I,ModeSecondaryHeat,33,heatpal.pcc,heatpal2.pcc,GeneratorB);
cmHeat(J,ModeSecondaryHeat,34,heatpal.pcc,heatpal2.pcc,GeneratorC);
cmHeat(K,ModeSecondaryHeat,35,heatpal.pcc,heatpal2.pcc,GeneratorD);
cmHeat(L,ModeSecondaryHeat,36,heatpal.pcc,heatpal2.pcc,Condenser1);
cmHeat(M,ModeSecondaryHeat,37,heatpal.pcc,heatpal2.pcc,Condenser2);
cmHeat(N,ModeSecondaryHeat,38,heatpal.pcc,heatpal2.pcc,Condenser3);
cmHeat(O,ModeSecondaryHeat,39,heatpal.pcc,heatpal2.pcc,Condenser4);
cmHeat(H,ModeSecondaryHeat,40,heatpal.pcc,heatpal2.pcc,Condenser5);
cmHeat(I,ModeSecondaryHeat,41,heatpal.pcc,heatpal2.pcc,Condenser6);
cmHeat(K,ModeSecondaryHeat,42,heatpal.pcc,heatpal2.pcc,HUD);
cmHeat(L,ModeSecondaryHeat,43,heatpal.pcc,heatpal2.pcc,Avionics);
cmHeat(M,ModeSecondaryHeat,44,heatpal.pcc,heatpal2.pcc,Gyroscope);
cmHeat(N,ModeSecondaryHeat,45,heatpal.pcc,heatpal2.pcc,Torso);
cmHeat(O,ModeSecondaryHeat,46,heatpal.pcc,heatpal2.pcc,AFC25_1);
cmHeat(H,ModeSecondaryHeat,47,heatpal.pcc,heatpal2.pcc,AFC25_2);
cmHeat(I,ModeSecondaryHeat,48,heatpal.pcc,heatpal2.pcc,LRM10);
cmHeat(J,ModeSecondaryHeat,49,heatpal.pcc,heatpal2.pcc,LLaser_1);
cmHeat(K,ModeSecondaryHeat,50,heatpal.pcc,heatpal2.pcc,LLaser_2);
cmHeat(L,ModeSecondaryHeat,51,heatpal.pcc,heatpal2.pcc,ERSLaser_1);
cmHeat(M,ModeSecondaryHeat,52,heatpal.pcc,heatpal2.pcc,ERSLaser_2);
cmHeat(N,ModeSecondaryHeat,53,heatpal.pcc,heatpal2.pcc,ERSLaser_3);
cmHeat(O,ModeSecondaryHeat,54,heatpal.pcc,heatpal2.pcc,ERSLaser_4);
cmHeat(H,ModeSecondaryHeat,55,heatpal.pcc,heatpal2.pcc,AmmoBinAFC25_1);
cmHeat(I,ModeSecondaryHeat,56,heatpal.pcc,heatpal2.pcc,AmmoBinAFC25_2);
cmHeat(J,ModeSecondaryHeat,57,heatpal.pcc,heatpal2.pcc,AmmoBinLRM10);
cmHeat(I,ModeSecondaryHeat,58,heatpal.pcc,heatpal2.pcc,Myomers);
}

#=======================================================================
# Thor V6
#=======================================================================
Thr6Init
{
	#--------------------------------------
	# Normal initialization
	#--------------------------------------
	MechInit;
	#--------------------------------------
	# Heat screen mech image
	#--------------------------------------
	port = Heat;
	offset = (150,140);
	bgBitMap(
		ModeAlwaysActive,
		thr6ht.pcc,
		0,
		255,
		0
	);
	#--------------------------------------
	# Auxiliary gauges
	#--------------------------------------
	vehicleSubSystems(
		qthr60.pcc,
		qthr61.pcc,
		qthr62.pcc,
		qthr63.pcc,
		qthr64.pcc,
		qthr65.pcc,
		qthr66.pcc,
		qthr67.pcc
	);
	#--------------------------------------
	# Secondary
	#--------------------------------------
	offset = (0,0);
	Secondary1;

	port = sec;
	#--------------------------------------
	# Armor damage color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryDamage,
		thr6dama.pcc,
		1       #opaque
	);
	colorMapArmor;

	# front
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		60,
		adpal.pcc,adpal2.pcc,
		dz_dtorso,dz_hip,dz_ltorso,dz_utorso,
		unused,unused,unused,unused
	);

	#left
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		61,
		adpal.pcc,adpal2.pcc,
		dz_luleg,dz_ldleg,dz_lfoot,dz_hip,dz_ltorso,
		unused,unused,unused
	);

	#right
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		62,
		adpal.pcc,adpal2.pcc,
		dz_ruleg,dz_rdleg,dz_rfoot,dz_hip,dz_rtorso,
		unused,unused,unused
	);

	#back
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		63,
		adpal.pcc,adpal2.pcc,
		dz_reardtorso,dz_rearrtorso,dz_hip,dz_rearltorso,dz_rearutorso,
		unused,unused,unused
	);

	#--------------------------------------
	# Critical damage color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryCritical,
		thr6crit.pcc,
		1       #opaque
	);

	#         color palette 'a  '   palette 'b'     subsystem
	#            -- --------------- --------------- ------------
cmCrit(H,ModeSecondaryCritical,32,adpal.pcc,adpal2.pcc,GeneratorA);
cmCrit(I,ModeSecondaryCritical,33,adpal.pcc,adpal2.pcc,GeneratorB);
cmCrit(J,ModeSecondaryCritical,34,adpal.pcc,adpal2.pcc,GeneratorC);
cmCrit(K,ModeSecondaryCritical,35,adpal.pcc,adpal2.pcc,GeneratorD);
cmCrit(L,ModeSecondaryCritical,36,adpal.pcc,adpal2.pcc,Condenser1);
cmCrit(M,ModeSecondaryCritical,37,adpal.pcc,adpal2.pcc,Condenser2);
cmCrit(N,ModeSecondaryCritical,38,adpal.pcc,adpal2.pcc,Condenser3);
cmCrit(O,ModeSecondaryCritical,39,adpal.pcc,adpal2.pcc,Condenser4);
cmCrit(H,ModeSecondaryCritical,40,adpal.pcc,adpal2.pcc,Condenser5);
cmCrit(I,ModeSecondaryCritical,41,adpal.pcc,adpal2.pcc,Condenser6);
cmCrit(K,ModeSecondaryCritical,42,adpal.pcc,adpal2.pcc,HUD);
cmCrit(L,ModeSecondaryCritical,43,adpal.pcc,adpal2.pcc,Avionics);
cmCrit(M,ModeSecondaryCritical,44,adpal.pcc,adpal2.pcc,Gyroscope);
cmCrit(N,ModeSecondaryCritical,45,adpal.pcc,adpal2.pcc,Torso);
cmCrit(O,ModeSecondaryCritical,46,adpal.pcc,adpal2.pcc,ERPPC);
cmCrit(H,ModeSecondaryCritical,47,adpal.pcc,adpal2.pcc,ERLLaser);
cmCrit(I,ModeSecondaryCritical,48,adpal.pcc,adpal2.pcc,NRK10);
cmCrit(J,ModeSecondaryCritical,49,adpal.pcc,adpal2.pcc,ERMLaser_1);
cmCrit(K,ModeSecondaryCritical,50,adpal.pcc,adpal2.pcc,ERMLaser_2);
cmCrit(L,ModeSecondaryCritical,51,adpal.pcc,adpal2.pcc,MG_1);
cmCrit(M,ModeSecondaryCritical,52,adpal.pcc,adpal2.pcc,MG_2);
cmCrit(N,ModeSecondaryCritical,53,adpal.pcc,adpal2.pcc,MG_3);
cmCrit(O,ModeSecondaryCritical,54,adpal.pcc,adpal2.pcc,MG_4);
cmCrit(H,ModeSecondaryCritical,55,adpal.pcc,adpal2.pcc,MG_5);
cmCrit(I,ModeSecondaryCritical,56,adpal.pcc,adpal2.pcc,AmmoBinNRK10);
cmCrit(J,ModeSecondaryCritical,58,adpal.pcc,adpal2.pcc,Myomers);
	#--------------------------------------
	# Heat level color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryHeat,
		thr6heat.pcc,
		1       #opaque
	);

	#         color palette 'a  '   palette 'b'     subsystem
	#            -- --------------- --------------- ------------
cmHeat(H,ModeSecondaryHeat,32,heatpal.pcc,heatpal2.pcc,GeneratorA);
cmHeat(I,ModeSecondaryHeat,33,heatpal.pcc,heatpal2.pcc,GeneratorB);
cmHeat(J,ModeSecondaryHeat,34,heatpal.pcc,heatpal2.pcc,GeneratorC);
cmHeat(K,ModeSecondaryHeat,35,heatpal.pcc,heatpal2.pcc,GeneratorD);
cmHeat(L,ModeSecondaryHeat,36,heatpal.pcc,heatpal2.pcc,Condenser1);
cmHeat(M,ModeSecondaryHeat,37,heatpal.pcc,heatpal2.pcc,Condenser2);
cmHeat(N,ModeSecondaryHeat,38,heatpal.pcc,heatpal2.pcc,Condenser3);
cmHeat(O,ModeSecondaryHeat,39,heatpal.pcc,heatpal2.pcc,Condenser4);
cmHeat(H,ModeSecondaryHeat,40,heatpal.pcc,heatpal2.pcc,Condenser5);
cmHeat(I,ModeSecondaryHeat,41,heatpal.pcc,heatpal2.pcc,Condenser6);
cmHeat(K,ModeSecondaryHeat,42,heatpal.pcc,heatpal2.pcc,HUD);
cmHeat(L,ModeSecondaryHeat,43,heatpal.pcc,heatpal2.pcc,Avionics);
cmHeat(M,ModeSecondaryHeat,44,heatpal.pcc,heatpal2.pcc,Gyroscope);
cmHeat(N,ModeSecondaryHeat,45,heatpal.pcc,heatpal2.pcc,Torso);
cmHeat(O,ModeSecondaryHeat,46,heatpal.pcc,heatpal2.pcc,ERPPC);
cmHeat(H,ModeSecondaryHeat,47,heatpal.pcc,heatpal2.pcc,ERLLaser);
cmHeat(I,ModeSecondaryHeat,48,heatpal.pcc,heatpal2.pcc,NRK10);
cmHeat(J,ModeSecondaryHeat,49,heatpal.pcc,heatpal2.pcc,ERMLaser_1);
cmHeat(K,ModeSecondaryHeat,50,heatpal.pcc,heatpal2.pcc,ERMLaser_2);
cmHeat(L,ModeSecondaryHeat,51,heatpal.pcc,heatpal2.pcc,MG_1);
cmHeat(M,ModeSecondaryHeat,52,heatpal.pcc,heatpal2.pcc,MG_2);
cmHeat(N,ModeSecondaryHeat,53,heatpal.pcc,heatpal2.pcc,MG_3);
cmHeat(O,ModeSecondaryHeat,54,heatpal.pcc,heatpal2.pcc,MG_4);
cmHeat(H,ModeSecondaryHeat,55,heatpal.pcc,heatpal2.pcc,MG_5);
cmHeat(I,ModeSecondaryHeat,56,heatpal.pcc,heatpal2.pcc,AmmoBinNRK10);
cmHeat(J,ModeSecondaryHeat,58,heatpal.pcc,heatpal2.pcc,Myomers);
}

#=======================================================================
# Owens
#=======================================================================
OwensInit
{
	#--------------------------------------
	# Normal initialization
	#--------------------------------------
	MechInit;
	#--------------------------------------
	# Heat screen mech image
	#--------------------------------------
	port = Heat;
	offset = (150,140);
	bgBitMap(
		ModeAlwaysActive,
		owenht.pcc,
		0,
		255,
		0
	);
	#--------------------------------------
	# Auxiliary gauges
	#--------------------------------------
	vehicleSubSystems(
		qowen0.pcc,
		qowen1.pcc,
		qowen2.pcc,
		qowen3.pcc,
		qowen4.pcc,
		qowen5.pcc,
		qowen6.pcc,
		qowen7.pcc
	);
	#--------------------------------------
	# Secondary
	#--------------------------------------
	offset = (0,0);
	Secondary1;

	port = sec;
	#--------------------------------------
	# Armor damage color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryDamage,
		owendama.pcc,
		1       #opaque
	);

	colorMapArmor;

	# front
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		60,
		adpal.pcc,adpal2.pcc,
		dz_dtorso,dz_ftorso,dz_ltorso,dz_utorso,
		unused,unused,unused,unused
	);

	#left
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		61,
		adpal.pcc,adpal2.pcc,
		dz_luleg,dz_ldleg,dz_lfoot,dz_ltorso,
		unused,unused,unused,unused
	);

	#right
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		62,
		adpal.pcc,adpal2.pcc,
		dz_ruleg,dz_rdleg,dz_rfoot,dz_rtorso,
		unused,unused,unused,unused
	);

	#back
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		63,
		adpal.pcc,adpal2.pcc,
		dz_reardtorso,dz_rearrtorso,dz_rearltorso,dz_rearutorso,
		unused,unused,unused,unused
	);

	#--------------------------------------
	# Critical damage color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryCritical,
		owencrit.pcc,
		1       #opaque
	);

	#         color palette 'a  '   palette 'b'     subsystem
	#            -- --------------- --------------- ------------
cmCrit(H,ModeSecondaryCritical,32,adpal.pcc,adpal2.pcc,GeneratorA);
cmCrit(I,ModeSecondaryCritical,33,adpal.pcc,adpal2.pcc,GeneratorB);
cmCrit(J,ModeSecondaryCritical,34,adpal.pcc,adpal2.pcc,GeneratorC);
cmCrit(K,ModeSecondaryCritical,35,adpal.pcc,adpal2.pcc,GeneratorD);
cmCrit(L,ModeSecondaryCritical,36,adpal.pcc,adpal2.pcc,Condenser1);
cmCrit(M,ModeSecondaryCritical,37,adpal.pcc,adpal2.pcc,Condenser2);
cmCrit(N,ModeSecondaryCritical,38,adpal.pcc,adpal2.pcc,Condenser3);
cmCrit(O,ModeSecondaryCritical,39,adpal.pcc,adpal2.pcc,Condenser4);
cmCrit(H,ModeSecondaryCritical,40,adpal.pcc,adpal2.pcc,Condenser5);
cmCrit(I,ModeSecondaryCritical,41,adpal.pcc,adpal2.pcc,Condenser6);
cmCrit(K,ModeSecondaryCritical,42,adpal.pcc,adpal2.pcc,HUD);
cmCrit(L,ModeSecondaryCritical,43,adpal.pcc,adpal2.pcc,Avionics);
cmCrit(M,ModeSecondaryCritical,44,adpal.pcc,adpal2.pcc,Gyroscope);
cmCrit(N,ModeSecondaryCritical,45,adpal.pcc,adpal2.pcc,Torso);
cmCrit(O,ModeSecondaryCritical,46,adpal.pcc,adpal2.pcc,SRM6_1);
cmCrit(H,ModeSecondaryCritical,47,adpal.pcc,adpal2.pcc,SRM6_2);
cmCrit(I,ModeSecondaryCritical,48,adpal.pcc,adpal2.pcc,ERMLaser_1);
cmCrit(J,ModeSecondaryCritical,49,adpal.pcc,adpal2.pcc,ERMLaser_2);
cmCrit(K,ModeSecondaryCritical,50,adpal.pcc,adpal2.pcc,ERSLaser_1);
cmCrit(L,ModeSecondaryCritical,51,adpal.pcc,adpal2.pcc,ERSLaser_2);
cmCrit(M,ModeSecondaryCritical,52,adpal.pcc,adpal2.pcc,ERSLaser_3);
cmCrit(N,ModeSecondaryCritical,53,adpal.pcc,adpal2.pcc,ERSLaser_4);
cmCrit(O,ModeSecondaryCritical,54,adpal.pcc,adpal2.pcc,AmmoBinSRM6_1);
cmCrit(H,ModeSecondaryCritical,55,adpal.pcc,adpal2.pcc,AmmoBinSRM6_2);
cmCrit(I,ModeSecondaryCritical,58,adpal.pcc,adpal2.pcc,Myomers);
cmCrit(J,ModeSecondaryCritical,59,adpal.pcc,adpal2.pcc,Myomers2);

	#--------------------------------------
	# Heat level color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryHeat,
		owenheat.pcc,
		1       #opaque
	);

	#         color palette 'a  '   palette 'b'     subsystem
	#            -- --------------- --------------- ------------
cmHeat(H,ModeSecondaryHeat,32,heatpal.pcc,heatpal2.pcc,GeneratorA);
cmHeat(I,ModeSecondaryHeat,33,heatpal.pcc,heatpal2.pcc,GeneratorB);
cmHeat(J,ModeSecondaryHeat,34,heatpal.pcc,heatpal2.pcc,GeneratorC);
cmHeat(K,ModeSecondaryHeat,35,heatpal.pcc,heatpal2.pcc,GeneratorD);
cmHeat(L,ModeSecondaryHeat,36,heatpal.pcc,heatpal2.pcc,Condenser1);
cmHeat(M,ModeSecondaryHeat,37,heatpal.pcc,heatpal2.pcc,Condenser2);
cmHeat(N,ModeSecondaryHeat,38,heatpal.pcc,heatpal2.pcc,Condenser3);
cmHeat(O,ModeSecondaryHeat,39,heatpal.pcc,heatpal2.pcc,Condenser4);
cmHeat(H,ModeSecondaryHeat,40,heatpal.pcc,heatpal2.pcc,Condenser5);
cmHeat(I,ModeSecondaryHeat,41,heatpal.pcc,heatpal2.pcc,Condenser6);
cmHeat(K,ModeSecondaryHeat,42,heatpal.pcc,heatpal2.pcc,HUD);
cmHeat(L,ModeSecondaryHeat,43,heatpal.pcc,heatpal2.pcc,Avionics);
cmHeat(M,ModeSecondaryHeat,44,heatpal.pcc,heatpal2.pcc,Gyroscope);
cmHeat(N,ModeSecondaryHeat,45,heatpal.pcc,heatpal2.pcc,Torso);
cmHeat(O,ModeSecondaryHeat,46,heatpal.pcc,heatpal2.pcc,SRM6_1);
cmHeat(H,ModeSecondaryHeat,47,heatpal.pcc,heatpal2.pcc,SRM6_2);
cmHeat(I,ModeSecondaryHeat,48,heatpal.pcc,heatpal2.pcc,ERMLaser_1);
cmHeat(J,ModeSecondaryHeat,49,heatpal.pcc,heatpal2.pcc,ERMLaser_2);
cmHeat(K,ModeSecondaryHeat,50,heatpal.pcc,heatpal2.pcc,ERSLaser_1);
cmHeat(L,ModeSecondaryHeat,51,heatpal.pcc,heatpal2.pcc,ERSLaser_2);
cmHeat(M,ModeSecondaryHeat,52,heatpal.pcc,heatpal2.pcc,ERSLaser_3);
cmHeat(N,ModeSecondaryHeat,53,heatpal.pcc,heatpal2.pcc,ERSLaser_4);
cmHeat(O,ModeSecondaryHeat,54,heatpal.pcc,heatpal2.pcc,AmmoBinSRM6_1);
cmHeat(H,ModeSecondaryHeat,55,heatpal.pcc,heatpal2.pcc,AmmoBinSRM6_2);
cmHeat(I,ModeSecondaryHeat,58,heatpal.pcc,heatpal2.pcc,Myomers);
cmHeat(J,ModeSecondaryHeat,59,heatpal.pcc,heatpal2.pcc,Myomers2);
}

#=======================================================================
# Owens V1
#=======================================================================
Own1Init
{
	#--------------------------------------
	# Normal initialization
	#--------------------------------------
	MechInit;
	#--------------------------------------
	# Heat screen mech image
	#--------------------------------------
	port = Heat;
	offset = (150,140);
	bgBitMap(
		ModeAlwaysActive,
		owenht.pcc,
		0,
		255,
		0
	);
	#--------------------------------------
	# Auxiliary gauges
	#--------------------------------------
	vehicleSubSystems(
		qowen0.pcc,
		qowen1.pcc,
		qowen2.pcc,
		qowen3.pcc,
		qowen4.pcc,
		qowen5.pcc,
		qowen6.pcc,
		qowen7.pcc
	);
	#--------------------------------------
	# Secondary
	#--------------------------------------
	offset = (0,0);
	Secondary1;

	port = sec;
	#--------------------------------------
	# Armor damage color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryDamage,
		owendama.pcc,
		1       #opaque
	);

	colorMapArmor;

	# front
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		60,
		adpal.pcc,adpal2.pcc,
		dz_dtorso,dz_ftorso,dz_ltorso,dz_utorso,
		unused,unused,unused,unused
	);

	#left
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		61,
		adpal.pcc,adpal2.pcc,
		dz_luleg,dz_ldleg,dz_lfoot,dz_ltorso,
		unused,unused,unused,unused
	);

	#right
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		62,
		adpal.pcc,adpal2.pcc,
		dz_ruleg,dz_rdleg,dz_rfoot,dz_rtorso,
		unused,unused,unused,unused
	);

	#back
	colorMapperMultiArmor(
		O,ModeAlwaysActive,
		63,
		adpal.pcc,adpal2.pcc,
		dz_reardtorso,dz_rearrtorso,dz_rearltorso,dz_rearutorso,
		unused,unused,unused,unused
	);

	#--------------------------------------
	# Critical damage color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryCritical,
		own1crit.pcc,
		1       #opaque
	);

	#         color palette 'a  '   palette 'b'     subsystem
	#            -- --------------- --------------- ------------
cmCrit(H,ModeSecondaryCritical,32,adpal.pcc,adpal2.pcc,GeneratorA);
cmCrit(I,ModeSecondaryCritical,33,adpal.pcc,adpal2.pcc,GeneratorB);
cmCrit(J,ModeSecondaryCritical,34,adpal.pcc,adpal2.pcc,GeneratorC);
cmCrit(K,ModeSecondaryCritical,35,adpal.pcc,adpal2.pcc,GeneratorD);
cmCrit(L,ModeSecondaryCritical,36,adpal.pcc,adpal2.pcc,Condenser1);
cmCrit(M,ModeSecondaryCritical,37,adpal.pcc,adpal2.pcc,Condenser2);
cmCrit(N,ModeSecondaryCritical,38,adpal.pcc,adpal2.pcc,Condenser3);
cmCrit(O,ModeSecondaryCritical,39,adpal.pcc,adpal2.pcc,Condenser4);
cmCrit(H,ModeSecondaryCritical,40,adpal.pcc,adpal2.pcc,Condenser5);
cmCrit(I,ModeSecondaryCritical,41,adpal.pcc,adpal2.pcc,Condenser6);
cmCrit(K,ModeSecondaryCritical,42,adpal.pcc,adpal2.pcc,HUD);
cmCrit(L,ModeSecondaryCritical,43,adpal.pcc,adpal2.pcc,Avionics);
cmCrit(M,ModeSecondaryCritical,44,adpal.pcc,adpal2.pcc,Gyroscope);
cmCrit(N,ModeSecondaryCritical,45,adpal.pcc,adpal2.pcc,Torso);
cmCrit(O,ModeSecondaryCritical,46,adpal.pcc,adpal2.pcc,NRK5_1);
cmCrit(H,ModeSecondaryCritical,47,adpal.pcc,adpal2.pcc,NRK5_2);
cmCrit(I,ModeSecondaryCritical,48,adpal.pcc,adpal2.pcc,AFC25);
cmCrit(J,ModeSecondaryCritical,49,adpal.pcc,adpal2.pcc,ERMLaser);
cmCrit(K,ModeSecondaryCritical,50,adpal.pcc,adpal2.pcc,ERSLaser);
cmCrit(L,ModeSecondaryCritical,51,adpal.pcc,adpal2.pcc,AmmoBinNRK5_1);
cmCrit(M,ModeSecondaryCritical,52,adpal.pcc,adpal2.pcc,AmmoBinNRK5_2);
cmCrit(N,ModeSecondaryCritical,53,adpal.pcc,adpal2.pcc,AmmoBinAFC25);
cmCrit(O,ModeSecondaryCritical,59,adpal.pcc,adpal2.pcc,Myomers);

	#--------------------------------------
	# Heat level color mapping
	#--------------------------------------
	offset = (50,0);
	bgPixelMap(
		ModeSecondaryHeat,
		own1heat.pcc,
		1       #opaque
	);

	#         color palette 'a  '   palette 'b'     subsystem
	#            -- --------------- --------------- ------------
cmHeat(H,ModeSecondaryHeat,32,heatpal.pcc,heatpal2.pcc,GeneratorA);
cmHeat(I,ModeSecondaryHeat,33,heatpal.pcc,heatpal2.pcc,GeneratorB);
cmHeat(J,ModeSecondaryHeat,34,heatpal.pcc,heatpal2.pcc,GeneratorC);
cmHeat(K,ModeSecondaryHeat,35,heatpal.pcc,heatpal2.pcc,GeneratorD);
cmHeat(L,ModeSecondaryHeat,36,heatpal.pcc,heatpal2.pcc,Condenser1);
cmHeat(M,ModeSecondaryHeat,37,heatpal.pcc,heatpal2.pcc,Condenser2);
cmHeat(N,ModeSecondaryHeat,38,heatpal.pcc,heatpal2.pcc,Condenser3);
cmHeat(O,ModeSecondaryHeat,39,heatpal.pcc,heatpal2.pcc,Condenser4);
cmHeat(H,ModeSecondaryHeat,40,heatpal.pcc,heatpal2.pcc,Condenser5);
cmHeat(I,ModeSecondaryHeat,41,heatpal.pcc,heatpal2.pcc,Condenser6);
cmHeat(K,ModeSecondaryHeat,42,heatpal.pcc,heatpal2.pcc,HUD);
cmHeat(L,ModeSecondaryHeat,43,heatpal.pcc,heatpal2.pcc,Avionics);
cmHeat(M,ModeSecondaryHeat,44,heatpal.pcc,heatpal2.pcc,Gyroscope);
cmHeat(N,ModeSecondaryHeat,45,heatpal.pcc,heatpal2.pcc,Torso);
cmHeat(O,ModeSecondaryHeat,46,heatpal.pcc,heatpal2.pcc,NRK5_1);
cmHeat(H,ModeSecondaryHeat,47,heatpal.pcc,heatpal2.pcc,NRK5_2);
cmHeat(I,ModeSecondaryHeat,48,heatpal.pcc,heatpal2.pcc,AFC25);
cmHeat(J,ModeSecondaryHeat,49,heatpal.pcc,heatpal2.pcc,ERMLaser);
cmHeat(K,ModeSecondaryHeat,50,heatpal.pcc,heatpal2.pcc,ERSLaser);
cmHeat(L,ModeSecondaryHeat,51,heatpal.pcc,heatpal2.pcc,AmmoBinNRK5_1);
cmHeat(M,ModeSecondaryHeat,52,heatpal.pcc,heatpal2.pcc,AmmoBinNRK5_2);
cmHeat(N,ModeSecondaryHeat,53,heatpal.pcc,heatpal2.pcc,AmmoBinAFC25);
cmHeat(O,ModeSecondaryHeat,59,heatpal.pcc,heatpal2.pcc,Myomers);
}

########################################################################
# General routines
########################################################################
#-----------------------------------------------------------------------
# Normal initialization
#-----------------------------------------------------------------------
MechInit
{
	#--------------------------------------
	# Display configuration
	#--------------------------------------
	configure(0,sec,    270,0x003F,clut0,rgb,btspal.pcc);
	configure(1,overlay,270,0x00C0,clut0,rgbTransparent,btopal.pcc);

	configure(2,Mfd1,  0,0x0100,clut1,red,  NULL); # LL 1
	configure(3,Eng1,  0,0x0200,clut1,blank,NULL); # LL 2

	configure(4,Mfd2,  0,0x0400,clut2,green,NULL); # UC 1
	configure(5,Eng2,  0,0x0800,clut2,blank,NULL); # UC 2

	configure(6,Mfd3,  0,0x1000,clut1,green,NULL); # LR 1
	configure(7,Eng3,  0,0x2000,clut2,blank,NULL); # LR 2

	configure(8,Heat,  0,0x4000,clut2,blue, NULL); # UL
	configure(9,Comm,  0,0x8000,clut2,red,  NULL); # UR

	externalConfigure(10,Plasma,0xFF);
	#--------------------------------------
	# Auxiliary backgrounds
	#--------------------------------------
	offset = (0,0);
	port = Mfd1; bgBitMap(ModeAlwaysActive,btquad.pcx,0,255,0);
	port = Mfd2; bgBitMap(ModeAlwaysActive,btquad.pcx,0,255,0);
	port = Mfd3; bgBitMap(ModeAlwaysActive,btquad.pcx,0,255,0);
	port = Eng1; bgBitMap(ModeAlwaysActive,bteng.pcx,0,255,0);
	port = Eng2; bgBitMap(ModeAlwaysActive,bteng.pcx,0,255,0);
	port = Eng3; bgBitMap(ModeAlwaysActive,bteng.pcx,0,255,0);
	#--------------------------------------
	# Heat gauges
	#--------------------------------------
	port = Heat;
	offset = (0,0);
	bgBitMap(ModeAlwaysActive,btheat.pcx,0,255,0);
	#------------------------
	# Condenser 1
	#------------------------
	@0 = Condenser1/NormalizedPressure;
	@1 = Condenser1/DegradationPressure;
	@2 = Condenser1/ValveSetting;

	@3 = Condenser1/CurrentTemperature;
	@4 = Condenser1/DegradationTemperature;
	@5 = Condenser1/FailureTemperature;

	@6 = Condenser1/CoolantMassLeakRate;

	@7 = Condenser1/SimulationState;
	offset = (2,353); GenericHeatGauges1;
	#------------------------
	# Condenser 2
	#------------------------
	@0 = Condenser2/NormalizedPressure;
	@1 = Condenser2/DegradationPressure;
	@2 = Condenser2/ValveSetting;

	@3 = Condenser2/CurrentTemperature;
	@4 = Condenser2/DegradationTemperature;
	@5 = Condenser2/FailureTemperature;

	@6 = Condenser2/CoolantMassLeakRate;

	@7 = Condenser2/SimulationState;
	offset = (161,353); GenericHeatGauges2;
	#------------------------
	# Condenser 3
	#------------------------
	@0 = Condenser3/NormalizedPressure;
	@1 = Condenser3/DegradationPressure;
	@2 = Condenser3/ValveSetting;

	@3 = Condenser3/CurrentTemperature;
	@4 = Condenser3/DegradationTemperature;
	@5 = Condenser3/FailureTemperature;

	@6 = Condenser3/CoolantMassLeakRate;

	@7 = Condenser3/SimulationState;
	offset = (321,353); GenericHeatGauges1;
	#------------------------
	# Condenser 4
	#------------------------
	@0 = Condenser4/NormalizedPressure;
	@1 = Condenser4/DegradationPressure;
	@2 = Condenser4/ValveSetting;

	@3 = Condenser4/CurrentTemperature;
	@4 = Condenser4/DegradationTemperature;
	@5 = Condenser4/FailureTemperature;

	@6 = Condenser4/CoolantMassLeakRate;

	@7 = Condenser4/SimulationState;
	offset = (2,7); GenericHeatGauges2;
	#------------------------
	# Condenser 5
	#------------------------
	@0 = Condenser5/NormalizedPressure;
	@1 = Condenser5/DegradationPressure;
	@2 = Condenser5/ValveSetting;

	@3 = Condenser5/CurrentTemperature;
	@4 = Condenser5/DegradationTemperature;
	@5 = Condenser5/FailureTemperature;

	@6 = Condenser5/CoolantMassLeakRate;

	@7 = Condenser5/SimulationState;
	offset = (161,7); GenericHeatGauges1;
	#------------------------
	# Condenser 6
	#------------------------
	@0 = Condenser6/NormalizedPressure;
	@1 = Condenser6/DegradationPressure;
	@2 = Condenser6/ValveSetting;

	@3 = Condenser6/CurrentTemperature;
	@4 = Condenser6/DegradationTemperature;
	@5 = Condenser6/FailureTemperature;

	@6 = Condenser6/CoolantMassLeakRate;

	@7 = Condenser6/SimulationState;
	offset = (321,7); GenericHeatGauges2;
	#------------------------
	# Coolant
	#------------------------
	offset = (585,272);
	vertBar(
		C,ModeAlwaysActive,
		(31,160),
		btwarn.pcc,
		255,255,0,
		Reservoir/CoolantMass,          # current
		Reservoir/CoolantCapacity,      # warn
		Reservoir/CoolantCapacity       # max
	);

	offset = (585,226);
	vertBar(
		B,ModeAlwaysActive,
		(31,40),
		btwarn.pcc,
		255,255,0,
		HeatSink/CoolantMass,           # current
		HeatSink/CoolantCapacity,       # warn
		HeatSink/CoolantCapacity        # max
	);
	#------------------------
	# Ambient temperature
	#------------------------
	offset = (502,320);
	numeric(
		R,ModeAlwaysActive,
		(62,27),
		smlfont.pcc,
		4,
		signedBlankedZeros,
		0,255,
		HeatSink/AmbientTemperature
	);

	#------------------------
	# Heatsink temperature
	#------------------------
	offset = (502,238);
	numeric(
		S,ModeAlwaysActive,
		(62,27),
		smlfont.pcc,
		4,
		signedBlankedZeros,
		0,255,
		HeatSink/CurrentTemperature
	);

	#--------------------------------------
	# Comm/score gauges
	#--------------------------------------
	port = Comm;
	offset = (0,0); bgBitMap(ModeAlwaysActive,btcomm.pcx,0,255,0);

	pilotList(
		C,ModeAlwaysActive,
		bigfont.pcc
	);
	#--------------------------------------
	# External displays
	#--------------------------------------
	port = Plasma;
	offset=(33,0);
	rankAndScore(N,ModePlasmaDisplay,tinyfont.pcc,1,0);
	#--------------------------------------
	# Auxiliary modes
	#--------------------------------------
	port = Mfd1;
	reconfigure(ModeMFD1Quad, 3, clut1, blank, NULL);
	reconfigure(ModeMFD1Quad, 2, clut1, red, NULL);

	port = Eng1;
	reconfigure(ModeMFD1Eng1, 2, clut1, blank, NULL);
	reconfigure(ModeMFD1Eng1, 3, clut1, red, NULL);
	prepEngr(
		ModeMFD1Eng1,
		1,
		helv42.pcc,
		escnd.pcc,
		edmg.pcc,
		bteslev.pcc,
		bteunjm.pcc,
		espeed.pcc,
		btesrnge.pcc
	);

	reconfigure(ModeMFD1Eng2, 2, clut1, blank, NULL);
	reconfigure(ModeMFD1Eng2, 3, clut1, red, NULL);
	prepEngr(
		ModeMFD1Eng2,
		2,
		helv42.pcc,
		escnd.pcc,
		edmg.pcc,
		bteslev.pcc,
		bteunjm.pcc,
		espeed.pcc,
		btesrnge.pcc
	);

	reconfigure(ModeMFD1Eng3, 2, clut1, blank, NULL);
	reconfigure(ModeMFD1Eng3, 3, clut1, red, NULL);
	prepEngr(
		ModeMFD1Eng3,
		3,
		helv42.pcc,
		escnd.pcc,
		edmg.pcc,
		bteslev.pcc,
		bteunjm.pcc,
		espeed.pcc,
		btesrnge.pcc
	);

	reconfigure(ModeMFD1Eng4, 2, clut1, blank, NULL);
	reconfigure(ModeMFD1Eng4, 3, clut1, red, NULL);
	prepEngr(
		ModeMFD1Eng4,
		4,
		helv42.pcc,
		escnd.pcc,
		edmg.pcc,
		bteslev.pcc,
		bteunjm.pcc,
		espeed.pcc,
		btesrnge.pcc
	);
	#--------------------------------------
	port = Mfd2;
	reconfigure(ModeMFD2Quad, 5, clut2, blank, NULL);
	reconfigure(ModeMFD2Quad, 4, clut2, green, NULL);

	port = Eng2;
	reconfigure(ModeMFD2Eng1, 4, clut2, blank, NULL);
	reconfigure(ModeMFD2Eng1, 5, clut2, green, NULL);
	prepEngr(
		ModeMFD2Eng1,
		5,
		helv42.pcc,
		escnd.pcc,
		edmg.pcc,
		bteslev.pcc,
		bteunjm.pcc,
		espeed.pcc,
		btesrnge.pcc
	);

	reconfigure(ModeMFD2Eng2, 4, clut2, blank, NULL);
	reconfigure(ModeMFD2Eng2, 5, clut2, green, NULL);
	prepEngr(
		ModeMFD2Eng2,
		6,
		helv42.pcc,
		escnd.pcc,
		edmg.pcc,
		bteslev.pcc,
		bteunjm.pcc,
		espeed.pcc,
		btesrnge.pcc
	);

	reconfigure(ModeMFD2Eng3, 4, clut2, blank, NULL);
	reconfigure(ModeMFD2Eng3, 5, clut2, green, NULL);
	prepEngr(
		ModeMFD2Eng3,
		7,
		helv42.pcc,
		escnd.pcc,
		edmg.pcc,
		bteslev.pcc,
		bteunjm.pcc,
		espeed.pcc,
		btesrnge.pcc
	);

	reconfigure(ModeMFD2Eng4, 4, clut2, blank, NULL);
	reconfigure(ModeMFD2Eng4, 5, clut2, green, NULL);
	prepEngr(
		ModeMFD2Eng4,
		8,
		helv42.pcc,
		escnd.pcc,
		edmg.pcc,
		bteslev.pcc,
		bteunjm.pcc,
		espeed.pcc,
		btesrnge.pcc
	);
	#--------------------------------------
	port = Mfd3;
	reconfigure(ModeMFD3Quad, 7, clut1, blank, NULL);
	reconfigure(ModeMFD3Quad, 6, clut1, green, NULL);

	port = Eng3;
	reconfigure(ModeMFD3Eng1, 6, clut1, blank, NULL);
	reconfigure(ModeMFD3Eng1, 7, clut1, green, NULL);
	prepEngr(
		ModeMFD3Eng1,
		9,
		helv42.pcc,
		escnd.pcc,
		edmg.pcc,
		bteslev.pcc,
		bteunjm.pcc,
		espeed.pcc,
		btesrnge.pcc
	);

	reconfigure(ModeMFD3Eng2, 6, clut1, blank, NULL);
	reconfigure(ModeMFD3Eng2, 7, clut1, green, NULL);
	prepEngr(
		ModeMFD3Eng2,
		10,
		helv42.pcc,
		escnd.pcc,
		edmg.pcc,
		bteslev.pcc,
		bteunjm.pcc,
		espeed.pcc,
		btesrnge.pcc
	);

	reconfigure(ModeMFD3Eng3, 6, clut1, blank, NULL);
	reconfigure(ModeMFD3Eng3, 7, clut1, green, NULL);
	prepEngr(
		ModeMFD3Eng3,
		11,
		helv42.pcc,
		escnd.pcc,
		edmg.pcc,
		bteslev.pcc,
		bteunjm.pcc,
		espeed.pcc,
		btesrnge.pcc
	);

	reconfigure(ModeMFD3Eng4, 6, clut1, blank, NULL);
	reconfigure(ModeMFD3Eng4, 7, clut1, green, NULL);
	prepEngr(
		ModeMFD3Eng4,
		12,
		helv42.pcc,
		escnd.pcc,
		edmg.pcc,
		bteslev.pcc,
		bteunjm.pcc,
		espeed.pcc,
		btesrnge.pcc
	);
}

#-----------------------------------------------------------------------
# Intercom enabled by system
#-----------------------------------------------------------------------
IntercomEnable
{
}

#-----------------------------------------------------------------------
# Generic 'color map armor'
# (Note: not all vehicles use all these zones: unidentified
# zones are set to black)
#-----------------------------------------------------------------------
colorMapArmor
{
	# Mode             color palette 'a' palette 'b'  zone
	# ----------------    -- ----------- ---------- -------------
###cmArmor(H,ModeSecondaryDamage,32,adpal.pcc,adpal2.pcc,dz_door);
cmArmor(H,ModeSecondaryDamage,32,adpal.pcc,adpal2.pcc,dz_missle);
cmArmor(I,ModeSecondaryDamage,33,adpal.pcc,adpal2.pcc,dz_dtorso);
cmArmor(J,ModeSecondaryDamage,34,adpal.pcc,adpal2.pcc,dz_hip);
cmArmor(K,ModeSecondaryDamage,35,adpal.pcc,adpal2.pcc,dz_larm);
cmArmor(L,ModeSecondaryDamage,36,adpal.pcc,adpal2.pcc,dz_ldleg);
cmArmor(N,ModeSecondaryDamage,37,adpal.pcc,adpal2.pcc,dz_lfoot);
cmArmor(O,ModeSecondaryDamage,38,adpal.pcc,adpal2.pcc,dz_lgun);
cmArmor(H,ModeSecondaryDamage,39,adpal.pcc,adpal2.pcc,dz_ltorso);
cmArmor(I,ModeSecondaryDamage,40,adpal.pcc,adpal2.pcc,dz_luleg);
cmArmor(J,ModeSecondaryDamage,41,adpal.pcc,adpal2.pcc,dz_missle);
cmArmor(K,ModeSecondaryDamage,42,adpal.pcc,adpal2.pcc,dz_rarm);
cmArmor(L,ModeSecondaryDamage,43,adpal.pcc,adpal2.pcc,dz_rdleg);
cmArmor(M,ModeSecondaryDamage,44,adpal.pcc,adpal2.pcc,dz_rfoot);
cmArmor(N,ModeSecondaryDamage,45,adpal.pcc,adpal2.pcc,dz_rgun);
cmArmor(O,ModeSecondaryDamage,46,adpal.pcc,adpal2.pcc,dz_rtorso);
cmArmor(H,ModeSecondaryDamage,47,adpal.pcc,adpal2.pcc,dz_ruleg);
cmArmor(I,ModeSecondaryDamage,48,adpal.pcc,adpal2.pcc,dz_searchlight);
cmArmor(J,ModeSecondaryDamage,49,adpal.pcc,adpal2.pcc,dz_utorso);
cmArmor(K,ModeSecondaryDamage,50,adpal.pcc,adpal2.pcc,dz_reardtorso);
cmArmor(L,ModeSecondaryDamage,51,adpal.pcc,adpal2.pcc,dz_rearltorso);
cmArmor(M,ModeSecondaryDamage,52,adpal.pcc,adpal2.pcc,dz_rearrtorso);
cmArmor(N,ModeSecondaryDamage,53,adpal.pcc,adpal2.pcc,dz_rearutorso);
cmArmor(O,ModeSecondaryDamage,54,adpal.pcc,adpal2.pcc,dz_lmissle);
cmArmor(H,ModeSecondaryDamage,55,adpal.pcc,adpal2.pcc,dz_rmissle);
cmArmor(I,ModeSecondaryDamage,56,adpal.pcc,adpal2.pcc,dz_ftorso);
cmArmor(J,ModeSecondaryDamage,57,adpal.pcc,adpal2.pcc,dz_btorso);
			     #58 available
			     #59 available
}

#-----------------------------------------------------------------------
# Generic "heat gauges" groups1, 2
#
# This routine requires 8 attribute variables:
#
#       @0 = Scalar attribute for current pressure
#       @1 = Scalar attribute for degradation pressure
#       @2 = Scalar attribute for valve setting (0..1)
#
#       @3 = Scalar attribute for current temperature
#       @4 = Scalar attribute for degradation temperature
#       @5 = Scalar attribute for failure temperature
#
#       @6 = Scalar leakage attribute for subsystem
#
#       @7 = State attribute for subsystem
#-----------------------------------------------------------------------
GenericHeatGauges1
{
	offset = (47,2);
	vertNormalSlider(
			I,ModeAlwaysActive,
			(21,97),        #overall size
			255,0,          # fg,bg
			4,              # bar thickness
			@2              # valve setting
	);
	offset = (86,0);
	vertBar(
			J,ModeAlwaysActive,
			(16,100),
			btwarn.pcc,
			255,255,0,
			@3,     # current
			@4,     # warn
			@5      # max
	);

	offset = (120,84);
	LeakGauge(
			K,ModeAlwaysActive,
			eleak.pcc,
			0,255,
			3,
			.15,
			@6
	);
}
GenericHeatGauges2
{
	offset = (47,2);
	vertNormalSlider(
			M,ModeAlwaysActive,
			(21,97),        #overall size
			255,0,          # fg,bg
			4,              # bar thickness
			@2              # valve setting
	);
	offset = (86,0);
	vertBar(
			N,ModeAlwaysActive,
			(16,100),
			btwarn.pcc,
			255,255,0,
			@3,     # current
			@4,     # warn
			@5      # max
	);

	offset = (120,84);
	LeakGauge(
			O,ModeAlwaysActive,
			eleak.pcc,
			0,255,
			3,
			.15,
			@6
	);
}
#-----------------------------------------------------------------------
# Secondary type #1 setup
#-----------------------------------------------------------------------
Secondary1
{
	#--------------------------------------
	# Secondary display
	#--------------------------------------
	port = sec;
	bgPixelMap(ModeAlwaysActive,btsec1.pcx,0); #1=opaque

	#------------------------
	# message display
	#------------------------
	offset = (113,607);
	messageBoard(
		E,ModeAlwaysActive,
		btsmsgs.pcx,
		0
	);

	#------------------------
	# radar
	#------------------------
	offset = (58,229);
	map(
		A,ModeAlwaysActive,
		(366,367),
		center,
		180,
		0,                      #bg color
		3,                      #default color
		1,                      #hotbox color
		4000,                   #maximum radius in meters
		RadarRange,
		RadarLinearPosition,
		RadarAngularPosition,
		Avionics/RadarPercent
	);

	#------------------------
	# heading
	#------------------------
	offset = (280,166);
	headingPointer(
		E,ModeAlwaysActive,
		2,1,0,
		20,39,
		helv15.pcc
	);

	#------------------------
	# speed
	#------------------------
	offset = (352,159);
	numericSpeed(
		F,ModeAlwaysActive,
		(48,22),
		helv15.pcc,
		4,
		signedBlankedZeros,
		0,1,
		LinearSpeed
	);

	offset = (376,166);
	segmentArcRatio(
		C,ModeAlwaysActive,
		32,39,          # inner,outer
		0,360,          # deg0, deg1
		36,             # segs/dir
		0,2,            # bg, fg
		LinearSpeed,    # value
		MaxRunSpeed     # max
	);

	#------------------------
	# time
	#------------------------
	offset = (355,49);
	digitalClock(
		C,ModeAlwaysActive,
		(80,40),
		helv15.pcc,
		5,
		time,
		0,1
	);

	#--------------------------------------
	# static images: buttons 1 & 2 & 3
	#--------------------------------------
	offset = (1,537);
	bgPixelMap(ModeAlwaysActive,sizumin.pcc,0);
	offset = (1,430);
	bgPixelMap(ModeAlwaysActive,sizumout.pcc,0);
	offset = (1,322);
	bgPixelMap(ModeAlwaysActive,svision.pcc,0);

	#--------------------------------------
	# crouch mode: button 4
	#--------------------------------------
	offset = (1,215);
	oneOfSeveralPixInt(
		E,ModeAlwaysActive,
		bduck.pcc,
		3,
		1,
		DuckState
	);
	#--------------------------------------
	# searchlight mode: button 5
	#--------------------------------------
	offset = (1,108);
	oneOfSeveralPixInt(
		F,ModeAlwaysActive,
		blamp.pcc,
		2,
		1,
		Searchlight/LightOn
	);
	#--------------------------------------
	# display mode: button 6
	#--------------------------------------
	offset = (1,1);
	oneOfSeveralPixInt(
		F,ModeAlwaysActive,
		sdspmod.pcc,
		3,
		1,
		ControlsMapper/DisplayMode
	);
	#--------------------------------------
	# piloting mode: button 7
	#--------------------------------------
	offset = (442,536);     #was 443,537
	oneOfSeveralPixInt(
		G,ModeAlwaysActive,
		smode.pcc,
		3,
		1,
		ControlsMapper/ControlMode
	);

	#--------------------------------------
	# Generator "A": button 9
	#--------------------------------------
	offset = (443,322);
	GeneratorCluster(
		ModeAlwaysActive,
		GeneratorA,
		sgenbg.pcc,
		0,
		sgentemp.pcc,
		9,
		11,
		sgenvolt.pcc,
		24,
		sgenleak.pcc,
		11,
		sgena.pcc,
		sgen1.pcc,
		3,
		9
	);
	#--------------------------------------
	# Generator "B": button 10
	#--------------------------------------
	offset = (443,215);
	GeneratorCluster(
		ModeAlwaysActive,
		GeneratorB,
		sgenbg.pcc,
		0,
		sgentemp.pcc,
		9,
		11,
		sgenvolt.pcc,
		24,
		sgenleak.pcc,
		11,
		sgenb.pcc,
		sgen2.pcc,
		3,
		9
	);
	#--------------------------------------
	# Generator "C": button 11
	#--------------------------------------
	offset = (443,108);
	GeneratorCluster(
		ModeAlwaysActive,
		GeneratorC,
		sgenbg.pcc,
		0,
		sgentemp.pcc,
		9,
		11,
		sgenvolt.pcc,
		24,
		sgenleak.pcc,
		11,
		sgenc.pcc,
		sgen3.pcc,
		3,
		9
	);
	#--------------------------------------
	# Generator "D": button 12
	#--------------------------------------
	offset = (443,1);
	GeneratorCluster(
		ModeAlwaysActive,
		GeneratorD,
		sgenbg.pcc,
		0,
		sgentemp.pcc,
		9,
		11,
		sgenvolt.pcc,
		24,
		sgenleak.pcc,
		11,
		sgend.pcc,
		sgen5.pcc,
		3,
		9
	);
	#--------------------------------------
	# Secondary overlay
	#--------------------------------------
	port = overlay;

	offset = (0,0);
	bgPixelMap(ModeAlwaysActive,btsec1ov.pcx,0);

	offset = (386,579);
	numeric(
		J,ModeAlwaysActive,
		(38,12),
		helv15.pcc,
		4,
		signedBlankedZeros,
		0,3,
		RadarRange
	);

	offset = (125,579);
	sectorDisplay(
		K,ModeAlwaysActive,
		helv15.pcc,
		0,3
	);
}


