Ejemplo n.º 1
0
void SmsDrawable::InventoryDisplay (int jettOnly)
{
    char tmpStr1[12];
    char tmpStr2[sizeof (tmpStr1)];
    int i, numRounds = 0,rack = 1;
    
	for (i = 1; i < 10; i++)
	    InvDrawHp (i, jettOnly);

   if (!jettOnly)
   {
      if( ((AircraftClass*)Sms->ownship)->af->IsSet(AirframeClass::CATLimiterIII) )
      {
	      sprintf (tmpStr1, "CAT III");/*
	      limitGs = ((AircraftClass*)Sms->ownship)->af->curMaxGs;
	      if( limiter = gLimiterMgr->GetLimiter(CatIIIMaxGs, ((AircraftClass*)Sms->ownship)->af->VehicleIndex()) )
			   limitGs = limiter->Limit(0);*/
	      sprintf(tmpStr2, "%2.1f G", ((AircraftClass*)Sms->ownship)->af->curMaxGs);
	      
      }
      else
      {
	      sprintf (tmpStr1, "CAT I");
	      sprintf(tmpStr2, "%2.1f G", ((AircraftClass*)Sms->ownship)->af->curMaxGs);
      }

      ShiAssert (strlen(tmpStr1) < sizeof (tmpStr1));
      ShiAssert (strlen(tmpStr2) < sizeof (tmpStr1));
      display->TextCenter(0.0F,-0.5F,tmpStr1);
      display->TextCenter(0.0F,-0.6F,tmpStr2);

      FireControlComputer* pFCC = Sms->ownship->GetFCC();
      // Label the buttons
      TopRow(1);
      BottomRow();

      for (i=0; i<Sms->NumHardpoints(); i++)
      {
	     GunClass *gun = Sms->GetGun(i);
	     if (gun)
            numRounds += gun->numRoundsRemaining / 10;
      }
      sprintf (tmpStr1, "%02dGUN", numRounds / 10);
      ShiAssert (strlen(tmpStr1) < sizeof (tmpStr1));
      LabelButton (19, tmpStr1, "PGU28");
   }
}
Ejemplo n.º 2
0
////////////////////////////////////////////////////////////////////////////////
//Drop Arm--------------------------------------------------------------------//
////////////////////////////////////////////////////////////////////////////////
void DropArm()
{
  switch(Row)
  {
  case 1:
    BottomRow();
    break;
    //-------------------------------------
  case 2:
    MiddleRow();
    break;
    //--------------------------------------
  case 3:
    TopRow();
    break;
  }
}
Ejemplo n.º 3
0
void SmsDrawable::GunDisplay (void)
{
    char tmpStr[12];
    int station, numRounds;
    FireControlComputer *FCC = Sms->ownship->GetFCC();

    // JPO - moved a lot of it into these two routines.
    TopRow(0);
    BottomRow();
    
	//MI
	if(g_bRealisticAvionics && FCC && FCC->GetSubMode() ==
		FireControlComputer::EEGS)
	{
		char tempstr[4] = "";
		sprintf(tempstr,"%s", Sms->FEDS == TRUE ? "ON" : "OFF");
		LabelButton (19, "SCOR", tempstr);
	}
	else if(g_bRealisticAvionics)
		LabelButton(19,"");
	else
		LabelButton (19, "SCOR", "OFF");
    
    if (Sms->ownship)
    {
	if (FCC->GetMasterMode() == FireControlComputer::Dogfight)
	    station = 0;
	else
	    station = Sms->curHardpoint;
	
	GunClass *gun = Sms->GetGun(station);
	if (gun)
	    numRounds = gun->numRoundsRemaining / 10;
	else
	    numRounds = 0;
    }
    else
	numRounds = 0;
    
	//MI I think this should only show RDY when we are in ARM, like all the other weapons
    if (numRounds)
    {
		if(!g_bRealisticAvionics)
		{
			
			sprintf (tmpStr, "%02dGUN", numRounds);
			display->TextCenter (0.3F, 0.6F, "RDY");
		}
		else
		{
			float x,y = 0;
			GetButtonPos(5, &x, &y);	//button for Gun
			sprintf (tmpStr, "%02dGUN", numRounds);
			if(Sms->MasterArm() == SMSBaseClass::Arm)
				display->TextCenter (0.3F, y, "RDY");
			else if(Sms->MasterArm() == SMSBaseClass::Sim)
				display->TextCenter (0.3F, y, "SIM");
		}
    }
    else
	sprintf (tmpStr, "00GUN");
    
    LabelButton (5, tmpStr);
}