| 675 | } |
| 676 | |
| 677 | void CScriptLevelInterface::UpdateScriptListWithScripts() { |
| 678 | CComboBox *combo = (CComboBox *)GetDlgItem(IDC_SELECTED_SCRIPT); |
| 679 | if (!combo) |
| 680 | return; |
| 681 | |
| 682 | combo->ResetContent(); |
| 683 | |
| 684 | SetStatus("Updating script list with scripts"); |
| 685 | |
| 686 | char buffer[_MAX_PATH]; |
| 687 | int length, i; |
| 688 | |
| 689 | if (m_ShowNonCheckedOut) { |
| 690 | char olddir[_MAX_PATH]; |
| 691 | ddio_GetWorkingDir(olddir, _MAX_PATH); |
| 692 | ddio_SetWorkingDir(LocalScriptDir); |
| 693 | |
| 694 | if (ddio_FindFileStart("*.cpp", buffer)) { |
| 695 | combo->AddString(buffer); |
| 696 | while (ddio_FindNextFile(buffer)) { |
| 697 | combo->AddString(buffer); |
| 698 | } |
| 699 | } |
| 700 | ddio_FindFileClose(); |
| 701 | |
| 702 | ddio_SetWorkingDir(olddir); |
| 703 | |
| 704 | /* |
| 705 | for (i=0;i<MAX_GAMEFILES;i++){ |
| 706 | if(Gamefiles[i].used){ |
| 707 | |
| 708 | //look for cpp's |
| 709 | length = strlen(Gamefiles[i].name); |
| 710 | |
| 711 | if(length>4 && !stricmp(&Gamefiles[i].name[length-4],".cpp")){ |
| 712 | strcpy(buffer,Gamefiles[i].name); |
| 713 | combo->AddString(buffer); |
| 714 | } |
| 715 | } |
| 716 | } |
| 717 | */ |
| 718 | |
| 719 | } else { |
| 720 | |
| 721 | for (i = 0; i < MAX_TRACKLOCKS; i++) { |
| 722 | if (GlobalTrackLocks[i].used && GlobalTrackLocks[i].pagetype == PAGETYPE_GAMEFILE) { |
| 723 | |
| 724 | // look for checked out cpp's |
| 725 | length = strlen(GlobalTrackLocks[i].name); |
| 726 | |
| 727 | if (length > 4 && !stricmp(&GlobalTrackLocks[i].name[length - 4], ".cpp")) { |
| 728 | strcpy(buffer, GlobalTrackLocks[i].name); |
| 729 | combo->AddString(buffer); |
| 730 | } |
| 731 | } |
| 732 | } |
| 733 | } |
| 734 |
nothing calls this directly
no test coverage detected