version 1.26 | | version 1.27 |
---|
| | |
/* | | /* |
* static char *rcsid_sock_info_c = | | * static char *rcsid_sock_info_c = |
* "$Id: info.c,v 1.26 2006/03/18 15:05:37 ryo_saeba Exp $"; | | * "$Id: info.c,v 1.27 2006/05/05 09:41:15 ryo_saeba Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
void draw_ext_info_format( | | void draw_ext_info_format( |
int flags, int pri, const object *pl, uint8 type, | | int flags, int pri, const object *pl, uint8 type, |
uint8 subtype, const char* old_format, | | uint8 subtype, const char* old_format, |
char* new_format, ...){ | | const char* new_format, ...){ |
| | |
char buf[HUGE_BUF]; | | char buf[HUGE_BUF]; |
if(!pl || (pl->type!=PLAYER) || (pl->contr==NULL)) | | if(!pl || (pl->type!=PLAYER) || (pl->contr==NULL)) |
| | |
* Writes to everyone on the map *except* op. This is useful for emotions. | | * Writes to everyone on the map *except* op. This is useful for emotions. |
*/ | | */ |
| | |
void new_info_map_except(int color, mapstruct *map, object *op, const char *str) { | | void new_info_map_except(int color, const mapstruct *map, const object *op, const char *str) { |
player *pl; | | player *pl; |
| | |
for(pl = first_player; pl != NULL; pl = pl->next) | | for(pl = first_player; pl != NULL; pl = pl->next) |
| | |
* Writes to everyone on the map except op1 and op2 | | * Writes to everyone on the map except op1 and op2 |
*/ | | */ |
| | |
void new_info_map_except2(int color, mapstruct *map, object *op1, object *op2, | | void new_info_map_except2(int color, const mapstruct *map, const object *op1, const object *op2, |
const char *str) { | | const char *str) { |
player *pl; | | player *pl; |
| | |
| | |
* Writes to everyone on the specified map | | * Writes to everyone on the specified map |
*/ | | */ |
| | |
void new_info_map(int color, mapstruct *map, const char *str) { | | void new_info_map(int color, const mapstruct *map, const char *str) { |
player *pl; | | player *pl; |
| | |
for(pl = first_player; pl != NULL; pl = pl->next) | | for(pl = first_player; pl != NULL; pl = pl->next) |
| | |
/** | | /** |
* Get player's current range attack in obuf. | | * Get player's current range attack in obuf. |
*/ | | */ |
void rangetostring(object *pl,char *obuf) | | void rangetostring(const object *pl,char *obuf) |
{ | | { |
switch(pl->contr->shoottype) { | | switch(pl->contr->shoottype) { |
case range_none: | | case range_none: |
| | |
/** | | /** |
* Sets player title. | | * Sets player title. |
*/ | | */ |
void set_title(object *pl, char *buf) | | void set_title(const object *pl, char *buf) |
{ | | { |
/* Eneq(@csd.uu.se): Let players define their own titles. */ | | /* Eneq(@csd.uu.se): Let players define their own titles. */ |
if (pl->contr->own_title[0]=='\0') | | if (pl->contr->own_title[0]=='\0') |