29 #include "../../../idlib/precompiled.h"
47 for ( portalNum = 1; portalNum <
file->
portals.Num(); portalNum++ ) {
48 if (
file->
portals[portalNum].areaNum == areaNum ) {
61 if ( portal->
clusters[0] == clusterNum ) {
64 if ( portal->
clusters[1] == clusterNum ) {
84 file->
areas[areaNum].cluster = -portalNum;
107 if ( area->
cluster == clusterNum ) {
111 common->
Error(
"cluster %d touched cluster %d at area %d\r\n", clusterNum,
file->
areas[areaNum].cluster, areaNum );
125 for ( i = 0; i < area->
numFaces; i++ ) {
128 if ( face->
areas[0] == areaNum ) {
129 if ( face->
areas[1] ) {
136 if ( face->
areas[0] ) {
146 for ( reach =
file->
areas[areaNum].reach; reach; reach = reach->
next ) {
170 for ( i = 1; i <
file->
areas.Num(); i++ ) {
190 for ( i = 1; i <
file->
areas.Num(); i++ ) {
192 if (
file->
areas[i].cluster != clusterNum ) {
213 if ( portal->
clusters[0] == clusterNum ) {
223 for ( i = 1; i <
file->
areas.Num(); i++ ) {
225 if (
file->
areas[i].cluster != clusterNum ) {
245 if ( portal->
clusters[0] == clusterNum ) {
265 for ( i = 1; i <
file->
areas.Num(); i++ ) {
310 for ( i = 1; i <
file->
areas.Num(); i++ ) {
344 for ( reach = area->
reach; reach; reach = reach->
next ) {
384 for ( reach = area->
reach; reach; reach = reach->
next ) {
417 int i,
j, k, face1Num, face2Num, otherAreaNum, numOpenAreas, numInvalidPortals;
420 numInvalidPortals = 0;
421 for ( i = 0; i <
file->
areas.Num(); i++ ) {
427 for ( j = 0; j <
file->
areas[
i].numFaces; j++ ) {
430 otherAreaNum = face1->
areas[ face1Num < 0 ];
432 if ( !otherAreaNum ) {
436 for ( k = 0; k <
j; k++ ) {
439 if ( otherAreaNum == face2->
areas[ face2Num < 0 ] ) {
447 if ( !(
file->
areas[otherAreaNum].contents & AREACONTENTS_CLUSTERPORTAL ) ) {
452 if ( numOpenAreas <= 1 ) {
458 common->
Printf(
"\r%6d invalid portals removed\n", numInvalidPortals );
531 for ( i = 0; i < file->
areas.Num(); i++ ) {
539 for ( i = 0; i < file->
areas.Num(); i++ ) {
543 file->
areas[
i].clusterAreaNum = numAreas++;
550 for ( i = 0; i < file->
clusters.Num(); i++ ) {
551 common->
Printf(
"%6d reachable areas in cluster %d\n", file->
clusters[i].numReachableAreas, i );
unsigned short maxAreaTravelTime
idReachability * rev_next
void RemoveAreaClusterNumbers(void)
idList< aasCluster_t > clusters
#define AREA_REACHABLE_FLY
idList< aasIndex_t > faceIndex
bool FloodClusterAreas_r(int areaNum, int clusterNum)
idList< aasFace_t > faces
idList< aasPortal_t > portals
bool BuildSingleCluster(idAASFileLocal *file)
void DeleteClusters(void)
virtual void Printf(const char *fmt,...) id_attribute((format(printf
bool Build(idAASFileLocal *file)
void RemoveInvalidPortals(void)
int Append(const type &obj)
idReachability * rev_reach
#define AREA_REACHABLE_WALK
idList< aasArea_t > areas
idList< aasIndex_t > portalIndex
bool UpdatePortal(int areaNum, int clusterNum)
void ReportRoutingEfficiency(void) const
void NumberClusterAreas(int clusterNum)
virtual void Error(const char *fmt,...) id_attribute((format(printf
#define AREACONTENTS_CLUSTERPORTAL