Changeset 339 for trunk/Start.pas
- Timestamp:
- Apr 1, 2021, 6:12:35 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Start.pas
r323 r339 865 865 s := Phrases.Lookup('MPMAP') 866 866 else if Page = pgStartMap then 867 s := Copy(MapFileName, 1, Length(MapFileName) - 9)867 s := Copy(MapFileName, 1, Length(MapFileName) - Length(CevoMapExt)) 868 868 else if Page = pgEditMap then 869 869 s := List.Items[List.ItemIndex] … … 1008 1008 end; 1009 1009 pgEditMap: 1010 EditMap( MapFileName, lxmax, lymax, StartLandMass);1010 EditMap(GetMapsDir + DirectorySeparator + MapFileName, lxmax, lymax, StartLandMass); 1011 1011 pgEditRandom: // new map 1012 1012 begin … … 1023 1023 end; 1024 1024 MapFileName := Format(Phrases.Lookup('MAP'), [MapCount]) + CevoMapExt; 1025 EditMap(MapFileName, WorldSizes[WorldSize].X, WorldSizes[WorldSize].Y, StartLandMass); 1025 EditMap(GetMapsDir + DirectorySeparator + MapFileName, 1026 WorldSizes[WorldSize].X, WorldSizes[WorldSize].Y, StartLandMass); 1026 1027 end; 1027 1028 end; … … 1059 1060 if Page = pgEditMap then 1060 1061 MapFileName := List.Items[List.ItemIndex] + CevoMapExt; 1061 MiniMap.LoadFromMapFile(GetMapsDir + DirectorySeparator + MapFileName, nMapLandTiles, nMapStartPositions); 1062 MiniMap.LoadFromMapFile(GetMapsDir + DirectorySeparator + MapFileName, 1063 nMapLandTiles, nMapStartPositions); 1062 1064 if Page = pgEditMap then 1063 1065 SmartInvalidate(x0Mini - 112, y0Mini + 61, x0Mini + 112, y0Mini + 91); … … 1234 1236 if FindFirst(GetMapsDir + DirectorySeparator + '*' + CevoMapExt, $21, f) = 0 then 1235 1237 repeat 1236 Maps.Add(Copy(f.Name, 1, Length(f.Name) - 9));1238 Maps.Add(Copy(f.Name, 1, Length(f.Name) - Length(CevoMapExt))); 1237 1239 until FindNext(f) <> 0; 1238 1240 FindClose(F); 1239 1241 Maps.Sort; 1240 1242 Maps.Insert(0, Phrases.Lookup('RANMAP')); 1241 ListIndex[tbMain] := Maps.IndexOf(Copy(MapFileName, 1, Length(MapFileName) - 9));1243 ListIndex[tbMain] := Maps.IndexOf(Copy(MapFileName, 1, Length(MapFileName) - Length(CevoMapExt))); 1242 1244 if ListIndex[tbMain] < 0 then 1243 1245 ListIndex[tbMain] := 0;
Note:
See TracChangeset
for help on using the changeset viewer.