Changeset 95 for trunk/Engine.pas
- Timestamp:
- May 19, 2024, 6:15:22 PM (6 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Engine.pas
r93 r95 250 250 function TextOutWordWrap(Canvas: TCanvas; X, Y: Integer; Text: string; Width: Integer): Integer; 251 251 function GetMenuWidth: Integer; 252 function GetAudioDir: string; 252 253 public 253 254 ThreadErrorMessage: string; … … 1641 1642 end; 1642 1643 1644 function TEngine.GetAudioDir: string; 1645 {$IFDEF UNIX} 1646 const 1647 UnixDataDir = '/usr/share/Tunneler'; 1648 UnixAudioDir = UnixDataDir + '/Audio'; 1649 {$ENDIF} 1650 begin 1651 Result := GetCurrentDir + DirectorySeparator + 'Audio'; 1652 {$IFDEF UNIX} 1653 if not DirectoryExists(Result) and DirectoryExists(UnixAudioDir) then begin 1654 Result := UnixAudioDir; 1655 Exit; 1656 end; 1657 {$ENDIF} 1658 end; 1659 1643 1660 function TEngine.Scale(Value: Integer): Integer; 1644 1661 begin … … 2120 2137 //DefaultAudioSystem := TAudioSystemMPlayer.Create(nil); 2121 2138 AudioShot := TSound.Create(nil); 2122 AudioShot.FileName := Get CurrentDir + '/Audio/GE_KF7_Soviet.wav';2139 AudioShot.FileName := GetAudioDir + DirectorySeparator + 'GE_KF7_Soviet.wav'; 2123 2140 AudioExplode := TSound.Create(nil); 2124 AudioExplode.FileName := Get CurrentDir + '/Audio/bomb.wav';2141 AudioExplode.FileName := GetAudioDir + DirectorySeparator + 'bomb.wav'; 2125 2142 InitPlayerPool; 2126 2143 DigMasks := TObjectList<TMatrixByte>.Create;
Note:
See TracChangeset
for help on using the changeset viewer.