Go to the documentation of this file.
30 #define tolower(C) (((C) >= 'A' && (C) <= 'Z') ? (C)-'A'+'a' : (C))
45 if (dir < 0 || dir >= 9) {
47 "Can't run into a non adjacent square.");
50 op->contr->run_on = 1;
66 op->contr->run_on = 0;
81 if (dir < 0 || dir >= 9) {
83 "Can't fire to a non adjacent square.");
86 op->contr->fire_on = 1;
100 op->contr->fire_on = 0;
114 if ( !isdigit(*
params) ) {
115 if ( strcmp(
params,
"stay") == 0 || strcmp(
params,
"down") == 0 ) dir=0;
116 else if ( strcmp(
params,
"north") == 0 || strcmp(
params,
"n") == 0 ) dir=1;
117 else if ( strcmp(
params,
"northeast") == 0 || strcmp(
params,
"ne") == 0 ) dir=2;
118 else if ( strcmp(
params,
"east") == 0 || strcmp(
params,
"e") == 0 ) dir=3;
119 else if ( strcmp(
params,
"southeast") == 0 || strcmp(
params,
"se") == 0 ) dir=4;
120 else if ( strcmp(
params,
"south") == 0 || strcmp(
params,
"s") == 0 ) dir=5;
121 else if ( strcmp(
params,
"southwest") == 0 || strcmp(
params,
"sw") == 0 ) dir=6;
122 else if ( strcmp(
params,
"west") == 0 || strcmp(
params,
"w") == 0 ) dir=7;
123 else if ( strcmp(
params,
"northwest") == 0 || strcmp(
params,
"nw") == 0 ) dir=8;
126 "Unknown direction to face: %s",
params);
131 if (dir < 0 || dir >= 9) {
133 "Can't face to a non adjacent square.");
void command_run_stop(object *op, const char *params)
int move_player(object *op, int dir)
void command_face(object *op, const char *params)
#define MSG_TYPE_COMMAND_ERROR
void command_run(object *op, const char *params)
void command_fire(object *op, const char *params)
int face_player(object *op, int dir)
void command_fire_stop(object *op, const char *params)
void draw_ext_info(int flags, int pri, const object *pl, uint8_t type, uint8_t subtype, const char *message)
void draw_ext_info_format(int flags, int pri, const object *pl, uint8_t type, uint8_t subtype, const char *format,...)