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

Method UpdateAvailableWithScripts

editor/ScriptLevelInterface.cpp:514–540  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

512}
513
514void CScriptLevelInterface::UpdateAvailableWithScripts() {
515 CCheckListBox *list = (CCheckListBox *)GetDlgItem(IDC_LIST_AVAILABLE);
516 if (!list)
517 return;
518
519 list->ResetContent();
520
521 SetStatus("Updating available scripts");
522
523 char buffer[_MAX_PATH];
524 int length;
525
526 for (int i = 0; i < MAX_GAMEFILES; i++) {
527 if (Gamefiles[i].used) {
528 // we're only adding .d3l's to this list
529 length = strlen(Gamefiles[i].name);
530 if (!stricmp(&Gamefiles[i].name[length - 4], ".cpp") &&
531 (mng_FindTrackLock(Gamefiles[i].name, PAGETYPE_GAMEFILE) == -1)) {
532 strcpy(buffer, Gamefiles[i].name);
533 buffer[length - 4] = '\0';
534 list->AddString(buffer);
535 }
536 }
537 }
538
539 SetStatus("Ready");
540}
541
542void CScriptLevelInterface::UpdateCheckedOutWithLevels() {
543 CCheckListBox *list = (CCheckListBox *)GetDlgItem(IDC_LIST_CHECKEDOUT);

Callers

nothing calls this directly

Calls 2

mng_FindTrackLockFunction · 0.85
AddStringMethod · 0.80

Tested by

no test coverage detected