UFO: Alien Invasion
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
defines.h File Reference

Defined CONSTANTS (Macros are elsewhere) More...

Go to the source code of this file.

Macros

#define PLANESIDE_EPSILON   0.001
 
#define MAX_ACTIVETEAM   12
 
#define LEAFNODE   -1
 
#define PLANENUM_LEAF   -1
 
#define TEXINFO_NODE   -1 /* side is already on a node */
 
#define MAXEDGES   20
 
#define TEAM_DEFAULT   1
 
#define DEBUG_ALL   0x07FE
 
#define DEBUG_SHARED   0x02
 
#define DEBUG_ENGINE   0x04
 
#define DEBUG_SYSTEM   0x08
 
#define DEBUG_COMMANDS   0x10
 
#define DEBUG_CLIENT   0x20
 
#define DEBUG_SERVER   0x40
 
#define DEBUG_GAME   0x80
 
#define DEBUG_RENDERER   0x0100
 
#define DEBUG_SOUND   0x0200
 
#define DEBUG_EVENTSYS   0x0400
 
#define DEBUG_ROUTING   0x1000
 
#define NONE   -1
 
#define NONE_AMMO   0
 
#define TU_CROUCH   3
 
#define TU_TURN   1
 
#define TU_MOVE_STRAIGHT   2
 
#define TU_MOVE_DIAGONAL   3
 
#define TU_MOVE_CLIMB   4
 
#define TU_MOVE_FALL   0
 
#define TU_DOOR_ACTION   1
 
#define TU_CROUCH_MOVING_FACTOR   1.5
 
#define TU_FLYING_MOVING_FACTOR   2
 
#define MAX_ROUTE_TUS   (ROUTING_NOT_REACHABLE - 1)
 
#define MAX_ROUTE   (MAX_ROUTE_TUS / TU_MOVE_STRAIGHT + 1)
 
#define STATE_OPENED   0
 
#define STATE_CLOSED   1
 
#define MAX_STRING_CHARS   1024 /* max length of a string passed to Cmd_TokenizeString */
 
#define MAX_STRING_TOKENS   80 /* max tokens resulting from Cmd_TokenizeString */
 
#define MAX_TEXPATH   32
 
#define MAX_TEAMS   8
 
#define MAX_EDICTS   1024 /* must change protocol to increase more */
 
#define MAX_MODELS   256 /* these are sent over the net as bytes */
 
#define INITIAL_HP   100
 
#define PRINT_NONE   -1 /* suppress printing */
 
#define PRINT_CHAT   0 /* chat messages */
 
#define PRINT_HUD   1 /* translated hud strings */
 
#define PRINT_CONSOLE   2 /* critical messages goes to the game console */
 
#define ERR_FATAL   0 /* exit the entire game with a popup window */
 
#define ERR_DROP   1 /* print to console and disconnect from game */
 
#define ERR_DISCONNECT   2 /* don't kill server */
 
#define GROUND_DELTA   28
 
#define SELECTION_DELTA   30
 
#define UNIT_SIZE   32
 
#define UNIT_HEIGHT   64
 
#define PLAYER_HEIGHT   (UNIT_HEIGHT - 16)
 
#define QUANT   4
 
#define WALL_SIZE   5
 
#define MAX_MAP_MODELS   1024
 
#define MAX_MAP_BRUSHES   16384
 
#define MAX_MAP_ENTITIES   2048
 
#define MAX_MAP_ENTSTRING   0x40000
 
#define MAX_MAP_TEXINFO   16384
 
#define MAX_MAP_PLANES   65536
 
#define MAX_MAP_NODES   65536
 
#define MAX_MAP_BRUSHSIDES   65536
 
#define MAX_MAP_LEAFS   65536
 
#define MAX_MAP_VERTS   65536
 
#define MAX_MAP_FACES   65536
 
#define MAX_MAP_LEAFBRUSHES   65536
 
#define MAX_MAP_EDGES   128000
 
#define MAX_MAP_SURFEDGES   256000
 
#define MAX_MAP_LIGHTING   0x1000000
 
#define MAX_MAP_ROUTING   0x100000
 
#define MAX_LEAFS   1024
 
#define MAX_MOD_KNOWN   512
 
#define MAX_KEY   32
 
#define MAX_VALUE   1024
 
#define LUMP_ENTITIES   0
 
#define LUMP_PLANES   1
 
#define LUMP_VERTEXES   2
 
#define LUMP_ROUTING   3
 
#define LUMP_NODES   4
 
#define LUMP_TEXINFO   5
 
#define LUMP_FACES   6
 
#define LUMP_LIGHTING_NIGHT   7
 
#define LUMP_LIGHTING_DAY   8
 
#define LUMP_LEAFS   9
 
#define LUMP_LEAFBRUSHES   10
 
#define LUMP_EDGES   11
 
#define LUMP_SURFEDGES   12
 
#define LUMP_MODELS   13
 
#define LUMP_BRUSHES   14
 
#define LUMP_BRUSHSIDES   15
 
#define LUMP_NORMALS   16
 
#define HEADER_LUMPS   17
 
#define SIDE_FRONT   0
 
#define SIDE_ON   2
 
#define SIDE_BACK   1
 
#define PLANE_X   0
 
#define PLANE_Y   1
 
#define PLANE_Z   2
 
#define PLANE_ANYX   3
 
#define PLANE_ANYY   4
 
#define PLANE_ANYZ   5
 
#define PLANE_NONE   6
 
#define AXIAL(p)   ((p)->type < PLANE_ANYX)
 
#define ANGLE_UP   -1
 
#define ANGLE_DOWN   -2
 
#define CONTENTS_SOLID   0x0001
 
#define CONTENTS_WINDOW   0x0002
 
#define CONTENTS_LADDER   0x0004
 
#define CONTENTS_WATER   0x0020
 
#define LAST_VISIBLE_CONTENTS   0x80
 
#define CONTENTS_LEVEL_ALL   0xFF00
 
#define CONTENTS_LEVEL_1   0x0100
 
