Changeset 339 for trunk/Start.pas


Ignore:
Timestamp:
Apr 1, 2021, 6:12:35 PM (3 years ago)
Author:
chronos
Message:
  • Fixed: Cevo map extension ".cevo map" was not valid Windows file extension and it was not possible to associate an application with such extension. Changed to ".cevomap" without space character.
  • Added: .cevomap files associated with C-evo executable. Open map editor directly for the files.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Start.pas

    r323 r339  
    865865      s := Phrases.Lookup('MPMAP')
    866866    else if Page = pgStartMap then
    867       s := Copy(MapFileName, 1, Length(MapFileName) - 9)
     867      s := Copy(MapFileName, 1, Length(MapFileName) - Length(CevoMapExt))
    868868    else if Page = pgEditMap then
    869869      s := List.Items[List.ItemIndex]
     
    10081008      end;
    10091009    pgEditMap:
    1010       EditMap(MapFileName, lxmax, lymax, StartLandMass);
     1010      EditMap(GetMapsDir + DirectorySeparator + MapFileName, lxmax, lymax, StartLandMass);
    10111011    pgEditRandom: // new map
    10121012      begin
     
    10231023        end;
    10241024        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);
    10261027      end;
    10271028  end;
     
    10591060        if Page = pgEditMap then
    10601061          MapFileName := List.Items[List.ItemIndex] + CevoMapExt;
    1061         MiniMap.LoadFromMapFile(GetMapsDir + DirectorySeparator + MapFileName, nMapLandTiles, nMapStartPositions);
     1062        MiniMap.LoadFromMapFile(GetMapsDir + DirectorySeparator + MapFileName,
     1063          nMapLandTiles, nMapStartPositions);
    10621064        if Page = pgEditMap then
    10631065          SmartInvalidate(x0Mini - 112, y0Mini + 61, x0Mini + 112, y0Mini + 91);
     
    12341236  if FindFirst(GetMapsDir + DirectorySeparator + '*' + CevoMapExt, $21, f) = 0 then
    12351237    repeat
    1236       Maps.Add(Copy(f.Name, 1, Length(f.Name) - 9));
     1238      Maps.Add(Copy(f.Name, 1, Length(f.Name) - Length(CevoMapExt)));
    12371239    until FindNext(f) <> 0;
    12381240  FindClose(F);
    12391241  Maps.Sort;
    12401242  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)));
    12421244  if ListIndex[tbMain] < 0 then
    12431245    ListIndex[tbMain] := 0;
Note: See TracChangeset for help on using the changeset viewer.