version 1.54 | | version 1.55 |
---|
| | |
/* | | /* |
* static char *rcsid_skill_util_c = | | * static char *rcsid_skill_util_c = |
* "$Id: skill_util.c,v 1.54 2005/08/12 08:18:59 ryo_saeba Exp $"; | | * "$Id: skill_util.c,v 1.55 2005/08/12 13:46:34 ryo_saeba Exp $"; |
*/ | | */ |
/* | | /* |
CrossFire, A Multiplayer game for X-windows | | CrossFire, A Multiplayer game for X-windows |
| | |
#include <living.h> /* for defs of STR,CON,DEX,etc. -b.t.*/ | | #include <living.h> /* for defs of STR,CON,DEX,etc. -b.t.*/ |
#include <spells.h> | | #include <spells.h> |
| | |
char *skill_names[NUM_SKILLS]; | | const char *skill_names[NUM_SKILLS]; |
| | |
/* init_skills basically just sets up the skill_names table | | /* init_skills basically just sets up the skill_names table |
* above. The index into the array is set up by the | | * above. The index into the array is set up by the |
| | |
| | |
clear_win_info(op); | | clear_win_info(op); |
new_draw_info(NDI_UNIQUE, 0,op,"Player skills:"); | | new_draw_info(NDI_UNIQUE, 0,op,"Player skills:"); |
if (num_skills_found > 1) qsort(skills, num_skills_found, MAX_BUF, (int (*)())strcmp); | | if (num_skills_found > 1) qsort(skills, num_skills_found, MAX_BUF, (int (*)(const void*, const void*))strcmp); |
| | |
for (i=0; i<num_skills_found; i++) { | | for (i=0; i<num_skills_found; i++) { |
new_draw_info(NDI_UNIQUE, 0, op, skills[i]); | | new_draw_info(NDI_UNIQUE, 0, op, skills[i]); |
| | |
* our own find_skill_by_name so we can try to do better string matching. | | * our own find_skill_by_name so we can try to do better string matching. |
*/ | | */ |
| | |
int use_skill(object *op, char *string) { | | int use_skill(object *op, const char *string) { |
object *skop; | | object *skop; |
int len; | | int len; |
| | |