#define CONTENTS_LEVEL_2   0x0200
 
#define CONTENTS_LEVEL_3   0x0400
 
#define CONTENTS_LEVEL_4   0x0800
 
#define CONTENTS_LEVEL_5   0x1000
 
#define CONTENTS_LEVEL_6   0x2000
 
#define CONTENTS_LEVEL_7   0x4000
 
#define CONTENTS_LEVEL_8   0x8000
 
#define CONTENTS_ACTORCLIP   0x00010000
 
#define CONTENTS_PASSABLE   0x00020000
 
#define CONTENTS_TERRAIN   0x00040000
 
#define CONTENTS_LIGHTCLIP   0x00080000
 
#define CONTENTS_ACTOR   0x00800000
 
#define CONTENTS_ORIGIN   0x01000000
 
#define CONTENTS_WEAPONCLIP   0x02000000
 
#define CONTENTS_DEADACTOR   0x04000000
 
#define CONTENTS_DETAIL   0x08000000
 
#define CONTENTS_TRANSLUCENT   0x10000000
 
#define SURF_LIGHT   0x00000001
 
#define SURF_SLICK   0x00000002
 
#define SURF_WARP   0x00000008
 
#define SURF_BLEND33   0x00000010
 
#define SURF_BLEND66   0x00000020
 
#define SURF_FLOWING   0x00000040
 
#define SURF_NODRAW   0x00000080
 
#define SURF_HINT   0x00000100
 
#define SURF_SKIP   0x00000200
 
#define SURF_PHONG   0x00000400
 
#define SURF_BURN   0x00000800
 
#define SURF_FOOTSTEP   0x00001000
 
#define SURF_ORIGIN   0x00002000
 
#define SURF_FOLIAGE   0x00004000
 
#define SURF_ALPHATEST   0x02000000
 
#define MASK_ALL   (-1)
 
#define MASK_SOLID   (CONTENTS_SOLID | CONTENTS_WINDOW)
 
#define MASK_IMPASSABLE   (MASK_SOLID | CONTENTS_ACTORCLIP)
 
#define MASK_PASSABLE   (CONTENTS_PASSABLE | CONTENTS_WATER)
 
#define MASK_SHOT   (CONTENTS_SOLID | CONTENTS_ACTOR | CONTENTS_WEAPONCLIP | CONTENTS_WINDOW)
 
#define MASK_SMOKE_AND_FIRE   (MASK_SOLID | CONTENTS_WATER | CONTENTS_WEAPONCLIP)
 
#define MASK_VISIBILILITY   (CONTENTS_SOLID | CONTENTS_WATER)
 
#define MASK_CLIP   (CONTENTS_ACTORCLIP | CONTENTS_WEAPONCLIP | CONTENTS_LIGHTCLIP)
 
#define MASK_NO_LIGHTCLIP   (MASK_ALL &~(CONTENTS_LEVEL_ALL | CONTENTS_LIGHTCLIP))
 
#define ROUTING_NOT_REACHABLE   0xFF
 
#define ROUTING_UNREACHABLE   -1
 
#define MAX_WORLD_WIDTH   4096
 -MAX_WORLD_WIDTH up tp +MAX_WORLD_WIDTH More...
 
#define GRID_WIDTH   (MAX_WORLD_WIDTH / UNIT_SIZE)
 absolute max - -GRID_WIDTH up tp +GRID_WIDTH More...
 
#define PATHFINDING_WIDTH   (GRID_WIDTH * 2)
 absolute max More...
 
#define PATHFINDING_HEIGHT   8
 15 max, adjusting above 8 will require a rewrite to the DV code More...
 
#define CELL_HEIGHT   (UNIT_HEIGHT / QUANT)
 A cell's height in QUANT sized units. More...
 
#define ACTOR_MAX_HEIGHT   (PLAYER_HEIGHT / QUANT)
 The tallest actor's height in QUANT sized units. More...
 
#define ACTOR_SIZE_INVALID   0
 
#define ACTOR_SIZE_NORMAL   1
 
#define ACTOR_SIZE_2x2   2
 
#define ACTOR_SIZE_3x3   3
 
#define ACTOR_MAX_SIZE   (ACTOR_SIZE_2x2)
 
#define PATHFINDING_MAX_FALL   16
 
#define PATHFINDING_LEGROOMHEIGHT   4
 
#define PATHFINDING_MIN_STEPUP   2
 
#define PATHFINDING_MAX_STEPUP   4
 
#define PATHFINDING_NO_STEPUP   (2 * CELL_HEIGHT)
 
#define PATHFINDING_MIN_OPENING   6
 
#define PATHFINDING_MICROSTEP_SIZE   4
 The size (in model units) of a microstep. Must be a power of 2 and less than UNIT_SIZE. More...
 
#define PATHFINDING_MICROSTEP_SKIP   2
 The number of microsteps that can be stepped over by an actor. Used to allow an actor to stepup when the floor is not level or consitent. More...
 
#define DIRECTION_CLIMB_UP   8
 
#define DIRECTION_CLIMB_DOWN   9
 
#define DIRECTION_STAND_UP   10
 
#define DIRECTION_CROUCH   11
 
#define DIRECTION_FALL   13
 
#define ACTOR_MAX_STATES   2
 
#define LEVEL_LASTVISIBLE   255
 
#define LEVEL_LIGHTCLIP   256
 
#define LEVEL_LASTLIGHTBLOCKING   256
 
#define LEVEL_WEAPONCLIP   257
 
#define LEVEL_ACTORCLIP   258
 
#define LEVEL_MAX   259
 
#define NUM_REGULAR_MODELS   (LEVEL_ACTORCLIP + 1)
 
#define TL_FLAG_NONE   0x0000
 
#define TL_FLAG_REGULAR_LEVELS   0x00FF
 
#define TL_FLAG_ACTORCLIP   0x0100
 
#define TL_FLAG_WEAPONCLIP   0x0200
 
#define TL_FLAG_ALL   0x0300
 
