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

Go to the source code of this file.

Macros

#define DIRECTIONS_NUM   9
 

Functions

void client_send_fire (int num, tag_t tag)
 
void move_keys (int num)
 
int dir_from_tile_coords (int tx, int ty)
 

Variables

static const int directions_fire [DIRECTIONS_NUM]
 

Detailed Description

Handles movement events.

Definition in file move.c.

Macro Definition Documentation

#define DIRECTIONS_NUM   9

Number of the possible directions.

Definition at line 36 of file move.c.

Function Documentation

int dir_from_tile_coords ( int  tx,
int  ty 
)

Transform tile coordinates into direction, which can be used as a result for functions like move_keys() or ::directions_move (return value - 1).

Parameters
txTile X.
tyTile Y.
Returns
The direction, 1-9.

Definition at line 89 of file move.c.

Variable Documentation

const int directions_fire[DIRECTIONS_NUM]
static
Initial value:
= {
6, 5, 4, 7, 0, 3, 8, 1, 2
}

Directions to fire into.

Definition at line 41 of file move.c.