From b4371d97f409af8ab9dc942c39f143ae400854da Mon Sep 17 00:00:00 2001 From: tobigun Date: Tue, 5 Feb 2008 21:43:57 +0000 Subject: bugfix to get the editor working again. Path and FileName have not been set. In addtion LoadSong was not used to actually load the song. Jay or some other dev: please revise the changes. The Lyric var is not set too, so it crashes on Lyric.Clear in TScreenEditSub.onShow. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@829 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Screens/UScreenEditSub.pas | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'Game/Code/Screens/UScreenEditSub.pas') diff --git a/Game/Code/Screens/UScreenEditSub.pas b/Game/Code/Screens/UScreenEditSub.pas index 4d971c63..60e27245 100644 --- a/Game/Code/Screens/UScreenEditSub.pas +++ b/Game/Code/Screens/UScreenEditSub.pas @@ -89,8 +89,6 @@ type public Tex_Background: TTexture; FadeOut: boolean; - Path: string; - FileName: string; constructor Create; override; procedure onShow; override; function ParseInput(PressedKey: Cardinal; ScanCode: byte; PressedDown: Boolean): Boolean; override; @@ -223,9 +221,9 @@ begin begin // Save Song if SDL_ModState = KMOD_LSHIFT then - SaveSong(CurrentSong, Czesci[0], Path + FileName, true) + SaveSong(CurrentSong, Czesci[0], CurrentSong.Path + CurrentSong.FileName, true) else - SaveSong(CurrentSong, Czesci[0], Path + FileName, false); + SaveSong(CurrentSong, Czesci[0], CurrentSong.Path + CurrentSong.FileName, false); {if SDL_ModState = KMOD_LSHIFT or KMOD_LCTRL + KMOD_LALT then // Save Song @@ -1159,9 +1157,10 @@ procedure TScreenEditSub.onShow; begin Log.LogStatus('Initializing', 'TEditScreen.onShow'); + ResetSingTemp; + try - ResetSingTemp; -// Error := not LoadSong(Path + FileName); // todo - JB come back to this + Error := not CurrentSong.LoadSong(); except Error := True; end; @@ -1188,7 +1187,7 @@ begin AktNuta := 0; Czesci[0].Czesc[0].Nuta[0].Color := 1; - AudioPlayback.Open(Path + CurrentSong.Mp3); + AudioPlayback.Open(CurrentSong.Path + CurrentSong.Mp3); //Set Down Music Volume for Better hearability of Midi Sounds //Music.SetVolume(40); -- cgit v1.2.3