spell lint
Mark an unused function argument as UNUSED. Also, hurtle_step is the recoil from throwing or kicking while levitating, which isn't related to the recently added spellcasting line-of-sight check, so rename spell_hurtle_step to spell_aim_step.
This commit is contained in:
12
src/spell.c
12
src/spell.c
@@ -43,7 +43,7 @@ STATIC_DCL int NDECL(throwspell);
|
|||||||
STATIC_DCL void NDECL(cast_protection);
|
STATIC_DCL void NDECL(cast_protection);
|
||||||
STATIC_DCL void FDECL(spell_backfire, (int));
|
STATIC_DCL void FDECL(spell_backfire, (int));
|
||||||
STATIC_DCL const char *FDECL(spelltypemnemonic, (int));
|
STATIC_DCL const char *FDECL(spelltypemnemonic, (int));
|
||||||
STATIC_DCL boolean FDECL(spell_hurtle_step, (genericptr_t, int, int));
|
STATIC_DCL boolean FDECL(spell_aim_step, (genericptr_t, int, int));
|
||||||
|
|
||||||
/* The roles[] table lists the role-specific values for tuning
|
/* The roles[] table lists the role-specific values for tuning
|
||||||
* percent_success().
|
* percent_success().
|
||||||
@@ -1181,12 +1181,14 @@ boolean atme;
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*ARGSUSED*/
|
||||||
STATIC_OVL boolean
|
STATIC_OVL boolean
|
||||||
spell_hurtle_step(arg, x, y)
|
spell_aim_step(arg, x, y)
|
||||||
genericptr_t arg;
|
genericptr_t arg UNUSED;
|
||||||
int x, y;
|
int x, y;
|
||||||
{
|
{
|
||||||
if (!isok(x,y)) return FALSE;
|
if (!isok(x,y))
|
||||||
|
return FALSE;
|
||||||
if (!ZAP_POS(levl[x][y].typ)
|
if (!ZAP_POS(levl[x][y].typ)
|
||||||
&& !(IS_DOOR(levl[x][y].typ) && (levl[x][y].doormask & D_ISOPEN)))
|
&& !(IS_DOOR(levl[x][y].typ) && (levl[x][y].doormask & D_ISOPEN)))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@@ -1233,7 +1235,7 @@ throwspell()
|
|||||||
uc.x = u.ux;
|
uc.x = u.ux;
|
||||||
uc.y = u.uy;
|
uc.y = u.uy;
|
||||||
|
|
||||||
walk_path(&uc, &cc, spell_hurtle_step, NULL);
|
walk_path(&uc, &cc, spell_aim_step, (genericptr_t) 0);
|
||||||
|
|
||||||
u.dx = cc.x;
|
u.dx = cc.x;
|
||||||
u.dy = cc.y;
|
u.dy = cc.y;
|
||||||
|
|||||||
Reference in New Issue
Block a user