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

botlib.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.

Data Structures

struct  aas_export_s
struct  ai_export_s
struct  bot_entitystate_s
struct  bot_input_s
struct  botlib_export_s
struct  botlib_import_s
struct  bsp_surface_s
struct  bsp_trace_s
struct  ea_export_s

Defines

#define ACTION_AFFIRMATIVE   0x0100000
#define ACTION_ATTACK   0x0000001
#define ACTION_CROUCH   0x0000080
#define ACTION_DELAYEDJUMP   0x0008000
#define ACTION_FOLLOWME   0x8000000
#define ACTION_GESTURE   0x0020000
#define ACTION_GETFLAG   0x0800000
#define ACTION_GUARDBASE   0x1000000
#define ACTION_JUMP   0x0000010
#define ACTION_MOVEBACK   0x0000800
#define ACTION_MOVEDOWN   0x0000100
#define ACTION_MOVEFORWARD   0x0000200
#define ACTION_MOVELEFT   0x0001000
#define ACTION_MOVERIGHT   0x0002000
#define ACTION_MOVEUP   0x0000020
#define ACTION_NEGATIVE   0x0200000
#define ACTION_PATROL   0x2000000
#define ACTION_RESPAWN   0x0000008
#define ACTION_TALK   0x0010000
#define ACTION_USE   0x0000002
#define ACTION_WALK   0x0080000
#define BLERR_CANNOTLOADICHAT   8
#define BLERR_CANNOTLOADITEMCONFIG   10
#define BLERR_CANNOTLOADITEMWEIGHTS   9
#define BLERR_CANNOTLOADWEAPONCONFIG   12
#define BLERR_CANNOTLOADWEAPONWEIGHTS   11
#define BLERR_CANNOTOPENAASFILE   4
#define BLERR_CANNOTREADAASLUMP   7
#define BLERR_INVALIDENTITYNUMBER   2
#define BLERR_LIBRARYNOTSETUP   1
#define BLERR_NOAASFILE   3
#define BLERR_NOERROR   0
#define BLERR_WRONGAASFILEID   5
#define BLERR_WRONGAASFILEVERSION   6
#define BOTFILESBASEFOLDER   "botfiles"
#define BOTLIB_API_VERSION   2
#define CMS_CHAT   1
#define CMS_NORMAL   0
#define LINECOLOR_BLUE   3
#define LINECOLOR_GREEN   2
#define LINECOLOR_NONE   -1
#define LINECOLOR_ORANGE   5
#define LINECOLOR_RED   1
#define LINECOLOR_YELLOW   4
#define PRT_ERROR   3
#define PRT_EXIT   5
#define PRT_FATAL   4
#define PRT_MESSAGE   1
#define PRT_WARNING   2

Typedefs

typedef aas_export_s aas_export_t
typedef ai_export_s ai_export_t
typedef bot_entitystate_s bot_entitystate_t
typedef bot_input_s bot_input_t
typedef botlib_export_s botlib_export_t
typedef botlib_import_s botlib_import_t
typedef bsp_surface_s bsp_surface_t
typedef bsp_trace_s bsp_trace_t
typedef ea_export_s ea_export_t

Functions

botlib_export_tGetBotLibAPI (int apiVersion, botlib_import_t *import)


Define Documentation

#define ACTION_AFFIRMATIVE   0x0100000
 

Definition at line 97 of file botlib.h.

Referenced by BotGetLongTermGoal(), BotMatch_Suicide(), BotMatch_TaskPreference(), BotVoiceChat_WantOnDefense(), and BotVoiceChat_WantOnOffense().

#define ACTION_ATTACK   0x0000001
 

Definition at line 82 of file botlib.h.

#define ACTION_CROUCH   0x0000080
 

Definition at line 87 of file botlib.h.

#define ACTION_DELAYEDJUMP   0x0008000
 

Definition at line 93 of file botlib.h.

#define ACTION_FOLLOWME   0x8000000
 

Definition at line 102 of file botlib.h.

#define ACTION_GESTURE   0x0020000
 

Definition at line 95 of file botlib.h.

#define ACTION_GETFLAG   0x0800000
 

Definition at line 99 of file botlib.h.

