// gauges.h
// Copyright (c) 2000 Microsoft Corporation.  All rights reserved.
//

//
// modified spring/summer 2000 by Arne Bartels arne.bartels@nwn.de:
//  - inserted UINT32 definiton for VC++5.0 compability; lines 1626-1628 (after Dai Griffiths' gauhlpxx.zip)
//  - corrected definition of GAUGE_CALLBACK; line 3279 (after Daniel Steiner on flightsim.com's panel forum)
//  - renamed to FS2Kgauges.h
//	- corrected	definition of register_var_by_nam(e)	(after Oleg Devjatkin)
//	- new image_flag macros		lines 3145-3165
//	- new image_flag functions for images in a linked list  lines 3186-3196
//	- modified mouse child rectangle to include helpid lines 3013-3014 (after Dmitry Prosko)

//	major modification winter 2001 by Arne Bartels arne.bartels@nwn.de:
//  - MODULE_VAR_CB FN_FLOAT64 defintions renamed to MODULE_VAR_CB_610 FN_FLOAT64_610, to avoid conflicts with imported FS98 code
//	- added mingw32 GNU-C-Compiler compability (after Daniel Steiner)
//	- added C++ compability
//  - included missing KEY_EVENTs; line 1331 - 1597
//  - bit filtering macros line 3167 - 3171
//	- temperature conversion macros line 3173 - 3186

// to allow compilation of one object file per subgauge several modification
// around GAUGE_TABLE_... macros are made,
// access to "Linkage" and "ImportTable" are encapsulated in functions


#ifndef __FS2KGAUGES_H__	//avoid double includes
	#define __FS2KGAUGES_H__


#include "windows.h"

#pragma pack(4)

// Useful macros for INL files
#define CONCATENATE1(A,B) A##B
#define CONCATENATE(A,B) CONCATENATE1(A,B)
#define CONCATENATE31(A,B,C) A##B##C
#define CONCATENATE3(A,B,C) CONCATENATE31(A,B,C)
#define C_GAUGE(A) CONCATENATE(GAUGE_ITEM  , A )
#define C_PLIST(A) CONCATENATE(plist_ , A)

// Flightsim calling convention
#define	FSAPI	__stdcall

//
// Common Flight Simulator Constant Definitions
//

#ifndef VOID
#define VOID	void
#endif

// Logical True/False Constants
#ifndef FALSE
#define FALSE	0
#endif

#ifndef TRUE
#define TRUE	1
#endif

// Pointer Constant
#ifndef	NULL
#define NULL	((void *)0)			// empty handle
#endif

// Misc Constants
#define NULLPTR	NULL				// empty pointer
#define CR		0x0d				// ASCII carriage return
#define LF		0x0a				// ASCII line feed
#define FLAGS0	0					// no flags set in a FLAGSn type variable
#define FLAGS1	-1					// all flags set in a FLAGSn type variable

// Bit Flag Constants
#define BIT0	0x00000001
#define BIT1	0x00000002
#define BIT2	0x00000004
#define BIT3	0x00000008
#define BIT4	0x00000010
#define BIT5	0x00000020
#define BIT6	0x00000040
#define BIT7	0x00000080
#define BIT8	0x00000100
#define BIT9	0x00000200
#define BIT10	0x00000400
#define BIT11	0x00000800
#define BIT12	0x00001000
#define BIT13	0x00002000
#define BIT14	0x00004000
#define BIT15	0x00008000
#define BIT16	0x00010000
#define BIT17	0x00020000
#define BIT18	0x00040000
#define BIT19	0x00080000
#define BIT20	0x00100000
#define BIT21	0x00200000
#define BIT22	0x00400000
#define BIT23	0x00800000
#define BIT24	0x01000000
#define BIT25	0x02000000
#define BIT26	0x04000000
#define BIT27	0x08000000
#define BIT28	0x10000000
#define BIT29	0x20000000
#define BIT30	0x40000000
#define BIT31	0x80000000

// integer data types limits
#define UINT8_MIN	0
#define UINT8_MAX	255
#define SINT8_MIN	-128
#define SINT8_MAX	 127
#define UINT16_MIN	0
#define UINT16_MAX	65535
#define SINT16_MIN	-32768
#define SINT16_MAX	32767
#define UINT32_MIN	0
#define UINT32_MAX	4294967295
#define SINT32_MIN	((signed int) BIT31)
#define SINT32_MAX	2147483647

// fractional data types limits
#define UFRAC8_MIN	0
#define UFRAC8_MAX	255
#define SFRAC8_MIN	-128
#define SFRAC8_MAX	127
#define UFRAC16_MIN	0
#define UFRAC16_MAX	65535
#define SFRAC16_MIN	-32768
#define SFRAC16_MAX	32767
#define UFRAC32_MIN	0
#define UFRAC32_MAX	4294967295
#define SFRAC32_MIN	-2147483648
#define SFRAC32_MAX	2147483647

// flag values for engine_control_select variable
#define ENGINE_CONTROL_SELECT_NONE	0		// no engines
#define ENGINE_CONTROL_SELECT_1		BIT0	// engine 1
#define ENGINE_CONTROL_SELECT_2		BIT1	// engine 2
#define ENGINE_CONTROL_SELECT_3		BIT2	// engine 3
#define ENGINE_CONTROL_SELECT_4		BIT3	// engine 4

// enum values for prop_adv_sel variable
#define PROP_ADV_SEL_FIXED			0		// fixed pitch propeller
#define PROP_ADV_SEL_AUTO			1		// variable pitch propeller, automatic
#define PROP_ADV_SEL_MANUAL			2		// variable pitch propeller, manual

// realism_systems values
#define	REALISM_SYSTEMS_ELEV_TRIM	BIT1	// enable elevator trim realism (ratchet effect)
#define	REALISM_SYSTEMS_GYRO_DRIFT	BIT2	// enable gyro drift
#define	REALISM_SYSTEMS_LIGHT_BURN	BIT3	// enable light burnout if on too long during day
#define	REALISM_SYSTEMS_FAST_THROT	BIT4	// enable fast throttle kill engine
#define	REALISM_SYSTEMS_INS_LIGHTS	BIT5	// enable instrument light needed at night to see panel
#define	REALISM_SYSTEMS_BARO_DRIFT	BIT6	// enable barometric pressure drift

// vor1_tf_flag and vor2_tf_flag
#define	VOR_TF_FLAG_OFF			0
#define	VOR_TF_FLAG_TO			1
#define	VOR_TF_FLAG_FROM		2

// Back course flags for VOR gauges
#define	BC_FLAG_BACKCOURSE_AVAILABLE	BIT0
#define	BC_FLAG_LOCALIZER_TUNED_IN		BIT1
#define	BC_FLAG_ON_BACKCOURSE			BIT2
#define	BC_FLAG_STATION_ACTIVE			BIT7

// sim_speed constants
#define	SIM_SPEED_QUARTER	0x0040
#define	SIM_SPEED_HALF		0x0080
#define	SIM_SPEED_1X		0x0100
#define	SIM_SPEED_2X		0x0200
#define	SIM_SPEED_4X		0x0400
#define	SIM_SPEED_8X		0x0800
#define	SIM_SPEED_16X		0x1000
#define	SIM_SPEED_32X		0x2000
#define	SIM_SPEED_64X		0x4000
#define	SIM_SPEED_128X		0x8000

#define	SIM_SPEED_MIN		SIM_SPEED_QUARTER
#define	SIM_SPEED_MAX		SIM_SPEED_128X

// controls limits
#define	SPOILERS_POS_OFF			0		// spoilers desired position {0=retracted..16k=fully extended}
#define	SPOILERS_POS_FULL			16383
#define	FLAPS_POS_OFF				0		// 0=up, 16383 = full
#define	FLAPS_POS_FULL				16383
#define	GEAR_POS_UP					0		// 0 = up, 16K = dn
#define	GEAR_POS_DOWN				16383

// defines for VOR_INFO.CODE field
#define	VOR_CODE_IS_LOCALIZER			BIT7	// bit7 = 0= VOR  1= Localizer
#define	VOR_CODE_GLIDESLOPE			    BIT6	// bit6 = 1= Glideslope Available
#define	VOR_CODE_BACKCOURSE_UNAVAIL	    BIT5	// bit5 = 1= no localizer backcourse
#define	VOR_CODE_DME_AT_GLIDE_SLOPE	    BIT4	// bit4 = 1= DME transmitter at Glide Slope Transmitter
#define	VOR_CODE_NAV_UNAVAILABLE	    BIT3	// bit3 = 1= no nav signal available
#define	VOR_CODE_VOICE_AVAILABLE	    BIT2	// bit2 = Voice Available
#define	VOR_CODE_TACAN				    BIT1	// bit1 = TACAN
#define VOR_CODE_DME_AVAILABLE		    BIT0	// bit0 = DME

// defines for engine structure starter variable, note:  magnetos for recip. engines / starters for jet engines
#define ENG_STARTER_MAGNETO_OFF		0	// the following values for reciprocating engines
#define ENG_STARTER_MAGNETO_RIGHT	1
#define ENG_STARTER_MAGNETO_LEFT	2
#define ENG_STARTER_MAGNETO_BOTH	3
#define ENG_STARTER_MAGNETO_START	4
#define ENG_STARTER_STARTER_OFF		0	// the following values for jet engines
#define ENG_STARTER_STARTER_START	1
#define ENG_STARTER_STARTER_GEN		2


// Panel quick help strings
#define HELPID_MIN								0x0000a000

// cessna strings (0x0000-0x00ff)
#define HELPID_CESS								HELPID_MIN + 0x0000
#define	HELPID_CESS_ADF							(HELPID_CESS + 0x0000)
#define	HELPID_CESS_ALTIMETER					(HELPID_CESS + 0x0001)
#define	HELPID_CESS_ALTIMETER_SET				(HELPID_CESS + 0x0002)
#define	HELPID_CESS_AIRSPEED					(HELPID_CESS + 0x0003)
#define	HELPID_CESS_ATTITUDE_INDICATOR			(HELPID_CESS + 0x0004)
#define	HELPID_CESS_HEADING_INDICATOR			(HELPID_CESS + 0x0005)
#define	HELPID_CESS_TEMPERATURE					(HELPID_CESS + 0x000e)
#define	HELPID_CESS_CARB_HEAT					(HELPID_CESS + 0x000f)
#define	HELPID_CESS_ZOOM						(HELPID_CESS + 0x0010)
#define	HELPID_CESS_STROBES						(HELPID_CESS + 0x0011)
#define	HELPID_CESS_LANDING_LIGHT				(HELPID_CESS + 0x0012)
#define	HELPID_CESS_AUTOPILOT					(HELPID_CESS + 0x0013)
#define	HELPID_CESS_LANDING_GEAR				(HELPID_CESS + 0x0014)
#define	HELPID_CESS_FLAPS						(HELPID_CESS + 0x0015)
#define	HELPID_CESS_MAGNETOS					(HELPID_CESS + 0x0016)
#define	HELPID_CESS_CLOCK						(HELPID_CESS + 0x0017)
#define	HELPID_CESS_EGT							(HELPID_CESS + 0x0018)
#define	HELPID_CESS_THROTTLE					(HELPID_CESS + 0x0019)
#define	HELPID_CESS_TURN_COORDINATOR			(HELPID_CESS + 0x001a)
#define	HELPID_CESS_VOR1						(HELPID_CESS + 0x001b)
#define	HELPID_CESS_OBS1						(HELPID_CESS + 0x001c)
#define	HELPID_CESS_VOR2						(HELPID_CESS + 0x001d)
#define	HELPID_CESS_OBS2						(HELPID_CESS + 0x001e)
#define	HELPID_CESS_VSI							(HELPID_CESS + 0x001f)
#define	HELPID_CESS_RPM							(HELPID_CESS + 0x0020)
#define	HELPID_CESS_MAN_PRESS					(HELPID_CESS + 0x0021)
#define	HELPID_CESS_OIL_TEMP					(HELPID_CESS + 0x0022)
#define	HELPID_CESS_OIL_PRESS					(HELPID_CESS + 0x0023)
#define	HELPID_CESS_PROP_ADV					(HELPID_CESS + 0x0024)
#define	HELPID_CESS_MIXTURE						(HELPID_CESS + 0x0025)
#define	HELPID_CESS_OUTER_MARKER				(HELPID_CESS + 0x0026)
#define	HELPID_CESS_MIDDLE_MARKER				(HELPID_CESS + 0x0027)
#define	HELPID_CESS_INNER_MARKER				(HELPID_CESS + 0x0028)
#define	HELPID_CESS_FUEL_LEFT					(HELPID_CESS + 0x0029)
#define	HELPID_CESS_FUEL_RIGHT					(HELPID_CESS + 0x002a)
#define	HELPID_CESS_MAG_COMPASS					(HELPID_CESS + 0x002b)
#define	HELPID_CESS_BACK_COURSE_IND				(HELPID_CESS + 0x002c)
#define	HELPID_CESS_HEADING_ADJUST				(HELPID_CESS + 0x002d)
#define	HELPID_CESS_TRIM						(HELPID_CESS + 0x002e)
#define	HELPID_CESS_VACUUM						(HELPID_CESS + 0x002f)
#define	HELPID_CESS_AMPS						(HELPID_CESS + 0x0030)
#define	HELPID_CESS_FUEL_FLOW					(HELPID_CESS + 0x0031)
#define	HELPID_CESS_CHT							(HELPID_CESS + 0x0032)
#define	HELPID_CESS_TAS_CALIBRATION				(HELPID_CESS + 0x0033)
#define	HELPID_CESS_KOHLSMAN					(HELPID_CESS + 0x0034)
#define	HELPID_CESS_PITOT_HEAT					(HELPID_CESS + 0x0035)
#define	HELPID_CESS_SUCTION						(HELPID_CESS + 0x0036)
#define	HELPID_CESS_HEADING_BUG_ADJUST			(HELPID_CESS + 0x0037)
#define	HELPID_CESS_PANEL_LIGHTS_TOGGLE			(HELPID_CESS + 0x0038)
#define	HELPID_CESS_PITOT_HEAT_TOGGLE			(HELPID_CESS + 0x0039)

#define HELPID_CESS_CARB_HEAT					(HELPID_CESS + 0x000f)
#define HELPID_CESS_FUEL_PUMP_TOGGLE			(HELPID_CESS + 0x003c)
#define HELPID_CESS_PRIMER_SWITCH				(HELPID_CESS + 0x003D)

// lear strings (0x0100-0x01ff)
#define HELPID_LEAR								HELPID_MIN + 0x0100

#define HELPID_LEAR_AOA							(HELPID_LEAR + 0x0004)
#define HELPID_LEAR_COM_RADIO					(HELPID_LEAR + 0x0027)
#define HELPID_LEAR_NAV1						(HELPID_LEAR + 0x0028)
#define HELPID_LEAR_NAV2						(HELPID_LEAR + 0x0029)
#define HELPID_LEAR_MACH						(HELPID_LEAR + 0x0038)
#define HELPID_LEAR_VOR2_NEEDLE_TOGGLE			(HELPID_LEAR + 0x003d)
#define HELPID_LEAR_ADF_NEEDLE_TOGGLE			(HELPID_LEAR + 0x00de)
#define HELPID_LEAR_MACH_INDICATOR				(HELPID_LEAR + 0x00e1)
#define HELPID_LEAR_FUEL_STANDBY				(HELPID_LEAR + 0x00E5)

// sopwith strings (0x0200-0x02ff)
#define HELPID_SOPWITH							HELPID_MIN + 0x0200

#define HELPID_SOPWITH_OILP						(HELPID_SOPWITH + 0x0005)
#define HELPID_SOPWITH_MAG						(HELPID_SOPWITH + 0x0006)

// sailplane strings (0x0300-0x03ff)
#define HELPID_SCHWEIZER						HELPID_MIN + 0x0300

#define HELPID_SCHWEIZER_ASI					(HELPID_SCHWEIZER + 0x0002)
#define HELPID_SCHWEIZER_VSI					(HELPID_SCHWEIZER + 0x0006)

// b737 strings (0x0400-0x04ff)
#define HELPID_B737								HELPID_MIN + 0x0400

#define HELPID_B737_OIL_QUANT					(HELPID_B737 + 0x001a)
#define HELPID_B737_HYDRAULIC					(HELPID_B737 + 0x001b)
#define HELPID_B737_TOTAL_AIR_TEMP				(HELPID_B737 + 0x0031)
#define HELPID_B737_VIBRATION					(HELPID_B737 + 0x0033)
#define HELPID_B737_HYDRAULIC_QTY				(HELPID_B737 + 0x0034)
#define HELPID_B737_AUTOPILOT_IAS_MACH_SELECT	(HELPID_B737 + 0x0037)
#define HELPID_B737_TO_GA						(HELPID_B737 + 0x0038)
#define HELPID_B737_AUTOTHROTTLE				(HELPID_B737 + 0x0039)
#define HELPID_B737_REFERENCE_N1				(HELPID_B737 + 0x003a)
#define HELPID_B737_N1_SET						(HELPID_B737 + 0x003b)
#define HELPID_B737_TAKEOFF_POWER_ACTIVE		(HELPID_B737 + 0x0044)
#define HELPID_B737_AT_LIM						(HELPID_B737 + 0x0046)
#define HELPID_B737_FLAPS_EXT_LIGHT				(HELPID_B737 + 0x0048)
#define HELPID_B737_FLAPS_TRANSIT_LIGHT			(HELPID_B737 + 0x0049)
#define HELPID_B737_OIL_PRESSURE_LIGHT			(HELPID_B737 + 0x004A)
#define HELPID_B737_REVERSER_UNLOCKED			(HELPID_B737 + 0x004B)
#define HELPID_B737_START_VALVE_LIGHT			(HELPID_B737 + 0x004C)
#define HELPID_B737_START_LEVERS				(HELPID_B737 + 0x0051)

// extra 300 strings (0x0500-0x05ff)
#define HELPID_EXTRA							HELPID_MIN + 0x0500

#define HELPID_EXTR_SMOKE						(HELPID_EXTRA + 0x0013)
#define HELPID_EXTR_ACRO_TANK					(HELPID_EXTRA + 0x0014)
#define HELPID_EXTR_MAIN_TANK					(HELPID_EXTRA + 0x0015)
#define HELPID_EXTR_G_METER						(HELPID_EXTRA + 0x001c)
#define HELPID_EXTR_G_METER_RESET				(HELPID_EXTRA + 0x0027)
#define HELPID_EXTR_PEDAL_SWITCH_LEFT			(HELPID_EXTRA + 0x002D)
#define HELPID_EXTR_PEDAL_SWITCH_RIGHT			(HELPID_EXTRA + 0x002E)
#define HELPID_EXTR_LOW_VOLT					(HELPID_EXTRA + 0x002F)

// Bell 206B strings (0x0600-0x06ff)
#define HELPID_BELL								HELPID_MIN + 0x0600

#define HELPID_BELL_XMISSION_PSI				(HELPID_BELL + 0x0002)
#define HELPID_BELL_XMISSION_TEMP				(HELPID_BELL + 0x0003)
#define HELPID_BELL_GEN_LOAD					(HELPID_BELL + 0x0005)
#define HELPID_BELL_TURBINE_TEMP				(HELPID_BELL + 0x0008)
#define HELPID_BELL_GAS_PRODUCER				(HELPID_BELL + 0x0009)
#define HELPID_BELL_ROTOR_TURBINE				(HELPID_BELL + 0x000c)
#define HELPID_BELL_CYCLIC_FA					(HELPID_BELL + 0x0016)
#define HELPID_BELL_CYCLIC_LR					(HELPID_BELL + 0x0017)
#define HELPID_BELL_ANTI_TORQUE_ROTOR			(HELPID_BELL + 0x0018)
#define HELPID_BELL_FUEL_VALVE					(HELPID_BELL + 0x0019)
#define HELPID_BELL_GOVERNOR					(HELPID_BELL + 0x001A)
#define HELPID_BELL_THROTTLE					(HELPID_BELL + 0x001B)

// Bendix/King radios (0x0700-0x07ff)
#define HELPID_RADIO							HELPID_MIN + 0x0700

#define HELPID_RADIO_NAV1						(HELPID_RADIO + 0x0000)
#define HELPID_RADIO_COMM1						(HELPID_RADIO + 0x0001)
#define HELPID_RADIO_NAV2						(HELPID_RADIO + 0x0002)
#define HELPID_RADIO_COMM2						(HELPID_RADIO + 0x0003)
#define HELPID_RADIO_DME						(HELPID_RADIO + 0x0004)
#define HELPID_RADIO_DME_KT						(HELPID_RADIO + 0x0005)
#define HELPID_RADIO_DME_NM						(HELPID_RADIO + 0x0006)
#define HELPID_RADIO_DME_MIN					(HELPID_RADIO + 0x0007)
#define HELPID_RADIO_DME_N1_N2_SELECT			(HELPID_RADIO + 0x0008)
#define HELPID_RADIO_ADF_RADIO					(HELPID_RADIO + 0x0009)
#define HELPID_RADIO_TRANSPONDER				(HELPID_RADIO + 0x000a)
#define HELPID_RADIO_RADIOS_OPEN				(HELPID_RADIO + 0x000b)
#define HELPID_RADIO_AP_RADIO					(HELPID_RADIO + 0x000c)
#define HELPID_RADIO_SWITCH_STANDBY_FREQUENCY	(HELPID_RADIO + 0x000d)
#define HELPID_RADIO_COMM_SELECT				(HELPID_RADIO + 0x00e)
#define HELPID_RADIO_COMM_FREQ					(HELPID_RADIO + 0x000f)
#define HELPID_RADIO_COMM1_SELECT				(HELPID_RADIO + 0x0010)
#define HELPID_RADIO_COMM1_FREQ					(HELPID_RADIO + 0x0011)
#define HELPID_RADIO_COMM2_SELECT				(HELPID_RADIO + 0x0012)
#define HELPID_RADIO_COMM2_FREQ					(HELPID_RADIO + 0x0013)
#define HELPID_RADIO_NAV1_SELECT				(HELPID_RADIO + 0x0014)
#define HELPID_RADIO_NAV1_FREQ					(HELPID_RADIO + 0x0015)
#define HELPID_RADIO_NAV2_SELECT				(HELPID_RADIO + 0x0016)
#define HELPID_RADIO_NAV2_FREQ					(HELPID_RADIO + 0x0017)
#define HELPID_RADIO_ADF						(HELPID_RADIO + 0x0018)
#define HELPID_RADIO_AUTOPILOT					(HELPID_RADIO + 0x0019)
#define HELPID_RADIO_OPEN_STACK					(HELPID_RADIO + 0x001a)
#define HELPID_RADIO_DME_IND					(HELPID_RADIO + 0x001B)
#define HELPID_GPS_MODE							(HELPID_RADIO + 0x001C)
#define HELPID_GPS_DIRECT						(HELPID_RADIO + 0x001D)
#define HELPID_GPS_MENU							(HELPID_RADIO + 0x001E)
#define HELPID_GPS_ARROWS						(HELPID_RADIO + 0x001F)
#define HELPID_GPS_ENTER						(HELPID_RADIO + 0x0020)
#define HELPID_GPS_CANCEL						(HELPID_RADIO + 0x0021)

// Combat Flight Simulator Panels (0x0800-0x09ff)
#define HELPID_CFS								(HELPID_MIN +  0x0800)

#define HELPID_SPITFIRE_DG						(HELPID_CFS + 13)
#define HELPID_SPITFIRE_WARNING_LIGHT			(HELPID_CFS + 15)
#define HELPID_SPITFIRE_BOOST_PRESSURE			(HELPID_CFS + 16)
#define HELPID_SPITFIRE_THROTTLE				(HELPID_CFS + 20)
#define HELPID_SPITFIRE_MIXTURE					(HELPID_CFS + 21)
#define HELPID_SPITFIRE_PROP					(HELPID_CFS + 22)
#define HELPID_FW190A_DG						(HELPID_CFS + 54)
#define HELPID_FW190A_WARNING_LIGHT				(HELPID_CFS + 57)
#define HELPID_FW190A_BOOST_PRESSURE			(HELPID_CFS + 64)
#define HELPID_FW190A_THROTTLE					(HELPID_CFS + 66)
#define HELPID_FW190A_MIXTURE					(HELPID_CFS + 67)
#define HELPID_FW190A_PROP						(HELPID_CFS + 68)
#define HELPID_P51_DG							(HELPID_CFS + 108)
#define HELPID_P51_ENGINE						(HELPID_CFS + 117)
#define HELPID_P51_THROTTLE						(HELPID_CFS + 118)
#define HELPID_P51_MIXTURE						(HELPID_CFS + 119)
#define HELPID_P51_PROP							(HELPID_CFS + 120)
#define HELPID_BF109_GUNSIGHT					(HELPID_CFS + 155)
#define HELPID_BF109_DG							(HELPID_CFS + 157)
#define HELPID_BF109_WARNING_LIGHT				(HELPID_CFS + 162)
#define HELPID_BF109_BOOST_PRESSURE				(HELPID_CFS + 163)
#define HELPID_BF109_FUEL_OIL_PRESSURE			(HELPID_CFS + 166)
#define HELPID_BF109_THROTTLE					(HELPID_CFS + 167)
#define HELPID_BF109_MIXTURE					(HELPID_CFS + 168)
#define HELPID_BF109_PROP						(HELPID_CFS + 169)
#define HELPID_HURRICANE_WARNING_LIGHT			(HELPID_CFS + 206)
#define HELPID_HURRICANE_DG						(HELPID_CFS + 212)
#define HELPID_HURRICANE_BOOST_PRESSURE			(HELPID_CFS + 216)
#define HELPID_HURRICANE_THROTTLE				(HELPID_CFS + 219)
#define HELPID_HURRICANE_MIXTURE				(HELPID_CFS + 220)
#define HELPID_HURRICANE_PROP					(HELPID_CFS + 221)
#define HELPID_P47_WARNING_LIGHT				(HELPID_CFS + 252)
#define HELPID_P47_ENGINE						(HELPID_CFS + 258)
#define HELPID_P47_FLAPS_GEAR					(HELPID_CFS + 259)
#define HELPID_P47_DG							(HELPID_CFS + 263)
#define HELPID_P47_THROTTLE						(HELPID_CFS + 267)
#define HELPID_P47_MIXTURE						(HELPID_CFS + 268)
#define HELPID_P47_PROP							(HELPID_CFS + 269)

// Concorde Panel (0x0A00-0x0AFF)
#define HELPID_CONCORDE							(HELPID_MIN +  0x0A00)

#define HELPID_CONCORDE_ACCELEROMETER			(HELPID_CONCORDE + 0x0000)
#define HELPID_CONCORDE_ANGLE_OF_ATTACK			(HELPID_CONCORDE + 0x0001)
#define HELPID_CONCORDE_SPEED_SELECT			(HELPID_CONCORDE + 0x0002)
#define HELPID_CONCORDE_AIRSPEED_MODE_SWITCH	(HELPID_CONCORDE + 0x0003)
#define HELPID_CONCORDE_DISCREPANCY_LIGHT		(HELPID_CONCORDE + 0x0004)
#define HELPID_CONCORDE_MACHMETER				(HELPID_CONCORDE + 0x0005)
#define HELPID_CONCORDE_ALTIMETER_MODE_SWITCH	(HELPID_CONCORDE + 0x0006)
#define HELPID_CONCORDE_ATTITUDE_TEST			(HELPID_CONCORDE + 0x0007)
#define HELPID_CONCORDE_CHECK_ATT				(HELPID_CONCORDE + 0x0008)
#define HELPID_CONCORDE_ATTITUDE_DH				(HELPID_CONCORDE + 0x0009)
#define HELPID_CONCORDE_PITCH_INDEX_KNOB		(HELPID_CONCORDE + 0x000A)
#define HELPID_CONCORDE_HSI_FAIL				(HELPID_CONCORDE + 0x000B)
#define HELPID_CONCORDE_HSI_SWITCH				(HELPID_CONCORDE + 0x000C)
#define HELPID_CONCORDE_HSI_MILES				(HELPID_CONCORDE + 0x000D)
#define HELPID_CONCORDE_HSI_SPEED				(HELPID_CONCORDE + 0x000E)
#define HELPID_CONCORDE_SIDESLIP				(HELPID_CONCORDE + 0x000F)
#define HELPID_CONCORDE_DME_DISTANCE			(HELPID_CONCORDE + 0x0010)
#define HELPID_CONCORDE_DME_SPEED				(HELPID_CONCORDE + 0x0011)
#define HELPID_CONCORDE_DME_TIME				(HELPID_CONCORDE + 0x0012)
#define HELPID_CONCORDE_DME_SWITCH				(HELPID_CONCORDE + 0x0013)
#define HELPID_CONCORDE_RADIO_ALTIMETER			(HELPID_CONCORDE + 0x0014)
#define HELPID_CONCORDE_RADIO_ALTIMETER_TEST	(HELPID_CONCORDE + 0x0015)
#define HELPID_CONCORDE_RADIO_ALTIMETER_KNOB	(HELPID_CONCORDE + 0x0016)
#define HELPID_CONCORDE_TOTAL_FUEL				(HELPID_CONCORDE + 0x0017)
#define HELPID_CONCORDE_CENTER_GRAVITY			(HELPID_CONCORDE + 0x0018)
#define HELPID_CONCORDE_CENTER_GRAVITY_LIGHT	(HELPID_CONCORDE + 0x0019)
#define HELPID_CONCORDE_TEMPERATURE_TOTAL		(HELPID_CONCORDE + 0x001A)
#define HELPID_CONCORDE_TEMPERATURE_STATIC		(HELPID_CONCORDE + 0x001B)
#define HELPID_CONCORDE_TEMPERATURE_ISA			(HELPID_CONCORDE + 0x001C)
#define HELPID_CONCORDE_GMT						(HELPID_CONCORDE + 0x001D)
#define HELPID_CONCORDE_TIMER					(HELPID_CONCORDE + 0x001E)
#define HELPID_CONCORDE_CLOCK_MODE_SWITCH		(HELPID_CONCORDE + 0x001F)
#define HELPID_CONCORDE_CLOCK_START_STOP		(HELPID_CONCORDE + 0x0020)
#define HELPID_CONCORDE_CLOCK_FAST_SLOW			(HELPID_CONCORDE + 0x0021)
#define HELPID_CONCORDE_ENGINE_MANAGE_LIGHTS	(HELPID_CONCORDE + 0x0022)
#define HELPID_CONCORDE_ENGINE_MANAGE_GO		(HELPID_CONCORDE + 0x0023)
#define HELPID_CONCORDE_ENGINE_MANAGE_FAILURE	(HELPID_CONCORDE + 0x0024)
#define HELPID_CONCORDE_ENGINE_MANAGE_REVERSE	(HELPID_CONCORDE + 0x0025)
#define HELPID_CONCORDE_ENGINE_FUEL				(HELPID_CONCORDE + 0x0026)
#define HELPID_CONCORDE_ENGINE_FUEL_SETTING_KNOB (HELPID_CONCORDE + 0x0027)
#define HELPID_CONCORDE_ENGINE_EGT				(HELPID_CONCORDE + 0x0028)
#define HELPID_CONCORDE_ENGINE_AREA				(HELPID_CONCORDE + 0x0029)
#define HELPID_CONCORDE_ENGINE_FAILURE_LIGHT	(HELPID_CONCORDE + 0x002A)
#define HELPID_CONCORDE_ENGINE_AFTERBURNER_LIGHT (HELPID_CONCORDE + 0x002B)
#define HELPID_CONCORDE_VISOR_NOSE_LEVER		(HELPID_CONCORDE + 0x002C)
#define HELPID_CONCORDE_VISOR_INDICATOR			(HELPID_CONCORDE + 0x002D)
#define HELPID_CONCORDE_NOSE_INDICATOR			(HELPID_CONCORDE + 0x002E)
#define HELPID_CONCORDE_LEFT_GEAR_UNLOCKED		(HELPID_CONCORDE + 0x002F)
#define HELPID_CONCORDE_RIGHT_GEAR_UNLOCKED		(HELPID_CONCORDE + 0x0030)
#define HELPID_CONCORDE_UP_GEAR_UNLOCKED		(HELPID_CONCORDE + 0x0031)
#define HELPID_CONCORDE_GEAR_TRANSIT			(HELPID_CONCORDE + 0x0032)
#define HELPID_CONCORDE_LEFT_GEAR_DOWN			(HELPID_CONCORDE + 0x0033)
#define HELPID_CONCORDE_NOSE_GEAR_DOWN			(HELPID_CONCORDE + 0x0034)
#define HELPID_CONCORDE_TAIL_GEAR_DOWN			(HELPID_CONCORDE + 0x0035)
#define HELPID_CONCORDE_RIGHT_GEAR_DOWN			(HELPID_CONCORDE + 0x0036)
#define HELPID_CONCORDE_CONTROL_SURFACE			(HELPID_CONCORDE + 0x0037)
#define HELPID_CONCORDE_CONTROL_SURFACE_RESET	(HELPID_CONCORDE + 0x0038)
#define HELPID_CONCORDE_CONTROL_SURFACE_TEST	(HELPID_CONCORDE + 0x0039)
#define HELPID_CONCORDE_CONTROL_SURFACE_LIGHTS	(HELPID_CONCORDE + 0x003A)
#define HELPID_CONCORDE_TURB_MODE				(HELPID_CONCORDE + 0x003B)
#define HELPID_CONCORDE_MAX_CLIMB				(HELPID_CONCORDE + 0x003C)
#define HELPID_CONCORDE_MAX_CRUISE				(HELPID_CONCORDE + 0x003D)
#define HELPID_CONCORDE_MASTER_WARNING			(HELPID_CONCORDE + 0x003E)
#define HELPID_CONCORDE_FUEL_QUANTITY			(HELPID_CONCORDE + 0x003F)
#define HELPID_CONCORDE_LOW_FUEL_LIGHT			(HELPID_CONCORDE + 0x0040)
#define HELPID_CONCORDE_FUEL_CROSSFEED			(HELPID_CONCORDE + 0x0041)
#define HELPID_CONCORDE_FUEL_PUMP				(HELPID_CONCORDE + 0x0042)
#define HELPID_CONCORDE_MASTER_SWITCH			(HELPID_CONCORDE + 0x0043)
#define HELPID_CONCORDE_ENGINE_START			(HELPID_CONCORDE + 0x0044)
#define HELPID_CONCORDE_GENERATOR				(HELPID_CONCORDE + 0x0045)
#define HELPID_CONCORDE_THROTTLES				(HELPID_CONCORDE + 0x0046)
#define HELPID_CONCORDE_REHEAT					(HELPID_CONCORDE + 0x0047)
#define HELPID_CONCORDE_THROTTLE_FAILURE		(HELPID_CONCORDE + 0x0048)
#define HELPID_CONCORDE_BRAKE					(HELPID_CONCORDE + 0x0049)
#define HELPID_CONCORDE_WARNING_CG				(HELPID_CONCORDE + 0x004A)
#define HELPID_CONCORDE_WARNING_ELECTRICAL		(HELPID_CONCORDE + 0x004B)
#define HELPID_CONCORDE_WARNING_ENGINE			(HELPID_CONCORDE + 0x004C)
#define HELPID_CONCORDE_WARNING_FUEL			(HELPID_CONCORDE + 0x004D)
#define HELPID_CONCORDE_WARNING_ICE				(HELPID_CONCORDE + 0x004E)
#define HELPID_CONCORDE_WARNING_AIR				(HELPID_CONCORDE + 0x004F)
#define HELPID_CONCORDE_WARNING_TRIM			(HELPID_CONCORDE + 0x0050)
#define HELPID_CONCORDE_WARNING_INTAKE			(HELPID_CONCORDE + 0x0051)
#define HELPID_CONCORDE_WARNING_HYDRAULIC		(HELPID_CONCORDE + 0x0052)
#define HELPID_CONCORDE_WARNING_SMOKE			(HELPID_CONCORDE + 0x0053)
#define HELPID_CONCORDE_RADIO_ADF				(HELPID_CONCORDE + 0x0054)
#define HELPID_CONCORDE_RADIO_ADF_SET			(HELPID_CONCORDE + 0x0055)
#define HELPID_CONCORDE_RADIO_ADF_FREQUENCY		(HELPID_CONCORDE + 0x0056)
#define HELPID_CONCORDE_RADIO_ADF_IDENT			(HELPID_CONCORDE + 0x0057)
#define HELPID_CONCORDE_RADIO_ADF_TEST			(HELPID_CONCORDE + 0x0058)
#define HELPID_CONCORDE_RADIO_COMM1				(HELPID_CONCORDE + 0x0059)
#define HELPID_CONCORDE_RADIO_COMM2				(HELPID_CONCORDE + 0x005A)
#define HELPID_CONCORDE_RADIO_COMM_FREQUENCY	(HELPID_CONCORDE + 0x005B)
#define HELPID_CONCORDE_RADIO_COMM_FREQUENCY_STBY (HELPID_CONCORDE + 0x005C)
#define HELPID_CONCORDE_RADIO_COMM_SET			(HELPID_CONCORDE + 0x005D)
#define HELPID_CONCORDE_RADIO_COMM_SET_STBY		(HELPID_CONCORDE + 0x005E)
#define HELPID_CONCORDE_RADIO_COMM_LIGHT		(HELPID_CONCORDE + 0x005F)
#define HELPID_CONCORDE_RADIO_COMM_SWITCH		(HELPID_CONCORDE + 0x0060)
#define HELPID_CONCORDE_RADIO_TRANSPONDER		(HELPID_CONCORDE + 0x0061)
#define HELPID_CONCORDE_RADIO_TRANSPONDER_ID	(HELPID_CONCORDE + 0x0062)
#define HELPID_CONCORDE_RADIO_TRANSPONDER_SET_ID (HELPID_CONCORDE + 0x0063)
#define HELPID_CONCORDE_RADIO_TRANSPONDER_MODE	(HELPID_CONCORDE + 0x0064)
#define HELPID_CONCORDE_RADIO_TRANSPONDER_POSITION (HELPID_CONCORDE + 0x0065)
#define HELPID_CONCORDE_RADIO_LIGHTS			(HELPID_CONCORDE + 0x0066)
#define HELPID_CONCORDE_BATTERY_SWITCH			(HELPID_CONCORDE + 0x0067)
#define HELPID_CONCORDE_AVIONICS_SWITCH			(HELPID_CONCORDE + 0x0068)
#define HELPID_CONCORDE_THROTTLES_REVERSE		(HELPID_CONCORDE + 0x0069)
#define HELPID_CONCORDE_VOR_BEARING				(HELPID_CONCORDE + 0x006A)
#define HELPID_CONCORDE_LIGHT_SWITCH_ANTI_COLLISION (HELPID_CONCORDE + 0x006B)

