aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Screens/UScreenEditSub.pas
diff options
context:
space:
mode:
authortobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-02-05 21:43:57 +0000
committertobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-02-05 21:43:57 +0000
commitb4371d97f409af8ab9dc942c39f143ae400854da (patch)
tree5bd113a33c9c289f00f24f3e675d7707c23607ba /Game/Code/Screens/UScreenEditSub.pas
parentd22d5070d1b847611786ca483055ea7348cda132 (diff)
downloadusdx-b4371d97f409af8ab9dc942c39f143ae400854da.tar.gz
usdx-b4371d97f409af8ab9dc942c39f143ae400854da.tar.xz
usdx-b4371d97f409af8ab9dc942c39f143ae400854da.zip
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
Diffstat (limited to 'Game/Code/Screens/UScreenEditSub.pas')
-rw-r--r--Game/Code/Screens/UScreenEditSub.pas13
1 files changed, 6 insertions, 7 deletions
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);