From de19222a6fc53d455a91a8e5c8c99c080408392b Mon Sep 17 00:00:00 2001 From: s_alexander Date: Mon, 7 Apr 2008 15:11:27 +0000 Subject: make BPM changes during song possible git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1016 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Classes/USong.pas | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Game/Code/Classes/USong.pas') diff --git a/Game/Code/Classes/USong.pas b/Game/Code/Classes/USong.pas index 9e55671e..d878132a 100644 --- a/Game/Code/Classes/USong.pas +++ b/Game/Code/Classes/USong.pas @@ -141,6 +141,7 @@ type Procedure AddLyricLine(const PlayerID: Integer; const StartBeat: Integer; const RelativeBeat: Integer = -1); Procedure AddNote(const PlayerID: Integer; const NoteType: Char; const NoteStart, NoteLength, NoteTone: Integer; const NoteText: WideString); Function SolmizatLyrics(const NoteTone: Integer; const NoteText: WideString): WideString; + Procedure AddBPM(const StartBeat: Integer; const NewBeat: Extended); public //Required Information Title: widestring; @@ -465,6 +466,14 @@ begin end; // case Ini.Solmization end; +Procedure TSong.AddBPM(const StartBeat: Integer; const NewBeat: Extended); +begin + SetLength(BPM, Length(BPM) + 1); + BPM[High(BPM)].StartBeat := StartBeat; + BPM[High(BPM)].StartBeat := BPM[High(BPM)].StartBeat + RelativPosition[0]; + + BPM[High(BPM)].BPM := NewBeat * Mult * MultBPM; +end; {constructor TSong.create( const aFileName : WideString ); begin -- cgit v1.2.3