Skip to content

Commit

Permalink
Unify config.ini and UIni.pas defaults.
Browse files Browse the repository at this point in the history
Don't ship config.ini

Resolves #872
  • Loading branch information
DeinAlptraum committed Oct 25, 2024
1 parent 5468dbc commit dd71bf7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 208 deletions.
200 changes: 0 additions & 200 deletions game/config.ini

This file was deleted.

21 changes: 13 additions & 8 deletions src/base/UIni.pas
Original file line number Diff line number Diff line change
Expand Up @@ -1236,7 +1236,7 @@ procedure TIni.LoadScreenModes(IniFile: TCustomIniFile);
Split := ReadArrayIndex(ISplit, IniFile, 'Graphics', 'Split', 0);

// FullScreen
FullScreen := ReadArrayIndex(IFullScreen, IniFile, 'Graphics', 'FullScreen', IGNORE_INDEX, 'Borderless');
FullScreen := ReadArrayIndex(IFullScreen, IniFile, 'Graphics', 'FullScreen', IGNORE_INDEX, 'Off');

// PositionX
PositionX := StrToInt(IniFile.ReadString('Graphics', 'PositionX', '0'));
Expand Down 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 dd71bf7

Please sign in to comment.