// Generic gauges (0x0B00-0x0BFF)
#define HELPID_GAUGE							(HELPID_MIN +  0x0B00)

#define HELPID_GAUGE_ADF						(HELPID_GAUGE + 0x0000)
#define HELPID_GAUGE_ADF_SET					(HELPID_GAUGE + 0x0001)
#define HELPID_GAUGE_AIRSPEED					(HELPID_GAUGE + 0x0002)
#define HELPID_GAUGE_AIRSPEED_STRIP				(HELPID_GAUGE + 0x0003)
#define HELPID_GAUGE_ALTERNATOR_SWITCH			(HELPID_GAUGE + 0x0004)
#define HELPID_GAUGE_ALTERNATOR_SWITCH_LEFT		(HELPID_GAUGE + 0x0005)
#define HELPID_GAUGE_ALTERNATOR_SWITCH_RIGHT	(HELPID_GAUGE + 0x0006)
#define HELPID_GAUGE_ALTIMETER					(HELPID_GAUGE + 0x0007)
#define HELPID_GAUGE_ALTIMETER_SET				(HELPID_GAUGE + 0x0008)
#define HELPID_GAUGE_ALTIMETER_STRIP			(HELPID_GAUGE + 0x0009)
#define HELPID_GAUGE_ALTITUDE_ALERTER			(HELPID_GAUGE + 0x000A)
#define HELPID_GAUGE_AMMETER					(HELPID_GAUGE + 0x000B)
#define HELPID_GAUGE_ANNUNCIATOR				(HELPID_GAUGE + 0x000C)
#define HELPID_GAUGE_ATTITUDE_INDICATOR			(HELPID_GAUGE + 0x000D)
#define HELPID_GAUGE_AUTOPILOT_MASTER			(HELPID_GAUGE + 0x000E)
#define HELPID_GAUGE_AVIONICS_SWITCH			(HELPID_GAUGE + 0x000F)
#define HELPID_GAUGE_BACKUP_AIRSPEED			(HELPID_GAUGE + 0x0010)
#define HELPID_GAUGE_BACKUP_ALTIMETER			(HELPID_GAUGE + 0x0011)
#define HELPID_GAUGE_BACKUP_ATTITUDE			(HELPID_GAUGE + 0x0012)
#define HELPID_GAUGE_BATTERY_SWITCH				(HELPID_GAUGE + 0x0013)
#define HELPID_GAUGE_BOOST_PUMP_SWITCH			(HELPID_GAUGE + 0x0014)
#define HELPID_GAUGE_CHT						(HELPID_GAUGE + 0x0015)
#define HELPID_GAUGE_CLOCK						(HELPID_GAUGE + 0x0016)
#define HELPID_GAUGE_COWL_FLAPS					(HELPID_GAUGE + 0x0017)
#define HELPID_GAUGE_COWL_FLAPS_INDICATOR		(HELPID_GAUGE + 0x0018)
#define HELPID_GAUGE_COWL_FLAPS_SWITCH			(HELPID_GAUGE + 0x0019)
#define HELPID_GAUGE_DEICE_SWITCH				(HELPID_GAUGE + 0x001A)
#define HELPID_GAUGE_DME1						(HELPID_GAUGE + 0x001B)
#define HELPID_GAUGE_DME2						(HELPID_GAUGE + 0x001C)
#define HELPID_GAUGE_EGT						(HELPID_GAUGE + 0x001D)
#define HELPID_GAUGE_EICAS						(HELPID_GAUGE + 0x001E)
#define HELPID_GAUGE_ELAPSED_TIME 				(HELPID_GAUGE + 0x001F)
#define HELPID_GAUGE_ENGINE_CONTROLS			(HELPID_GAUGE + 0x0020)
#define HELPID_GAUGE_ENGINE_N1					(HELPID_GAUGE + 0x0021)
#define HELPID_GAUGE_ENGINE_N2					(HELPID_GAUGE + 0x0022)
#define HELPID_GAUGE_ENGINE_TEMPERATURE			(HELPID_GAUGE + 0x0023)
#define HELPID_GAUGE_FLAP_INDICATOR				(HELPID_GAUGE + 0x0024)
#define HELPID_GAUGE_FLAPS_SWITCH				(HELPID_GAUGE + 0x0025)
#define HELPID_GAUGE_FUEL						(HELPID_GAUGE + 0x0026)
#define HELPID_GAUGE_FUEL_CUTOFF	 			(HELPID_GAUGE + 0x0027)
#define HELPID_GAUGE_FUEL_FLOW					(HELPID_GAUGE + 0x0028)
#define HELPID_GAUGE_FUEL_LEFT					(HELPID_GAUGE + 0x0029)
#define HELPID_GAUGE_FUEL_RIGHT					(HELPID_GAUGE + 0x002A)
#define HELPID_GAUGE_FUEL_LOW_LIGHT				(HELPID_GAUGE + 0x002B)
#define HELPID_GAUGE_FUEL_PRESSURE				(HELPID_GAUGE + 0x002C)
#define HELPID_GAUGE_FUEL_SELECTOR				(HELPID_GAUGE + 0x002D)
#define HELPID_GAUGE_FUEL_XFEED					(HELPID_GAUGE + 0x002E)
#define HELPID_GAUGE_GAS_GENERATOR_RPM			(HELPID_GAUGE + 0x002F)
#define HELPID_GAUGE_GEAR_LEVER					(HELPID_GAUGE + 0x0030)
#define HELPID_GAUGE_GEAR_LIGHT					(HELPID_GAUGE + 0x0031)
#define HELPID_GAUGE_GLIDE_SLOPE 				(HELPID_GAUGE + 0x0032)
#define HELPID_GAUGE_HEADING_BUG_ADJUST			(HELPID_GAUGE + 0x0033)
#define HELPID_GAUGE_HEADING_INDICATOR			(HELPID_GAUGE + 0x0034)
#define HELPID_GAUGE_HEADING_INDICATOR_ADJUST	(HELPID_GAUGE + 0x0035)
#define HELPID_GAUGE_HSI						(HELPID_GAUGE + 0x0036)
#define HELPID_GAUGE_HSI_HUD					(HELPID_GAUGE + 0x0037)
#define HELPID_GAUGE_HSI_OBS1		 			(HELPID_GAUGE + 0x0038)
#define HELPID_GAUGE_IOAT						(HELPID_GAUGE + 0x0039)
#define HELPID_GAUGE_KOHLSMAN_KNOB	 			(HELPID_GAUGE + 0x003A)
#define HELPID_GAUGE_LIGHT_AP_INDICATOR			(HELPID_GAUGE + 0x003B)
#define HELPID_GAUGE_LIGHT_MASTER_WARNING		(HELPID_GAUGE + 0x003C)
#define HELPID_GAUGE_LIGHT_SWITCH_BEACON		(HELPID_GAUGE + 0x003D)
#define HELPID_GAUGE_LIGHT_SWITCH_LANDING		(HELPID_GAUGE + 0x003E)
#define HELPID_GAUGE_LIGHT_SWITCH_NAV			(HELPID_GAUGE + 0x003F)
#define HELPID_GAUGE_LIGHT_SWITCH_PANEL			(HELPID_GAUGE + 0x0040)
#define HELPID_GAUGE_LIGHT_SWITCH_RECOGNITION	(HELPID_GAUGE + 0x0041)
#define HELPID_GAUGE_LIGHT_SWITCH_STROBE		(HELPID_GAUGE + 0x0042)
#define HELPID_GAUGE_LIGHT_SWITCH_TAXI			(HELPID_GAUGE + 0x0043)
#define HELPID_GAUGE_LOCALIZER_INDEX			(HELPID_GAUGE + 0x0044)
#define HELPID_GAUGE_MAGNETO_SWITCH				(HELPID_GAUGE + 0x0045)
#define HELPID_GAUGE_MANIFOLD_PRESSURE			(HELPID_GAUGE + 0x0046)
#define HELPID_GAUGE_MARKER_OUTER	 			(HELPID_GAUGE + 0x0047)
#define HELPID_GAUGE_MARKER_MIDDLE 				(HELPID_GAUGE + 0x0048)
#define HELPID_GAUGE_MARKER_INNER	 			(HELPID_GAUGE + 0x0049)
#define HELPID_GAUGE_MASTER_SWITCH				(HELPID_GAUGE + 0x004A)
#define HELPID_GAUGE_MASTER_ALT_BAT				(HELPID_GAUGE + 0x004B)
#define HELPID_GAUGE_MASTER_CAUTION_LIGHT		(HELPID_GAUGE + 0x004C)
#define HELPID_GAUGE_NAV_GPS_SWITCH				(HELPID_GAUGE + 0x004D)
#define HELPID_GAUGE_OIL_PRESSURE				(HELPID_GAUGE + 0x004E)
#define HELPID_GAUGE_OIL_TEMPERATURE			(HELPID_GAUGE + 0x004F)
#define HELPID_GAUGE_OMI_LIGHTS					(HELPID_GAUGE + 0x0050)
#define HELPID_GAUGE_PARKING_BRAKE				(HELPID_GAUGE + 0x0051)
#define HELPID_GAUGE_PFD						(HELPID_GAUGE + 0x0052)
#define HELPID_GAUGE_PITCH_TRIM					(HELPID_GAUGE + 0x0053)
#define HELPID_GAUGE_PITCH_TRIM_INDICATOR		(HELPID_GAUGE + 0x0054)
#define HELPID_GAUGE_PITCH_TRIM_KNOB			(HELPID_GAUGE + 0x0055)
#define HELPID_GAUGE_PITCH_TRIM_SWITCH			(HELPID_GAUGE + 0x0056)
#define HELPID_GAUGE_PITOT_HEAT_SWITCH			(HELPID_GAUGE + 0x0057)
#define HELPID_GAUGE_PROP_RPM					(HELPID_GAUGE + 0x0058)
#define HELPID_GAUGE_PROP_SYNC					(HELPID_GAUGE + 0x0059)
#define HELPID_GAUGE_RMI						(HELPID_GAUGE + 0x005A)
#define HELPID_GAUGE_RMI_DME					(HELPID_GAUGE + 0x005B)
#define HELPID_GAUGE_ROLL_TRIM					(HELPID_GAUGE + 0x005C)
#define HELPID_GAUGE_ROLL_TRIM_INDICATOR		(HELPID_GAUGE + 0x005D)
#define HELPID_GAUGE_ROLL_TRIM_KNOB				(HELPID_GAUGE + 0x005E)
#define HELPID_GAUGE_ROLL_TRIM_SWITCH			(HELPID_GAUGE + 0x005F)
#define HELPID_GAUGE_SIM_RATE					(HELPID_GAUGE + 0x0060)
#define HELPID_GAUGE_SLIP_SKID					(HELPID_GAUGE + 0x0061)
#define HELPID_GAUGE_SPOILER					(HELPID_GAUGE + 0x0062)
#define HELPID_GAUGE_STARTER_LEFT				(HELPID_GAUGE + 0x0063)
#define HELPID_GAUGE_STARTER_RIGHT				(HELPID_GAUGE + 0x0064)
#define HELPID_GAUGE_STARTER_SWITCH				(HELPID_GAUGE + 0x0065)
#define HELPID_GAUGE_SUCTION					(HELPID_GAUGE + 0x0066)
#define HELPID_GAUGE_SWITCH_FUEL_PUMP			(HELPID_GAUGE + 0x0067)
#define HELPID_GAUGE_TACHOMETER					(HELPID_GAUGE + 0x0068)
#define HELPID_GAUGE_TAS_CALIBRATION 			(HELPID_GAUGE + 0x0069)
#define HELPID_GAUGE_THROTTLE_PROP				(HELPID_GAUGE + 0x006A)
#define HELPID_GAUGE_THROTTLE_MIXTURE			(HELPID_GAUGE + 0x006B)
#define HELPID_GAUGE_THROTTLE_THROTTLE			(HELPID_GAUGE + 0x006C)
#define HELPID_GAUGE_THROTTLE_QUADRANT			(HELPID_GAUGE + 0x006D)
#define HELPID_GAUGE_THRUST_LEVERS				(HELPID_GAUGE + 0x006E)
#define HELPID_GAUGE_TIT						(HELPID_GAUGE + 0x006F)
#define HELPID_GAUGE_TORQUE						(HELPID_GAUGE + 0x0070)
#define HELPID_GAUGE_TURN_COORDINATOR			(HELPID_GAUGE + 0x0071)
#define HELPID_GAUGE_VOR1						(HELPID_GAUGE + 0x0072)
#define HELPID_GAUGE_VOR1_OBS					(HELPID_GAUGE + 0x0073)
#define HELPID_GAUGE_VOR2						(HELPID_GAUGE + 0x0074)
#define HELPID_GAUGE_VOR2_OBS2		 			(HELPID_GAUGE + 0x0075)
#define HELPID_GAUGE_VSI						(HELPID_GAUGE + 0x0076)
#define HELPID_GAUGE_WHISKEY_COMPASS			(HELPID_GAUGE + 0x0077)
#define HELPID_GAUGE_YAW_TRIM					(HELPID_GAUGE + 0x0078)
#define HELPID_GAUGE_YAW_TRIM_INDICATOR			(HELPID_GAUGE + 0x0079)
#define HELPID_GAUGE_YAW_TRIM_KNOB				(HELPID_GAUGE + 0x007A)
#define HELPID_GAUGE_YAW_TRIM_SWITCH			(HELPID_GAUGE + 0x007B)
#define HELPID_GAUGE_AUTOBRAKE_SWITCH			(HELPID_GAUGE + 0x007C)
#define HELPID_GAUGE_FLAP_LEVER					(HELPID_GAUGE + 0x007D)
#define HELPID_GAUGE_FLAP_LEVER_SOLO			(HELPID_GAUGE + 0x007E)
#define HELPID_GAUGE_GENERATOR_SWITCH			(HELPID_GAUGE + 0x007F)
#define HELPID_GAUGE_GENERATOR_LEFT				(HELPID_GAUGE + 0x0080)
#define HELPID_GAUGE_GENERATOR_RIGHT			(HELPID_GAUGE + 0x0081)
#define HELPID_GAUGE_LIGHT_SWITCH_WING			(HELPID_GAUGE + 0x0082)
#define HELPID_GAUGE_LIGHT_SWITCH_LOGO			(HELPID_GAUGE + 0x0083)
#define HELPID_GAUGE_TURN_BANK					(HELPID_GAUGE + 0x0084)
#define HELPID_GAUGE_VSI_KNOB					(HELPID_GAUGE + 0x0085)
#define HELPID_GAUGE_TOGGLE_RADIO_WINDOW		(HELPID_GAUGE + 0x0086)
#define HELPID_GAUGE_TOGGLE_GPS_WINDOW			(HELPID_GAUGE + 0x0087)
#define HELPID_GAUGE_TOGGLE_THROTTLE_WINDOW		(HELPID_GAUGE + 0x0088)
#define HELPID_GAUGE_TOGGLE_COMPASS_WINDOW		(HELPID_GAUGE + 0x0089)
#define HELPID_GAUGE_TOGGLE_FUEL_WINDOW			(HELPID_GAUGE + 0x008A)
#define HELPID_GAUGE_TOGGLE_COLLECTIVE_WINDOW	(HELPID_GAUGE + 0x008B)

//  777 gauges (0x0C00-0x0C80)
#define HELPID_777								(HELPID_MIN +  0x0C00)

#define HELPID_777_AUTOPILOT					(HELPID_777 + 0x0000)
#define HELPID_777_ENGINE_AUTOSTART				(HELPID_777 + 0x0001)

//  Mooney gauges (0x0C80-0x0CFF)
#define HELPID_MOONEY							(HELPID_MIN +  0x0C80)

#define HELPID_MOONEY_STANDBY_VAC_SWITCH		(HELPID_MOONEY + 0x0000)
#define HELPID_MOONEY_PROP_DEICE				(HELPID_MOONEY + 0x0001)
#define HELPID_MOONEY_SPEED_BRAKE				(HELPID_MOONEY + 0x0002)

//  KingAir gauges (0x0D00-0x0D80)
#define HELPID_KINGAIR							(HELPID_MIN +  0x0D00)

#define HELPID_KINGAIR_AUTOFEATHER_LIGHT		(HELPID_KINGAIR + 0x0000)
#define HELPID_KINGAIR_AUTOFEATHER_SWITCH		(HELPID_KINGAIR + 0x0001)
#define HELPID_KINGAIR_PROP_SYNC_SWITCH			(HELPID_KINGAIR + 0x0002)
#define HELPID_KINGAIR_PROP_SYNCHROSCOPE		(HELPID_KINGAIR + 0x0003)
#define HELPID_KINGAIR_PROP_LEVERS				(HELPID_KINGAIR + 0x0004)
#define HELPID_KINGAIR_CONDITION_LEVERS			(HELPID_KINGAIR + 0x0005)

//  Autopilot gauges (0x0D80-0x0DFF)
#define HELPID_AUTOPILOT						(HELPID_MIN +  0x0D80)

#define HELPID_AUTOPILOT_WING_LEVELER			(HELPID_AUTOPILOT + 0x0000)
#define HELPID_AUTOPILOT_IAS_HOLD	 	  		(HELPID_AUTOPILOT + 0x0001)
#define HELPID_AUTOPILOT_BC_HOLD				(HELPID_AUTOPILOT + 0x0002)
#define HELPID_AUTOPILOT_APP_HOLD				(HELPID_AUTOPILOT + 0x0003)
#define HELPID_AUTOPILOT_YAW_DAMP_HOLD			(HELPID_AUTOPILOT + 0x0004)
#define HELPID_AUTOPILOT_NAV_HOLD				(HELPID_AUTOPILOT + 0x0005)
#define HELPID_AUTOPILOT_NAV_INDICATOR			(HELPID_AUTOPILOT + 0x0006)
#define HELPID_AUTOPILOT_HEADING_HOLD			(HELPID_AUTOPILOT + 0x0007)
#define HELPID_AUTOPILOT_HEADING_INDICATOR		(HELPID_AUTOPILOT + 0x0008)
#define HELPID_AUTOPILOT_IAS_ACQUIRE_HOLD		(HELPID_AUTOPILOT + 0x0009)
#define HELPID_AUTOPILOT_VSI_HOLD				(HELPID_AUTOPILOT + 0x000A)
#define HELPID_AUTOPILOT_VSI_INDICATOR			(HELPID_AUTOPILOT + 0x000B)
#define HELPID_AUTOPILOT_ALTITUDE_HOLD			(HELPID_AUTOPILOT + 0x000C)
#define HELPID_AUTOPILOT_ALTITUDE_INDICATOR		(HELPID_AUTOPILOT + 0x000D)
#define HELPID_AUTOPILOT_SPEED_HOLD				(HELPID_AUTOPILOT + 0x000E)
#define HELPID_AUTOPILOT_SPEED_INDICATOR		(HELPID_AUTOPILOT + 0x000F)
#define HELPID_AUTOPILOT_FLIGHT_DIRECTOR_SWITCH	(HELPID_AUTOPILOT + 0x0010)
#define HELPID_AUTOPILOT_AUTOTHROTTLE			(HELPID_AUTOPILOT + 0x0011)
#define HELPID_AUTOPILOT_MACH_HOLD				(HELPID_AUTOPILOT + 0x0012)
#define HELPID_AUTOPILOT_MACH_INDICATOR			(HELPID_AUTOPILOT + 0x0013)
#define HELPID_AUTOPILOT_VSI_WHEEL	 			(HELPID_AUTOPILOT + 0x0014)


//
// Key Accelerator Event IDs
//
#define KEY_ID_MIN						0x00010000

