aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Classes
diff options
context:
space:
mode:
authorwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-03-30 12:19:08 +0000
committerwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-03-30 12:19:08 +0000
commit563375e18e4aeba0152a9761f1f84d66aaeb27d2 (patch)
tree9ee360c245e5688ac5ecc1b48cd4f9ffb137eb4e /Game/Code/Classes
parente0e16a3b1d28cf51fecf669d42465cf2a65728f3 (diff)
downloadusdx-563375e18e4aeba0152a9761f1f84d66aaeb27d2.tar.gz
usdx-563375e18e4aeba0152a9761f1f84d66aaeb27d2.tar.xz
usdx-563375e18e4aeba0152a9761f1f84d66aaeb27d2.zip
Finished Code for Plugin Sound PlayBack
Removed Debug Message from ULanguage git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@50 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game/Code/Classes')
-rw-r--r--Game/Code/Classes/ULanguage.pas4
-rw-r--r--Game/Code/Classes/UMusic.pas11
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;