#define LIGHTMAP_NIGHT   0
 
#define LIGHTMAP_DAY   1
 
#define LIGHTMAP_MAX   2
 
#define PSIDE_FRONT   1
 
#define PSIDE_BACK   2
 
#define PSIDE_BOTH   (PSIDE_FRONT|PSIDE_BACK)
 
#define PSIDE_FACING   4
 
#define MAX_TOKEN_CHARS   256 /* max length of an individual token */
 
#define ON_EPSILON   0.1
 
#define DIST_EPSILON   (0.03125)
 
#define DIST_EPSILON2   (0.0625125) /* DIST_EPSILON * 2 + small bit more */
 
#define MAP_DIST_EPSILON   0.01
 
#define NORMAL_EPSILON   0.00001
 
#define MAX_MAP_SIDES   (MAX_MAP_BRUSHES*6)
 
#define MAX_MAP_TEXTURES   1024
 
#define MAX_MAP_LIGHTMAP   (512 * 512)
 
#define MAP_SIZE_OFFSET   100
 

Detailed Description

Defined CONSTANTS (Macros are elsewhere)

Definition in file defines.h.

Macro Definition Documentation

#define ACTOR_MAX_HEIGHT   (PLAYER_HEIGHT / QUANT)

The tallest actor's height in QUANT sized units.

Definition at line 298 of file defines.h.

Referenced by RT_TraceOnePassage().

#define ACTOR_MAX_STATES   2

Definition at line 338 of file defines.h.

Referenced by Grid_CalcPathing().

#define ACTOR_SIZE_3x3   3

Definition at line 304 of file defines.h.

#define ACTOR_SIZE_INVALID   0
#define ANGLE_DOWN   -2

Definition at line 206 of file defines.h.

Referenced by BuildLights().

#define ANGLE_UP   -1

planes (x & ~1) and (x & ~1) + 1 are always opposites

Definition at line 205 of file defines.h.

Referenced by BuildLights().

#define AXIAL (   p)    ((p)->type < PLANE_ANYX)
#define CONTENTS_ACTOR   0x00800000

should never be on a brush, only in game

Definition at line 247 of file defines.h.

Referenced by CL_ActorAppear().

#define CONTENTS_ACTORCLIP   0x00010000

remaining contents are non-visible, and don't eat brushes

Definition at line 243 of file defines.h.

Referenced by Check_SurfProp(), Check_SurfProps(), CheckFlags(), CheckMixedFaceContents(), CheckTexturesBasedOnFlags(), IsInLevel(), ParseBrush(), and SetImpliedFlags().

#define CONTENTS_DEADACTOR   0x04000000

Definition at line 250 of file defines.h.

Referenced by CL_ActorAppear(), and CL_ActorDie().

#define CONTENTS_DETAIL   0x08000000

brushes to be added after vis leafs also used for debugging local entities

Definition at line 251 of file defines.h.

Referenced by BrushGE(), CheckPropagateParserContentFlags(), LE_AddToScene(), ParseBrush(), and SelectSplitSide().

#define CONTENTS_LADDER   0x0004

Definition at line 225 of file defines.h.

Referenced by Check_SurfProp(), Check_SurfProps(), and SetImpliedFlags().

#define CONTENTS_LEVEL_1   0x0100

Definition at line 233 of file defines.h.

Referenced by Check_CalculateLevelFlagFill().

#define CONTENTS_LEVEL_2   0x0200

Definition at line 234 of file defines.h.

#define CONTENTS_LEVEL_3   0x0400

Definition at line 235 of file defines.h.

#define CONTENTS_LEVEL_4   0x0800

Definition at line 236 of file defines.h.

#define CONTENTS_LEVEL_5   0x1000

Definition at line 237 of file defines.h.

#define CONTENTS_LEVEL_6   0x2000

Definition at line 238 of file defines.h.

#define CONTENTS_LEVEL_7   0x4000

Definition at line 239 of file defines.h.

#define CONTENTS_LEVEL_8   0x8000

Definition at line 240 of file defines.h.

Referenced by Check_CalculateLevelFlagFill().

#define CONTENTS_LEVEL_ALL   0xFF00

Definition at line 232 of file defines.h.

Referenced by Check_LevelForNodraws(), CheckLevelFlags(), and CheckZFighting().

#define CONTENTS_LIGHTCLIP   0x00080000

used for special brushes to cast shade

Definition at line 246 of file defines.h.

Referenced by Check_SurfProp(), Check_SurfProps(), CheckFlags(), CheckTexturesBasedOnFlags(), IsInLevel(), ParseBrush(), and SetImpliedFlags().

#define CONTENTS_ORIGIN   0x01000000
#define CONTENTS_PASSABLE   0x00020000

Definition at line 244 of file defines.h.

Referenced by BrushListCalcContents(), CheckFlags(), SetImpliedFlags(), and TR_MakeTracingNode().

#define CONTENTS_SOLID   0x0001
Note
contents flags are separate bits a given brush can contribute multiple content bits multiple brushes can be in a single leaf. Please update DisplayContentFlags, if these are updated.
See also
DisplayContentFlagslower bits are stronger, and will eat weaker brushes completely an eye is never valid in a solid

Definition at line 223 of file defines.h.

Referenced by BeginBSPFile(), BrushGE(), BrushListCalcContents(), CheckFlags(), CL_AddBrushModel(), CL_HullForEntity(), CMod_LoadLeafs(), G_ShootSingle(), LE_AddToScene(), MakeFaces_r(), ParseBrush(), PruneNodes_r(), and TR_MakeTracingNode().

#define CONTENTS_TERRAIN   0x00040000

Definition at line 245 of file defines.h.

Referenced by AdjustBrushesForOrigin(), GenerateMaterialFile(), and ParseBrush().

#define CONTENTS_TRANSLUCENT   0x10000000

auto set if any surface has trans

Definition at line 252 of file defines.h.

Referenced by Check_IsOptimisable(), CheckPropagateParserContentFlags(), and ParseBrush().

