Remove obsolete find_skates function

find_skates was still in use for its one intended case, but objdescr_is
has been around for a few years now and can do just as good a job
without having to hardcode the first and last boots in objects[].
This commit is contained in:
copperwater
2022-08-13 21:09:48 -04:00
committed by Pasi Kallinen
parent 1a6456ad82
commit 549dfb92ea
3 changed files with 7 additions and 25 deletions

View File

@@ -341,21 +341,6 @@ objdescr_is(struct obj* obj, const char * descr)
return !strcmp(objdescr, descr);
}
/* find the object index for snow boots; used [once] by slippery ice code */
int
find_skates(void)
{
register int i;
register const char *s;
for (i = SPEED_BOOTS; i <= LEVITATION_BOOTS; i++)
if ((s = OBJ_DESCR(objects[i])) != 0 && !strcmp(s, "snow boots"))
return i;
impossible("snow boots not found?");
return -1; /* not 0, or caller would try again each move */
}
/* level dependent initialization */
void
oinit(void)
@@ -992,7 +977,7 @@ rename_disco(void)
if (oclass != prev_class) {
any.a_int = 0;
add_menu(tmpwin, &nul_glyphinfo, &any, 0, 0,
iflags.menu_headings, clr,
iflags.menu_headings, clr,
let_to_name(oclass, FALSE, FALSE),
MENU_ITEMFLAGS_NONE);
prev_class = oclass;