aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Screens/UScreenOptions.pas
diff options
context:
space:
mode:
authorjaybinks <jaybinks@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-10-11 12:02:20 +0000
committerjaybinks <jaybinks@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-10-11 12:02:20 +0000
commit44554c7908f7e2405a249331f00a35703f5939c2 (patch)
treebd1a5d2be22e4b4494e0b66331dbfb16dcceb3c5 /Game/Code/Screens/UScreenOptions.pas
parent0d997f8433e982584a0ab67a6d630d12f4314759 (diff)
downloadusdx-44554c7908f7e2405a249331f00a35703f5939c2.tar.gz
usdx-44554c7908f7e2405a249331f00a35703f5939c2.tar.xz
usdx-44554c7908f7e2405a249331f00a35703f5939c2.zip
Added IAudioPlayback Interface and implementation for BASS.
Created "AudioPlayback" Global Singleton, which removed the need for the "Music" Global variable. This was done because global singleton objects are a recognized better "design pattern" achieving the same thing as global variables, but in a nicer way. I will be working to a) separate IAudioPlayback in to separate "Playback" and "Input" Interfaces b) build a FFMpeg class that implements IAudioPlayback git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@504 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r--Game/Code/Screens/UScreenOptions.pas42
1 files changed, 25 insertions, 17 deletions
diff --git a/Game/Code/Screens/UScreenOptions.pas b/Game/Code/Screens/UScreenOptions.pas
index a1f64659..1867d03b 100644
--- a/Game/Code/Screens/UScreenOptions.pas
+++ b/Game/Code/Screens/UScreenOptions.pas
@@ -36,49 +36,57 @@ begin
SDLK_BACKSPACE :
begin
Ini.Save;
- Music.PlayBack;
+ AudioPlayback.PlayBack;
FadeTo(@ScreenMain);
end;
SDLK_RETURN:
begin
- if SelInteraction = 0 then begin
- Music.PlayStart;
+ if SelInteraction = 0 then
+ begin
+ AudioPlayback.PlayStart;
FadeTo(@ScreenOptionsGame);
end;
- if SelInteraction = 1 then begin
- Music.PlayStart;
+ if SelInteraction = 1 then
+ begin
+ AudioPlayback.PlayStart;
FadeTo(@ScreenOptionsGraphics);
end;
- if SelInteraction = 2 then begin
- Music.PlayStart;
+ if SelInteraction = 2 then
+ begin
+ AudioPlayback.PlayStart;
FadeTo(@ScreenOptionsSound);
end;
- if SelInteraction = 3 then begin
- Music.PlayStart;
+ if SelInteraction = 3 then
+ begin
+ AudioPlayback.PlayStart;
FadeTo(@ScreenOptionsLyrics);
end;
- if SelInteraction = 4 then begin
- Music.PlayStart;
+ if SelInteraction = 4 then
+ begin
+ AudioPlayback.PlayStart;
FadeTo(@ScreenOptionsThemes);
end;
- if SelInteraction = 5 then begin
- Music.PlayStart;
+ if SelInteraction = 5 then
+ begin
+ AudioPlayback.PlayStart;
FadeTo(@ScreenOptionsRecord);
end;
- if SelInteraction = 6 then begin
- Music.PlayStart;
+ if SelInteraction = 6 then
+ begin
+ AudioPlayback.PlayStart;
FadeTo(@ScreenOptionsAdvanced);
end;
- if SelInteraction = 7 then begin
+ if SelInteraction = 7 then
+ begin
Ini.Save;
- Music.PlayBack;
+ AudioPlayback.PlayBack;
FadeTo(@ScreenMain);
end;
end;