#define CONTENTS_WATER   0x0020
#define CONTENTS_WEAPONCLIP   0x02000000
#define CONTENTS_WINDOW   0x0002

translucent, but not watery

Definition at line 224 of file defines.h.

Referenced by FaceFromPortal(), and ParseBrush().

#define DEBUG_ALL   0x07FE
See also
Com_DeveloperSet_f

Definition at line 54 of file defines.h.

#define DEBUG_CLIENT   0x20

Definition at line 59 of file defines.h.

Referenced by AII_CollectingItems(), AII_RepairAircraft(), AIM_AircraftStart_f(), AIR_AircraftGetFromIDX(), AIR_GetDestinationFindRoot(), AIR_GetDestinationWhilePursuing(), AIR_MoveAircraftIntoNewHomebase(), AIR_MoveEmployeeInventoryIntoStorage(), AIR_NewAircraft(), AIR_ParseAircraft(), AIR_RemoveEmployee(), AIR_SendAircraftPursuingUFO(), AIRFIGHT_ActionsAfterAirfight(), AIRFIGHT_AddProjectile(), AIRFIGHT_ExecuteActions(), AIRFIGHT_ProbabilityToHit(), AM_CalculateTeamScores(), AM_Check_f(), AM_DoFight(), AM_FillTeamFromAircraft(), AM_Go_f(), AM_UpdateSurivorsAfterBattle(), B_AddBuildingToBasePos(), B_BuildingDestroy(), B_CheckBuildingConstruction(), B_CheckUpdateBuilding(), B_InitialEquipment(), B_ParseBuildings(), B_ResetAllStatusAndCapacities(), B_SelectBase(), B_SetBuildingStatus(), B_UpdateBaseCapacities(), BS_SellUGV(), CHAR_UpdateData(), CHAR_UpdateStats(), CL_ActorClientAction(), CL_ActorDoShoot(), CL_ActorPlaySound(), CL_ActorReservedTUs(), CL_ActorResetClientAction(), CL_ActorUse(), CL_ActorUse_f(), CL_AddEdict(), CL_AddMapParticle(), CL_CameraAppear(), CL_ConnectionlessPacket(), CL_DisplayPopupInterceptUFO(), CL_EntAppear(), CL_EntPerish(), CL_GetLocaleID(), CL_Init(), CL_InvAmmo(), CL_LanguageInit(), CL_LanguageTest(), CL_LanguageTryToSet(), CL_ParseCampaignEvents(), CL_ParseConfigString(), CL_ParseEventMails(), CL_ParseNations(), CL_ParseResults(), CL_ParseServerData(), CL_ParseServerMessage(), CL_ParticleFunction(), CL_ParticleSpawn(), CL_PopupChangeHomebase_f(), CL_SetClientState(), CL_ViewPrecacheModels(), Com_ParseTeam(), COMP_ParseComponents(), CP_AddItemAsCollected_f(), CP_AddWeaponAmmo(), CP_BaseAttackPrepareBattle(), CP_BaseAttackStartMission(), CP_BuildBaseSetUpBase(), CP_ChooseMap(), CP_ExecuteMissionTrigger(), CP_GetRandomPosOnGeoscape(), CP_GetRandomPosOnGeoscapeWithParameters(), CP_LoadXML(), CP_MissionEnd(), CP_MissionStageEnd(), CP_ParseCampaignData(), CP_ParseEventTrigger(), CP_ParseResearchableCampaignStates(), CP_ParseResearchedCampaignItems(), CP_ReadCampaignData(), CP_SetAlienEquipmentByInterest(), CP_SpawnNewMissions(), CP_SupplyGoToBase(), CP_SupplyMissionCreate(), CP_SupplySetStayAtBase(), CP_TerrorMissionGo(), uiTimerNode::draw(), E_CreateEmployee(), E_EmployeeDelete_f(), E_EmployeeHire_f(), E_GetHiredRobot(), E_HireForBuilding(), GAME_GetTeamFileName(), GAME_MP_ParseServerInfoMessage(), GAME_MP_ParseTeamInfoMessage(), GAME_MP_PingServer(), GAME_MP_PingServerCallback(), GAME_MP_PingServers_f(), GAME_MP_ProcessPingReply(), GAME_MP_QueryMasterServerThread(), GAME_MP_SetTeamNum(), GAME_NetSendItem(), GEO_GetNation(), teamDef_s::getActorSound(), HUD_DisplayActions(), IN_StartupJoystick(), INS_DestroyInstallation_f(), INS_FillUFOYardData_f(), INS_FinishInstallation(), INS_ParseInstallations(), INS_SelectInstallation(), Irc_Client_CmdPrivmsg(), Irc_Input_Activate_f(), Irc_Logic_AddChannelName(), Irc_Proto_Msg(), Irc_Proto_ProcessServerMsg(), Key_SetBinding(), LE_Cleanup(), MIS_GetModel(), NAT_UpdateHappinessForAllNations(), GAMECvarListener::onGameModeChange(), uiVScrollbarNode::onLoaded(), uiImageNode::onLoaded(), PR_ProductionListClick_f(), PR_ProductionListRightClick_f(), PR_UpdateProductionList(), RS_AssignScientist(), RS_GetTechByProvided(), RS_InitTree(), RS_MarkOneResearchable(), RS_MarkResearchable(), RS_MarkResearched(), RS_ParseTechnologies(), RS_RequirementsMet(), SAV_GameLoad_f(), SAV_VerifyHeader(), SEQ_ExecuteModel(), SEQ_ExecuteMusic(), SEQ_ExecutePrecache(), UFO_RemoveFromGeoscape(), UI_ContainerNodeAutoPlace(), UI_CreateControl(), UI_ParseFont(), UI_ParseNode(), UI_ParseUIModel(), UI_TextScrollEnd(), Employee::unhire(), UP_FindEntry_f(), US_DestroyStoredUFO_f(), US_FillUFOTransfer_f(), US_FillUFOTransferUFOs_f(), US_StoreUFO(), WEB_AuthResponse(), and WEB_ListCGameFilesCallback().