#define	KEY_NULL						(KEY_ID_MIN + 0)
#define KEY_DEMO_STOP		  			(KEY_ID_MIN + 1)
#define KEY_REPLAY_STOP		  			(KEY_ID_MIN + 1)	// ESCAPE
#define KEY_SELECT_1					(KEY_ID_MIN + 2)
#define KEY_SELECT_2					(KEY_ID_MIN + 3)
#define KEY_SELECT_3					(KEY_ID_MIN + 4)
#define KEY_SELECT_4					(KEY_ID_MIN + 5)
#define KEY_DEMO_RECORD_1_SEC			(KEY_ID_MIN + 7)
#define KEY_DEMO_RECORD_5_SEC			(KEY_ID_MIN + 8)
#define KEY_MINUS						(KEY_ID_MIN + 12)
#define KEY_PLUS						(KEY_ID_MIN + 13)
#define KEY_ZOOM_1X						(KEY_ID_MIN + 14)
#define KEY_PANEL_SELECT_1				(KEY_ID_MIN + 15)
#define KEY_SOUND_TOGGLE				(KEY_ID_MIN + 16)
#define KEY_FULL_WINDOW_TOGGLE			(KEY_ID_MIN + 17)
#define KEY_ENGINE						(KEY_ID_MIN + 18)
#define KEY_SIM_RATE					(KEY_ID_MIN + 19)
#define KEY_XPNDR						(KEY_ID_MIN + 20)
#define KEY_SLEW_TOGGLE					(KEY_ID_MIN + 21)
#define KEY_EGT							(KEY_ID_MIN + 22)
#define KEY_SMOKE_TOGGLE				(KEY_ID_MIN + 23)
#define KEY_STROBES_TOGGLE				(KEY_ID_MIN + 24)
#define KEY_PAUSE_TOGGLE				(KEY_ID_MIN + 25)
#define KEY_ATC							(KEY_ID_MIN + 28)
#define KEY_ADF							(KEY_ID_MIN + 30)
#define KEY_VIEW_MODE					(KEY_ID_MIN + 31)
#define KEY_HEADING_GYRO_SET			(KEY_ID_MIN + 32)
#define KEY_DME							(KEY_ID_MIN + 33)
#define KEY_GEAR_TOGGLE					(KEY_ID_MIN + 34)
#define KEY_ANTI_ICE_TOGGLE				(KEY_ID_MIN + 35)
#define KEY_JET_STARTER					(KEY_ID_MIN + 36)
#define KEY_JOYSTICK_CALIBRATE			(KEY_ID_MIN + 37)
#define KEY_ALL_LIGHTS_TOGGLE			(KEY_ID_MIN + 38)
#define KEY_SITUATION_SAVE				(KEY_ID_MIN + 39)
#define KEY_VIEW_WINDOW_TO_FRONT		(KEY_ID_MIN + 40)
#define KEY_DEMO_RECORD_STOP			(KEY_ID_MIN + 43)
#define KEY_ANALYSIS_MANEUVER_STOP		(KEY_ID_MIN + 43)
#define KEY_AP_MASTER					(KEY_ID_MIN + 44)
#define KEY_LANDME_TOGGLE				(KEY_ID_MIN + 45)
#define KEY_COM_RADIO					(KEY_ID_MIN + 46)
#define KEY_VOR_OBS						(KEY_ID_MIN + 47)
#define KEY_BAROMETRIC					(KEY_ID_MIN + 48)
#define KEY_NAV_RADIO					(KEY_ID_MIN + 49)
#define KEY_MAGNETO						(KEY_ID_MIN + 50)
#define KEY_DEMO_RECORD_MESSAGE			(KEY_ID_MIN + 51)
#define KEY_BRAKES						(KEY_ID_MIN + 52)
#define KEY_SPOILERS_TOGGLE				(KEY_ID_MIN + 53)
#define KEY_SITUATION_RESET				(KEY_ID_MIN + 55)
#define KEY_FLAPS_UP					(KEY_ID_MIN + 59)
#define KEY_THROTTLE_FULL				(KEY_ID_MIN + 60)
#define KEY_FLAPS_1						(KEY_ID_MIN + 61)
#define KEY_THROTTLE_INCR				(KEY_ID_MIN + 62)
#define KEY_FLAPS_2						(KEY_ID_MIN + 63)
#define KEY_THROTTLE_INCR_SMALL			(KEY_ID_MIN + 64)
#define KEY_FLAPS_3						(KEY_ID_MIN + 65)
#define KEY_THROTTLE_DECR				(KEY_ID_MIN + 66)
#define KEY_FLAPS_4						(KEY_ID_MIN + 67)
#define KEY_FLAPS_DOWN					(KEY_ID_MIN + 67)		// KEY_FLAPS_4 synonym
#define KEY_THROTTLE_CUT				(KEY_ID_MIN + 68)
#define KEY_VIEW						(KEY_ID_MIN + 70)
#define KEY_NUMPAD7						(KEY_ID_MIN + 71)
#define KEY_NUMPAD8						(KEY_ID_MIN + 72)
#define KEY_NUMPAD9						(KEY_ID_MIN + 73)
#define KEY_NUMPAD4						(KEY_ID_MIN + 75)
#define KEY_NUMPAD5						(KEY_ID_MIN + 76)
#define KEY_NUMPAD6						(KEY_ID_MIN + 77)
#define KEY_NUMPAD1						(KEY_ID_MIN + 79)
#define KEY_NUMPAD2						(KEY_ID_MIN + 80)
#define KEY_NUMPAD3						(KEY_ID_MIN + 81)
#define KEY_MOUSE_AS_YOKE_TOGGLE		(KEY_ID_MIN + 83)
#define KEY_SLEW_ALTIT_UP_FAST			(KEY_ID_MIN + 84)
#define KEY_SLEW_ALTIT_UP_SLOW			(KEY_ID_MIN + 85)
#define KEY_SLEW_ALTIT_FREEZE			(KEY_ID_MIN + 86)
#define KEY_SLEW_ALTIT_DN_SLOW			(KEY_ID_MIN + 87)
#define KEY_SLEW_ALTIT_DN_FAST			(KEY_ID_MIN + 88)
#define KEY_SLEW_ALTIT_PLUS				(KEY_ID_MIN + 89)
#define KEY_SLEW_ALTIT_MINUS			(KEY_ID_MIN + 90)
#define KEY_SLEW_PITCH_DN_FAST			(KEY_ID_MIN + 91)
#define KEY_SLEW_PITCH_DN_SLOW			(KEY_ID_MIN + 92)
#define KEY_SLEW_PITCH_FREEZE			(KEY_ID_MIN + 93)
#define KEY_SLEW_PITCH_UP_SLOW			(KEY_ID_MIN + 94)
#define KEY_SLEW_PITCH_UP_FAST			(KEY_ID_MIN + 95)
#define KEY_SLEW_PITCH_PLUS				(KEY_ID_MIN + 96)
#define KEY_SLEW_PITCH_MINUS			(KEY_ID_MIN + 97)
#define KEY_MAGNETO_DECR				(KEY_ID_MIN + 98)
#define KEY_MAGNETO_INCR				(KEY_ID_MIN + 99)
#define KEY_COM_RADIO_WHOLE_DEC			(KEY_ID_MIN + 100)
#define KEY_COM_RADIO_WHOLE_INC			(KEY_ID_MIN + 101)
#define KEY_COM_RADIO_FRACT_DEC			(KEY_ID_MIN + 102)
#define KEY_COM_RADIO_FRACT_INC			(KEY_ID_MIN + 103)
#define KEY_NAV1_RADIO_WHOLE_DEC		(KEY_ID_MIN + 104)
#define KEY_NAV1_RADIO_WHOLE_INC		(KEY_ID_MIN + 105)
#define KEY_NAV1_RADIO_FRACT_DEC		(KEY_ID_MIN + 106)
#define KEY_NAV1_RADIO_FRACT_INC		(KEY_ID_MIN + 107)
#define KEY_NAV2_RADIO_WHOLE_DEC		(KEY_ID_MIN + 108)
#define KEY_NAV2_RADIO_WHOLE_INC		(KEY_ID_MIN + 109)
#define KEY_NAV2_RADIO_FRACT_DEC		(KEY_ID_MIN + 110)
#define KEY_NAV2_RADIO_FRACT_INC		(KEY_ID_MIN + 111)
#define KEY_ADF_100_INC					(KEY_ID_MIN + 112)
#define KEY_ADF_10_INC					(KEY_ID_MIN + 113)
#define KEY_ADF_1_INC					(KEY_ID_MIN + 114)
#define KEY_XPNDR_1000_INC				(KEY_ID_MIN + 115)
#define KEY_XPNDR_100_INC				(KEY_ID_MIN + 116)
#define KEY_XPNDR_10_INC				(KEY_ID_MIN + 117)
#define KEY_XPNDR_1_INC					(KEY_ID_MIN + 118)
#define KEY_ZOOM_IN						(KEY_ID_MIN + 119)
#define KEY_ZOOM_OUT					(KEY_ID_MIN + 120)
#define KEY_CLOCK_HOURS_DEC				(KEY_ID_MIN + 121)
#define KEY_CLOCK_HOURS_INC				(KEY_ID_MIN + 122)
#define KEY_CLOCK_MINUTES_DEC			(KEY_ID_MIN + 123)
#define KEY_CLOCK_MINUTES_INC			(KEY_ID_MIN + 124)
#define KEY_CLOCK_SECONDS_ZERO			(KEY_ID_MIN + 125)
#define KEY_VOR1_OBI_DEC				(KEY_ID_MIN + 126)
#define KEY_VOR1_OBI_INC				(KEY_ID_MIN + 127)
#define KEY_VOR2_OBI_DEC				(KEY_ID_MIN + 128)
#define KEY_VOR2_OBI_INC				(KEY_ID_MIN + 129)
#define KEY_ADF_100_DEC					(KEY_ID_MIN + 130)
#define KEY_ADF_10_DEC					(KEY_ID_MIN + 131)
#define KEY_ADF_1_DEC					(KEY_ID_MIN + 132)
#define KEY_AP_MASTER_ALT				(KEY_ID_MIN + 133)
#define KEY_MAP_ZOOM_FINE_IN			(KEY_ID_MIN + 134)
#define KEY_PAN_LEFT					(KEY_ID_MIN + 135)
#define KEY_PAN_RIGHT					(KEY_ID_MIN + 136)
#define KEY_MAP_ZOOM_FINE_OUT			(KEY_ID_MIN + 137)
#define KEY_VIEW_FORWARD				(KEY_ID_MIN + 138)
#define KEY_VIEW_FORWARD_RIGHT			(KEY_ID_MIN + 139)
#define KEY_VIEW_RIGHT					(KEY_ID_MIN + 140)
#define KEY_VIEW_REAR_RIGHT				(KEY_ID_MIN + 141)
#define KEY_VIEW_REAR					(KEY_ID_MIN + 142)
#define KEY_VIEW_REAR_LEFT				(KEY_ID_MIN + 143)
#define KEY_VIEW_LEFT					(KEY_ID_MIN + 144)
#define KEY_VIEW_FORWARD_LEFT			(KEY_ID_MIN + 145)
#define KEY_VIEW_DOWN					(KEY_ID_MIN + 146)
#define KEY_ELEVATOR_DOWN				(KEY_ID_MIN + 147)
#define KEY_ELEVATOR_UP					(KEY_ID_MIN + 148)
#define KEY_AILERON_LEFT				(KEY_ID_MIN + 149)
#define KEY_AILERON_CENTER				(KEY_ID_MIN + 150)
#define KEY_AILERON_RIGHT				(KEY_ID_MIN + 151)
#define KEY_RUDDER_LEFT					(KEY_ID_MIN + 152)
#define KEY_RUDDER_CENTER				(KEY_ID_MIN + 153)
#define KEY_RUDDER_RIGHT				(KEY_ID_MIN + 154)
#define KEY_VIEW1_MODE_SET				(KEY_ID_MIN + 155)
#define KEY_SOUND_SET					(KEY_ID_MIN + 156)
#define KEY_VIEW1_DIRECTION_SET			(KEY_ID_MIN + 157)
#define KEY_ELEVATOR_SET				(KEY_ID_MIN + 158)
#define KEY_AILERON_SET					(KEY_ID_MIN + 159)
#define KEY_RUDDER_SET					(KEY_ID_MIN + 160)
#define KEY_THROTTLE_SET				(KEY_ID_MIN + 161)
#define KEY_FLAPS_SET					(KEY_ID_MIN + 162)
#define KEY_GEAR_SET					(KEY_ID_MIN + 164)
#define KEY_VIEW1_ZOOM_SET				(KEY_ID_MIN + 165)
#define KEY_AXIS_IND_SET				(KEY_ID_MIN + 166)
#define KEY_VIEW1_WINDOW_SET			(KEY_ID_MIN + 167)
#define KEY_VIEW2_WINDOW_SET			(KEY_ID_MIN + 168)
#define KEY_MAP_WINDOW_SET				(KEY_ID_MIN + 169)
#define KEY_ELEVATOR_TRIM_SET			(KEY_ID_MIN + 170)
#define KEY_COM_RADIO_SET				(KEY_ID_MIN + 171)
#define KEY_NAV1_RADIO_SET				(KEY_ID_MIN + 172)
#define KEY_NAV2_RADIO_SET				(KEY_ID_MIN + 173)
#define KEY_VIEW2_MODE_SET				(KEY_ID_MIN + 174)
#define KEY_VIEW2_DIRECTION_SET			(KEY_ID_MIN + 175)
#define KEY_VIEW2_ZOOM_SET				(KEY_ID_MIN + 176)
#define KEY_MAP_ZOOM_SET				(KEY_ID_MIN + 177)
#define KEY_ADF_SET						(KEY_ID_MIN + 178)
#define KEY_XPNDR_SET					(KEY_ID_MIN + 179)
#define KEY_VOR1_SET					(KEY_ID_MIN + 180)
#define KEY_VOR2_SET					(KEY_ID_MIN + 181)
#define KEY_ZOOM_MINUS					(KEY_ID_MIN + 182)
#define KEY_ZOOM_PLUS					(KEY_ID_MIN + 183)
#define KEY_BRAKES_LEFT					(KEY_ID_MIN + 184)
#define KEY_BRAKES_RIGHT				(KEY_ID_MIN + 185)
#define KEY_AP_ATT_HOLD					(KEY_ID_MIN + 186)
#define KEY_AP_LOC_HOLD					(KEY_ID_MIN + 187)
#define KEY_AP_APR_HOLD					(KEY_ID_MIN + 188)
#define KEY_AP_HDG_HOLD					(KEY_ID_MIN + 189)
#define KEY_AP_ALT_HOLD					(KEY_ID_MIN + 190)
#define KEY_AP_WING_LEVELER				(KEY_ID_MIN + 191)
#define KEY_AP_BC_HOLD					(KEY_ID_MIN + 192)
#define KEY_AP_NAV1_HOLD				(KEY_ID_MIN + 193)
#define KEY_SLEW_OFF					(KEY_ID_MIN + 194)
#define KEY_SLEW_ON						(KEY_ID_MIN + 195)
#define KEY_EXIT						(KEY_ID_MIN + 196)
#define KEY_ABORT						(KEY_ID_MIN + 197)
#define KEY_PAN_UP						(KEY_ID_MIN + 198)
#define KEY_PAN_DOWN					(KEY_ID_MIN + 199)
#define KEY_READOUTS_SLEW				(KEY_ID_MIN + 200)
#define KEY_READOUTS_FLIGHT				(KEY_ID_MIN + 201)
#define KEY_SLEW_BANK_MINUS				(KEY_ID_MIN + 202)
#define KEY_SLEW_AHEAD_PLUS				(KEY_ID_MIN + 203)
#define KEY_SLEW_BANK_PLUS				(KEY_ID_MIN + 204)
#define KEY_SLEW_LEFT					(KEY_ID_MIN + 205)
#define KEY_SLEW_FREEZE					(KEY_ID_MIN + 206)
#define KEY_SLEW_RIGHT					(KEY_ID_MIN + 207)
#define KEY_SLEW_HEADING_MINUS			(KEY_ID_MIN + 208)
#define KEY_SLEW_AHEAD_MINUS			(KEY_ID_MIN + 209)
#define KEY_SLEW_HEADING_PLUS			(KEY_ID_MIN + 210)
#define KEY_PANEL_SELECT_2				(KEY_ID_MIN + 211)
#define KEY_PANEL_TOGGLE				(KEY_ID_MIN + 212)
#define KEY_VIEW_MODE_REV				(KEY_ID_MIN + 213)
#define KEY_PANEL_LIGHTS_TOGGLE			(KEY_ID_MIN + 214)
#define KEY_LANDING_LIGHTS_TOGGLE		(KEY_ID_MIN + 215)
#define KEY_PARKING_BRAKES				(KEY_ID_MIN + 216)
#define KEY_ZOOM_IN_FINE				(KEY_ID_MIN + 218)
#define KEY_ZOOM_OUT_FINE				(KEY_ID_MIN + 219)
#define KEY_MINUS_SHIFT					(KEY_ID_MIN + 220)
#define KEY_PLUS_SHIFT					(KEY_ID_MIN + 221)
#define	KEY_FLAPS_INCR					(KEY_ID_MIN + 222)
#define	KEY_FLAPS_DECR					(KEY_ID_MIN + 223)
#define	KEY_FLAPS_DETENTS_SET			(KEY_ID_MIN + 224)
#define KEY_AXIS_ELEVATOR_SET			(KEY_ID_MIN + 226)
#define KEY_AXIS_AILERONS_SET			(KEY_ID_MIN + 227)
#define KEY_AXIS_RUDDER_SET				(KEY_ID_MIN + 228)
#define KEY_AXIS_THROTTLE_SET			(KEY_ID_MIN + 229)
#define KEY_AXIS_ELEV_TRIM_SET			(KEY_ID_MIN + 230)
#define KEY_PROP_PITCH_SET				(KEY_ID_MIN + 231)
#define KEY_PROP_PITCH_LO				(KEY_ID_MIN + 232)
#define KEY_PROP_PITCH_INCR				(KEY_ID_MIN + 233)
#define KEY_PROP_PITCH_INCR_SMALL		(KEY_ID_MIN + 234)
#define KEY_PROP_PITCH_DECR				(KEY_ID_MIN + 235)
#define KEY_PROP_PITCH_HI				(KEY_ID_MIN + 236)
#define KEY_MIXTURE_SET					(KEY_ID_MIN + 237)
#define KEY_MIXTURE_RICH				(KEY_ID_MIN + 238)
#define KEY_MIXTURE_INCR				(KEY_ID_MIN + 239)
#define KEY_MIXTURE_INCR_SMALL			(KEY_ID_MIN + 240)
#define KEY_MIXTURE_DECR				(KEY_ID_MIN + 241)
#define KEY_MIXTURE_LEAN				(KEY_ID_MIN + 242)
#define KEY_MOUSE_AS_YOKE_OFF			(KEY_ID_MIN + 246)
#define KEY_MOUSE_AS_YOKE_ON			(KEY_ID_MIN + 247)
#define	KEY_MOUSE_AS_YOKE_SUSPEND		(KEY_ID_MIN + 248)
#define	KEY_MOUSE_AS_YOKE_RESUME		(KEY_ID_MIN + 249)
#define KEY_SPOILERS_SET				(KEY_ID_MIN + 250)
#define KEY_DME1_TOGGLE					(KEY_ID_MIN + 251)
#define KEY_DME2_TOGGLE					(KEY_ID_MIN + 252)
#define KEY_SIM_RATE_INCR				(KEY_ID_MIN + 253)
#define KEY_SIM_RATE_DECR				(KEY_ID_MIN + 254)
#define KEY_AUTOPILOT_OFF				(KEY_ID_MIN + 255)
#define KEY_AUTOPILOT_ON				(KEY_ID_MIN + 256)
#define KEY_YAW_DAMPER_TOGGLE			(KEY_ID_MIN + 257)
#define	KEY_PAUSE_ON					(KEY_ID_MIN + 258)
#define	KEY_PAUSE_OFF					(KEY_ID_MIN + 259)
#define	KEY_SLEW_RESET					(KEY_ID_MIN + 260)
#define	KEY_AP_PANEL_HEADING_HOLD		(KEY_ID_MIN + 262)
#define	KEY_AP_PANEL_ALTITUDE_HOLD		(KEY_ID_MIN + 263)
#define	KEY_CHVPP_LEFT_HAT_UP			(KEY_ID_MIN + 264)
#define KEY_CHVPP_LEFT_HAT_DOWN			(KEY_ID_MIN + 265)
#define	KEY_CHVPP_AP_ALT_WING			(KEY_ID_MIN + 266)
#define	KEY_CENTER_NT361_CHECK			(KEY_ID_MIN + 267)				
#define KEY_AP_ATT_HOLD_ON				(KEY_ID_MIN + 268)
#define KEY_AP_LOC_HOLD_ON				(KEY_ID_MIN + 269)
#define KEY_AP_APR_HOLD_ON				(KEY_ID_MIN + 270)
#define KEY_AP_HDG_HOLD_ON				(KEY_ID_MIN + 271)
#define KEY_AP_ALT_HOLD_ON				(KEY_ID_MIN + 272)
#define KEY_AP_WING_LEVELER_ON			(KEY_ID_MIN + 273)
#define KEY_AP_BC_HOLD_ON				(KEY_ID_MIN + 274)
#define KEY_AP_NAV1_HOLD_ON				(KEY_ID_MIN + 275)
#define KEY_AP_ATT_HOLD_OFF				(KEY_ID_MIN + 276)
#define KEY_AP_LOC_HOLD_OFF				(KEY_ID_MIN + 277)
#define KEY_AP_APR_HOLD_OFF				(KEY_ID_MIN + 278)
#define KEY_AP_HDG_HOLD_OFF				(KEY_ID_MIN + 279)
#define KEY_AP_ALT_HOLD_OFF				(KEY_ID_MIN + 280)
#define KEY_AP_WING_LEVELER_OFF			(KEY_ID_MIN + 281)
#define KEY_AP_BC_HOLD_OFF				(KEY_ID_MIN + 282)
#define KEY_AP_NAV1_HOLD_OFF			(KEY_ID_MIN + 283)
#define KEY_THROTTLE1_SET				(KEY_ID_MIN + 284)
#define KEY_THROTTLE2_SET				(KEY_ID_MIN + 285)
#define KEY_THROTTLE3_SET				(KEY_ID_MIN + 286)
#define KEY_THROTTLE4_SET				(KEY_ID_MIN + 287)
#define	KEY_CLOSE_VIEW					(KEY_ID_MIN + 288)
#define	KEY_NEW_VIEW					(KEY_ID_MIN + 289)
#define	KEY_NEW_MAP						(KEY_ID_MIN + 290)
#define	KEY_NEXT_VIEW					(KEY_ID_MIN + 291)
#define	KEY_PREV_VIEW					(KEY_ID_MIN + 292)
#define	KEY_VIEW_TYPE					(KEY_ID_MIN + 293)
#define	KEY_VIEW_TYPE_REV				(KEY_ID_MIN + 294)
#define	KEY_VIEW_TYPE_SET				(KEY_ID_MIN + 295)
#define	KEY_RADIO_VOR1_IDENT_DISABLE	(KEY_ID_MIN + 296)
#define	KEY_RADIO_VOR2_IDENT_DISABLE	(KEY_ID_MIN + 297)
#define	KEY_RADIO_DME1_IDENT_DISABLE	(KEY_ID_MIN + 298)
#define	KEY_RADIO_DME2_IDENT_DISABLE	(KEY_ID_MIN + 299)
#define	KEY_RADIO_ADF_IDENT_DISABLE		(KEY_ID_MIN + 300)
#define	KEY_RADIO_VOR1_IDENT_ENABLE		(KEY_ID_MIN + 301)
#define	KEY_RADIO_VOR2_IDENT_ENABLE		(KEY_ID_MIN + 302)
#define	KEY_RADIO_DME1_IDENT_ENABLE		(KEY_ID_MIN + 303)
#define	KEY_RADIO_DME2_IDENT_ENABLE		(KEY_ID_MIN + 304)
#define	KEY_RADIO_ADF_IDENT_ENABLE		(KEY_ID_MIN + 305)
#define	KEY_RADIO_VOR1_IDENT_TOGGLE		(KEY_ID_MIN + 306)
#define	KEY_RADIO_VOR2_IDENT_TOGGLE		(KEY_ID_MIN + 307)
#define	KEY_RADIO_DME1_IDENT_TOGGLE		(KEY_ID_MIN + 308)
#define	KEY_RADIO_DME2_IDENT_TOGGLE		(KEY_ID_MIN + 309)
#define	KEY_RADIO_ADF_IDENT_TOGGLE		(KEY_ID_MIN + 310)
#define	KEY_RADIO_VOR1_IDENT_SET		(KEY_ID_MIN + 311)
#define	KEY_RADIO_VOR2_IDENT_SET		(KEY_ID_MIN + 312)
#define	KEY_RADIO_DME1_IDENT_SET		(KEY_ID_MIN + 313)
#define	KEY_RADIO_DME2_IDENT_SET		(KEY_ID_MIN + 314)
#define	KEY_RADIO_ADF_IDENT_SET			(KEY_ID_MIN + 315)
#define KEY_GEAR_PUMP					(KEY_ID_MIN + 316)
#define KEY_SPOILERS_ARM_TOGGLE			(KEY_ID_MIN + 317)
#define KEY_PAN_LEFT_UP					(KEY_ID_MIN + 318)
#define KEY_PAN_LEFT_DOWN				(KEY_ID_MIN + 319)
#define KEY_PAN_RIGHT_UP				(KEY_ID_MIN + 320)
#define KEY_PAN_RIGHT_DOWN				(KEY_ID_MIN + 321)
#define KEY_PITOT_HEAT_TOGGLE			(KEY_ID_MIN + 322)
#define KEY_AP_AIRSPEED_HOLD 			(KEY_ID_MIN + 323)
#define KEY_AUTO_THROTTLE_ARM           (KEY_ID_MIN + 324)
#define KEY_AUTO_THROTTLE_TO_GA         (KEY_ID_MIN + 325)
#define KEY_LANDING_LIGHT_UP			(KEY_ID_MIN + 326)
#define KEY_LANDING_LIGHT_DOWN			(KEY_ID_MIN + 327)
#define KEY_LANDING_LIGHT_LEFT			(KEY_ID_MIN + 328)
#define KEY_LANDING_LIGHT_RIGHT			(KEY_ID_MIN + 329)
#define KEY_LANDING_LIGHT_HOME			(KEY_ID_MIN + 330)
#define KEY_AXIS_SLEW_AHEAD_SET			(KEY_ID_MIN + 331)
#define KEY_AXIS_SLEW_SIDEWAYS_SET		(KEY_ID_MIN + 332)
#define KEY_AXIS_SLEW_HEADING_SET		(KEY_ID_MIN + 333)
#define KEY_AXIS_SLEW_ALT_SET			(KEY_ID_MIN + 334)
#define KEY_AXIS_SLEW_BANK_SET			(KEY_ID_MIN + 335)
#define KEY_AXIS_SLEW_PITCH_SET			(KEY_ID_MIN + 336)
#define KEY_PAN_TILT_LEFT				(KEY_ID_MIN + 337)
#define KEY_PAN_TILT_RIGHT				(KEY_ID_MIN + 338)
#define KEY_PAN_RESET					(KEY_ID_MIN + 339)
#define KEY_CHECKLISTS					(KEY_ID_MIN + 340)
#define	KEY_GYRO_DRIFT_INC				(KEY_ID_MIN + 341)
#define	KEY_GYRO_DRIFT_DEC				(KEY_ID_MIN + 342)
#define	KEY_HEADING_BUG_INC				(KEY_ID_MIN + 343)
#define	KEY_HEADING_BUG_DEC				(KEY_ID_MIN + 344)
#define	KEY_ADF_CARD_INC				(KEY_ID_MIN + 345)
#define	KEY_ADF_CARD_DEC				(KEY_ID_MIN + 346)
#define	KEY_KOHLSMAN_INC				(KEY_ID_MIN + 347)
#define	KEY_KOHLSMAN_DEC				(KEY_ID_MIN + 348)
#define	KEY_TRUE_AIRSPEED_CALIBRATE_INC	(KEY_ID_MIN + 349)
#define	KEY_TRUE_AIRSPEED_CALIBRATE_DEC	(KEY_ID_MIN + 350)
#define	KEY_CROSS_FEED_OFF				(KEY_ID_MIN + 351)
#define	KEY_CROSS_FEED_LEFT_TO_RIGHT	(KEY_ID_MIN + 352)
#define	KEY_CROSS_FEED_RIGHT_TO_LEFT	(KEY_ID_MIN + 353)
#define	KEY_AP_PANEL_VS_HOLD			(KEY_ID_MIN + 354)
#define	KEY_AP_PANEL_SPEED_HOLD			(KEY_ID_MIN + 355)
#define	KEY_AP_ALT_VAR_INC				(KEY_ID_MIN + 356)
#define	KEY_AP_ALT_VAR_DEC				(KEY_ID_MIN + 357)
#define	KEY_AP_VS_VAR_INC				(KEY_ID_MIN + 358)
#define	KEY_AP_VS_VAR_DEC				(KEY_ID_MIN + 359)
#define	KEY_AP_SPD_VAR_INC				(KEY_ID_MIN + 360)
#define	KEY_AP_SPD_VAR_DEC				(KEY_ID_MIN + 361)
#define	KEY_AP_N1_REF_INC				(KEY_ID_MIN + 362)
#define	KEY_AP_N1_REF_DEC				(KEY_ID_MIN + 363)
#define	KEY_MULTIPLAYER_TRACK_TOGGLE	(KEY_ID_MIN + 364)
#define	KEY_MULTIPLAYER_PLAYER_TOGGLE	(KEY_ID_MIN + 365)
#define	KEY_MULTIPLAYER_PLAYER_SNAP		(KEY_ID_MIN + 366)
#define	KEY_MULTIPLAYER_GO_OBSERVER		(KEY_ID_MIN + 367)
#define	KEY_MULTIPLAYER_CHAT			(KEY_ID_MIN + 368)
#define	KEY_MULTIPLAYER_ACTIVATE_CHAT	(KEY_ID_MIN + 369)
#define	KEY_PANEL_1						(KEY_ID_MIN + 370)
#define	KEY_PANEL_2						(KEY_ID_MIN + 371)
#define	KEY_PANEL_3						(KEY_ID_MIN + 372)
#define	KEY_PANEL_4						(KEY_ID_MIN + 373)
#define	KEY_PANEL_5						(KEY_ID_MIN + 374)
#define	KEY_PANEL_6						(KEY_ID_MIN + 375)
#define	KEY_PANEL_7						(KEY_ID_MIN + 376)
#define	KEY_PANEL_8						(KEY_ID_MIN + 377)
#define	KEY_PANEL_9						(KEY_ID_MIN + 378)
#define	KEY_AP_PANEL_MACH_HOLD			(KEY_ID_MIN + 379)
#define	KEY_AP_MACH_VAR_INC				(KEY_ID_MIN + 380)
#define	KEY_AP_MACH_VAR_DEC				(KEY_ID_MIN + 381)
#define	KEY_AP_MACH_HOLD				(KEY_ID_MIN + 382)
//

// These events were added with the converter patch release
#define	KEY_MIXTURE1_SET				(KEY_ID_MIN + 383)
#define	KEY_MIXTURE2_SET				(KEY_ID_MIN + 384)
#define	KEY_MIXTURE3_SET				(KEY_ID_MIN + 385)
#define	KEY_MIXTURE4_SET				(KEY_ID_MIN + 386)
#define	KEY_PROP_PITCH1_SET				(KEY_ID_MIN + 387)
#define	KEY_PROP_PITCH2_SET				(KEY_ID_MIN + 388)
#define	KEY_PROP_PITCH3_SET				(KEY_ID_MIN + 389)
#define	KEY_PROP_PITCH4_SET				(KEY_ID_MIN + 390)
#define	KEY_MAGNETO1_OFF				(KEY_ID_MIN + 391)
#define	KEY_STARTER1_OFF				(KEY_ID_MIN + 391)
#define	KEY_MAGNETO1_RIGHT				(KEY_ID_MIN + 392)
#define	KEY_STARTER1_START				(KEY_ID_MIN + 392)
#define	KEY_MAGNETO1_LEFT				(KEY_ID_MIN + 393)
#define	KEY_STARTER1_GEN				(KEY_ID_MIN + 393)
#define	KEY_MAGNETO1_BOTH				(KEY_ID_MIN + 394)
#define	KEY_MAGNETO1_START				(KEY_ID_MIN + 395)
#define	KEY_MAGNETO1_SET				(KEY_ID_MIN + 396)
#define	KEY_STARTER1_SET				(KEY_ID_MIN + 396)
#define	KEY_MAGNETO2_OFF				(KEY_ID_MIN + 397)
#define	KEY_STARTER2_OFF				(KEY_ID_MIN + 397)
#define	KEY_MAGNETO2_RIGHT				(KEY_ID_MIN + 398)
#define	KEY_STARTER2_START				(KEY_ID_MIN + 398)
#define	KEY_MAGNETO2_LEFT				(KEY_ID_MIN + 399)
#define	KEY_STARTER2_GEN				(KEY_ID_MIN + 399)
#define	KEY_MAGNETO2_BOTH				(KEY_ID_MIN + 400)
#define	KEY_MAGNETO2_START				(KEY_ID_MIN + 401)
#define	KEY_MAGNETO2_SET				(KEY_ID_MIN + 402)
#define	KEY_STARTER2_SET				(KEY_ID_MIN + 402)
#define	KEY_MAGNETO3_OFF				(KEY_ID_MIN + 403)
#define	KEY_STARTER3_OFF				(KEY_ID_MIN + 403)
#define	KEY_MAGNETO3_RIGHT				(KEY_ID_MIN + 404)
#define	KEY_STARTER3_START				(KEY_ID_MIN + 404)
#define	KEY_MAGNETO3_LEFT				(KEY_ID_MIN + 405)
#define	KEY_STARTER3_GEN				(KEY_ID_MIN + 405)
#define	KEY_MAGNETO3_BOTH				(KEY_ID_MIN + 406)
#define	KEY_MAGNETO3_START				(KEY_ID_MIN + 407)
#define	KEY_MAGNETO3_SET				(KEY_ID_MIN + 408)
#define	KEY_STARTER3_SET				(KEY_ID_MIN + 408)
#define	KEY_MAGNETO4_OFF				(KEY_ID_MIN + 409)
#define	KEY_STARTER4_OFF				(KEY_ID_MIN + 409)
#define	KEY_MAGNETO4_RIGHT				(KEY_ID_MIN + 410)
#define	KEY_STARTER4_START				(KEY_ID_MIN + 410)
#define	KEY_MAGNETO4_LEFT				(KEY_ID_MIN + 411)
#define	KEY_STARTER4_GEN				(KEY_ID_MIN + 411)
#define	KEY_MAGNETO4_BOTH				(KEY_ID_MIN + 412)
#define	KEY_MAGNETO4_START				(KEY_ID_MIN + 413)
#define	KEY_MAGNETO4_SET				(KEY_ID_MIN + 414)
#define	KEY_STARTER4_SET				(KEY_ID_MIN + 414)
#define	KEY_AUTOCOORD_TOGGLE			(KEY_ID_MIN + 415)
#define	KEY_AUTOCOORD_OFF				(KEY_ID_MIN + 416)
#define	KEY_AUTOCOORD_ON				(KEY_ID_MIN + 417)
#define	KEY_AUTOCOORD_SET				(KEY_ID_MIN + 418)
#define	KEY_FUEL_SELECTOR_OFF			(KEY_ID_MIN + 419)
#define	KEY_FUEL_SELECTOR_ALL			(KEY_ID_MIN + 420)
#define	KEY_FUEL_SELECTOR_LEFT			(KEY_ID_MIN + 421)
#define	KEY_FUEL_SELECTOR_RIGHT			(KEY_ID_MIN + 422)
#define	KEY_FUEL_SELECTOR_LEFT_AUX		(KEY_ID_MIN + 423)
#define	KEY_FUEL_SELECTOR_RIGHT_AUX		(KEY_ID_MIN + 424)
#define	KEY_FUEL_SELECTOR_CENTER		(KEY_ID_MIN + 425)
#define	KEY_FUEL_SELECTOR_SET			(KEY_ID_MIN + 426)
#define	KEY_THROTTLE1_FULL				(KEY_ID_MIN + 427)
#define	KEY_THROTTLE1_INCR				(KEY_ID_MIN + 428)
#define	KEY_THROTTLE1_INCR_SMALL		(KEY_ID_MIN + 429)
#define	KEY_THROTTLE1_DECR				(KEY_ID_MIN + 430)
#define	KEY_THROTTLE1_CUT				(KEY_ID_MIN + 431)
#define	KEY_THROTTLE2_FULL				(KEY_ID_MIN + 432)
#define	KEY_THROTTLE2_INCR				(KEY_ID_MIN + 433)
#define	KEY_THROTTLE2_INCR_SMALL		(KEY_ID_MIN + 434)
#define	KEY_THROTTLE2_DECR				(KEY_ID_MIN + 435)
#define	KEY_THROTTLE2_CUT				(KEY_ID_MIN + 436)
#define	KEY_THROTTLE3_FULL				(KEY_ID_MIN + 437)
#define	KEY_THROTTLE3_INCR				(KEY_ID_MIN + 438)
#define	KEY_THROTTLE3_INCR_SMALL		(KEY_ID_MIN + 439)
#define	KEY_THROTTLE3_DECR				(KEY_ID_MIN + 440)
#define	KEY_THROTTLE3_CUT				(KEY_ID_MIN + 441)
#define	KEY_THROTTLE4_FULL				(KEY_ID_MIN + 442)
#define	KEY_THROTTLE4_INCR				(KEY_ID_MIN + 443)
#define	KEY_THROTTLE4_INCR_SMALL		(KEY_ID_MIN + 444)
#define	KEY_THROTTLE4_DECR				(KEY_ID_MIN + 445)
#define	KEY_THROTTLE4_CUT				(KEY_ID_MIN + 446)
#define	KEY_MIXTURE1_RICH				(KEY_ID_MIN + 447)
#define	KEY_MIXTURE1_INCR				(KEY_ID_MIN + 448)
#define	KEY_MIXTURE1_INCR_SMALL			(KEY_ID_MIN + 449)
#define	KEY_MIXTURE1_DECR				(KEY_ID_MIN + 450)
#define	KEY_MIXTURE1_LEAN				(KEY_ID_MIN + 451)
#define	KEY_MIXTURE2_RICH				(KEY_ID_MIN + 452)
#define	KEY_MIXTURE2_INCR				(KEY_ID_MIN + 453)
#define	KEY_MIXTURE2_INCR_SMALL			(KEY_ID_MIN + 454)
#define	KEY_MIXTURE2_DECR				(KEY_ID_MIN + 455)
#define	KEY_MIXTURE2_LEAN				(KEY_ID_MIN + 456)
#define	KEY_MIXTURE3_RICH				(KEY_ID_MIN + 457)
#define	KEY_MIXTURE3_INCR				(KEY_ID_MIN + 458)
#define	KEY_MIXTURE3_INCR_SMALL			(KEY_ID_MIN + 459)
#define	KEY_MIXTURE3_DECR				(KEY_ID_MIN + 460)
#define	KEY_MIXTURE3_LEAN				(KEY_ID_MIN + 461)
#define	KEY_MIXTURE4_RICH				(KEY_ID_MIN + 462)
#define	KEY_MIXTURE4_INCR				(KEY_ID_MIN + 463)
#define	KEY_MIXTURE4_INCR_SMALL			(KEY_ID_MIN + 464)
#define	KEY_MIXTURE4_DECR				(KEY_ID_MIN + 465)
#define	KEY_MIXTURE4_LEAN				(KEY_ID_MIN + 466)
#define	KEY_PROP_PITCH1_LO				(KEY_ID_MIN + 467)
#define	KEY_PROP_PITCH1_INCR			(KEY_ID_MIN + 468)
#define	KEY_PROP_PITCH1_INCR_SMALL		(KEY_ID_MIN + 469)
#define	KEY_PROP_PITCH1_DECR			(KEY_ID_MIN + 470)
#define	KEY_PROP_PITCH1_HI				(KEY_ID_MIN + 471)
#define	KEY_PROP_PITCH2_LO				(KEY_ID_MIN + 472)
#define	KEY_PROP_PITCH2_INCR			(KEY_ID_MIN + 473)
#define	KEY_PROP_PITCH2_INCR_SMALL		(KEY_ID_MIN + 474)
#define	KEY_PROP_PITCH2_DECR			(KEY_ID_MIN + 475)
#define	KEY_PROP_PITCH2_HI				(KEY_ID_MIN + 476)
#define	KEY_PROP_PITCH3_LO				(KEY_ID_MIN + 477)
#define	KEY_PROP_PITCH3_INCR			(KEY_ID_MIN + 478)
#define	KEY_PROP_PITCH3_INCR_SMALL		(KEY_ID_MIN + 479)
#define	KEY_PROP_PITCH3_DECR			(KEY_ID_MIN + 480)
#define	KEY_PROP_PITCH3_HI				(KEY_ID_MIN + 481)
#define	KEY_PROP_PITCH4_LO				(KEY_ID_MIN + 482)
#define	KEY_PROP_PITCH4_INCR			(KEY_ID_MIN + 483)
#define	KEY_PROP_PITCH4_INCR_SMALL		(KEY_ID_MIN + 484)
#define	KEY_PROP_PITCH4_DECR			(KEY_ID_MIN + 485)
#define	KEY_PROP_PITCH4_HI				(KEY_ID_MIN + 486)
#define	KEY_MAGNETO_OFF					(KEY_ID_MIN + 487)
#define	KEY_STARTER_OFF					(KEY_ID_MIN + 487)
#define	KEY_MAGNETO_RIGHT				(KEY_ID_MIN + 488)
#define	KEY_STARTER_START				(KEY_ID_MIN + 488)
#define	KEY_MAGNETO_LEFT				(KEY_ID_MIN + 489)
#define	KEY_STARTER_GEN					(KEY_ID_MIN + 489)
#define	KEY_MAGNETO_BOTH				(KEY_ID_MIN + 490)
#define	KEY_MAGNETO_START				(KEY_ID_MIN + 491)
#define	KEY_MAGNETO_SET					(KEY_ID_MIN + 492)
#define	KEY_STARTER_SET					(KEY_ID_MIN + 492)
// end of events added for converter patch release

