Changeset 339 for trunk/Direct.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/Direct.pas

    r338 r339  
    4343
    4444uses
    45   ScreenTools, Protocol, Start, LocalPlayer, NoTerm, Back;
     45  ScreenTools, Protocol, Start, LocalPlayer, NoTerm, Back, Global;
    4646
    4747{$R *.lfm}
     
    204204  i: integer;
    205205  s: string;
     206  FileName: string;
    206207begin
    207208  Hide;
     
    229230      end;
    230231    end
    231     else if (FileExists(ParamStr(1))) then
    232     begin
    233       Quick := True;
    234       if not LoadGame(ExtractFilePath(ParamStr(1)), ExtractFileName(ParamStr(1)
    235         ), -1, false) then
    236       begin
     232    else if (FileExists(ParamStr(1))) then begin
     233      FileName := ParamStr(1);
     234      if ExtractFileExt(FileName) = CevoExt then begin
     235        Quick := True;
     236        if not LoadGame(ExtractFilePath(ParamStr(1)), ExtractFileName(ParamStr(1)
     237        ), -1, false) then begin
     238          SimpleMessage(Phrases.Lookup('LOADERR'));
     239          Close;
     240        end;
     241      end else
     242      if ExtractFileExt(FileName) = CevoMapExt then begin
     243        Quick := True;
     244        EditMap(FileName, lxmax, lymax, 30);
     245      end else begin
    237246        SimpleMessage(Phrases.Lookup('LOADERR'));
    238247        Close;
Note: See TracChangeset for help on using the changeset viewer.