コード例 #1
0
ファイル: extforce.c プロジェクト: DUANISTON/forsaken
/*===================================================================
	Procedure	:	Display External Forces
	Input		:	u_int16_t	Group
	Output		:	Nothing
===================================================================*/
void DisplayExternalForcesInGroup( u_int16_t Group )
{
	EXTERNALFORCE * EFpnt;

	if( !ShowEFZones ) return;

	EFpnt = ExternalForcesGroupLink[Group];
	
	while( EFpnt )
	{
		if( EFpnt->Status == EXTERNALFORCEACTIVE )
		{
			switch( EFpnt->ForceType )
			{
				case EXTERNALFORCETYPE_Shield:
				case EXTERNALFORCETYPE_Shake:
					break;
				case EXTERNALFORCETYPE_Move:
					DisplayZoneDirection( &EFpnt->Origin, &EFpnt->Dir, Group );
					break;
			}

			if( EFpnt->Type == ZONE_Sphere )
			{
				DisplaySphereZone( &EFpnt->Pos, EFpnt->half_size.x, Group, 0, 64, 0, 128 );
			}
			else
			{
				DisplayTriggerZone( EFpnt->Zone, EFpnt->num_sides, Group, 0, 64, 0, 128 );
			}
		}
		else
		{
			if( EFpnt->Type == ZONE_Sphere )
			{
				DisplaySphereZone( &EFpnt->Pos, EFpnt->half_size.x, Group, 0, 64, 0, 128 );
			}
			else
			{
				DisplayTriggerZone( EFpnt->Zone, EFpnt->num_sides, Group, 0, 64, 0, 128 );
			}
		}
		EFpnt = EFpnt->NextInGroup;
	}
}
コード例 #2
0
ファイル: teleport.c プロジェクト: DUANISTON/forsaken
/*===================================================================
	Procedure	:	Display Teleports in group
	Input		:	u_int16_t	Group
	Output		:	Nothing
===================================================================*/
void DisplayTeleportsInGroup( u_int16_t Group )
{
	TELEPORT * TPpnt;

	if( !ShowTeleports ) return;

	TPpnt = TeleportsGroupLink[Group];
	
	while( TPpnt )
	{
		if( TPpnt->Status == TELEPORTACTIVE )
		{
			if( TPpnt->zone_type == ZONE_Sphere )
			{
				DisplaySphereZone( &TPpnt->Pos, TPpnt->half_size.x, Group, 0, 64, 0, 128 );
			}
			else
			{
				DisplayTriggerZone( TPpnt->Zone, TPpnt->num_sides, Group, 0, 64, 0, 128 );
			}
		}
		else
		{
			if( TPpnt->zone_type == ZONE_Sphere )
			{
				DisplaySphereZone( &TPpnt->Pos, TPpnt->half_size.x, Group, 16, 16, 16, 128 );
			}
			else
			{
				DisplayTriggerZone( TPpnt->Zone, TPpnt->num_sides, Group, 16, 16, 16, 128 );
			}
		}
		DisplayDirAndUp( &TPpnt->Pos, &TPpnt->Dir, &TPpnt->Up, TPpnt->Group );

		TPpnt = TPpnt->NextInGroup;
	}
}
コード例 #3
0
ファイル: trigarea.c プロジェクト: ptitSeb/forsaken
/*===================================================================
 	Procedure	:		Display all trigger areas in group
	Input		:		u_int16_t	Group
	Output		:		Nothing
===================================================================*/
void DispGroupTriggerAreas( u_int16_t Group )
{
	TRIGGER_AREA * Area;

	if( !ShowTrigZones ) return;

	Area = GroupTriggerArea_player[Group];
	while( Area )
	{
		if( Area->state == TRIGGER_AREA_STATE_On )
		{
			if( Area->type == ZONE_Sphere )
			{
				DisplaySphereZone( &Area->pos, Area->half_size.x, Group, 0, 64, 0, 128 );
			}
			else
			{
				DisplayTriggerZone( Area->Zone, Area->num_sides, Group, 0, 64, 0 ,128 );
			}
		}
		else
		{
			if( Area->type == ZONE_Sphere )
			{
				DisplaySphereZone( &Area->pos, Area->half_size.x, Group, 64, 0, 64, 128 );
			}
			else
			{
				DisplayTriggerZone( Area->Zone, Area->num_sides, Group, 64, 0, 64 ,128 );
			}
		}
		Area = Area->NextSameGroup_player;
	}

	Area = GroupTriggerArea_player_shoots[Group];
	while( Area )
	{
		if( Area->state == TRIGGER_AREA_STATE_On )
		{
			if( Area->type == ZONE_Sphere )
			{
				DisplaySphereZone( &Area->pos, Area->half_size.x, Group, 0, 128, 0, 128 );
			}
			else
			{
				DisplayTriggerZone( Area->Zone, Area->num_sides, Group, 0, 128, 0 ,128 );
			}
		}
		else
		{
			if( Area->type == ZONE_Sphere )
			{
				DisplaySphereZone( &Area->pos, Area->half_size.x, Group, 64, 0, 64, 128 );
			}
			else
			{
				DisplayTriggerZone( Area->Zone, Area->num_sides, Group, 64, 0, 64 ,128 );
			}
		}
		Area = Area->NextSameGroup_player;
	}

	Area = GroupTriggerArea_enemy[Group];
	while( Area )
	{
		if( Area->state == TRIGGER_AREA_STATE_On )
		{
			if( Area->type == ZONE_Sphere )
			{
				DisplaySphereZone( &Area->pos, Area->half_size.x, Group, 0, 64, 0, 128 );
			}
			else
			{
				DisplayTriggerZone( Area->Zone, Area->num_sides, Group, 0, 64, 0, 128 );
			}
		}
		else
		{
			if( Area->type == ZONE_Sphere )
			{
				DisplaySphereZone( &Area->pos, Area->half_size.x, Group, 64, 0, 64, 128 );
			}
			else
			{
				DisplayTriggerZone( Area->Zone, Area->num_sides, Group, 64, 0, 64 ,128 );
			}
		}
		Area = Area->NextSameGroup_player;
	}

	Area = GroupTriggerArea_enemy_shoots[Group];
	while( Area )
	{
		if( Area->state == TRIGGER_AREA_STATE_On )
		{
			if( Area->type == ZONE_Sphere )
			{
				DisplaySphereZone( &Area->pos, Area->half_size.x, Group, 128, 0, 0, 128 );
			}
			else
			{
				DisplayTriggerZone( Area->Zone, Area->num_sides, Group, 128, 0, 0 ,128 );
			}
		}
		else
		{
			if( Area->type == ZONE_Sphere )
			{
				DisplaySphereZone( &Area->pos, Area->half_size.x, Group, 64, 0, 64, 128 );
			}
			else
			{
				DisplayTriggerZone( Area->Zone, Area->num_sides, Group, 64, 0, 64 ,128 );
			}
		}
		Area = Area->NextSameGroup_player;
	}
}