From 3e561cd4fd1eb46590cb70aaf940f7775a855966 Mon Sep 17 00:00:00 2001 From: brunzelchen Date: Tue, 21 Dec 2010 17:51:42 +0000 Subject: added pitch detection for editor git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/1.0.1 Challenge MOD@2765 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Classes/UMain.pas | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'Game/Code/Classes/UMain.pas') diff --git a/Game/Code/Classes/UMain.pas b/Game/Code/Classes/UMain.pas index e1205cd8..bc3ac1b0 100644 --- a/Game/Code/Classes/UMain.pas +++ b/Game/Code/Classes/UMain.pas @@ -605,17 +605,17 @@ begin Czesci[P].Czesc[S].Nuta[Pet].Dlugosc > BRange) then begin // przesuwanie tonu w odpowiednia game => shifting tone in the corresponding game? - while (Sound[CP].Ton - Czesci[P].Czesc[S].Nuta[Pet].Ton > 6) do - Sound[CP].Ton := Sound[CP].Ton - 12; - while (Sound[CP].Ton - Czesci[P].Czesc[S].Nuta[Pet].Ton < -6) do - Sound[CP].Ton := Sound[CP].Ton + 12; + while (Sound[CP].TonGamy - Czesci[P].Czesc[S].Nuta[Pet].Ton > 6) do + Sound[CP].TonGamy := Sound[CP].TonGamy - 12; + while (Sound[CP].TonGamy - Czesci[P].Czesc[S].Nuta[Pet].Ton < -6) do + Sound[CP].TonGamy := Sound[CP].TonGamy + 12; // Half size Notes Patch NoteHit := false; - AktTon := Sound[CP].Ton; + AktTon := Sound[CP].TonGamy; Range := 2 - Ini.Difficulty; - if (abs(Czesci[P].Czesc[S].Nuta[Pet].Ton - Sound[CP].Ton) <= Range) or + if (abs(Czesci[P].Czesc[S].Nuta[Pet].Ton - Sound[CP].TonGamy) <= Range) or DEBUG_NOTE_HIT then begin AktTon := Czesci[P].Czesc[S].Nuta[Pet].Ton; @@ -784,17 +784,17 @@ begin Czesci[P].Czesc[S].Nuta[Pet].Dlugosc > BRange) then begin // przesuwanie tonu w odpowiednia game - while (Sound[CP].Ton - Czesci[P].Czesc[S].Nuta[Pet].Ton > 6) do - Sound[CP].Ton := Sound[CP].Ton - 12; - while (Sound[CP].Ton - Czesci[P].Czesc[S].Nuta[Pet].Ton < -6) do - Sound[CP].Ton := Sound[CP].Ton + 12; + while (Sound[CP].TonGamy - Czesci[P].Czesc[S].Nuta[Pet].Ton > 6) do + Sound[CP].TonGamy := Sound[CP].TonGamy - 12; + while (Sound[CP].TonGamy - Czesci[P].Czesc[S].Nuta[Pet].Ton < -6) do + Sound[CP].TonGamy := Sound[CP].TonGamy + 12; // Half size Notes Patch NoteHit := false; - AktTon := Sound[CP].Ton; + AktTon := Sound[CP].TonGamy; Range := 2 - Ini.Difficulty; - if (abs(Czesci[P].Czesc[S].Nuta[Pet].Ton - Sound[CP].Ton) <= Range) or + if (abs(Czesci[P].Czesc[S].Nuta[Pet].Ton - Sound[CP].TonGamy) <= Range) or DEBUG_NOTE_HIT then begin AktTon := Czesci[P].Czesc[S].Nuta[Pet].Ton; -- cgit v1.2.3