Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

be_aas_optimize.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Functions

void AAS_Optimize (void)


Function Documentation

void AAS_Optimize void   ) 
 

Definition at line 280 of file be_aas_optimize.c.

References AAS_OptimizeAlloc(), AAS_OptimizeArea(), AAS_OptimizeStore(), aasworld, abs(), botimport, aas_reachability_s::edgenum, optimized_s::edgeoptimizeindex, aas_reachability_s::facenum, optimized_s::faceoptimizeindex, i, aas_s::numareas, optimized_t, PRT_MESSAGE, aas_s::reachability, aas_s::reachabilitysize, sign, and aas_reachability_s::traveltype.

Referenced by AAS_ContinueInit(), and main().

00281 {
00282     int i, sign;
00283     optimized_t optimized;
00284 
00285     AAS_OptimizeAlloc(&optimized);
00286     for (i = 1; i < aasworld.numareas; i++)
00287     {
00288         AAS_OptimizeArea(&optimized, i);
00289     } //end for
00290     //reset the reachability face pointers
00291     for (i = 0; i < aasworld.reachabilitysize; i++)
00292     {
00293         //NOTE: for TRAVEL_ELEVATOR the facenum is the model number of
00294         //      the elevator
00295         if ((aasworld.reachability[i].traveltype & TRAVELTYPE_MASK) == TRAVEL_ELEVATOR) continue;
00296         //NOTE: for TRAVEL_JUMPPAD the facenum is the Z velocity and the edgenum is the hor velocity
00297         if ((aasworld.reachability[i].traveltype & TRAVELTYPE_MASK) == TRAVEL_JUMPPAD) continue;
00298         //NOTE: for TRAVEL_FUNCBOB the facenum and edgenum contain other coded information
00299         if ((aasworld.reachability[i].traveltype & TRAVELTYPE_MASK) == TRAVEL_FUNCBOB) continue;
00300         //
00301         sign = aasworld.reachability[i].facenum;
00302         aasworld.reachability[i].facenum = optimized.faceoptimizeindex[abs(aasworld.reachability[i].facenum)];
00303         if (sign < 0) aasworld.reachability[i].facenum = -aasworld.reachability[i].facenum;
00304         sign = aasworld.reachability[i].edgenum;
00305         aasworld.reachability[i].edgenum = optimized.edgeoptimizeindex[abs(aasworld.reachability[i].edgenum)];
00306         if (sign < 0) aasworld.reachability[i].edgenum = -aasworld.reachability[i].edgenum;
00307     } //end for
00308     //store the optimized AAS data into aasworld
00309     AAS_OptimizeStore(&optimized);
00310     //print some nice stuff :)
00311     botimport.Print(PRT_MESSAGE, "AAS data optimized.\n");
00312 } //end of the function AAS_Optimize

Here is the call graph for this function:


Generated on Thu Aug 25 12:39:40 2005 for Quake III Arena by  doxygen 1.3.9.1