Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Samuel on January 17, 2008, 02:54:09 pm

Title: Relationship between MAX_WINGS and MAX_SQUADRON_WINGS
Post by: Samuel on January 17, 2008, 02:54:09 pm
Hi,

could someone please clarify the relationship between MAX_WINGS (defined as 25) and MAX_SQUADRON_WINGS (defined as 5).

From what I understand, MAX_SQUADRON_WINGS is the maximum number of wings that will be displayed on the HUD. What is not clear to me, is how a wing ( 0 < wing < 25) gets mapped on to a squadron wing ( 0 < squadron_wing < 5). 

I notice that a ship has ship->wingnum. I assume this wingum is bounded by ( 0 < wingmun < 25).  Is this correct?

The function that maps MAX_WINGS to MAX_SQUADRON_WINGS seems to be : ship_squadron_wing_lookup(wingp->name)

I don't quite see how a name maps 25 wings -> 5 wings. Does this mean that there are some wings that are floating around that will never be in the players squadron, and hence do not need to be displayed on the HUD?
Or has it got to do with the fact that certain wings can appear later during a mission (up to 25) and they only get mapped onto the HUD once the other ones disappear?

I hope someone can shed some light on this.

Many thanks,

Samuel
Title: Re: Relationship between MAX_WINGS and MAX_SQUADRON_WINGS
Post by: FUBAR-BDHR on January 17, 2008, 03:39:39 pm
Only wings with certain names are displayed on the hud.  Default for FS2 are Alpha,  Beta, Gamma, Delta and Epsilon if I recall.  Any other wing names will not show up.  You can change the names that will show up in FRED now. 
Title: Re: Relationship between MAX_WINGS and MAX_SQUADRON_WINGS
Post by: karajorma on January 17, 2008, 04:33:27 pm
Yep. You can find the names of the wings that appear on the HUD in the Squadron_wing_names array.