MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / FillMatcenMenu

Method FillMatcenMenu

editor/DallasMainDlg.cpp:11969–11985  ·  view source on GitHub ↗

Fills up the given menu with the matcen list NOTE: Command ID's of objects items start at the given command_offset

Source from the content-addressed store, hash-verified

11967// Fills up the given menu with the matcen list
11968// NOTE: Command ID's of objects items start at the given command_offset
11969int CDallasMainDlg::FillMatcenMenu(CMenu *matcen_menu, int command_offset) {
11970 int p, matcens_added;
11971
11972 // Scan the list, adding triggers to the list
11973 matcens_added = 0;
11974
11975 for (p = 0; p < MAX_MATCENS; p++) {
11976 if (MatcenValid(p)) {
11977 char matcen_name[MAX_MATCEN_NAME_LEN + 1];
11978 Matcen[p]->GetName(matcen_name);
11979 matcen_menu->AppendMenu(MF_ENABLED | MF_UNCHECKED | MF_STRING, command_offset + p, matcen_name);
11980 matcens_added++;
11981 }
11982 }
11983
11984 return (matcens_added);
11985}
11986
11987// Fills up the given menu with the level goal list
11988// NOTE: Command ID's of objects items start at the given command_offset

Callers

nothing calls this directly

Calls 2

MatcenValidFunction · 0.85
GetNameMethod · 0.45

Tested by

no test coverage detected