From 0aeea2f7687d037282ff5ebd85ac361f19474c39 Mon Sep 17 00:00:00 2001 From: mogguh Date: Sat, 23 Aug 2008 12:40:29 +0000 Subject: 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 --- Game/Code/Classes/UIni.pas | 26 +++++++++++++++++++++++--- Game/Code/Classes/UThemes.pas | 2 ++ 2 files changed, 25 insertions(+), 3 deletions(-) (limited to 'Game/Code/Classes') diff --git a/Game/Code/Classes/UIni.pas b/Game/Code/Classes/UIni.pas index c7160ac0..c66a10c7 100644 --- a/Game/Code/Classes/UIni.pas +++ b/Game/Code/Classes/UIni.pas @@ -38,6 +38,11 @@ type end; type + +//Options + + TVisualizerOption = (voOff, voWhenNoVideo, voOn); + TIni = class private function RemoveFileExt(FullName: string): string; @@ -76,6 +81,7 @@ type Screens: integer; Resolution: integer; Depth: integer; + VisualizerOption:integer; FullScreen: integer; TextureSize: integer; SingWindow: integer; @@ -90,8 +96,8 @@ type BeatClick: integer; SavePlayback: integer; ThresholdIndex: integer; - AudioOutputBufferSizeIndex: integer; - VoicePassthrough: integer; + AudioOutputBufferSizeIndex:integer; + VoicePassthrough:integer; //Song Preview PreviewVolume: integer; @@ -136,6 +142,8 @@ var ITheme: array of string; ISkin: array of string; + + const IPlayers: array[0..4] of string = ('1', '2', '3', '4', '6'); IPlayersVals: array[0..4] of integer = ( 1 , 2 , 3 , 4 , 6 ); @@ -158,6 +166,7 @@ const IScreens: array[0..1] of string = ('1', '2'); IFullScreen: array[0..1] of string = ('Off', 'On'); IDepth: array[0..1] of string = ('16 bit', '32 bit'); + IVisualizer: array[0..2] of string = ('Off', 'WhenNoVideo','On'); ITextureSize: array[0..2] of string = ('128', '256', '512'); ITextureSizeVals: array[0..2] of integer = ( 128, 256, 512); @@ -699,6 +708,14 @@ begin // ScreenFade ScreenFade := GetArrayIndex(IScreenFade, IniFile.ReadString('Advanced', 'ScreenFade', 'On')); + // Visualizations + // this could be of use later.. + // VisualizerOption := + // TVisualizerOption(GetEnumValue(TypeInfo(TVisualizerOption), + // IniFile.ReadString('Graphics', 'Visualization', 'Off'))); + // || VisualizerOption := TVisualizerOption(GetArrayIndex(IVisualizer, IniFile.ReadString('Graphics', 'Visualization', 'Off'))); + VisualizerOption := GetArrayIndex(IVisualizer, IniFile.ReadString('Graphics', 'Visualization', 'Off')); + // EffectSing EffectSing := GetArrayIndex(IEffectSing, IniFile.ReadString('Advanced', 'EffectSing', 'On')); @@ -758,6 +775,9 @@ begin // FullScreen IniFile.WriteString('Graphics', 'FullScreen', IFullScreen[FullScreen]); + // Visualization + IniFile.WriteString('Graphics', 'Visualization', IVisualizer[VisualizerOption]); + // Resolution IniFile.WriteString('Graphics', 'Resolution', IResolution[Resolution]); @@ -800,7 +820,7 @@ begin // SavePlayback IniFile.WriteString('Sound', 'SavePlayback', ISavePlayback[SavePlayback]); - // NoteLines + // VoicePasstrough IniFile.WriteString('Sound', 'VoicePassthrough', IVoicePassthrough[VoicePassthrough]); // Lyrics Font diff --git a/Game/Code/Classes/UThemes.pas b/Game/Code/Classes/UThemes.pas index f5e15103..46327b7c 100644 --- a/Game/Code/Classes/UThemes.pas +++ b/Game/Code/Classes/UThemes.pas @@ -399,6 +399,7 @@ type SelectFullscreen: TThemeSelectSlide; SelectResolution: TThemeSelectSlide; SelectDepth: TThemeSelectSlide; + SelectVisualizer: TThemeSelectSlide; SelectOscilloscope: TThemeSelectSlide; SelectLineBonus: TThemeSelectSlide; SelectMovieSize: TThemeSelectSlide; @@ -1149,6 +1150,7 @@ begin ThemeLoadSelectSlide(OptionsGraphics.SelectFullscreen, 'OptionsGraphicsSelectFullscreen'); ThemeLoadSelectSlide(OptionsGraphics.SelectResolution, 'OptionsGraphicsSelectSlideResolution'); ThemeLoadSelectSlide(OptionsGraphics.SelectDepth, 'OptionsGraphicsSelectDepth'); + ThemeLoadSelectSlide(OptionsGraphics.SelectVisualizer, 'OptionsGraphicsSelectVisualizer'); ThemeLoadSelectSlide(OptionsGraphics.SelectOscilloscope, 'OptionsGraphicsSelectOscilloscope'); ThemeLoadSelectSlide(OptionsGraphics.SelectLineBonus, 'OptionsGraphicsSelectLineBonus'); ThemeLoadSelectSlide(OptionsGraphics.SelectMovieSize, 'OptionsGraphicsSelectMovieSize'); -- cgit v1.2.3