diff --git a/src/base/UDraw.pas b/src/base/UDraw.pas index 80fb5c25b..827918672 100644 --- a/src/base/UDraw.pas +++ b/src/base/UDraw.pas @@ -80,6 +80,9 @@ TRecR = record Mid: real; end; +const +P1_INVERTED = 99; + var NotesW: array [0..UIni.IMaxPlayerCount-1] of real; NotesH: array [0..UIni.IMaxPlayerCount-1] of real; @@ -1661,14 +1664,14 @@ procedure EditDrawLine(X, YBaseNote, W, H: real; Track: integer; NumLines: integ Rec.Bottom := Rec.Top + 2 * NotesH[0]; If (NoteType = ntRap) or (NoteType = ntRapGolden) then begin - If Color = 99 then + If Color = P1_INVERTED then glBindTexture(GL_TEXTURE_2D, Tex_Left_Rap_Inv.TexNum) else glBindTexture(GL_TEXTURE_2D, Tex_Left_Rap[Color].TexNum) end else begin - If Color = 99 then + If Color = P1_INVERTED then glBindTexture(GL_TEXTURE_2D, Tex_Left_Inv.TexNum) else glBindTexture(GL_TEXTURE_2D, Tex_Left[Color].TexNum) @@ -1687,14 +1690,14 @@ procedure EditDrawLine(X, YBaseNote, W, H: real; Track: integer; NumLines: integ If (NoteType = ntRap) or (NoteType = ntRapGolden) then begin - If Color = 99 then + If Color = P1_INVERTED then glBindTexture(GL_TEXTURE_2D, Tex_Mid_Rap_Inv.TexNum) else glBindTexture(GL_TEXTURE_2D, Tex_Mid_Rap[Color].TexNum) end else begin - If Color = 99 then + If Color = P1_INVERTED then glBindTexture(GL_TEXTURE_2D, Tex_Mid_Inv.TexNum) else glBindTexture(GL_TEXTURE_2D, Tex_Mid[Color].TexNum) @@ -1712,14 +1715,14 @@ procedure EditDrawLine(X, YBaseNote, W, H: real; Track: integer; NumLines: integ If (NoteType = ntRap) or (NoteType = ntRapGolden) then begin - If Color = 99 then + If Color = P1_INVERTED then glBindTexture(GL_TEXTURE_2D, Tex_Right_Rap_Inv.TexNum) else glBindTexture(GL_TEXTURE_2D, Tex_Right_Rap[Color].TexNum) end else begin - If Color = 99 then + If Color = P1_INVERTED then begin glBindTexture(GL_TEXTURE_2D, Tex_Right_Inv.TexNum); end diff --git a/src/screens/UScreenEditSub.pas b/src/screens/UScreenEditSub.pas index d5d808f57..5883cf324 100644 --- a/src/screens/UScreenEditSub.pas +++ b/src/screens/UScreenEditSub.pas @@ -687,7 +687,7 @@ function TScreenEditSub.ParseInput(PressedKey: cardinal; CharCode: UCS4Char; Pre while (CurrentNote[CurrentTrack] <= Tracks[CurrentTrack].Lines[LineIndex].HighNote) and (CurrentBeat > Tracks[CurrentTrack].Lines[LineIndex].Notes[CurrentNote[CurrentTrack]].EndBeat) do Inc(CurrentNote[CurrentTrack]); - Tracks[CurrentTrack].Lines[Tracks[CurrentTrack].CurrentLine].Notes[CurrentNote[CurrentTrack]].Color := 99; + Tracks[CurrentTrack].Lines[Tracks[CurrentTrack].CurrentLine].Notes[CurrentNote[CurrentTrack]].Color := P1_INVERTED; EditorLyrics[CurrentTrack].AddLine(CurrentTrack, Tracks[CurrentTrack].CurrentLine); EditorLyrics[CurrentTrack].Selected := 0; @@ -826,7 +826,7 @@ function TScreenEditSub.ParseInput(PressedKey: cardinal; CharCode: UCS4Char; Pre begin Tracks[CurrentTrack].CurrentLine := MedleyNotes.end_.line; CurrentNote[CurrentTrack] := MedleyNotes.end_.note; - Tracks[CurrentTrack].Lines[Tracks[CurrentTrack].CurrentLine].Notes[CurrentNote[CurrentTrack]].Color := 99; + Tracks[CurrentTrack].Lines[Tracks[CurrentTrack].CurrentLine].Notes[CurrentNote[CurrentTrack]].Color := P1_INVERTED; EditorLyrics[CurrentTrack].AddLine(CurrentTrack, Tracks[CurrentTrack].CurrentLine); EditorLyrics[CurrentTrack].Selected := 0; @@ -849,7 +849,7 @@ function TScreenEditSub.ParseInput(PressedKey: cardinal; CharCode: UCS4Char; Pre begin Tracks[CurrentTrack].CurrentLine := MedleyNotes.start.line; CurrentNote[CurrentTrack] := MedleyNotes.start.note; - Tracks[CurrentTrack].Lines[Tracks[CurrentTrack].CurrentLine].Notes[CurrentNote[CurrentTrack]].Color := 99; + Tracks[CurrentTrack].Lines[Tracks[CurrentTrack].CurrentLine].Notes[CurrentNote[CurrentTrack]].Color := P1_INVERTED; EditorLyrics[CurrentTrack].AddLine(CurrentTrack, Tracks[CurrentTrack].CurrentLine); EditorLyrics[CurrentTrack].Selected := 0; @@ -1793,7 +1793,7 @@ function TScreenEditSub.ParseInput(PressedKey: cardinal; CharCode: UCS4Char; Pre Tracks[CurrentTrack].CurrentLine := LineIndex; ShowInteractiveBackground; CurrentNote[CurrentTrack] := 0; - Tracks[CurrentTrack].Lines[Tracks[CurrentTrack].CurrentLine].Notes[CurrentNote[CurrentTrack]].Color := 99; + Tracks[CurrentTrack].Lines[Tracks[CurrentTrack].CurrentLine].Notes[CurrentNote[CurrentTrack]].Color := P1_INVERTED; EditorLyrics[CurrentTrack].AddLine(CurrentTrack, Tracks[CurrentTrack].CurrentLine); EditorLyrics[CurrentTrack].Selected := CurrentNote[CurrentTrack]; end; @@ -1817,7 +1817,7 @@ function TScreenEditSub.ParseInput(PressedKey: cardinal; CharCode: UCS4Char; Pre Tracks[CurrentTrack].Lines[Tracks[CurrentTrack].CurrentLine].Notes[CurrentNote[CurrentTrack]].Color := 1; CurrentNote[CurrentTrack] := NoteIndex; - Tracks[CurrentTrack].Lines[Tracks[CurrentTrack].CurrentLine].Notes[CurrentNote[CurrentTrack]].Color := 99; + Tracks[CurrentTrack].Lines[Tracks[CurrentTrack].CurrentLine].Notes[CurrentNote[CurrentTrack]].Color := P1_INVERTED; EditorLyrics[CurrentTrack].Selected := CurrentNote[CurrentTrack]; //play current note playonewithmidi PlaySentenceMidi := false; @@ -1898,7 +1898,7 @@ function TScreenEditSub.ParseInput(PressedKey: cardinal; CharCode: UCS4Char; Pre Inc(CurrentNote[CurrentTrack]); if CurrentNote[CurrentTrack] > Tracks[CurrentTrack].Lines[Tracks[CurrentTrack].CurrentLine].HighNote then CurrentNote[CurrentTrack] := 0; - Tracks[CurrentTrack].Lines[Tracks[CurrentTrack].CurrentLine].Notes[CurrentNote[CurrentTrack]].Color := 99; + Tracks[CurrentTrack].Lines[Tracks[CurrentTrack].CurrentLine].Notes[CurrentNote[CurrentTrack]].Color := P1_INVERTED; EditorLyrics[CurrentTrack].Selected := CurrentNote[CurrentTrack]; end; @@ -1976,7 +1976,7 @@ function TScreenEditSub.ParseInput(PressedKey: cardinal; CharCode: UCS4Char; Pre Dec(CurrentNote[CurrentTrack]); if CurrentNote[CurrentTrack] = -1 then CurrentNote[CurrentTrack] := Tracks[CurrentTrack].Lines[Tracks[CurrentTrack].CurrentLine].HighNote; - Tracks[CurrentTrack].Lines[Tracks[CurrentTrack].CurrentLine].Notes[CurrentNote[CurrentTrack]].Color := 99; + Tracks[CurrentTrack].Lines[Tracks[CurrentTrack].CurrentLine].Notes[CurrentNote[CurrentTrack]].Color := P1_INVERTED; EditorLyrics[CurrentTrack].Selected := CurrentNote[CurrentTrack]; end; @@ -3115,7 +3115,7 @@ procedure TScreenEditSub.DivideSentence; end; Refresh; - Tracks[CurrentTrack].Lines[Tracks[CurrentTrack].CurrentLine].Notes[CurrentNote[CurrentTrack]].Color := 99; + Tracks[CurrentTrack].Lines[Tracks[CurrentTrack].CurrentLine].Notes[CurrentNote[CurrentTrack]].Color := P1_INVERTED; EditorLyrics[CurrentTrack].AddLine(CurrentTrack, Tracks[CurrentTrack].CurrentLine); EditorLyrics[CurrentTrack].Selected := CurrentNote[CurrentTrack]; end; @@ -3187,7 +3187,7 @@ procedure TScreenEditSub.JoinSentence; end; Refresh; - Tracks[CurrentTrack].Lines[Tracks[CurrentTrack].CurrentLine].Notes[CurrentNote[CurrentTrack]].Color := 99; + Tracks[CurrentTrack].Lines[Tracks[CurrentTrack].CurrentLine].Notes[CurrentNote[CurrentTrack]].Color := P1_INVERTED; EditorLyrics[CurrentTrack].AddLine(CurrentTrack, Tracks[CurrentTrack].CurrentLine); EditorLyrics[CurrentTrack].Selected := CurrentNote[CurrentTrack]; end; @@ -3205,7 +3205,7 @@ procedure TScreenEditSub.NextSentence; CurrentNote[CurrentTrack] := 0; if Tracks[CurrentTrack].CurrentLine > Tracks[CurrentTrack].High then Tracks[CurrentTrack].CurrentLine := 0; - Tracks[CurrentTrack].Lines[Tracks[CurrentTrack].CurrentLine].Notes[CurrentNote[CurrentTrack]].Color := 99; + Tracks[CurrentTrack].Lines[Tracks[CurrentTrack].CurrentLine].Notes[CurrentNote[CurrentTrack]].Color := P1_INVERTED; EditorLyrics[CurrentTrack].AddLine(CurrentTrack, Tracks[CurrentTrack].CurrentLine); EditorLyrics[CurrentTrack].Selected := 0; @@ -3232,7 +3232,7 @@ procedure TScreenEditSub.PreviousSentence; CurrentNote[CurrentTrack] := 0; if Tracks[CurrentTrack].CurrentLine = -1 then Tracks[CurrentTrack].CurrentLine := Tracks[CurrentTrack].High; - Tracks[CurrentTrack].Lines[Tracks[CurrentTrack].CurrentLine].Notes[CurrentNote[CurrentTrack]].Color := 99; + Tracks[CurrentTrack].Lines[Tracks[CurrentTrack].CurrentLine].Notes[CurrentNote[CurrentTrack]].Color := P1_INVERTED; EditorLyrics[CurrentTrack].AddLine(CurrentTrack, Tracks[CurrentTrack].CurrentLine); EditorLyrics[CurrentTrack].Selected := 0; @@ -3340,7 +3340,7 @@ procedure TScreenEditSub.DeleteNote; EndBeat := Notes[HighNote].StartBeat + Notes[HighNote].Duration; end; - Tracks[CurrentTrack].Lines[CurrentLine].Notes[CurrentNote[CurrentTrack]].Color := 99; + Tracks[CurrentTrack].Lines[CurrentLine].Notes[CurrentNote[CurrentTrack]].Color := P1_INVERTED; end // Last Note of current Sentence Deleted - > Delete Sentence // if there are more than two left @@ -3362,7 +3362,7 @@ procedure TScreenEditSub.DeleteNote; else Tracks[CurrentTrack].CurrentLine := 0; - Tracks[CurrentTrack].Lines[Tracks[CurrentTrack].CurrentLine].Notes[CurrentNote[CurrentTrack]].Color := 99; + Tracks[CurrentTrack].Lines[Tracks[CurrentTrack].CurrentLine].Notes[CurrentNote[CurrentTrack]].Color := P1_INVERTED; end; // update lyric display @@ -3396,7 +3396,7 @@ procedure TScreenEditSub.DeleteSentence; Refresh; //SelectPrevNote(); //SelectNextNote(); - Tracks[CurrentTrack].Lines[Tracks[CurrentTrack].CurrentLine].Notes[CurrentNote[CurrentTrack]].Color := 99; + Tracks[CurrentTrack].Lines[Tracks[CurrentTrack].CurrentLine].Notes[CurrentNote[CurrentTrack]].Color := P1_INVERTED; EditorLyrics[CurrentTrack].AddLine(CurrentTrack, Tracks[CurrentTrack].CurrentLine); end; @@ -3511,7 +3511,7 @@ procedure TScreenEditSub.CopySentence(SrcTrack, SrcLine, DstTrack, DstLine: Inte Tracks[DstTrack].Lines[DstLine].EndBeat := Tracks[DstTrack].Lines[DstLine].Notes[NoteIndex].StartBeat + Tracks[DstTrack].Lines[DstLine].Notes[NoteIndex].Duration; Refresh; - Tracks[DstTrack].Lines[DstLine].Notes[CurrentNote[DstTrack]].Color := 99; + Tracks[DstTrack].Lines[DstLine].Notes[CurrentNote[DstTrack]].Color := P1_INVERTED; EditorLyrics[DstTrack].AddLine(DstTrack, Tracks[DstTrack].CurrentLine); end; @@ -3563,7 +3563,7 @@ procedure TScreenEditSub.MakeSolo; CurrentTrack := 0; Refresh; CurrentNote[CurrentTrack] := 0; - Tracks[CurrentTrack].Lines[Tracks[CurrentTrack].CurrentLine].Notes[CurrentNote[CurrentTrack]].Color := 99; + Tracks[CurrentTrack].Lines[Tracks[CurrentTrack].CurrentLine].Notes[CurrentNote[CurrentTrack]].Color := P1_INVERTED; EditorLyrics[CurrentTrack].AddLine(CurrentTrack, Tracks[CurrentTrack].CurrentLine); end; @@ -3710,7 +3710,7 @@ function TScreenEditSub.DuetCopyLine: boolean; EditorLyrics[DstTrack].AddLine(DstTrack, Tracks[DstTrack].CurrentLine); EditorLyrics[DstTrack].Selected := 0; CurrentNote[DstTrack] := 0; - Tracks[SrcTrack].Lines[SrcLine].Notes[CurrentNote[SrcTrack]].Color := 99; + Tracks[SrcTrack].Lines[SrcLine].Notes[CurrentNote[SrcTrack]].Color := P1_INVERTED; Result := true; end; @@ -4930,7 +4930,7 @@ procedure TScreenEditSub.OnShow; begin Tracks[TrackIndex].CurrentLine := 0; CurrentNote[TrackIndex] := 0; - Tracks[TrackIndex].Lines[0].Notes[0].Color := 99; + Tracks[TrackIndex].Lines[0].Notes[0].Color := P1_INVERTED; end; AudioPlayBack.Open(CurrentSong.Path.Append(CurrentSong.Mp3)); @@ -5090,7 +5090,7 @@ function TScreenEditSub.Draw: boolean; Tracks[CurrentTrack].Lines[Tracks[CurrentTrack].CurrentLine].Notes[CurrentNote[CurrentTrack]].Color := 1; CurrentNote[CurrentTrack] := NoteIndex; EditorLyrics[CurrentTrack].Selected := CurrentNote[CurrentTrack]; - Tracks[CurrentTrack].Lines[Tracks[CurrentTrack].CurrentLine].Notes[CurrentNote[CurrentTrack]].Color := 99; + Tracks[CurrentTrack].Lines[Tracks[CurrentTrack].CurrentLine].Notes[CurrentNote[CurrentTrack]].Color := P1_INVERTED; end; //if end; //for NoteIndex} end; //end move cursor