Skip to content

Commit

Permalink
Merge pull request #917 from DeinAlptraum/config-default
Browse files Browse the repository at this point in the history
Unify config.ini and UIni.pas defaults.
  • Loading branch information
barbeque-squared authored Nov 1, 2024
2 parents 260053a + 3d4ec1e commit 25b57b3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 207 deletions.
200 changes: 0 additions & 200 deletions game/config.ini

This file was deleted.

19 changes: 12 additions & 7 deletions src/base/UIni.pas
Original file line number Diff line number Diff line change
Expand Up @@ -1412,6 +1412,11 @@ procedure TIni.Load();
PlayerLevel[I] := IniFile.ReadInteger('PlayerLevel', 'P'+IntToStr(I+1), 0);
end;

// Switch colors for players 2 and 4, since player 2 line color is used
// for the second part in duet, and yellow (4) looks better than red (2)
PlayerColor[1] := IniFile.ReadInteger('PlayerColor', 'P'+IntToStr(I+1), 4);
PlayerColor[3] := IniFile.ReadInteger('PlayerColor', 'P'+IntToStr(I+1), 2);

// Color Team
for I := 0 to 2 do
TeamColor[I] := IniFile.ReadInteger('TeamColor', 'T'+IntToStr(I+1), I + 1);
Expand Down Expand Up @@ -1441,7 +1446,7 @@ procedure TIni.Load();
TabsAtStartup := Tabs; //Tabs at Startup fix

// Song Sorting
Sorting := ReadArrayIndex(ISorting, IniFile, 'Game', 'Sorting', Ord(sEdition));
Sorting := ReadArrayIndex(ISorting, IniFile, 'Game', 'Sorting', Ord(sArtist));

// Show Score
ShowScores := ReadArrayIndex(IShowScores, IniFile, 'Game', 'ShowScores', IGNORE_INDEX, 'On');
Expand Down Expand Up @@ -1483,7 +1488,7 @@ procedure TIni.Load();
TextureSize := ReadArrayIndex(ITextureSize, IniFile, 'Graphics', 'TextureSize', IGNORE_INDEX, '256');

// Oscilloscope
Oscilloscope := ReadArrayIndex(IOscilloscope, IniFile, 'Graphics', 'Oscilloscope', 0);
Oscilloscope := ReadArrayIndex(IOscilloscope, IniFile, 'Graphics', 'Oscilloscope', 1);

// Spectrum
//Spectrum := ReadArrayIndex(ISpectrum, IniFile, 'Graphics', 'Spectrum', IGNORE_INDEX, 'Off');
Expand Down Expand Up @@ -1515,7 +1520,7 @@ procedure TIni.Load();
AudioOutputBufferSizeIndex := ReadArrayIndex(IAudioOutputBufferSize, IniFile, 'Sound', 'AudioOutputBufferSize', 0);

//Preview Volume
PreviewVolume := ReadArrayIndex(IPreviewVolume, IniFile, 'Sound', 'PreviewVolume', 7);
PreviewVolume := ReadArrayIndex(IPreviewVolume, IniFile, 'Sound', 'PreviewVolume', 5);

//Preview Fading
PreviewFading := ReadArrayIndex(IPreviewFading, IniFile, 'Sound', 'PreviewFading', 3);
Expand All @@ -1534,7 +1539,7 @@ procedure TIni.Load();
// Lyrics Style
LyricsStyle := ReadArrayIndex(ILyricsStyleCompat, IniFile, 'Lyrics', 'LyricsStyle', -1);
if (LyricsStyle = -1) then
LyricsStyle := ReadArrayIndex(ILyricsStyle, IniFile, 'Lyrics', 'LyricsStyle', 0);
LyricsStyle := ReadArrayIndex(ILyricsStyle, IniFile, 'Lyrics', 'LyricsStyle', 2);

// Lyrics Effect
LyricsEffect := ReadArrayIndex(ILyricsEffect, IniFile, 'Lyrics', 'LyricsEffect', 2);
Expand Down Expand Up @@ -1622,8 +1627,8 @@ procedure TIni.Load();

// Jukebox
JukeboxFont := ReadArrayIndex(ILyricsFont, IniFile, 'Jukebox', 'LyricsFont', 0);
JukeboxStyle := ReadArrayIndex(ILyricsStyle, IniFile, 'Jukebox', 'LyricsStyle', 0);
JukeboxEffect := ReadArrayIndex(ILyricsEffect, IniFile, 'Jukebox', 'LyricsEffect', 1);
JukeboxStyle := ReadArrayIndex(ILyricsStyle, IniFile, 'Jukebox', 'LyricsStyle', 2);
JukeboxEffect := ReadArrayIndex(ILyricsEffect, IniFile, 'Jukebox', 'LyricsEffect', 2);
JukeboxAlpha := ReadArrayIndex(ILyricsAlpha, IniFile, 'Jukebox', 'LyricsAlpha', 20);

JukeboxSongMenu := ReadArrayIndex(IJukeboxSongMenu, IniFile, 'Jukebox', 'SongMenu', IGNORE_INDEX, 'On');
Expand All @@ -1636,7 +1641,7 @@ procedure TIni.Load();
begin
JukeboxSingLineColor := High(IHexSingColor);

HexColor := IniFile.ReadString('Jukebox', 'SingLineColor', IHexSingColor[0]);
HexColor := IniFile.ReadString('Jukebox', 'SingLineColor', '47B3FF');
Col := HexToRGB(HexColor);

Ini.JukeboxSingLineOtherColorR := Round(Col.R);
Expand Down

0 comments on commit 25b57b3

Please sign in to comment.