aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Screens
diff options
context:
space:
mode:
authorwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-05-16 19:19:35 +0000
committerwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-05-16 19:19:35 +0000
commit4a731514163a14bd3a9222d99707880b56772663 (patch)
treef9193c9c0cdc6ebf2602db8970e1e46cd7c394c1 /Game/Code/Screens
parent9b29c5321e423fbe6ba29f32bdcf8f2c83828e92 (diff)
downloadusdx-4a731514163a14bd3a9222d99707880b56772663.tar.gz
usdx-4a731514163a14bd3a9222d99707880b56772663.tar.xz
usdx-4a731514163a14bd3a9222d99707880b56772663.zip
all SongFile Loading and Saving procedures moved to UFiles.
Added Some Tolerance in Song File Loading and Song Header Loading. Fix: Programm doesn't Crash anymore when a coruppted Song is loaded for Singing or Editing. Now Jump back to SongScreen and show an Error Message. Also Party Mode is not Interupted, a new Song will be selected automatically. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@197 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game/Code/Screens')
-rw-r--r--Game/Code/Screens/UScreenCredits.pas2
-rw-r--r--Game/Code/Screens/UScreenEditConvert.pas2
-rw-r--r--Game/Code/Screens/UScreenEditHeader.pas2
-rw-r--r--Game/Code/Screens/UScreenEditSub.pas79
-rw-r--r--Game/Code/Screens/UScreenLevel.pas2
-rw-r--r--Game/Code/Screens/UScreenMain.pas2
-rw-r--r--Game/Code/Screens/UScreenName.pas2
-rw-r--r--Game/Code/Screens/UScreenOpen.pas2
-rw-r--r--Game/Code/Screens/UScreenOptions.pas2
-rw-r--r--Game/Code/Screens/UScreenOptionsAdvanced.pas2
-rw-r--r--Game/Code/Screens/UScreenOptionsGame.pas2
-rw-r--r--Game/Code/Screens/UScreenOptionsGraphics.pas2
-rw-r--r--Game/Code/Screens/UScreenOptionsLyrics.pas2
-rw-r--r--Game/Code/Screens/UScreenOptionsRecord.pas2
-rw-r--r--Game/Code/Screens/UScreenOptionsSound.pas2
-rw-r--r--Game/Code/Screens/UScreenOptionsThemes.pas2
-rw-r--r--Game/Code/Screens/UScreenPartyNewRound.pas2
-rw-r--r--Game/Code/Screens/UScreenPartyOptions.pas2
-rw-r--r--Game/Code/Screens/UScreenPartyPlayer.pas2
-rw-r--r--Game/Code/Screens/UScreenPopup.pas2
-rw-r--r--Game/Code/Screens/UScreenSing.pas26
-rw-r--r--Game/Code/Screens/UScreenSingModi.pas2
-rw-r--r--Game/Code/Screens/UScreenSong.pas4
-rw-r--r--Game/Code/Screens/UScreenSongJumpto.pas2
-rw-r--r--Game/Code/Screens/UScreenSongMenu.pas2
25 files changed, 93 insertions, 60 deletions
diff --git a/Game/Code/Screens/UScreenCredits.pas b/Game/Code/Screens/UScreenCredits.pas
index 0411c7b6..98cdc417 100644
--- a/Game/Code/Screens/UScreenCredits.pas
+++ b/Game/Code/Screens/UScreenCredits.pas
@@ -3,7 +3,7 @@ unit UScreenCredits;
interface
uses
- UMenu, SDL, UDisplay, UMusic, UPliki, SysUtils, UThemes, ULCD, ULight;
+ UMenu, SDL, UDisplay, UMusic, UFiles, SysUtils, UThemes, ULCD, ULight;
type
TScreenCredits = class(TMenu)
diff --git a/Game/Code/Screens/UScreenEditConvert.pas b/Game/Code/Screens/UScreenEditConvert.pas
index 62a50b3e..92e8544c 100644
--- a/Game/Code/Screens/UScreenEditConvert.pas
+++ b/Game/Code/Screens/UScreenEditConvert.pas
@@ -66,7 +66,7 @@ type
end;
implementation
-uses UGraphic, SysUtils, UDrawTexture, TextGL, UPliki, UMain, UIni, OpenGL, USkins;
+uses UGraphic, SysUtils, UDrawTexture, TextGL, UFiles, UMain, UIni, OpenGL, USkins;
function TScreenEditConvert.ParseInput(PressedKey: Cardinal; ScanCode: byte; PressedDown: Boolean): Boolean;
var
diff --git a/Game/Code/Screens/UScreenEditHeader.pas b/Game/Code/Screens/UScreenEditHeader.pas
index f3e21fd0..35d7840f 100644
--- a/Game/Code/Screens/UScreenEditHeader.pas
+++ b/Game/Code/Screens/UScreenEditHeader.pas
@@ -44,7 +44,7 @@ type
implementation
-uses UGraphic, UMusic, SysUtils, UPliki, USkins;
+uses UGraphic, UMusic, SysUtils, UFiles, USkins;
function TScreenEditHeader.ParseInput(PressedKey: Cardinal; ScanCode: byte; PressedDown: Boolean): Boolean;
var
diff --git a/Game/Code/Screens/UScreenEditSub.pas b/Game/Code/Screens/UScreenEditSub.pas
index a665ba1c..a0adef2c 100644
--- a/Game/Code/Screens/UScreenEditSub.pas
+++ b/Game/Code/Screens/UScreenEditSub.pas
@@ -2,12 +2,15 @@ unit UScreenEditSub;
interface
-uses UMenu, UMusic, SDL, SysUtils, UPliki, UTime, USongs, UIni, ULog, USmpeg, UTexture, UMenuText,
+uses UMenu, UMusic, SDL, SysUtils, UFiles, UTime, USongs, UIni, ULog, USmpeg, UTexture, UMenuText,
ULyrics, Math, OpenGL12, UThemes, MidiOut;
type
TScreenEditSub = class(TMenu)
private
+ //Variable is True if no SOng is loaded
+ Error: Boolean;
+
TextNote: integer;
TextSentence: integer;
TextTitle: integer;
@@ -71,7 +74,7 @@ type
end;
implementation
-uses UGraphic, UDraw, UMain, USkins;
+uses UGraphic, UDraw, UMain, USkins, ULanguage;
// Method for input parsing. If False is returned, GetNextWindow
// should be checked to know the next window to load;
@@ -190,17 +193,15 @@ begin
SDLK_S:
begin
- if SDL_ModState = 0 then
- // Save Song
- SaveSong(AktSong, Czesci[0], Path + FileName, false);
-
+ // Save Song
if SDL_ModState = KMOD_LSHIFT then
- // Save Song
- SaveSong(AktSong, Czesci[0], Path + FileName, true);
+ SaveSong(AktSong, Czesci[0], Path + FileName, true)
+ else
+ SaveSong(AktSong, Czesci[0], Path + FileName, false);
- if SDL_ModState = KMOD_LSHIFT or KMOD_LCTRL + KMOD_LALT then
+ {if SDL_ModState = KMOD_LSHIFT or KMOD_LCTRL + KMOD_LALT then
// Save Song
- SaveSongDebug(AktSong, Czesci[0], 'C:\song.asm', false);
+ SaveSongDebug(AktSong, Czesci[0], 'C:\song.asm', false);}
end;
@@ -1091,20 +1092,26 @@ procedure TScreenEditSub.onShow;
begin
Log.LogStatus('Initializing', 'TEditScreen.onShow');
- MidiOut := TMidiOutput.Create(nil);
- if Ini.Debug = 1 then
- MidiOut.ProductName := 'Microsoft GS Wavetable SW Synth'; // for my kxproject without midi table
- MidiOut.Open;
-
- //MidiOut.SetVolume(65535, 65535);
-
-
+ try
+ ResetSingTemp;
+ Error := not LoadSong(Path + FileName);
+ except
+ Error := True;
+ end;
- CzyscNuty;
- if WczytajCzesci(Path + FileName) = false then
-// if WczytajCzesci(SongPath + 'Zapis.txt') = false then
- Text[TextTitle].Text := 'Error loading file'
+ if Error then
+ begin
+ //Error Loading Song -> Go back to Song Screen and Show some Error Message
+ FadeTo(@ScreenSong);
+ ScreenPopupError.ShowPopup (Language.Translate('ERROR_CORRUPT_SONG'));
+ Exit;
+ end
else begin
+ MidiOut := TMidiOutput.Create(nil);
+ if Ini.Debug = 1 then
+ MidiOut.ProductName := 'Microsoft GS Wavetable SW Synth'; // for my kxproject without midi table
+ MidiOut.Open;
+
Text[TextTitle].Text := AktSong.Title;
Text[TextArtist].Text := AktSong.Artist;
Text[TextMp3].Text := AktSong.Mp3;
@@ -1201,7 +1208,7 @@ begin
end;
end; // click
end; // if PlaySentence
-
+
Text[TextSentence].Text := IntToStr(Czesci[0].Akt + 1) + ' / ' + IntToStr(Czesci[0].Ilosc);
Text[TextNote].Text := IntToStr(AktNuta + 1) + ' / ' + IntToStr(Czesci[0].Czesc[Czesci[0].Akt].IlNut);
@@ -1210,23 +1217,31 @@ begin
Text[TextBPM].Text := FloatToStr(AktSong.BPM[0].BPM / 4);
Text[TextGAP].Text := FloatToStr(AktSong.GAP);
- // Note info
- Text[TextNStart].Text := IntToStr(Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Start);
- Text[TextNDlugosc].Text := IntToStr(Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Dlugosc);
- Text[TextNTon].Text := IntToStr(Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Ton) + ' ( ' + GetNoteName(Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Ton) + ' )';
- Text[TextNText].Text := Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Tekst;
+ //Error reading Variables when no Song is loaded
+ if not Error then
+ begin
+ // Note info
+ Text[TextNStart].Text := IntToStr(Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Start);
+ Text[TextNDlugosc].Text := IntToStr(Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Dlugosc);
+ Text[TextNTon].Text := IntToStr(Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Ton) + ' ( ' + GetNoteName(Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Ton) + ' )';
+ Text[TextNText].Text := Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Tekst;
+ end;
// Text Edit Mode
if TextEditMode then
- Text[TextNText].Text := Text[TextNText].Text + '|';
+ Text[TextNText].Text := Text[TextNText].Text + '|';
// draw static menu
inherited Draw;
// draw notes
SingDrawNoteLines(20, 300, 780, 15);
- SingDrawBeatDelimeters(40, 300, 760, 0);
- EditDrawCzesc(40, 405, 760, 0, 15);
+ //Error Drawing when no Song is loaded
+ if not Error then
+ begin
+ SingDrawBeatDelimeters(40, 300, 760, 0);
+ EditDrawCzesc(40, 405, 760, 0, 15);
+ end;
// draw text
Lyric.Draw;
@@ -1237,7 +1252,7 @@ procedure TScreenEditSub.onHide;
begin
MidiOut.Close;
MidiOut.Free;
- Music.SetVolume(100);
+ //Music.SetVolume(100);
end;
function TScreenEditSub.GetNoteName(Note: Integer): String;
diff --git a/Game/Code/Screens/UScreenLevel.pas b/Game/Code/Screens/UScreenLevel.pas
index a1d8fa33..fc343042 100644
--- a/Game/Code/Screens/UScreenLevel.pas
+++ b/Game/Code/Screens/UScreenLevel.pas
@@ -3,7 +3,7 @@ unit UScreenLevel;
interface
uses
- UMenu, SDL, UDisplay, UMusic, UPliki, SysUtils, UThemes;
+ UMenu, SDL, UDisplay, UMusic, UFiles, SysUtils, UThemes;
type
TScreenLevel = class(TMenu)
diff --git a/Game/Code/Screens/UScreenMain.pas b/Game/Code/Screens/UScreenMain.pas
index 47a79496..085f253d 100644
--- a/Game/Code/Screens/UScreenMain.pas
+++ b/Game/Code/Screens/UScreenMain.pas
@@ -3,7 +3,7 @@ unit UScreenMain;
interface
uses
- UMenu, SDL, UDisplay, UMusic, UPliki, SysUtils, UThemes, ULCD, ULight;
+ UMenu, SDL, UDisplay, UMusic, UFiles, SysUtils, UThemes, ULCD, ULight;
type
TScreenMain = class(TMenu)
diff --git a/Game/Code/Screens/UScreenName.pas b/Game/Code/Screens/UScreenName.pas
index 9db7947c..e2a80687 100644
--- a/Game/Code/Screens/UScreenName.pas
+++ b/Game/Code/Screens/UScreenName.pas
@@ -3,7 +3,7 @@ unit UScreenName;
interface
uses
- UMenu, SDL, UDisplay, UMusic, UPliki, SysUtils, UThemes;
+ UMenu, SDL, UDisplay, UMusic, UFiles, SysUtils, UThemes;
type
TScreenName = class(TMenu)
diff --git a/Game/Code/Screens/UScreenOpen.pas b/Game/Code/Screens/UScreenOpen.pas
index 3a78b3e2..f5e121f9 100644
--- a/Game/Code/Screens/UScreenOpen.pas
+++ b/Game/Code/Screens/UScreenOpen.pas
@@ -2,7 +2,7 @@ unit UScreenOpen;
interface
-uses UMenu, UMusic, SDL, SysUtils, UPliki, UTime, USongs, UIni, ULog, USmpeg, UTexture, UMenuText,
+uses UMenu, UMusic, SDL, SysUtils, UFiles, UTime, USongs, UIni, ULog, USmpeg, UTexture, UMenuText,
ULyrics, Math, OpenGL12, UThemes;
type
diff --git a/Game/Code/Screens/UScreenOptions.pas b/Game/Code/Screens/UScreenOptions.pas
index f0229d8c..02d42568 100644
--- a/Game/Code/Screens/UScreenOptions.pas
+++ b/Game/Code/Screens/UScreenOptions.pas
@@ -3,7 +3,7 @@ unit UScreenOptions;
interface
uses
- UMenu, SDL, SysUtils, UDisplay, UMusic, UPliki, UIni, UThemes;
+ UMenu, SDL, SysUtils, UDisplay, UMusic, UFiles, UIni, UThemes;
type
TScreenOptions = class(TMenu)
diff --git a/Game/Code/Screens/UScreenOptionsAdvanced.pas b/Game/Code/Screens/UScreenOptionsAdvanced.pas
index 3e3f2da7..a28945c1 100644
--- a/Game/Code/Screens/UScreenOptionsAdvanced.pas
+++ b/Game/Code/Screens/UScreenOptionsAdvanced.pas
@@ -3,7 +3,7 @@ unit UScreenOptionsAdvanced;
interface
uses
- UMenu, SDL, UDisplay, UMusic, UPliki, UIni, UThemes;
+ UMenu, SDL, UDisplay, UMusic, UFiles, UIni, UThemes;
type
TScreenOptionsAdvanced = class(TMenu)
diff --git a/Game/Code/Screens/UScreenOptionsGame.pas b/Game/Code/Screens/UScreenOptionsGame.pas
index 540931af..8712decc 100644
--- a/Game/Code/Screens/UScreenOptionsGame.pas
+++ b/Game/Code/Screens/UScreenOptionsGame.pas
@@ -3,7 +3,7 @@ unit UScreenOptionsGame;
interface
uses
- UMenu, SDL, UDisplay, UMusic, UPliki, UIni, UThemes, USongs;
+ UMenu, SDL, UDisplay, UMusic, UFiles, UIni, UThemes, USongs;
type
TScreenOptionsGame = class(TMenu)
diff --git a/Game/Code/Screens/UScreenOptionsGraphics.pas b/Game/Code/Screens/UScreenOptionsGraphics.pas
index b36bb7d3..c0641fc2 100644
--- a/Game/Code/Screens/UScreenOptionsGraphics.pas
+++ b/Game/Code/Screens/UScreenOptionsGraphics.pas
@@ -3,7 +3,7 @@ unit UScreenOptionsGraphics;
interface
uses
- UMenu, SDL, UDisplay, UMusic, UPliki, UIni, UThemes;
+ UMenu, SDL, UDisplay, UMusic, UFiles, UIni, UThemes;
type
TScreenOptionsGraphics = class(TMenu)
diff --git a/Game/Code/Screens/UScreenOptionsLyrics.pas b/Game/Code/Screens/UScreenOptionsLyrics.pas
index f60c9765..f4044933 100644
--- a/Game/Code/Screens/UScreenOptionsLyrics.pas
+++ b/Game/Code/Screens/UScreenOptionsLyrics.pas
@@ -3,7 +3,7 @@ unit UScreenOptionsLyrics;
interface
uses
- UMenu, SDL, UDisplay, UMusic, UPliki, UIni, UThemes;
+ UMenu, SDL, UDisplay, UMusic, UFiles, UIni, UThemes;
type
TScreenOptionsLyrics = class(TMenu)
diff --git a/Game/Code/Screens/UScreenOptionsRecord.pas b/Game/Code/Screens/UScreenOptionsRecord.pas
index c474bd7f..b005492a 100644
--- a/Game/Code/Screens/UScreenOptionsRecord.pas
+++ b/Game/Code/Screens/UScreenOptionsRecord.pas
@@ -3,7 +3,7 @@ unit UScreenOptionsRecord;
interface
uses
- UMenu, SDL, UDisplay, UMusic, UPliki, UIni, UThemes;
+ UMenu, SDL, UDisplay, UMusic, UFiles, UIni, UThemes;
type
TScreenOptionsRecord = class(TMenu)
diff --git a/Game/Code/Screens/UScreenOptionsSound.pas b/Game/Code/Screens/UScreenOptionsSound.pas
index d4ab27d2..c99f1ef6 100644
--- a/Game/Code/Screens/UScreenOptionsSound.pas
+++ b/Game/Code/Screens/UScreenOptionsSound.pas
@@ -3,7 +3,7 @@ unit UScreenOptionsSound;
interface
uses
- UMenu, SDL, UDisplay, UMusic, UPliki, UIni, UThemes;
+ UMenu, SDL, UDisplay, UMusic, UFiles, UIni, UThemes;
type
TScreenOptionsSound = class(TMenu)
diff --git a/Game/Code/Screens/UScreenOptionsThemes.pas b/Game/Code/Screens/UScreenOptionsThemes.pas
index 580f9c4d..b73693c1 100644
--- a/Game/Code/Screens/UScreenOptionsThemes.pas
+++ b/Game/Code/Screens/UScreenOptionsThemes.pas
@@ -3,7 +3,7 @@ unit UScreenOptionsThemes;
interface
uses
- UMenu, SDL, UDisplay, UMusic, UPliki, UIni, UThemes;
+ UMenu, SDL, UDisplay, UMusic, UFiles, UIni, UThemes;
type
TScreenOptionsThemes = class(TMenu)
diff --git a/Game/Code/Screens/UScreenPartyNewRound.pas b/Game/Code/Screens/UScreenPartyNewRound.pas
index c914ee4b..f084ee10 100644
--- a/Game/Code/Screens/UScreenPartyNewRound.pas
+++ b/Game/Code/Screens/UScreenPartyNewRound.pas
@@ -3,7 +3,7 @@ unit UScreenPartyNewRound;
interface
uses
- UMenu, SDL, UDisplay, UMusic, UPliki, SysUtils, UThemes;
+ UMenu, SDL, UDisplay, UMusic, UFiles, SysUtils, UThemes;
type
TScreenPartyNewRound = class(TMenu)
diff --git a/Game/Code/Screens/UScreenPartyOptions.pas b/Game/Code/Screens/UScreenPartyOptions.pas
index 7f3b1209..aa8681d0 100644
--- a/Game/Code/Screens/UScreenPartyOptions.pas
+++ b/Game/Code/Screens/UScreenPartyOptions.pas
@@ -3,7 +3,7 @@ unit UScreenPartyOptions;
interface
uses
- UMenu, SDL, UDisplay, UMusic, UPliki, SysUtils, UThemes;
+ UMenu, SDL, UDisplay, UMusic, UFiles, SysUtils, UThemes;
type
TScreenPartyOptions = class(TMenu)
diff --git a/Game/Code/Screens/UScreenPartyPlayer.pas b/Game/Code/Screens/UScreenPartyPlayer.pas
index d6e13d65..f6bcb0b7 100644
--- a/Game/Code/Screens/UScreenPartyPlayer.pas
+++ b/Game/Code/Screens/UScreenPartyPlayer.pas
@@ -3,7 +3,7 @@ unit UScreenPartyPlayer;
Interface
uses
- UMenu, SDL, UDisplay, UMusic, UPliki, SysUtils, UThemes;
+ UMenu, SDL, UDisplay, UMusic, UFiles, SysUtils, UThemes;
type
TScreenPartyPlayer = class(TMenu)
diff --git a/Game/Code/Screens/UScreenPopup.pas b/Game/Code/Screens/UScreenPopup.pas
index 9b71eb9a..2a789e42 100644
--- a/Game/Code/Screens/UScreenPopup.pas
+++ b/Game/Code/Screens/UScreenPopup.pas
@@ -3,7 +3,7 @@ unit UScreenPopup;
interface
uses
- UMenu, SDL, UMusic, UPliki, SysUtils, UThemes;
+ UMenu, SDL, UMusic, UFiles, SysUtils, UThemes;
type
TScreenPopupCheck = class(TMenu)
diff --git a/Game/Code/Screens/UScreenSing.pas b/Game/Code/Screens/UScreenSing.pas
index b49e0add..cdce5984 100644
--- a/Game/Code/Screens/UScreenSing.pas
+++ b/Game/Code/Screens/UScreenSing.pas
@@ -2,7 +2,7 @@ unit UScreenSing;
interface
-uses UMenu, UMusic, SDL, SysUtils, UPliki, UTime, USongs, UIni, ULog, USmpeg, UTexture, ULyrics,
+uses UMenu, UMusic, SDL, SysUtils, UFiles, UTime, USongs, UIni, ULog, USmpeg, UTexture, ULyrics,
TextGL, OpenGL12, BASS, UThemes, ULCD, UGraphicClasses;
type
@@ -321,11 +321,29 @@ begin
Text[TextP3RScore].Visible := V3R;
// load notes
- CzyscNuty;
+ ResetSingTemp;
// Log.LogWarning(CatSongs.Song[CatSongs.Selected].Path + CatSongs.Song[CatSongs.Selected].FileName, '!!!');
AktSong := CatSongs.Song[CatSongs.Selected];
-
- WczytajCzesci(CatSongs.Song[CatSongs.Selected].Path + CatSongs.Song[CatSongs.Selected].FileName);
+ try
+ if not LoadSong(CatSongs.Song[CatSongs.Selected].Path + CatSongs.Song[CatSongs.Selected].FileName) then
+ begin
+ //Error Loading Song -> Go back to Song Screen and Show some Error Message
+ FadeTo(@ScreenSong);
+ //Select New Song in Party Mode
+ if ScreenSong.Mode = 1 then
+ ScreenSong.SelectRandomSong;
+ ScreenPopupError.ShowPopup (Language.Translate('ERROR_CORRUPT_SONG'));
+ Exit;
+ end;
+ except
+ //Error Loading Song -> Go back to Song Screen and Show some Error Message
+ FadeTo(@ScreenSong);
+ //Select New Song in Party Mode
+ if ScreenSong.Mode = 1 then
+ ScreenSong.SelectRandomSong;
+ ScreenPopupError.ShowPopup (Language.Translate('ERROR_CORRUPT_SONG'));
+ Exit;
+ end;
AktSong.Path := CatSongs.Song[CatSongs.Selected].Path;
// AktSong.GAP := AktSong.GAP + 40 {4096 = 100ms for buffer} + 20 {microphone} + 60000 / AktSong.BPM[0].BPM / 2; // temporary until UMain will be fixed
diff --git a/Game/Code/Screens/UScreenSingModi.pas b/Game/Code/Screens/UScreenSingModi.pas
index 484d7d56..93ede980 100644
--- a/Game/Code/Screens/UScreenSingModi.pas
+++ b/Game/Code/Screens/UScreenSingModi.pas
@@ -2,7 +2,7 @@ unit UScreenSingModi;
interface
-uses UMenu, UMusic, SDL, SysUtils, UPliki, UTime, USongs, UIni, ULog, USmpeg, UTexture, ULyrics,
+uses UMenu, UMusic, SDL, SysUtils, UFiles, UTime, USongs, UIni, ULog, USmpeg, UTexture, ULyrics,
TextGL, OpenGL12, BASS, UThemes, ULCD, UScreenSing, ModiSDK;
type
diff --git a/Game/Code/Screens/UScreenSong.pas b/Game/Code/Screens/UScreenSong.pas
index 2ce6b6df..33a6752d 100644
--- a/Game/Code/Screens/UScreenSong.pas
+++ b/Game/Code/Screens/UScreenSong.pas
@@ -3,7 +3,7 @@ unit UScreenSong;
interface
uses
- UMenu, SDL, UMusic, UPliki, UTime, UDisplay, USongs, SysUtils, ULog, UThemes, UTexture, ULanguage,
+ UMenu, SDL, UMusic, UFiles, UTime, UDisplay, USongs, SysUtils, ULog, UThemes, UTexture, ULanguage,
ULCD, ULight, UIni;
type
@@ -1227,7 +1227,7 @@ end;
procedure TScreenSong.onHide;
begin
//When hide then Stop Music (For Party Mode Popup on Exit)
- if (Display.NextScreen <> @ScreenSing) and (Display.NextScreen <> @ScreenSingModi) then
+ if (Display.NextScreen <> @ScreenSing) and (Display.NextScreen <> @ScreenSingModi) and (Music <> nil) then
Music.Stop;
end;
diff --git a/Game/Code/Screens/UScreenSongJumpto.pas b/Game/Code/Screens/UScreenSongJumpto.pas
index 44c12f51..79e851ab 100644
--- a/Game/Code/Screens/UScreenSongJumpto.pas
+++ b/Game/Code/Screens/UScreenSongJumpto.pas
@@ -3,7 +3,7 @@ unit UScreenSongJumpto;
interface
uses
- UMenu, SDL, UDisplay, UMusic, UPliki, SysUtils, UThemes;
+ UMenu, SDL, UDisplay, UMusic, UFiles, SysUtils, UThemes;
type
TScreenSongJumpto = class(TMenu)
diff --git a/Game/Code/Screens/UScreenSongMenu.pas b/Game/Code/Screens/UScreenSongMenu.pas
index 537536bb..2469240f 100644
--- a/Game/Code/Screens/UScreenSongMenu.pas
+++ b/Game/Code/Screens/UScreenSongMenu.pas
@@ -3,7 +3,7 @@ unit UScreenSongMenu;
interface
uses
- UMenu, SDL, UDisplay, UMusic, UPliki, SysUtils, UThemes;
+ UMenu, SDL, UDisplay, UMusic, UFiles, SysUtils, UThemes;
type
TScreenSongMenu = class(TMenu)