// These events were added in the Patch Set 1 for FS98
#define	KEY_ANTI_ICE_ON					(KEY_ID_MIN + 493)
#define	KEY_ANTI_ICE_OFF				(KEY_ID_MIN + 494)
#define	KEY_ANTI_ICE_SET				(KEY_ID_MIN + 495)
#define	KEY_EGT_INC						(KEY_ID_MIN + 496)
#define	KEY_EGT_DEC						(KEY_ID_MIN + 497)
#define	KEY_EGT_SET						(KEY_ID_MIN + 498)
#define	KEY_AP_ALT_VAR_SET_METRIC		(KEY_ID_MIN + 499)
#define	KEY_AP_VS_VAR_SET_ENGLISH		(KEY_ID_MIN + 500)
#define	KEY_AP_SPD_VAR_SET				(KEY_ID_MIN + 501)
#define	KEY_AP_MACH_VAR_SET				(KEY_ID_MIN + 502)
#define	KEY_ADF_CARD_SET				(KEY_ID_MIN + 503)
#define	KEY_KOHLSMAN_SET				(KEY_ID_MIN + 504)
#define	KEY_SIM_RATE_SET				(KEY_ID_MIN + 505)
#define	KEY_HEADING_BUG_SET				(KEY_ID_MIN + 506)
#define	KEY_TRUE_AIRSPEED_CAL_SET		(KEY_ID_MIN + 507)
#define	KEY_CLOCK_HOURS_SET				(KEY_ID_MIN + 508)
#define	KEY_CLOCK_MINUTES_SET			(KEY_ID_MIN + 509)
#define	KEY_GYRO_DRIFT_SET				(KEY_ID_MIN + 510)
#define	KEY_ADF_EXTENDED_SET			(KEY_ID_MIN + 511)
#define	KEY_SLEW_SET					(KEY_ID_MIN + 512)
#define	KEY_SMOKE_ON					(KEY_ID_MIN + 513)
#define	KEY_SMOKE_OFF					(KEY_ID_MIN + 514)
#define	KEY_SMOKE_SET					(KEY_ID_MIN + 515)
#define	KEY_STROBES_ON					(KEY_ID_MIN + 516)
#define	KEY_STROBES_OFF					(KEY_ID_MIN + 517)
#define	KEY_STROBES_SET					(KEY_ID_MIN + 518)
#define	KEY_PAUSE_SET					(KEY_ID_MIN + 519)
#define	KEY_PANEL_LIGHTS_ON				(KEY_ID_MIN + 520)
#define	KEY_PANEL_LIGHTS_OFF			(KEY_ID_MIN + 521)
#define	KEY_PANEL_LIGHTS_SET			(KEY_ID_MIN + 522)
#define	KEY_LANDING_LIGHTS_ON			(KEY_ID_MIN + 523)
#define	KEY_LANDING_LIGHTS_OFF			(KEY_ID_MIN + 524)
#define	KEY_LANDING_LIGHTS_SET			(KEY_ID_MIN + 525)
#define	KEY_SOUND_ON					(KEY_ID_MIN + 526)
#define	KEY_SOUND_OFF					(KEY_ID_MIN + 527)
#define	KEY_SPOILERS_ON					(KEY_ID_MIN + 528)
#define	KEY_SPOILERS_OFF				(KEY_ID_MIN + 529)
#define	KEY_SPOILERS_ARM_ON				(KEY_ID_MIN + 530)
#define	KEY_SPOILERS_ARM_OFF			(KEY_ID_MIN + 531)
#define	KEY_SPOILERS_ARM_SET			(KEY_ID_MIN + 532)
#define	KEY_YAW_DAMPER_ON				(KEY_ID_MIN + 533)
#define	KEY_YAW_DAMPER_OFF				(KEY_ID_MIN + 534)
#define	KEY_YAW_DAMPER_SET				(KEY_ID_MIN + 535)
#define	KEY_PITOT_HEAT_ON				(KEY_ID_MIN + 536)
#define	KEY_PITOT_HEAT_OFF				(KEY_ID_MIN + 537)
#define	KEY_PITOT_HEAT_SET				(KEY_ID_MIN + 538)
#define	KEY_ZULU_HOURS_SET				(KEY_ID_MIN + 539)
#define	KEY_ZULU_MINUTES_SET			(KEY_ID_MIN + 540)
#define	KEY_ZULU_DAY_SET				(KEY_ID_MIN + 541)
#define	KEY_ZULU_YEAR_SET				(KEY_ID_MIN + 542)
#define	KEY_GEAR_UP						(KEY_ID_MIN + 543)
#define	KEY_GEAR_DOWN					(KEY_ID_MIN + 544)
#define	KEY_EGT1_INC					(KEY_ID_MIN + 545)
#define	KEY_EGT1_DEC					(KEY_ID_MIN + 546)
#define	KEY_EGT1_SET					(KEY_ID_MIN + 547)
#define	KEY_EGT2_INC					(KEY_ID_MIN + 548)
#define	KEY_EGT2_DEC					(KEY_ID_MIN + 549)
#define	KEY_EGT2_SET					(KEY_ID_MIN + 550)
#define	KEY_EGT3_INC					(KEY_ID_MIN + 551)
#define	KEY_EGT3_DEC					(KEY_ID_MIN + 552)
#define	KEY_EGT3_SET					(KEY_ID_MIN + 553)
#define	KEY_EGT4_INC					(KEY_ID_MIN + 554)
#define	KEY_EGT4_DEC					(KEY_ID_MIN + 555)
#define	KEY_EGT4_SET					(KEY_ID_MIN + 556)
#define	KEY_AP_AIRSPEED_ON				(KEY_ID_MIN + 557)
#define	KEY_AP_AIRSPEED_OFF				(KEY_ID_MIN + 558)
#define	KEY_AP_AIRSPEED_SET				(KEY_ID_MIN + 559)
#define	KEY_AP_MACH_ON					(KEY_ID_MIN + 560)
#define	KEY_AP_MACH_OFF					(KEY_ID_MIN + 561)
#define	KEY_AP_MACH_SET					(KEY_ID_MIN + 562)
#define	KEY_AP_VS_HOLD					(KEY_ID_MIN + 563)
#define	KEY_AP_VS_ON					(KEY_ID_MIN + 564)
#define	KEY_AP_VS_OFF					(KEY_ID_MIN + 565)
#define	KEY_AP_VS_SET					(KEY_ID_MIN + 566)
#define	KEY_AP_PANEL_ALTITUDE_ON		(KEY_ID_MIN + 567)
#define	KEY_AP_PANEL_ALTITUDE_OFF		(KEY_ID_MIN + 568)
#define	KEY_AP_PANEL_ALTITUDE_SET		(KEY_ID_MIN + 569)
#define	KEY_AP_PANEL_HEADING_ON			(KEY_ID_MIN + 570)
#define	KEY_AP_PANEL_HEADING_OFF		(KEY_ID_MIN + 571)
#define	KEY_AP_PANEL_HEADING_SET		(KEY_ID_MIN + 572)
#define	KEY_AP_PANEL_MACH_ON			(KEY_ID_MIN + 573)
#define	KEY_AP_PANEL_MACH_OFF			(KEY_ID_MIN + 574)
#define	KEY_AP_PANEL_MACH_SET			(KEY_ID_MIN + 575)
#define	KEY_AP_PANEL_SPEED_ON			(KEY_ID_MIN + 576)
#define	KEY_AP_PANEL_SPEED_OFF			(KEY_ID_MIN + 577)
#define	KEY_AP_PANEL_SPEED_SET			(KEY_ID_MIN + 578)
#define	KEY_AP_PANEL_VS_ON				(KEY_ID_MIN + 579)
#define	KEY_AP_PANEL_VS_OFF				(KEY_ID_MIN + 580)
#define	KEY_AP_PANEL_VS_SET				(KEY_ID_MIN + 581)
#define	KEY_SEE_OWN_AC_TOGGLE			(KEY_ID_MIN + 582)
#define	KEY_SEE_OWN_AC_ON				(KEY_ID_MIN + 583)
#define	KEY_SEE_OWN_AC_OFF				(KEY_ID_MIN + 584)
#define	KEY_SEE_OWN_AC_SET				(KEY_ID_MIN + 585)
#define	KEY_ADF_LOWRANGE_SET			(KEY_ID_MIN + 586)
#define	KEY_ADF_HIGHRANGE_SET			(KEY_ID_MIN + 587)
#define	KEY_AP_ALT_VAR_SET_ENGLISH		(KEY_ID_MIN + 588)
#define	KEY_AP_VS_VAR_SET_METRIC		(KEY_ID_MIN + 589)
#define	KEY_MAGNETO1_DECR				(KEY_ID_MIN + 590)
#define	KEY_MAGNETO1_INCR				(KEY_ID_MIN + 591)
#define	KEY_MAGNETO2_DECR				(KEY_ID_MIN + 592)
#define	KEY_MAGNETO2_INCR				(KEY_ID_MIN + 593)
#define	KEY_MAGNETO3_DECR				(KEY_ID_MIN + 594)
#define	KEY_MAGNETO3_INCR				(KEY_ID_MIN + 595)
#define	KEY_MAGNETO4_DECR				(KEY_ID_MIN + 596)
#define	KEY_MAGNETO4_INCR				(KEY_ID_MIN + 597)
// end of events added with Patch Set 1 for FS98

//
// these KEY_EVENTs were missing in the "gauges.h" of the FS2000 Panel SDK by Microsoft
// extracted and tested by Arne Bartels
// (c) 2000 Arne Bartels arne.bartels@nwn.de
//

//CFS EVENT IDs partially not checked
#define   KEY_NEW_SYMBOLIC_MAP                                (KEY_ID_MIN +  598)
#define   KEY_GUNSIGHT_SEL                                    (KEY_ID_MIN +  599)
#define   KEY_GUNSIGHT_TOGGLE                                 (KEY_ID_MIN +  600)
#define   KEY_VIEW_FORWARD_UP                                 (KEY_ID_MIN +  601)
#define   KEY_VIEW_FORWARD_RIGHT_UP                           (KEY_ID_MIN +  602)
#define   KEY_VIEW_RIGHT_UP                                   (KEY_ID_MIN +  603)
#define   KEY_VIEW_REAR_RIGHT_UP                              (KEY_ID_MIN +  604)
#define   KEY_VIEW_REAR_UP                                    (KEY_ID_MIN +  605)
#define   KEY_VIEW_REAR_LEFT_UP                               (KEY_ID_MIN +  606)
#define   KEY_VIEW_LEFT_UP                                    (KEY_ID_MIN +  607)
#define   KEY_VIEW_FORWARD_LEFT_UP                            (KEY_ID_MIN +  608)
#define   KEY_VIEW_UP                                         (KEY_ID_MIN +  609)
#define   KEY_SKIP_ACTION                                     (KEY_ID_MIN +  610)
#define   KEY_VIEW_RESET                                      (KEY_ID_MIN +  611)
#define   KEY_VIEW_FORWARD_PAN_UP                             (KEY_ID_MIN +  612)
#define   KEY_VIEW_FORWARD_RIGHT_PAN_UP_RIGHT                 (KEY_ID_MIN +  613)
#define   KEY_VIEW_RIGHT_PAN_RIGHT                            (KEY_ID_MIN +  614)
#define   KEY_VIEW_REAR_RIGHT_PAN_DOWN_RIGHT                  (KEY_ID_MIN +  615)
#define   KEY_VIEW_REAR_PAN_DOWN                              (KEY_ID_MIN +  616)
#define   KEY_VIEW_REAR_LEFT_PAN_DOWN_LEFT                    (KEY_ID_MIN +  617)
#define   KEY_VIEW_LEFT_PAN_LEFT                              (KEY_ID_MIN +  618)
#define   KEY_VIEW_FORWARD_LEFT_PAN_UP_LEFT                   (KEY_ID_MIN +  619)
#define   KEY_FIRE_ALL_GUNS                                   (KEY_ID_MIN +  620)
#define   KEY_FIRE_PRIMARY_GUNS                               (KEY_ID_MIN +  621)
#define   KEY_FIRE_SECONDARY_GUNS                             (KEY_ID_MIN +  622)
#define   KEY_DROP_BOMB                                       (KEY_ID_MIN +  623)
#define   KEY_FIRE_ROCKET                                     (KEY_ID_MIN +  624)
#define   KEY_FIRE_TIMED_ROCKET                               (KEY_ID_MIN +  625)
#define   KEY_VIEW_FORWARD_UP_PAN_UP                          (KEY_ID_MIN +  626)
#define   KEY_VIEW_FORWARD_RIGHT_UP_PAN_UP_RIGHT              (KEY_ID_MIN +  627)
#define   KEY_VIEW_RIGHT_UP_PAN_RIGHT                         (KEY_ID_MIN +  628)
#define   KEY_VIEW_REAR_RIGHT_UP_PAN_DOWN_RIGHT               (KEY_ID_MIN +  629)
#define   KEY_VIEW_REAR_UP_PAN_DOWN                           (KEY_ID_MIN +  630)
#define   KEY_VIEW_REAR_LEFT_UP_PAN_DOWN_LEFT                 (KEY_ID_MIN +  631)
#define   KEY_VIEW_LEFT_UP_PAN_LEFT                           (KEY_ID_MIN +  632)
#define   KEY_VIEW_FORWARD_LEFT_UP_PAN_UP_LEFT                (KEY_ID_MIN +  633)
#define   KEY_TOGGLE_RADAR                                    (KEY_ID_MIN +  634)
#define   KEY_ATC_MENU_EXIT                                   (KEY_ID_MIN +  635)
#define   KEY_ATC_MENU_1                                      (KEY_ID_MIN +  636)
#define   KEY_ATC_MENU_2                                      (KEY_ID_MIN +  637)
#define   KEY_ATC_MENU_3                                      (KEY_ID_MIN +  638)
#define   KEY_ATC_MENU_4                                      (KEY_ID_MIN +  639)
#define   KEY_ATC_MENU_5                                      (KEY_ID_MIN +  640)
#define   KEY_ATC_MENU_6                                      (KEY_ID_MIN +  641)
#define   KEY_ATC_MENU_7                                      (KEY_ID_MIN +  642)
#define   KEY_ATC_MENU_8                                      (KEY_ID_MIN +  643)
#define   KEY_ATC_MENU_9                                      (KEY_ID_MIN +  644)
#define   KEY_ATC_MENU_0                                      (KEY_ID_MIN +  645)
#define   KEY_VIEW_AUX_00                                     (KEY_ID_MIN +  646)
#define   KEY_VIEW_AUX_01                                     (KEY_ID_MIN +  647)
#define   KEY_VIEW_AUX_02                                     (KEY_ID_MIN +  648)
#define   KEY_VIEW_AUX_03                                     (KEY_ID_MIN +  649)
#define   KEY_VIEW_AUX_04                                     (KEY_ID_MIN +  650)
#define   KEY_VIEW_AUX_05                                     (KEY_ID_MIN +  651)

#define   KEY_INVOKE_HELP                                     (KEY_ID_MIN +  659)
#define   KEY_SELECT_NEXT_TARGET                              (KEY_ID_MIN +  660)
#define   KEY_TOGGLE_PADLOCK                                  (KEY_ID_MIN +  661)
#define   KEY_UNLOCK_TARGET                                   (KEY_ID_MIN +  662)
#define   KEY_TOGGLE_AIRCRAFT_LABELS                          (KEY_ID_MIN +  663)
#define   KEY_TOGGLE_DAMAGE_TEXT                              (KEY_ID_MIN +  664)
#define   KEY_TOGGLE_ENEMY_INDICATOR                          (KEY_ID_MIN +  665)
#define   KEY_WAR_EMERGENCY_POWER                             (KEY_ID_MIN +  666)
#define   KEY_BAIL_OUT                                        (KEY_ID_MIN +  667)
#define   KEY_TOGGLE_RADIO                                    (KEY_ID_MIN +  668)
#define   KEY_KEYBOARD_OVERLAY                                (KEY_ID_MIN +  669)
#define   KEY_CHASE_VIEW                                      (KEY_ID_MIN +  670)
#define   KEY_OTHER_AIRCRAFT_VIEW                             (KEY_ID_MIN +  671)
#define   KEY_BOMB_VIEW                                       (KEY_ID_MIN +  672)
#define   KEY_HUD_UNITS                                       (KEY_ID_MIN +  673)
#define   KEY_HUD_COLOR                                       (KEY_ID_MIN +  674)
#define   KEY_DEBUG_1                                         (KEY_ID_MIN +  675)
#define   KEY_DEBUG_2                                         (KEY_ID_MIN +  676)
#define   KEY_DEBUG_3                                         (KEY_ID_MIN +  677)
#define   KEY_DEBUG_4                                         (KEY_ID_MIN +  678)
#define   KEY_DEBUG_5                                         (KEY_ID_MIN +  679)
#define   KEY_DEBUG_6                                         (KEY_ID_MIN +  680)
#define   KEY_DEBUG_7                                         (KEY_ID_MIN +  681)
#define   KEY_DEBUG_8                                         (KEY_ID_MIN +  682)
#define   KEY_DEBUG_9                                         (KEY_ID_MIN +  683)
#define   KEY_DEBUG_0                                         (KEY_ID_MIN +  684)
#define   KEY_DEBUG_A                                         (KEY_ID_MIN +  685)
#define   KEY_DEBUG_B                                         (KEY_ID_MIN +  686)
#define   KEY_LETTERBOX                                       (KEY_ID_MIN +  687)

//FS2000 EVENT IDs
#define   KEY_ENGINE_AUTO_START                               (KEY_ID_MIN +  688)
#define   KEY_THROTTLE_10                                     (KEY_ID_MIN +  689)
#define   KEY_THROTTLE_20                                     (KEY_ID_MIN +  690)
#define   KEY_THROTTLE_30                                     (KEY_ID_MIN +  691)
#define   KEY_THROTTLE_40                                     (KEY_ID_MIN +  692)
#define   KEY_THROTTLE_50                                     (KEY_ID_MIN +  693)
#define   KEY_THROTTLE_60                                     (KEY_ID_MIN +  694)
#define   KEY_THROTTLE_70                                     (KEY_ID_MIN +  695)
#define   KEY_THROTTLE_80                                     (KEY_ID_MIN +  696)
#define   KEY_THROTTLE_90                                     (KEY_ID_MIN +  697)
#define   KEY_FORCE_END                                       (KEY_ID_MIN +  698)
#define   KEY_DEBUG_C                                         (KEY_ID_MIN +  699)
#define   KEY_DEBUG_D                                         (KEY_ID_MIN +  700)
#define   KEY_FUEL_PUMP                                       (KEY_ID_MIN +  701)
#define   KEY_ENGINE_PRIMER                                   (KEY_ID_MIN +  702)
#define   KEY_TOGGLE_BEACON_LIGHTS                            (KEY_ID_MIN +  703)
#define   KEY_TOGGLE_TAXI_LIGHTS                              (KEY_ID_MIN +  704)
#define   KEY_TOGGLE_MASTER_BATTERY                           (KEY_ID_MIN +  705)
#define   KEY_TOGGLE_MASTER_ALTERNATOR                        (KEY_ID_MIN +  706)
#define   KEY_INC_COWL_FLAPS                                  (KEY_ID_MIN +  707)
#define   KEY_DEC_COWL_FLAPS                                  (KEY_ID_MIN +  708)
#define   KEY_DEBUG_E                                         (KEY_ID_MIN +  709)
#define   KEY_DEBUG_F                                         (KEY_ID_MIN +  710)
#define   KEY_DEBUG_G                                         (KEY_ID_MIN +  711)
#define   KEY_DEBUG_H                                         (KEY_ID_MIN +  712)
#define   KEY_DEBUG_I                                         (KEY_ID_MIN +  713)
#define   KEY_DEBUG_J                                         (KEY_ID_MIN +  714)
#define   KEY_DEBUG_K                                         (KEY_ID_MIN +  715)
#define   KEY_DEBUG_L                                         (KEY_ID_MIN +  716)
#define   KEY_DEBUG_M                                         (KEY_ID_MIN +  717)
#define   KEY_DEBUG_N                                         (KEY_ID_MIN +  718)
#define   KEY_DEBUG_O                                         (KEY_ID_MIN +  719)
#define   KEY_DEBUG_P                                         (KEY_ID_MIN +  720)
#define   KEY_DEBUG_Q                                         (KEY_ID_MIN +  721)
#define   KEY_DEBUG_R                                         (KEY_ID_MIN +  722)
#define   KEY_DEBUG_S                                         (KEY_ID_MIN +  723)
#define   KEY_DEBUG_T                                         (KEY_ID_MIN +  724)
#define   KEY_DEBUG_U                                         (KEY_ID_MIN +  725)
#define   KEY_DEBUG_V                                         (KEY_ID_MIN +  726)
#define   KEY_DEBUG_W                                         (KEY_ID_MIN +  727)
#define   KEY_DEBUG_X                                         (KEY_ID_MIN +  728)
#define   KEY_DEBUG_Y                                         (KEY_ID_MIN +  729)
#define   KEY_DEBUG_Z                                         (KEY_ID_MIN +  730)
#define   KEY_OVERLAYMENU                                     (KEY_ID_MIN +  731)
#define   KEY_USERINTERRUPT                                   (KEY_ID_MIN +  732)
#define   KEY_SELECT_PREV_TARGET                              (KEY_ID_MIN +  733)
#define   KEY_STOP_PRIMARY_GUNS                               (KEY_ID_MIN +  734)
#define   KEY_STOP_SECONDARY_GUNS                             (KEY_ID_MIN +  735)
#define   KEY_STOP_ALL_GUNS                                   (KEY_ID_MIN +  736)
#define   KEY_SP_MULTIPLAYER_SCORE_DISPLAY                    (KEY_ID_MIN +  737)
#define   KEY_VIEW_SNAP_FORWARD                               (KEY_ID_MIN +  738)
#define   KEY_VIEW_SNAP_REAR                                  (KEY_ID_MIN +  739)
#define   KEY_AILERON_TRIM_LEFT                               (KEY_ID_MIN +  740)
#define   KEY_AILERON_TRIM_RIGHT                              (KEY_ID_MIN +  741)
#define   KEY_RUDDER_TRIM_LEFT                                (KEY_ID_MIN +  742)
#define   KEY_RUDDER_TRIM_RIGHT                               (KEY_ID_MIN +  743)
#define   KEY_RADIO_COMMNAV1_TEST_TOGGLE                      (KEY_ID_MIN +  744)
#define   KEY_RADIO_COMMNAV2_TEST_TOGGLE                      (KEY_ID_MIN +  745)
#define   KEY_RADIO_COMM1_AUTOSWITCH_TOGGLE                   (KEY_ID_MIN +  746)
#define   KEY_RADIO_NAV1_AUTOSWITCH_TOGGLE                    (KEY_ID_MIN +  747)
#define   KEY_RADIO_COMM2_AUTOSWITCH_TOGGLE                   (KEY_ID_MIN +  748)
#define   KEY_RADIO_NAV2_AUTOSWITCH_TOGGLE                    (KEY_ID_MIN +  749)
#define   KEY_DME_TOGGLE                                      (KEY_ID_MIN +  750)
#define   KEY_TOGGLE_PROP_SYNC                                (KEY_ID_MIN +  751)
#define   KEY_TOGGLE_FLIGHT_DIRECTOR                          (KEY_ID_MIN +  752)
#define   KEY_SYNC_FLIGHT_DIRECTOR_PITCH                      (KEY_ID_MIN +  753)
#define   KEY_TOGGLE_ELECTRIC_VACUUM_PUMP                     (KEY_ID_MIN +  754)
#define   KEY_AXIS_PROPELLER_SET                              (KEY_ID_MIN +  755)
#define   KEY_AXIS_MIXTURE_SET                                (KEY_ID_MIN +  756)
#define   KEY_TOGGLE_AVIONICS_MASTER                          (KEY_ID_MIN +  757)
#define   KEY_INC_CONCORDE_NOSE_VISOR                         (KEY_ID_MIN +  758)
#define   KEY_DEC_CONCORDE_NOSE_VISOR                         (KEY_ID_MIN +  759)
#define   KEY_TOGGLE_AFTERBURNER                              (KEY_ID_MIN +  760)
#define   KEY_TOGGLE_ARM_AUTOFEATHER                          (KEY_ID_MIN +  761)
#define   KEY_INC_AUTOBRAKE_CONTROL                           (KEY_ID_MIN +  762)
#define   KEY_DEC_AUTOBRAKE_CONTROL                           (KEY_ID_MIN +  763)
#define   KEY_TOGGLE_STARTER1                                 (KEY_ID_MIN +  764)
#define   KEY_TOGGLE_STARTER2                                 (KEY_ID_MIN +  765)
#define   KEY_TOGGLE_STARTER3                                 (KEY_ID_MIN +  766)
#define   KEY_TOGGLE_STARTER4                                 (KEY_ID_MIN +  767)
#define   KEY_TOGGLE_ALL_STARTERS                             (KEY_ID_MIN +  768)
#define   KEY_TOGGLE_VACUUM_FAILURE                           (KEY_ID_MIN +  769)
#define   KEY_TOGGLE_ELECTRICAL_FAILURE                       (KEY_ID_MIN +  770)
#define   KEY_TOGGLE_PITOT_BLOCKAGE                           (KEY_ID_MIN +  771)
#define   KEY_TOGGLE_STATIC_PORT_BLOCKAGE                     (KEY_ID_MIN +  772)
#define   KEY_TOGGLE_HYDRAULIC_FAILURE                        (KEY_ID_MIN +  773)
#define   KEY_TOGGLE_TOTAL_BRAKE_FAILURE                      (KEY_ID_MIN +  774)
#define   KEY_TOGGLE_LEFT_BRAKE_FAILURE                       (KEY_ID_MIN +  775)
#define   KEY_TOGGLE_RIGHT_BRAKE_FAILURE                      (KEY_ID_MIN +  776)
#define   KEY_TOGGLE_ENGINE1_FAILURE                          (KEY_ID_MIN +  777)
#define   KEY_TOGGLE_ENGINE2_FAILURE                          (KEY_ID_MIN +  778)
#define   KEY_TOGGLE_ENGINE3_FAILURE                          (KEY_ID_MIN +  779)
#define   KEY_TOGGLE_ENGINE4_FAILURE                          (KEY_ID_MIN +  780)
#define   KEY_TOGGLE_ALTERNATE_STATIC                         (KEY_ID_MIN +  781)
#define   KEY_ATTITUDE_BARS_POSITION_INC                      (KEY_ID_MIN +  782)
#define   KEY_ATTITUDE_BARS_POSITION_DEC                      (KEY_ID_MIN +  783)
#define   KEY_TOGGLE_RAD_INS_SWITCH                           (KEY_ID_MIN +  784)
#define   KEY_DECISION_HEIGHT_INC                             (KEY_ID_MIN +  785)
#define   KEY_DECISION_HEIGHT_DEC                             (KEY_ID_MIN +  786)
#define   KEY_LOW_HIGHT_WARNING_SET                           (KEY_ID_MIN +  787)
#define   KEY_LOW_HIGHT_WARNING_GAUGE_WILL_SET                (KEY_ID_MIN +  788)
#define   KEY_SET_FUEL_TRANSFER_FORWARD                       (KEY_ID_MIN +  789)
#define   KEY_SET_FUEL_TRANSFER_AFT                           (KEY_ID_MIN +  790)
#define   KEY_SET_FUEL_TRANSFER_AUTO                          (KEY_ID_MIN +  791)
#define   KEY_SET_FUEL_TRANSFER_OFF                           (KEY_ID_MIN +  792)
#define   KEY_INC_COWL_FLAPS1                                 (KEY_ID_MIN +  793)
#define   KEY_DEC_COWL_FLAPS1                                 (KEY_ID_MIN +  794)
#define   KEY_INC_COWL_FLAPS2                                 (KEY_ID_MIN +  795)
#define   KEY_DEC_COWL_FLAPS2                                 (KEY_ID_MIN +  796)
#define   KEY_INC_COWL_FLAPS3                                 (KEY_ID_MIN +  797)
#define   KEY_DEC_COWL_FLAPS3                                 (KEY_ID_MIN +  798)
#define   KEY_INC_COWL_FLAPS4                                 (KEY_ID_MIN +  799)
#define   KEY_DEC_COWL_FLAPS4                                 (KEY_ID_MIN +  800)
#define   KEY_TOGGLE_STRUCTURAL_DEICE                         (KEY_ID_MIN +  801)
#define   KEY_TOGGLE_PROPELLER_DEICE                          (KEY_ID_MIN +  802)
#define   KEY_TOGGLE_ELECT_FUEL_PUMP                          (KEY_ID_MIN +  803)
#define   KEY_TOGGLE_ELECT_FUEL_PUMP1                         (KEY_ID_MIN +  804)
#define   KEY_TOGGLE_ELECT_FUEL_PUMP2                         (KEY_ID_MIN +  805)
#define   KEY_TOGGLE_ELECT_FUEL_PUMP3                         (KEY_ID_MIN +  806)
#define   KEY_TOGGLE_ELECT_FUEL_PUMP4                         (KEY_ID_MIN +  807)
#define   KEY_TOGGLE_PRIMER                                   (KEY_ID_MIN +  808)
#define   KEY_TOGGLE_PRIMER1                                  (KEY_ID_MIN +  809)
#define   KEY_TOGGLE_PRIMER2                                  (KEY_ID_MIN +  810)
#define   KEY_TOGGLE_PRIMER3                                  (KEY_ID_MIN +  811)
#define   KEY_TOGGLE_PRIMER4                                  (KEY_ID_MIN +  812)
#define   KEY_ENGINE_FUELFLOW_BUG_POSITION1                   (KEY_ID_MIN +  813)
#define   KEY_ENGINE_FUELFLOW_BUG_POSITION2                   (KEY_ID_MIN +  814)
#define   KEY_ENGINE_FUELFLOW_BUG_POSITION3                   (KEY_ID_MIN +  815)
#define   KEY_ENGINE_FUELFLOW_BUG_POSITION4                   (KEY_ID_MIN +  816)
#define   KEY_AUTOPILOT_AIRSPEED_HOLD_CURRENT                 (KEY_ID_MIN +  817)
#define   KEY_AUTOPILOT_AIRSPEED_ACQUIRE                      (KEY_ID_MIN +  818)
#define   KEY_AUTOPILOT_PANEL_AIRSPEED_SET                    (KEY_ID_MIN +  819)
#define   KEY_AUTOPILOT_MACH_HOLD_CURRENT                     (KEY_ID_MIN +  820)
#define   KEY_AUTOPILOT_PANEL_MAX_SPEED                       (KEY_ID_MIN +  821)
#define   KEY_AUTOPILOT_PANEL_CRUISE_SPEED                    (KEY_ID_MIN +  822)
#define   KEY_TOGGLE_AFTERBURNER1                             (KEY_ID_MIN +  823)
#define   KEY_TOGGLE_AFTERBURNER2                             (KEY_ID_MIN +  824)
#define   KEY_TOGGLE_AFTERBURNER3                             (KEY_ID_MIN +  825)
#define   KEY_TOGGLE_AFTERBURNER4                             (KEY_ID_MIN +  826)
#define   KEY_TOGGLE_ALTERNATOR1                              (KEY_ID_MIN +  827)
#define   KEY_TOGGLE_ALTERNATOR2                              (KEY_ID_MIN +  828)
#define   KEY_TOGGLE_ALTERNATOR3                              (KEY_ID_MIN +  829)
#define   KEY_TOGGLE_ALTERNATOR4                              (KEY_ID_MIN +  830)
#define   KEY_COM_STBY_RADIO_WHOLE_DEC                        (KEY_ID_MIN +  831)
#define   KEY_COM_STBY_RADIO_WHOLE_INC                        (KEY_ID_MIN +  832)
#define   KEY_COM_STBY_RADIO_FRACT_DEC                        (KEY_ID_MIN +  833)
#define   KEY_COM_STBY_RADIO_FRACT_INC                        (KEY_ID_MIN +  834)
#define   KEY_COM_STBY_RADIO_SET                              (KEY_ID_MIN +  835)
#define   KEY_COM_STBY_RADIO_SWITCH_TO                        (KEY_ID_MIN +  836)
#define   KEY_TOGGLE_ATTITUDE_CAGE                            (KEY_ID_MIN +  837)
#define   KEY_TOGGLE_MASTER_BATTERY_ALTERNATOR                (KEY_ID_MIN +  838)
#define   KEY_TOGGLE_GPS_DRIVES_NAV1                          (KEY_ID_MIN +  839)
#define   KEY_TOGGLE_LOGO_LIGHTS                              (KEY_ID_MIN +  840)
#define   KEY_TOGGLE_RECOGNITION_LIGHTS                       (KEY_ID_MIN +  841)
#define   KEY_TOGGLE_WING_LIGHTS                              (KEY_ID_MIN +  842)
#define   KEY_TOGGLE_NAV_LIGHTS                               (KEY_ID_MIN +  843)
#define   KEY_HELI_BEEP_INCREASE                              (KEY_ID_MIN +  844)
#define   KEY_HELI_BEEP_DECREASE                              (KEY_ID_MIN +  845)
#define   KEY_AXIS_SPOILER_SET                                (KEY_ID_MIN +  846)
#define   KEY_CONCORDE_NOSE_VISOR_FULL_EXT                    (KEY_ID_MIN +  847)
#define   KEY_CONCORDE_NOSE_VISOR_FULL_RET                    (KEY_ID_MIN +  848)
#define   KEY_LOD_ZOOM_IN                                     (KEY_ID_MIN +  849)
#define   KEY_LOD_ZOOM_OUT                                    (KEY_ID_MIN +  850)
#define   KEY_AXIS_LEFT_BRAKE_SET                             (KEY_ID_MIN +  851)
#define   KEY_AXIS_RIGHT_BRAKE_SET                            (KEY_ID_MIN +  852)
#define   KEY_TOGGLE_AIRCRAFT_MAIN_EXIT                       (KEY_ID_MIN +  853)
#define   KEY_TOGGLE_WING_FOLD                                (KEY_ID_MIN +  854)
#define   KEY_TOGGLE_TAIL_HOOK_HANDLE                         (KEY_ID_MIN +  855)
#define   KEY_RELEASE_DROP_TANK_ALL                           (KEY_ID_MIN +  856)
#define   KEY_RELEASE_DROP_TANK_1                             (KEY_ID_MIN +  857)
#define   KEY_RELEASE_DROP_TANK_2                             (KEY_ID_MIN +  858)
#define   KEY_RADAR_ZOOM_IN                                   (KEY_ID_MIN +  859)
#define   KEY_RADAR_ZOOM_OUT                                  (KEY_ID_MIN +  860)
#define   KEY_ID_MAX                                          (KEY_ID_MIN +  861)

//
// Common Flight Simulator Data Types
//

// changed for compatibility with GCC (redefinition from <windef.h>)
#ifndef __GNUC__
typedef	VOID			*PVOID;
#endif
typedef	PVOID			*PPVOID;

typedef	unsigned	char	UINT8, *PUINT8, **PPUINT8;
typedef	signed		char	SINT8, *PSINT8, **PPSINT8;
typedef	unsigned	short	UINT16, *PUINT16, **PPUINT16;
typedef	signed		short	SINT16, *PSINT16, **PPSINT16;
typedef	signed		long	SINT32, *PSINT32, **PPSINT32;
#ifndef _BASETSD_H_
typedef	unsigned	long	UINT32, *PUINT32, **PPUINT32;
#endif

typedef	unsigned	char	VAR8, *PVAR8, **PPVAR8;
typedef	unsigned	short	VAR16, *PVAR16, **PPVAR16;
typedef	unsigned	long	VAR32, *PVAR32, **PPVAR32;

// SINT48 is defined later, after ANGL48

// 64-bit generic structure
typedef struct	VAR64
{
	VAR32	lo;
	VAR32	hi;
} VAR64, *PVAR64, **PPVAR64;
// 64-bit int mainly for square root
#ifndef _BASETSD_H_
typedef	struct	UINT64
{
	UINT32	lo;
	UINT32	hi;
} UINT64, *PUINT64, **PPUINT64;
#endif

typedef struct	SINT64
{
	UINT32	lo;
	SINT32	hi;
} SINT64, *PSINT64, **PPSINT64;

// boolean variables - hold TRUE/FALSE
// changed for compatibility with GCC (redefinition from <windef.h>)
#ifndef __GNUC__
typedef	int		BOOL, *PBOOL, **PPBOOL;
#else
typedef PBOOL *PPBOOL;
#endif

typedef	VAR8	BOOL8, *PBOOL8, **PPBOOL8;
typedef	VAR16	BOOL16, *PBOOL16, **PPBOOL16;
typedef	VAR32	BOOL32, *PBOOL32, **PPBOOL32;

// array of 1-bit boolean variables
typedef int		FLAGS, *PFLAGS, **PPFLAGS;
typedef VAR8	FLAGS8, *PFLAGS8, **PPFLAGS8;
typedef VAR16	FLAGS16, *PFLAGS16, **PPFLAGS16;
typedef VAR32	FLAGS32, *PFLAGS32, **PPFLAGS32;

// Enumeration variables - domain is subset of all possible values
typedef int		ENUM, *PENUM, **PPENUM;
typedef VAR8	ENUM8, *PENUM8, **PPENUM8;
typedef VAR16	ENUM16, *PENUM16, **PPENUM16;
typedef VAR32	ENUM32, *PENUM32, **PPENUM32;

// Identifier variables
typedef int		ID, *PID, **PPID;
typedef VAR8	ID8, *PID8, **PPID8;
typedef VAR16	ID16, *PID16, **PPID16;
typedef VAR32	ID32, *PID32, **PPID32;

// Error return variables
typedef	VAR32	ERR, *PERR, **PPERR;

// Fractional variables
typedef UINT8	UFRAC8, *PUFRAC8, **PPUFRAC8;	 // { 0..+1}
typedef SINT8	SFRAC8, *PSFRAC8, **PPSFRAC8;	 // {-1..+1}
typedef UINT16	UFRAC16, *PUFRAC16, **PPUFRAC16; // { 0..+1}
typedef SINT16	SFRAC16, *PSFRAC16, **PPSFRAC16; // {-1..+1}
typedef UINT32	UFRAC32, *PUFRAC32, **PPUFRAC32; // { 0..+1}
typedef SINT32	SFRAC32, *PSFRAC32, **PPSFRAC32; // {-1..+1}

