Changeset 20 for trunk/ScreenTools.pas


Ignore:
Timestamp:
Jan 8, 2017, 12:23:55 PM (8 years ago)
Author:
chronos
Message:
File:
1 edited

Legend:

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