Esempio n. 1
0
//컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴
//Procedure		make_airgrp
//Author		Jim Taylor
//Date			Mon 16 Jun 1997
//
//Description
//
//Inputs
//
//Returns
//
//------------------------------------------------------------------------------
void	Persons2::make_airgrp(info_airgrp& I)
{
	if (!justscanning)
	{
		info_airgrp*	J=new info_airgrp;
		*J=I;
		int v1,v2,v3;
		if ((v3=J->nat.Evaluate())==ENABLE_COMPLEX_VAL)
			v3=defaultside;
		if ((v1=J->uid.Evaluate())==ENABLE_COMPLEX_VAL)
			if ((v2=J->band.Evaluate())==ENABLE_COMPLEX_VAL)
				if (v3==(int)NAT_RED)
					J->uniqueID.count=assignuid(RedAcBAND);
				else
					J->uniqueID.count=assignuid(BlueAcBAND);
			else
				J->uniqueID.count=assignuid((UniqueIDBand)v2);
		else
			if (ConvertPtrUID(UniqueID(v1)))
				J->uniqueID.count=assignuid(getbandfromUID(UniqueID(v1)));
			else
				J->uniqueID.count=UniqueID(v1);
		J->bfieldindex=currbfindex;
//		J->uniqueID.sector=loadingmainworld;
		J->uniqueID.changed=FALSE;
//		J->uniqueID.deaded=FALSE;
		J->position.EvalW(J->World);
  //		J->shape=ShapeNum(J->shape.Evaluate());
//		FixupRouteOwner(J->uniqueID.count,J->wpref);
  //		FixupRouteOwner(J->uniqueID.count,J->wpref);
//camp tmp		if (J->inform.Evaluate()==ENABLE_COMPLEX_VAL)
//			MissionEditor->ActiveCampaign.PlayerAcuid = J->uniqueID.count;
		logUID(J);
	}
	else
	{
		int	v3;
		if ((v3=I.nat.Evaluate())==ENABLE_COMPLEX_VAL)
			v3=defaultside;
        if (bfdesc)
			if (I.inwing.Evaluate()==ENABLE_COMPLEX_VAL)
				if (v3==NAT_RED)
					bfdesc->RAC+=12;
				else
					bfdesc->BAC+=12;
			else
				if (v3==NAT_RED)
					bfdesc->RAC+=I.inform.Evaluate();
				else
					bfdesc->BAC+=I.inform.Evaluate();
	}
}
Esempio n. 2
0
//컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴
//Procedure		make_gndgrp
//Author		Jim Taylor
//Date			Wed 18 Jun 1997
//
//Description
//
//Inputs
//
//Returns
//
//------------------------------------------------------------------------------
void	Persons4::make_gndgrp(info_grndgrp& I)
{
    if (!justscanning)
    {
        info_grndgrp*	J=new info_grndgrp;
        *J=I;
        int v1,v2,v3;
        if ((v3=J->nat.Evaluate())==ENABLE_COMPLEX_VAL)
            v3=NAT_RED;//defaultside;
        if ((v1=J->uid.Evaluate())==ENABLE_COMPLEX_VAL)
            if ((v2=J->band.Evaluate())==ENABLE_COMPLEX_VAL)
                if (v3==(int)NAT_RED)
                    J->uniqueID.count=assignuid(RedAcBAND);
                else
                    J->uniqueID.count=assignuid(BlueAcBAND);
            else
                J->uniqueID.count=assignuid((UniqueIDBand)v2);
        else if (ConvertPtrUID(UniqueID(v1)))
            J->uniqueID.count=assignuid(getbandfromUID(UniqueID(v1)));
        else
            J->uniqueID.count=UniqueID(v1);
        J->bfieldindex=currbfindex;
//		J->uniqueID.sector=loadingmainworld;
        J->uniqueID.changed=FALSE;
//		J->uniqueID.deaded=FALSE;
        J->position.EvalW(J->World);
//		J->shape=ShapeNum(J->shape.Evaluate());
        J->Item::shape=ShapeNum(J->shape.Evaluate());				  //JIM 16/04/99

        logUID(J);
//		FixupRouteOwner(J->uniqueID.count,J->wpref);
        //		FixupRouteOwner(J->uniqueID.count,J->wpref);
    }
    else if (justscanning==SCANNAMES)
    {
        int	v3;
        if ((v3=I.nat.Evaluate())==ENABLE_COMPLEX_VAL)
            v3=NAT_RED;//defaultside;
        if (bfdesc)
            if (v3==NAT_RED)
                ;//ME 					bfdesc->RGR+=I.inform.Evaluate();
            else
                ;//ME 					bfdesc->BGR+=I.inform.Evaluate();
    }
}
Esempio n. 3
0
void	Persons4::make_itemS(info_itemS& I,bool enabled)
{
//  if ((int)I.uid.Evaluate() != (int)UID_Varneville)				//this is in wrong band so don't load!
//  {
	if (!justscanning)
	{
		info_itemS* J=new info_itemS;
		*J=I;
		int v1,v2;
																	//	if ((v3=J->nat.Evaluate())==ENABLE_COMPLEX_VAL)
																	  //		v3=defaultside;
		if ((v1=J->uid.Evaluate())==ENABLE_COMPLEX_VAL)
			if ((v2=J->band.Evaluate())==ENABLE_COMPLEX_VAL)
				J->uniqueID.count=assignuid(CivilianBAND);
			else
				J->uniqueID.count=assignuid((UniqueIDBand)v2);
		else
			if (&ConvertPtrUID(UniqueID(v1)))
            {
				J->uniqueID.count=assignuid(getbandfromUID(UniqueID(v1)));
            	PleaseWarnUser("This battlfield has been damaged because of the above error. Do not save it!","Aircraft with named UID already loaded.");
            }
			else
				J->uniqueID.count=UniqueID(v1);
		J->bfieldindex=currbfindex;
//DeadCode RDH 11Feb98 		J->uniqueID.sector=loadingmainworld;
		J->uniqueID.changed=FALSE;
//		J->uniqueID.deaded=FALSE;
		J->position.EvalW(J->World);
		J->Item::shape=ShapeNum(J->shape.Evaluate());
		logUID(J);
	}
//DEADCODE JIM 16/11/99 	else
//DEADCODE JIM 16/11/99 		if (bfdesc && justscanning==SCANNAMES)
//DEADCODE JIM 16/11/99 ;//ME 			bfdesc->ST++;
//  }
//  else
//  {
//
//
//  }
}
Esempio n. 4
0
//컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴
//Procedure		make_itemS
//Author		Jim Taylor
//Date			Wed 18 Jun 1997
//
//Description	Makes object J, a copy of temp object I
//				Fills in item UID and coords
//				Adds item to UID table.
//
//Inputs
//
//Returns
//
//------------------------------------------------------------------------------
void	Persons2::make_itemS(info_itemS& I)
{
//  if ((int)I.uid.Evaluate() != (int)UID_Varneville)				//this is in wrong band so don't load!
//  {
	if (!justscanning)
	{
		info_itemS* J=new info_itemS;
		*J=I;
		int v1,v2;
																	//	if ((v3=J->nat.Evaluate())==ENABLE_COMPLEX_VAL)
																	  //		v3=defaultside;
		if ((v1=J->uid.Evaluate())==ENABLE_COMPLEX_VAL)
			if ((v2=J->band.Evaluate())==ENABLE_COMPLEX_VAL)
				J->uniqueID.count=assignuid(RedVetoedBAND);
			else
				J->uniqueID.count=assignuid((UniqueIDBand)v2);
		else
			if (ConvertPtrUID(UniqueID(v1)))
				J->uniqueID.count=assignuid(getbandfromUID(UniqueID(v1)));
			else
				J->uniqueID.count=UniqueID(v1);
		J->bfieldindex=currbfindex;
//DeadCode RDH 11Feb98 		J->uniqueID.sector=loadingmainworld;
		J->uniqueID.changed=FALSE;
//		J->uniqueID.deaded=FALSE;
		J->position.EvalW(J->World);
		J->shape=ShapeNum(J->shape.Evaluate());
		logUID(J);
	}
	else
		if (bfdesc && justscanning==SCANNAMES)
			bfdesc->ST++;
//  }
//  else
//  {
//
//
//  }
}
Esempio n. 5
0
//컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴
//Procedure		make_gndgrp
//Author		Jim Taylor
//Date			Wed 18 Jun 1997
//
//Description
//
//Inputs
//
//Returns
//
//------------------------------------------------------------------------------
void	Persons4::make_gndgrp(info_grndgrp& I)
{
	if (!justscanning)
	{
		info_grndgrp*	J=new info_grndgrp;
		*J=I;
		bool	gotGRoverride=false;
		int v1,v2,v3;
		if ((v3=J->nat.Evaluate())==ENABLE_COMPLEX_VAL)
			v3=NAT_RED;//defaultside;
		if ((v1=J->uid.Evaluate())==ENABLE_COMPLEX_VAL)
			if ((v2=J->band.Evaluate())==ENABLE_COMPLEX_VAL)
					J->uniqueID.count=assignuid(BritBoatBAND);	//JIM 22Feb100
			else
				J->uniqueID.count=assignuid((UniqueIDBand)v2);
		else
			if (&ConvertPtrUID(UniqueID(v1)))
            {
            	PleaseWarnUser("This battlfield has been damaged because of the above error. Do not save it!","Mobile with named UID already loaded.");
				J->uniqueID.count=assignuid(getbandfromUID(UniqueID(v1)));
            }
			else
			{
				J->uniqueID.count=UniqueID(v1);
#ifndef	__BCPLUSPLUS__
				if (v1==+GR_ItemInfoOverride)
					gotGRoverride=true;
#endif
			}
		J->bfieldindex=currbfindex;
//		J->uniqueID.sector=loadingmainworld;
		J->uniqueID.changed=FALSE;
//		J->uniqueID.deaded=FALSE;
		J->position.EvalW(J->World);
#ifndef	__BCPLUSPLUS__
		if (gotGRoverride)
		{
//DeadCode JIM 22Oct00 			J->World.X=GR_ItemXOverride;
//DeadCode JIM 22Oct00 			J->World.Z=GR_ItemZOverride;
			for (int wpcount=GR_ItemWpOverride;wpcount;wpcount--)
				if (info_waypointPtr(Persons2::ConvertPtrUID(J->wpref))->nextwp)
					J->wpref=info_waypointPtr(Persons2::ConvertPtrUID(J->wpref))->nextwp;
		}
#endif
//		J->shape=ShapeNum(J->shape.Evaluate());
		J->Item::shape=ShapeNum(J->shape.Evaluate());				  //JIM 16/04/99

		logUID(J);
//		FixupRouteOwner(J->uniqueID.count,J->wpref);
  //		FixupRouteOwner(J->uniqueID.count,J->wpref);
	}
	else
		if (justscanning==SCANNAMES)
		{
			int	v3;
			if ((v3=I.nat.Evaluate())==ENABLE_COMPLEX_VAL)
				v3=NAT_RED;//defaultside;
            if (bfdesc)
				if (v3==NAT_RED)
;//ME 					bfdesc->RGR+=I.inform.Evaluate();
				else
;//ME 					bfdesc->BGR+=I.inform.Evaluate();
		}
}
Esempio n. 6
0
//컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴
//Procedure		make_airgrp
//Author		Jim Taylor
//Date			Mon 16 Jun 1997
//
//Description
//
//Inputs
//
//Returns
//
//------------------------------------------------------------------------------
void	Persons4::make_airgrp(info_airgrp& I)
{
	if (!justscanning)
	{
		info_airgrp*	J=new info_airgrp;
		*J=I;
		int v1,v2,v3;
		if ((v3=J->nat.Evaluate())==ENABLE_COMPLEX_VAL)
			v3=NAT_RED;//defaultside;
		if ((v1=J->uid.Evaluate())==ENABLE_COMPLEX_VAL)
			if ((v2=J->band.Evaluate())==ENABLE_COMPLEX_VAL)
//DEADCODE DAW 24/11/99 				if (v3==(int)NAT_RED)
//DEADCODE DAW 24/11/99 					J->uniqueID.count=assignuid(RedAcBAND);
//DEADCODE DAW 24/11/99 				else
				J->uniqueID.count=assignuid(RealAcBAND);
			else
				J->uniqueID.count=assignuid((UniqueIDBand)v2);
		else
			if (&ConvertPtrUID(UniqueID(v1)))
            {
            	PleaseWarnUser("This battlfield has been damaged because of the above error. Do not save it!","Aircraft with named UID already loaded.");
				J->uniqueID.count=assignuid(getbandfromUID(UniqueID(v1)));
            }
			else
				J->uniqueID.count=UniqueID(v1);
#ifndef	__BCPLUSPLUS__
		if (J->wpref==UID_NULL)
			J->wpref=UniqueID(GR_lastroutefirstwaypoint);
#endif
		if ((v3=J->wpnum.Evaluate())!=ENABLE_COMPLEX_VAL)
			while (--v3>=0)
			{
				info_waypointPtr w=ConvertPtrUID(J->wpref);
				J->wpref=w->nextwp;
			}
//DeadCode MS 26Sep00 #ifndef NDEBUG
//DeadCode MS 26Sep00 			{	//Homebase never filled in...
//DeadCode MS 26Sep00  				info_waypointPtr w=ConvertPtrUID(J->wpref);
//DeadCode MS 26Sep00 				if (w->applygroup!=ENABLE_COMPLEX_VAL)
//DeadCode MS 26Sep00 					assert(	w->target.Evaluate()==J->homebase.Evaluate());
//DeadCode MS 26Sep00 			}
//DeadCode MS 26Sep00 #endif
		//NOTE:
			//Coming back from the 3d, the information represented here
			//is not up to date.
			//We need to have recorded the new position, waypoint and strength
			//of each aircraft.
			//This note is repeated in mapcode.cpp
			//
#ifndef NDEBUG
		bobassert (loadedSAGcount<MAX_LOADEDSAG,": Too many sags loaded!");
		loadedSAG[loadedSAGcount++]=J->uniqueID.count;
#endif
		J->bfieldindex=currbfindex;
//		J->uniqueID.sector=loadingmainworld;
		J->uniqueID.changed=FALSE;
//		J->uniqueID.deaded=FALSE;
		J->position.EvalW(J->World);
  //		J->shape=ShapeNum(J->shape.Evaluate());
//		FixupRouteOwner(J->uniqueID.count,J->wpref);
  //		FixupRouteOwner(J->uniqueID.count,J->wpref);
//camp tmp		if (J->inform.Evaluate()==ENABLE_COMPLEX_VAL)
//			MissionEditor->ActiveCampaign.PlayerAcuid = J->uniqueID.count;
		logUID(J);
	}
	else
	{
		int	v3;
		if ((v3=I.nat.Evaluate())==ENABLE_COMPLEX_VAL)
			v3=NAT_RED;//defaultside;
        if (bfdesc)
			if (I.inwing.Evaluate()==ENABLE_COMPLEX_VAL)
				if (v3==NAT_RED)
;//ME 					bfdesc->RAC+=12;
				else
;//ME 					bfdesc->BAC+=12;
			else
				if (v3==NAT_RED)
;//ME 					bfdesc->RAC+=I.inform.Evaluate();
				else
;//ME 					bfdesc->BAC+=I.inform.Evaluate();
	}
}