Crossfire Client, Branches  R11627
player.c File Reference
#include <client.h>
#include <external.h>
#include <script.h>
+ Include dependency graph for player.c:

Go to the source code of this file.

Functions

void clear_fire (void)
 
void clear_fire_run (void)
 
void clear_run (void)
 
void client_send_apply (int tag)
 
void client_send_examine (int tag)
 
void client_send_move (int loc, int tag, int nrof)
 
void command_take (const char *command, const char *cpnext)
 
void CompleteCmd (unsigned char *data, int len)
 
void fire_dir (int dir)
 
void look_at (int x, int y)
 
void move_player (int dir)
 
void new_player (long tag, char *name, long weight, long face)
 
void run_dir (int dir)
 
int send_command (const char *command, int repeat, int must_send)
 
void stop_fire (void)
 
void stop_run (void)
 

Variables

static int dfire =-1
 
const char *const directions [9]
 
static int drun =-1
 
const char *const rcsid_common_player_c
 

Function Documentation

void clear_fire ( void  )

Definition at line 134 of file player.c.

References dfire, SC_FIRERUN, and send_command().

Referenced by button_map_event(), on_drawingarea_map_button_press_event(), parse_game_button_press(), and parse_key_release().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void clear_fire_run ( void  )

Definition at line 122 of file player.c.

References dfire, drun, SC_FIRERUN, and send_command().

Referenced by check_x_events().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void clear_run ( void  )

Definition at line 142 of file player.c.

References drun, SC_FIRERUN, and send_command().

Referenced by parse_key_release().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void client_send_apply ( int  tag)

Definition at line 80 of file player.c.

References cs_print_string(), csocket, and ClientSocket::fd.

Referenced by buttonpress_in_list(), close_container(), close_container_callback(), list_button_event(), list_item_action(), and list_row_collapse().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void client_send_examine ( int  tag)

Definition at line 85 of file player.c.

References cs_print_string(), csocket, and ClientSocket::fd.

Referenced by buttonpress_in_list(), list_button_event(), and list_item_action().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void client_send_move ( int  loc,
int  tag,
int  nrof 
)

Definition at line 92 of file player.c.

References cs_print_string(), csocket, and ClientSocket::fd.

Referenced by buttonpress_in_list(), list_button_event(), and list_item_action().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void command_take ( const char *  command,
const char *  cpnext 
)

Definition at line 264 of file player.c.

References Player_Struct::container, Player_Struct::count, cpl, cs_print_string(), csocket, draw_info(), ClientSocket::fd, item_struct::inv, NDI_BLACK, Player_Struct::ob, send_command(), and item_struct::tag.

Referenced by do_take().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void CompleteCmd ( unsigned char *  data,
int  len 
)

Definition at line 246 of file player.c.

References ClientSocket::command_received, ClientSocket::command_sent, ClientSocket::command_time, csocket, GetInt_String(), GetShort_String(), LOG(), LOG_ERROR, and script_sync().

+ Here is the call graph for this function:

void fire_dir ( int  dir)

Definition at line 151 of file player.c.

References Player_Struct::count, cpl, dfire, Player_Struct::input_state, MAX_BUF, Playing, SC_NORMAL, and send_command().

Referenced by button_map_event(), on_drawingarea_map_button_press_event(), parse_game_button_press(), and parse_key().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void look_at ( int  x,
int  y 
)

Definition at line 75 of file player.c.

References cs_print_string(), csocket, and ClientSocket::fd.

Referenced by button_map_event(), on_drawingarea_map_button_press_event(), and parse_game_button_press().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void move_player ( int  dir)

Definition at line 99 of file player.c.

References directions, SC_NORMAL, and send_command().

Referenced by button_map_event(), on_drawingarea_map_button_press_event(), and parse_game_button_press().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void new_player ( long  tag,
char *  name,
long  weight,
long  face 
)

Definition at line 55 of file player.c.

References copy_name, cpl, item_struct::d_name, item_struct::face, Spell_struct::next, item_struct::nrof, Player_Struct::ob, Player_Struct::spelldata, item_struct::tag, and item_struct::weight.

Referenced by PlayerCmd().

+ Here is the caller graph for this function:

void run_dir ( int  dir)

Definition at line 172 of file player.c.

References drun, MAX_BUF, SC_NORMAL, and send_command().

Referenced by parse_key().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void stop_fire ( void  )

Definition at line 116 of file player.c.

References cpl, dfire, Player_Struct::input_state, and Playing.

Referenced by keyfunc(), and parse_key_release().

+ Here is the caller graph for this function:

void stop_run ( void  )

Definition at line 166 of file player.c.

References drun, SC_FIRERUN, and send_command().

Referenced by keyfunc(), and parse_key_release().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

int dfire =-1
static

Definition at line 110 of file player.c.

Referenced by clear_fire(), clear_fire_run(), fire_dir(), and stop_fire().

const char* const directions[9]
Initial value:
= {"stay", "north", "northeast", "east", "southeast",
"south","southwest", "west", "northwest"}

Definition at line 48 of file player.c.

Referenced by insert_key(), and move_player().

int drun =-1
static

Definition at line 110 of file player.c.

Referenced by clear_fire_run(), clear_run(), run_dir(), and stop_run().

const char* const rcsid_common_player_c
Initial value:
=
"$Id: player.c 9201 2008-06-01 17:32:45Z anmaster $"

Definition at line 1 of file player.c.