#define DEBUG_COMMANDS   0x10
#define DEBUG_ENGINE   0x04
#define DEBUG_ROUTING   0x1000

Definition at line 66 of file defines.h.

Referenced by CMod_LoadRouting().

#define DEBUG_SYSTEM   0x08

Definition at line 57 of file defines.h.

Referenced by GAME_LoadGame(), SetWorkingDirectory(), and SV_LoadGame().

#define DIRECTION_CLIMB_DOWN   9

Definition at line 332 of file defines.h.

Referenced by Step::checkVerticalDirections().

#define DIRECTION_CLIMB_UP   8

Definition at line 331 of file defines.h.

Referenced by Step::checkVerticalDirections().

#define DIRECTION_CROUCH   11

Definition at line 334 of file defines.h.

Referenced by Grid_CalcPathing(), and Grid_FindPath().

#define DIRECTION_FALL   13
#define DIRECTION_STAND_UP   10

Definition at line 333 of file defines.h.

Referenced by Grid_CalcPathing(), and Grid_FindPath().

#define DIST_EPSILON2   (0.0625125) /* DIST_EPSILON * 2 + small bit more */

Definition at line 378 of file defines.h.

#define ERR_DISCONNECT   2 /* don't kill server */

Definition at line 112 of file defines.h.

Referenced by CL_CanMultiplayerStart(), and Com_Error().

#define ERR_DROP   1 /* print to console and disconnect from game */

Definition at line 111 of file defines.h.

#define ERR_FATAL   0 /* exit the entire game with a popup window */

Definition at line 110 of file defines.h.

#define GRID_WIDTH   (MAX_WORLD_WIDTH / UNIT_SIZE)

absolute max - -GRID_WIDTH up tp +GRID_WIDTH

See also
PATHFINDING_WIDTH

Definition at line 290 of file defines.h.

Referenced by AIL_positionflee().

#define HEADER_LUMPS   17

Definition at line 184 of file defines.h.

#define INITIAL_HP   100

Definition at line 102 of file defines.h.

Referenced by HOS_HealCharacter().

#define LAST_VISIBLE_CONTENTS   0x80

max 16 bit please - otherwise change EV_ACTOR_MOVE to send a long and not a short

Definition at line 230 of file defines.h.

Referenced by ParseBrush(), and VisibleContents().

#define LEVEL_ACTORCLIP   258

Definition at line 352 of file defines.h.

Referenced by DoRouting(), IsInLevel(), MakeTracingNodes(), TR_TileTestLine(), and TR_TileTestLineDM().

#define LEVEL_LASTLIGHTBLOCKING   256

Definition at line 350 of file defines.h.

Referenced by LightWorld(), and TR_TestLineSingleTile().

#define LEVEL_LASTVISIBLE   255
Note
The bsp trees are generated based on the levels that a given brush is supposed to be in. So a brush that is tagged for viewing in levels 1, 2, and 3 will be in bsp tree 7 (1 + 2 + 4) a brush that is viewable in all levels will be in bsp tree level 255, and a bush that is not tagged for viewing by level will be in tree 0. Also, a brush will only be in one bsp tree - the brush tagged for levels 1, 2, and 3 will only be in tree 7, saving memory

Definition at line 348 of file defines.h.

Referenced by R_GenerateGrass(), R_GetLevelSurfaceLists(), and TR_TileBoxTrace().

#define LEVEL_LIGHTCLIP   256

Definition at line 349 of file defines.h.

Referenced by IsInLevel(), MakeTracingNodes(), and TR_TileTestLine().

#define LEVEL_MAX   259

Definition at line 353 of file defines.h.

Referenced by CM_MakeTracingNodes(), and MakeTracingNodes().

#define LEVEL_WEAPONCLIP   257

Definition at line 351 of file defines.h.

Referenced by IsInLevel(), TR_TileTestLine(), and TR_TileTestLineDM().

#define LIGHTMAP_DAY   1

Definition at line 364 of file defines.h.

Referenced by LoadBSPFile(), R_ModLoadSurfaces(), and U2M_SetDefaultConfigValues().

#define LIGHTMAP_MAX   2

Definition at line 365 of file defines.h.

Referenced by EmitFace(), and SwapBSPFile().

#define LIGHTMAP_NIGHT   0

Definition at line 363 of file defines.h.

Referenced by LoadBSPFile(), R_ModLoadSurfaces(), and U2M_SetDefaultConfigValues().

#define LUMP_BRUSHES   14

Definition at line 181 of file defines.h.

Referenced by CM_LoadBsp(), LoadBSPFile(), and WriteBSPFile().

#define LUMP_BRUSHSIDES   15

Definition at line 182 of file defines.h.

Referenced by CM_LoadBsp(), LoadBSPFile(), and WriteBSPFile().

#define LUMP_EDGES   11

Definition at line 178 of file defines.h.

Referenced by LoadBSPFile(), R_ModAddMapTile(), and WriteBSPFile().

#define LUMP_ENTITIES   0

Lump ID constants (directory in the bsp header)

Definition at line 167 of file defines.h.

Referenced by CM_AddMapTile(), LoadBSPFile(), and WriteBSPFile().

#define LUMP_FACES   6

Definition at line 173 of file defines.h.

Referenced by LoadBSPFile(), R_ModAddMapTile(), and WriteBSPFile().

#define LUMP_LEAFBRUSHES   10

Definition at line 177 of file defines.h.

Referenced by CM_LoadBsp(), LoadBSPFile(), and WriteBSPFile().

#define LUMP_LEAFS   9

Definition at line 176 of file defines.h.

Referenced by CM_LoadBsp(), LoadBSPFile(), R_ModAddMapTile(), and WriteBSPFile().

#define LUMP_LIGHTING_DAY   8

Definition at line 175 of file defines.h.

Referenced by CM_AddMapTile(), LoadBSPFile(), R_ModAddMapTile(), and WriteBSPFile().