// Integer/Fraction structures
typedef	UINT16	UIF16, *PUIF16, **PPUIF16;
typedef	SINT16	SIF16, *PSIF16, **PPSIF16;
typedef struct	UIF48
{
	UINT16	pad;
	UINT16	f;
	UINT32	i;
} UIF48, *PUIF48, **PPUIF48;

typedef	UINT32	UIF32, *PUIF32, **PPUIF32;
typedef	SINT32	SIF32, *PSIF32, **PPSIF32;
typedef struct	SIF48
{
	UINT16	pad;
	UINT16	f;
	SINT32	i;
} SIF48, *PSIF48, **PPSIF48;

typedef SINT64	SIF64, *PSIF64, **PPSIF64;

// Floating-point types
typedef double	FLOAT64, *PFLOAT64, **PPFLOAT64;
// changed for compatibility with GCC (redefinition from <winnt.h>)
#if !defined(_WINNT_) && !defined(_WINNT_H)		// NOT PORTABLE!
typedef	VAR8	CHAR;
typedef VAR8	*PCHAR;			 	// single character
#endif
typedef	PCHAR	*PPCHAR;			// pointer to pointer to char
typedef CHAR	STRING, *PSTRING, **PPSTRING;		// generic string of unknown length
typedef CHAR	STRINGZ, *PSTRINGZ, **PPSTRINGZ;	// generic string of unknown length, zero term

typedef VAR16	BCD16, *PBCD16, **PPBCD16;		// 4-digit BCD number (0000-9999)
typedef VAR16	BCO16, *PBCO16, **PPBCO16;		// 4-digit Octal number (0000-7777) (in BCD)
typedef	VAR32	BCD32, *PBCD32, **PPBCD32;		// 8-digit BCD number (00000000-99999999)

// pseudodegree variables
typedef VAR8	ANGL8, *PANGL8, **PPANGL8;
typedef VAR16	ANGL16, *PANGL16, **PPANGL16;
typedef VAR32	ANGL32, *PANGL32, **PPANGL32;
typedef struct	ANGL48
{
	UINT16	pad;
	UINT16	lo;
	UINT32	hi;
} ANGL48, *PANGL48, **PPANGL48;

typedef	ANGL48	SINT48, *PSINT48, **PPSINT48;


//	2D data structures
typedef SINT32	PIXEL, *PPIXEL, **PPPIXEL;		// screen pixel

typedef struct	PIXPOINT
{
	PIXEL x;
	PIXEL y;
} PIXPOINT, *PPIXPOINT, **PPPIXPOINT;

typedef struct	PIXBOX
{
	PIXEL x;
	PIXEL y;
	PIXEL size_x;
	PIXEL size_y;
} PIXBOX, *PPIXBOX, **PPPIXBOX;


// enum constants for IMAGE.format
typedef	enum IMG_FORMAT
{
	IMG_8_BIT_MONOCHROME = 0,
	IMG_8_BIT_INDEXED,
	IMG_15_BIT,
	IMG_16_BIT,
	IMG_24_BIT,
	IMG_32_BIT,
	IMG_MAX							// keep this last
} IMG_FORMAT;

// IMAGE - structure containing info pertaining to an offscreen image buffer
typedef	struct	IMAGE
{
	IMG_FORMAT	format;		// bit format for this image
	PIXPOINT	dim;		// offscreen buffer size (viewable area)
	UINT32		pitch;		// offset to add to advance one scan line in image buffer
	PPCHAR		rowtbl;		// array of dim.y entries containing absolute address of scan lines in image buffer
	UINT32		len;		// allocated length of image buffer
	PCHAR		image;		// pointer to image buffer
	PVOID		surface;	// direct draw surface.
} IMAGE, *PIMAGE, **PPIMAGE;


// Engine structure
typedef	struct	ENG
{
// ITEMS SAVED TO SITUATION FILE *****************************************
	SINT16		throttle_lvr_pos;		// throttle position (0-16384=>0-100%throttle position)
	UINT16		propeller_lvr_pos;		// propeller lever position (0-16384=>0-100%prop setting)
	UINT16		mixture_lvr_pos;		// mixture position (0-16384=>0-100%mixture position)
	ENUM16		starter;				// starter switch position

	BOOL16		combustion;				// combustion flag (combustion = TRUE)
	UINT16		n1_rpm;					// gas producer RPM (0-16384=>0-100%RPM)
	UINT16		n2_rpm;					// power RPM (0-16384=>0-100%RPM)
	UINT16		ff_pph;					// fuel flow (0-16384=>0-100%)PPH (normalized to Lear 3500 lbs thrust)
	UINT32		ff_pph_actual;          // fuel flow (0-16384=>0-100%)PPH
	UINT16		ff_pph_ssl;				// fuel flow (0-16384=>0-100%)PPH, Standard sea level conditions
	UINT16		torque;					// torque produced by engine (FT*LBS)
	UINT16		absorbed_torque;		// torque absorbed by propeller (FT*LBS)
	SINT32		thrust_lbs;				// thrust (LBS)
	ANGL16		blade_angle_pdeg;		// propeller blade angle (PDEG)

	BOOL16		lf_mag;					// left magneto status (activated = 1)
	BOOL16		rt_mag;					// right magneto status (activated = 1)
	BOOL16		anti_ice;				// anti ice switch
	UINT16		epr_bug_pos;			// epr governed engine setting (0-16384=>0-100%epr setting)
	UINT16		egt_bug_pos;			// egt governed engine setting (0-16384=>0-100%egt setting)

	UINT16		oil_tmp;				// oil temperature (degC) * 16384
	UINT16		oil_prs;				// oil pressure (PSI) * 16384
	UINT16		epr;					// engine pressure ratio (0-65536=>0-6.4)
	UINT16		egt_degC;				// exhaust gas temperature (degC)
	UINT16		manifold_pressure;		// manifold pressure (0-65536=>0-64)

// ITEMS NOT SAVED TO SITUATION FILE *****************************************
	SINT16		x_pos;					// lateral engine position (IN)
	SINT16		y_pos;					// vertical engine position (IN)
	SINT16		z_pos;					// longitudinal engine position (IN)

	UINT16		rpm_scaler;				// *16384 gives actual prop rpm in dx (= 65535 for jets)
	PVOID		ext_ptr;				// engine structure extension pointer

	UINT32		oil_quantity;			//oil quantity (0-16384 => 0-100%)
	UINT32		engine_vibration;		//oil quantity (0-16384 => 0-5)
	UINT32		hydraulic_pressure;     //hydraulic pressure (0-16384 => 0-4 psi)
	UINT32		hydraulic_quantity;		//hydraulic quantity (0-16384 => 0-100%)
	FLOAT64		induced_velocity;		//induced velocity from propwash or jet blast

	FLOAT64		cyl_head_temp_degF;		//cylinder head temperature (deg F)

// new variables due to addition of the helicopter

	UINT32		tot_ind;	  			// TOT * 16384, deg C
	UINT32		torque_ind;				// TQ * 16384, %
	UINT32		Wfpress_ind;			// Fuel Pressure * 16384, psi
	UINT32		electric_load;			// electrical load * 16384, % max load
	UINT32		xmsn_pressure;			// xmsn pressure * 16384, psi
	UINT32		xmsn_temperature;		// transmission temp * 16384, deg C
	UINT32		rotor_rpm;				// main rotor speed * 16384, % max


//	NEW FUEL VARIABLES
	ENUM  		tank_selector;			//what tanks are selected to draw from
	FLAGS 		tanks_used;				//what tanks are actually being drawn from
	UINT32 		number_of_tanks_used;	//# of tanks being drawn from
	FLOAT64 	fuelflow_pph;			//lbs/hr
	BOOL32 		fuel_available;			//True or False in selected tanks

// end of new variables

} ENG, *PENG, **PPENG;


// fuel_tank_selector enum values
typedef	enum	FUEL_SELECT
{
	FUEL_TANK_SELECTOR_OFF = 0,
	FUEL_TANK_SELECTOR_ALL,
	FUEL_TANK_SELECTOR_LEFT,
	FUEL_TANK_SELECTOR_RIGHT,
	FUEL_TANK_SELECTOR_LEFT_AUX,
	FUEL_TANK_SELECTOR_RIGHT_AUX,
	FUEL_TANK_SELECTOR_CENTER,
	FUEL_TANK_SELECTOR_CROSSFEED,

	FUEL_TANK_MAXIMUM
} FUEL_SELECT, *PFUEL_SELECT, **PPFUEL_SELECT;

// cross feed enum values
typedef	enum	CROSS_FEED_SELECT
{
	CROSS_FEED_OFF = 0,
	CROSS_FEED_LEFT_TO_RIGHT,
	CROSS_FEED_RIGHT_TO_LEFT,

	CROSS_FEED_MAX
} CROSS_FEED, *PCROSS_FEED, **PPCROSS_FEED;

// prop type enum values
typedef enum PROP_TYPE
{
	PROP_TYPE_NONE,
	PROP_TYPE_FIXED,
	PROP_TYPE_MANUAL,
	PROP_TYPE_CHOICE
} PROP_TYPE;

// units enum values
typedef enum UNITS_OF_MEASURE
{
	ENGLISH_UNITS,
	METRIC_UNITS_ALT_FEET,
	METRIC_UNITS_ALT_METER
} UNITS_OF_MEASURE;

//
//	Panel System types and defines
//

//	Token list
//
//	Token list for abstracted variable access
//	The order of variables in this list is tied to the token map in the
//	file panels\util_defs.c.  Every token here needs an entry in the
//	token map, which maps tokens to variables in memory.
//
//	There are two types of tokens.  Normal tokens are used for all the
//	variables in GLOBALS, as well as variables exported from modules.
//	Special tokens are used for variables which require a function call
//	to get the required information.
//
//	Tokens can be added anywhere in the list, but keep the lists aligned!
//
//	DO NOT CHANGE THE ORDER OF THESE TOKENS UNLESS YOU REALLY KNOW WHAT
//	YOU'RE DOING!
//