#define ACTION_GUARDBASE   0x1000000
 

Definition at line 100 of file botlib.h.

#define ACTION_JUMP   0x0000010
 

Definition at line 85 of file botlib.h.

#define ACTION_MOVEBACK   0x0000800
 

Definition at line 90 of file botlib.h.

#define ACTION_MOVEDOWN   0x0000100
 

Definition at line 88 of file botlib.h.

#define ACTION_MOVEFORWARD   0x0000200
 

Definition at line 89 of file botlib.h.

#define ACTION_MOVELEFT   0x0001000
 

Definition at line 91 of file botlib.h.

#define ACTION_MOVERIGHT   0x0002000
 

Definition at line 92 of file botlib.h.

#define ACTION_MOVEUP   0x0000020
 

Definition at line 86 of file botlib.h.

#define ACTION_NEGATIVE   0x0200000
 

Definition at line 98 of file botlib.h.

Referenced by BotRefuseOrder().

#define ACTION_PATROL   0x2000000
 

Definition at line 101 of file botlib.h.

#define ACTION_RESPAWN   0x0000008
 

Definition at line 84 of file botlib.h.

Referenced by BotUpdateInput().

#define ACTION_TALK   0x0010000
 

Definition at line 94 of file botlib.h.

#define ACTION_USE   0x0000002
 

Definition at line 83 of file botlib.h.

#define ACTION_WALK   0x0080000
 

Definition at line 96 of file botlib.h.

#define BLERR_CANNOTLOADICHAT   8
 

Definition at line 75 of file botlib.h.

#define BLERR_CANNOTLOADITEMCONFIG   10
 

Definition at line 77 of file botlib.h.

#define BLERR_CANNOTLOADITEMWEIGHTS   9
 

Definition at line 76 of file botlib.h.

#define BLERR_CANNOTLOADWEAPONCONFIG   12
 

Definition at line 79 of file botlib.h.

#define BLERR_CANNOTLOADWEAPONWEIGHTS   11
 

Definition at line 78 of file botlib.h.

#define BLERR_CANNOTOPENAASFILE   4
 

Definition at line 71 of file botlib.h.

#define BLERR_CANNOTREADAASLUMP   7
 

Definition at line 74 of file botlib.h.

#define BLERR_INVALIDENTITYNUMBER   2
 

Definition at line 69 of file botlib.h.

#define BLERR_LIBRARYNOTSETUP   1
 

Definition at line 68 of file botlib.h.

#define BLERR_NOAASFILE   3
 

Definition at line 70 of file botlib.h.

#define BLERR_NOERROR   0
 

Definition at line 67 of file botlib.h.

#define BLERR_WRONGAASFILEID   5
 

Definition at line 72 of file botlib.h.

#define BLERR_WRONGAASFILEVERSION   6
 

Definition at line 73 of file botlib.h.

#define BOTFILESBASEFOLDER   "botfiles"
 

Definition at line 46 of file botlib.h.

Referenced by BotLoadCharacterFromFile(), BotLoadInitialChat(), BotLoadMatchTemplates(), BotLoadRandomStrings(), BotLoadReplyChat(), BotLoadSynonyms(), LoadItemConfig(), LoadWeaponConfig(), and ReadWeightConfig().

#define BOTLIB_API_VERSION   2
 

Definition at line 32 of file botlib.h.

Referenced by GetBotLibAPI(), and SV_BotInitBotLib().

#define CMS_CHAT   1
 

Definition at line 64 of file botlib.h.

Referenced by BotAI(), BotCheckConsoleMessages(), and BotSayTeamOrderAlways().

#define CMS_NORMAL   0
 

Definition at line 63 of file botlib.h.

Referenced by BotAI().

#define LINECOLOR_BLUE   3
 

Definition at line 51 of file botlib.h.

Referenced by AAS_ClientMovementPrediction(), AAS_ShowReachability(), BotExportTest(), and BotTravel_Grapple().

#define LINECOLOR_GREEN   2
 

Definition at line 50 of file botlib.h.

Referenced by BotExportTest().

#define LINECOLOR_NONE   -1
 

Definition at line 48 of file botlib.h.

#define LINECOLOR_ORANGE   5
 

Definition at line 53 of file botlib.h.

