Hey Viper1970, I like your wish list! Nice!
I don't see a limit to the number of helicopters anywhere.
If there is, it's just an array size somewhere which can be altered.
I've mapped all the Avionics files, now I just need to sort out where the gauge drawing code is and get started.
The calls to draw the gauges is in _vckpt.c. For example, in bh_vckpt.c, there's
//
// radar altimeter
//
search.search_depth = 0;
search.search_object = virtual_cockpit_inst3d;
search.sub_object_index = OBJECT_3D_SUB_OBJECT_BH_RDR_ALT_NEEDLE;
if (find_object_3d_sub_object (&search) == SUB_OBJECT_SEARCH_RESULT_OBJECT_FOUND)
{
search.result_sub_object->relative_roll = get_blackhawk_virtual_cockpit_radar_altimeter_needle_value ();
}
This refers to the 3D model of the needle - OBJECT_3D_SUB_OBJECT_BH_RDR_ALT_NEEDLE
The get_blackhawk_virtual_cockpit_radar_altimeter_needle_value calls a function in bh_instr.c
float get_blackhawk_virtual_cockpit_radar_altimeter_needle_value(void)
{
float
altimeter_needle_value,
roll;
altimeter_needle_value = get_radar_altimeter_needle_value ();
//
// non-linear scale
//
if (altimeter_needle_value < 200.0)
roll = altimeter_needle_value / 200.0 * rad(180.0);
else if (altimeter_needle_value < 500)
roll = rad(180) + (altimeter_needle_value - 200) / 300 * rad(20);
else if (altimeter_needle_value > 500)
roll = rad(200) + rad(80);
return (-roll);
}
This makes a call get_radar_altimeter_needle_value in the same class, which eventually gets the value from current_flight_dynamics->radar_altitude.value
The rotation of the needle for is worked out from that. I found it was a bit of trial and error in this part to get the needle value to match the dial texture. There's probably a more accurate way to work it out than trial and error.
if (altimeter_needle_value < 200.0)
roll = altimeter_needle_value / 200.0 * rad(180.0);
else if (altimeter_needle_value < 500)
roll = rad(180) + (altimeter_needle_value - 200) / 300 * rad(20);
else if (altimeter_needle_value > 500)
roll = rad(200) + rad(80);
That pattern is repeated for other needles.
Does that help?