typedef	enum	GAUGE_TOKEN
{
	MODULE_VAR_NONE = 0,
	TICK18,						//  inc'd at 18hz. used for general purpose timing
	GROUND_ALTITUDE,			//  ground level altitude (1/256 meter/unit)
	CLOCK_HOUR,					//  local clock time, hours {0..23}
	CLOCK_MINUTE,				//  local clock time, minutes {0..59}
	CLOCK_SECOND,				//  local clock time, seconds {0..59}
	ZULU_HOUR,					//  delta time from GMT
	ZULU_MINUTE,				//  delta time from GMT
	ZULU_DAY,					//  GMT day of year (1 - 365/366)
	ZULU_YEAR,					//  GMT year
	PANEL_LIGHTS,				//  TRUE=panel lighting on
	STROBE_LIGHTS,				//  TRUE=strobe lights on
	STROBE_FLASH,				//  TRUE=strobe flash on model & screen
	PITOT_HEAT,					//	TRUE=pitot heat on
	LANDING_LIGHTS,				//  TRUE=landing lights on
	SMOKE_ENABLE,				//  TRUE=smoke system active
	ADF_FREQUENCY,				//  |
	ADF_500_HZ_TUNABLE,			//	|	ADF frequency
	ADF_EXTENDED_FREQUENCY,		//	|
	ADF_IDENTITY,
	ADF_SIGNAL_STRENGTH,
	ADF_MORSE_IDENT,
	ADF_CARD_RADIAL,			//	integer degrees 0-360
	COM_FREQUENCY,				//  BCD COM radio freq
	NAV1_FREQUENCY,				//  BCD NAV1 radio freq
	NAV1_VOR_RADIAL,
	NAV1_MORSE_IDENT,
	NAV2_FREQUENCY,				//  BCD NAV2 radio freq
	NAV2_VOR_RADIAL,
	NAV2_MORSE_IDENT,
	DME1_DISPLAY_TYPE,			//  FALSE=distance readout,  TRUE=speed in kts readout
	DME1_DISTANCE,				//  DME1 distance readout
	DME1_SPEED,					//  DME1 speed readout
	DME1_MORSE_IDENT,
	DME2_DISPLAY_TYPE,			//  FALSE=distance readout,  TRUE=speed in kts readout
	DME2_DISTANCE,				//  DME2 distance readout
	DME2_SPEED,					//  DME2 speed readout
	DME2_MORSE_IDENT,
	TRANSPONDER_CODE,			//  Octal Transponder code {0000 - 7777}
	ADF_NEEDLE,					//	16 bit pseudodegrees
	VOR1_NEEDLE,				// +-127 correspond to +-10 if VOR or to +-2.5 if localiser.
	VOR1_GS_NEEDLE,				// +-120 correspond to +-0.7
	VOR1_BACK_COURSE_FLAGS,		//  Status of VOR1 (see BC_FLAG_ in FS6DEF.H)
	VOR1_TF_FLAG,
	VOR1_GS_FLAG,
	VOR1_OBI,
	VOR1_CODE,
	VOR1_IDENTITY,
	VOR1_MAG_VAR,
	VOR1_SIGNAL_STRENGTH,
	VOR2_NEEDLE,
	VOR2_BACK_COURSE_FLAGS,		//  Status of VOR2 (see BC_FLAG_ in FS6DEF.H)
	VOR2_TF_FLAG,
	VOR2_GS_FLAG,
	VOR2_OBI,
	VOR2_CODE,
	VOR2_IDENTITY,
	VOR2_MAG_VAR,
	VOR2_SIGNAL_STRENGTH,
	VOR2_BEARING_DEGREES,
	AIRCRAFT_ON_GROUND,			//  TRUE=aircraft is on the ground
	AIRSPEED,					//	Airspeed - Indicated or True based on GLOBALP->indicated_aspd
	AIRSPEED_TRUE_CALIBRATE,	//	Degrees rotation of the tas calibration card
	BARBER_POLE_ASPD,			//  Movable Red-line airspeed  {1/128th knot/unit}
	MACH,						//  mach, 64k=3.2 mach (would be better as UIF32)
	VERTICAL_SPEED,				//  Velocity Up, vertical speed {1/256th m/sec}
	MACH_MAX_OPERATE,
	STALL_WARNING,				//  TRUE=5 knots before stall
	OVERSPEED_WARNING,			//  TRUE=overspeed warning
	TURN_COORDINATOR_BALL_POS,	//  turn coordinator ball position {-127..0..127}
	DELTA_HEADING_RATE,
	PLANE_LATITUDE,				//  current position of our aircraft
	PLANE_LONGITUDE,			//  current position of our aircraft
	PLANE_ALTITUDE,				//  current position of our aircraft
	ALT_FROM_BAROMETRIC_PRESSURE,
	KOHLSMAN_SETTING_MB,		//  knob position millibars
	KOHLSMAN_SETTING_HG,		//  knob position inches of hg
	PLANE_PITCH_DEGREES,
	ATTITUDE_INDICATOR_PITCH_DEGREES,
	PLANE_BANK_DEGREES,
	ATTITUDE_INDICATOR_BANK_DEGREES,
	PLANE_HEADING_DEGREES_MAGNETIC,
	MAGNETIC_VAR,				//  magnetic north vs. true north angular error
	WHISKEY_COMPASS_DEGREES,	//	True degrees
	PLANE_HEADING_DEGREES_GYRO,
	GYRO_DRIFT_ERROR,
	PLANE_HEADING_DEGREES_TRUE,
	AIRCRAFT_AUTOPILOT_AVAILABLE,
	AIRCRAFT_FLAPS_AVAILABLE,
	AIRCRAFT_STALL_HORN_AVAILABLE,
	AIRCRAFT_ENGINE_MIXTURE_AVAILABLE,
	AIRCRAFT_CARB_HEAT_AVAILABLE,
	AIRCRAFT_SPOILER_AVAILABLE,
	AIRCRAFT_IS_TAIL_DRAGGER,
	AIRCRAFT_STROBES_AVAILABLE,
	AIRCRAFT_PROP_TYPE_AVAILABLE,	//  PROP_TYPE_FIXED, PROP_TYPE_MANUAL, PROP_TYPE_AUTOMATIC
	AIRCRAFT_TOE_BRAKES_AVAILABLE,
	AIRCRAFT_NAV1_AVAILABLE,
	AIRCRAFT_NAV2_AVAILABLE,
	AIRCRAFT_NAV1_OBS_AVAILABLE,
	AIRCRAFT_NAV2_OBS_AVAILABLE,
	AIRCRAFT_VOR2_GAUGE_AVAILABLE,
	AIRCRAFT_GYRO_DRIFT_AVAILABLE,	// fek: may not be used for bug #2131 but making other changes...build build build
	AUTOPILOT_ACTIVE,			//  autopilot master on/off
	AUTOPILOT_WING_LEVELER,		//  wing leveler on/off
	AUTOPILOT_NAV1_LOCK,		//  nav 1 lock on/off
	AUTOPILOT_HEADING_LOCK,		//  heading lock on/off
	AUTOPILOT_HEADING_LOCK_DIR,	//  heading lock direction
	AUTOPILOT_ALTITUDE_LOCK,	//  altitude lock on/off
	AUTOPILOT_ALTITUDE_LOCK_VAR,//  altitude lock altitude in appropriate units
	AUTOPILOT_ATTITUDE_HOLD,	//  attitude hold
	AUTOPILOT_GLIDESLOPE_HOLD,	//  glideslope hold
	AUTOPILOT_APROACH_HOLD,		//  approach hold
	AUTOPILOT_BACKCOURSE_HOLD,	//  backcourse hold
	AUTOPILOT_YAW_DAMPER,		//  yaw damper
	AUTOPILOT_AIRSPEED_HOLD,	//  airspeed hold
	AUTOPILOT_AIRSPEED_HOLD_VAR,//  airspeed hold var
	AUTOPILOT_MACH_HOLD,		//  airspeed hold
	AUTOPILOT_MACH_HOLD_VAR,	//  airspeed hold var
	AUTOPILOT_VERTICAL_HOLD, 	//  vertical hold
	AUTOPILOT_VERTICAL_HOLD_VAR,//  vertical speed hold var in appropriate units
	AUTOPILOT_ALTITUDE_MANUALLY_TUNABLE,
	AUTOPILOT_HEADING_MANUALLY_TUNABLE,
	AUTOPILOT_AUTO_THROTTLE_ARM,
	AUTOPILOT_TAKEOFF_POWER_ACTIVE,
	ENGINE_RPM_HOLD,
	ENGINE_CONTROL_SELECT,				//  which engine is being controlled
	ENGINE1,
	ENGINE1_THROTTLE_LEVER_POS,	//	throttle position			(16k = 100% throttle position)
	ENGINE1_PROPELLER_LEVER_POS,	//	propeller lever position	(16k = 100% prop setting)
	ENGINE1_MIXTURE_LEVER_POS,		//	mixture position			(16k = 100% mixture position)
	ENGINE1_COMBUSTION,			//	combustion flag				(combustion = TRUE)
	ENGINE1_STARTER_SWITCH_POS,	//	starter switch position
	ENGINE1_MAGNETO_LEFT,			//	left magneto status			(activated = 1)
	ENGINE1_MAGNETO_RIGHT,			//	right magneto status		(activated = 1)
	ENGINE1_N1_RPM,				//	gas producer (RPM)			(16k = 100% RPM)
	ENGINE1_N2_RPM,				//	power (RPM)					(16k = 100% RPM)
	ENGINE1_FF_GPH,
	ENGINE1_FF_PPH,				//	fuel flow PPH
	ENGINE1_FF_PPH_SSL,			//	fuel flow (PPH)				(16k = 100%, Standard sea level conditions)
	ENGINE1_TORQUE,				//	torque produced ( FT*LBS )
	ENGINE1_ANTI_ICE_SWITCH,		//	anti ice switch
	ENGINE1_PRESSURE_RATIO,		//	engine pressure ratio		(65k = 6.4)
	ENGINE1_PRESSURE_BUG_POS,		//	epr governed engine setting (16k = 100% epr setting)
	ENGINE1_EGT,					//	exhaust gas temp (degC)		(16k = 860 deg)
	ENGINE1_EGT_BUG_POS,			//	egt governed engine setting (16k = 100% egt setting)
	ENGINE1_CHT,					//	cylinder head temperature
	ENGINE1_OIL_TEMPERATURE,		//	oil temperature (degC)		(16k = 140 deg)
	ENGINE1_OIL_PRESSURE,			//	oil pressure (PSI)			(16k = 55 PSI)
	ENGINE1_OIL_QUANTITY,			//	oil quantity				(16k = 100%)
	ENGINE1_HYDRAULIC_PRESSURE,	//	hydraulic pressure (PSI)	(16k = 4 psi)
	ENGINE1_HYDRAULIC_QUANTITY,	//	hydraulic quantity			(16k = 100%)
	ENGINE1_MANIFOLD_PRESSURE,		//	manifold pressure			(65k = 64)
	ENGINE1_ENGINE_VIBRATION,		//	oil quantity				(16k = 5)
	ENGINE1_RPM_SCALER,			//	*16384 gives actual prop rpm in dx (= 65535 for jets)
	ENGINE1_TURBINE_TEMPERATURE,	//	(DegC * 16384)
	ENGINE1_TORQUE_PERCENT,			//	(FT/LBS * 16384)
	ENGINE1_FUEL_PRESSURE,				//	(PSI * 16384)
	ENGINE1_ELECTRICAL_LOAD,			//	(Max Load * 16384)
	ENGINE1_TRANSMISSION_PRESSURE,		//	(PSI * 16384)
	ENGINE1_TRANSMISSION_TEMPERATURE,	//	(DegC * 16384)
	ENGINE1_ROTOR_RPM,					//	(Max 8 16384)
	ENGINE2,
	ENGINE2_THROTTLE_LEVER_POS,	//	throttle position (0-16384=>0-100%throttle position)
	ENGINE2_PROPELLER_LEVER_POS,//	propeller lever position (0-16384=>0-100%prop setting)
	ENGINE2_MIXTURE_LEVER_POS,	//	mixture position (0-16384=>0-100%mixture position)
	ENGINE2_COMBUSTION,			//	combustion flag (combustion = TRUE)
	ENGINE2_STARTER_SWITCH_POS,	//	starter switch position
	ENGINE2_MAGNETO_LEFT,		//	left magneto status (activated = 1)
	ENGINE2_MAGNETO_RIGHT,		//	right magneto status (activated = 1)
	ENGINE2_N1_RPM,				//	gas producer RPM (0-16384=>0-100%RPM)
	ENGINE2_N2_RPM,				//	power RPM (0-16384=>0-100%RPM)
	ENGINE2_FF_GPH,
	ENGINE2_FF_PPH,				//	PPH
	ENGINE2_FF_PPH_SSL,			//	fuel flow (0-16384=>0-100%)PPH, Standard sea level conditions
	ENGINE2_TORQUE,				//	torque produced ( FT*LBS )
	ENGINE2_ANTI_ICE_SWITCH,	//	anti ice switch
	ENGINE2_PRESSURE_RATIO,		//	engine pressure ratio (0-65536=>0-6.4)
	ENGINE2_PRESSURE_BUG_POS,	//	epr governed engine setting (0-16384=>0-100%epr setting)
	ENGINE2_EGT,				//	exhaust gas temperature (degC)
	ENGINE2_EGT_BUG_POS,		//	egt governed engine setting (0-16384=>0-100%egt setting)
	ENGINE2_CHT,				//	cylinder head temperature
	ENGINE2_OIL_TEMPERATURE,	//	oil temperature (degC)
	ENGINE2_OIL_PRESSURE,		//	oil pressure (PSI)
	ENGINE2_OIL_QUANTITY,		//	oil quantity (0-16384 => 0-100%)
	ENGINE2_HYDRAULIC_PRESSURE,	//	hydraulic pressure (0-16384 => 0-4 psi)
	ENGINE2_HYDRAULIC_QUANTITY,	//	hydraulic quantity (0-16384 => 0-100%)
	ENGINE2_MANIFOLD_PRESSURE,	//	manifold pressure (0-65536=>0-64)
	ENGINE2_ENGINE_VIBRATION,	//	oil quantity (0-16384 => 0-5)
	ENGINE2_RPM_SCALER,			//	*16384 gives actual prop rpm in dx (= 65535 for jets)
	ENGINE2_TURBINE_TEMPERATURE,		//	(DegC * 16384)
	ENGINE2_TORQUE_PERCENT,				//	(FT/LBS * 16384)
	ENGINE2_FUEL_PRESSURE,				//	(PSI * 16384)
	ENGINE2_ELECTRICAL_LOAD,			//	(Max Load * 16384)
	ENGINE2_TRANSMISSION_PRESSURE,		//	(PSI * 16384)
	ENGINE2_TRANSMISSION_TEMPERATURE,	//	(DegC * 16384)
	ENGINE2_ROTOR_RPM,					//	(Max 8 16384)
	ENGINE3,
	ENGINE3_THROTTLE_LEVER_POS,	//	throttle position (0-16384=>0-100%throttle position)
	ENGINE3_PROPELLER_LEVER_POS,//	propeller lever position (0-16384=>0-100%prop setting)
	ENGINE3_MIXTURE_LEVER_POS,	//	mixture position (0-16384=>0-100%mixture position)
	ENGINE3_COMBUSTION,			//	combustion flag (combustion = TRUE)
	ENGINE3_STARTER_SWITCH_POS,	//	starter switch position
	ENGINE3_MAGNETO_LEFT,		//	left magneto status (activated = 1)
	ENGINE3_MAGNETO_RIGHT,		//	right magneto status (activated = 1)
	ENGINE3_N1_RPM,				//	gas producer RPM (0-16384=>0-100%RPM)
	ENGINE3_N2_RPM,				//	power RPM (0-16384=>0-100%RPM)
	ENGINE3_FF_GPH,
	ENGINE3_FF_PPH,				//	fuel flow PPH
	ENGINE3_FF_PPH_SSL,			//	fuel flow (0-16384=>0-100%)PPH, Standard sea level conditions
	ENGINE3_TORQUE,				//	torque produced ( FT*LBS )
	ENGINE3_ANTI_ICE_SWITCH,	//	anti ice switch
	ENGINE3_PRESSURE_RATIO,		//	engine pressure ratio (0-65536=>0-6.4)
	ENGINE3_PRESSURE_BUG_POS,	//	epr governed engine setting (0-16384=>0-100%epr setting)
	ENGINE3_EGT,				//	exhaust gas temperature (degC)
	ENGINE3_EGT_BUG_POS,		//	egt governed engine setting (0-16384=>0-100%egt setting)
	ENGINE3_CHT,				//	cylinder head temperature
	ENGINE3_OIL_TEMPERATURE,	//	oil temperature (degC)
	ENGINE3_OIL_PRESSURE,		//	oil pressure (PSI)
	ENGINE3_OIL_QUANTITY,		//	oil quantity (0-16384 => 0-100%)
	ENGINE3_HYDRAULIC_PRESSURE,	//	hydraulic pressure (0-16384 => 0-4 psi)
	ENGINE3_HYDRAULIC_QUANTITY,	//	hydraulic quantity (0-16384 => 0-100%)
	ENGINE3_MANIFOLD_PRESSURE,	//	manifold pressure (0-65536=>0-64)
	ENGINE3_ENGINE_VIBRATION,	//	oil quantity (0-16384 => 0-5)
	ENGINE3_RPM_SCALER,			//	*16384 gives actual prop rpm in dx (= 65535 for jets)
	ENGINE3_TURBINE_TEMPERATURE,		//	(DegC * 16384)
	ENGINE3_TORQUE_PERCENT,				//	(FT/LBS * 16384)
	ENGINE3_FUEL_PRESSURE,				//	(PSI * 16384)
	ENGINE3_ELECTRICAL_LOAD,			//	(Max Load * 16384)
	ENGINE3_TRANSMISSION_PRESSURE,		//	(PSI * 16384)
	ENGINE3_TRANSMISSION_TEMPERATURE,	//	(DegC * 16384)
	ENGINE3_ROTOR_RPM,					//	(Max 8 16384)
	ENGINE4,
	ENGINE4_THROTTLE_LEVER_POS,	//	throttle position (0-16384=>0-100%throttle position)
	ENGINE4_PROPELLER_LEVER_POS,//	propeller lever position (0-16384=>0-100%prop setting)
	ENGINE4_MIXTURE_LEVER_POS,	//	mixture position (0-16384=>0-100%mixture position)
	ENGINE4_COMBUSTION,			//	combustion flag (combustion = TRUE)
	ENGINE4_STARTER_SWITCH_POS,	//	starter switch position
	ENGINE4_MAGNETO_LEFT,		//	left magneto status (activated = 1)
	ENGINE4_MAGNETO_RIGHT,		//	right magneto status (activated = 1)
	ENGINE4_N1_RPM,				//	gas producer RPM (0-16384=>0-100%RPM)
	ENGINE4_N2_RPM,				//	power RPM (0-16384=>0-100%RPM)
	ENGINE4_FF_GPH,
	ENGINE4_FF_PPH,				//	fuel flow PPH
	ENGINE4_FF_PPH_SSL,			//	fuel flow (0-16384=>0-100%)PPH, Standard sea level conditions
	ENGINE4_TORQUE,				//	torque produced ( FT*LBS )
	ENGINE4_ANTI_ICE_SWITCH,	//	anti ice switch
	ENGINE4_PRESSURE_RATIO,		//	engine pressure ratio (0-65536=>0-6.4)
	ENGINE4_PRESSURE_BUG_POS,	//	epr governed engine setting (0-16384=>0-100%epr setting)
	ENGINE4_EGT,				//	exhaust gas temperature (degC)
	ENGINE4_EGT_BUG_POS,		//	egt governed engine setting (0-16384=>0-100%egt setting)
	ENGINE4_CHT,				//	cylinder head temperature
	ENGINE4_OIL_TEMPERATURE,	//	oil temperature (degC)
	ENGINE4_OIL_PRESSURE,		//	oil pressure (PSI)
	ENGINE4_OIL_QUANTITY,		//	oil quantity (0-16384 => 0-100%)
	ENGINE4_HYDRAULIC_PRESSURE,	//	hydraulic pressure (0-16384 => 0-4 psi)
	ENGINE4_HYDRAULIC_QUANTITY,	//	hydraulic quantity (0-16384 => 0-100%)
	ENGINE4_MANIFOLD_PRESSURE,	//	manifold pressure (0-65536=>0-64)
	ENGINE4_ENGINE_VIBRATION,	//	oil quantity (0-16384 => 0-5)
	ENGINE4_RPM_SCALER,			//	*16384 gives actual prop rpm in dx (= 65535 for jets)
	ENGINE4_TURBINE_TEMPERATURE,		//	(DegC * 16384)
	ENGINE4_TORQUE_PERCENT,				//	(FT/LBS * 16384)
	ENGINE4_FUEL_PRESSURE,				//	(PSI * 16384)
	ENGINE4_ELECTRICAL_LOAD,			//	(Max Load * 16384)
	ENGINE4_TRANSMISSION_PRESSURE,		//	(PSI * 16384)
	ENGINE4_TRANSMISSION_TEMPERATURE,	//	(DegC * 16384)
	ENGINE4_ROTOR_RPM,					//	(Max 8 16384)
	NUMBER_OF_ENGINES,			//  1=single 2=twin ...
	PROP_ADVANCE_SELECTION,		//  0=fixed 1=optimal 2=manual
	THROTTLE_LOWER_LIMIT,		//  set by sim for thrust reversers
	OIL_QUANTITY_TOTAL,			//  0..7fff (8 qt.)
	SYSTEMS_AVAILABLE,
	INSTRUMENTS_AVAILABLE,
	PP_ADF,						//  partial panel variables
	PP_AIR,
	PP_ALTIM,
	PP_ATTITUDE,
	PP_COM,
	PP_COMPASS,
	PP_ELECT,					// there is no electricity in panels circuit
	PP_ENGINE,
	PP_FUEL_IND,
	PP_HEADING,
	PP_VERT_VEL,
	PP_XPNDR,
	PP_NAV,
	PP_PITOT,
	PP_TURN_COORD,
	PP_VACUUM,
	FUEL_TANK_CENTER_LEVEL,
	FUEL_TANK_CENTER_CAPACITY,
	FUEL_TANK_LEFT_MAIN_LEVEL,
	FUEL_TANK_LEFT_MAIN_CAPACITY,
	FUEL_TANK_LEFT_AUX_LEVEL,
	FUEL_TANK_LEFT_AUX_CAPACITY,
	FUEL_TANK_LEFT_TIP_LEVEL,
	FUEL_TANK_LEFT_TIP_CAPACITY,
	FUEL_TANK_RIGHT_MAIN_LEVEL,
	FUEL_TANK_RIGHT_MAIN_CAPACITY,
	FUEL_TANK_RIGHT_AUX_LEVEL,
	FUEL_TANK_RIGHT_AUX_CAPACITY,
	FUEL_TANK_RIGHT_TIP_LEVEL,
	FUEL_TANK_RIGHT_TIP_CAPACITY,
	FUEL_QUANTITY_RIGHT,		//	Total Gallons
	FUEL_QUANTITY_LEFT,			//	Total Gallons
	FUEL_QUANTITY_CENTER,		//	Total Gallons
	FUEL_WEGHT_PER_GALLON,		//  in pounds I.F  (6 lbs/gal = 1536)
	FUEL_TANK_SELECTOR,			//  see FUEL_TANK_SELECTOR_ enum values
	CROSS_FEED_SELECTOR,		//	OFF, LEFT_TO_RIGHT, or RIGHT_TO_LEFT

	OBSOLETE_YOKE_POS_Y,		// use ELEVATOR_DEFLECTION
	OBSOLETE_YOKE_IND_Y,		// use ELEVATOR_DEFLECTION
	OBSOLETE_YOKE_POS_X,		// use AILERON_DEFLECTION
	OBSOLETE_YOKE_IND_X,		// use AILERON_DEFLECTION
	OBSOLETE_AILERON_POS,		// use AILERON_DEFLECTION
	OBSOLETE_RUDDER_PEDAL_POS,	// use RUDDER_DEFLECTION
	OBSOLETE_RUDDER_PEDAL_IND,	// use RUDDER_DEFLECTION
	OBSOLETE_RUDDER_POS,		// use RUDDER_DEFLECTION
	OBSOLETE_ELEVATOR_POS,		// use ELEVATOR_DEFLECTION
	OBSOLETE_ELEVATOR_TRIM_POS,	// use ELEVATOR_TRIM
	OBSOLETE_ELEVATOR_TRIM_IND,	// use ELEVATOR_TRIM

	BRAKES_LEFT_POS,			//  0=off 32k=full brakes
	BRAKES_RIGHT_POS,			//  0=off 32k=full brakes
	BRAKE_IND,					//  0=off 16k=full brakes
	PARKING_BRAKE_POS,			//  0=off 32k=full	parking brakes
	SPOILERS_ARMED,
	SPOILERS_HANDLE_POS,
	SPOILERS_POS_LEFT,
	SPOILERS_POS_RIGHT,
	FLAPS_HANDLE_POS,
	FLAPS_POS_LEFT,
	FLAPS_POS_RIGHT,
	GEAR_HANDLE_POS,
	GEAR_POS_NOSE,
	GEAR_POS_LEFT,
	GEAR_POS_RIGHT,
	DISPLAY_UNITS,				//  english vs. metric system
	SIM_SPEED,					//  time dilation factor for sim equations
	ZOOM_FACTOR,				//	zoom value of current window in real units
	REALISM_SENSE,
	REALISM_SYSTEMS,
	RELIABILITY_SENSE,			//  0 = unreliable - 100 = totally reliable
	AMBIENT_TEMP_DEGREES_C,		//
	AMBIENT_PRES_MBAR,			//  Millibars * 16
	AMBIENT_WIND_VEL,			//
	AMBIENT_WIND_DIR,			//
	AMBIENT_WINDE,				//  MPS x(east) wind component
	AMBIENT_WINDN,				//  MPS z(up) wind component
	AMBIENT_WINDA,				//  MPS y(north) wind component
	BAROMETRIC_PRESSURE,		//	barometric pressure experienced
	ANGLE_OF_ATTACK_INDICATOR,
	TOTAL_AIR_TEMP,
	G_FORCE,
	CHARGING_AMPS,				//  charging system amps - 1 amp=65535
	SUCTION_PRESSURE,			//	in hg
	MARKER_BEACON_STATE,		//	0=no beacon, 1=outer, 2=middle, 3=inner
	CURRENT_DME,				//  DMECUR_DME1 or DMECUR_DME2
	// **********  New VARS for Combat Flight Simulator 1.0 ***************
	PANEL_STATE_FLAGS,
	GET_GUN_AMMO,
	GET_CANNON_AMMO,
	GET_ROCKET_AMMO,																//360
	GET_BOMB_AMMO,
	ENGINE_PRIMER,				// 0.0 -> 1.0 == in -> out
	COWL_FLAPS,					// 0.0 -> 1.0 == closed -> open
	MASTER_ALTERNATOR,			// 0.0 -> 1.0 == off -> on
	MASTER_BATTERY,				// 0.0 -> 1.0 == off -> on
	CARB_HEAT,					// 0.0 -> 1.0 == off -> on
	FLIGHT_TIME,				// in 1/10 of hours
	FUEL_PUMP,					// 0.0 -> 1.0 == off -> on
	BEACON_LIGHTS,				// 0.0 -> 1.0 == off -> on
	TAXI_LIGHTS,				// 0.0 -> 1.0 == off -> on
	RADIO_STACK_VISIBLE,		// 0.0 -> 1.0 == off -> on
	HORIZON_BAR_OFFSET,			// -10 deg to + 10 deg
	CURRENT_DME_DISTANCE,
	CURRENT_DME_SPEED,
	CURRENT_DME_MIN,
	WARNING_FUEL,
	WARNING_FUEL_L,
	WARNING_FUEL_R,
	WARNING_VACUUM,
	WARNING_VACUUM_L,
	WARNING_VACUUM_R,																	//380
	WARNING_OIL_PSI,
	WARNING_VOLTAGE,
	FUEL_TANK_CENTER2_LEVEL,
	FUEL_TANK_CENTER2_CAPACITY,
	FUEL_QUANTITY_CENTER2,                       // Total Gallons
	TOTAL_FUEL_QUANTITY_GALLONS,
	SELECTED_FUEL_QUANTITY_GALLONS,
	SELECTED_FUEL_QUANTITY_LITERS,
	SELECTED_FUEL_QUANTITY_PERCENT,
	RECIP_ENGINE1_ENGINE_RPM,
	RECIP_ENGINE1_MANIFOLD_PRESSURE,
	RECIP_ENGINE1_THROTTLE_LEVER_POS,
	RECIP_ENGINE1_MIXTURE_LEVER_POS,
	RECIP_ENGINE1_PROP_LEVER_POS,
	RECIP_ENGINE1_COWL_FLAP_POS,                //0 = closed, 1 = open
	RECIP_ENGINE1_CARB_HEAT_POS,                //0 = off, 1 = on
	RECIP_ENGINE1_ALTERNATE_AIR_POS,            //0 = closed, 1 = off
	RECIP_ENGINE1_COOLANT_RESERVOIR_PCT,			
	RECIP_ENGINE1_LEFT_MAG,
	RECIP_ENGINE1_RIGHT_MAG,																//400
	RECIP_ENGINE1_STARTER,
	RECIP_ENGINE1_BRAKE_POWER,                  //power delivered to the shaft
	RECIP_ENGINE1_SHAFT_TORQUE,                 //torque delivered to the shaft
	RECIP_ENGINE1_PROP_TORQUE,                  //torque required by prop
	RECIP_ENGINE1_STARTER_TORQUE,               //torque applied by	starter
	RECIP_ENGINE1_COMBUSTION,                   //combustion flag
	RECIP_ENGINE1_TURBOCHARGER_FAILED,
	RECIP_ENGINE1_EMERGENCY_BOOST_ACTIVE,       //like WEP in the P51
	RECIP_ENGINE1_EMERGENCY_BOOST_ELAPSED_TIME, //how long emergency has been active
	RECIP_ENGINE1_WASTEGATE_POS,                //position of wastegate controller 1=closed (full boost), 0=open (no boost)
	RECIP_ENGINE1_PROP_BETA,                    //blade angle (relative to plane of rotation)
	RECIP_ENGINE1_THRUST,                       //lbs
	RECIP_ENGINE1_EGT_DEGR,                     //EGT degrees Rankine
	RECIP_ENGINE1_TIT_DEGR,                     //Turbine Inlet Temperature degrees Rankine
	RECIP_ENGINE1_CHT_DEGR,                     //CHT degrees Rankine
	RECIP_ENGINE1_OIL_TEMP_DEGR,                //Oil Temperature degrees Rankine
	RECIP_ENGINE1_RADIATOR_DEGR,                //Radiator temperature
	RECIP_ENGINE1_OIL_PRESS_PSF,                //Oil Pressure lbs/sqft
	RECIP_ENGINE1_OIL_LEAK_PCT,                 //Percent Oil leaked
	RECIP_ENGINE1_FUEL_AVAILABLE,               //Fuel available to engine?
	RECIP_ENGINE1_FUELFLOW_PPH,                 //Fuel flow in lbs/hr
	RECIP_ENGINE1_TANK_SELECTOR,                //Fuel tank selector
	RECIP_ENGINE1_TANKS_USED,                   //Fuel tanks used
	RECIP_ENGINE1_NUMBER_OF_TANKS_USED,         //Number of fuel tanks used
	RECIP_ENGINE1_FUEL_PRESSURE_PSF,            //Fuel pressure in lbs/sqft
	RECIP_ENGINE1_COMBUSTION_SOUND_PCT,         //Percent of Sound (0 - 1)
	RECIP_ENGINE1_INDUCED_VELOCITY,             //fps, velocity induced by prop
	RECIP_ENGINE1_DAMAGE_PERCENT,               //0-100%
	RECIP_ENGINE2_ENGINE_RPM,
	RECIP_ENGINE2_MANIFOLD_PRESSURE,
	RECIP_ENGINE2_THROTTLE_LEVER_POS,
	RECIP_ENGINE2_MIXTURE_LEVER_POS,
	RECIP_ENGINE2_PROP_LEVER_POS,
	RECIP_ENGINE2_COWL_FLAP_POS,                //0 = closed, 1 = open
	RECIP_ENGINE2_CARB_HEAT_POS,                //0 = off, 1 = on
	RECIP_ENGINE2_ALTERNATE_AIR_POS,            //0 = closed, 1 = off
	RECIP_ENGINE2_COOLANT_RESERVOIR_PCT,
	RECIP_ENGINE2_LEFT_MAG,
	RECIP_ENGINE2_RIGHT_MAG,
	RECIP_ENGINE2_STARTER,
	RECIP_ENGINE2_BRAKE_POWER,                  //power delivered to the shaft
	RECIP_ENGINE2_SHAFT_TORQUE,                 //torque delivered to the shaft
	RECIP_ENGINE2_PROP_TORQUE,                  //torque required by prop
	RECIP_ENGINE2_STARTER_TORQUE,               //torque applied by	starter
	RECIP_ENGINE2_COMBUSTION,                   //combustion flag
	RECIP_ENGINE2_TURBOCHARGER_FAILED,
	RECIP_ENGINE2_EMERGENCY_BOOST_ACTIVE,       //like WEP in the P51
	RECIP_ENGINE2_EMERGENCY_BOOST_ELAPSED_TIME, //how long emergency has been active			//450
	RECIP_ENGINE2_WASTEGATE_POS,                //position of wastegate controller 1=closed (full boost), 0=open (no boost)
	RECIP_ENGINE2_PROP_BETA,                    //blade angle (relative to plane of rotation)
	RECIP_ENGINE2_THRUST,                       //lbs
	RECIP_ENGINE2_EGT_DEGR,                     //EGT degrees Rankine
	RECIP_ENGINE2_TIT_DEGR,                     //Turbine Inlet Temperature degrees Rankine
	RECIP_ENGINE2_CHT_DEGR,                     //CHT degrees Rankine
	RECIP_ENGINE2_OIL_TEMP_DEGR,                //Oil Temperature degrees Rankine
	RECIP_ENGINE2_RADIATOR_DEGR,                //Radiator temperature
	RECIP_ENGINE2_OIL_PRESS_PSF,                //Oil Pressure lbs/sqft
	RECIP_ENGINE2_OIL_LEAK_PCT,                 //Percent Oil leaked
	RECIP_ENGINE2_FUEL_AVAILABLE,               //Fuel available to engine?
	RECIP_ENGINE2_FUELFLOW_PPH,                 //Fuel flow in lbs/hr
	RECIP_ENGINE2_TANK_SELECTOR,                //Fuel tank selector
	RECIP_ENGINE2_TANKS_USED,                   //Fuel tanks used
	RECIP_ENGINE2_NUMBER_OF_TANKS_USED,         //Number of fuel tanks used
	RECIP_ENGINE2_FUEL_PRESSURE_PSF,            //Fuel pressure in lbs/sqft
	RECIP_ENGINE2_COMBUSTION_SOUND_PCT,         //Percent of Sound (0 - 1)
	RECIP_ENGINE2_INDUCED_VELOCITY,             //fps, velocity induced by prop
	RECIP_ENGINE2_DAMAGE_PERCENT,               //0-100%
	RECIP_ENGINE3_ENGINE_RPM,
	RECIP_ENGINE3_MANIFOLD_PRESSURE,
	RECIP_ENGINE3_THROTTLE_LEVER_POS,
	RECIP_ENGINE3_MIXTURE_LEVER_POS,
	RECIP_ENGINE3_PROP_LEVER_POS,
	RECIP_ENGINE3_COWL_FLAP_POS,                //0 = closed, 1 = open
	RECIP_ENGINE3_CARB_HEAT_POS,                //0 = off, 1 = on
	RECIP_ENGINE3_ALTERNATE_AIR_POS,            //0 = closed, 1 = off
	RECIP_ENGINE3_COOLANT_RESERVOIR_PCT,
	RECIP_ENGINE3_LEFT_MAG,
	RECIP_ENGINE3_RIGHT_MAG,
	RECIP_ENGINE3_STARTER,
	RECIP_ENGINE3_BRAKE_POWER,                  //power delivered to the shaft
	RECIP_ENGINE3_SHAFT_TORQUE,                 //torque delivered to the shaft
	RECIP_ENGINE3_PROP_TORQUE,                  //torque required by prop
	RECIP_ENGINE3_STARTER_TORQUE,               //torque applied by	starter
	RECIP_ENGINE3_COMBUSTION,                   //combustion flag
	RECIP_ENGINE3_TURBOCHARGER_FAILED,
	RECIP_ENGINE3_EMERGENCY_BOOST_ACTIVE,       //like WEP in the P51
	RECIP_ENGINE3_EMERGENCY_BOOST_ELAPSED_TIME, //how long emergency has been active
	RECIP_ENGINE3_WASTEGATE_POS,                //position of wastegate controller 1=closed (full boost), 0=open (no boost)
	RECIP_ENGINE3_PROP_BETA,                    //blade angle (relative to plane of rotation)
	RECIP_ENGINE3_THRUST,                       //lbs
	RECIP_ENGINE3_EGT_DEGR,                     //EGT degrees Rankine
	RECIP_ENGINE3_TIT_DEGR,                     //Turbine Inlet Temperature degrees Rankine
	RECIP_ENGINE3_CHT_DEGR,                     //CHT degrees Rankine
	RECIP_ENGINE3_OIL_TEMP_DEGR,                //Oil Temperature degrees Rankine
	RECIP_ENGINE3_RADIATOR_DEGR,                //Radiator temperature
	RECIP_ENGINE3_OIL_PRESS_PSF,                //Oil Pressure lbs/sqft
	RECIP_ENGINE3_OIL_LEAK_PCT,                 //Percent Oil leaked
	RECIP_ENGINE3_FUEL_AVAILABLE,               //Fuel available to engine?
	RECIP_ENGINE3_FUELFLOW_PPH,                 //Fuel flow in lbs/hr
	RECIP_ENGINE3_TANK_SELECTOR,                //Fuel tank selector					//500
	RECIP_ENGINE3_TANKS_USED,                   //Fuel tanks used
	RECIP_ENGINE3_NUMBER_OF_TANKS_USED,         //Number of fuel tanks used
	RECIP_ENGINE3_FUEL_PRESSURE_PSF,            //Fuel pressure in lbs/sqft
	RECIP_ENGINE3_COMBUSTION_SOUND_PCT,         //Percent of Sound (0 - 1)
	RECIP_ENGINE3_INDUCED_VELOCITY,             //fps, velocity induced by prop
	RECIP_ENGINE3_DAMAGE_PERCENT,               //0-100%
	RECIP_ENGINE4_ENGINE_RPM,
	RECIP_ENGINE4_MANIFOLD_PRESSURE,
	RECIP_ENGINE4_THROTTLE_LEVER_POS,
	RECIP_ENGINE4_MIXTURE_LEVER_POS,
	RECIP_ENGINE4_PROP_LEVER_POS,
	RECIP_ENGINE4_COWL_FLAP_POS,                //0 = closed, 1 = open
	RECIP_ENGINE4_CARB_HEAT_POS,                //0 = off, 1 = on
	RECIP_ENGINE4_ALTERNATE_AIR_POS,            //0 = closed, 1 = off
	RECIP_ENGINE4_COOLANT_RESERVOIR_PCT,
	RECIP_ENGINE4_LEFT_MAG,
	RECIP_ENGINE4_RIGHT_MAG,
	RECIP_ENGINE4_STARTER,
	RECIP_ENGINE4_BRAKE_POWER,                  //power delivered to the shaft
	RECIP_ENGINE4_SHAFT_TORQUE,                 //torque delivered to the shaft
	RECIP_ENGINE4_PROP_TORQUE,                  //torque required by prop
	RECIP_ENGINE4_STARTER_TORQUE,               //torque applied by	starter
	RECIP_ENGINE4_COMBUSTION,                   //combustion flag
	RECIP_ENGINE4_TURBOCHARGER_FAILED,
	RECIP_ENGINE4_EMERGENCY_BOOST_ACTIVE,       //like WEP in the P51
	RECIP_ENGINE4_EMERGENCY_BOOST_ELAPSED_TIME, //how long emergency has been active
	RECIP_ENGINE4_WASTEGATE_POS,                //position of wastegate controller 1=closed (full boost), 0=open (no boost)
	RECIP_ENGINE4_PROP_BETA,                    //blade angle (relative to plane of rotation)
	RECIP_ENGINE4_THRUST,                       //lbs
	RECIP_ENGINE4_EGT_DEGR,                     //EGT degrees Rankine
	RECIP_ENGINE4_TIT_DEGR,                     //Turbine Inlet Temperature degrees Rankine
	RECIP_ENGINE4_CHT_DEGR,                     //CHT degrees Rankine
	RECIP_ENGINE4_OIL_TEMP_DEGR,                //Oil Temperature degrees Rankine
	RECIP_ENGINE4_RADIATOR_DEGR,                //Radiator temperature
	RECIP_ENGINE4_OIL_PRESS_PSF,                //Oil Pressure lbs/sqft
	RECIP_ENGINE4_OIL_LEAK_PCT,                 //Percent Oil leaked
	RECIP_ENGINE4_FUEL_AVAILABLE,               //Fuel available to engine?
	RECIP_ENGINE4_FUELFLOW_PPH,                 //Fuel flow in lbs/hr
	RECIP_ENGINE4_TANK_SELECTOR,                //Fuel tank selector
	RECIP_ENGINE4_TANKS_USED,                   //Fuel tanks used
	RECIP_ENGINE4_NUMBER_OF_TANKS_USED,         //Number of fuel tanks used
	RECIP_ENGINE4_FUEL_PRESSURE_PSF,            //Fuel pressure in lbs/sqft
	RECIP_ENGINE4_COMBUSTION_SOUND_PCT,         //Percent of Sound (0 - 1)
	RECIP_ENGINE4_INDUCED_VELOCITY,             //fps, velocity induced by prop
	RECIP_ENGINE4_DAMAGE_PERCENT,               //0-100%
	FUEL_QUANTITY_CENTER3,                      //Total Gallons
	SCORE_STRING_QUICK_COMBAT,
	SCORE_STRING_MULTIPLAYER,
	IS_MULTIPLAYER_TEAM_COMBAT,															//550
	// **********  New VARS for Flight Simulator 7.0 ***************
	VOR1_BEARING_DEGREES,
	FORWARD_GROUND_VELOCITY,					// in ft/sec
	SIDE_GROUND_VELOCITY,						// in ft/sec
	VERTICAL_GROUND_VELOCITY,					// in ft/sec
	NORTH_VELOCITY,								// in ft/sec
	EAST_VELOCITY,								// in ft/sec
	VERTICAL_VELOCITY,							// in ft/sec
	CLOCK_TOTAL_SECONDS,				//  local clock time, seconds since midnight	//557
	GENERAL_ENGINE1_THROTTLE_LEVER_POS,													
	GENERAL_ENGINE1_PROPELLER_LEVER_POS,
	GENERAL_ENGINE1_MIXTURE_LEVER_POS ,													//560
	GENERAL_ENGINE1_OIL_TEMP,
	GENERAL_ENGINE1_OIL_PRES,
	GENERAL_ENGINE1_STARTER,
	GENERAL_ENGINE1_FAILURE,
	GENERAL_ENGINE1_GENERATOR_SWITCH,
	GENERAL_ENGINE1_GENERATOR_ACTIVE,
	GENERAL_ENGINE1_EGT,
	GENERAL_ENGINE2_THROTTLE_LEVER_POS,
	GENERAL_ENGINE2_PROPELLER_LEVER_POS,
	GENERAL_ENGINE2_MIXTURE_LEVER_POS ,
	GENERAL_ENGINE2_OIL_TEMP,
	GENERAL_ENGINE2_OIL_PRES,
	GENERAL_ENGINE2_STARTER ,
	GENERAL_ENGINE2_FAILURE,
	GENERAL_ENGINE2_GENERATOR_SWITCH,
	GENERAL_ENGINE2_GENERATOR_ACTIVE,
	GENERAL_ENGINE2_EGT,
	GENERAL_ENGINE3_THROTTLE_LEVER_POS,
	GENERAL_ENGINE3_PROPELLER_LEVER_POS,
	GENERAL_ENGINE3_MIXTURE_LEVER_POS ,													//580
	GENERAL_ENGINE3_OIL_TEMP,
	GENERAL_ENGINE3_OIL_PRES,
	GENERAL_ENGINE3_STARTER ,
	GENERAL_ENGINE3_FAILURE,
	GENERAL_ENGINE3_GENERATOR_SWITCH,
	GENERAL_ENGINE3_GENERATOR_ACTIVE,
	GENERAL_ENGINE3_EGT,
	GENERAL_ENGINE4_THROTTLE_LEVER_POS,
	GENERAL_ENGINE4_PROPELLER_LEVER_POS,
	GENERAL_ENGINE4_MIXTURE_LEVER_POS ,
	GENERAL_ENGINE4_OIL_TEMP,
	GENERAL_ENGINE4_OIL_PRES,
	GENERAL_ENGINE4_STARTER ,
	GENERAL_ENGINE4_FAILURE,
	GENERAL_ENGINE4_GENERATOR_SWITCH,
	GENERAL_ENGINE4_GENERATOR_ACTIVE,
	GENERAL_ENGINE4_EGT,
	NAV1_COMMNAV_TEST,
	NAV2_COMMNAV_TEST,
	COM1_AUTOSWITCH_ON,																	//600
	NAV1_AUTOSWITCH_ON,
	COM2_AUTOSWITCH_ON,
	NAV2_AUTOSWITCH_ON,
	ELAPSED_SECONDS,
	G_FORCE_MAXIMUM,
	G_FORCE_MINIMUM,
	ENGINE_WORKING_TIME,
	ENGINE1_MAX_RPM,
	ENGINE2_MAX_RPM,
	ENGINE3_MAX_RPM,
	ENGINE4_MAX_RPM,
	ATTITUDE_BARS_POSITION,
	RAD_INS_SWITCH,		// used in concorde only
	RADIO_HEIGHT,			// meters
	DECISION_HEIGHT,		// meters
	LOW_HEIGHT_WARNING,		// boolean
	COM_STBY_FREQUENCY,		// BCD; same as COM_FREQUENCY
	COM_RADIO_25_KHZ_TUNABLE, // Boolean

	NAV_LIGHTS,
	LOGO_LIGHTS,																		//620
	WING_LIGHTS,
	RECOGNITION_LIGHTS,

	RADIO_MORSE_IDENT_STATES,


	TURB_ENGINE_1_N1,
	TURB_ENGINE_1_N2,
	TURB_ENGINE_1_CORRECTED_N1,
	TURB_ENGINE_1_CORRECTED_N2,
	TURB_ENGINE_1_CORRECTED_FF,
	TURB_ENGINE_1_PCT_MAX_TORQUE,
	TURB_ENGINE_1_EPR,
	TURB_ENGINE_1_ITT,
	TURB_ENGINE_1_AFTERBURNER,
	TURB_ENGINE_1_JET_THRUST,
	TURB_ENGINE_1_BLEEDAIRPSI,
	TURB_ENGINE_1_TANK_SELECTOR,
	TURB_ENGINE_1_TANKS_USED,
	TURB_ENGINE_1_NUMBER_TANKS,
	TURB_ENGINE_1_FUELFLOW_PPH,
	TURB_ENGINE_1_FUEL_AVAILABLE,
	TURB_ENGINE_1_PCT_AREA,															//640
	TURB_ENGINE_1_PCT_REVERSER,
	TURB_ENGINE_1_VIBRATION,

	TURB_ENGINE_2_N1,
	TURB_ENGINE_2_N2,
	TURB_ENGINE_2_CORRECTED_N1,
	TURB_ENGINE_2_CORRECTED_N2,
	TURB_ENGINE_2_CORRECTED_FF,
	TURB_ENGINE_2_PCT_MAX_TORQUE,
	TURB_ENGINE_2_EPR,
	TURB_ENGINE_2_ITT,
	TURB_ENGINE_2_AFTERBURNER,
	TURB_ENGINE_2_JET_THRUST,
	TURB_ENGINE_2_BLEEDAIRPSI,
	TURB_ENGINE_2_TANK_SELECTOR,
	TURB_ENGINE_2_TANKS_USED,
	TURB_ENGINE_2_NUMBER_TANKS,
	TURB_ENGINE_2_FUELFLOW_PPH,
	TURB_ENGINE_2_FUEL_AVAILABLE,
	TURB_ENGINE_2_PCT_AREA,
	TURB_ENGINE_2_PCT_REVERSER,													//660
	TURB_ENGINE_2_VIBRATION,

	TURB_ENGINE_3_N1,
	TURB_ENGINE_3_N2,
	TURB_ENGINE_3_CORRECTED_N1,
	TURB_ENGINE_3_CORRECTED_N2,
	TURB_ENGINE_3_CORRECTED_FF,
	TURB_ENGINE_3_PCT_MAX_TORQUE,
	TURB_ENGINE_3_EPR,
	TURB_ENGINE_3_ITT,
	TURB_ENGINE_3_AFTERBURNER,
	TURB_ENGINE_3_JET_THRUST,
	TURB_ENGINE_3_BLEEDAIRPSI,
	TURB_ENGINE_3_TANK_SELECTOR,
	TURB_ENGINE_3_TANKS_USED,
	TURB_ENGINE_3_NUMBER_TANKS,
	TURB_ENGINE_3_FUELFLOW_PPH,
	TURB_ENGINE_3_FUEL_AVAILABLE,
	TURB_ENGINE_3_PCT_AREA,
	TURB_ENGINE_3_PCT_REVERSER,
	TURB_ENGINE_3_VIBRATION,												//680

	TURB_ENGINE_4_N1,
	TURB_ENGINE_4_N2,
	TURB_ENGINE_4_CORRECTED_N1,
	TURB_ENGINE_4_CORRECTED_N2,
	TURB_ENGINE_4_CORRECTED_FF,
	TURB_ENGINE_4_PCT_MAX_TORQUE,
	TURB_ENGINE_4_EPR,
	TURB_ENGINE_4_ITT,
	TURB_ENGINE_4_AFTERBURNER,
	TURB_ENGINE_4_JET_THRUST,
	TURB_ENGINE_4_BLEEDAIRPSI,
	TURB_ENGINE_4_TANK_SELECTOR,
	TURB_ENGINE_4_TANKS_USED,
	TURB_ENGINE_4_NUMBER_TANKS,
	TURB_ENGINE_4_FUELFLOW_PPH,
	TURB_ENGINE_4_FUEL_AVAILABLE,
	TURB_ENGINE_4_PCT_AREA,
	TURB_ENGINE_4_PCT_REVERSER,
	TURB_ENGINE_4_VIBRATION,

	PROPELLER_1_RPM,						// Propeller 1				//700
	PROPELLER_1_PCT_MAX_RPM,
	PROPELLER_1_THRUST,
	PROPELLER_1_BETA,
	PROPELLER_1_FEATHERING_INHIBIT,
	PROPELLER_1_FEATHERED,
	PROPELLER_1_SYNC_DELTA_LEVER,
	PROPELLER_1_AUTOFEATHER_ARMED,

	PROPELLER_2_RPM,						// Propeller 2
	PROPELLER_2_PCT_MAX_RPM,
	PROPELLER_2_THRUST,
	PROPELLER_2_BETA,
	PROPELLER_2_FEATHERING_INHIBIT,
	PROPELLER_2_FEATHERED,
	PROPELLER_2_SYNC_DELTA_LEVER,
	PROPELLER_2_AUTOFEATHER_ARMED,

	PROPELLER_3_RPM,						// Propeller 3
	PROPELLER_3_PCT_MAX_RPM,
	PROPELLER_3_THRUST,
	PROPELLER_3_BETA,
	PROPELLER_3_FEATHERING_INHIBIT,									//720
	PROPELLER_3_FEATHERED,
	PROPELLER_3_SYNC_DELTA_LEVER,
	PROPELLER_3_AUTOFEATHER_ARMED,

	PROPELLER_4_RPM,						// Propeller 4
	PROPELLER_4_PCT_MAX_RPM,
	PROPELLER_4_THRUST,
	PROPELLER_4_BETA,
	PROPELLER_4_FEATHERING_INHIBIT,
	PROPELLER_4_FEATHERED,
	PROPELLER_4_SYNC_DELTA_LEVER,									//730
	PROPELLER_4_AUTOFEATHER_ARMED,

	HYDRAULICS1_PRESSURE_PSF,
	HYDRAULICS1_RESERVOIR_PCT,

	HYDRAULICS2_PRESSURE_PSF,
	HYDRAULICS2_RESERVOIR_PCT,

	HYDRAULICS3_PRESSURE_PSF,
	HYDRAULICS3_RESERVOIR_PCT,

	HYDRAULICS4_PRESSURE_PSF,
	HYDRAULICS4_RESERVOIR_PCT,

	AVIONICS_MASTER_SWITCH,									//740

	PANEL_AUTOFEATHER_SWITCH,				// Panel States
	PANEL_ANTIICE_SWITCH,
	PANEL_AUTOBRAKE_SWITCH,

	DAY_OF_WEEK,			// 0-6
	DAY_OF_MONTH,			// 1-31
	CURRENT_MONTH,			// 1-12
	CURRENT_YEAR,			// 1-????
	TIME_ZONE_OFFSET,		// in minutes, positive west of GMT
	DAYLIGHT_SAVING_ACTIVE,	// 0 or 1

	TOTAL_LOAD_AMPS,
	BATTERY_LOAD,
	BATTERY_VOLTAGE,
	MAIN_BUS_VOLTAGE,
	MAIN_BUS_AMPS,
	AVIONICS_BUS_VOLTAGE,
	AVIONICS_BUS_AMPS,
	HOT_BATTERY_BUS_VOLTAGE,
	HOT_BATTERY_BUS_AMPS,
	BATTERY_BUS_VOLTAGE,
	BATTERY_BUS_AMPS,										//760
	GENERATOR_ALTERNATOR_1_BUS_VOLTAGE,
	GENERATOR_ALTERNATOR_1_BUS_AMPS,
	GENERATOR_ALTERNATOR_2_BUS_VOLTAGE,
	GENERATOR_ALTERNATOR_2_BUS_AMPS,
	GENERATOR_ALTERNATOR_3_BUS_VOLTAGE,
	GENERATOR_ALTERNATOR_3_BUS_AMPS,
	GENERATOR_ALTERNATOR_4_BUS_VOLTAGE,
	GENERATOR_ALTERNATOR_4_BUS_AMPS,
	GENERAL_PANEL_CIRCUIT_ON,
	FLAP_MOTOR_CIRCUIT_ON,
	GEAR_MOTOR_CIRCUIT_ON,
	AUTOPILOT_CIRCUIT_ON,
	AVIONICS_CIRCUIT_ON,
	PITOT_HEAT_CIRCUIT_ON,
	PROP_SYNC_CIRCUIT_ON,
	AUTO_FEATHER_CIRCUIT_ON,
	AUTO_BRAKES_CIRCUIT_ON,
	STANDBY_VACUUM_CIRCUIT_ON,
	MARKER_BEACON_CIRCUIT_ON,
	GEAR_WARNING_CIRCUIT_ON,									//780
	HYDRAULIC_PUMP_CIRCUIT_ON,
	ELEVATOR_DEFLECTION,	//	radians
	ELEVATOR_TRIM,			//	radians
	AILERON_DEFLECTION,		//	radians
	AILERON_TRIM,			//	radians
	RUDDER_DEFLECTION,		//	radians
	RUDDER_TRIM,			//	radians

	PROPSYNC_ACTIVE,

	INCIDENCE_ALPHA,
	INCIDENCE_BETA,

	TOTAL_FUEL_QUANTITY_LBS,

	FLIGHT_DIRECTOR_ACTIVE,
	FLIGHT_DIRECTOR_PITCH,		// degrees
	FLIGHT_DIRECTOR_BANK,		// degrees

	CG_PERCENT,
	CG_AFT_LIMIT,
	CG_FWD_LIMIT,
	CG_MAX_MACH,
	CG_MIN_MACH,

	STANDARD_ATM_TEMPERATURE,	// standard atmosphere temperature at aircraft's altitude; celsius										//800

	ENGINE_1_FUELFLOW_BUG_POSITION,		// lbs per hour
	ENGINE_2_FUELFLOW_BUG_POSITION,
	ENGINE_3_FUELFLOW_BUG_POSITION,
	ENGINE_4_FUELFLOW_BUG_POSITION,

	CONCORDE_VISOR_NOSE_HANDLE,	// 0 - Visor Up, Nose Up, 1 - Visor Dn, Nose Up, 2 - Visor Dn, Nose 5 deg, 3 - Visor Dn, Nose 12.5 deg
	CONCORDE_VISOR_POS_PCT,		// 0=Up, 1.0 Extended/Down
	CONCORDE_NOSE_ANGLE,		// degrees; 0 - up

	GEAR_POS_TAIL,

	ELEVON_1_DEFLECTION,		// The elevon indices start at 1 at the far left and increase to the right.
	ELEVON_2_DEFLECTION,		// radians
	ELEVON_3_DEFLECTION,
	ELEVON_4_DEFLECTION,
	ELEVON_5_DEFLECTION,
	ELEVON_6_DEFLECTION,
	ELEVON_7_DEFLECTION,
	ELEVON_8_DEFLECTION,

	PANEL_AUTOPILOT_SPEED_SETTING,		// Knots
	AUTOPILOT_AIRSPEED_ACQUISITION,		// boolean
	AUTOPILOT_AIRSPEED_HOLD_CURRENT,	// boolean
	AUTOPILOT_MAX_SPEED,				// boolean
	AUTOPILOT_CRUISE_SPEED,				// boolean

	BARBER_POLE_MACH,					// real mach

	SELECTED_FUEL_TRANSFER_MODE,		// -1 off, 0 auto, 1 forward, 2 aft

	HYDRAULIC_SYSTEM_INTEGRITY,			// 0.0 - complete failure; 1.0 - everything is ok

	ATTITUDE_CAGE_BUTTON,

	VOR1_NEEDLE_RADIO,					// +-127 correspond to +-10 if VOR or to +-2.5 if localiser. Driven always by VOR
	GPS_FLAGS,							// no GPS data				   = -1
										// GPS_FLAG_ACTIVE_FLIGHT_PLAN = 0x00008	there is an active flight plan
										// GPS_FLAG_ACTIVE_WAY_POINT   = 0x00010	there is an active way point
										// GPS_FLAG_ARRIVED            = 0x00020	last waypoint reached
										// GPS_FLAG_DIRECTTO_FLIGHTPLAN= 0x00080	manual flight plan
	GPS_POSITION_LAT,
	GPS_POSITION_LON,
	GPS_POSITION_ALT,
	GPS_MAGVAR,							// magnetic deviation (radians)
	GPS_GROUND_SPEED,					// meters per second
	GPS_GROUND_HEADING,					// radians (0 - 2PI); true heading, yaw
	GPS_GROUND_TRACK,					// radians (0 - 2PI); heading + magvar, magnetic yaw
    GPS_WP_DISTANCE,					// meters to next wp
    GPS_WP_BEARING,						// heading (radians) to next wp + magvar
    GPS_WP_CROSS_TRK,					// cross_trk (meters)
    GPS_WP_REQ_HDG,						// required heading, magnetic, radians (0 - 2PI), from prev wp to next wp
    GPS_WP_STRING,						// name of next waypoint
	GPS_WP_NEXT_LAT,
	GPS_WP_NEXT_LON,
	GPS_WP_NEXT_ALT,
	GPS_WP_PREV_LAT,
	GPS_WP_PREV_LON,
	GPS_WP_PREV_ALT,
	GPS_WP_TRUE_BEARING,				// true bearing, degrees
	GPS_WP_TRUE_REQ_HDG,				// true required heading, degrees

	GPS_DRIVES_NAV1,

	HSI_VERTICAL_NEEDLE,				// -1.0 .. 1.0 corresponds to -10deg .. 10deg if VOR or to -2.5deg .. +2.5deg if localiser +5NM .. -5NM  if GPS
	HSI_HORIZONTAL_NEEDLE,				// -1.0 .. 1.0 corresponds to -0.7deg .. +0.7deg
	HSI_VERTICAL_VALID,					// 0 - Nav flag on
	HSI_HORIZONTAL_VALID,				// 0 - GS flag on
	HSI_TF_FLAG,						// -1.0 - from. 0.0 - none, 1.0 - to
	HSI_OBI_NEEDLE,						// 0 .. 360
	HSI_DESIRED_HEADING_NEEDLE,			// 0 .. 360
	HSI_BEARING,						// 0 .. 360
	HSI_BEARING_VALID,					// 1 - true
	HSI_SIGNAL_LOCALISER,				// 1 - true
	HSI_SPEED,							// knots
	HSI_DISTANCE,						// NM
	HSI_STATION_NAME,					// string

	C_GAUGE_TOKEN						// Always the last

} GAUGE_TOKEN;


