Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unify config.ini and UIni.pas defaults. #917

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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