- Timestamp:
- Apr 25, 2021, 11:00:24 AM (4 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Global.pas
r364 r381 6 6 CevoExt = '.cevo'; 7 7 CevoMapExt = '.cevomap'; 8 CevoMapPictureExt = '.png'; 8 9 CevoTribeExt = '.tribe.txt'; 9 10 CevoHomepageShort = 'app.zdechov.net/c-evo'; -
trunk/Packages/CevoComponents/Directories.pas
r379 r381 79 79 end; 80 80 81 procedure CopyFiles; 82 begin 83 if DirectoryExists(GetSavedDir(True)) and not DirectoryExists(GetSavedDir(False)) then 84 CopyDir(GetSavedDir(True), GetSavedDir(False), '*.*'); 85 if DirectoryExists(GetMapsDir(True)) and not DirectoryExists(GetMapsDir(False)) then 86 CopyDir(GetMapsDir(True), GetMapsDir(False), '*.*'); 87 end; 88 81 89 procedure UnitInit; 82 90 var … … 87 95 88 96 AppDataDir := GetAppConfigDir(False); 89 if AppDataDir = '' then 90 DataDir := HomeDir 91 else 92 begin 97 if AppDataDir = '' then DataDir := HomeDir 98 else begin 93 99 if not DirectoryExists(AppDataDir) then ForceDirectories(AppDataDir); 94 100 DataDir := AppDataDir; 95 101 end; 96 97 CopyDir(GetSavedDir(True), GetSavedDir(False), '*.*'); 98 CopyDir(GetMapsDir(True), GetMapsDir(False), '*.*'); 102 CopyFiles; 99 103 end; 100 104 -
trunk/Start.pas
r373 r381 1624 1624 f: file; 1625 1625 ok: boolean; 1626 MapPictureFileName: string; 1626 1627 begin 1627 1628 if List.ItemIndex >= 0 then … … 1644 1645 begin 1645 1646 SimpleMessage(Format(Phrases.Lookup('NOFILENAME'), [NewName[i]])); 1646 exit1647 Exit; 1647 1648 end; 1648 1649 if Page = pgLoad then … … 1659 1660 except 1660 1661 // Play('INVALID'); 1661 ok := false 1662 end; 1663 if Page <> pgLoad then 1664 try // rename map picture 1662 ok := False; 1663 end; 1664 if Page <> pgLoad then begin 1665 // Rename map picture 1666 MapPictureFileName := GetMapsDir + DirectorySeparator + 1667 List.Items[List.ItemIndex] + CevoMapPictureExt; 1668 if FileExists(MapPictureFileName) then 1669 try 1665 1670 AssignFile(f, GetMapsDir + DirectorySeparator + List.Items[List.ItemIndex] 1666 + '.png');1667 Rename(f, GetMapsDir + DirectorySeparator + NewName + '.png');1671 + CevoMapPictureExt); 1672 Rename(f, GetMapsDir + DirectorySeparator + NewName + CevoMapPictureExt); 1668 1673 except 1669 1674 end; 1670 if ok then1671 begin1675 end; 1676 if ok then begin 1672 1677 if Page = pgLoad then 1673 1678 FormerGames[List.ItemIndex] := NewName -
trunk/UMiniMap.pas
r328 r381 115 115 ImageFileName: string; 116 116 begin 117 ImageFileName := Copy(FileName, 1, Length(FileName) - Length(CevoMapExt)) + '.png';117 ImageFileName := Copy(FileName, 1, Length(FileName) - Length(CevoMapExt)) + CevoMapPictureExt; 118 118 Mode := mmPicture; 119 119 if LoadGraphicFile(Bitmap, ImageFileName, [gfNoError]) then
Note:
See TracChangeset
for help on using the changeset viewer.