UFO: Alien Invasion
Doxygen documentation generating
g_edicts.h
Go to the documentation of this file.
1 
6 /*
7 All original material Copyright (C) 2002-2023 UFO: Alien Invasion.
8 
9 Original file from Quake 2 v3.21: quake2-2.31/game/g_utils.c
10 Copyright (C) 1997-2001 Id Software, Inc.
11 
12 This program is free software; you can redistribute it and/or
13 modify it under the terms of the GNU General Public License
14 as published by the Free Software Foundation; either version 2
15 of the License, or (at your option) any later version.
16 
17 This program is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20 
21 See the GNU General Public License for more details.
22 
23 You should have received a copy of the GNU General Public License
24 along with this program; if not, write to the Free Software
25 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26 
27 */
28 
29 #pragma once
30 
31 #include "g_local.h"
32 
34 void G_EdictsInit(void);
36 Edict* G_EdictDuplicate(const Edict* edict);
37 int G_EdictsGetNumber(const Edict* ent);
38 bool G_EdictsIsValidNum(const int idx);
39 Edict* G_EdictsGetByNum(const int num);
40 Edict* G_EdictsGetFirst(void);
41 Edict* G_EdictsGetNext(Edict* lastEnt);
45 Actor* G_EdictsGetNextLivingActorOfTeam(Actor* lastEnt, const int team);
46 Actor* G_EdictsGetActorByUCN(const int ucn, const int team);
49 Edict* G_EdictsFindTargetEntity(const char* target);
50 void G_EdictsThink(void);
Edict * G_EdictsGetNext(Edict *lastEnt)
Iterate through the list of entities.
Definition: g_edicts.cpp:107
Edict * G_EdictsFindTargetEntity(const char *target)
Searches the edict that has the given target as targetname set.
Definition: g_edicts.cpp:290
int G_EdictsGetNumber(const Edict *ent)
Get an entity's ID number.
Definition: g_edicts.cpp:60
Edict * G_EdictsConstruct(void)
Allocate space for the entity pointers.
Definition: g_edicts.cpp:39
Edict * G_EdictsGetFirst(void)
Returns the first entity.
Definition: g_edicts.cpp:98
Edict * G_EdictsGetByNum(const int num)
Get an entity by it's number.
Definition: g_edicts.cpp:83
void G_EdictsThink(void)
Called every frame to let the edicts tick.
Definition: g_edicts.cpp:306
Definition: g_edict.h:45
Edict * G_EdictsGetNewEdict(void)
Find an entity that is not in use.
Definition: g_edicts.cpp:141
Actor * G_EdictsGetLivingActorFromPos(const pos3_t pos)
Searches an actor at the given grid location.
Definition: g_edicts.cpp:270
Actor * G_EdictsGetNextLivingActor(Actor *lastEnt)
Iterate through the living actor entities.
Definition: g_edicts.cpp:196
void G_EdictsInit(void)
Reset the entity pointers for eg. a new game.
Definition: g_edicts.cpp:48
pos_t pos3_t[3]
Definition: ufotypes.h:58
bool G_EdictsIsValidNum(const int idx)
Check if the given number could point to an existing entity.
Definition: g_edicts.cpp:72
Actor * G_EdictsGetActorByUCN(const int ucn, const int team)
Searches an actor by a unique character number.
Definition: g_edicts.cpp:254
Edict * G_EdictsGetTriggerNextMaps(Edict *lastEnt)
Iterator through all the trigger_nextmap edicts.
Definition: g_edicts.cpp:181
Edict * G_EdictDuplicate(const Edict *edict)
Definition: g_edicts.cpp:128
Actor * G_EdictsGetNextActor(Actor *lastEnt)
Iterate through the actor entities (even the dead!)
Definition: g_edicts.cpp:231
Local definitions for game module.
An Edict of type Actor.
Definition: g_edict.h:348
Edict * G_EdictsGetNextInUse(Edict *lastEnt)
Iterate through the entities that are in use.
Definition: g_edicts.cpp:166
Actor * G_EdictsGetNextLivingActorOfTeam(Actor *lastEnt, const int team)
Iterate through the living actor entities of the given team.
Definition: g_edicts.cpp:216