server/c_move.c File Reference
#include <global.h>
#include <sproto.h>
Go to the source code of this file.
Functions |
| static int | move_internal (object *op, char *params, int dir) |
| int | command_east (object *op, char *params) |
| int | command_north (object *op, char *params) |
| int | command_northeast (object *op, char *params) |
| int | command_northwest (object *op, char *params) |
| int | command_south (object *op, char *params) |
| int | command_southeast (object *op, char *params) |
| int | command_southwest (object *op, char *params) |
| int | command_west (object *op, char *params) |
| int | command_stay (object *op, char *params) |
| int | command_turn_right (object *op, char *params) |
| int | command_turn_left (object *op, char *params) |
| int | command_push_object (object *op, char *params) |
Detailed Description
Handles main movement commands.
Definition in file c_move.c.
Function Documentation
| int command_east |
( |
object * |
op, |
|
|
char * |
params | |
|
) |
| | |
Move player to east.
- Parameters:
-
| op | Object to move. |
| params | Command parameters. |
- Returns:
- Always returns 0.
Definition at line 68 of file c_move.c.
| int command_north |
( |
object * |
op, |
|
|
char * |
params | |
|
) |
| | |
Move player to north.
- Parameters:
-
| op | Object to move. |
| params | Command parameters. |
- Returns:
- Always returns 0.
Definition at line 78 of file c_move.c.
| int command_northeast |
( |
object * |
op, |
|
|
char * |
params | |
|
) |
| | |
Move player to northeast.
- Parameters:
-
| op | Object to move. |
| params | Command parameters. |
- Returns:
- Always returns 0.
Definition at line 88 of file c_move.c.
| int command_northwest |
( |
object * |
op, |
|
|
char * |
params | |
|
) |
| | |
Move player to northwest.
- Parameters:
-
| op | Object to move. |
| params | Command parameters. |
- Returns:
- Always returns 0.
Definition at line 98 of file c_move.c.
| int command_push_object |
( |
object * |
op, |
|
|
char * |
params | |
|
) |
| | |
Push object in front of the player.
- Parameters:
-
| op | Object. |
| params | Parameters. |
- Returns:
- 0.
Definition at line 198 of file c_move.c.
| int command_south |
( |
object * |
op, |
|
|
char * |
params | |
|
) |
| | |
Move player to south.
- Parameters:
-
| op | Object to move. |
| params | Command parameters. |
- Returns:
- Always returns 0.
Definition at line 108 of file c_move.c.
| int command_southeast |
( |
object * |
op, |
|
|
char * |
params | |
|
) |
| | |
Move player to southeast.
- Parameters:
-
| op | Object to move. |
| params | Command parameters. |
- Returns:
- Always returns 0.
Definition at line 118 of file c_move.c.
| int command_southwest |
( |
object * |
op, |
|
|
char * |
params | |
|
) |
| | |
Move player to southwest.
- Parameters:
-
| op | Object to move. |
| params | Command parameters. |
- Returns:
- Always returns 0.
Definition at line 128 of file c_move.c.
| int command_stay |
( |
object * |
op, |
|
|
char * |
params | |
|
) |
| | |
Stay command.
- Parameters:
-
| op | The object. |
| params | Command parameters. |
- Returns:
- Always returns 0.
Definition at line 148 of file c_move.c.
| int command_turn_left |
( |
object * |
op, |
|
|
char * |
params | |
|
) |
| | |
Turn object to face one direction to left.
- Parameters:
-
| op | Object. |
| params | Parameters. |
- Returns:
- 1.
Definition at line 181 of file c_move.c.
| int command_turn_right |
( |
object * |
op, |
|
|
char * |
params | |
|
) |
| | |
Turn object to face one direction to right.
- Parameters:
-
| op | Object. |
| params | Parameters. |
- Returns:
- 11.
Definition at line 164 of file c_move.c.
| int command_west |
( |
object * |
op, |
|
|
char * |
params | |
|
) |
| | |
Move player to west.
- Parameters:
-
| op | Object to move. |
| params | Command parameters. |
- Returns:
- Always returns 0.
Definition at line 138 of file c_move.c.
| static int move_internal |
( |
object * |
op, |
|
|
char * |
params, |
|
|
int |
dir | |
|
) |
| | [static] |
Static command for commands like east, west, etc to use.
- Parameters:
-
| op | Object to move. |
| params | Parameters, controls things like running and firing. |
| dir | Direction to move. |
- Returns:
- Always returns 0.
Definition at line 39 of file c_move.c.