MCPcopy Create free account
hub / github.com/JACoders/OpenJK / UI_FeederCount

Function UI_FeederCount

code/ui/ui_main.cpp:1810–1873  ·  view source on GitHub ↗

================= UI_FeederCount ================= */

Source from the content-addressed store, hash-verified

1808=================
1809*/
1810static int UI_FeederCount(float feederID)
1811{
1812 if (feederID == FEEDER_SAVEGAMES )
1813 {
1814 if (s_savegame.saveFileCnt == -1)
1815 {
1816 ReadSaveDirectory(); //refresh
1817 UI_HandleLoadSelection();
1818#ifndef JK2_MODE
1819 UI_AdjustSaveGameListBox(s_savegame.currentLine);
1820#endif
1821 }
1822 return s_savegame.saveFileCnt;
1823 }
1824 // count number of moves for the current title
1825 else if (feederID == FEEDER_MOVES)
1826 {
1827 int count=0,i;
1828
1829 for (i=0;i<MAX_MOVES;i++)
1830 {
1831 if (datapadMoveData[uiInfo.movesTitleIndex][i].title)
1832 {
1833 count++;
1834 }
1835 }
1836
1837 return count;
1838 }
1839 else if (feederID == FEEDER_MOVES_TITLES)
1840 {
1841 return (MD_MOVE_TITLE_MAX);
1842 }
1843 else if (feederID == FEEDER_MODS)
1844 {
1845 return uiInfo.modCount;
1846 }
1847 else if (feederID == FEEDER_LANGUAGES)
1848 {
1849 return uiInfo.languageCount;
1850 }
1851 else if (feederID == FEEDER_PLAYER_SPECIES)
1852 {
1853 return uiInfo.playerSpeciesCount;
1854 }
1855 else if (feederID == FEEDER_PLAYER_SKIN_HEAD)
1856 {
1857 return uiInfo.playerSpecies[uiInfo.playerSpeciesIndex].SkinHeadCount;
1858 }
1859 else if (feederID == FEEDER_PLAYER_SKIN_TORSO)
1860 {
1861 return uiInfo.playerSpecies[uiInfo.playerSpeciesIndex].SkinTorsoCount;
1862 }
1863 else if (feederID == FEEDER_PLAYER_SKIN_LEGS)
1864 {
1865 return uiInfo.playerSpecies[uiInfo.playerSpeciesIndex].SkinLegCount;
1866 }
1867 else if (feederID == FEEDER_COLORCHOICES)

Callers

nothing calls this directly

Calls 3

ReadSaveDirectoryFunction · 0.85
UI_HandleLoadSelectionFunction · 0.85
UI_AdjustSaveGameListBoxFunction · 0.85

Tested by

no test coverage detected