aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code
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
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')
-rw-r--r--Game/Code/Classes/UDraw.pas6
-rw-r--r--Game/Code/Classes/UFiles.pas34
-rw-r--r--Game/Code/Classes/UGraphicClasses.pas14
-rw-r--r--Game/Code/Classes/USongs.pas236
-rw-r--r--Game/Code/Screens/UScreenEditSub.pas41
5 files changed, 215 insertions, 116 deletions
diff --git a/Game/Code/Classes/UDraw.pas b/Game/Code/Classes/UDraw.pas
index fd9219ce..0d0a710b 100644
--- a/Game/Code/Classes/UDraw.pas
+++ b/Game/Code/Classes/UDraw.pas
@@ -386,7 +386,6 @@ begin
end; }
end;
- glColor4f(1, 1, 1, Alpha);
glEnable(GL_TEXTURE_2D);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
@@ -414,7 +413,7 @@ begin
Rec.Top := Y - (Ton-Czesci[CP].Czesc[Czesci[CP].Akt].BaseNote)*Space/2 - NotesH2;
Rec.Bottom := Rec.Top + 2 *NotesH2;
- glColor3f(1, 1, 1);
+ glColor4f(1, 1, 1, Alpha);
glBindTexture(GL_TEXTURE_2D, Tex_Left[NrGracza+1].TexNum);
glBegin(GL_QUADS);
glTexCoord2f(0, 0); glVertex2f(Rec.Left, Rec.Top);
@@ -442,7 +441,6 @@ begin
glTexCoord2f(1, 1); glVertex2f(Rec.Right, Rec.Bottom);
glTexCoord2f(1, 0); glVertex2f(Rec.Right, Rec.Top);
glEnd;
- glColor3f(1, 1, 1);
// prawa czesc
Rec.Left := Rec.Right;
@@ -480,7 +478,7 @@ begin
// some kind of weird index into a colour-table
if (Ini.EffectSing=1) then
- GoldenRec.GoldenNoteTwinkle(Rec.Top,Rec.Bottom,Rec.Right, NrGracza);
+ GoldenRec.GoldenNoteTwinkle(Rec.Top,Rec.Bottom,Rec.Right, NrGracza, CP);
end; // if
end;
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);
diff --git a/Game/Code/Classes/UGraphicClasses.pas b/Game/Code/Classes/UGraphicClasses.pas
index 260d7c5e..a26ea2f3 100644
--- a/Game/Code/Classes/UGraphicClasses.pas
+++ b/Game/Code/Classes/UGraphicClasses.pas
@@ -79,7 +79,7 @@ type
procedure SentenceChange(CP: integer); //TODO!!!!
procedure SaveGoldenStarsRec(Xtop, Ytop, Xbottom, Ybottom: Real; CP: integer);
procedure SavePerfectNotePos(Xtop, Ytop: Real);
- procedure GoldenNoteTwinkle(Top,Bottom,Right: Real; Player: Integer);
+ procedure GoldenNoteTwinkle(Top,Bottom,Right: Real; Player: Integer; CP: Integer);
procedure SpawnPerfectLineTwinkle();
end;
@@ -476,7 +476,7 @@ begin
end;
end;
-procedure TeffectManager.GoldenNoteTwinkle(Top,Bottom,Right: Real; Player: Integer);
+procedure TeffectManager.GoldenNoteTwinkle(Top,Bottom,Right: Real; Player: Integer; CP: integer);
//Twinkle stars while golden note hit
// this is called from UDraw.pas, SingDrawPlayerCzesc
var
@@ -499,35 +499,35 @@ begin
Ykatze := RandomRange(ceil(Top) , ceil(Bottom));
XKatze := RandomRange(-7,3);
LKatze := RandomRange(7,13);
- Spawn(Ceil(Right)+XKatze, YKatze, ScreenAct, LKatze, 0, -1, NoteHitTwinkle, 0, (Player+1) mod 2);
+ Spawn(Ceil(Right)+XKatze, YKatze, ScreenAct, LKatze, 0, -1, NoteHitTwinkle, Player, CP);
end;
for C := 1 to 3 do
begin
Ykatze := RandomRange(ceil(Top)-6 , ceil(Top));
XKatze := RandomRange(-5,1);
LKatze := RandomRange(4,7);
- Spawn(Ceil(Right)+XKatze, YKatze, ScreenAct, LKatze, 0, -1, NoteHitTwinkle, 0, (Player+1) mod 2);
+ Spawn(Ceil(Right)+XKatze, YKatze, ScreenAct, LKatze, 0, -1, NoteHitTwinkle, Player, CP);
end;
for C := 1 to 3 do
begin
Ykatze := RandomRange(ceil(Bottom), ceil(Bottom)+6);
XKatze := RandomRange(-5,1);
LKatze := RandomRange(4,7);
- Spawn(Ceil(Right)+XKatze, YKatze, ScreenAct, LKatze, 0, -1, NoteHitTwinkle, 0, (Player+1) mod 2);
+ Spawn(Ceil(Right)+XKatze, YKatze, ScreenAct, LKatze, 0, -1, NoteHitTwinkle, Player, CP);
end;
for C := 1 to 3 do
begin
Ykatze := RandomRange(ceil(Top)-10 , ceil(Top)-6);
XKatze := RandomRange(-5,1);
LKatze := RandomRange(1,4);
- Spawn(Ceil(Right)+XKatze, YKatze, ScreenAct, LKatze, 0, -1, NoteHitTwinkle, 0, (Player+1) mod 2);
+ Spawn(Ceil(Right)+XKatze, YKatze, ScreenAct, LKatze, 0, -1, NoteHitTwinkle, Player, CP);
end;
for C := 1 to 3 do
begin
Ykatze := RandomRange(ceil(Bottom)+6 , ceil(Bottom)+10);
XKatze := RandomRange(-5,1);
LKatze := RandomRange(1,4);
- Spawn(Ceil(Right)+XKatze, YKatze, ScreenAct, LKatze, 0, -1, NoteHitTwinkle, 0, (Player+1) mod 2);
+ Spawn(Ceil(Right)+XKatze, YKatze, ScreenAct, LKatze, 0, -1, NoteHitTwinkle, Player, CP);
end;
exit; // found a matching GoldenRec, did spawning stuff... done
diff --git a/Game/Code/Classes/USongs.pas b/Game/Code/Classes/USongs.pas
index cb49ec9d..d622f2f2 100644
--- a/Game/Code/Classes/USongs.pas
+++ b/Game/Code/Classes/USongs.pas
@@ -50,8 +50,8 @@ type
// sorting methods
Category: array of string; // I think I won't need this
- Genre: string;
- Edition: string;
+ Genre: array of string;
+ Edition: array of string;
Language: string; // 0.5.0: new
Title: string;
@@ -90,6 +90,7 @@ type
BrowsePos: Cardinal; //Actual Pos in Song Array
public
Song: array of TSong; // array of songs
+ SongSort: array of TSong;
Selected: integer; // selected song index
procedure LoadSongList; // load all songs
procedure BrowseDir(Dir: string); // should return number of songs in the future
@@ -122,7 +123,7 @@ type
var
Songs: TSongs; // all songs
CatSongs: TCatSongs; // categorized songs
- AktSong: TSong; // one song *unknown use)
+ AktSong: TSong; // one song
implementation
@@ -212,95 +213,104 @@ var
S: integer;
S2: integer;
TempSong: TSong;
+
begin
case Order of
sEdition: // by edition
begin
- for S2 := 0 to Length(Song)-1 do
- for S := 1 to Length(Song)-1 do
- if CompareText(Song[S].Edition, Song[S-1].Edition) < 0 then begin
+ for S2 := 0 to Length(SongSort)-1 do
+ for S := 1 to Length(SongSort)-1 do
+ if CompareText(SongSort[S].Edition[0], SongSort[S-1].Edition[0]) < 0 then
+ begin
// zamiana miejscami
- TempSong := Song[S-1];
- Song[S-1] := Song[S];
- Song[S] := TempSong;
+ TempSong := SongSort[S-1];
+ SongSort[S-1] := SongSort[S];
+ SongSort[S] := TempSong;
end;
end;
sGenre: // by genre
begin
- for S2 := 0 to Length(Song)-1 do
- for S := 1 to Length(Song)-1 do
- if CompareText(Song[S].Genre, Song[S-1].Genre) < 0 then begin
+ for S2 := 0 to Length(SongSort)-1 do
+ for S := 1 to Length(SongSort)-1 do
+ if CompareText(SongSort[S].Genre[0], SongSort[S-1].Genre[0]) < 0 then
+ begin
// zamiana miejscami
- TempSong := Song[S-1];
- Song[S-1] := Song[S];
- Song[S] := TempSong;
+ TempSong := SongSort[S-1];
+ SongSort[S-1] := SongSort[S];
+ SongSort[S] := TempSong;
end;
end;
sTitle: // by title
begin
- for S2 := 0 to Length(Song)-1 do
- for S := 1 to Length(Song)-1 do
- if CompareText(Song[S].Title, Song[S-1].Title) < 0 then begin
+ for S2 := 0 to Length(SongSort)-1 do
+ for S := 1 to Length(SongSort)-1 do
+ if CompareText(SongSort[S].Title, SongSort[S-1].Title) < 0 then
+ begin
// zamiana miejscami
- TempSong := Song[S-1];
- Song[S-1] := Song[S];
- Song[S] := TempSong;
+ TempSong := SongSort[S-1];
+ SongSort[S-1] := SongSort[S];
+ SongSort[S] := TempSong;
end;
end;
sArtist: // by artist
begin
- for S2 := 0 to Length(Song)-1 do
- for S := 1 to Length(Song)-1 do
- if CompareText(Song[S].Artist, Song[S-1].Artist) < 0 then begin
+ for S2 := 0 to Length(SongSort)-1 do
+ for S := 1 to Length(SongSort)-1 do
+ if CompareText(SongSort[S].Artist, SongSort[S-1].Artist) < 0 then
+ begin
// zamiana miejscami
- TempSong := Song[S-1];
- Song[S-1] := Song[S];
- Song[S] := TempSong;
+ TempSong := SongSort[S-1];
+ SongSort[S-1] := SongSort[S];
+ SongSort[S] := TempSong;
end;
end;
sFolder: // by folder
begin
- for S2 := 0 to Length(Song)-1 do
- for S := 1 to Length(Song)-1 do
- if CompareText(Song[S].Folder, Song[S-1].Folder) < 0 then begin
+ for S2 := 0 to Length(SongSort)-1 do
+ for S := 1 to Length(SongSort)-1 do
+ if CompareText(SongSort[S].Folder, SongSort[S-1].Folder) < 0 then
+ begin
// zamiana miejscami
- TempSong := Song[S-1];
- Song[S-1] := Song[S];
- Song[S] := TempSong;
+ TempSong := SongSort[S-1];
+ SongSort[S-1] := SongSort[S];
+ SongSort[S] := TempSong;
end;
end;
sTitle2: // by title2
begin
- for S2 := 0 to Length(Song)-1 do
- for S := 1 to Length(Song)-1 do
- if CompareText(Song[S].Title, Song[S-1].Title) < 0 then begin
+ for S2 := 0 to Length(SongSort)-1 do
+ for S := 1 to Length(SongSort)-1 do
+ if CompareText(SongSort[S].Title, SongSort[S-1].Title) < 0 then
+ begin
// zamiana miejscami
- TempSong := Song[S-1];
- Song[S-1] := Song[S];
- Song[S] := TempSong;
+ TempSong := SongSort[S-1];
+ SongSort[S-1] := SongSort[S];
+ SongSort[S] := TempSong;
end;
end;
sArtist2: // by artist2
begin
- for S2 := 0 to Length(Song)-1 do
- for S := 1 to Length(Song)-1 do
- if CompareText(Song[S].Artist, Song[S-1].Artist) < 0 then begin
+ for S2 := 0 to Length(SongSort)-1 do
+ for S := 1 to Length(SongSort)-1 do
+ if CompareText(SongSort[S].Artist, SongSort[S-1].Artist) < 0 then
+ begin
// zamiana miejscami
- TempSong := Song[S-1];
- Song[S-1] := Song[S];
- Song[S] := TempSong;
+ TempSong := SongSort[S-1];
+ SongSort[S-1] := SongSort[S];
+ SongSort[S] := TempSong;
end;
end;
sLanguage: // by Language
begin
- for S2 := 0 to Length(Song)-1 do
- for S := 1 to Length(Song)-1 do
- if CompareText(Song[S].Language, Song[S-1].Language) < 0 then begin
- TempSong := Song[S-1];
- Song[S-1] := Song[S];
- Song[S] := TempSong;
+ for S2 := 0 to Length(SongSort)-1 do
+ for S := 1 to Length(SongSort)-1 do
+ if CompareText(SongSort[S].Language, SongSort[S-1].Language) < 0 then
+ begin
+ TempSong := SongSort[S-1];
+ SongSort[S-1] := SongSort[S];
+ SongSort[S] := TempSong;
end;
end;
@@ -320,16 +330,90 @@ end;
procedure TCatSongs.Refresh;
var
- S: integer; // temporary song index
+ S, I: integer; // temporary song index
CatLen: integer; // length of CatSongs.Song
Letter: char; // current letter for sorting using letter
SS: string; // current edition for sorting using edition, genre etc.
Order: integer; // number used for ordernum
Letter2: char; //
CatNumber:integer; // Number of Song in Category
+
+ procedure CheckEdition(SongNr: integer);
+ var
+ newNr: integer;
+ I: integer;
+
+ begin
+ if (Length(Songs.SongSort[SongNr].Edition)>1) then
+ begin
+ newNr := Length(Songs.SongSort);
+ SetLength(Songs.SongSort, newNr+1);
+ Songs.SongSort[newNr] := Songs.SongSort[SongNr];
+ SetLength(Songs.SongSort[SongNr].Edition, 1);
+
+ for I := 0 to Length(Songs.SongSort[newNr].Edition) - 2 do
+ Songs.SongSort[newNr].Edition[I] := Songs.SongSort[newNr].Edition[I+1];
+
+ SetLength(Songs.SongSort[newNr].Edition, Length(Songs.SongSort[newNr].Edition)-1);
+ CheckEdition(newNr);
+ end;
+ end;
+
+ procedure CheckGenre(SongNr: integer);
+ var
+ newNr: integer;
+ I: integer;
+
+ begin
+ if (Length(Songs.SongSort[SongNr].Genre)>1) then
+ begin
+ newNr := Length(Songs.SongSort);
+ SetLength(Songs.SongSort, newNr+1);
+ Songs.SongSort[newNr] := Songs.SongSort[SongNr];
+ SetLength(Songs.SongSort[SongNr].Genre, 1);
+
+ for I := 0 to Length(Songs.SongSort[newNr].Genre) - 2 do
+ Songs.SongSort[newNr].Genre[I] := Songs.SongSort[newNr].Genre[I+1];
+
+ SetLength(Songs.SongSort[newNr].Genre, Length(Songs.SongSort[newNr].Genre)-1);
+ CheckGenre(newNr);
+ end;
+ end;
begin
CatNumShow := -1;
+ SetLength(Songs.SongSort, 0);
+ SetLength(Songs.SongSort, Length(Songs.Song));
+
+ for S := 0 to Length(Songs.Song) - 1 do
+ begin
+ Songs.SongSort[S] := Songs.Song[S];
+ if (Ini.Tabs=1) then
+ begin
+ if (Ini.Sorting=sEdition) then
+ begin
+ //work-around:
+ SetLength(Songs.SongSort[S].Edition, 0);
+ SetLength(Songs.SongSort[S].Edition, Length(Songs.Song[S].Edition));
+ for I := 0 to Length(Songs.Song[S].Edition) - 1 do
+ Songs.SongSort[S].Edition[I] := Songs.Song[S].Edition[I];
+ //end work-around
+
+ CheckEdition(S);
+ end else if (Ini.Sorting = sGenre) then
+ begin
+ //work-around:
+ SetLength(Songs.SongSort[S].Genre, 0);
+ SetLength(Songs.SongSort[S].Genre, Length(Songs.Song[S].Genre));
+ for I := 0 to Length(Songs.Song[S].Genre) - 1 do
+ Songs.SongSort[S].Genre[I] := Songs.Song[S].Genre[I];
+ //end work-around
+
+ CheckGenre(S);
+ end;
+ end;
+ end;
+
case Ini.Sorting of
sEdition: begin
Songs.Sort(sArtist);
@@ -363,16 +447,16 @@ begin
//Songs leeren
SetLength (CatSongs.Song, 0);
- for S := Low(Songs.Song) to High(Songs.Song) do
+ for S := Low(Songs.SongSort) to High(Songs.SongSort) do
begin
if (Ini.Tabs = 1) then
begin
if (Ini.Sorting = sEdition) and
- (CompareText(SS, Songs.Song[S].Edition) <> 0) then
+ (CompareText(SS, Songs.SongSort[S].Edition[0]) <> 0) then
begin
// add Category Button
Inc(Order);
- SS := Songs.Song[S].Edition;
+ SS := Songs.SongSort[S].Edition[0];
CatLen := Length(CatSongs.Song);
SetLength(CatSongs.Song, CatLen+1);
CatSongs.Song[CatLen].Artist := '[' + SS + ']';
@@ -392,11 +476,11 @@ begin
CatSongs.Song[CatLen].Visible := true;
end else if (Ini.Sorting = sGenre) and
- (CompareText(SS, Songs.Song[S].Genre) <> 0) then
+ (CompareText(SS, Songs.SongSort[S].Genre[0]) <> 0) then
begin
// add Genre Button
Inc(Order);
- SS := Songs.Song[S].Genre;
+ SS := Songs.SongSort[S].Genre[0];
CatLen := Length(CatSongs.Song);
SetLength(CatSongs.Song, CatLen+1);
CatSongs.Song[CatLen].Artist := SS;
@@ -416,11 +500,11 @@ begin
CatSongs.Song[CatLen].Visible := true;
end else if (Ini.Sorting = sLanguage) and
- (CompareText(SS, Songs.Song[S].Language) <> 0) then
+ (CompareText(SS, Songs.SongSort[S].Language) <> 0) then
begin
// add Language Button
Inc(Order);
- SS := Songs.Song[S].Language;
+ SS := Songs.SongSort[S].Language;
CatLen := Length(CatSongs.Song);
SetLength(CatSongs.Song, CatLen+1);
CatSongs.Song[CatLen].Artist := SS;
@@ -440,12 +524,12 @@ begin
CatSongs.Song[CatLen].Visible := true;
end else if (Ini.Sorting = sTitle) and
- (Length(Songs.Song[S].Title)>=1) and
- (Letter <> UpCase(Songs.Song[S].Title[1])) then
+ (Length(Songs.SongSort[S].Title)>=1) and
+ (Letter <> UpCase(Songs.SongSort[S].Title[1])) then
begin
// add a letter Category Button
Inc(Order);
- Letter := UpCase(Songs.Song[S].Title[1]);
+ Letter := UpCase(Songs.SongSort[S].Title[1]);
CatLen := Length(CatSongs.Song);
SetLength(CatSongs.Song, CatLen+1);
CatSongs.Song[CatLen].Artist := '[' + Letter + ']';
@@ -465,12 +549,12 @@ begin
CatSongs.Song[CatLen].Visible := true;
end else if (Ini.Sorting = sArtist) and
- (Length(Songs.Song[S].Artist)>=1) and
- (Letter <> UpCase(Songs.Song[S].Artist[1])) then
+ (Length(Songs.SongSort[S].Artist)>=1) and
+ (Letter <> UpCase(Songs.SongSort[S].Artist[1])) then
begin
// add a letter Category Button
Inc(Order);
- Letter := UpCase(Songs.Song[S].Artist[1]);
+ Letter := UpCase(Songs.SongSort[S].Artist[1]);
CatLen := Length(CatSongs.Song);
SetLength(CatSongs.Song, CatLen+1);
CatSongs.Song[CatLen].Artist := '[' + Letter + ']';
@@ -490,11 +574,11 @@ begin
CatSongs.Song[CatLen].Visible := true;
end else if (Ini.Sorting = sFolder) and
- (CompareText(SS, Songs.Song[S].Folder) <> 0) then
+ (CompareText(SS, Songs.SongSort[S].Folder) <> 0) then
begin
// 0.5.0: add folder tab
Inc(Order);
- SS := Songs.Song[S].Folder;
+ SS := Songs.SongSort[S].Folder;
CatLen := Length(CatSongs.Song);
SetLength(CatSongs.Song, CatLen+1);
CatSongs.Song[CatLen].Artist := SS;
@@ -514,13 +598,13 @@ begin
CatSongs.Song[CatLen].Visible := true;
end else if (Ini.Sorting = sTitle2) AND
- (Length(Songs.Song[S].Title)>=1) then
+ (Length(Songs.SongSort[S].Title)>=1) then
begin
- if (ord(Songs.Song[S].Title[1]) > 47) and
- (ord(Songs.Song[S].Title[1]) < 58) then
+ if (ord(Songs.SongSort[S].Title[1]) > 47) and
+ (ord(Songs.SongSort[S].Title[1]) < 58) then
Letter2 := '#'
else
- Letter2 := UpCase(Songs.Song[S].Title[1]);
+ Letter2 := UpCase(Songs.SongSort[S].Title[1]);
if (Letter <> Letter2) then
begin
@@ -548,13 +632,13 @@ begin
CatSongs.Song[CatLen].Visible := true;
end;
end else if (Ini.Sorting = sArtist2) AND
- (Length(Songs.Song[S].Artist)>=1) then
+ (Length(Songs.SongSort[S].Artist)>=1) then
begin
- if (ord(Songs.Song[S].Artist[1]) > 47) and
- (ord(Songs.Song[S].Artist[1]) < 58) then
+ if (ord(Songs.SongSort[S].Artist[1]) > 47) and
+ (ord(Songs.SongSort[S].Artist[1]) < 58) then
Letter2 := '#'
else
- Letter2 := UpCase(Songs.Song[S].Artist[1]);
+ Letter2 := UpCase(Songs.SongSort[S].Artist[1]);
if (Letter <> Letter2) then
begin
@@ -588,7 +672,7 @@ begin
Inc (CatNumber); //Increase Number in Cat
- CatSongs.Song[CatLen] := Songs.Song[S];
+ CatSongs.Song[CatLen] := Songs.SongSort[S];
CatSongs.Song[CatLen].OrderNum := Order; // assigns category
CatSongs.Song[CatLen].CatNumber := CatNumber;
diff --git a/Game/Code/Screens/UScreenEditSub.pas b/Game/Code/Screens/UScreenEditSub.pas
index 8b3d3117..e41aba86 100644
--- a/Game/Code/Screens/UScreenEditSub.pas
+++ b/Game/Code/Screens/UScreenEditSub.pas
@@ -929,8 +929,6 @@ begin
SDLK_PERIOD:
begin
// moves text to right in current sentence
- if AktSong.isDuet then
- Exit;
MoveTextToRight;
end;
@@ -1010,9 +1008,6 @@ begin
// alt + ctrl + shift + right = move all from cursor to right
if SDL_ModState = KMOD_LALT + KMOD_LCTRL + KMOD_LSHIFT then
begin
- if AktSong.isDuet then
- Exit;
-
MoveAllToEnd(1);
FixTimings;
end;
@@ -1095,8 +1090,6 @@ begin
// alt + ctrl + shift + right = move all from cursor to left
if SDL_ModState = KMOD_LALT + KMOD_LCTRL + KMOD_LSHIFT then
begin
- if AktSong.isDuet then
- Exit;
MoveAllToEnd(-1);
FixTimings;
end;
@@ -1985,6 +1978,7 @@ begin
//SelectPrevNote();
//SelectNextNote();
Czesci[CP].Czesc[Czesci[CP].Akt].Nuta[AktNuta[CP]].Color := 2;
+ EditorLyric[CP].AddCzesc(CP, Czesci[CP].Akt);
end;
procedure TScreenEditSub.TransposeNote(Transpose: integer);
@@ -2021,26 +2015,26 @@ var
N: integer;
NStart: integer;
begin
- for C := Czesci[0].Akt to Czesci[0].High do
+ for C := Czesci[CP].Akt to Czesci[CP].High do
begin
NStart := 0;
- if C = Czesci[0].Akt then NStart := AktNuta[0];
- for N := NStart to Czesci[0].Czesc[C].HighNut do
+ if C = Czesci[CP].Akt then NStart := AktNuta[CP];
+ for N := NStart to Czesci[CP].Czesc[C].HighNut do
begin
- Inc(Czesci[0].Czesc[C].Nuta[N].Start, Move); // move note start
+ Inc(Czesci[CP].Czesc[C].Nuta[N].Start, Move); // move note start
if N = 0 then
begin // fix beginning
- Inc(Czesci[0].Czesc[C].Start, Move);
- Inc(Czesci[0].Czesc[C].StartNote, Move);
+ Inc(Czesci[CP].Czesc[C].Start, Move);
+ Inc(Czesci[CP].Czesc[C].StartNote, Move);
end;
- if N = Czesci[0].Czesc[C].HighNut then // fix ending
- Inc(Czesci[0].Czesc[C].Koniec, Move);
+ if N = Czesci[CP].Czesc[C].HighNut then // fix ending
+ Inc(Czesci[CP].Czesc[C].Koniec, Move);
end; // for
end; // for
- EditorLyric[0].AddCzesc(0, Czesci[0].Akt);
+ EditorLyric[CP].AddCzesc(CP, Czesci[CP].Akt);
end;
procedure TScreenEditSub.MoveTextToRight;
@@ -2049,19 +2043,20 @@ var
N: integer;
NHigh: integer;
begin
- C := Czesci[0].Akt;
- NHigh := Czesci[0].Czesc[C].HighNut;
+ C := Czesci[CP].Akt;
+ NHigh := Czesci[CP].Czesc[C].HighNut;
// last word
- Czesci[0].Czesc[C].Nuta[NHigh].Tekst := Czesci[0].Czesc[C].Nuta[NHigh-1].Tekst + Czesci[0].Czesc[C].Nuta[NHigh].Tekst;
+ Czesci[CP].Czesc[C].Nuta[NHigh].Tekst := Czesci[CP].Czesc[C].Nuta[NHigh-1].Tekst +
+ Czesci[CP].Czesc[C].Nuta[NHigh].Tekst;
// other words
- for N := NHigh - 1 downto AktNuta[0] + 1 do
+ for N := NHigh - 1 downto AktNuta[CP] + 1 do
begin
- Czesci[0].Czesc[C].Nuta[N].Tekst := Czesci[0].Czesc[C].Nuta[N-1].Tekst;
+ Czesci[CP].Czesc[C].Nuta[N].Tekst := Czesci[CP].Czesc[C].Nuta[N-1].Tekst;
end; // for
- Czesci[0].Czesc[C].Nuta[AktNuta[0]].Tekst := '- ';
- EditorLyric[0].AddCzesc(0, Czesci[0].Akt);
+ Czesci[CP].Czesc[C].Nuta[AktNuta[CP]].Tekst := '- ';
+ EditorLyric[CP].AddCzesc(CP, Czesci[CP].Akt);
end;
procedure TScreenEditSub.MarkSrc;