Changeset 20 for trunk/ScreenTools.pas
- Timestamp:
- Jan 8, 2017, 12:23:55 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ScreenTools.pas
r18 r20 249 249 (WAVFileName <> '*'); 250 250 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) 253 253 {$ENDIF} 254 254 end; … … 267 267 if (WAVFileName <> '') and (WAVFileName[1] <> '[') and (WAVFileName <> '*') 268 268 then 269 PrepareSound(HomeDir + 'Sounds \'+ WAVFileName)269 PrepareSound(HomeDir + 'Sounds' + DirectorySeparator + WAVFileName) 270 270 {$ENDIF} 271 271 end; … … 523 523 if i = nGrExt then 524 524 begin 525 FileName := HomeDir + 'Graphics \' + Name;526 Source := TBitmap. create;525 FileName := HomeDir + 'Graphics' + DirectorySeparator + Name + '.bmp'; 526 Source := TBitmap.Create; 527 527 try 528 Source. loadfromfile(FileName + '.bmp')528 Source.LoadFromFile(FileName) 529 529 except 530 result := -1;530 Result := -1; 531 531 Application.MessageBox(PChar(Format(Phrases.Lookup('FILENOTFOUND'), 532 [ 'Graphics\' +Name])), 'C-evo', 0);532 [FileName])), 'C-evo', 0); 533 533 exit; 534 534 end; … … 1438 1438 begin 1439 1439 MainTextureAge := Age; 1440 LoadGraphicFile(Image, HomeDir + 'Graphics \Texture' +1440 LoadGraphicFile(Image, HomeDir + 'Graphics' + DirectorySeparator + 'Texture' + 1441 1441 IntToStr(Age + 1), gfJPG); 1442 1442 clBevelLight := Colors.Canvas.Pixels[clkAge0 + Age, cliBevelLight]; … … 1495 1495 Phrases2 := TStringTable.create; 1496 1496 Phrases2FallenBackToEnglish := false; 1497 if FileExists(DataDir + 'Localization \Language.txt') then1498 begin 1499 Phrases.loadfromfile(DataDir + 'Localization \Language.txt');1500 if FileExists(DataDir + 'Localization \Language2.txt') then1501 Phrases2.loadfromfile(DataDir + 'Localization \Language2.txt')1497 if FileExists(DataDir + 'Localization' + DirectorySeparator + 'Language.txt') then 1498 begin 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') 1502 1502 else 1503 1503 begin … … 1513 1513 1514 1514 Sounds := TStringTable.create; 1515 if not Sounds.loadfromfile(HomeDir + 'Sounds \sound.txt') then1515 if not Sounds.loadfromfile(HomeDir + 'Sounds' + DirectorySeparator + 'sound.txt') then 1516 1516 begin 1517 1517 Sounds.Free; … … 1578 1578 HGrSystem2 := LoadGraphicSet('System2'); 1579 1579 Templates := TBitmap.create; 1580 LoadGraphicFile(Templates, HomeDir + 'Graphics \Templates', gfNoGamma);1580 LoadGraphicFile(Templates, HomeDir + 'Graphics' + DirectorySeparator + 'Templates', gfNoGamma); 1581 1581 Templates.PixelFormat := pf24bit; 1582 1582 Colors := TBitmap.create; 1583 LoadGraphicFile(Colors, HomeDir + 'Graphics \Colors');1583 LoadGraphicFile(Colors, HomeDir + 'Graphics' + DirectorySeparator + 'Colors'); 1584 1584 Paper := TBitmap.create; 1585 LoadGraphicFile(Paper, HomeDir + 'Graphics \Paper', gfJPG);1585 LoadGraphicFile(Paper, HomeDir + 'Graphics' + DirectorySeparator + 'Paper', gfJPG); 1586 1586 BigImp := TBitmap.create; 1587 LoadGraphicFile(BigImp, HomeDir + 'Graphics \Icons');1587 LoadGraphicFile(BigImp, HomeDir + 'Graphics' + DirectorySeparator + 'Icons'); 1588 1588 MainTexture.Image := TBitmap.create; 1589 1589 MainTextureAge := -2;
Note:
See TracChangeset
for help on using the changeset viewer.