diff options
author | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2008-04-06 10:54:07 +0000 |
---|---|---|
committer | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2008-04-06 10:54:07 +0000 |
commit | 7ff5648675e396d529686a4a5096812a7972a4ca (patch) | |
tree | 405549e85f6eb10c79b44757a6da4e85d6a0a8f5 /Game/Code/Classes | |
parent | 30f9cbaa9b36454e68cba0aabe28c42bf7ebfd08 (diff) | |
download | usdx-7ff5648675e396d529686a4a5096812a7972a4ca.tar.gz usdx-7ff5648675e396d529686a4a5096812a7972a4ca.tar.xz usdx-7ff5648675e396d529686a4a5096812a7972a4ca.zip |
Replaced some {-comments with (*-comments to remove nested comments of the same type like: { {} }.
Although delphi and FPC can cope with them, some editors (like lazarus) don't like them and erroneously display everything after the comment as commented out.
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1004 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game/Code/Classes')
-rw-r--r-- | Game/Code/Classes/UDraw.pas | 4 | ||||
-rw-r--r-- | Game/Code/Classes/USong.pas | 129 | ||||
-rw-r--r-- | Game/Code/Classes/USongs.pas | 4 |
3 files changed, 69 insertions, 68 deletions
diff --git a/Game/Code/Classes/UDraw.pas b/Game/Code/Classes/UDraw.pas index 4b7d02fc..4d8b814d 100644 --- a/Game/Code/Classes/UDraw.pas +++ b/Game/Code/Classes/UDraw.pas @@ -616,7 +616,7 @@ begin ScreenSing.Lyrics.Draw(LineState.MidBeat); // todo: Lyrics -{ // rysuje pasek, podpowiadajacy poczatek spiwania w scenie +(* // rysuje pasek, podpowiadajacy poczatek spiwania w scenie FS := 1.3; BarFrom := Lines[0].Line[Lines[0].Current].StartNote - Lines[0].Line[Lines[0].Current].Start; if BarFrom > 40 then BarFrom := 40; @@ -654,7 +654,7 @@ begin glDisable(GL_BLEND); end; } - +*) // oscilloscope if Ini.Oscilloscope = 1 then begin if PlayersPlay = 1 then diff --git a/Game/Code/Classes/USong.pas b/Game/Code/Classes/USong.pas index 60f5f0bf..9e55671e 100644 --- a/Game/Code/Classes/USong.pas +++ b/Game/Code/Classes/USong.pas @@ -503,7 +503,8 @@ begin end; end; - +} +(* //Load TXT Song function TSong.LoadSong(): boolean; @@ -729,7 +730,7 @@ begin Parser := TParser.Create; - Parser.Settings.DashReplacement := '~';
+ Parser.Settings.DashReplacement := '~'; for Count := 0 to High(Lines) do begin @@ -747,38 +748,38 @@ begin //Try to Parse the Song If Parser.ParseSong(Path + PathDelim + FileName) then - begin
-// Writeln('XML Inputfile Parsed succesful');
- //Start write parsed information to Song
- //Notes Part
- For I := 0 to High(Parser.SongInfo.Sentences) do
- begin
- //Add Notes
- For J := 0 to High(Parser.SongInfo.Sentences[I].Notes) do
- begin
- Case Parser.SongInfo.Sentences[I].Notes[J].NoteTyp of
- NT_Normal: NoteType := ':';
- NT_Golden: NoteType := '*';
- NT_Freestyle: NoteType := 'F';
- end;
-
- Param1:=Parser.SongInfo.Sentences[I].Notes[J].Start; //Note Start
- Param2:=Parser.SongInfo.Sentences[I].Notes[J].Duration; //Note Duration
- Param3:=Parser.SongInfo.Sentences[I].Notes[J].Tone; //Note Tone
- ParamS:=' ' + Parser.SongInfo.Sentences[I].Notes[J].Lyric; //Note Lyric
-
-
- if not Both then
+ begin +// Writeln('XML Inputfile Parsed succesful'); + //Start write parsed information to Song + //Notes Part + For I := 0 to High(Parser.SongInfo.Sentences) do + begin + //Add Notes + For J := 0 to High(Parser.SongInfo.Sentences[I].Notes) do + begin + Case Parser.SongInfo.Sentences[I].Notes[J].NoteTyp of + NT_Normal: NoteType := ':'; + NT_Golden: NoteType := '*'; + NT_Freestyle: NoteType := 'F'; + end; + + Param1:=Parser.SongInfo.Sentences[I].Notes[J].Start; //Note Start + Param2:=Parser.SongInfo.Sentences[I].Notes[J].Duration; //Note Duration + Param3:=Parser.SongInfo.Sentences[I].Notes[J].Tone; //Note Tone + ParamS:=' ' + Parser.SongInfo.Sentences[I].Notes[J].Lyric; //Note Lyric + + + if not Both then // P1 ParseNote(0, NoteType, (Param1+Rel[0]) * Mult, Param2 * Mult, Param3, ParamS) else begin // P1 + P2 ParseNote(0, NoteType, (Param1+Rel[0]) * Mult, Param2 * Mult, Param3, ParamS); ParseNote(1, NoteType, (Param1+Rel[1]) * Mult, Param2 * Mult, Param3, ParamS); - end;
-
-
- if not Both then
+ end; + + + if not Both then begin Lines[CP].Line[Lines[CP].High].BaseNote := Base[CP]; Lines[CP].Line[Lines[CP].High].LyricWidth := glTextWidth(PChar(Lines[CP].Line[Lines[CP].High].Lyric)); @@ -802,30 +803,30 @@ If Parser.ParseSong(Path + PathDelim + FileName) then //Total Notes Patch End end; end; -
-
-
- end; //J Forloop
-
- //Add Sentence break
- If (I < High(Parser.SongInfo.Sentences)) then
- begin
-
- SentenceEnd := Parser.SongInfo.Sentences[I].Notes[High(Parser.SongInfo.Sentences[I].Notes)].Start + Parser.SongInfo.Sentences[I].Notes[High(Parser.SongInfo.Sentences[I].Notes)].Duration;
- Rest := Parser.SongInfo.Sentences[I+1].Notes[0].Start - SentenceEnd;
-
- //Calculate Time
- Case Rest of
- 0, 1: Time := Parser.SongInfo.Sentences[I+1].Notes[0].Start;
- 2: Time := Parser.SongInfo.Sentences[I+1].Notes[0].Start - 1;
- 3: Time := Parser.SongInfo.Sentences[I+1].Notes[0].Start - 2;
- else
- If (Rest >= 4) then
- Time := SentenceEnd + 2
- Else //Sentence overlapping :/
- Time := Parser.SongInfo.Sentences[I+1].Notes[0].Start;
- end;
- // new sentence
+ + + + end; //J Forloop + + //Add Sentence break + If (I < High(Parser.SongInfo.Sentences)) then + begin + + SentenceEnd := Parser.SongInfo.Sentences[I].Notes[High(Parser.SongInfo.Sentences[I].Notes)].Start + Parser.SongInfo.Sentences[I].Notes[High(Parser.SongInfo.Sentences[I].Notes)].Duration; + Rest := Parser.SongInfo.Sentences[I+1].Notes[0].Start - SentenceEnd; + + //Calculate Time + Case Rest of + 0, 1: Time := Parser.SongInfo.Sentences[I+1].Notes[0].Start; + 2: Time := Parser.SongInfo.Sentences[I+1].Notes[0].Start - 1; + 3: Time := Parser.SongInfo.Sentences[I+1].Notes[0].Start - 2; + else + If (Rest >= 4) then + Time := SentenceEnd + 2 + Else //Sentence overlapping :/ + Time := Parser.SongInfo.Sentences[I+1].Notes[0].Start; + end; + // new sentence if not Both then // P1 NewSentence(0, (Time + Rel[0]) * Mult, Param2) @@ -833,19 +834,19 @@ If Parser.ParseSong(Path + PathDelim + FileName) then // P1 + P2 NewSentence(0, (Time + Rel[0]) * Mult, Param2); NewSentence(1, (Time + Rel[1]) * Mult, Param2); - end;
-
- end;
- end;
+ end; + + end; + end; //End write parsed information to Song Parser.Free; - end
- else
- begin
- Log.LogError('Could not parse Inputfile: ' + Path + PathDelim + FileName);
- exit;
- end;
-
+ end + else + begin + Log.LogError('Could not parse Inputfile: ' + Path + PathDelim + FileName); + exit; + end; + for Count := 0 to High(Lines) do begin Lines[Count].Line[High(Lines[Count].Line)].LastLine := True; end; @@ -1232,6 +1233,6 @@ begin //Read Header Result := self.ReadXMLHeader( FileName ); -end; } +end; *) end. diff --git a/Game/Code/Classes/USongs.pas b/Game/Code/Classes/USongs.pas index 554a6e1e..5ae37d5d 100644 --- a/Game/Code/Classes/USongs.pas +++ b/Game/Code/Classes/USongs.pas @@ -449,7 +449,7 @@ begin CatNumShow := -1; // Songs.Sort(0); // by title -{case Ini.Sorting of +(*case Ini.Sorting of sEdition: begin Songs.Sort(sArtist); Songs.Sort(sEdition); @@ -744,7 +744,7 @@ begin if (ini.Tabs_at_startup = 1) And (high(Song) >=1) then Song[CatLen - CatNumber].CatNumber := CatNumber;//Set CatNumber of Categroy //CatCount Patch -CatCount := Order; } +CatCount := Order; *) end; procedure TCatSongs.ShowCategory(Index: integer); |