diff options
Diffstat (limited to 'Game/Code/Classes')
-rw-r--r-- | Game/Code/Classes/ULanguage.pas | 4 | ||||
-rw-r--r-- | Game/Code/Classes/UMusic.pas | 11 |
2 files changed, 10 insertions, 5 deletions
diff --git a/Game/Code/Classes/ULanguage.pas b/Game/Code/Classes/ULanguage.pas index afdac87c..b911b90a 100644 --- a/Game/Code/Classes/ULanguage.pas +++ b/Game/Code/Classes/ULanguage.pas @@ -52,7 +52,7 @@ begin Implode_Glue2 := ' and ';
if (Length(List) = 0) then //No Language Files Loaded -> Abort Loading
- Log.CriticalError('Could not load any Language Files');
+ Log.CriticalError('Could not load any Language File');
//Standard Language (If a Language File is Incomplete)
//Then use English Language
@@ -143,8 +143,6 @@ begin Result := Text;
Text := Uppercase(Result);
- Log.LogError('Text: "' + Text + '" L: ' + InttoStr(Length(Entry)));
-
//Const Mod
for E := 0 to high(CEntry) do
if Text = CEntry[E].ID then
diff --git a/Game/Code/Classes/UMusic.pas b/Game/Code/Classes/UMusic.pas index f7f0e20d..0e4e4ddd 100644 --- a/Game/Code/Classes/UMusic.pas +++ b/Game/Code/Classes/UMusic.pas @@ -731,11 +731,18 @@ begin end;
function TMusic.LoadSoundFromFile(var hStream: hStream; Name: string): boolean;
+var
+ L: Integer;
begin
if FileExists(Name) then begin
Log.LogStatus('Loading Sound: "' + Name + '"', 'LoadPlayerFromFile');
try
hStream := BASS_StreamCreateFile(False, pchar(Name), 0, 0, 0);
+ //Add CustomSound
+ L := High(CustomSounds) + 1;
+ SetLength (CustomSounds, L + 1);
+ CustomSounds[L].Filename := Name;
+ CustomSounds[L].Handle := hStream;
except
Log.LogError('Failed to open using BASS', 'LoadPlayerFromFile');
end;
@@ -762,7 +769,7 @@ var F: String;
begin
//Search for Sound in already loaded Sounds
- F := UpperCase(FileName);
+ F := UpperCase(SoundPath + FileName);
For I := 0 to High(CustomSounds) do
begin
if (UpperCase(CustomSounds[I].Filename) = F) then
@@ -772,7 +779,7 @@ begin end;
end;
- if LoadSoundFromFile(S, Filename) then
+ if LoadSoundFromFile(S, SoundPath + Filename) then
Result := High(CustomSounds)
else
Result := 0;
|