#define LUMP_LIGHTING_NIGHT   7

Definition at line 174 of file defines.h.

Referenced by CM_AddMapTile(), LoadBSPFile(), R_ModAddMapTile(), and WriteBSPFile().

#define LUMP_MODELS   13

Definition at line 180 of file defines.h.

Referenced by CM_LoadBsp(), LoadBSPFile(), R_ModAddMapTile(), and WriteBSPFile().

#define LUMP_NODES   4

Definition at line 171 of file defines.h.

Referenced by CM_LoadBsp(), LoadBSPFile(), R_ModAddMapTile(), and WriteBSPFile().

#define LUMP_NORMALS   16

Definition at line 183 of file defines.h.

Referenced by LoadBSPFile(), R_ModAddMapTile(), and WriteBSPFile().

#define LUMP_PLANES   1

Definition at line 168 of file defines.h.

Referenced by CM_LoadBsp(), LoadBSPFile(), R_ModAddMapTile(), and WriteBSPFile().

#define LUMP_ROUTING   3

Definition at line 170 of file defines.h.

Referenced by CM_AddMapTile(), LoadBSPFile(), and WriteBSPFile().

#define LUMP_SURFEDGES   12

Definition at line 179 of file defines.h.

Referenced by LoadBSPFile(), R_ModAddMapTile(), and WriteBSPFile().

#define LUMP_TEXINFO   5

Definition at line 172 of file defines.h.

Referenced by CM_LoadBsp(), LoadBSPFile(), R_ModAddMapTile(), and WriteBSPFile().

#define LUMP_VERTEXES   2

Definition at line 169 of file defines.h.

Referenced by LoadBSPFile(), R_ModAddMapTile(), and WriteBSPFile().

#define MAP_DIST_EPSILON   0.01

Definition at line 380 of file defines.h.

Referenced by PlaneEqual(), and SnapPlane().

#define MAP_SIZE_OFFSET   100

Definition at line 388 of file defines.h.

Referenced by CL_ActorMouseTrace(), and UI_InitRadar().

#define MASK_ALL   (-1)

Definition at line 271 of file defines.h.

Referenced by CM_EntTestLineDM(), SV_PointContents(), and TR_TraceToLeaf().

#define MASK_IMPASSABLE   (MASK_SOLID | CONTENTS_ACTORCLIP)

Definition at line 273 of file defines.h.

#define MASK_NO_LIGHTCLIP   (MASK_ALL &~(CONTENTS_LEVEL_ALL | CONTENTS_LIGHTCLIP))

Definition at line 279 of file defines.h.

#define MASK_PASSABLE   (CONTENTS_PASSABLE | CONTENTS_WATER)

Definition at line 274 of file defines.h.

#define MASK_SMOKE_AND_FIRE   (MASK_SOLID | CONTENTS_WATER | CONTENTS_WEAPONCLIP)

Definition at line 276 of file defines.h.

Referenced by G_SpawnFieldGroup().

#define MASK_VISIBILILITY   (CONTENTS_SOLID | CONTENTS_WATER)

Definition at line 277 of file defines.h.

Referenced by CM_EntTestLine().

#define MAX_ACTIVETEAM   12
#define MAX_KEY   32

key / value pair sizes

Definition at line 163 of file defines.h.

Referenced by AddEpair().

#define MAX_LEAFS   1024

Definition at line 152 of file defines.h.

Referenced by TR_BoxTrace().

#define MAX_MAP_BRUSHES   16384

Definition at line 135 of file defines.h.

Referenced by Check_NearList(), CM_InitBoxHull(), CMod_LoadBrushes(), and ParseBrush().

#define MAX_MAP_BRUSHSIDES   65536
#define MAX_MAP_EDGES   128000

Definition at line 146 of file defines.h.

Referenced by GetEdge().

#define MAX_MAP_ENTITIES   2048

Definition at line 136 of file defines.h.

Referenced by ParseEntity(), and ParseMapEntity().

#define MAX_MAP_ENTSTRING   0x40000

Definition at line 137 of file defines.h.

Referenced by CMod_LoadEntityString().

#define MAX_MAP_FACES   65536

Definition at line 144 of file defines.h.

Referenced by BuildFacelights(), BuildLights(), EmitFace(), FreePatches(), and SubdividePatches().

#define MAX_MAP_LEAFBRUSHES   65536

Definition at line 145 of file defines.h.

Referenced by CM_InitBoxHull(), CMod_LoadLeafBrushes(), and EmitLeaf().

#define MAX_MAP_LEAFS   65536

Definition at line 142 of file defines.h.

Referenced by CMod_LoadLeafs(), and EmitLeaf().

#define MAX_MAP_LIGHTING   0x1000000

Definition at line 148 of file defines.h.

Referenced by FinalLightFace().

#define MAX_MAP_LIGHTMAP   (512 * 512)

Definition at line 386 of file defines.h.

Referenced by CalcLightinfoExtents().

#define MAX_MAP_MODELS   1024

upper design bounds leafbrushes, planes, and verts are still bounded by 16 bit short limits

Definition at line 134 of file defines.h.

Referenced by BeginModel(), and CMod_LoadSubmodels().

#define MAX_MAP_PLANES   65536
#define MAX_MAP_ROUTING   0x100000

Definition at line 150 of file defines.h.

Referenced by DoRouting().

#define MAX_MAP_SIDES   (MAX_MAP_BRUSHES*6)

Definition at line 383 of file defines.h.

Referenced by Check_FindCompositeSides().

#define MAX_MAP_SURFEDGES   256000

Definition at line 147 of file defines.h.

Referenced by EmitFace(), and R_ModLoadSurfedges().

#define MAX_MAP_TEXINFO   16384

Definition at line 138 of file defines.h.

Referenced by CMod_LoadSurfaces(), and TexinfoForBrushTexture().

#define MAX_MAP_TEXTURES   1024

Definition at line 384 of file defines.h.

Referenced by FindMiptex().

#define MAX_MAP_VERTS   65536