typedef	enum	VAR_TYPE {
	VAR_TYPE_NONE,

	TYPE_BOOL8,
	TYPE_UINT8,
	TYPE_SINT8,
	TYPE_FLAGS8,
	TYPE_ENUM8,

	TYPE_BOOL16,
	TYPE_ANGL16,
	TYPE_UINT16,
	TYPE_SINT16,
	TYPE_UIF16,
	TYPE_SIF16,
	TYPE_FLAGS16,
	TYPE_ENUM16,
	TYPE_BCD16,
	TYPE_BCO16,
	TYPE_VAR16,

	TYPE_BOOL32,
	TYPE_ANGL32,
	TYPE_UINT32,
	TYPE_SINT32,
	TYPE_UIF32,
	TYPE_SIF32,
	TYPE_FLAGS32,
	TYPE_ENUM32,
	TYPE_VAR32,

	TYPE_ANGL48,
	TYPE_SINT48,
	TYPE_UIF48,
	TYPE_SIF48,

	TYPE_UINT64,
	TYPE_SINT64,
	TYPE_SIF64,
	TYPE_FLOAT64,

	TYPE_BOOL,
	TYPE_FLAGS,
	TYPE_ENUM,

	TYPE_VOID,
	TYPE_PVOID,

	TYPE_PUINT32,
	TYPE_PSINT32,
	TYPE_PFLOAT64,

	VAR_TYPE_MAX
} VAR_TYPE;

typedef union	UNIVERSAL_VAR {
		FLOAT64	n;		// any number
		BOOL	b;		// any boolean
		ENUM	e;		// any enumerated value
		FLAGS	f;		// any flags field
		PVOID	p;		// any pointer
		VAR32	d;		// any binary coded decimal
		VAR32	o;		// any binary coded octal
} UNIVERSAL_VAR, *PUNIVERSAL_VAR, **PPUNIVERSAL_VAR;

typedef struct	MODULE_VAR {
	GAUGE_TOKEN			id;
	PVOID				var_ptr;
	VAR_TYPE			var_type;
	UNIVERSAL_VAR		var_value;
	UNIVERSAL_VAR		var_old;		// value of global var last iteration
} MODULE_VAR, *PMODULE_VAR, **PPMODULE_VAR;



// Panel identifiers
// IDENTS from FS6.1 These were not formally defined in the SDK but this is what was used for the shipping panels in FS95
#define IDENT_MAIN_PANEL				0
#define IDENT_THROTTLE_PANEL			10
#define IDENT_RADIO_STACK_PANEL			50
#define IDENT_COMPASS_PANEL				75
#define IDENT_MINI_CONTROLS_PANEL		100
#define IDENT_ANNUNCIATOR_PANEL 		125
#define IDENT_ANNUNCIATOR2_PANEL 		150
#define IDENT_IFR_MAIN_PANEL			175
#define IDENT_COLLECTIVE_PANEL 			200
#define IDENT_GPS_PANEL					225
#define IDENT_OVERHEAD_PANEL			250

// View Dir enum for select_view
typedef	enum	VIEW_DIR {
	VIEW_DIR_FORWARD,
	VIEW_DIR_FORWARD_RIGHT,
	VIEW_DIR_RIGHT,
	VIEW_DIR_REAR_RIGHT,
	VIEW_DIR_REAR,
	VIEW_DIR_REAR_LEFT,
	VIEW_DIR_LEFT,
	VIEW_DIR_FORWARD_LEFT,
	VIEW_DIR_DOWN,
	VIEW_DIR_FORWARD_UP,
	VIEW_DIR_FORWARD_RIGHT_UP,
	VIEW_DIR_RIGHT_UP,
	VIEW_DIR_REAR_RIGHT_UP,
	VIEW_DIR_REAR_UP,
	VIEW_DIR_REAR_LEFT_UP,
	VIEW_DIR_LEFT_UP,
	VIEW_DIR_FORWARD_LEFT_UP,
	VIEW_DIR_UP,
	VIEW_DIR_AUX_00,
	VIEW_DIR_AUX_01,
	VIEW_DIR_AUX_02,
	VIEW_DIR_AUX_03,
	VIEW_DIR_AUX_04,
	VIEW_DIR_AUX_05,
	VIEW_DIR_MAX
} VIEW_DIR, *PVIEW_DIR, **PPVIEW_DIR;

// defines for mouse sense rect stuff
typedef	enum
{
	MOUSE_RECT_EOL,
	MOUSE_RECT_PARENT,
	MOUSE_RECT_CHILD,
	MOUSE_RECT_END_PARENT,
} MOUSE_RECT_TYPE;

typedef	enum
{
	CURSOR_NONE = -1,
	CURSOR_NORMAL = 0,
	CURSOR_UPARROW,
	CURSOR_DOWNARROW,
	CURSOR_LEFTARROW,
	CURSOR_RIGHTARROW,
	CURSOR_HAND,
	CURSOR_CROSSHAIR,
} CURSOR_TYPE;

typedef	BOOL FSAPI	MOUSE_FUNCTION( PPIXPOINT relative_point, FLAGS32 mouse_flags );
typedef				MOUSE_FUNCTION		*PMOUSE_FUNCTION;

typedef	struct	MOUSERECT
{
	MOUSE_RECT_TYPE	rect_type;			// type of mouse rectangle (parent, child, eol)
	PIXBOX			relative_box;		// relative sense rectangle (relative to parameter to register function)
	CURSOR_TYPE		cursor;				// cursor to display when over this window
	ID				help_id;			// pop-up help id
	FLAGS			mouse_flags;		// types of mouse activities to look for
	ID				event_id;			// event to generate if mouse_flags is satisfied (implies simple mouse_flags)
	PMOUSE_FUNCTION	mouse_function;		// function to call if mouse_flag is satisfied
	PVOID			api_data;			// data for FS6API's use
} MOUSERECT, *PMOUSERECT, **PPMOUSERECT;


// Mouse rectangle macros
#define	MOUSE_PARENT_BEGIN( x, y, w, h, helpid )						{MOUSE_RECT_PARENT, {x, y, w, h}, CURSOR_NONE, helpid, MOUSE_NONE, 0, NULL, NULL},

#define	MOUSE_PARENT_END												{MOUSE_RECT_END_PARENT, {0, 0, 0, 0}, CURSOR_NONE, HELP_NONE, MOUSE_NONE, 0, NULL, NULL},

#define	MOUSE_PARENT( x, y, w, h, helpid )								MOUSE_PARENT_BEGIN( x, y, w, h, helpid )					\
																		MOUSE_PARENT_END

#define	MOUSE_BEGIN( name, helpid, x, y )								MOUSERECT	name[]	= {										\
																		MOUSE_PARENT_BEGIN( x, y, 0, 0, helpid )

#define	MOUSE_END														MOUSE_PARENT_END											\
																		{MOUSE_RECT_EOL, {0, 0, 0, 0}, CURSOR_NONE, HELP_NONE, MOUSE_NONE, 0, NULL, NULL}};

#define	MOUSE_CHILD_EVENT( x, y, w, h, cursor, mouse_flags, event_id )	{MOUSE_RECT_CHILD, {x, y, w, h}, cursor, HELP_NONE, mouse_flags, event_id, NULL, NULL},
#define	MOUSE_CHILD_FUNCT( x, y, w, h, cursor, mouse_flags, function )	{MOUSE_RECT_CHILD, {x, y, w, h}, cursor, HELP_NONE, mouse_flags, 0, function, NULL},

#define TMOUSE_CHILD_EVENT( x, y, w, h, cursor, helpid, mouse_flags, event_id ) {MOUSE_RECT_CHILD, {x, y, w, h},cursor, helpid, mouse_flags, event_id, NULL, NULL},
#define TMOUSE_CHILD_FUNCT( x, y, w, h, cursor, helpid, mouse_flags, function ) {MOUSE_RECT_CHILD, {x, y, w, h},cursor, helpid, mouse_flags, 0, function, NULL},

#define	MOUSE_RIGHTSINGLE	BIT31
#define	MOUSE_MIDDLESINGLE	BIT30
#define	MOUSE_LEFTSINGLE	BIT29
#define	MOUSE_RIGHTDOUBLE	BIT28
#define	MOUSE_MIDDLEDOUBLE	BIT27
#define	MOUSE_LEFTDOUBLE	BIT26
#define	MOUSE_RIGHTDRAG		BIT25
#define	MOUSE_MIDDLEDRAG	BIT24
#define	MOUSE_LEFTDRAG		BIT23
#define	MOUSE_MOVE			BIT22
#define	MOUSE_DOWN_REPEAT	BIT21
#define	MOUSE_KEYBOARD		BIT20

#define	MOUSE_NONE			0

#define	HELP_NONE			0			// move this somewhere else - temp here for now



#define	HINSTANCE	PVOID

// Old gauge function prototypes
typedef	void FSAPI	QUERY_ROUTINE_610( void );
typedef		QUERY_ROUTINE_610		*PQUERY_ROUTINE_610;

typedef	void FSAPI	INSTALL_ROUTINE_610( HINSTANCE resource_file_handle );
typedef		INSTALL_ROUTINE_610		*PINSTALL_ROUTINE_610;

typedef	void FSAPI	INITIALIZE_ROUTINE_610( void );
typedef		INITIALIZE_ROUTINE_610		*PINITIALIZE_ROUTINE_610;

typedef	void FSAPI	UPDATE_ROUTINE_610( void );
typedef		UPDATE_ROUTINE_610		*PUPDATE_ROUTINE_610;

typedef	enum	GENERATE_PHASE
{
    GENERATE_FX_ERASE,
    GENERATE_FX_PLOT,
    GENERATE_IMAGE_RECALC
} GENERATE_PHASE, *PGENERATE_PHASE;

typedef	void FSAPI	GENERATE_ROUTINE_610( GENERATE_PHASE phase );
typedef		GENERATE_ROUTINE_610		*PGENERATE_ROUTINE_610;

typedef	void FSAPI	DRAW_ROUTINE_610( void );
typedef		DRAW_ROUTINE_610		*PDRAW_ROUTINE_610;

typedef	void FSAPI	KILL_ROUTINE_610( void );
typedef		KILL_ROUTINE_610		*PKILL_ROUTINE_610;

// Callback functions
typedef	FLOAT64 FSAPI	FN_FLOAT64_610	( FLOAT64	val );
typedef			FN_FLOAT64_610	*PFN_FLOAT64_610;

typedef	FLOAT64 FSAPI	MODULE_VAR_CB_610	( PMODULE_VAR	val );
typedef			MODULE_VAR_CB_610	*PMODULE_VAR_CB_610;


// Seqsel Selection stuff
#define	SELECT_NONE					0
#define	SELECT_1					1
#define	SELECT_ZOOM					2
#define	SELECT_MAGNETO				3
#define	SELECT_COM_WHOLE			4
#define	SELECT_COM_FRACTION			5
#define	SELECT_NAV1_WHOLE			6
#define	SELECT_NAV1_FRACTION		7
#define	SELECT_NAV2_WHOLE			8
#define	SELECT_NAV2_FRACTION		9
#define	SELECT_XPNDR_1000			10
#define	SELECT_XPNDR_0100			11
#define	SELECT_XPNDR_0010			12
#define	SELECT_XPNDR_0001			13
#define	SELECT_VOR1					14
#define	SELECT_VOR2					15
#define	SELECT_ENGINE				16
#define	SELECT_DME1					17
#define	SELECT_DME2					18
#define	SELECT_ADF_100				19
#define	SELECT_ADF_010				20
#define	SELECT_ADF_001				21
#define	SELECT_EGT_BUG				22
#define	SELECT_SIM_RATE				23
#define SELECT_CLOCK_HOURS			24
#define SELECT_CLOCK_MINUTES		25
#define	SELECT_CLOCK_SECONDS		26
#define	SELECT_STANDBY_COM_WHOLE	27
#define	SELECT_STANDBY_COM_FRACTION	28
#define	SELECT_STANDBY_NAV_WHOLE	29
#define	SELECT_STANDBY_NAV_FRACTION	30
#define	SELECT_STANDBY_ADF_100		31
#define	SELECT_STANDBY_ADF_010		32
#define	SELECT_STANDBY_ADF_001		33

// used for the image_flags field
#define		IMAGE_USE_TRANSPARENCY		BIT0	//	these don't change dynamically and are set
#define		IMAGE_USE_ERASE				BIT1	//	in the gauge file
#define		IMAGE_USE_BRIGHT			BIT2	//
#define		IMAGE_NO_STATIC_BLENDING	BIT4	//	only valid on static_images using
												//	IMAGE_USE_TRANSPARENCY and first element in list
#define		IMAGE_ANTI_ALIAS                BIT7

#define		IMAGE_CONTAINS_MASK			BIT12	// Image contains mask bits
#define		IMAGE_USE_ALPHA				BIT13	// Image contains alpha channel
#define		IMAGE_USE_LUMINOUS			BIT14	// Image is bright when the interior light is on
#define		IMAGE_USE_LUMINOUS_PARTIAL  BIT15	// Parts of image are lit by interior light (alpha channel)


#define		IMAGE_HIDDEN_TREE			BIT25

#define		IMAGE_HIDDEN				BIT30	// these change dynamically
#define		IMAGE_ON_SCREEN				BIT31
#define		GET_IMAGE_HIDDEN( element )			((element)->image_flags & IMAGE_HIDDEN)
#define		SHOW_IMAGE( element )				((element)->image_flags &= ~IMAGE_HIDDEN)
#define		HIDE_IMAGE( element )				((element)->image_flags |= IMAGE_HIDDEN)

#define		GET_IMAGE_HIDDEN_TREE(element)		(element->image_flags & IMAGE_HIDDEN_TREE)
#define		SHOW_IMAGE_TREE(element)			(element->image_flags &= ~IMAGE_HIDDEN_TREE)
#define		HIDE_IMAGE_TREE(element)			(element->image_flags |= IMAGE_HIDDEN_TREE)

#define		GET_USE_TRANSPARENCY( element )		((element)->image_flags & IMAGE_USE_TRANSPARENCY)
#define		GET_USE_ERASE( element )			((element)->image_flags & IMAGE_USE_ERASE)
#define		GET_USE_BRIGHT( element )			((element)->image_flags & IMAGE_USE_BRIGHT)

#define		GET_ON_SCREEN( element )			((element)->image_flags & IMAGE_ON_SCREEN)
#define		SET_ON_SCREEN( element )			((element)->image_flags |= IMAGE_ON_SCREEN)
#define		SET_OFF_SCREEN( element )			((element)->image_flags &= ~IMAGE_ON_SCREEN)


/////////////////////////////////////////////////////////////////////////////////////////////////////
//new macros 
/////////////////////////////////////////////////////////////////////////////////////////////////////
#define		LIGHT_IMAGE( element )						((element)->image_flags |= IMAGE_USE_BRIGHT)
#define		DARKEN_IMAGE( element )						((element)->image_flags &= ~IMAGE_USE_BRIGHT)

#define		FORCE_LIGHT(element)						SET_OFF_SCREEN(element);\
														LIGHT_IMAGE(element)

#define		FORCE_DARKEN(element)						SET_OFF_SCREEN(element);\
														DARKEN_IMAGE(element)

#define		GET_USE_LUMINOUS( element )				((element)->image_flags & IMAGE_USE_LUMINOUS)
#define		LUMINOUS_IMAGE( element )				((element)->image_flags |= IMAGE_USE_LUMINOUS)
#define		DELUMINOUS_IMAGE( element )				((element)->image_flags &= ~IMAGE_USE_LUMINOUS)

#define		TOGGLE_IMAGE_DATA( element , IMAGE_FLAGS )		((element)->image_flags ^=IMAGE_FLAGS)
#define		ADD_IMAGE_DATA( element , IMAGE_FLAGS )			((element)->image_flags |=IMAGE_FLAGS)
#define		REMOVE_IMAGE_DATA( element , IMAGE_FLAGS )		((element)->image_flags &=~IMAGE_FLAGS)

#define		REDRAW_IMAGE( element )						SET_OFF_SCREEN( element )

#define		GET_BIT( value , filtermask )			 (  (value) & (filtermask) )
#define		CHECK_BIT( value , filtermask )			 ( ((value) & (filtermask) )!=FLAGS0 )
#define		CHECK_BIT_STRICT( value , filtermask )	 ( ((value) & (filtermask) )==(filtermask) )
#define		ADD_BIT( value , bit )					 (  (value) |=(bit) )
#define		REMOVE_BIT( value , bit)				 (  (value) &=~(bit) )

#define		FAHRENHEIT_TO_CELSIUS(fahrenheit)	(5.0/9.0*((fahrenheit)-32.0))
#define		CELSIUS_TO_FAHRENHEIT(celsius)		(32.0+9.0/5.0*(celsius))

#define		CELSIUS_TO_KELVIN(celsius)			((celsius)+273.15)
#define		KELVIN_TO_CELSIUS(kelvin)			((kelvin)-273.15)

#define		RANKINE_TO_KELVIN(rankine)			(5.0/9.0*(rankine))
#define		KELVIN_TO_RANKINE(kelvin)			(9.0/5.0*(kelvin))

#define		RANKINE_TO_FAHRENHEIT(rankine)		((rankine)-459.67)
#define		FAHRENHEIT_TO_RANKINE(fahrenheit)	((fahrenheit)+459.67)

#define		CELSIUS_TO_RANKINE(celsius)			(FAHRENHEIT_TO_RANKINE(CELSIUS_TO_FAHRENHEIT(celsius)))
#define		RANKINE_TO_CELSIUS(rankine)			(FAHRENHEIT_TO_CELSIUS(RANKINE_TO_FAHRENHEIT(rankine)))

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// macros to add/remove_imagedata_to_listelement
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

#define	HIDE_LISTELEMENT( pelement , pos_element )			add_imagedata_to_listelement( pelement , pos_element , IMAGE_HIDDEN )
#define	SHOW_LISTELEMENT( pelement , pos_element )			remove_imagedata_from_listelement( pelement , pos_element , IMAGE_HIDDEN )
#define	REDRAW_LISTELEMENT( pelement , pos_element )		remove_imagedata_from_listelement( pelement , pos_element , IMAGE_ON_SCREEN )

#define	LIGHT_LISTELELMENT(pelement,pos_element)		add_imagedata_to_listelement( pelement , pos_element , IMAGE_USE_BRIGHT )
#define	DARKEN_LISTELEMENT(pelement,pos_element)		remove_imagedata_from_listelement( pelement , pos_element , IMAGE_USE_BRIGHT )
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//see also definiton of add_imagedata_to_listelement(...); remove_imagedata_to_listelement(...); lines 3054-3082
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

typedef enum ELEMENT_TYPE_ENUM {
	ELEMENT_TYPE_STATIC_IMAGE,
	ELEMENT_TYPE_NEEDLE,
	ELEMENT_TYPE_STRING,
	ELEMENT_TYPE_SLIDER,
	ELEMENT_TYPE_ICON,
	ELEMENT_TYPE_MOVING_IMAGE,
	ELEMENT_TYPE_SPRITE
} ELEMENT_TYPE_ENUM;


#define	ASI_ALT_MANUALLY_TUNABLE			BIT0
#define ASI_HEADING_MANUALLY_TUNABLE		BIT1


typedef struct NONLINEARITY
{
	PIXPOINT	pt;
	FLOAT64		value;
	FLOAT64		degrees;
} NONLINEARITY, *PNONLINEARITY, **PPNONLINEARITY;

typedef	enum	FAILURE_KEY
{
	FAIL_NONE = 0,

	OLD_FAIL_SYSTEM_ELECTRICAL,			// obsolete: dont use it in new gauges; use FAIL_SYSTEM_ELECTRICAL_PANELS
	FAIL_SYSTEM_ENGINE,
	FAIL_SYSTEM_PITOT_STATIC,
	FAIL_SYSTEM_VACUUM,

	FAIL_GAUGE_ADF,
	FAIL_GAUGE_AIRSPEED,
	FAIL_GAUGE_ALTIMETER,
	FAIL_GAUGE_ATTITUDE,
	FAIL_GAUGE_COMMUNICATIONS,
	FAIL_GAUGE_FUEL_INDICATORS,
	FAIL_GAUGE_GYRO_HEADING,
	FAIL_GAUGE_MAGNETIC_COMPASS,
	FAIL_GAUGE_NAVIGATION,			// this assumes no vors
	FAIL_GAUGE_NAVIGATION_VOR1,		// only vor1
	FAIL_GAUGE_NAVIGATION_VOR2,		// only vor2
	FAIL_GAUGE_NAVIGATION_BOTH,		// both vors
	FAIL_GAUGE_TRANSPONDER,
	FAIL_GAUGE_TURN_COORDINATOR,
	FAIL_GAUGE_VERTICAL_SPEED,

	// New failures for FS 7.0
	FAIL_SYSTEM_ELECTRICAL_PANELS,
	FAIL_SYSTEM_ELECTRICAL_AVIONICS,

	FAIL_KEY_MAX
}
FAILURE_KEY, *PFAILURE_KEY, **PPFAILURE_KEY;

typedef	enum	FAILURE_ACTION
{
	FAIL_ACTION_NONE = 0,
	FAIL_ACTION_FREEZE,
	FAIL_ACTION_ZERO,
	FAIL_ACTION_NO_DRAW,
	FAIL_ACTION_COVER,

	FAIL_ACTION_MAX
}
FAILURE_ACTION, *PFAILURE_ACTION, **PPFAILURE_ACTION;

typedef	struct	FAILURE_RECORD
{
	FAILURE_KEY		key;
	FAILURE_ACTION	action;
	PENUM8			var;
}
FAILURE_RECORD, *PFAILURE_RECORD, **PPFAILURE_RECORD;


typedef struct ELEMENT_HEADER *PELEMENT_HEADER, **PPELEMENT_HEADER;
typedef struct GAUGEHDR *PGAUGEHDR, **PPGAUGEHDR;

typedef	void FSAPI GAUGE_CALLBACK( PGAUGEHDR pgauge, int service_id, UINT32 extra_data );
typedef		GAUGE_CALLBACK		*PGAUGE_CALLBACK;

#define PANEL_SERVICE_PRE_QUERY				0
#define PANEL_SERVICE_POST_QUERY			1
#define PANEL_SERVICE_PRE_INSTALL			2	// extra_data = resource_handle
#define PANEL_SERVICE_POST_INSTALL			3	// extra_data = resource_handle
#define PANEL_SERVICE_PRE_INITIALIZE		4
#define PANEL_SERVICE_POST_INITIALIZE		5
#define PANEL_SERVICE_PRE_UPDATE			6
#define PANEL_SERVICE_POST_UPDATE			7
#define PANEL_SERVICE_PRE_GENERATE			8	// extra_data = phase
#define PANEL_SERVICE_POST_GENERATE			9	// extra_data = phase
#define PANEL_SERVICE_PRE_DRAW				10
#define PANEL_SERVICE_POST_DRAW				11
#define PANEL_SERVICE_PRE_KILL				12
#define PANEL_SERVICE_POST_KILL				13
#define PANEL_SERVICE_CONNECT_TO_WINDOW		14	// extra_data = PANEL_WND
#define PANEL_SERVICE_DISCONNECT			15	// extra_data = PANEL_WND
#define PANEL_SERVICE_PANEL_OPEN			16
#define PANEL_SERVICE_PANEL_CLOSE			17


#define		GAUGE_HEADER_VERSION_FS700		700		// FS2000 style gauges


typedef struct	GAUGEHDR
{
	UINT32				gauge_header_version;
	char				*gauge_name;
	PPELEMENT_HEADER	elements_list;
	PQUERY_ROUTINE_610		query_routine_610;
	PINSTALL_ROUTINE_610	install_routine_610;
	PINITIALIZE_ROUTINE_610	initialize_routine_610;
	PUPDATE_ROUTINE_610		update_routine_610;
	PGENERATE_ROUTINE_610	generate_routine_610;
	PDRAW_ROUTINE_610		draw_routine_610;
	PKILL_ROUTINE_610		kill_routine_610;
	char				reserved_1[4];
	UINT32				size_x_mm;
	char				reserved_2[32];
	PMOUSERECT			mouse_rect;
	PGAUGE_CALLBACK		gauge_callback;
	UINT32				user_data;
	PVOID				parameters;
	char*				usage;
	char				reserved_3[16];
}
// changed for compatibility with GCC (illegal redefinitions)
GAUGEHDR;
//GAUGEHDR, *PGAUGEHDR, **PPGAUGEHDR;


typedef	struct	IMAGE_SET
{
	PIMAGE	final;
	char	reserved_1[12];
} IMAGE_SET, *PIMAGE_SET, **PPIMAGE_SET;



#define	ELEMENT_INFO	ELEMENT_TYPE_ENUM			element_type;		\
						ID							resource_id;		\
						PIXPOINT					position;			\
						PIXPOINT					previous_position;	\
						PIXPOINT					ofs;				\
						PGAUGEHDR					gauge_header;		\
						struct ELEMENT_HEADER		*previous_element;	\
						struct ELEMENT_HEADER		**next_element;		\
						PFAILURE_RECORD				failure_systems;	\
						FLAGS						image_flags;		\
						FLAGS						aircraft_special_instrumentation;\
						FLAGS						reserved;



typedef struct ELEMENT_HEADER
{
	ELEMENT_INFO
}
// changed for compatibility with GCC (illegal redefinitions)
ELEMENT_HEADER;
//ELEMENT_HEADER, *PELEMENT_HEADER, **PPELEMENT_HEADER;


#define HEADER union\
			{\
				struct\
				{\
					ELEMENT_INFO\
				};\
				ELEMENT_HEADER		header;\
			}

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// new functions to change image flags in a linked list 
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
PELEMENT_HEADER	FSAPI	get_listelement_pointer(PELEMENT_HEADER	pelement,UINT32	pos_element);
void	FSAPI	add_imagedata_to_listelement(PELEMENT_HEADER	pelement,UINT32	pos_element,FLAGS image_flags);
void	FSAPI	remove_imagedata_from_listelement(PELEMENT_HEADER	pelement,UINT32	pos_element,FLAGS image_flags);

#define		LISTELEM_DEFINE()																					\
PELEMENT_HEADER FSAPI	get_listelement_pointer(PELEMENT_HEADER	pelement,UINT32	pos_element)					\
{																												\
	UINT32	index;																								\
	if(pelement==NULL)							/*invalid start*/												\
		return	NULL;																							\
	for(index=0;index<pos_element;index++)		/*advance pointer to desired element*/							\
	{																											\
		if(pelement->next_element==NULL)		/*stop if linked list is ending*/								\
			return	NULL;																						\
		pelement=pelement->next_element[0];		/*advance pointer to next_element[0]*/							\
	}																											\
	return	pelement;																							\
}																												\
void FSAPI	add_imagedata_to_listelement(PELEMENT_HEADER	pelement,UINT32	pos_element,FLAGS image_flags)		\
{																												\
	if((pelement=get_listelement_pointer(pelement,pos_element))==NULL)											\
		return;																									\
	ADD_IMAGE_DATA(pelement,image_flags);																		\
}																												\
void FSAPI	remove_imagedata_from_listelement(PELEMENT_HEADER	pelement,UINT32	pos_element,FLAGS image_flags)	\
{																												\
	if((pelement=get_listelement_pointer(pelement,pos_element))==NULL)											\
		return;																									\
	REMOVE_IMAGE_DATA(pelement,image_flags);																	\
}																												\

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

typedef struct ELEMENT_STATIC_IMAGE *PELEMENT_STATIC_IMAGE,	**PPELEMENT_STATIC_IMAGE;
typedef struct ELEMENT_NEEDLE       *PELEMENT_NEEDLE,		**PPELEMENT_NEEDLE;
typedef struct ELEMENT_STRING		*PELEMENT_STRING,		**PPELEMENT_STRING;
typedef struct ELEMENT_SLIDER		*PELEMENT_SLIDER,		**PPELEMENT_SLIDER;
typedef struct ELEMENT_ICON			*PELEMENT_ICON,			**PPELEMENT_ICON;
typedef struct ELEMENT_MOVING_IMAGE	*PELEMENT_MOVING_IMAGE,	**PPELEMENT_MOVING_IMAGE;
typedef struct ELEMENT_SPRITE		*PELEMENT_SPRITE,		**PPELEMENT_SPRITE;

typedef	FLOAT64 FSAPI NEEDLE_UPDATE_CALLBACK(PELEMENT_NEEDLE pelement);
typedef		NEEDLE_UPDATE_CALLBACK			*PNEEDLE_UPDATE_CALLBACK;

typedef	FLOAT64 FSAPI STRING_UPDATE_CALLBACK(PELEMENT_STRING pelement);
typedef		STRING_UPDATE_CALLBACK			*PSTRING_UPDATE_CALLBACK;

typedef	FLOAT64 FSAPI SLIDER_UPDATE_CALLBACK(PELEMENT_SLIDER pelement);
typedef		SLIDER_UPDATE_CALLBACK			*PSLIDER_UPDATE_CALLBACK;

typedef	FLOAT64 FSAPI ICON_UPDATE_CALLBACK(PELEMENT_ICON pelement);
typedef		ICON_UPDATE_CALLBACK			*PICON_UPDATE_CALLBACK;

typedef	FLOAT64 FSAPI MOVING_IMAGE_UPDATE_CALLBACK(PELEMENT_MOVING_IMAGE pelement);
typedef		MOVING_IMAGE_UPDATE_CALLBACK	*PMOVING_IMAGE_UPDATE_CALLBACK;

typedef	FLOAT64 FSAPI SPRITE_UPDATE_CALLBACK(PELEMENT_SPRITE pelement);
typedef		SPRITE_UPDATE_CALLBACK			*PSPRITE_UPDATE_CALLBACK;


////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
#define	ELEMENT_STATIC_IMAGE_610_DEFINE	\
	HEADER;								\
										\
	IMAGE_SET		image_data;			\
	PIMAGE			save_buffer;


typedef struct ELEMENT_STATIC_IMAGE
{
	ELEMENT_STATIC_IMAGE_610_DEFINE

	char			reserved_1[16];
}
// changed for compatibility with GCC (illegal redefinitions)
ELEMENT_STATIC_IMAGE;
//ELEMENT_STATIC_IMAGE, *PELEMENT_STATIC_IMAGE, **PPELEMENT_STATIC_IMAGE;


#define	MAKE_STATIC(	NAME,														\
						RES_ID,														\
						NEXT_LIST,													\
						FAILURE,													\
						DRAW_FLAGS,													\
						ASI_FLAGS,													\
						POSITION_X, POSITION_Y )									\
																					\
	ELEMENT_STATIC_IMAGE		NAME	=											\
	{																				\
		ELEMENT_TYPE_STATIC_IMAGE,													\
		RES_ID,																		\
		POSITION_X, POSITION_Y,														\
		{0,0},																		\
		{0,0},																		\
		&GAUGEHDR_VAR_NAME,															\
		NULL,																		\
		(PPELEMENT_HEADER)(NEXT_LIST),												\
		(PFAILURE_RECORD)(FAILURE),													\
		DRAW_FLAGS,																	\
		ASI_FLAGS,																	\
		0																			\
	};


////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
#define	ELEMENT_NEEDLE_610_DEFINE			\
	HEADER;									\
											\
	MODULE_VAR		source_var;				\
	PMODULE_VAR_CB_610	source_var_cb;			\
											\
	PFN_FLOAT64_610		display_value_fn;		\
	PFN_FLOAT64_610		angle_fn;				\
	PFN_FLOAT64_610		lag_fn;					\
	PIXPOINT		reference;				\
	PNONLINEARITY	nonlinearity_table;		\
	UINT32			nonlinearity_table_size;\
	SINT32			max_degrees_per_tick;	\
											\
	FLOAT64			readout_goal;			\
											\
	FLOAT64			theta_goal;				\
											\
	FLOAT64			theta;					\
											\
	PIXPOINT		reference_old;			\
											\
	PIXPOINT		o0, o1, o2, o3;			\
											\
	IMAGE_SET		needle_data;			\
											\
	PIMAGE			texture_data;			\
	UINT32			texture_handle;			\
											\
	PIMAGE			save_buffer;			\
	PIXPOINT		save_position;


typedef struct ELEMENT_NEEDLE
{
	ELEMENT_NEEDLE_610_DEFINE
	PNEEDLE_UPDATE_CALLBACK update_cb;
	PIXPOINT		save_size;
}
// changed for compatibility with GCC (illegal redefinitions)
ELEMENT_NEEDLE;
//ELEMENT_NEEDLE, *PELEMENT_NEEDLE, **PPELEMENT_NEEDLE;


