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

Method OnEditLoadScrap

editor/MainFrm.cpp:2284–2303  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2282 EditorStatus("Group saved to %s", filename);
2283}
2284
2285void CMainFrame::OnEditLoadScrap() {
2286 CString filter = "D3 Group Files (*.grp)|*.grp||";
2287 char filename[255];
2288 group *newscrap;
2289
2290 if (!OpenFileDialog(this, (LPCSTR)filter, filename, Current_scrap_dir, sizeof(Current_scrap_dir)))
2291 return;
2292
2293 if (!strchr(filename, '.'))
2294 strcat(filename, ".grp");
2295
2296 newscrap = LoadGroup(filename);
2297
2298 if (newscrap) {
2299 if (Scrap)
2300 FreeGroup(Scrap);
2301 Scrap = newscrap;
2302 EditorStatus("Group loaded from %s", filename);
2303 }
2304}
2305
2306// Copies the selected rooms to the scrap buffer.

Callers

nothing calls this directly

Calls 4

OpenFileDialogFunction · 0.85
LoadGroupFunction · 0.85
FreeGroupFunction · 0.85
EditorStatusFunction · 0.85

Tested by

no test coverage detected