cl_actor.h

Go to the documentation of this file.
00001 
00005 /*
00006 Copyright (C) 2002-2010 UFO: Alien Invasion.
00007 
00008 This program is free software; you can redistribute it and/or
00009 modify it under the terms of the GNU General Public License
00010 as published by the Free Software Foundation; either version 2
00011 of the License, or (at your option) any later version.
00012 
00013 This program is distributed in the hope that it will be useful,
00014 but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00016 
00017 See the GNU General Public License for more details.
00018 
00019 You should have received a copy of the GNU General Public License
00020 along with this program; if not, write to the Free Software
00021 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00022 
00023 */
00024 
00025 #ifndef CLIENT_CL_ACTOR_H
00026 #define CLIENT_CL_ACTOR_H
00027 
00028 /* vertical cursor offset */
00029 #define CURSOR_OFFSET UNIT_HEIGHT * 0.4
00030 /* distance from vertical center of grid-point to head when standing */
00031 #define EYE_HT_STAND  UNIT_HEIGHT * 0.25
00032 /* distance from vertical center of grid-point to head when crouched */
00033 #define EYE_HT_CROUCH UNIT_HEIGHT * 0.06
00034 
00036 typedef enum {
00037     WALKTYPE_AUTOSTAND_BUT_NOT_FAR_ENOUGH,
00038     WALKTYPE_AUTOSTAND_BEING_USED,
00039     WALKTYPE_WALKING,
00040     WALKTYPE_CROUCH_WALKING,
00041 
00042     WALKTYPE_MAX
00043 } walkType_t;
00044 
00045 extern le_t *selActor;
00046 extern pos3_t truePos;
00047 extern pos3_t mousePos;
00048 
00049 #define ACTOR_GET_FIELDSIZE(actor) ((actor != NULL) ? (actor)->fieldSize : ACTOR_SIZE_NORMAL)
00050 
00051 void MSG_Write_PA(player_action_t player_action, int num, ...);
00052 
00053 void ACTOR_InitStartup(void);
00054 
00055 const char *CL_ActorGetSkillString(const int skill);
00056 
00057 int CL_ActorCheckAction(const le_t *le);
00058 void CL_ActorInvMove(const le_t *le, containerIndex_t fromContainer, int fromX, int fromY, containerIndex_t toContainer, int toX, int toY);
00059 
00060 character_t *CL_ActorGetChr(const le_t *le);
00061 int CL_ActorUsableTUs(const le_t *le);
00062 int CL_ActorReservedTUs(const le_t *le, reservation_types_t type);
00063 void CL_ActorReserveTUs(const le_t *le, reservation_types_t type, int tus);
00064 
00065 int CL_ActorMoveMode(const le_t *le, int length);
00066 void CL_ActorSetMode(le_t *actor, actorModes_t actorMode);
00067 qboolean CL_ActorFireModeActivated(const actorModes_t mode);
00068 void CL_ActorConditionalMoveCalc(le_t *le);
00069 qboolean CL_ActorSelect(le_t *le);
00070 qboolean CL_ActorSelectList(int num);
00071 qboolean CL_ActorSelectNext(void);
00072 void CL_ActorAddToTeamList(le_t *le);
00073 void CL_ActorRemoveFromTeamList(le_t *le);
00074 void CL_ActorCleanup(le_t *le);
00075 void CL_ActorSelectMouse(void);
00076 void CL_ActorReload(le_t *le, containerIndex_t containerID);
00077 void CL_ActorTurnMouse(void);
00078 void CL_ActorDoTurn(struct dbuffer *msg);
00079 void CL_ActorStartMove(le_t *le, const pos3_t to);
00080 void CL_ActorShoot(const le_t *le, const pos3_t at);
00081 int CL_ActorGetContainerForReload(invList_t **ic, const inventory_t *inv, const objDef_t *weapon);
00082 void CL_ActorPlaySound(const le_t *le, actorSound_t soundType);
00083 
00084 void CL_ActorActionMouse(void);
00085 void CL_ActorDoorAction_f(void);
00086 void CL_ActorSetFireDef(le_t *actor, const fireDef_t *fd);
00087 
00088 void CL_NextRound_f(void);
00089 
00090 void CL_ResetMouseLastPos(void);
00091 void CL_ActorResetMoveLength(le_t *le);
00092 qboolean CL_ActorMouseTrace(void);
00093 
00094 qboolean CL_AddActor(le_t *le, entity_t *ent);
00095 qboolean CL_AddUGV(le_t *le, entity_t *ent);
00096 
00097 void CL_AddTargeting(void);
00098 void CL_AddPathing(void);
00099 void CL_ActorTargetAlign_f(void);
00100 
00101 void CL_ActorSetShotSettings(character_t *chr, actorHands_t hand, int fireModeIndex, const objDef_t *weapon);
00102 void CL_ActorSetRFMode(character_t *chr, actorHands_t hand, int fireModeInde, const objDef_t *weapon);
00103 
00104 void CL_DisplayFloorArrows(void);
00105 void CL_DisplayObstructionArrows(void);
00106 #endif

Generated by  doxygen 1.6.2