#define LINECOLOR_RED   1
 

Definition at line 49 of file botlib.h.

Referenced by AAS_BestReachableArea(), AAS_ClientMovementPrediction(), AAS_ShowBoundingBox(), AAS_ShowFace(), and BotExportTest().

#define LINECOLOR_YELLOW   4
 

Definition at line 52 of file botlib.h.

Referenced by AAS_ShowReachability(), and BotExportTest().

#define PRT_ERROR   3
 

Definition at line 58 of file botlib.h.

Referenced by AAS_AASLinkEntity(), AAS_AreaCluster(), AAS_AreaInfo(), AAS_AreaPresenceType(), AAS_AreaRouteToGoalArea(), AAS_BestReachableArea(), AAS_ContinueInit(), AAS_EnableRoutingArea(), AAS_IndexFromString(), AAS_NextAreaReachability(), AAS_PointAreaNum(), AAS_Reachability_Elevator(), AAS_Reachability_FuncBobbing(), AAS_Reachability_Teleport(), AAS_ShowArea(), AAS_ShowAreaPolygons(), AAS_ShowFace(), AAS_ShowFacePolygon(), AAS_StringFromIndex(), AAS_TraceAreas(), AAS_TraceClientBBox(), AAS_WriteAASFile(), BotAI_Print(), BotCheckEvents(), BotDeathmatchAI(), BotExpandChatMessage(), BotGetActivateGoal(), BotImport_Print(), BotInitLevelItems(), BotLibSetup(), BotLoadCharacterFromFile(), BotLoadInitialChat(), BotLoadMatchTemplates(), BotLoadRandomStrings(), BotLoadReplyChat(), BotLoadSynonyms(), BotPushGoal(), BotQueueConsoleMessage(), BotReachabilityTime(), BotTravel_Grapple(), BotValidWeaponNumber(), Characteristic_BFloat(), Characteristic_BInteger(), Characteristic_Float(), Characteristic_Integer(), Characteristic_String(), CheckCharacteristicIndex(), ClientName(), ClientSkin(), GetBotLibAPI(), InterbreedFuzzySeperator_r(), InterbreedWeightConfigs(), LoadItemConfig(), LoadWeaponConfig(), Log_Close(), Log_Open(), PC_CheckOpenSourceHandles(), ReadWeightConfig(), ScriptError(), SourceError(), ValidClientNumber(), and ValidEntityNumber().

#define PRT_EXIT   5
 

Definition at line 60 of file botlib.h.

Referenced by BotAI_Print(), and BotImport_Print().

#define PRT_FATAL   4
 

Definition at line 59 of file botlib.h.

Referenced by AAS_AllocAASLink(), AAS_EntityInfo(), AAS_EntityModelindex(), AAS_EntityModelNum(), AAS_EntityOrigin(), AAS_EntitySize(), AAS_EntityType(), AAS_Error(), AAS_NextAreaReachability(), AAS_PresenceTypeBoundingBox(), AllocLevelItem(), BotAI(), BotAI_Print(), BotAISetupClient(), BotCharacterFromHandle(), BotChatStateFromHandle(), BotCheckChatMessageIntegrety(), BotDumpNodeSwitches(), BotExpandChatMessage(), BotFreeCharacter2(), BotFreeChatState(), BotFreeGoalState(), BotFreeMoveState(), BotFreeWeaponState(), BotGoalStateFromHandle(), BotImport_Print(), BotLoadChatFile(), BotLoadItemWeights(), BotLoadWeaponWeights(), BotMatchVariable(), BotMoveStateFromHandle(), BotMoveToGoal(), BotSetupGoalAI(), BotSetupWeaponAI(), and BotWeaponStateFromHandle().

#define PRT_MESSAGE   1
 

Definition at line 56 of file botlib.h.

