MCPcopy Create free account
hub / github.com/NetHack/NetHack / invert_all_on_page

Function invert_all_on_page

outdated/win/gem/wingem1.c:1774–1798  ·  view source on GitHub ↗
(start, page, acc)

Source from the content-addressed store, hash-verified

1772}
1773
1774void
1775invert_all_on_page(start, page, acc)
1776int start, page;
1777char acc;
1778{
1779 Gem_menu_item *curr;
1780
1781 if (start < 0 || page < 0)
1782 return;
1783
1784 for (curr = invent_list; start-- && curr; curr = curr->Gmi_next)
1785 ;
1786 for (; page-- && curr; curr = curr->Gmi_next) {
1787 if (!menuitem_invert_test(0, curr->Gmi_itemflags, curr->Gmi_selected)
1788 continue;
1789
1790 if (curr->Gmi_identifier && (acc == 0 || curr->Gmi_groupacc == acc)) {
1791 if (curr->Gmi_selected) {
1792 curr->Gmi_selected = FALSE;
1793 curr->Gmi_count = -1L;
1794 } else
1795 curr->Gmi_selected = TRUE;
1796 }
1797 }
1798}
1799
1800/************************* Inv_Handler and Inv_Init
1801 * *******************************/

Callers 2

Inv_HandlerFunction · 0.70
mar_display_nhwindowFunction · 0.70

Calls 1

menuitem_invert_testFunction · 0.85

Tested by

no test coverage detected