Definition at line 143 of file defines.h.

Referenced by EmitFaceVertexes(), and GetVertexnum().

#define MAX_MOD_KNOWN   512

Definition at line 160 of file defines.h.

Referenced by R_AllocModelSlot(), R_FindModel(), and SV_LoadModelAABB().

#define MAX_MODELS   256 /* these are sent over the net as bytes */
#define MAX_ROUTE_TUS   (ROUTING_NOT_REACHABLE - 1)

Definition at line 83 of file defines.h.

Referenced by CL_ActorConditionalMoveCalc(), Grid_CalcPathing(), and TEST_F().

#define MAX_STRING_CHARS   1024 /* max length of a string passed to Cmd_TokenizeString */
#define MAX_STRING_TOKENS   80 /* max tokens resulting from Cmd_TokenizeString */

Definition at line 92 of file defines.h.

Referenced by Cmd_TokenizeString().

#define MAX_TEXPATH   32

max length of filename relative to gamedir, any longer makes the bsp files unnecessarily long

Definition at line 95 of file defines.h.

Referenced by ParseBrush().

#define MAX_VALUE   1024

Definition at line 164 of file defines.h.

Referenced by AddEpair().

#define MAX_WORLD_WIDTH   4096

-MAX_WORLD_WIDTH up tp +MAX_WORLD_WIDTH

Definition at line 288 of file defines.h.

Referenced by FindEdgeVerts(), LoadMapFile(), MakeBrushWindings(), MakeTreePortals_r(), ProcessLevel(), ProcessSubModel(), R_Setup3D(), SL_BSPSlice(), SplitBrush(), and WindingIsHuge().

#define MAXEDGES   20

Definition at line 49 of file defines.h.

Referenced by FaceFromSuperverts().

#define NORMAL_EPSILON   0.00001

Definition at line 381 of file defines.h.

Referenced by PlaneEqual(), and SnapVector().

#define ON_EPSILON   0.1
#define PATHFINDING_LEGROOMHEIGHT   4

Definition at line 311 of file defines.h.

Referenced by RT_CheckCell().

#define PATHFINDING_MAX_FALL   16

Definition at line 309 of file defines.h.

Referenced by Step::checkWalkingDirections(), and CL_AddPathingBox().

#define PATHFINDING_MAX_STEPUP   4

Definition at line 317 of file defines.h.

Referenced by Step::checkWalkingDirections(), and RT_TraceOnePassage().

#define PATHFINDING_MICROSTEP_SIZE   4

The size (in model units) of a microstep. Must be a power of 2 and less than UNIT_SIZE.

Definition at line 325 of file defines.h.

Referenced by RT_MicroTrace().

#define PATHFINDING_MICROSTEP_SKIP   2

The number of microsteps that can be stepped over by an actor. Used to allow an actor to stepup when the floor is not level or consitent.

Definition at line 328 of file defines.h.

Referenced by RT_MicroTrace().

#define PATHFINDING_MIN_OPENING   6
#define PATHFINDING_MIN_STEPUP   2

Definition at line 314 of file defines.h.

Referenced by RT_CalcNewZ(), RT_FindOpening(), RT_MicroTrace(), and RT_TraceOnePassage().

#define PATHFINDING_NO_STEPUP   (2 * CELL_HEIGHT)

Definition at line 319 of file defines.h.

Referenced by RT_ConnSetNoGo(), RT_TraceOnePassage(), and RT_TracePassage().

#define PLANE_ANYX   3

3-5 are non-axial planes snapped to the nearest

Definition at line 196 of file defines.h.

Referenced by CM_InitBoxHull(), and PlaneTypeForNormal().

#define PLANE_ANYY   4

Definition at line 197 of file defines.h.

Referenced by PlaneTypeForNormal().

#define PLANE_ANYZ   5

Definition at line 198 of file defines.h.

Referenced by PlaneTypeForNormal(), and R_SetupFrustum().

#define PLANE_NONE   6

Definition at line 199 of file defines.h.

Referenced by TR_BuildTracingNode_r(), TR_TestLine_r(), and TR_TestLineDist_r().

#define PLANE_X   0

0-2 are axial planes

Definition at line 191 of file defines.h.

Referenced by PlaneTypeForNormal(), SV_CreateWorldSector(), TR_TestLine_r(), and TR_TestLineDist_r().

#define PLANE_Y   1
#define PLANE_Z   2

Definition at line 193 of file defines.h.

Referenced by PlaneTypeForNormal(), TR_TestLine_r(), and TR_TestLineDist_r().

#define PLANESIDE_EPSILON   0.001
Note
The comment line specifying files has the following syntax: [parent dir/filename] OR [parent dir] OR {project name}

Definition at line 38 of file defines.h.

Referenced by TR_BoxOnPlaneSide().

#define PLAYER_HEIGHT   (UNIT_HEIGHT - 16)

Definition at line 125 of file defines.h.

Referenced by Step::checkVerticalDirections().

#define PRINT_CHAT   0 /* chat messages */

Definition at line 106 of file defines.h.

Referenced by CL_ParseServerMessage(), G_CheckFlood(), G_Say_f(), and SV_DropClient().

#define PRINT_CONSOLE   2 /* critical messages goes to the game console */
#define PRINT_NONE   -1 /* suppress printing */

Definition at line 105 of file defines.h.

Referenced by SV_PlayerPrintf().

#define PSIDE_BOTH   (PSIDE_FRONT|PSIDE_BACK)

Definition at line 369 of file defines.h.

Referenced by SelectSplitSide(), SplitBrushList(), and TestBrushToPlanenum().

#define PSIDE_FACING   4

Definition at line 370 of file defines.h.

Referenced by SelectSplitSide(), SplitBrushList(), and TestBrushToPlanenum().

#define ROUTING_UNREACHABLE   -1

(int) Indicates that a cell is not reachable. A DV value.

Definition at line 284 of file defines.h.

