aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Screens/UScreenSing.pas
diff options
context:
space:
mode:
authormogguh <mogguh@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-08-23 12:40:29 +0000
committermogguh <mogguh@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-08-23 12:40:29 +0000
commit0aeea2f7687d037282ff5ebd85ac361f19474c39 (patch)
tree0c92c2e45cd53202a5803a96f880c7e2f2f4f775 /Game/Code/Screens/UScreenSing.pas
parent87a601cc1528279b675a56131ef1061aa124f732 (diff)
downloadusdx-0aeea2f7687d037282ff5ebd85ac361f19474c39.tar.gz
usdx-0aeea2f7687d037282ff5ebd85ac361f19474c39.tar.xz
usdx-0aeea2f7687d037282ff5ebd85ac361f19474c39.zip
Visualization are now available and configurable via the options graphics screen
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1286 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game/Code/Screens/UScreenSing.pas')
-rw-r--r--Game/Code/Screens/UScreenSing.pas49
1 files changed, 37 insertions, 12 deletions
diff --git a/Game/Code/Screens/UScreenSing.pas b/Game/Code/Screens/UScreenSing.pas
index 8edd2be4..911d122e 100644
--- a/Game/Code/Screens/UScreenSing.pas
+++ b/Game/Code/Screens/UScreenSing.pas
@@ -423,23 +423,38 @@ begin
// reset video playback engine, to play video clip...
fCurrentVideoPlaybackEngine.Close;
fCurrentVideoPlaybackEngine := VideoPlayback;
-
- // set movie
+{**
+ * == Background ==
+ * We have four types of backgrounds:
+ * + Blank : Nothing has been set, this is our fallback
+ * + Picture : Picture has been set, and exists - otherwise we fallback
+ * + Video : Video has been set, and exists - otherwise we fallback
+ * + Visualization: + Off : No Visialization
+ * + WhenNoVideo: Overwrites Blank and Picture
+ * + On : Overwrites Blank, Picture and Video
+ *}
+{**
+ * set background to: video
+ *}
CurrentSong.VideoLoaded := False;
fShowVisualization := False;
if (CurrentSong.Video <> '') and FileExists(CurrentSong.Path + CurrentSong.Video) then
- //and not (TVisualizerOption(Ini.VisualizerOption) in [voOn, voWhenNoVideo]) then
begin
if (fCurrentVideoPlaybackEngine.Open(CurrentSong.Path + CurrentSong.Video)) then
begin
+ fShowVisualization := False;
+ fCurrentVideoPlaybackEngine := VideoPlayback;
fCurrentVideoPlaybackEngine.Position := CurrentSong.VideoGAP + CurrentSong.Start;
CurrentSong.VideoLoaded := True;
+ fCurrentVideoPlaybackEngine.play;
end;
end;
- // set background
- if (CurrentSong.Background <> '') and (CurrentSong.VideoLoaded = False) then
- //and (TVisualizerOption(Ini.VisualizerOption) = voOff) then
+{**
+ * set background to: picture
+ *}
+ if (CurrentSong.Background <> '') and (CurrentSong.VideoLoaded = False)
+ and (TVisualizerOption(Ini.VisualizerOption) = voOff) then
try
Tex_Background := Texture.LoadTexture(CurrentSong.Path + CurrentSong.Background);
except
@@ -449,17 +464,27 @@ begin
end
else
Tex_Background.TexNum := 0;
- {**
- * set visualization
- *}
- {*
- if (TVisualizerOption(Ini.VisualizerOption) in [voOn, voWhenNoVideo]) then
+{**
+ * set background to: visualization (Overwrites all)
+ *}
+ if (TVisualizerOption(Ini.VisualizerOption) in [voOn]) then
+ begin
+ fShowVisualization := True;
+ fCurrentVideoPlaybackEngine := Visualization;
+ fCurrentVideoPlaybackEngine.play;
+ end;
+
+{**
+ * set background to: visualization (Videos are still shown)
+ *}
+ if ((TVisualizerOption(Ini.VisualizerOption) in [voWhenNoVideo]) and
+ (CurrentSong.VideoLoaded = False)) then
begin
fShowVisualization := True;
fCurrentVideoPlaybackEngine := Visualization;
fCurrentVideoPlaybackEngine.play;
end;
- *}
+
// prepare lyrics timer
LyricsState.Reset();
LyricsState.SetCurrentTime(CurrentSong.Start);