Referenced by AAS_AlternativeRouteGoals(), AAS_BestReachableArea(), AAS_BestReachableFromJumpPadArea(), AAS_BSPEntityInRange(), AAS_CalculateAreaTravelTimes(), AAS_ClientMovementPrediction(), AAS_ContinueInit(), AAS_ContinueInitReachability(), AAS_CountForcedClusterPortals(), AAS_CreateAllRoutingCache(), AAS_CreateReversedReachability(), AAS_FindPossiblePortals(), AAS_GetJumpPadInfo(), AAS_InitClustering(), AAS_InsideFace(), AAS_LoadAASFile(), AAS_LoadFiles(), AAS_Optimize(), AAS_ParseBSPEntities(), AAS_PointAreaNum(), AAS_PrintTravelType(), AAS_Reachability_JumpPad(), AAS_Reachability_Teleport(), AAS_RoutingInfo(), AAS_SetInitialized(), AAS_SetWeaponJumpAreaFlags(), AAS_ShowReachableAreas(), AAS_Shutdown(), AAS_TestMovementPrediction(), AAS_UpdateEntity(), AAS_WriteAASFile(), AAS_WriteRouteCache(), AINode_Battle_Fight(), AINode_Battle_Retreat(), AINode_Seek_ActivateEntity(), BotAI_Print(), BotAIBlocked(), BotCheckConsoleMessages(), BotDumpNodeSwitches(), BotEnterChat(), BotExportTest(), BotFuncBobStartEnd(), BotGetItemLongTermGoal(), BotGetReachabilityToGoal(), BotGPSToPosition(), BotImport_Print(), BotInitialChat(), BotInitInfoEntities(), BotInitLevelItems(), BotLoadCachedCharacter(), BotLoadCharacter(), BotLoadInitialChat(), BotLoadMatchTemplates(), BotLoadRandomStrings(), BotLoadReplyChat(), BotLoadSynonyms(), BotMatchMessage(), BotMoveToGoal(), BotNumInitialChats(), BotOnMover(), BotPrintReplyChatKeys(), BotRecordNodeSwitch(), BotReplyChat(), BotReportStatus(), BotResetGrapple(), BotSetBrushModelTypes(), BotSetupChatAI(), BotTeamplayReport(), BotTestAAS(), BotTravel_Elevator(), BotTravel_FuncBobbing(), BotTravel_Grapple(), Export_BotLibLoadMap(), Export_BotLibSetup(), LoadItemConfig(), LoadWeaponConfig(), Log_Close(), Log_Open(), MoverBottomCenter(), MoverDown(), and ReadWeightConfig().

#define PRT_WARNING   2
 

Definition at line 57 of file botlib.h.

Referenced by AAS_CreateReversedReachability(), AAS_LoadAASLump(), AAS_Reachability_Teleport(), BotAI_Print(), BotConstructChatMessage(), BotCreateWayPoint(), BotImport_Print(), BotLoadCachedCharacter(), BotSetupAlternativeRouteGoals(), BotSetupDeathmatchAI(), GeneticParentsAndChildSelection(), LoadItemConfig(), LoadWeaponConfig(), ScriptWarning(), and SourceWarning().


Typedef Documentation

typedef struct aas_export_s aas_export_t
 

Referenced by Init_AAS_Export().

typedef struct ai_export_s ai_export_t
 

Referenced by Init_AI_Export().

typedef struct bot_entitystate_s bot_entitystate_t
 

Referenced by AAS_UpdateEntity(), BotAIStartFrame(), and Export_BotLibUpdateEntity().

typedef struct bot_input_s bot_input_t
 

Referenced by BotInputToUserCommand(), BotUpdateInput(), EA_Action(), EA_Attack(), EA_Crouch(), EA_DelayedJump(), EA_Gesture(), EA_GetInput(), EA_Jump(), EA_Move(), EA_MoveBack(), EA_MoveDown(), EA_MoveForward(), EA_MoveLeft(), EA_MoveRight(), EA_MoveUp(), EA_ResetInput(), EA_Respawn(), EA_SelectWeapon(), EA_Setup(), EA_Talk(), EA_Use(), EA_View(), and EA_Walk().

typedef struct botlib_export_s botlib_export_t
 

Referenced by GetBotLibAPI(), and SV_BotInitBotLib().

typedef struct botlib_import_s botlib_import_t
 

Referenced by GetBotLibAPI(), and SV_BotInitBotLib().

typedef struct bsp_surface_s bsp_surface_t
 

typedef struct bsp_trace_s bsp_trace_t
 

