mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-02-17 01:21:12 +00:00
Remove menu number of slots property
Remove unused and dead code.
This commit is contained in:
parent
c0bad27f43
commit
affea5aef3
2 changed files with 0 additions and 37 deletions
|
@ -59,7 +59,6 @@ typedef struct _tag_menuframework
|
|||
int cursor;
|
||||
|
||||
int nitems;
|
||||
int nslots;
|
||||
void *items[64];
|
||||
|
||||
const char *statusbar;
|
||||
|
|
|
@ -317,19 +317,12 @@ Field_Key(menufield_s *f, int key)
|
|||
void
|
||||
Menu_AddItem(menuframework_s *menu, void *item)
|
||||
{
|
||||
if (menu->nitems == 0)
|
||||
{
|
||||
menu->nslots = 0;
|
||||
}
|
||||
|
||||
if (menu->nitems < MAXMENUITEMS)
|
||||
{
|
||||
menu->items[menu->nitems] = item;
|
||||
((menucommon_s *)menu->items[menu->nitems])->parent = menu;
|
||||
menu->nitems++;
|
||||
}
|
||||
|
||||
menu->nslots = Menu_TallySlots(menu);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -602,35 +595,6 @@ Menu_SlideItem(menuframework_s *s, int dir)
|
|||
}
|
||||
}
|
||||
|
||||
int
|
||||
Menu_TallySlots(menuframework_s *menu)
|
||||
{
|
||||
int i;
|
||||
int total = 0;
|
||||
|
||||
for (i = 0; i < menu->nitems; i++)
|
||||
{
|
||||
if (((menucommon_s *)menu->items[i])->type == MTYPE_LIST)
|
||||
{
|
||||
int nitems = 0;
|
||||
const char **n = ((menulist_s *)menu->items[i])->itemnames;
|
||||
|
||||
while (*n)
|
||||
{
|
||||
nitems++, n++;
|
||||
}
|
||||
|
||||
total += nitems;
|
||||
}
|
||||
else
|
||||
{
|
||||
total++;
|
||||
}
|
||||
}
|
||||
|
||||
return total;
|
||||
}
|
||||
|
||||
void
|
||||
MenuList_Draw(menulist_s *l)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue