be_aas_route.h 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /*
  2. ===========================================================================
  3. Copyright (C) 1999-2005 Id Software, Inc.
  4. This file is part of Quake III Arena source code.
  5. Quake III Arena source code is free software; you can redistribute it
  6. and/or modify it under the terms of the GNU General Public License as
  7. published by the Free Software Foundation; either version 2 of the License,
  8. or (at your option) any later version.
  9. Quake III Arena source code is distributed in the hope that it will be
  10. useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with Foobar; if not, write to the Free Software
  15. Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  16. ===========================================================================
  17. */
  18. /*****************************************************************************
  19. * name: be_aas_route.h
  20. *
  21. * desc: AAS
  22. *
  23. * $Archive: /source/code/botlib/be_aas_route.h $
  24. *
  25. *****************************************************************************/
  26. #ifdef AASINTERN
  27. //initialize the AAS routing
  28. void AAS_InitRouting(void);
  29. //free the AAS routing caches
  30. void AAS_FreeRoutingCaches(void);
  31. //returns the travel time from start to end in the given area
  32. unsigned short int AAS_AreaTravelTime(int areanum, vec3_t start, vec3_t end);
  33. //
  34. void AAS_CreateAllRoutingCache(void);
  35. void AAS_WriteRouteCache(void);
  36. //
  37. void AAS_RoutingInfo(void);
  38. #endif //AASINTERN
  39. //returns the travel flag for the given travel type
  40. int AAS_TravelFlagForType(int traveltype);
  41. //return the travel flag(s) for traveling through this area
  42. int AAS_AreaContentsTravelFlags(int areanum);
  43. //returns the index of the next reachability for the given area
  44. int AAS_NextAreaReachability(int areanum, int reachnum);
  45. //returns the reachability with the given index
  46. void AAS_ReachabilityFromNum(int num, struct aas_reachability_s *reach);
  47. //returns a random goal area and goal origin
  48. int AAS_RandomGoalArea(int areanum, int travelflags, int *goalareanum, vec3_t goalorigin);
  49. //enable or disable an area for routing
  50. int AAS_EnableRoutingArea(int areanum, int enable);
  51. //returns the travel time within the given area from start to end
  52. unsigned short int AAS_AreaTravelTime(int areanum, vec3_t start, vec3_t end);
  53. //returns the travel time from the area to the goal area using the given travel flags
  54. int AAS_AreaTravelTimeToGoalArea(int areanum, vec3_t origin, int goalareanum, int travelflags);
  55. //predict a route up to a stop event
  56. int AAS_PredictRoute(struct aas_predictroute_s *route, int areanum, vec3_t origin,
  57. int goalareanum, int travelflags, int maxareas, int maxtime,
  58. int stopevent, int stopcontents, int stoptfl, int stopareanum);