Referenced by AAS_AreaEntityCollision(), AAS_DropToFloor(), AAS_EntityCollision(), AAS_Reachability_Grapple(), AAS_Trace(), AAS_WeaponJumpZVelocity(), AINode_Seek_ActivateEntity(), BotAI_Trace(), BotAimAtEnemy(), BotCheckAttack(), BotCheckBlocked(), BotClearPath(), BotEntityVisible(), BotFindEnemy(), BotFuncButtonActivateGoal(), BotGetAirGoal(), BotImport_EntityTrace(), BotImport_Trace(), BotInitLevelItems(), BotItemGoalInVisButNotVisible(), BotNearestVisibleItem(), BotOnMover(), BotOnTopOfEntity(), BotReachabilityArea(), BotRoamGoal(), BotTravel_Grapple(), BotValidChatPosition(), and BotVisible().

typedef struct ea_export_s ea_export_t
 

Referenced by Init_EA_Export().


Function Documentation

botlib_export_t* GetBotLibAPI int  apiVersion,
botlib_import_t import
 

Definition at line 848 of file be_interface.c.

References botlib_export_s::aas, botlib_export_s::ai, assert, be_botlib_export, botimport, BOTLIB_API_VERSION, botlib_export_t, botlib_import_t, botlib_export_s::BotLibLoadMap, botlib_export_s::BotLibSetup, botlib_export_s::BotLibShutdown, botlib_export_s::BotLibStartFrame, botlib_export_s::BotLibUpdateEntity, botlib_export_s::BotLibVarGet, botlib_export_s::BotLibVarSet, Com_Memset(), botlib_export_s::ea, Init_AAS_Export(), Init_AI_Export(), Init_EA_Export(), botlib_export_s::PC_AddGlobalDefine, botlib_export_s::PC_FreeSourceHandle, botlib_export_s::PC_LoadSourceHandle, botlib_export_s::PC_ReadTokenHandle, botlib_export_s::PC_SourceFileAndLine, PRT_ERROR, and botlib_export_s::Test.

Referenced by SV_BotInitBotLib().

00848                                                                        {
00849     assert(import);   // bk001129 - this wasn't set for baseq3/
00850   botimport = *import;
00851   assert(botimport.Print);   // bk001129 - pars pro toto
00852 
00853     Com_Memset( &be_botlib_export, 0, sizeof( be_botlib_export ) );
00854 
00855     if ( apiVersion != BOTLIB_API_VERSION ) {
00856         botimport.Print( PRT_ERROR, "Mismatched BOTLIB_API_VERSION: expected %i, got %i\n", BOTLIB_API_VERSION, apiVersion );
00857         return NULL;
00858     }
00859 
00860     Init_AAS_Export(&be_botlib_export.aas);
00861     Init_EA_Export(&be_botlib_export.ea);
00862     Init_AI_Export(&be_botlib_export.ai);
00863 
00864     be_botlib_export.BotLibSetup = Export_BotLibSetup;
00865     be_botlib_export.BotLibShutdown = Export_BotLibShutdown;
00866     be_botlib_export.BotLibVarSet = Export_BotLibVarSet;
00867     be_botlib_export.BotLibVarGet = Export_BotLibVarGet;
00868 
00869     be_botlib_export.PC_AddGlobalDefine = PC_AddGlobalDefine;
00870     be_botlib_export.PC_LoadSourceHandle = PC_LoadSourceHandle;
00871     be_botlib_export.PC_FreeSourceHandle = PC_FreeSourceHandle;
00872     be_botlib_export.PC_ReadTokenHandle = PC_ReadTokenHandle;
00873     be_botlib_export.PC_SourceFileAndLine = PC_SourceFileAndLine;
00874 
00875     be_botlib_export.BotLibStartFrame = Export_BotLibStartFrame;
00876     be_botlib_export.BotLibLoadMap = Export_BotLibLoadMap;
00877     be_botlib_export.BotLibUpdateEntity = Export_BotLibUpdateEntity;
00878     be_botlib_export.Test = BotExportTest;
00879 
00880     return &be_botlib_export;
00881 }

Here is the call graph for this function:


Generated on Thu Aug 25 13:47:04 2005 for Quake III Arena by  doxygen 1.3.9.1