Changeset 20


Ignore:
Timestamp:
Jan 8, 2017, 12:23:55 PM (8 years ago)
Author:
chronos
Message:
Location:
trunk
Files:
15 edited
5 moved

Legend:

Unmodified
Added
Removed
  • trunk/Back.pas

    r10 r20  
    4141  if FullScreen then
    4242  begin
    43     if FileExists(HomeDir + 'Graphics\Background.bmp') or
    44       FileExists(HomeDir + 'Graphics\Background.png') then
     43    if FileExists(HomeDir + 'Graphics' + DirectorySeparator + 'Background.bmp') or
     44      FileExists(HomeDir + 'Graphics' + DirectorySeparator + 'Background.png') then
    4545    begin
    4646      img := TBitmap.Create;
    47       LoadGraphicFile(img, HomeDir + 'Graphics\Background');
     47      LoadGraphicFile(img, HomeDir + 'Graphics' + DirectorySeparator + 'Background');
    4848    end
    4949  end
  • trunk/Directories.pas

    r19 r20  
    2828function LocalizedFilePath(path: string): string;
    2929begin
    30   result := DataDir + 'Localization\' + path;
     30  result := DataDir + 'Localization' + DirectorySeparator + path;
    3131  if not FileExists(result) then
    3232    result := HomeDir + path
     
    5252
    5353  // Copy appdata if not done yet
    54   if FindFirst(HomeDir + 'AppData\Saved\*.cevo', $21, src) = 0 then
     54  if FindFirst(HomeDir + 'AppData' + DirectorySeparator + 'Saved' + DirectorySeparator + '*.cevo', $21, src) = 0 then
    5555    repeat
    56       if (FindFirst(DataDir + 'Saved\' + src.Name, $21, dst) <> 0) or
     56      if (FindFirst(DataDir + 'Saved' + DirectorySeparator + src.Name, $21, dst) <> 0) or
    5757        (dst.Time < src.Time) then
    58         CopyFile(PChar(HomeDir + 'AppData\Saved\' + src.Name),
    59           PChar(DataDir + 'Saved\' + src.Name), false);
     58        CopyFile(PChar(HomeDir + 'AppData' + DirectorySeparator + 'Saved' + DirectorySeparator + src.Name),
     59          PChar(DataDir + 'Saved' + DirectorySeparator + src.Name), false);
    6060    until FindNext(src) <> 0;
    6161end;
  • trunk/GameServer.pas

    r18 r20  
    530530  s: string[255];
    531531begin
    532   MapFile := TFileStream.Create(DataDir + 'Maps\' + FileName,
     532  MapFile := TFileStream.Create(DataDir + 'Maps' + DirectorySeparator + FileName,
    533533    fmCreate or fmShareExclusive);
    534534  MapFile.Position := 0;
     
    553553  MapFile := nil;
    554554  try
    555     MapFile := TFileStream.Create(DataDir + 'Maps\' + FileName,
     555    MapFile := TFileStream.Create(DataDir + 'Maps' + DirectorySeparator + FileName,
    556556      fmOpenRead or fmShareExclusive);
    557557    MapFile.Position := 0;
  • trunk/LocalPlayer/CityScreen.pas

    r17 r20  
    216216  Back.Height := ClientHeight;
    217217  Template := TBitmap.Create;
    218   LoadGraphicFile(Template, HomeDir + 'Graphics\City', gfNoGamma);
     218  LoadGraphicFile(Template, HomeDir + 'Graphics' + DirectorySeparator + 'City', gfNoGamma);
    219219  Template.PixelFormat := pf8bit;
    220220  CityMapTemplate := TBitmap.Create;
    221   LoadGraphicFile(CityMapTemplate, HomeDir + 'Graphics\BigCityMap', gfNoGamma);
     221  LoadGraphicFile(CityMapTemplate, HomeDir + 'Graphics' + DirectorySeparator + 'BigCityMap', gfNoGamma);
    222222  CityMapTemplate.PixelFormat := pf8bit;
    223223  SmallCityMapTemplate := TBitmap.Create;
    224   LoadGraphicFile(SmallCityMapTemplate, HomeDir + 'Graphics\SmallCityMap',
     224  LoadGraphicFile(SmallCityMapTemplate, HomeDir + 'Graphics' + DirectorySeparator + 'SmallCityMap',
    225225    gfNoGamma);
    226226  SmallCityMapTemplate.PixelFormat := pf24bit;
  • trunk/LocalPlayer/Draft.pas

    r17 r20  
    9191  Back.Height := ClientHeight;
    9292  Template := TBitmap.Create;
    93   LoadGraphicFile(Template, HomeDir + 'Graphics\MiliRes', gfNoGamma);
     93  LoadGraphicFile(Template, HomeDir + 'Graphics' + DirectorySeparator + 'MiliRes', gfNoGamma);
    9494  Template.PixelFormat := pf8bit;
    9595end;
  • trunk/LocalPlayer/Help.pas

    r17 r20  
    11651165    List := TStringList.Create;
    11661166    plus := TStringList.Create;
    1167     if FindFirst(HomeDir + 'Graphics\*.credits.txt', $27, sr) = 0 then
     1167    if FindFirst(HomeDir + 'Graphics' + DirectorySeparator + '*.credits.txt', $27, sr) = 0 then
    11681168      repeat
    1169         plus.LoadFromFile(HomeDir + 'Graphics\' + sr.Name);
     1169        plus.LoadFromFile(HomeDir + 'Graphics' + DirectorySeparator + sr.Name);
    11701170        List.AddStrings(plus);
    11711171      until FindNext(sr) <> 0;
     
    11991199  begin
    12001200    List := TStringList.Create;
    1201     List.LoadFromFile(HomeDir + 'Sounds\sound.credits.txt');
     1201    List.LoadFromFile(HomeDir + 'Sounds' + DirectorySeparator + 'sound.credits.txt');
    12021202    for i := 0 to List.Count - 1 do
    12031203    begin
     
    19131913        case Link and $FF of
    19141914          1:
    1915              OpenDocument(pchar(HomeDir + 'AI Template\AI development manual.html'));{ *Převedeno z ShellExecute* }
     1915             OpenDocument(pchar(HomeDir + 'AI Template' + DirectorySeparator + 'AI development manual.html'));{ *Převedeno z ShellExecute* }
    19161916          2:
    19171917            OpenURL('http://c-evo.org');{ *Převedeno z ShellExecute* }
  • trunk/LocalPlayer/NatStat.pas

    r17 r20  
    9292  Back.Height := ClientHeight;
    9393  Template := TBitmap.Create;
    94   LoadGraphicFile(Template, HomeDir + 'Graphics\Nation', gfNoGamma);
     94  LoadGraphicFile(Template, HomeDir + 'Graphics' + DirectorySeparator + 'Nation', gfNoGamma);
    9595  Template.PixelFormat := pf8bit;
    9696end;
  • trunk/LocalPlayer/PVSB.pas

    r18 r20  
    4141procedure InitPVSB;
    4242begin
     43  {$IFDEF WINDOWS}
    4344  with sb.si do
    4445  begin
     
    5455  else
    5556    ShowWindow(sb.h, SW_SHOW)
     57  {$ENDIF}
    5658end;
    5759
  • trunk/LocalPlayer/TechTree.pas

    r17 r20  
    130130  begin
    131131    Image := TBitmap.Create;
    132     LoadGraphicFile(Image, HomeDir + 'Help\AdvTree', gfNoGamma);
     132    LoadGraphicFile(Image, HomeDir + 'Help' + DirectorySeparator + 'AdvTree', gfNoGamma);
    133133    Image.PixelFormat := pf24bit;
    134134
  • trunk/LocalPlayer/Term.pas

    r18 r20  
    733733function CreateTribe(p: integer; FileName: string; Original: boolean): boolean;
    734734begin
    735   if not FileExists(LocalizedFilePath('Tribes\' + FileName + '.tribe.txt')) then
     735  if not FileExists(LocalizedFilePath('Tribes' + DirectorySeparator + FileName + '.tribe.txt')) then
    736736  begin
    737737    result := false;
     
    12721272    begin
    12731273      UnusedTribeFiles.Clear;
    1274       ok := FindFirst(DataDir + 'Localization\' + 'Tribes\*.tribe.txt',
     1274      ok := FindFirst(DataDir + 'Localization' + DirectorySeparator + 'Tribes' + DirectorySeparator + '*.tribe.txt',
    12751275        faArchive + faReadOnly, SearchRec) = 0;
    12761276      if not ok then
    12771277      begin
    12781278        FindClose(SearchRec);
    1279         ok := FindFirst(HomeDir + 'Tribes\*.tribe.txt', faArchive + faReadOnly,
     1279        ok := FindFirst(HomeDir + 'Tribes' + DirectorySeparator + '*.tribe.txt', faArchive + faReadOnly,
    12801280          SearchRec) = 0;
    12811281      end;
     
    34103410    doinit := true;
    34113411    if Reg.KeyExists('SOFTWARE\cevo\RegVer9') then
    3412     begin
     3412    with Reg do begin
    34133413      doinit := false;
    3414       Reg.OpenKey('SOFTWARE\cevo\RegVer9', false);
     3414      OpenKey('SOFTWARE\cevo\RegVer9', false);
    34153415      try
    3416         xxt := Reg.ReadInteger('TileWidth') div 2;
    3417         yyt := Reg.ReadInteger('TileHeight') div 2;
    3418         OptionChecked := Reg.ReadInteger('OptionChecked');
    3419         MapOptionChecked := Reg.ReadInteger('MapOptionChecked');
    3420         CityRepMask := Cardinal(Reg.ReadInteger('CityReport'));
     3416        if ValueExists('TileWidth') then xxt := ReadInteger('TileWidth') div 2;
     3417        if ValueExists('TileHeight') then yyt := ReadInteger('TileHeight') div 2;
     3418        if ValueExists('OptionChecked') then OptionChecked := ReadInteger('OptionChecked');
     3419        if ValueExists('MapOptionChecked') then MapOptionChecked := ReadInteger('MapOptionChecked');
     3420        if ValueExists('CityMapMask') then CityRepMask := Cardinal(ReadInteger('CityReport'));
    34213421      except
    34223422        doinit := true;
    34233423      end;
    3424       Reg.closekey;
     3424      CloseKey;
    34253425      if OptionChecked and (7 shl 16) = 0 then
    34263426        OptionChecked := OptionChecked or (1 shl 16);
     
    34573457    i, j: integer;
    34583458  begin
     3459    {$IFDEF WINDOWS}{TODO}
    34593460    Screen.Cursors[crImpDrag] := LoadCursor(HInstance, 'DRAG');
    34603461    Screen.Cursors[crFlatHand] := LoadCursor(HInstance, 'FLATHAND');
     3462    {$ENDIF}
    34613463
    34623464    // tag-controlled language
  • trunk/LocalPlayer/Tribes.pas

    r17 r20  
    8181    begin
    8282      StdUnitScript := tstringlist.Create;
    83       StdUnitScript.LoadFromFile(LocalizedFilePath('Tribes\StdUnits.txt'));
     83      StdUnitScript.LoadFromFile(LocalizedFilePath('Tribes' + DirectorySeparator + 'StdUnits.txt'));
    8484      nPictureList := 0;
    8585      PictureList := nil;
     
    244244    Color := $FFFFFF;
    245245    found := 0;
    246     AssignFile(TribeScript, LocalizedFilePath('Tribes\' + FileName +
     246    AssignFile(TribeScript, LocalizedFilePath('Tribes' + DirectorySeparator + FileName +
    247247      '.tribe.txt'));
    248248    Reset(TribeScript);
     
    280280      Name[variant] := '';
    281281    Script := tstringlist.Create;
    282     Script.LoadFromFile(LocalizedFilePath('Tribes\' + FileName + '.tribe.txt'));
     282    Script.LoadFromFile(LocalizedFilePath('Tribes' + DirectorySeparator + FileName + '.tribe.txt'));
    283283    CityLine0 := 0;
    284284    nCityLines := 0;
  • trunk/LocalPlayer/UnitStat.pas

    r17 r20  
    8383  Back.Height := hMax;
    8484  Template := TBitmap.Create;
    85   LoadGraphicFile(Template, HomeDir + 'Graphics\Unit', gfNoGamma);
     85  LoadGraphicFile(Template, HomeDir + 'Graphics' + DirectorySeparator + 'Unit', gfNoGamma);
    8686  Template.PixelFormat := pf8bit;
    8787end;
  • trunk/Messg.pas

    r17 r20  
    126126      TButtonBase(Components[cix]).Graphic := GrExt[HGrSystem].Data;
    127127      // if ButtonDownSound<>'*' then
    128       // DownSound:=HomeDir+'Sounds\'+ButtonDownSound+'.wav';
     128      // DownSound:=HomeDir+'Sounds'+DirectorySeparator+ButtonDownSound+'.wav';
    129129      // if ButtonUpSound<>'*' then
    130       // UpSound:=HomeDir+'Sounds\'+ButtonUpSound+'.wav';
     130      // UpSound:=HomeDir+'Sounds'+DirectorySeparator+ButtonUpSound+'.wav';
    131131      if Components[cix] is TButtonA then
    132132        TButtonA(Components[cix]).Font := UniFont[ftButton];
  • trunk/ScreenTools.pas

    r18 r20  
    249249    (WAVFileName <> '*');
    250250  if result then
    251     // SndPlaySound(pchar(HomeDir+'Sounds\'+WAVFileName+'.wav'),SND_ASYNC)
    252     PlaySound(HomeDir + 'Sounds\' + WAVFileName)
     251    // SndPlaySound(pchar(HomeDir+'Sounds' +DirectorySeparator+WAVFileName+'.wav'),SND_ASYNC)
     252    PlaySound(HomeDir + 'Sounds' + DirectorySeparator + WAVFileName)
    253253{$ENDIF}
    254254end;
     
    267267  if (WAVFileName <> '') and (WAVFileName[1] <> '[') and (WAVFileName <> '*')
    268268  then
    269     PrepareSound(HomeDir + 'Sounds\' + WAVFileName)
     269    PrepareSound(HomeDir + 'Sounds' + DirectorySeparator + WAVFileName)
    270270{$ENDIF}
    271271end;
     
    523523  if i = nGrExt then
    524524  begin
    525     FileName := HomeDir + 'Graphics\' + Name;
    526     Source := TBitmap.create;
     525    FileName := HomeDir + 'Graphics' + DirectorySeparator + Name + '.bmp';
     526    Source := TBitmap.Create;
    527527    try
    528       Source.loadfromfile(FileName + '.bmp')
     528      Source.LoadFromFile(FileName)
    529529    except
    530       result := -1;
     530      Result := -1;
    531531      Application.MessageBox(PChar(Format(Phrases.Lookup('FILENOTFOUND'),
    532         ['Graphics\' + Name])), 'C-evo', 0);
     532        [FileName])), 'C-evo', 0);
    533533      exit;
    534534    end;
     
    14381438        begin
    14391439          MainTextureAge := Age;
    1440           LoadGraphicFile(Image, HomeDir + 'Graphics\Texture' +
     1440          LoadGraphicFile(Image, HomeDir + 'Graphics' + DirectorySeparator + 'Texture' +
    14411441            IntToStr(Age + 1), gfJPG);
    14421442          clBevelLight := Colors.Canvas.Pixels[clkAge0 + Age, cliBevelLight];
     
    14951495Phrases2 := TStringTable.create;
    14961496Phrases2FallenBackToEnglish := false;
    1497 if FileExists(DataDir + 'Localization\Language.txt') then
    1498 begin
    1499   Phrases.loadfromfile(DataDir + 'Localization\Language.txt');
    1500   if FileExists(DataDir + 'Localization\Language2.txt') then
    1501     Phrases2.loadfromfile(DataDir + 'Localization\Language2.txt')
     1497if FileExists(DataDir + 'Localization' + DirectorySeparator + 'Language.txt') then
     1498begin
     1499  Phrases.loadfromfile(DataDir + 'Localization' + DirectorySeparator + ' + Language.txt');
     1500  if FileExists(DataDir + 'Localization' + DirectorySeparator + 'Language2.txt') then
     1501    Phrases2.loadfromfile(DataDir + 'Localization' + DirectorySeparator + 'Language2.txt')
    15021502  else
    15031503  begin
     
    15131513
    15141514Sounds := TStringTable.create;
    1515 if not Sounds.loadfromfile(HomeDir + 'Sounds\sound.txt') then
     1515if not Sounds.loadfromfile(HomeDir + 'Sounds' + DirectorySeparator + 'sound.txt') then
    15161516begin
    15171517  Sounds.Free;
     
    15781578HGrSystem2 := LoadGraphicSet('System2');
    15791579Templates := TBitmap.create;
    1580 LoadGraphicFile(Templates, HomeDir + 'Graphics\Templates', gfNoGamma);
     1580LoadGraphicFile(Templates, HomeDir + 'Graphics' + DirectorySeparator + 'Templates', gfNoGamma);
    15811581Templates.PixelFormat := pf24bit;
    15821582Colors := TBitmap.create;
    1583 LoadGraphicFile(Colors, HomeDir + 'Graphics\Colors');
     1583LoadGraphicFile(Colors, HomeDir + 'Graphics' + DirectorySeparator + 'Colors');
    15841584Paper := TBitmap.create;
    1585 LoadGraphicFile(Paper, HomeDir + 'Graphics\Paper', gfJPG);
     1585LoadGraphicFile(Paper, HomeDir + 'Graphics' + DirectorySeparator + 'Paper', gfJPG);
    15861586BigImp := TBitmap.create;
    1587 LoadGraphicFile(BigImp, HomeDir + 'Graphics\Icons');
     1587LoadGraphicFile(BigImp, HomeDir + 'Graphics' + DirectorySeparator + 'Icons');
    15881588MainTexture.Image := TBitmap.create;
    15891589MainTextureAge := -2;
  • trunk/Start.pas

    r17 r20  
    194194
    195195  if FirstStart then
    196   begin
     196  with Reg do begin
    197197    // initialize AI assignment
    198     Reg.OpenKey('SOFTWARE\cevo\RegVer9\Start', true);
    199     for i := 0 to nPlOffered - 1 do
     198    OpenKey('SOFTWARE\cevo\RegVer9\Start', true);
     199    for I := 0 to nPlOffered - 1 do
    200200    begin
    201201      if i = 0 then
     
    203203      else
    204204        s := 'StdAI';
    205       Reg.WriteString('Control' + IntToStr(i), s);
    206       Reg.WriteInteger('Diff' + IntToStr(i), 2);
     205      WriteString('Control' + IntToStr(i), s);
     206      WriteInteger('Diff' + IntToStr(i), 2);
    207207    end;
    208     Reg.WriteInteger('MultiControl', 0);
    209     Reg.closekey;
    210   end
    211   else
    212   begin
    213     Reg.OpenKey('SOFTWARE\cevo\RegVer9\Start', false);
    214     try
    215       WorldSize := Reg.ReadInteger('WorldSize');
    216       StartLandMass := Reg.ReadInteger('LandMass');
    217       MaxTurn := Reg.ReadInteger('MaxTurn');
    218       DefaultAI := Reg.ReadString('DefaultAI');
    219       AutoEnemies := Reg.ReadInteger('AutoEnemies');
    220       AutoDiff := Reg.ReadInteger('AutoDiff');
    221     except
    222       FirstStart := true;
    223     end;
    224     Reg.closekey;
     208    WriteInteger('MultiControl', 0);
     209    CloseKey;
     210  end;
     211
     212  with Reg do begin
     213    OpenKey('SOFTWARE\cevo\RegVer9\Start', False);
     214    if ValueExists('WorldSize') then WorldSize := Reg.ReadInteger('WorldSize')
     215      else WorldSize := DefaultWorldSize;
     216    if ValueExists('LandMass') then StartLandMass := Reg.ReadInteger('LandMass')
     217      else StartLandMass := DefaultLandMass;
     218    if ValueExists('MaxTurn') then MaxTurn := Reg.ReadInteger('MaxTurn')
     219      else MaxTurn := 800;
     220    if ValueExists('DefaultAI') then DefaultAI := Reg.ReadString('DefaultAI')
     221      else DefaultAI := 'StdAI';
     222    if ValueExists('AutoEnemies') then AutoEnemies := Reg.ReadInteger('AutoEnemies')
     223      else AutoEnemies := 8;
     224    if ValueExists('AutoDiff') then AutoDiff := Reg.ReadInteger('AutoDiff')
     225      else AutoDiff := 1;
     226    CloseKey;
    225227  end;
    226228
    227229  FullScreen := true;
    228   if FirstStart then
    229   begin
    230     WorldSize := DefaultWorldSize;
    231     StartLandMass := DefaultLandMass;
    232     MaxTurn := 800;
    233     DefaultAI := 'StdAI';
    234     AutoEnemies := 8;
    235     AutoDiff := 1;
    236   end
    237   else
    238   begin
    239     Reg.OpenKey('SOFTWARE\cevo\RegVer9', false);
    240     if Reg.ValueExists('ScreenMode') then
    241       ScreenMode := Reg.ReadInteger('ScreenMode');
     230  with Reg do begin
     231    OpenKey('SOFTWARE\cevo\RegVer9', False);
     232    if ValueExists('ScreenMode') then
     233      ScreenMode := ReadInteger('ScreenMode')
     234      else ScreenMode := 1;
    242235    FullScreen := ScreenMode > 0;
    243     if Reg.ValueExists('ResolutionX') then
    244       ResolutionX := Reg.ReadInteger('ResolutionX');
    245     if Reg.ValueExists('ResolutionY') then
    246       ResolutionY := Reg.ReadInteger('ResolutionY');
    247     if Reg.ValueExists('ResolutionBPP') then
    248       ResolutionBPP := Reg.ReadInteger('ResolutionBPP');
    249     if Reg.ValueExists('ResolutionFreq') then
    250       ResolutionFreq := Reg.ReadInteger('ResolutionFreq');
     236    if ValueExists('ResolutionX') then
     237      ResolutionX := ReadInteger('ResolutionX');
     238    if ValueExists('ResolutionY') then
     239      ResolutionY := ReadInteger('ResolutionY');
     240    if ValueExists('ResolutionBPP') then
     241      ResolutionBPP := ReadInteger('ResolutionBPP');
     242    if ValueExists('ResolutionFreq') then
     243      ResolutionFreq := ReadInteger('ResolutionFreq');
    251244    {$IFDEF WINDOWS}
    252245    if ScreenMode = 2 then
     
    254247        ResolutionFreq);
    255248    {$ENDIF}
    256     Reg.closekey;
     249    CloseKey;
    257250  end;
    258251  Reg.Free;
     
    260253  ActionsOffered := [maManual, maCredits, maWeb];
    261254  if FileExists(HomeDir + 'Configurator.exe') then
    262     include(ActionsOffered, maConfig);
    263   if FileExists(HomeDir + 'AI Template\AI development manual.html') then
    264     include(ActionsOffered, maAIDev);
     255    Include(ActionsOffered, maConfig);
     256  if FileExists(HomeDir + 'AI Template' + DirectorySeparator + 'AI development manual.html') then
     257    Include(ActionsOffered, maAIDev);
    265258
    266259  bixDefault := -1;
     
    887880      begin // load
    888881        FileName := List.Items[List.ItemIndex];
    889         if LoadGame(DataDir + 'Saved\', FileName + '.cevo', LoadTurn, false)
     882        if LoadGame(DataDir + 'Saved' + DirectorySeparator, FileName + '.cevo', LoadTurn, false)
    890883        then
    891884          UnlistBackupFile(FileName)
     
    907900        Reg := TRegistry.Create;
    908901        Reg.OpenKey('SOFTWARE\cevo\RegVer9\Start', true);
    909         try
    910           GameCount := Reg.ReadInteger('GameCount');
    911         except
    912           GameCount := 0;
    913         end;
     902        if Reg.ValueExists('GameCount') then GameCount := Reg.ReadInteger('GameCount')
     903          else GameCount := 0;
    914904
    915905        if (AutoDiff < 0) and (bixView[0] = bixNoTerm) then
     
    983973        Reg.Free;
    984974
    985         StartNewGame(DataDir + 'Saved\', FileName + '.cevo', MapFileName,
     975        StartNewGame(DataDir + 'Saved' + DirectorySeparator, FileName + '.cevo', MapFileName,
    986976          lxpre[WorldSize], lypre[WorldSize], StartLandMass, MaxTurn);
    987977        UnlistBackupFile(FileName);
     
    11251115    pgLoad:
    11261116      begin
    1127         AssignFile(LogFile, DataDir + 'Saved\' + List.Items[List.ItemIndex]
     1117        AssignFile(LogFile, DataDir + 'Saved' + DirectorySeparator + List.Items[List.ItemIndex]
    11281118          + '.cevo');
    11291119        try
     
    11801170        if Page = pgEditMap then
    11811171          MapFileName := List.Items[List.ItemIndex] + '.cevo map';
    1182         if LoadGraphicFile(Mini, DataDir + 'Maps\' + Copy(MapFileName, 1,
     1172        if LoadGraphicFile(Mini, DataDir + 'Maps' + DirectorySeparator + Copy(MapFileName, 1,
    11831173          Length(MapFileName) - 9), gfNoError) then
    11841174        begin
     
    11971187        end;
    11981188
    1199         AssignFile(MapFile, DataDir + 'Maps\' + MapFileName);
     1189        AssignFile(MapFile, DataDir + 'Maps' + DirectorySeparator + MapFileName);
    12001190        try
    12011191          Reset(MapFile, 4);
     
    13721362begin
    13731363  FormerGames.Clear;
    1374   if FindFirst(DataDir + 'Saved\*.cevo', $21, f) = 0 then
     1364  if FindFirst(DataDir + 'Saved' + DirectorySeparator + '*.cevo', $21, f) = 0 then
    13751365    repeat
    13761366      i := FormerGames.Count;
     
    13911381begin
    13921382  Maps.Clear;
    1393   if FindFirst(DataDir + 'Maps\*.cevo map', $21, f) = 0 then
     1383  if FindFirst(DataDir + 'Maps' + DirectorySeparator + '*.cevo map', $21, f) = 0 then
    13941384    repeat
    13951385      Maps.Add(Copy(f.Name, 1, Length(f.Name) - 9));
     
    15891579        DirectHelp(cStartCredits);
    15901580      maAIDev:
    1591          OpenDocument(pchar(HomeDir + 'AI Template\AI development manual.html'));{ *Převedeno z ShellExecute* }
     1581         OpenDocument(pchar(HomeDir + 'AI Template' + DirectorySeparator + 'AI development manual.html'));{ *Převedeno z ShellExecute* }
    15921582      maWeb:
    15931583        OpenURL('http://c-evo.org'){ *Převedeno z ShellExecute* }
     
    17561746        end;
    17571747      if Page = pgLoad then
    1758         AssignFile(f, DataDir + 'Saved\' + List.Items[List.ItemIndex] + '.cevo')
     1748        AssignFile(f, DataDir + 'Saved' + DirectorySeparator + List.Items[List.ItemIndex] + '.cevo')
    17591749      else
    1760         AssignFile(f, DataDir + 'Maps\' + List.Items[List.ItemIndex] +
     1750        AssignFile(f, DataDir + 'Maps'+ DirectorySeparator + List.Items[List.ItemIndex] +
    17611751          '.cevo map');
    17621752      ok := true;
    17631753      try
    17641754        if Page = pgLoad then
    1765           Rename(f, DataDir + 'Saved\' + NewName + '.cevo')
     1755          Rename(f, DataDir + 'Saved'+ DirectorySeparator + NewName + '.cevo')
    17661756        else
    1767           Rename(f, DataDir + 'Maps\' + NewName + '.cevo map');
     1757          Rename(f, DataDir + 'Maps'+ DirectorySeparator + NewName + '.cevo map');
    17681758      except
    17691759        // Play('INVALID');
     
    17721762      if Page <> pgLoad then
    17731763        try // rename map picture
    1774           AssignFile(f, DataDir + 'Maps\' + List.Items[List.ItemIndex]
     1764          AssignFile(f, DataDir + 'Maps'+ DirectorySeparator + List.Items[List.ItemIndex]
    17751765            + '.bmp');
    1776           Rename(f, DataDir + 'Maps\' + NewName + '.bmp');
     1766          Rename(f, DataDir + 'Maps'+ DirectorySeparator + NewName + '.bmp');
    17771767        except
    17781768        end;
     
    18081798    begin
    18091799      if Page = pgLoad then
    1810         AssignFile(f, DataDir + 'Saved\' + List.Items[List.ItemIndex] + '.cevo')
     1800        AssignFile(f, DataDir + 'Saved' + DirectorySeparator + List.Items[List.ItemIndex] + '.cevo')
    18111801      else
    1812         AssignFile(f, DataDir + 'Maps\' + List.Items[List.ItemIndex] +
     1802        AssignFile(f, DataDir + 'Maps' + DirectorySeparator + List.Items[List.ItemIndex] +
    18131803          '.cevo map');
    18141804      Erase(f);
     
    20021992procedure TStartDlg.ReplayBtnClick(Sender: TObject);
    20031993begin
    2004   LoadGame(DataDir + 'Saved\', List.Items[List.ItemIndex] + '.cevo',
     1994  LoadGame(DataDir + 'Saved' + DirectorySeparator, List.Items[List.ItemIndex] + '.cevo',
    20051995    LastTurn, true);
    20061996  SlotAvailable := -1;
Note: See TracChangeset for help on using the changeset viewer.