Changeset 20 for trunk/LocalPlayer


Ignore:
Timestamp:
Jan 8, 2017, 12:23:55 PM (8 years ago)
Author:
chronos
Message:
Location:
trunk/LocalPlayer
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • 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;
Note: See TracChangeset for help on using the changeset viewer.