#define	MAKE_NEEDLE(	NAME,														\
						RES_ID,														\
						NEXT_LIST,													\
						FAILURE,													\
						DRAW_FLAGS,													\
						ASI_FLAGS,													\
						BKND_POSITION_X, BKND_POSITION_Y,							\
						NDL_POSITION_X, NDL_POSITION_Y,								\
						SOURCE_VAR, CALLBACK,										\
						NONLINEARITY_TABLE,											\
						MAX_DEG_PER_SEC )											\
																					\
	ELEMENT_NEEDLE				NAME	=											\
	{																				\
		ELEMENT_TYPE_NEEDLE,														\
		RES_ID,																		\
		BKND_POSITION_X, BKND_POSITION_Y,											\
		{0,0},																		\
		NDL_POSITION_X, NDL_POSITION_Y,												\
		&GAUGEHDR_VAR_NAME,															\
		NULL,																		\
		(PPELEMENT_HEADER)(NEXT_LIST),												\
		(PFAILURE_RECORD)(FAILURE),													\
		DRAW_FLAGS,																	\
		ASI_FLAGS,																	\
		0,																			\
																					\
		{SOURCE_VAR},																\
		NULL,																		\
		NULL,																		\
		NULL,																		\
		NULL,																		\
		0, 0,																		\
		NONLINEARITY_TABLE,															\
		sizeof( NONLINEARITY_TABLE )/sizeof( NONLINEARITY ),						\
		MAX_DEG_PER_SEC,															\
		0.0,																		\
		0.0,																		\
		0.0,																		\
		{0,0},																		\
		{0,0},{0,0},{0,0},{0,0},													\
		{0},																		\
		NULL,																		\
		0,																			\
		0,																			\
		{0,0},																		\
		CALLBACK,																	\
		{0,0},																		\
	};


////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
typedef struct SEQ_REC
{
	int seq_id;
	int sel_str;
	int sel_end;
}
SEQ_REC, *PSEQ_REC, **PPSEQ_REC;

#define		COLORREF	unsigned long
#define		HDC			unsigned long
#define		HFONT		unsigned long
#define		HBITMAP		unsigned long
#define		HBRUSH		unsigned long

#define	ELEMENT_STRING_610_DEFINE			\
	HEADER;									\
											\
	MODULE_VAR		source_var[3];			\
	FLOAT64			save_var[3];			\
	PMODULE_VAR_CB_610	source_var_cb[3];		\
	PFN_FLOAT64_610		source_fn;				\
											\
	PCHAR			string;					\
	PCHAR			string_old;				\
											\
	PIXPOINT		img_size;				\
	PIMAGE			string_data;			\
	PIMAGE			save_buffer;			\
											\
	COLORREF		fg_color;				\
	COLORREF		bg_color;				\
	COLORREF		hilite_color;			\
											\
	HDC				hdc;					\
											\
	HFONT			hfont;					\
	HFONT			hfont_old;				\
											\
	HBITMAP			hbmp;					\
	HBITMAP			hbmp_old;				\
											\
	HBRUSH			hbrush;					\
	HBRUSH			hbrush_old;				\
											\
	char			font_name[32];			\
	long			font_weight;			\
	UINT8			font_charset;			\
	UINT32			draw_text_flags;		\
	UINT16			max_string_length;		\
	UINT16			char_width;				\
	SINT16			sel_str;				\
	SINT16			sel_end;				\
	PSEQ_REC		seq;					\
	int				save_global_seq;


typedef struct ELEMENT_STRING
{
	ELEMENT_STRING_610_DEFINE

	int char_height;
	PSTRING_UPDATE_CALLBACK update_cb;
}
// changed for compatibility with GCC (illegal redefinitions)
ELEMENT_STRING;
//ELEMENT_STRING, *PELEMENT_STRING, **PPELEMENT_STRING;


#define STR_UNSEL(ELEMENT)				ELEMENT->sel_end = -1; ELEMENT->sel_str = -1;
#define STR_SEL(ELEMENT, STR, END)		ELEMENT->sel_end = END; ELEMENT->sel_str = STR;
#define IS_STR_SEL(ELEMENT)				(ELEMENT->sel_end != -1 && ELEMENT->sel_str != -1)


#define	MAKE_STRING(	NAME,														\
						NEXT_LIST,													\
						FAILURE,													\
						DRAW_FLAGS,													\
						ASI_FLAGS,													\
						POSITION_X, POSITION_Y,										\
						SIZE_X, SIZE_Y,												\
						NUM_CHARS,													\
						SOURCE_VAR_1,												\
						SOURCE_VAR_2,												\
						SOURCE_VAR_3,												\
						FORECOLOR,													\
						BACKCOLOR,													\
						HILITECOLOR,												\
						FONT_NAME,													\
						FONT_WEIGHT,												\
						FONT_CHARSET,												\
						FONT_SIZE,													\
						DRAW_TEXT_FLAGS,											\
						HILITE_LIST,												\
						CALLBACK)													\
																					\
	ELEMENT_STRING				NAME	=											\
    {																				\
		ELEMENT_TYPE_STRING,														\
		-1,																			\
		POSITION_X, POSITION_Y,														\
		{0,0},																		\
		{0,0},																		\
		&GAUGEHDR_VAR_NAME,															\
		NULL,																		\
		(PPELEMENT_HEADER)(NEXT_LIST),												\
		(PFAILURE_RECORD)(FAILURE),													\
		DRAW_FLAGS,																	\
		ASI_FLAGS,																	\
		0,																			\
																					\
		{{SOURCE_VAR_1}, {SOURCE_VAR_2}, {SOURCE_VAR_3}},							\
		{0, 0, 0},																	\
		{NULL, NULL, NULL},															\
		NULL,																		\
		NULL,																		\
		NULL,																		\
		SIZE_X, SIZE_Y,																\
		NULL,																		\
		NULL,																		\
		FORECOLOR,																	\
		BACKCOLOR,																	\
		HILITECOLOR,																\
		0,																			\
		0,																			\
		0,																			\
		0,																			\
		0,																			\
		0,																			\
		0,																			\
		FONT_NAME,																	\
		FONT_WEIGHT,																\
		FONT_CHARSET,																\
		DRAW_TEXT_FLAGS,															\
		NUM_CHARS,																	\
		0,																			\
		0,																			\
		0,																			\
		HILITE_LIST,																\
		0,																			\
		FONT_SIZE,																	\
		CALLBACK																	\
	};


////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
#define	ELEMENT_SLIDER_610_DEFINE		\
	HEADER;								\
										\
	MODULE_VAR		source_var_x;		\
	PMODULE_VAR_CB_610	source_var_x_cb;	\
	FLOAT64			scale_x;			\
	PFN_FLOAT64_610		lag_fn_x;			\
										\
	MODULE_VAR		source_var_y;		\
	PMODULE_VAR_CB_610	source_var_y_cb;	\
	FLOAT64			scale_y;			\
	PFN_FLOAT64_610		lag_fn_y;			\
										\
	IMAGE_SET		slider_data;		\
										\
	PIMAGE			save_buffer;


typedef struct ELEMENT_SLIDER
{
	ELEMENT_SLIDER_610_DEFINE

	PSLIDER_UPDATE_CALLBACK update_x_cb;
	PSLIDER_UPDATE_CALLBACK update_y_cb;
	FLOAT64 previous_x;
	FLOAT64 previous_y;
}
// changed for compatibility with GCC (illegal redefinitions)
ELEMENT_SLIDER;
//ELEMENT_SLIDER, *PELEMENT_SLIDER, **PPELEMENT_SLIDER;


#define	MAKE_SLIDER(	NAME,														\
						RES_ID,														\
						NEXT_LIST,													\
						FAILURE,													\
						DRAW_FLAGS,													\
						ASI_FLAGS,													\
						POSITION_X, POSITION_Y,										\
						SOURCE_VAR_X, CALLBACK_X, SCALE_X,							\
						SOURCE_VAR_Y, CALLBACK_Y, SCALE_Y )							\
																					\
	ELEMENT_SLIDER				NAME	=											\
	{																				\
		ELEMENT_TYPE_SLIDER,														\
		RES_ID,																		\
		POSITION_X, POSITION_Y,														\
		{0,0},																		\
		{0,0},																		\
		&GAUGEHDR_VAR_NAME,															\
		NULL,																		\
		(PPELEMENT_HEADER)(NEXT_LIST),												\
		(PFAILURE_RECORD)(FAILURE),													\
		DRAW_FLAGS,																	\
		ASI_FLAGS,																	\
		0,																			\
																					\
		{SOURCE_VAR_X},																\
		NULL,																		\
		SCALE_X,																	\
		NULL,																		\
		{SOURCE_VAR_Y},																\
		NULL,																		\
		SCALE_Y,																	\
		NULL,																		\
		{0},																		\
		NULL,																		\
		CALLBACK_X,																	\
		CALLBACK_Y																	\
	};


////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////

// Icon Switch Types
#define ICON_SWITCH_TYPE_SET_CUR_ICON				0
#define ICON_SWITCH_TYPE_SET_CUR_USING_RANGE		1
#define ICON_SWITCH_TYPE_STEP_TO					3
#define ICON_SWITCH_TYPE_STEP_TO_USING_RANGE		4

#define	ELEMENT_ICON_610_DEFINE			\
	HEADER;								\
										\
	MODULE_VAR		source_var;			\
	PMODULE_VAR_CB_610	source_var_cb;		\
										\
	long			switch_type;		\
	long			switch_count;		\
										\
	FLOAT64			scale;				\
	long			offset;				\
										\
	long			num_icons;			\
	long			cur_icon;			\
	long			dst_icon;			\
										\
	PIMAGE_SET		picon_data;			\
										\
	PIMAGE			save_buffer;



typedef struct ELEMENT_ICON
{
	ELEMENT_ICON_610_DEFINE

	PICON_UPDATE_CALLBACK update_cb;
}
// changed for compatibility with GCC (illegal redefinitions)
ELEMENT_ICON;
//ELEMENT_ICON, *PELEMENT_ICON, **PPELEMENT_ICON;


#define	MAKE_ICON(		NAME,														\
						RES_ID,														\
						NEXT_LIST,													\
						FAILURE,													\
						DRAW_FLAGS,													\
						ASI_FLAGS,													\
						POSITION_X, POSITION_Y,										\
						SOURCE_VAR, CALLBACK,										\
						SWITCH_TYPE,												\
						NUM_ICONS,													\
						SCALE,														\
						OFFSET )													\
																					\
    ELEMENT_ICON				NAME	=											\
    {																				\
    	ELEMENT_TYPE_ICON,															\
    	RES_ID,																		\
    	POSITION_X, POSITION_Y,														\
    	{0,0},																		\
    	{0,0},																		\
		&GAUGEHDR_VAR_NAME,															\
    	NULL,																		\
    	(PPELEMENT_HEADER)(NEXT_LIST),												\
    	(PFAILURE_RECORD)(FAILURE),													\
    	DRAW_FLAGS,																	\
    	ASI_FLAGS,																	\
    	0,																			\
																					\
		{SOURCE_VAR},																\
		NULL,																		\
		SWITCH_TYPE,																\
		0,																			\
		SCALE,																		\
		OFFSET,																		\
		NUM_ICONS,																	\
		0,																			\
		0,																			\
		NULL,																		\
		NULL,																		\
		CALLBACK,																	\
    };



////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
#define	ELEMENT_MOVING_IMAGE_610_DEFINE		\
	HEADER;									\
											\
	MODULE_VAR		source_var_x;			\
	PMODULE_VAR_CB_610	source_var_x_cb;		\
	FLOAT64			min_x;					\
	FLOAT64			max_x;					\
	PFN_FLOAT64_610		lag_x;					\
											\
	MODULE_VAR		source_var_y;			\
	PMODULE_VAR_CB_610	source_var_y_cb;		\
	FLOAT64			min_y;					\
	FLOAT64			max_y;					\
	PFN_FLOAT64_610		lag_y;					\
											\
	FLOAT64			scale_x;				\
	FLOAT64			scale_y;				\
	FLOAT64			offset_x;				\
	FLOAT64			offset_y;				\
											\
	PIXPOINT		save_position;			\
											\
	IMAGE_SET		image_data;				\
	IMAGE_SET		local_mask_data;		\
											\
	PIMAGE			mask_data;				\
	PIMAGE			save_buffer;


typedef struct ELEMENT_MOVING_IMAGE
{
	ELEMENT_MOVING_IMAGE_610_DEFINE

	PMOVING_IMAGE_UPDATE_CALLBACK update_x_cb;
	PMOVING_IMAGE_UPDATE_CALLBACK update_y_cb;
	FLOAT64 previous_x;
	FLOAT64 previous_y;
}
// changed for compatibility with GCC (illegal redefinitions)
ELEMENT_MOVING_IMAGE;
//ELEMENT_MOVING_IMAGE, *PELEMENT_MOVING_IMAGE, **PPELEMENT_MOVING_IMAGE;


#define	MAKE_MOVING(	NAME,														\
						RES_ID,														\
						NEXT_LIST,													\
						FAILURE,													\
						DRAW_FLAGS,													\
						ASI_FLAGS,													\
						POSITION_X, POSITION_Y,										\
						SOURCE_VAR_X, CALLBACK_X,									\
						MIN_X, MAX_X,												\
						SOURCE_VAR_Y, CALLBACK_Y,									\
						MIN_Y, MAX_Y )												\
																					\
	ELEMENT_MOVING_IMAGE		NAME	=											\
	{																				\
		ELEMENT_TYPE_MOVING_IMAGE,													\
		RES_ID,																		\
		POSITION_X, POSITION_Y,														\
		{0,0},																		\
		{0,0},																		\
		&GAUGEHDR_VAR_NAME,															\
		NULL,																		\
		(PPELEMENT_HEADER)(NEXT_LIST),												\
		(PFAILURE_RECORD)(FAILURE),													\
		DRAW_FLAGS,																	\
		ASI_FLAGS,																	\
		0,																			\
																					\
		{SOURCE_VAR_X},																\
		NULL,																		\
		MIN_X,																		\
		MAX_X,																		\
		NULL,																		\
		{SOURCE_VAR_Y},																\
		NULL,																		\
		MIN_Y,																		\
		MAX_Y,																		\
		NULL,																		\
		0.0,																		\
		0.0,																		\
		0.0,																		\
		0.0,																		\
		{0,0},																		\
		{0},																		\
		{0},																		\
		NULL,																		\
		NULL,																		\
		CALLBACK_X,																	\
		CALLBACK_Y																	\
	};


////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
#define	ELEMENT_SPRITE_610_DEFINE			\
	HEADER;									\
											\
	MODULE_VAR		source_var_x;			\
	PMODULE_VAR_CB_610	source_var_x_cb;		\
	FLOAT64			scale_x;				\
											\
	MODULE_VAR		source_var_y;			\
	PMODULE_VAR_CB_610	source_var_y_cb;		\
	FLOAT64			scale_y;				\
											\
	MODULE_VAR		source_var_0;			\
	PMODULE_VAR_CB_610	source_var_0_cb;		\
	FLOAT64			scale_0;				\
											\
	float			texture_scale_x;		\
	float			texture_scale_y;		\
											\
	PIXPOINT		reference;				\
											\
	PIXPOINT		reference_old;			\
											\
	PIXPOINT		o0, o1, o2, o3;			\
	PIXPOINT		os0, os1, os2, os3;		\
											\
	IMAGE_SET		sprite_data;			\
											\
	PIMAGE			texture_data;			\
	UINT32			texture_handle;			\
											\
	IMAGE_SET		local_mask_data;		\
	PIMAGE			mask_data;				\
	PIMAGE			save_buffer;


typedef struct ELEMENT_SPRITE
{
	ELEMENT_SPRITE_610_DEFINE

	PSPRITE_UPDATE_CALLBACK update_x_cb;
	PSPRITE_UPDATE_CALLBACK update_y_cb;
	PSPRITE_UPDATE_CALLBACK update_0_cb;
	FLOAT64 previous_x;
	FLOAT64 previous_y;
	FLOAT64 previous_0;
}
// changed for compatibility with GCC (illegal redefinitions)
ELEMENT_SPRITE;
//ELEMENT_SPRITE, *PELEMENT_SPRITE, **PPELEMENT_SPRITE;


#define	MAKE_SPRITE(	NAME,														\
						RES_ID,														\
						NEXT_LIST,													\
						FAILURE,													\
						DRAW_FLAGS,													\
						ASI_FLAGS,													\
						BKND_POSITION_X, BKND_POSITION_Y,							\
						TEXTURE_CENTER_X, TEXTURE_CENTER_Y,							\
						TEXTURE_SCALE_X, TEXTURE_SCALE_Y,							\
						SOURCE_VAR_X, CALLBACK_X, SCALE_X,							\
						SOURCE_VAR_Y, CALLBACK_Y, SCALE_Y,							\
						SOURCE_VAR_0, CALLBACK_0, SCALE_0 )							\
																					\
	ELEMENT_SPRITE				NAME	=											\
	{																				\
		ELEMENT_TYPE_SPRITE,														\
		RES_ID,																		\
		BKND_POSITION_X, BKND_POSITION_Y,											\
		{0,0},																		\
		TEXTURE_CENTER_X, TEXTURE_CENTER_Y,											\
		&GAUGEHDR_VAR_NAME,															\
		NULL,																		\
		(PPELEMENT_HEADER)(NEXT_LIST),												\
		(PFAILURE_RECORD)(FAILURE),													\
		DRAW_FLAGS,																	\
		ASI_FLAGS,																	\
		0,																			\
																					\
		{SOURCE_VAR_X},																\
		NULL,																		\
		SCALE_X,																	\
		{SOURCE_VAR_Y},																\
		NULL,																		\
		SCALE_Y,																	\
		{SOURCE_VAR_0},																\
		NULL,																		\
		SCALE_0,																	\
		(float)TEXTURE_SCALE_X, (float)TEXTURE_SCALE_Y,								\
		{0,0},																		\
		{0,0},																		\
		{0,0},{0,0},{0,0},{0,0},													\
		{0,0},{0,0},{0,0},{0,0},													\
		{0},																		\
		NULL,																		\
		0,																			\
		{0},																		\
		NULL,																		\
		NULL,																		\
		CALLBACK_X,																	\
		CALLBACK_Y,																	\
		CALLBACK_0																	\
	};


////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////

// Linkage info
#define FSLINKAGE		ID			ModuleID;						\
						void		(FSAPI *ModuleInit)(void);		\
						void		(FSAPI *ModuleDeinit)(void);	\
						FLAGS32		ModuleFlags;					\
						UINT32		ModulePriority;					\
						PVOID		DialogTable;

// Module Export Structure
typedef struct  PANELS

{
	FSLINKAGE

	char	reserved_1[18*4];

	void	(FSAPI *element_list_query_610)( PELEMENT_HEADER element );
	void	(FSAPI *element_list_install_610)( PELEMENT_HEADER element, HINSTANCE resource_file_handle );
	void	(FSAPI *element_list_initialize_610)( PELEMENT_HEADER element );
	void	(FSAPI *element_list_update_610)( PELEMENT_HEADER element );
	void	(FSAPI *element_list_generate_610)( PELEMENT_HEADER element, GENERATE_PHASE phase );
	void	(FSAPI *element_list_plot_610)( PELEMENT_HEADER element );
	void	(FSAPI *element_list_erase_610)( PELEMENT_HEADER element );
	void	(FSAPI *element_list_kill_610)( PELEMENT_HEADER element );

	char	reserved_2[3*4];

	BOOL	(FSAPI *panel_window_toggle)(UINT32 panel_id);
	ERR		(FSAPI *trigger_key_event)( ID32 event_id, UINT32 value );

	void	(FSAPI *register_var_by_name)( PVOID var, VAR_TYPE var_type, PSTRINGZ name );
	void	(FSAPI *initialize_var)( PMODULE_VAR module_var );
	void	(FSAPI *initialize_var_by_name)( PMODULE_VAR module_var, PSTRINGZ name );
	void	(FSAPI *lookup_var)( PMODULE_VAR module_var );
	void	(FSAPI *unregister_var_by_name)( PSTRINGZ name );
	void	(FSAPI *unregister_all_named_vars)( void );

	char	reserved_3[2*4];

	BOOL	(FSAPI *panel_window_close_ident)(UINT32 panel_id);
	BOOL	(FSAPI *panel_window_open_ident)(UINT32 panel_id);

	char	reserved_4[12*4];

	ERR		(FSAPI *select_view)( VIEW_DIR vdir, BOOL force );

	char	 reserved_5[2*4];
} PANELS, *PPANELS, **PPPANELS;


// This is the module's import table definition
typedef struct GAUGESIMPORT
{
	struct
	{
		ID			fnID;		
		PPANELS		fnptr;
	}PANELSentry;

	struct
	{
		ID			fnID;
		PVOID		fnptr;
	}dummyentry;
} GAUGESIMPORT, *PGAUGESIMPORT;


// This is the module's export table definition
// changed for compatibility with GCC (incomplete type definition)
// Note: If anyone can find a better way to make this all work with GCC, I'd
//       be interested. The way chosen below decreases code compatibility quite
//       a lot since it completely modifies the linkage export and causes all
//       of the following changes!

#if defined(__GNUC__) || defined(__cplusplus)
typedef PGAUGEHDR GAUGESLINKAGE[], *PGAUGESLINKAGE[], **PPGAUGESLINKAGE[];
#else
typedef struct  GAUGESLINKAGE
{
	FSLINKAGE
	PGAUGEHDR		gauge_header_ptr[];
} GAUGESLINKAGE, *PGAUGESLINKAGE, **PPGAUGESLINKAGE;
#endif

#ifdef __cplusplus
extern "C" {
#endif	//__cplusplus

	void	FSAPI	element_list_query_610( PELEMENT_HEADER element );
	void	FSAPI	element_list_install_610( PELEMENT_HEADER element, HINSTANCE resource_file_handle );
	void	FSAPI	element_list_initialize_610( PELEMENT_HEADER element );
	void	FSAPI	element_list_update_610( PELEMENT_HEADER element );
	void	FSAPI	element_list_generate_610( PELEMENT_HEADER element, GENERATE_PHASE phase );
	void	FSAPI	element_list_plot_610( PELEMENT_HEADER element );
	void	FSAPI	element_list_erase_610( PELEMENT_HEADER element );
	void	FSAPI	element_list_kill_610( PELEMENT_HEADER element );
	BOOL	FSAPI	panel_window_toggle(UINT32 panel_id);
	ERR		FSAPI	trigger_key_event( ID32 event_id, UINT32 value );
	void	FSAPI	register_var_by_name( PVOID var, VAR_TYPE var_type, PSTRINGZ name );
	void	FSAPI	initialize_var( PMODULE_VAR module_var );
	void	FSAPI	initialize_var_by_name( PMODULE_VAR module_var, PSTRINGZ name );
	void	FSAPI	lookup_var( PMODULE_VAR module_var );
	void	FSAPI	unregister_var_by_name( PSTRINGZ name );
	void	FSAPI	unregister_all_named_vars( void );
	BOOL	FSAPI	panel_window_close_ident(UINT32 panel_id);
	BOOL	FSAPI	panel_window_open_ident(UINT32 panel_id);
	ERR		FSAPI	select_view( VIEW_DIR vdir, BOOL force );



// Old gauge functions
	void	FSAPI	query_routine_610( void );
	void	FSAPI	install_routine_610( HINSTANCE resource_file_handle );
	void	FSAPI	initialize_routine_610( void );
	void	FSAPI	update_routine_610( void );
	void	FSAPI	generate_routine_610( GENERATE_PHASE phase );
	void	FSAPI	draw_routine_610( void );
	void	FSAPI	kill_routine_610( void );
#ifdef __cplusplus
}
#endif	//__cplusplus

#define	IMPORTTABLE_DEFINE()														\
void	FSAPI	element_list_query_610( PELEMENT_HEADER element )					\
{																					\
	ImportTable.PANELSentry.fnptr->element_list_query_610( element );				\
}																					\
void	FSAPI	element_list_install_610( PELEMENT_HEADER element, HINSTANCE resource_file_handle )		\
{																										\
	ImportTable.PANELSentry.fnptr->element_list_install_610( element, resource_file_handle );			\
}																										\
void	FSAPI	element_list_initialize_610( PELEMENT_HEADER element )				\
{																					\
	ImportTable.PANELSentry.fnptr->element_list_initialize_610( element );			\
}																					\
void	FSAPI	element_list_update_610( PELEMENT_HEADER element )					\
{																					\
	ImportTable.PANELSentry.fnptr->element_list_update_610( element );				\
}																					\
void	FSAPI	element_list_generate_610( PELEMENT_HEADER element, GENERATE_PHASE phase )	\
{																							\
	ImportTable.PANELSentry.fnptr->element_list_generate_610(  element, phase );			\
}																							\
void	FSAPI	element_list_plot_610( PELEMENT_HEADER element )					\
{																					\
	ImportTable.PANELSentry.fnptr->element_list_plot_610( element );				\
}																					\
void	FSAPI	element_list_erase_610( PELEMENT_HEADER element )					\
{																					\
	ImportTable.PANELSentry.fnptr->element_list_erase_610( element );				\
}																					\
void	FSAPI	element_list_kill_610( PELEMENT_HEADER element )					\
{																					\
	ImportTable.PANELSentry.fnptr->element_list_kill_610( element );				\
}																					\
BOOL	FSAPI	panel_window_toggle(UINT32 panel_id)								\
{																					\
	return	ImportTable.PANELSentry.fnptr->panel_window_toggle(panel_id);			\
}																					\
ERR		FSAPI	trigger_key_event( ID32 event_id, UINT32 value )					\
{																					\
	return	ImportTable.PANELSentry.fnptr->trigger_key_event(  event_id,  value );	\
}																					\
void	FSAPI	register_var_by_name( PVOID var, VAR_TYPE var_type, PSTRINGZ name )		\
{																						\
	ImportTable.PANELSentry.fnptr->register_var_by_name( var, var_type, name );			\
}																						\
void	FSAPI	initialize_var( PMODULE_VAR module_var )							\
{																					\
	ImportTable.PANELSentry.fnptr->initialize_var(module_var);						\
}																					\
void	FSAPI	initialize_var_by_name( PMODULE_VAR module_var, PSTRINGZ name )		\
{																					\
	ImportTable.PANELSentry.fnptr->initialize_var_by_name(module_var,name );		\
}																					\
void	FSAPI	lookup_var( PMODULE_VAR module_var )								\
{																					\
	ImportTable.PANELSentry.fnptr->lookup_var(module_var);							\
}																					\
void	FSAPI	unregister_var_by_name( PSTRINGZ name )								\
{																					\
	ImportTable.PANELSentry.fnptr->unregister_var_by_name( name );					\
}																					\
void	FSAPI	unregister_all_named_vars( void )									\
{																					\
	ImportTable.PANELSentry.fnptr->unregister_all_named_vars();						\
}																					\
BOOL	FSAPI	panel_window_close_ident(UINT32 panel_id)							\
{																					\
	return	ImportTable.PANELSentry.fnptr->panel_window_close_ident(panel_id);		\
}																					\
BOOL	FSAPI	panel_window_open_ident(UINT32 panel_id)							\
{																					\
	return	ImportTable.PANELSentry.fnptr->panel_window_open_ident(panel_id);		\
}																					\
ERR		FSAPI	select_view( VIEW_DIR vdir, BOOL force )							\
{																					\
	return	ImportTable.PANELSentry.fnptr->select_view(  vdir, force );				\
}																					


#define	OLD_GAUGEDEFINE()																			\
void	FSAPI query_routine_610( void )																\
{																									\
    element_list_query_610( *Linkage.gauge_header_ptr[0]->elements_list );							\
}																									\
void	FSAPI install_routine_610( HINSTANCE resource_file_handle )									\
{																									\
    element_list_install_610( *Linkage.gauge_header_ptr[0]->elements_list, resource_file_handle );	\
}																									\
void	FSAPI initialize_routine_610( void )														\
{																									\
    element_list_initialize_610( *Linkage.gauge_header_ptr[0]->elements_list );						\
}																									\
void	FSAPI update_routine_610( void )															\
{																									\
    element_list_update_610(*Linkage.gauge_header_ptr[0]->elements_list);							\
}																									\
void	FSAPI generate_routine_610( GENERATE_PHASE phase )											\
{																									\
    element_list_generate_610( *Linkage.gauge_header_ptr[0]->elements_list, phase );				\
}																									\
void	FSAPI draw_routine_610( void )																\
{																									\
    element_list_plot_610( *Linkage.gauge_header_ptr[0]->elements_list );							\
}																									\
void	FSAPI kill_routine_610( void )																\
{																									\
    element_list_kill_610( *Linkage.gauge_header_ptr[0]->elements_list );							\
}																									\

#define	GCC_OLD_GAUGEDEFINE()																		\
void	FSAPI query_routine_610( void )																\
{																									\
    element_list_query_610( *Linkage[6]->elements_list );											\
}																									\
void	FSAPI install_routine_610( HINSTANCE resource_file_handle )									\
{																									\
    element_list_install_610( *Linkage[6]->elements_list, resource_file_handle );					\
}																									\
void	FSAPI initialize_routine_610( void )														\
{																									\
    element_list_initialize_610( *Linkage[6]->elements_list );										\
}																									\
void	FSAPI update_routine_610( void )															\
{																									\
    element_list_update_610(*Linkage[6]->elements_list);											\
}																									\
void	FSAPI generate_routine_610( GENERATE_PHASE phase )											\
{																									\
    element_list_generate_610( *Linkage[6]->elements_list, phase );									\
}																									\
void	FSAPI draw_routine_610( void )																\
{																									\
    element_list_plot_610( *Linkage[6]->elements_list );											\
}																									\
void	FSAPI kill_routine_610( void )																\
{																									\
    element_list_kill_610( *Linkage[6]->elements_list );											\
}																									\


//-------------------------------------------------------------------------------
// GAUGE_TABLE_BEGIN
// GAUGE_TABLE_ENTRY
// GAUGE_TABLE_END
//
//	These macros build up the export table for the module by inserting gauge names
//	into the list of gauges
//-------------------------------------------------------------------------------

// again the changes for GCC to correctly set up the linkage struct
#if defined(__GNUC__) && !defined(__cplusplus)
#define	GAUGE_TABLE_BEGIN()										\
		extern 	__declspec(dllexport)	GAUGESIMPORT	ImportTable;				\
		extern 	__declspec(dllexport)	GAUGESLINKAGE	Linkage;					\
		void FSAPI	module_init(void){}							\
		void FSAPI	module_deinit(void){}						\
		int FSAPI DllMain (PVOID hDLL, UINT32 dwReason, PVOID lpReserved)	\
		{														\
			return TRUE;										\
		}														\
																\
																\
		/* This is the module's import table.	*/				\
		GAUGESIMPORT	ImportTable =							\
		{														\
			{ 0x0000000F, (PPANELS)NULL },						\
			{ 0x00000000, NULL }								\
		};														\
																\
																\
		/* This is the module's export table.	*/				\
		GAUGESLINKAGE	Linkage =								\
		{														\
			(PGAUGEHDR)0x00000013,								\
			(PGAUGEHDR)module_init,								\
			(PGAUGEHDR)module_deinit,							\
			0,													\
			0,													\
			NULL,

#define GAUGE_TABLE_ENTRY(pgauge_header)		(pgauge_header),

#define	GAUGE_TABLE_END()						0 };					\
												GCC_OLD_GAUGEDEFINE()	\
												LISTELEM_DEFINE()		\
												IMPORTTABLE_DEFINE()
#endif		//#if defined(__GNUC__) && !defined(__cplusplus)

#if defined(__cplusplus)
#define	GAUGE_TABLE_BEGIN()										\
		extern "C"	__declspec(dllexport)	GAUGESIMPORT	ImportTable;				\
		extern "C"	__declspec(dllexport)	GAUGESLINKAGE	Linkage;					\
		void FSAPI	module_init(void){}							\
		void FSAPI	module_deinit(void){}						\
		int FSAPI DllMain (PVOID hDLL, UINT32 dwReason, PVOID lpReserved)	\
		{														\
			return TRUE;										\
		}														\
																\
																\
		/* This is the module's import table.	*/				\
		GAUGESIMPORT	ImportTable =							\
		{														\
			{ 0x0000000F, (PPANELS)NULL },						\
			{ 0x00000000, NULL }								\
		};														\
																\
																\
		/* This is the module's export table.	*/				\
		GAUGESLINKAGE	Linkage =								\
		{														\
			(PGAUGEHDR)0x00000013,								\
			(PGAUGEHDR)module_init,								\
			(PGAUGEHDR)module_deinit,							\
			0,													\
			0,													\
			NULL,

#define GAUGE_TABLE_ENTRY(pgauge_header)		(pgauge_header),

#define	GAUGE_TABLE_END()						0 };					\
												GCC_OLD_GAUGEDEFINE()	\
												LISTELEM_DEFINE()		\
												IMPORTTABLE_DEFINE()
#endif	//ifdef __cplusplus

#if !defined(__GNUC__) && !defined(__cplusplus)
#define	GAUGE_TABLE_BEGIN()										\
		extern 	__declspec(dllexport)	GAUGESIMPORT	ImportTable;				\
		extern 	__declspec(dllexport)	GAUGESLINKAGE	Linkage;					\
		void FSAPI	module_init(void){}							\
		void FSAPI	module_deinit(void){}						\
		int FSAPI DllMain (PVOID hDLL, UINT32 dwReason, PVOID lpReserved)	\
		{														\
			return TRUE;										\
		}														\
																\
																\
		/* This is the module's import table.	*/				\
		GAUGESIMPORT	ImportTable =							\
		{														\
			{ 0x0000000F, (PPANELS)NULL },						\
			{ 0x00000000, NULL }								\
		};														\
																\
																\
		/* This is the module's export table.	*/				\
		GAUGESLINKAGE	Linkage =								\
		{														\
			0x00000013,											\
			module_init,										\
			module_deinit,										\
			0,													\
			0,													\
			NULL,												\
			{													\

#define GAUGE_TABLE_ENTRY(pgauge_header)		(pgauge_header),

#define	GAUGE_TABLE_END()						0 }};				\
												OLD_GAUGEDEFINE()	\
												LISTELEM_DEFINE()	\
												IMPORTTABLE_DEFINE()
#endif	//#if !defined(__GNUC__) && !defined(__cplusplus)

//-------------------------------------------------------------------------------
// FS2000 and CFS 2.0 gauges
//-------------------------------------------------------------------------------
#define GAUGE_HEADER_FS700(				\
				default_size_mm,		\
				gauge_name,				\
				element_list,			\
				pmouse_rect,			\
				pgauge_callback,		\
				user_data,				\
				parameters,				\
				usage)					\
	GAUGEHDR GAUGEHDR_VAR_NAME =		\
	{									\
		GAUGE_HEADER_VERSION_FS700,		\
		gauge_name,						\
		element_list,					\
		query_routine_610,				\
		install_routine_610,			\
		initialize_routine_610,			\
		update_routine_610,				\
		generate_routine_610,			\
		draw_routine_610,				\
		kill_routine_610,				\
		"",								\
		default_size_mm,				\
		"",								\
		pmouse_rect,					\
		pgauge_callback,				\
		user_data,						\
		parameters,						\
		usage,							\
		(char)NULL,						\
		(char)NULL,						\
		(char)NULL,						\
		(char)NULL,						\
	};


#pragma pack()

#endif //__FS2KGAUGES_H__
