aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Classes/UFiles.pas
diff options
context:
space:
mode:
authorbrunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-06-23 17:38:15 +0000
committerbrunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-06-23 17:38:15 +0000
commit4c34cb5e200a4cdcdfaba52789e7d9a23a84dab6 (patch)
treef7636b99c3fea609fa355118261d070f761aa1a1 /Game/Code/Classes/UFiles.pas
parent041ee1b932cc9c058c545595751b77893dde75dc (diff)
downloadusdx-4c34cb5e200a4cdcdfaba52789e7d9a23a84dab6.tar.gz
usdx-4c34cb5e200a4cdcdfaba52789e7d9a23a84dab6.tar.xz
usdx-4c34cb5e200a4cdcdfaba52789e7d9a23a84dab6.zip
- fixed fading of player notes
- fixed golden note twinkle - added support for more than one EDITION tag in one txt - added support for more than one GENRE tag in one txt - "move text to right" and "move all notes left/right" for duet songs in editor git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/1.0.1 Challenge MOD@2557 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game/Code/Classes/UFiles.pas')
-rw-r--r--Game/Code/Classes/UFiles.pas34
1 files changed, 28 insertions, 6 deletions
diff --git a/Game/Code/Classes/UFiles.pas b/Game/Code/Classes/UFiles.pas
index 1787b740..ecf2cbc8 100644
--- a/Game/Code/Classes/UFiles.pas
+++ b/Game/Code/Classes/UFiles.pas
@@ -121,8 +121,10 @@ begin
Song.Artist := '';
//Sortings:
- Song.Genre := 'Unknown';
- Song.Edition := 'Unknown';
+ SetLength(Song.Genre, 1);
+ Song.Genre[0] := 'Unknown';
+ SetLength(Song.Edition, 1);
+ Song.Edition[0] := 'Unknown';
Song.Language := 'Unknown'; //Language Patch
//Required Information
@@ -157,6 +159,7 @@ var
Done: byte;
MedleyFlags: byte; //bit-vector for medley/preview tags
lWarnIfTagsNotFound : Boolean;
+ Len: integer;
{ adds a custom header tag to the song
if there is no ':' in the read line, Tag should be empty
@@ -305,13 +308,27 @@ begin
//Genre Sorting
else if (Identifier = 'GENRE') then
begin
- Song.Genre := Value;
+ Len := Length(Song.Genre);
+ if (Song.Genre[0] <> 'Unknown') then
+ begin
+ Inc(Len);
+ SetLength(Song.Genre, Len);
+ end;
+
+ Song.Genre[Len-1] := Value;
end
//Edition Sorting
else if (Identifier = 'EDITION') then
begin
- Song.Edition := Value;
+ Len := Length(Song.Edition);
+ if (Song.Edition[0] <> 'Unknown') then
+ begin
+ Inc(Len);
+ SetLength(Song.Edition, Len);
+ end;
+
+ Song.Edition[Len-1] := Value;
end
//Creator Tag
@@ -1101,8 +1118,13 @@ begin
WriteLn(SongFile, '#ARTIST:' + Song.Artist);
if Song.Creator <> '' then WriteLn(SongFile, '#CREATOR:' + Song.Creator);
- if Song.Edition <> 'Unknown' then WriteLn(SongFile, '#EDITION:' + Song.Edition);
- if Song.Genre <> 'Unknown' then WriteLn(SongFile, '#GENRE:' + Song.Genre);
+
+ for C := 0 to Length(Song.Edition)-1 do
+ if Song.Edition[C] <> 'Unknown' then WriteLn(SongFile, '#EDITION:' + Song.Edition[C]);
+
+ for C := 0 to Length(Song.Genre) - 1 do
+ if Song.Genre[C] <> 'Unknown' then WriteLn(SongFile, '#GENRE:' + Song.Genre[C]);
+
if Song.Language <> 'Unknown' then WriteLn(SongFile, '#LANGUAGE:' + Song.Language);
WriteLn(SongFile, '#MP3:' + Song.Mp3);