Referenced by AI_TurnIntoDirection(), AIL_positionapproach(), CL_ActorMaximumMove(), CL_ActorMoveLength(), CL_ActorTraceMove(), G_ActorMoveLength(), G_FillDirectionTable(), and Grid_MoveNext().

#define SELECTION_DELTA   30

Definition at line 118 of file defines.h.

Referenced by R_DrawEntityEffects().

#define SIDE_BACK   1

Definition at line 188 of file defines.h.

Referenced by ChopWindingInPlace(), and ClipWindingEpsilon().

#define SIDE_FRONT   0

Definition at line 186 of file defines.h.

Referenced by ChopWindingInPlace(), and ClipWindingEpsilon().

#define SIDE_ON   2

Definition at line 187 of file defines.h.

Referenced by ChopWindingInPlace(), and ClipWindingEpsilon().

#define STATE_CLOSED   1

Definition at line 88 of file defines.h.

Referenced by Door_Use(), SP_func_door(), and SP_func_door_sliding().

#define STATE_OPENED   0

Definition at line 87 of file defines.h.

Referenced by AI_CheckUsingDoor(), Door_SlidingUse(), and Door_Use().

#define SURF_ALPHATEST   0x02000000

alpha test for transparent textures

Definition at line 268 of file defines.h.

Referenced by ParseBrush(), R_BuildLightmap(), and R_LoadSurfacesArrays_().

#define SURF_BLEND33   0x00000010

0.33 alpha blending

Definition at line 257 of file defines.h.

Referenced by ParseBrush(), R_BuildLightmap(), R_DrawSurfaces(), R_LoadSurfacesArrays_(), R_SetSurfaceState(), and SL_SliceTheWorld().

#define SURF_BLEND66   0x00000020

0.66 alpha blending

Definition at line 258 of file defines.h.

Referenced by ParseBrush(), R_BuildLightmap(), R_DrawSurfaces(), R_LoadSurfacesArrays_(), R_SetSurfaceState(), and SL_SliceTheWorld().

#define SURF_BURN   0x00000800

will keep burning when flamed

Definition at line 264 of file defines.h.

Referenced by G_FireAffectedSurface().

#define SURF_FLOWING   0x00000040

scroll towards angle

Definition at line 259 of file defines.h.

#define SURF_FOLIAGE   0x00004000

will have foliage over this surface

Definition at line 267 of file defines.h.

Referenced by R_GenerateGrass().

#define SURF_FOOTSTEP   0x00001000

only for grabbing footsteps textures

Definition at line 265 of file defines.h.

Referenced by ParseBrush().

#define SURF_HINT   0x00000100
#define SURF_LIGHT   0x00000001

value will hold the light strength

Definition at line 254 of file defines.h.

Referenced by CheckNodraws(), FaceFromPortal(), and HasLight().

#define SURF_ORIGIN   0x00002000

use this to identity those submodel surfaces that must not be translated in case of rma

Definition at line 266 of file defines.h.

Referenced by AdjustBrushesForOrigin(), and R_SetupSubmodels().

#define SURF_PHONG   0x00000400

phong interpolated lighting at compile time

Definition at line 263 of file defines.h.

Referenced by BuildFacelights(), Check_SetNodraw(), CheckTexturesBasedOnFlags(), FacesWithVert(), R_DrawBspNormals(), R_LoadBspVertexArrays(), and SetImpliedFlags().

#define SURF_SKIP   0x00000200

completely ignored, allowing non-closed brushes

Definition at line 262 of file defines.h.

Referenced by ParseBrush(), SelectSplitSide(), SetImpliedFlags(), and SL_SliceTheWorld().

#define SURF_SLICK   0x00000002

effects game physics

Definition at line 255 of file defines.h.

Referenced by SetImpliedFlags().

#define SURF_WARP   0x00000008
#define TEAM_DEFAULT   1

Definition at line 51 of file defines.h.

Referenced by AIL_toTeamInt(), G_GetTeam(), GAME_MP_TeamNum_f(), and SP_worldspawn().

#define TEXINFO_NODE   -1 /* side is already on a node */
#define TL_FLAG_ACTORCLIP   0x0100
#define TL_FLAG_ALL   0x0300

Definition at line 361 of file defines.h.

#define TL_FLAG_NONE   0x0000

Definition at line 357 of file defines.h.

Referenced by CL_GetHitProbability(), G_TestLine(), and G_TestLineWithEnts().

#define TL_FLAG_REGULAR_LEVELS   0x00FF

Definition at line 358 of file defines.h.

Referenced by TR_TileTestLine(), and TR_TileTestLineDM().

#define TL_FLAG_WEAPONCLIP   0x0200

Definition at line 360 of file defines.h.

Referenced by TR_TileTestLine(), and TR_TileTestLineDM().

#define TU_CROUCH_MOVING_FACTOR   1.5

The factor the normal movement is multiplied when in crouching mode

Definition at line 79 of file defines.h.

Referenced by Grid_GetTUsForDirection().

#define TU_DOOR_ACTION   1

Time units used to interact with doors

Definition at line 78 of file defines.h.

Referenced by CL_ActorUse_f(), and SP_func_door().

#define TU_FLYING_MOVING_FACTOR   2

The factor the normal movement is multiplied when flying

Definition at line 80 of file defines.h.

#define TU_MOVE_CLIMB   4

Time units used to climb a ladder.

Definition at line 76 of file defines.h.

#define TU_MOVE_DIAGONAL   3

Time units used to move to a diagonal field/square.

Definition at line 75 of file defines.h.

Referenced by TEST_F().

#define TU_MOVE_FALL   0

Time units used to fall.

Definition at line 77 of file defines.h.

#define TU_MOVE_STRAIGHT   2
#define TU_TURN   1

Time units for turning (no matter how far).

Definition at line 73 of file defines.h.

Referenced by CL_ActorTurnMouse(), G_ClientMove(), and G_ClientTurn().

#define WALL_SIZE   5

Definition at line 128 of file defines.h.

Referenced by RT_CheckCell(), and RT_ObstructedTrace().