#include <player.h>
Collaboration diagram for Player_t:
Data Fields | |
Sint16 | captures |
The number of flag captures the player has scored. | |
Uint8 | deadTime |
The number of frames a player has been dead. | |
Uint16 | flags |
Bit flags from PLAYER_FLAGS. | |
Sint16 | kills |
The number of kills the player has scored. | |
RenderItem | labelName |
The small label used to identify the player operating the tank. | |
UpdateTimes | lastUpdate |
The times, in common game time, of when this player was last updated with information from the network. | |
Uint32 | localUpdate |
The time, in common game time, of when this player was last locally updated. | |
rtsa_char | name [32] |
The player's name. | |
Uint8 | pid |
The ID number of the player. | |
Uint16 | rot |
The direction of the tank. | |
RenderItem | shell |
The graphical represntation of the shell shot from the tank. | |
Uint16 | shellDist |
The distance the shell has traveled. | |
Uint16 | shellRot |
The direction the shell is traveling. | |
Sint32 | shellX |
The current location of the shell. | |
Sint32 | shellY |
RenderItem | tank |
The graphical represntation of the player's tank on the field. | |
Uint8 | team |
The team that the player joined. | |
Sint32 | x |
The player's current location. | |
Sint32 | y |
For options, the first element in players, an array of Player, will contain the settings that must be sent to the server.
Definition at line 177 of file player.h.
Sint16 Player_t::captures |
The number of flag captures the player has scored.
Definition at line 246 of file player.h.
Referenced by AppendPlayerData(), and ReadPlayer().
Uint8 Player_t::deadTime |
The number of frames a player has been dead.
When the value exceeds DEAD_TIME, the player can respawn and the spinning tank will no longer be drawn.
Definition at line 270 of file player.h.
Referenced by AddPlayer(), AppendPlayerData(), HandleInput(), HandlePlayerSpawn(), ReadPlayer(), SpawnTank(), and UpdatePlayers().
Uint16 Player_t::flags |
Bit flags from PLAYER_FLAGS.
Definition at line 250 of file player.h.
Referenced by AddPlayer(), AddToConfigList(), AppendPlayerData(), CalculateOffset(), DisablePlayerLabels(), EnablePlayerLabels(), FixTankCollision(), GameInit(), GameRun(), HandleInput(), HandlePlayerSpawn(), MoveShell(), MsgFailDropConnection(), ReadPlayer(), RemovePlayer(), RotateTank(), SpawnTank(), TeamSelUninit(), TeamSelUpdate(), and UpdatePlayers().
Sint16 Player_t::kills |
The number of kills the player has scored.
Definition at line 242 of file player.h.
Referenced by AppendPlayerData(), ReadPlayer(), and SendScoreUpdate().
The small label used to identify the player operating the tank.
Definition at line 192 of file player.h.
Referenced by AddPlayer(), DisablePlayerLabels(), EnablePlayerLabels(), PlacePlayerLabel(), RemovePlayer(), TeamSelUninit(), TeamSelUpdate(), and UpdatePlayers().
The times, in common game time, of when this player was last updated with information from the network.
Definition at line 209 of file player.h.
Referenced by ReadPlayer().
Uint32 Player_t::localUpdate |
The time, in common game time, of when this player was last locally updated.
Definition at line 214 of file player.h.
Referenced by GameInit(), and UpdatePlayers().
The player's name.
This may be stored using the platform's wide character. It is transmitted over the network in UTF-16.
Definition at line 255 of file player.h.
Referenced by AddPlayer(), AddScoreNotice(), AppendPlayerData(), and ReadPlayer().
Uint8 Player_t::pid |
The ID number of the player.
This should correspond to its array position and is useful when the player is passed as a pointer.
Definition at line 260 of file player.h.
Referenced by AddPlayer(), AddScoreNotice(), AppendPlayerData(), GameInit(), MoveShell(), MoveTank(), ReadPlayer(), RotateTank(), SpawnTank(), and UpdatePlayers().
Uint16 Player_t::rot |
The direction of the tank.
The index of the tank sprite is (rot >> 8) & 0xF.
Definition at line 238 of file player.h.
Referenced by AppendPlayerData(), BfldErrRun(), IsCollidingObstacle(), IsCollidingShell(), IsCollidingTank(), main(), MoveShell(), MoveTank(), ReadPlayer(), RotateTank(), SpawnTank(), SplashInit(), and TeamSelInit().
The graphical represntation of the shell shot from the tank.
Definition at line 187 of file player.h.
Referenced by AddPlayer(), GameInit(), MoveShell(), ReadPlayer(), and RemovePlayer().
Uint16 Player_t::shellDist |
The distance the shell has traveled.
Actually, the number of frames it has been in flight.
Definition at line 229 of file player.h.
Referenced by AppendPlayerData(), HandleInput(), MoveShell(), and ReadPlayer().
Uint16 Player_t::shellRot |
The direction the shell is traveling.
Definition at line 233 of file player.h.
Referenced by AppendPlayerData(), MoveShell(), ReadPlayer(), and RotateTank().
Sint32 Player_t::shellX |
The current location of the shell.
This value includes an 8-bit subpixel location as the least significant byte.
Definition at line 224 of file player.h.
Referenced by AppendPlayerData(), IsCollidingShell(), MoveShell(), and ReadPlayer().
Sint32 Player_t::shellY |
Definition at line 224 of file player.h.
Referenced by AppendPlayerData(), IsCollidingShell(), MoveShell(), and ReadPlayer().
The graphical represntation of the player's tank on the field.
Definition at line 182 of file player.h.
Referenced by AddPlayer(), BfldErrInit(), BfldErrResize(), BfldErrRun(), BfldErrUninit(), GameInit(), main(), MoveTank(), PlacePlayerLabel(), RemovePlayer(), RotateTank(), SpawnTank(), SplashInit(), SplashResize(), TeamSelInit(), TeamSelInput(), TeamSelUninit(), TeamSelUpdate(), and UpdatePlayers().
Uint8 Player_t::team |
The team that the player joined.
Definition at line 264 of file player.h.
Referenced by AddPlayer(), AddScoreNotice(), AppendPlayerData(), GameInit(), main(), ReadPlayer(), SpawnTank(), SplashInit(), TeamSelInit(), and TeamSelUpdate().
Sint32 Player_t::x |
The player's current location.
This value includes an 8-bit subpixel location as the least significant byte.
Definition at line 219 of file player.h.
Referenced by AddPlayer(), AppendPlayerData(), GameInit(), IsCollidingObstacle(), IsCollidingShell(), IsCollidingTank(), MoveShell(), MoveTank(), ReadPlayer(), and SpawnTank().
Sint32 Player_t::y |
Definition at line 219 of file player.h.
Referenced by AddPlayer(), AppendPlayerData(), GameInit(), IsCollidingObstacle(), IsCollidingShell(), IsCollidingTank(), MoveShell(), MoveTank(), ReadPlayer(), and SpawnTank().