Atrinik Client  4.0
Functions | Variables
player.c File Reference
#include <global.h>
#include <toolkit/packet.h>

Go to the source code of this file.


void clear_player (void)
void new_player (tag_t tag, long weight, short face)
void client_send_apply (object *op)
void client_send_examine (tag_t tag)
void client_send_move (tag_t loc, tag_t tag, uint32_t nrof)
void send_command (const char *command)
void init_player_data (void)
int gender_to_id (const char *gender)
void player_draw_exp_progress (SDL_Surface *surface, int x, int y, int64_t xp, uint8_t level)


const char * gender_noun [GENDER_MAX]
const char * gender_subjective [GENDER_MAX]
const char * gender_subjective_upper [GENDER_MAX]
const char * gender_objective [GENDER_MAX]
const char * gender_possessive [GENDER_MAX]
const char * gender_reflexive [GENDER_MAX]

Detailed Description

This file handles various player related functions. This includes both things that operate on the player item, cpl structure, or various commands that the player issues.

This file does most of the handling of commands from the client to server (see commands.c for server->client)

Does most of the work for sending messages to the server

Definition in file player.c.

Function Documentation

void clear_player ( void  )

Clear the player data like quickslots, inventory items, etc.

Definition at line 80 of file player.c.

void client_send_apply ( object op)

Send apply command to server.

opObject to apply.

Definition at line 119 of file player.c.

void client_send_examine ( tag_t  tag)

Send examine command to server.

tagItem tag.

Definition at line 138 of file player.c.

void client_send_move ( tag_t  loc,
tag_t  tag,
uint32_t  nrof 

Request nrof of objects of tag get moved to loc.

locLocation where to move the object.
tagItem tag.
nrofNumber of objects from tag.

Definition at line 156 of file player.c.

int gender_to_id ( const char *  gender)

Transform gender-string into its ID.

genderThe gender string.
The gender's ID as one of Gender IDs., or -1 if 'gender' didn't match any of the existing genders.

Definition at line 226 of file player.c.

void init_player_data ( void  )

Initialize player data.

Definition at line 187 of file player.c.

void new_player ( tag_t  tag,
long  weight,
short  face 

Initialize new player.

tagTag of the player.
nameName of the player.
weightWeight of the player.
faceFace ID.

Definition at line 107 of file player.c.

void send_command ( const char *  command)

This should be used for all 'command' processing. Other functions should call this so that proper windowing will be done.

commandText command.
1 if command was sent, 0 otherwise.

Definition at line 175 of file player.c.

Variable Documentation

const char* gender_noun[GENDER_MAX]
Initial value:
= {
"neuter", "male", "female", "hermaphrodite"

Gender nouns.

Definition at line 43 of file player.c.

const char* gender_objective[GENDER_MAX]
Initial value:
= {
"it", "him", "her", "it"

Objective pronouns.

Definition at line 61 of file player.c.

const char* gender_possessive[GENDER_MAX]
Initial value:
= {
"its", "his", "her", "its"

Possessive pronouns.

Definition at line 67 of file player.c.

const char* gender_reflexive[GENDER_MAX]
Initial value:
= {
"itself", "himself", "herself", "itself"

Reflexive pronouns.

Definition at line 73 of file player.c.

const char* gender_subjective[GENDER_MAX]
Initial value:
= {
"it", "he", "she", "it"

Subjective pronouns.

Definition at line 49 of file player.c.

const char* gender_subjective_upper[GENDER_MAX]
Initial value:
= {
"It", "He", "She", "It"

Subjective pronouns, with first letter in uppercase.

Definition at line 55 of file player.c.