From 59b053bc8a9e0b52168b73ca86296e6fe890f522 Mon Sep 17 00:00:00 2001 From: mogguh Date: Mon, 25 Aug 2008 19:46:45 +0000 Subject: Added: Option for background music in sound options (affects UIni too) Added: New language string SING_OPTIONS_SOUND_BACKGROUNDMUSIC Added: CC licensed music loop Improved: Options positions via Deluxe theme (first pass, next will follow) Improved: Code beautified in UScreenMain git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1290 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Classes/UIni.pas | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) (limited to 'Game/Code/Classes/UIni.pas') diff --git a/Game/Code/Classes/UIni.pas b/Game/Code/Classes/UIni.pas index c66a10c7..b286c917 100644 --- a/Game/Code/Classes/UIni.pas +++ b/Game/Code/Classes/UIni.pas @@ -41,8 +41,8 @@ type //Options - TVisualizerOption = (voOff, voWhenNoVideo, voOn); - + TVisualizerOption = (voOff, voWhenNoVideo, voOn); + TBackgroundMusicOption = (bmoOff, bmoOn); TIni = class private function RemoveFileExt(FullName: string): string; @@ -113,7 +113,8 @@ type Theme: integer; SkinNo: integer; Color: integer; - + BackgroundMusicOption:integer; + // Record InputDeviceConfig: array of TInputDeviceConfig; @@ -168,6 +169,9 @@ const IDepth: array[0..1] of string = ('16 bit', '32 bit'); IVisualizer: array[0..2] of string = ('Off', 'WhenNoVideo','On'); + IBackgroundMusic: array[0..1] of string = ('Off', 'On'); + + ITextureSize: array[0..2] of string = ('128', '256', '512'); ITextureSizeVals: array[0..2] of integer = ( 128, 256, 512); @@ -716,6 +720,11 @@ begin // || VisualizerOption := TVisualizerOption(GetArrayIndex(IVisualizer, IniFile.ReadString('Graphics', 'Visualization', 'Off'))); VisualizerOption := GetArrayIndex(IVisualizer, IniFile.ReadString('Graphics', 'Visualization', 'Off')); +{** + * Background music + *} + BackgroundMusicOption := GetArrayIndex(IBackgroundMusic, IniFile.ReadString('Sound', 'BackgroundMusic', 'Off')); + // EffectSing EffectSing := GetArrayIndex(IEffectSing, IniFile.ReadString('Advanced', 'EffectSing', 'On')); @@ -811,6 +820,9 @@ begin // AudioOutputBufferSize IniFile.WriteString('Sound', 'AudioOutputBufferSize', IAudioOutputBufferSize[AudioOutputBufferSizeIndex]); + // Background music + IniFile.WriteString('Sound', 'BackgroundMusic', IBackgroundMusic[BackgroundMusicOption]); + // Song Preview IniFile.WriteString('Sound', 'PreviewVolume', IPreviewVolume[PreviewVolume]); @@ -820,11 +832,11 @@ begin // SavePlayback IniFile.WriteString('Sound', 'SavePlayback', ISavePlayback[SavePlayback]); - // VoicePasstrough - IniFile.WriteString('Sound', 'VoicePassthrough', IVoicePassthrough[VoicePassthrough]); + // VoicePasstrough + IniFile.WriteString('Sound', 'VoicePassthrough', IVoicePassthrough[VoicePassthrough]); - // Lyrics Font - IniFile.WriteString('Lyrics', 'LyricsFont', ILyricsFont[LyricsFont]); + // Lyrics Font + IniFile.WriteString('Lyrics', 'LyricsFont', ILyricsFont[LyricsFont]); // Lyrics Effect IniFile.WriteString('Lyrics', 'LyricsEffect', ILyricsEffect[LyricsEffect]); -- cgit v1.2.3