diff options
author | brunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2010-06-21 16:33:16 +0000 |
---|---|---|
committer | brunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2010-06-21 16:33:16 +0000 |
commit | 041ee1b932cc9c058c545595751b77893dde75dc (patch) | |
tree | dbef0bfdfd42be0b77feae2d3715ced08cbfacce | |
parent | bb0c744c662768afe58908129c4813da39bd3399 (diff) | |
download | usdx-041ee1b932cc9c058c545595751b77893dde75dc.tar.gz usdx-041ee1b932cc9c058c545595751b77893dde75dc.tar.xz usdx-041ee1b932cc9c058c545595751b77893dde75dc.zip |
- individual line breaks for each player in duet songs are now possible
- fade in and out of lyrics, notes and notelines in sing screen
- update of acinerella.dll
- update of BASS to v2.4
- removed joypad support (did it ever worked?)
- removed unused units and options
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/1.0.1 Challenge MOD@2553 b956fd51-792f-4845-bead-9b4dfca2ff2c
35 files changed, 1413 insertions, 2148 deletions
diff --git a/Game/Code/Classes/TextGL.pas b/Game/Code/Classes/TextGL.pas index 10043e3b..ee8187ad 100644 --- a/Game/Code/Classes/TextGL.pas +++ b/Game/Code/Classes/TextGL.pas @@ -7,11 +7,11 @@ uses gl, SDL, UTexture, Classes, ULog; procedure BuildFont; // Build Our Bitmap Font
procedure KillFont; // Delete The Font
function glTextWidth(text: pchar): real; // Returns Text Width
-procedure glPrintDone(text: pchar; Done: real; ColR, ColG, ColB: real);
+procedure glPrintDone(text: pchar; Done: real; ColR, ColG, ColB, Alpha: real);
procedure glPrintLetter(letter: char);
procedure glPrintLetterCut(letter: char; Start, Finish: real);
procedure glPrint(text: pchar); // Custom GL "Print" Routine
-procedure glPrintCut(text: pchar);
+procedure glPrintCut(text: pchar; Alpha: real);
procedure SetFontPos(X, Y: real); // Sets X And Y
procedure SetFontSize(Size: real);
procedure SetFontStyle(Style: integer); // sets active font style (normal, bold, etc)
@@ -143,13 +143,13 @@ begin end; // while
end;
-procedure glPrintDone(text: pchar; Done: real; ColR, ColG, ColB: real);
+procedure glPrintDone(text: pchar; Done: real; ColR, ColG, ColB, Alpha: real);
begin
Fonts[ActFont].Done := Done;
PColR := ColR;
PColG := ColG;
PColB := ColB;
- glPrintCut(text);
+ glPrintCut(text, Alpha);
Fonts[ActFont].Done := -1;
end;
@@ -272,7 +272,7 @@ begin end; // while
end;
-procedure glPrintCut(text: pchar);
+procedure glPrintCut(text: pchar; Alpha: real);
var
Letter: char;
PToDo: real;
@@ -301,7 +301,7 @@ begin if (PToDo > 0) and (PDoingNow > PToDo) then begin
glPrintLetterCut(Letter, 0, PToDo / PDoingNow);
- glColor3f(PColR, PColG, PColB);
+ glColor4f(PColR, PColG, PColB, Alpha);
glPrintLetterCut(Letter, PToDo / PDoingNow, 1);
end;
diff --git a/Game/Code/Classes/UCommandLine.pas b/Game/Code/Classes/UCommandLine.pas index 03229721..05f638a9 100644 --- a/Game/Code/Classes/UCommandLine.pas +++ b/Game/Code/Classes/UCommandLine.pas @@ -16,7 +16,6 @@ type Benchmark: Boolean;
NoLog: Boolean;
FullScreen: Boolean;
- Joypad: Boolean;
//Some Value Variables Set when Reading Infos {-1: Not Set, others: Value}
Depth: Integer;
@@ -65,7 +64,6 @@ begin Benchmark := False;
NoLog := False;
FullScreen := False;
- Joypad := False;
//Some Value Variables Set when Reading Infos {-1: Not Set, others: Value}
sResolution := '';
@@ -114,8 +112,6 @@ begin NoLog := True
else if (Command = 'fullscreen') then
Fullscreen := True
- else if (Command = 'joypad') then
- Joypad := True
//Integer Variables
else if (Command = 'depth') then
diff --git a/Game/Code/Classes/UDraw.pas b/Game/Code/Classes/UDraw.pas index 94142bc7..fd9219ce 100644 --- a/Game/Code/Classes/UDraw.pas +++ b/Game/Code/Classes/UDraw.pas @@ -18,19 +18,19 @@ type Mid: real;
end;
-procedure SingDraw;
+procedure SingDraw(Alpha: TAlpha);
procedure SingDrawLyricHelper(CP: integer; NR: TRecR);
-procedure SingDrawNotes(NR: TRecR);
-procedure SingDrawNotesDuet(NR: TRecR);
-procedure SingModiDraw (PlayerInfo: TPlayerInfo);
+procedure SingDrawNotes(NR: TRecR; Alpha: TAlpha);
+procedure SingDrawNotesDuet(NR: TRecR; Alpha: TAlpha);
+procedure SingModiDraw(PlayerInfo: TPlayerInfo; Alpha: TAlpha);
procedure SingDrawBackground;
procedure SingDrawOscilloscope(X, Y, W, H: real; NrSound: integer);
-procedure SingDrawNoteLines(Left, Top, Right: real; Space: integer);
+procedure SingDrawNoteLines(Left, Top, Right: real; Space: integer; Alpha: real);
procedure SingDrawBeatDelimeters(Left, Top, Right: real; NrCzesci: integer);
-procedure SingDrawCzesc(Left, Top, Right: real; NrCzesci: integer; Space: integer);
-procedure SingDrawPlayerCzesc(X, Y, W: real; CP, NrGracza: integer; Space: integer);
-procedure SingDrawPlayerBGCzesc(Left, Top, Right: real; NrCzesci, NrGracza: integer; Space: integer);
+procedure SingDrawCzesc(Left, Top, Right: real; NrCzesci: integer; Space: integer; Alpha: real);
+procedure SingDrawPlayerCzesc(X, Y, W: real; CP, NrGracza: integer; Space: integer; Alpha: real);
+procedure SingDrawPlayerBGCzesc(Left, Top, Right: real; NrCzesci, NrGracza: integer; Space: integer; Alpha: real);
// TimeBar mod
procedure SingDrawTimeBar();
@@ -189,12 +189,12 @@ begin; glEnd;
end;
-procedure SingDrawNoteLines(Left, Top, Right: real; Space: integer);
+procedure SingDrawNoteLines(Left, Top, Right: real; Space: integer; Alpha: real);
var
Pet: integer;
begin
glEnable(GL_BLEND);
- glColor4f(Skin_P1_LinesR, Skin_P1_LinesG, Skin_P1_LinesB, 0.4);
+ glColor4f(Skin_P1_LinesR, Skin_P1_LinesG, Skin_P1_LinesB, 0.4*Alpha);
glBegin(GL_LINES);
for Pet := 0 to 9 do begin
glVertex2f(Left, Top + Pet * Space);
@@ -213,16 +213,16 @@ var st: integer;
begin
CP := NrCzesci;
- if (Length(Czesci[CP].Czesc[Czesci[CP].Akt].Nuta)=0) then
+ {if (Length(Czesci[CP].Czesc[Czesci[CP].Akt].Nuta)=0) then
begin
CP := (CP+1) mod 2;
st := Czesci[CP].Czesc[Czesci[CP].Akt].StartNote;
end_ := Czesci[CP].Czesc[Czesci[CP].Akt].Koniec;
end else
- begin
+ begin }
st := Czesci[CP].Czesc[Czesci[CP].Akt].StartNote;
end_ := Czesci[CP].Czesc[Czesci[CP].Akt].Koniec;
- if AktSong.isDuet and (Length(Czesci[(CP+1) mod 2].Czesc[Czesci[CP].Akt].Nuta)>0)then
+ {if AktSong.isDuet and (Length(Czesci[(CP+1) mod 2].Czesc[Czesci[CP].Akt].Nuta)>0)then
begin
if (Czesci[(CP+1) mod 2].Czesc[Czesci[CP].Akt].Koniec > end_) then
end_ := Czesci[(CP+1) mod 2].Czesc[Czesci[CP].Akt].Koniec;
@@ -230,7 +230,7 @@ begin if (Czesci[(CP+1) mod 2].Czesc[Czesci[CP].Akt].StartNote < st) then
st := Czesci[(CP+1) mod 2].Czesc[Czesci[CP].Akt].StartNote;
end;
- end;
+ end; }
TempR := (Right-Left) / (end_ - st);
@@ -250,7 +250,7 @@ begin end;
// draw blank Notebars
-procedure SingDrawCzesc(Left, Top, Right: real; NrCzesci: integer; Space: integer);
+procedure SingDrawCzesc(Left, Top, Right: real; NrCzesci: integer; Space: integer; Alpha: real);
var
Rec: TRecR;
Pet: integer;
@@ -268,17 +268,17 @@ begin begin
st := Czesci[CP].Czesc[Czesci[CP].Akt].StartNote;
end_ := Czesci[CP].Czesc[Czesci[CP].Akt].Koniec;
- if AktSong.isDuet and (Length(Czesci[(CP+1) mod 2].Czesc[Czesci[CP].Akt].Nuta)>0)then
+ {if AktSong.isDuet and (Length(Czesci[(CP+1) mod 2].Czesc[Czesci[CP].Akt].Nuta)>0)then
begin
if (Czesci[(CP+1) mod 2].Czesc[Czesci[CP].Akt].Koniec > end_) then
end_ := Czesci[(CP+1) mod 2].Czesc[Czesci[CP].Akt].Koniec;
if (Czesci[(CP+1) mod 2].Czesc[Czesci[CP].Akt].StartNote < st) then
st := Czesci[(CP+1) mod 2].Czesc[Czesci[CP].Akt].StartNote;
- end;
+ end;}
end;
- glColor3f(1, 1, 1);
+ glColor4f(1, 1, 1, Alpha);
glEnable(GL_TEXTURE_2D);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
@@ -296,12 +296,12 @@ begin // If Golden note Effect of then Change not Color
begin
case Wartosc of
- 1: glColor4f(1, 1, 1, 0.85);
- 2: glColor4f(1, 1, 0.3, 0.85); // no stars, paint yellow -> glColor4f(1, 1, 0.3, 0.85);
+ 1: glColor4f(1, 1, 1, 0.85*Alpha);
+ 2: glColor4f(1, 1, 0.3, 0.85*Alpha); // no stars, paint yellow -> glColor4f(1, 1, 0.3, 0.85);
end; // case
end //Else all Notes same Color
else
- glColor4f(1, 1, 1, 0.85);
+ glColor4f(1, 1, 1, 0.85*Alpha);
// lewa czesc - left part
Rec.Left := (Start-st) * TempR + Left + 0.5 + 10*ScreenX;
@@ -347,7 +347,7 @@ begin // Golden Star Patch
if (Wartosc = 2) AND (Ini.EffectSing=1) then
begin
- GoldenRec.SaveGoldenStarsRec(GoldenStarPos, Rec.Top, Rec.Right, Rec.Bottom);
+ GoldenRec.SaveGoldenStarsRec(GoldenStarPos, Rec.Top, Rec.Right, Rec.Bottom, NrCzesci);
end;
end; // if not FreeStyle
@@ -361,7 +361,7 @@ end; // draw sung notes
-procedure SingDrawPlayerCzesc(X, Y, W: real; CP, NrGracza: integer; Space: integer);
+procedure SingDrawPlayerCzesc(X, Y, W: real; CP, NrGracza: integer; Space: integer; Alpha: real);
var
TempR: real;
Rec: TRecR;
@@ -376,17 +376,17 @@ begin begin
st := Czesci[CP].Czesc[Czesci[CP].Akt].StartNote;
end_ := Czesci[CP].Czesc[Czesci[CP].Akt].Koniec;
- if AktSong.isDuet and (Length(Czesci[(CP+1) mod 2].Czesc[Czesci[CP].Akt].Nuta)>0)then
+ {if AktSong.isDuet and (Length(Czesci[(CP+1) mod 2].Czesc[Czesci[CP].Akt].Nuta)>0)then
begin
if (Czesci[(CP+1) mod 2].Czesc[Czesci[CP].Akt].Koniec > end_) then
end_ := Czesci[(CP+1) mod 2].Czesc[Czesci[CP].Akt].Koniec;
if (Czesci[(CP+1) mod 2].Czesc[Czesci[CP].Akt].StartNote < st) then
st := Czesci[(CP+1) mod 2].Czesc[Czesci[CP].Akt].StartNote;
- end;
+ end; }
end;
- glColor3f(1, 1, 1);
+ glColor4f(1, 1, 1, Alpha);
glEnable(GL_TEXTURE_2D);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
@@ -411,7 +411,7 @@ begin end; //if
// if True then
- Rec.Top := Y - (Ton-Czesci[CP].Czesc[Czesci[0].Akt].BaseNote)*Space/2 - NotesH2;
+ Rec.Top := Y - (Ton-Czesci[CP].Czesc[Czesci[CP].Akt].BaseNote)*Space/2 - NotesH2;
Rec.Bottom := Rec.Top + 2 *NotesH2;
glColor3f(1, 1, 1);
@@ -485,7 +485,7 @@ begin end;
//draw Note glow
-procedure SingDrawPlayerBGCzesc(Left, Top, Right: real; NrCzesci, NrGracza: integer; Space: integer);
+procedure SingDrawPlayerBGCzesc(Left, Top, Right: real; NrCzesci, NrGracza: integer; Space: integer; Alpha: real);
var
Rec: TRecR;
Pet: integer;
@@ -508,17 +508,17 @@ begin begin
st := Czesci[CP].Czesc[Czesci[CP].Akt].StartNote;
end_ := Czesci[CP].Czesc[Czesci[CP].Akt].Koniec;
- if AktSong.isDuet and (Length(Czesci[(CP+1) mod 2].Czesc[Czesci[CP].Akt].Nuta)>0)then
+ {if AktSong.isDuet and (Length(Czesci[(CP+1) mod 2].Czesc[Czesci[CP].Akt].Nuta)>0)then
begin
if (Czesci[(CP+1) mod 2].Czesc[Czesci[CP].Akt].Koniec > end_) then
end_ := Czesci[(CP+1) mod 2].Czesc[Czesci[CP].Akt].Koniec;
if (Czesci[(CP+1) mod 2].Czesc[Czesci[CP].Akt].StartNote < st) then
st := Czesci[(CP+1) mod 2].Czesc[Czesci[CP].Akt].StartNote;
- end;
+ end;}
end;
- glColor4f(1, 1, 1, sqrt((1+sin(Music.Position * 3))/4)/ 2 + 0.5 );
+ glColor4f(1, 1, 1, (sqrt((1+sin(Music.Position * 3))/4)/ 2 + 0.5)*Alpha);
glEnable(GL_TEXTURE_2D);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
@@ -605,7 +605,7 @@ begin if BarFrom > 40 then
BarFrom := 40;
- if (Czesci[CP].Czesc[Czesci[CP].Akt].StartNote - Czesci[CP].Czesc[Czesci[CP].Akt].Start > 8) and //16->12 for more help bars and then 12->8 for even more
+ if (BarFrom > 8) and //16->12 for more help bars and then 12->8 for even more
(Czesci[CP].Czesc[Czesci[CP].Akt].StartNote - Czas.MidBeat > 0) and
(Czesci[CP].Czesc[Czesci[CP].Akt].StartNote - Czas.MidBeat < 40) then
begin // ale nie za wczesnie
@@ -636,7 +636,7 @@ begin end;
end;
-procedure SingDraw();
+procedure SingDraw(Alpha: TAlpha);
var
Pet: integer;
Pet2: integer;
@@ -644,6 +644,7 @@ var Rec: TRecR;
TexRec: TRecR;
NR: TRecR;
+ ab: real;
//FS: real;
BarAlpha: real;
@@ -681,19 +682,24 @@ begin // rysuje paski pod nutami
if PlayersPlay = 1 then
- SingDrawNoteLines(Nr.Left + 10*ScreenX, Skin_P2_NotesB - 105, Nr.Right + 10*ScreenX, 15);
- if (PlayersPlay = 2) or (PlayersPlay = 4) then begin
- SingDrawNoteLines(Nr.Left + 10*ScreenX, Skin_P1_NotesB - 105, Nr.Right + 10*ScreenX, 15);
- SingDrawNoteLines(Nr.Left + 10*ScreenX, Skin_P2_NotesB - 105, Nr.Right + 10*ScreenX, 15);
+ SingDrawNoteLines(Nr.Left + 10*ScreenX, Skin_P2_NotesB - 105, Nr.Right + 10*ScreenX, 15, Alpha[0]);
+ if (PlayersPlay = 2) or (PlayersPlay = 4) then
+ begin
+ SingDrawNoteLines(Nr.Left + 10*ScreenX, Skin_P1_NotesB - 105, Nr.Right + 10*ScreenX, 15, Alpha[0]);
+ SingDrawNoteLines(Nr.Left + 10*ScreenX, Skin_P2_NotesB - 105, Nr.Right + 10*ScreenX, 15, Alpha[1]);
end;
- if (PlayersPlay = 3) or (PlayersPlay = 6) then begin
- SingDrawNoteLines(Nr.Left + 10*ScreenX, 120, Nr.Right + 10*ScreenX, 12);
- SingDrawNoteLines(Nr.Left + 10*ScreenX, 245, Nr.Right + 10*ScreenX, 12);
- SingDrawNoteLines(Nr.Left + 10*ScreenX, 370, Nr.Right + 10*ScreenX, 12);
+ if (PlayersPlay = 3) or (PlayersPlay = 6) then
+ begin
+ SingDrawNoteLines(Nr.Left + 10*ScreenX, 120, Nr.Right + 10*ScreenX, 12, Alpha[0]);
+ SingDrawNoteLines(Nr.Left + 10*ScreenX, 245, Nr.Right + 10*ScreenX, 12, Alpha[1]);
+ SingDrawNoteLines(Nr.Left + 10*ScreenX, 370, Nr.Right + 10*ScreenX, 12, Alpha[0]);
end;
// rysuje tekst - new Lyric engine
+ ScreenSing.LyricMain[0].SetAlpha(Alpha[0]);
+ ScreenSing.LyricSub[0].SetAlpha(Alpha[2]);
+
ScreenSing.LyricMain[0].Draw;
ScreenSing.LyricSub[0].Draw;
@@ -701,6 +707,9 @@ begin if (AktSong.isDuet) then
begin
+ ScreenSing.LyricMain[1].SetAlpha(Alpha[1]);
+ ScreenSing.LyricSub[1].SetAlpha(Alpha[3]);
+
ScreenSing.LyricMain[1].Draw;
ScreenSing.LyricSub[1].Draw;
SingDrawLyricHelper(1, NR);
@@ -919,33 +928,33 @@ begin end;
if AktSong.isDuet then
- SingDrawNotesDuet(NR)
+ SingDrawNotesDuet(NR, Alpha)
else
- SingDrawNotes(NR);
+ SingDrawNotes(NR, Alpha);
glDisable(GL_BLEND);
glDisable(GL_TEXTURE_2D);
end;
-procedure SingDrawNotes(NR: TRecR);
+procedure SingDrawNotes(NR: TRecR; Alpha: TAlpha);
begin
if PlayersPlay = 1 then
begin
- SingDrawPlayerBGCzesc(NR.Left + 20, Skin_P2_NotesB, NR.Right - 20, 0, 0, 15);
- SingDrawCzesc(NR.Left + 20, Skin_P2_NotesB, NR.Right - 20, 0, 15);
- SingDrawPlayerCzesc(Nr.Left + 20, Skin_P2_NotesB, Nr.Width - 40, 0, 0, 15);
+ SingDrawPlayerBGCzesc(NR.Left + 20, Skin_P2_NotesB, NR.Right - 20, 0, 0, 15, Alpha[0]);
+ SingDrawCzesc(NR.Left + 20, Skin_P2_NotesB, NR.Right - 20, 0, 15, Alpha[0]);
+ SingDrawPlayerCzesc(Nr.Left + 20, Skin_P2_NotesB, Nr.Width - 40, 0, 0, 15, Alpha[0]);
end;
if (PlayersPlay = 2) then
begin
- SingDrawPlayerBGCzesc(Nr.Left + 20, Skin_P1_NotesB, Nr.Right - 20, 0, 0, 15);
- SingDrawPlayerBGCzesc(Nr.Left + 20, Skin_P2_NotesB, Nr.Right - 20, 0, 1, 15);
+ SingDrawPlayerBGCzesc(Nr.Left + 20, Skin_P1_NotesB, Nr.Right - 20, 0, 0, 15, Alpha[0]);
+ SingDrawPlayerBGCzesc(Nr.Left + 20, Skin_P2_NotesB, Nr.Right - 20, 0, 1, 15, Alpha[0]);
- SingDrawCzesc(NR.Left + 20, Skin_P1_NotesB, NR.Right - 20, 0, 15);
- SingDrawCzesc(NR.Left + 20, Skin_P2_NotesB, NR.Right - 20, 0, 15);
+ SingDrawCzesc(NR.Left + 20, Skin_P1_NotesB, NR.Right - 20, 0, 15, Alpha[0]);
+ SingDrawCzesc(NR.Left + 20, Skin_P2_NotesB, NR.Right - 20, 0, 15, Alpha[0]);
- SingDrawPlayerCzesc(Nr.Left + 20, Skin_P1_NotesB, Nr.Width - 40, 0, 0, 15);
- SingDrawPlayerCzesc(Nr.Left + 20, Skin_P2_NotesB, Nr.Width - 40, 0, 1, 15);
+ SingDrawPlayerCzesc(Nr.Left + 20, Skin_P1_NotesB, Nr.Width - 40, 0, 0, 15, Alpha[0]);
+ SingDrawPlayerCzesc(Nr.Left + 20, Skin_P2_NotesB, Nr.Width - 40, 0, 1, 15, Alpha[0]);
end;
if PlayersPlay = 3 then
@@ -953,40 +962,40 @@ begin NotesW := NotesW * 0.8;
NotesH := NotesH * 0.8;
- SingDrawPlayerBGCzesc(Nr.Left + 20, 120+95, Nr.Right - 20, 0, 0, 12);
- SingDrawPlayerBGCzesc(Nr.Left + 20, 245+95, Nr.Right - 20, 0, 1, 12);
- SingDrawPlayerBGCzesc(Nr.Left + 20, 370+95, Nr.Right - 20, 0, 2, 12);
+ SingDrawPlayerBGCzesc(Nr.Left + 20, 120+95, Nr.Right - 20, 0, 0, 12, Alpha[0]);
+ SingDrawPlayerBGCzesc(Nr.Left + 20, 245+95, Nr.Right - 20, 0, 1, 12, Alpha[0]);
+ SingDrawPlayerBGCzesc(Nr.Left + 20, 370+95, Nr.Right - 20, 0, 2, 12, Alpha[0]);
- SingDrawCzesc(NR.Left + 20, 120+95, NR.Right - 20, 0, 12);
- SingDrawCzesc(NR.Left + 20, 245+95, NR.Right - 20, 0, 12);
- SingDrawCzesc(NR.Left + 20, 370+95, NR.Right - 20, 0, 12);
+ SingDrawCzesc(NR.Left + 20, 120+95, NR.Right - 20, 0, 12, Alpha[0]);
+ SingDrawCzesc(NR.Left + 20, 245+95, NR.Right - 20, 0, 12, Alpha[0]);
+ SingDrawCzesc(NR.Left + 20, 370+95, NR.Right - 20, 0, 12, Alpha[0]);
- SingDrawPlayerCzesc(Nr.Left + 20, 120+95, Nr.Width - 40, 0, 0, 12);
- SingDrawPlayerCzesc(Nr.Left + 20, 245+95, Nr.Width - 40, 0, 1, 12);
- SingDrawPlayerCzesc(Nr.Left + 20, 370+95, Nr.Width - 40, 0, 2, 12);
+ SingDrawPlayerCzesc(Nr.Left + 20, 120+95, Nr.Width - 40, 0, 0, 12, Alpha[0]);
+ SingDrawPlayerCzesc(Nr.Left + 20, 245+95, Nr.Width - 40, 0, 1, 12, Alpha[0]);
+ SingDrawPlayerCzesc(Nr.Left + 20, 370+95, Nr.Width - 40, 0, 2, 12, Alpha[0]);
end;
if PlayersPlay = 4 then
begin
if ScreenAct = 1 then begin
- SingDrawPlayerBGCzesc(Nr.Left + 20, Skin_P1_NotesB, Nr.Right - 20, 0, 0, 15);
- SingDrawPlayerBGCzesc(Nr.Left + 20, Skin_P2_NotesB, Nr.Right - 20, 0, 1, 15);
+ SingDrawPlayerBGCzesc(Nr.Left + 20, Skin_P1_NotesB, Nr.Right - 20, 0, 0, 15, Alpha[0]);
+ SingDrawPlayerBGCzesc(Nr.Left + 20, Skin_P2_NotesB, Nr.Right - 20, 0, 1, 15, Alpha[0]);
end;
if ScreenAct = 2 then begin
- SingDrawPlayerBGCzesc(Nr.Left + 20, Skin_P1_NotesB, Nr.Right - 20, 0, 2, 15);
- SingDrawPlayerBGCzesc(Nr.Left + 20, Skin_P2_NotesB, Nr.Right - 20, 0, 3, 15);
+ SingDrawPlayerBGCzesc(Nr.Left + 20, Skin_P1_NotesB, Nr.Right - 20, 0, 2, 15, Alpha[0]);
+ SingDrawPlayerBGCzesc(Nr.Left + 20, Skin_P2_NotesB, Nr.Right - 20, 0, 3, 15, Alpha[0]);
end;
- SingDrawCzesc(NR.Left + 20, Skin_P1_NotesB, NR.Right - 20, 0, 15);
- SingDrawCzesc(NR.Left + 20, Skin_P2_NotesB, NR.Right - 20, 0, 15);
+ SingDrawCzesc(NR.Left + 20, Skin_P1_NotesB, NR.Right - 20, 0, 15, Alpha[0]);
+ SingDrawCzesc(NR.Left + 20, Skin_P2_NotesB, NR.Right - 20, 0, 15, Alpha[0]);
if ScreenAct = 1 then begin
- SingDrawPlayerCzesc(Nr.Left + 20, Skin_P1_NotesB, Nr.Width - 40, 0, 0, 15);
- SingDrawPlayerCzesc(Nr.Left + 20, Skin_P2_NotesB, Nr.Width - 40, 0, 1, 15);
+ SingDrawPlayerCzesc(Nr.Left + 20, Skin_P1_NotesB, Nr.Width - 40, 0, 0, 15, Alpha[0]);
+ SingDrawPlayerCzesc(Nr.Left + 20, Skin_P2_NotesB, Nr.Width - 40, 0, 1, 15, Alpha[0]);
end;
if ScreenAct = 2 then begin
- SingDrawPlayerCzesc(Nr.Left + 20, Skin_P1_NotesB, Nr.Width - 40, 0, 2, 15);
- SingDrawPlayerCzesc(Nr.Left + 20, Skin_P2_NotesB, Nr.Width - 40, 0, 3, 15);
+ SingDrawPlayerCzesc(Nr.Left + 20, Skin_P1_NotesB, Nr.Width - 40, 0, 2, 15, Alpha[0]);
+ SingDrawPlayerCzesc(Nr.Left + 20, Skin_P2_NotesB, Nr.Width - 40, 0, 3, 15, Alpha[0]);
end;
end;
@@ -995,52 +1004,52 @@ begin NotesH := NotesH * 0.8;
if ScreenAct = 1 then begin
- SingDrawPlayerBGCzesc(Nr.Left + 20, 120+95, Nr.Right - 20, 0, 0, 12);
- SingDrawPlayerBGCzesc(Nr.Left + 20, 245+95, Nr.Right - 20, 0, 1, 12);
- SingDrawPlayerBGCzesc(Nr.Left + 20, 370+95, Nr.Right - 20, 0, 2, 12);
+ SingDrawPlayerBGCzesc(Nr.Left + 20, 120+95, Nr.Right - 20, 0, 0, 12, Alpha[0]);
+ SingDrawPlayerBGCzesc(Nr.Left + 20, 245+95, Nr.Right - 20, 0, 1, 12, Alpha[0]);
+ SingDrawPlayerBGCzesc(Nr.Left + 20, 370+95, Nr.Right - 20, 0, 2, 12, Alpha[0]);
end;
if ScreenAct = 2 then begin
- SingDrawPlayerBGCzesc(Nr.Left + 20, 120+95, Nr.Right - 20, 0, 3, 12);
- SingDrawPlayerBGCzesc(Nr.Left + 20, 245+95, Nr.Right - 20, 0, 4, 12);
- SingDrawPlayerBGCzesc(Nr.Left + 20, 370+95, Nr.Right - 20, 0, 5, 12);
+ SingDrawPlayerBGCzesc(Nr.Left + 20, 120+95, Nr.Right - 20, 0, 3, 12, Alpha[0]);
+ SingDrawPlayerBGCzesc(Nr.Left + 20, 245+95, Nr.Right - 20, 0, 4, 12, Alpha[0]);
+ SingDrawPlayerBGCzesc(Nr.Left + 20, 370+95, Nr.Right - 20, 0, 5, 12, Alpha[0]);
end;
- SingDrawCzesc(NR.Left + 20, 120+95, NR.Right - 20, 0, 12);
- SingDrawCzesc(NR.Left + 20, 245+95, NR.Right - 20, 0, 12);
- SingDrawCzesc(NR.Left + 20, 370+95, NR.Right - 20, 0, 12);
+ SingDrawCzesc(NR.Left + 20, 120+95, NR.Right - 20, 0, 12, Alpha[0]);
+ SingDrawCzesc(NR.Left + 20, 245+95, NR.Right - 20, 0, 12, Alpha[0]);
+ SingDrawCzesc(NR.Left + 20, 370+95, NR.Right - 20, 0, 12, Alpha[0]);
if ScreenAct = 1 then begin
- SingDrawPlayerCzesc(Nr.Left + 20, 120+95, Nr.Width - 40, 0, 0, 12);
- SingDrawPlayerCzesc(Nr.Left + 20, 245+95, Nr.Width - 40, 0, 1, 12);
- SingDrawPlayerCzesc(Nr.Left + 20, 370+95, Nr.Width - 40, 0, 2, 12);
+ SingDrawPlayerCzesc(Nr.Left + 20, 120+95, Nr.Width - 40, 0, 0, 12, Alpha[0]);
+ SingDrawPlayerCzesc(Nr.Left + 20, 245+95, Nr.Width - 40, 0, 1, 12, Alpha[0]);
+ SingDrawPlayerCzesc(Nr.Left + 20, 370+95, Nr.Width - 40, 0, 2, 12, Alpha[0]);
end;
if ScreenAct = 2 then begin
- SingDrawPlayerCzesc(Nr.Left + 20, 120+95, Nr.Width - 40, 0, 3, 12);
- SingDrawPlayerCzesc(Nr.Left + 20, 245+95, Nr.Width - 40, 0, 4, 12);
- SingDrawPlayerCzesc(Nr.Left + 20, 370+95, Nr.Width - 40, 0, 5, 12);
+ SingDrawPlayerCzesc(Nr.Left + 20, 120+95, Nr.Width - 40, 0, 3, 12, Alpha[0]);
+ SingDrawPlayerCzesc(Nr.Left + 20, 245+95, Nr.Width - 40, 0, 4, 12, Alpha[0]);
+ SingDrawPlayerCzesc(Nr.Left + 20, 370+95, Nr.Width - 40, 0, 5, 12, Alpha[0]);
end;
end;
end;
-procedure SingDrawNotesDuet(NR: TRecR);
+procedure SingDrawNotesDuet(NR: TRecR; Alpha: TAlpha);
begin
if PlayersPlay = 1 then
begin
- SingDrawPlayerBGCzesc(NR.Left + 20, Skin_P2_NotesB, NR.Right - 20, 0, 0, 15);
- SingDrawCzesc(NR.Left + 20, Skin_P2_NotesB, NR.Right - 20, 0, 15);
- SingDrawPlayerCzesc(Nr.Left + 20, Skin_P2_NotesB, Nr.Width - 40, 0, 0, 15);
+ SingDrawPlayerBGCzesc(NR.Left + 20, Skin_P2_NotesB, NR.Right - 20, 0, 0, 15, Alpha[0]);
+ SingDrawCzesc(NR.Left + 20, Skin_P2_NotesB, NR.Right - 20, 0, 15, Alpha[0]);
+ SingDrawPlayerCzesc(Nr.Left + 20, Skin_P2_NotesB, Nr.Width - 40, 0, 0, 15, Alpha[0]);
end;
if (PlayersPlay = 2) then
begin
- SingDrawPlayerBGCzesc(Nr.Left + 20, Skin_P1_NotesB, Nr.Right - 20, 0, 0, 15);
- SingDrawPlayerBGCzesc(Nr.Left + 20, Skin_P2_NotesB, Nr.Right - 20, 1, 1, 15);
+ SingDrawPlayerBGCzesc(Nr.Left + 20, Skin_P1_NotesB, Nr.Right - 20, 0, 0, 15, Alpha[0]);
+ SingDrawPlayerBGCzesc(Nr.Left + 20, Skin_P2_NotesB, Nr.Right - 20, 1, 1, 15, Alpha[1]);
- SingDrawCzesc(NR.Left + 20, Skin_P1_NotesB, NR.Right - 20, 0, 15);
- SingDrawCzesc(NR.Left + 20, Skin_P2_NotesB, NR.Right - 20, 1, 15);
+ SingDrawCzesc(NR.Left + 20, Skin_P1_NotesB, NR.Right - 20, 0, 15, Alpha[0]);
+ SingDrawCzesc(NR.Left + 20, Skin_P2_NotesB, NR.Right - 20, 1, 15, Alpha[1]);
- SingDrawPlayerCzesc(Nr.Left + 20, Skin_P1_NotesB, Nr.Width - 40, 0, 0, 15);
- SingDrawPlayerCzesc(Nr.Left + 20, Skin_P2_NotesB, Nr.Width - 40, 1, 1, 15);
+ SingDrawPlayerCzesc(Nr.Left + 20, Skin_P1_NotesB, Nr.Width - 40, 0, 0, 15, Alpha[0]);
+ SingDrawPlayerCzesc(Nr.Left + 20, Skin_P2_NotesB, Nr.Width - 40, 1, 1, 15, Alpha[1]);
end;
if PlayersPlay = 3 then
@@ -1048,40 +1057,40 @@ begin NotesW := NotesW * 0.8;
NotesH := NotesH * 0.8;
- SingDrawPlayerBGCzesc(Nr.Left + 20, 120+95, Nr.Right - 20, 0, 0, 12);
- SingDrawPlayerBGCzesc(Nr.Left + 20, 245+95, Nr.Right - 20, 1, 1, 12);
- SingDrawPlayerBGCzesc(Nr.Left + 20, 370+95, Nr.Right - 20, 0, 2, 12);
+ SingDrawPlayerBGCzesc(Nr.Left + 20, 120+95, Nr.Right - 20, 0, 0, 12, Alpha[0]);
+ SingDrawPlayerBGCzesc(Nr.Left + 20, 245+95, Nr.Right - 20, 1, 1, 12, Alpha[1]);
+ SingDrawPlayerBGCzesc(Nr.Left + 20, 370+95, Nr.Right - 20, 0, 2, 12, Alpha[0]);
- SingDrawCzesc(NR.Left + 20, 120+95, NR.Right - 20, 0, 12);
- SingDrawCzesc(NR.Left + 20, 245+95, NR.Right - 20, 1, 12);
- SingDrawCzesc(NR.Left + 20, 370+95, NR.Right - 20, 0, 12);
+ SingDrawCzesc(NR.Left + 20, 120+95, NR.Right - 20, 0, 12, Alpha[0]);
+ SingDrawCzesc(NR.Left + 20, 245+95, NR.Right - 20, 1, 12, Alpha[1]);
+ SingDrawCzesc(NR.Left + 20, 370+95, NR.Right - 20, 0, 12, Alpha[0]);
- SingDrawPlayerCzesc(Nr.Left + 20, 120+95, Nr.Width - 40, 0, 0, 12);
- SingDrawPlayerCzesc(Nr.Left + 20, 245+95, Nr.Width - 40, 1, 1, 12);
- SingDrawPlayerCzesc(Nr.Left + 20, 370+95, Nr.Width - 40, 0, 2, 12);
+ SingDrawPlayerCzesc(Nr.Left + 20, 120+95, Nr.Width - 40, 0, 0, 12, Alpha[0]);
+ SingDrawPlayerCzesc(Nr.Left + 20, 245+95, Nr.Width - 40, 1, 1, 12, Alpha[1]);
+ SingDrawPlayerCzesc(Nr.Left + 20, 370+95, Nr.Width - 40, 0, 2, 12, Alpha[0]);
end;
if PlayersPlay = 4 then
begin
if ScreenAct = 1 then begin
- SingDrawPlayerBGCzesc(Nr.Left + 20, Skin_P1_NotesB, Nr.Right - 20, 0, 0, 15);
- SingDrawPlayerBGCzesc(Nr.Left + 20, Skin_P2_NotesB, Nr.Right - 20, 1, 1, 15);
+ SingDrawPlayerBGCzesc(Nr.Left + 20, Skin_P1_NotesB, Nr.Right - 20, 0, 0, 15, Alpha[0]);
+ SingDrawPlayerBGCzesc(Nr.Left + 20, Skin_P2_NotesB, Nr.Right - 20, 1, 1, 15, Alpha[1]);
end;
if ScreenAct = 2 then begin
- SingDrawPlayerBGCzesc(Nr.Left + 20, Skin_P1_NotesB, Nr.Right - 20, 0, 2, 15);
- SingDrawPlayerBGCzesc(Nr.Left + 20, Skin_P2_NotesB, Nr.Right - 20, 1, 3, 15);
+ SingDrawPlayerBGCzesc(Nr.Left + 20, Skin_P1_NotesB, Nr.Right - 20, 0, 2, 15, Alpha[0]);
+ SingDrawPlayerBGCzesc(Nr.Left + 20, Skin_P2_NotesB, Nr.Right - 20, 1, 3, 15, Alpha[1]);
end;
- SingDrawCzesc(NR.Left + 20, Skin_P1_NotesB, NR.Right - 20, 0, 15);
- SingDrawCzesc(NR.Left + 20, Skin_P2_NotesB, NR.Right - 20, 1, 15);
+ SingDrawCzesc(NR.Left + 20, Skin_P1_NotesB, NR.Right - 20, 0, 15, Alpha[0]);
+ SingDrawCzesc(NR.Left + 20, Skin_P2_NotesB, NR.Right - 20, 1, 15, Alpha[1]);
if ScreenAct = 1 then begin
- SingDrawPlayerCzesc(Nr.Left + 20, Skin_P1_NotesB, Nr.Width - 40, 0, 0, 15);
- SingDrawPlayerCzesc(Nr.Left + 20, Skin_P2_NotesB, Nr.Width - 40, 1, 1, 15);
+ SingDrawPlayerCzesc(Nr.Left + 20, Skin_P1_NotesB, Nr.Width - 40, 0, 0, 15, Alpha[0]);
+ SingDrawPlayerCzesc(Nr.Left + 20, Skin_P2_NotesB, Nr.Width - 40, 1, 1, 15, Alpha[1]);
end;
if ScreenAct = 2 then begin
- SingDrawPlayerCzesc(Nr.Left + 20, Skin_P1_NotesB, Nr.Width - 40, 0, 2, 15);
- SingDrawPlayerCzesc(Nr.Left + 20, Skin_P2_NotesB, Nr.Width - 40, 1, 3, 15);
+ SingDrawPlayerCzesc(Nr.Left + 20, Skin_P1_NotesB, Nr.Width - 40, 0, 2, 15, Alpha[0]);
+ SingDrawPlayerCzesc(Nr.Left + 20, Skin_P2_NotesB, Nr.Width - 40, 1, 3, 15, Alpha[1]);
end;
end;
@@ -1090,34 +1099,34 @@ begin NotesH := NotesH * 0.8;
if ScreenAct = 1 then begin
- SingDrawPlayerBGCzesc(Nr.Left + 20, 120+95, Nr.Right - 20, 0, 0, 12);
- SingDrawPlayerBGCzesc(Nr.Left + 20, 245+95, Nr.Right - 20, 1, 1, 12);
- SingDrawPlayerBGCzesc(Nr.Left + 20, 370+95, Nr.Right - 20, 0, 2, 12);
+ SingDrawPlayerBGCzesc(Nr.Left + 20, 120+95, Nr.Right - 20, 0, 0, 12, Alpha[0]);
+ SingDrawPlayerBGCzesc(Nr.Left + 20, 245+95, Nr.Right - 20, 1, 1, 12, Alpha[1]);
+ SingDrawPlayerBGCzesc(Nr.Left + 20, 370+95, Nr.Right - 20, 0, 2, 12, Alpha[0]);
end;
if ScreenAct = 2 then begin
- SingDrawPlayerBGCzesc(Nr.Left + 20, 120+95, Nr.Right - 20, 0, 3, 12);
- SingDrawPlayerBGCzesc(Nr.Left + 20, 245+95, Nr.Right - 20, 1, 4, 12);
- SingDrawPlayerBGCzesc(Nr.Left + 20, 370+95, Nr.Right - 20, 0, 5, 12);
+ SingDrawPlayerBGCzesc(Nr.Left + 20, 120+95, Nr.Right - 20, 0, 3, 12, Alpha[0]);
+ SingDrawPlayerBGCzesc(Nr.Left + 20, 245+95, Nr.Right - 20, 1, 4, 12, Alpha[1]);
+ SingDrawPlayerBGCzesc(Nr.Left + 20, 370+95, Nr.Right - 20, 0, 5, 12, Alpha[0]);
end;
- SingDrawCzesc(NR.Left + 20, 120+95, NR.Right - 20, 0, 12);
- SingDrawCzesc(NR.Left + 20, 245+95, NR.Right - 20, 1, 12);
- SingDrawCzesc(NR.Left + 20, 370+95, NR.Right - 20, 0, 12);
+ SingDrawCzesc(NR.Left + 20, 120+95, NR.Right - 20, 0, 12, Alpha[0]);
+ SingDrawCzesc(NR.Left + 20, 245+95, NR.Right - 20, 1, 12, Alpha[1]);
+ SingDrawCzesc(NR.Left + 20, 370+95, NR.Right - 20, 0, 12, Alpha[0]);
if ScreenAct = 1 then begin
- SingDrawPlayerCzesc(Nr.Left + 20, 120+95, Nr.Width - 40, 0, 0, 12);
- SingDrawPlayerCzesc(Nr.Left + 20, 245+95, Nr.Width - 40, 1, 1, 12);
- SingDrawPlayerCzesc(Nr.Left + 20, 370+95, Nr.Width - 40, 0, 2, 12);
+ SingDrawPlayerCzesc(Nr.Left + 20, 120+95, Nr.Width - 40, 0, 0, 12, Alpha[0]);
+ SingDrawPlayerCzesc(Nr.Left + 20, 245+95, Nr.Width - 40, 1, 1, 12, Alpha[1]);
+ SingDrawPlayerCzesc(Nr.Left + 20, 370+95, Nr.Width - 40, 0, 2, 12, Alpha[0]);
end;
if ScreenAct = 2 then begin
- SingDrawPlayerCzesc(Nr.Left + 20, 120+95, Nr.Width - 40, 0, 3, 12);
- SingDrawPlayerCzesc(Nr.Left + 20, 245+95, Nr.Width - 40, 1, 4, 12);
- SingDrawPlayerCzesc(Nr.Left + 20, 370+95, Nr.Width - 40, 0, 5, 12);
+ SingDrawPlayerCzesc(Nr.Left + 20, 120+95, Nr.Width - 40, 0, 3, 12, Alpha[0]);
+ SingDrawPlayerCzesc(Nr.Left + 20, 245+95, Nr.Width - 40, 1, 4, 12, Alpha[1]);
+ SingDrawPlayerCzesc(Nr.Left + 20, 370+95, Nr.Width - 40, 0, 5, 12, Alpha[0]);
end;
end;
end;
-procedure SingModiDraw (PlayerInfo: TPlayerInfo);
+procedure SingModiDraw (PlayerInfo: TPlayerInfo; Alpha: TAlpha);
var
Pet: integer;
Pet2: integer;
@@ -1125,6 +1134,8 @@ var Rec: TRecR;
TexRec: TRecR;
NR: TRecR;
+ ab: real;
+
//FS: real;
BarFrom: integer;
BarAlpha: real;
@@ -1146,9 +1157,11 @@ var begin
// positions
- if Ini.SingWindow = 0 then begin
+ if Ini.SingWindow = 0 then
+ begin
NR.Left := 120;
- end else begin
+ end else
+ begin
NR.Left := 20;
end;
NR.Right := 780;
@@ -1168,20 +1181,25 @@ begin begin
// rysuje paski pod nutami
if PlayersPlay = 1 then
- SingDrawNoteLines(Nr.Left + 10*ScreenX, Skin_P2_NotesB - 105, Nr.Right + 10*ScreenX, 15);
- if (PlayersPlay = 2) or (PlayersPlay = 4) then begin
- SingDrawNoteLines(Nr.Left + 10*ScreenX, Skin_P1_NotesB - 105, Nr.Right + 10*ScreenX, 15);
- SingDrawNoteLines(Nr.Left + 10*ScreenX, Skin_P2_NotesB - 105, Nr.Right + 10*ScreenX, 15);
+ SingDrawNoteLines(Nr.Left + 10*ScreenX, Skin_P2_NotesB - 105, Nr.Right + 10*ScreenX, 15, Alpha[0]);
+ if (PlayersPlay = 2) or (PlayersPlay = 4) then
+ begin
+ SingDrawNoteLines(Nr.Left + 10*ScreenX, Skin_P1_NotesB - 105, Nr.Right + 10*ScreenX, 15, Alpha[1]);
+ SingDrawNoteLines(Nr.Left + 10*ScreenX, Skin_P2_NotesB - 105, Nr.Right + 10*ScreenX, 15, Alpha[0]);
end;
- if (PlayersPlay = 3) or (PlayersPlay = 6) then begin
- SingDrawNoteLines(Nr.Left + 10*ScreenX, 120, Nr.Right + 10*ScreenX, 12);
- SingDrawNoteLines(Nr.Left + 10*ScreenX, 245, Nr.Right + 10*ScreenX, 12);
- SingDrawNoteLines(Nr.Left + 10*ScreenX, 370, Nr.Right + 10*ScreenX, 12);
+ if (PlayersPlay = 3) or (PlayersPlay = 6) then
+ begin
+ SingDrawNoteLines(Nr.Left + 10*ScreenX, 120, Nr.Right + 10*ScreenX, 12, Alpha[0]);
+ SingDrawNoteLines(Nr.Left + 10*ScreenX, 245, Nr.Right + 10*ScreenX, 12, Alpha[1]);
+ SingDrawNoteLines(Nr.Left + 10*ScreenX, 370, Nr.Right + 10*ScreenX, 12, Alpha[0]);
end;
end;
// rysuje tekst - new Lyric engine
+ ScreenSingModi.LyricMain[0].SetAlpha(Alpha[0]);
+ ScreenSingModi.LyricSub[0].SetAlpha(Alpha[2]);
+
ScreenSingModi.LyricMain[0].Draw;
ScreenSingModi.LyricSub[0].Draw;
@@ -1472,23 +1490,23 @@ begin if (DLLMAn.Selected.ShowNotes And DLLMan.Selected.LoadSong) then
begin
if (PlayersPlay = 1) And PlayerInfo.Playerinfo[0].Enabled then begin
- SingDrawPlayerBGCzesc(NR.Left + 20, Skin_P2_NotesB, NR.Right - 20, 0, 0, 15);
- SingDrawCzesc(NR.Left + 20, Skin_P2_NotesB, NR.Right - 20, 0, 15);
- SingDrawPlayerCzesc(Nr.Left + 20, Skin_P2_NotesB, Nr.Width - 40, 0, 0, 15);
+ SingDrawPlayerBGCzesc(NR.Left + 20, Skin_P2_NotesB, NR.Right - 20, 0, 0, 15, Alpha[0]);
+ SingDrawCzesc(NR.Left + 20, Skin_P2_NotesB, NR.Right - 20, 0, 15, Alpha[0]);
+ SingDrawPlayerCzesc(Nr.Left + 20, Skin_P2_NotesB, Nr.Width - 40, 0, 0, 15, Alpha[0]);
end;
if (PlayersPlay = 2) then begin
if PlayerInfo.Playerinfo[0].Enabled then
begin
- SingDrawPlayerBGCzesc(Nr.Left + 20, Skin_P1_NotesB, Nr.Right - 20, 0, 0, 15);
- SingDrawCzesc(NR.Left + 20, Skin_P1_NotesB, NR.Right - 20, 0, 15);
- SingDrawPlayerCzesc(Nr.Left + 20, Skin_P1_NotesB, Nr.Width - 40, 0, 0, 15);
+ SingDrawPlayerBGCzesc(Nr.Left + 20, Skin_P1_NotesB, Nr.Right - 20, 0, 0, 15, Alpha[0]);
+ SingDrawCzesc(NR.Left + 20, Skin_P1_NotesB, NR.Right - 20, 0, 15, Alpha[0]);
+ SingDrawPlayerCzesc(Nr.Left + 20, Skin_P1_NotesB, Nr.Width - 40, 0, 0, 15, Alpha[0]);
end;
if PlayerInfo.Playerinfo[1].Enabled then
begin
- SingDrawPlayerBGCzesc(Nr.Left + 20, Skin_P2_NotesB, Nr.Right - 20, 0, 1, 15);
- SingDrawCzesc(NR.Left + 20, Skin_P2_NotesB, NR.Right - 20, 0, 15);
- SingDrawPlayerCzesc(Nr.Left + 20, Skin_P2_NotesB, Nr.Width - 40, 0, 1, 15);
+ SingDrawPlayerBGCzesc(Nr.Left + 20, Skin_P2_NotesB, Nr.Right - 20, 0, 1, 15, Alpha[0]);
+ SingDrawCzesc(NR.Left + 20, Skin_P2_NotesB, NR.Right - 20, 0, 15, Alpha[0]);
+ SingDrawPlayerCzesc(Nr.Left + 20, Skin_P2_NotesB, Nr.Width - 40, 0, 1, 15, Alpha[0]);
end;
end;
@@ -1499,46 +1517,46 @@ begin if PlayerInfo.Playerinfo[0].Enabled then
begin
- SingDrawPlayerBGCzesc(Nr.Left + 20, 120+95, Nr.Right - 20, 0, 0, 12);
- SingDrawCzesc(NR.Left + 20, 120+95, NR.Right - 20, 0, 12);
- SingDrawPlayerCzesc(Nr.Left + 20, 120+95, Nr.Width - 40, 0, 0, 12);
+ SingDrawPlayerBGCzesc(Nr.Left + 20, 120+95, Nr.Right - 20, 0, 0, 12, Alpha[0]);
+ SingDrawCzesc(NR.Left + 20, 120+95, NR.Right - 20, 0, 12, Alpha[0]);
+ SingDrawPlayerCzesc(Nr.Left + 20, 120+95, Nr.Width - 40, 0, 0, 12, Alpha[0]);
end;
if PlayerInfo.Playerinfo[1].Enabled then
begin
- SingDrawPlayerBGCzesc(Nr.Left + 20, 245+95, Nr.Right - 20, 0, 1, 12);
- SingDrawCzesc(NR.Left + 20, 245+95, NR.Right - 20, 0, 12);
- SingDrawPlayerCzesc(Nr.Left + 20, 245+95, Nr.Width - 40, 0, 1, 12);
+ SingDrawPlayerBGCzesc(Nr.Left + 20, 245+95, Nr.Right - 20, 0, 1, 12, Alpha[0]);
+ SingDrawCzesc(NR.Left + 20, 245+95, NR.Right - 20, 0, 12, Alpha[0]);
+ SingDrawPlayerCzesc(Nr.Left + 20, 245+95, Nr.Width - 40, 0, 1, 12, Alpha[0]);
end;
if PlayerInfo.Playerinfo[2].Enabled then
begin
- SingDrawPlayerBGCzesc(Nr.Left + 20, 370+95, Nr.Right - 20, 0, 2, 12);
- SingDrawCzesc(NR.Left + 20, 370+95, NR.Right - 20, 0, 12);
- SingDrawPlayerCzesc(Nr.Left + 20, 370+95, Nr.Width - 40, 0, 2, 12);
+ SingDrawPlayerBGCzesc(Nr.Left + 20, 370+95, Nr.Right - 20, 0, 2, 12, Alpha[0]);
+ SingDrawCzesc(NR.Left + 20, 370+95, NR.Right - 20, 0, 12, Alpha[0]);
+ SingDrawPlayerCzesc(Nr.Left + 20, 370+95, Nr.Width - 40, 0, 2, 12, Alpha[0]);
end;
end;
if PlayersPlay = 4 then begin
if ScreenAct = 1 then begin
- SingDrawPlayerBGCzesc(Nr.Left + 20, Skin_P1_NotesB, Nr.Right - 20, 0, 0, 15);
- SingDrawPlayerBGCzesc(Nr.Left + 20, Skin_P2_NotesB, Nr.Right - 20, 0, 1, 15);
+ SingDrawPlayerBGCzesc(Nr.Left + 20, Skin_P1_NotesB, Nr.Right - 20, 0, 0, 15, Alpha[0]);
+ SingDrawPlayerBGCzesc(Nr.Left + 20, Skin_P2_NotesB, Nr.Right - 20, 0, 1, 15, Alpha[0]);
end;
if ScreenAct = 2 then begin
- SingDrawPlayerBGCzesc(Nr.Left + 20, Skin_P1_NotesB, Nr.Right - 20, 0, 2, 15);
- SingDrawPlayerBGCzesc(Nr.Left + 20, Skin_P2_NotesB, Nr.Right - 20, 0, 3, 15);
+ SingDrawPlayerBGCzesc(Nr.Left + 20, Skin_P1_NotesB, Nr.Right - 20, 0, 2, 15, Alpha[0]);
+ SingDrawPlayerBGCzesc(Nr.Left + 20, Skin_P2_NotesB, Nr.Right - 20, 0, 3, 15, Alpha[0]);
end;
- SingDrawCzesc(NR.Left + 20, Skin_P1_NotesB, NR.Right - 20, 0, 15);
- SingDrawCzesc(NR.Left + 20, Skin_P2_NotesB, NR.Right - 20, 0, 15);
+ SingDrawCzesc(NR.Left + 20, Skin_P1_NotesB, NR.Right - 20, 0, 15, Alpha[0]);
+ SingDrawCzesc(NR.Left + 20, Skin_P2_NotesB, NR.Right - 20, 0, 15, Alpha[0]);
if ScreenAct = 1 then begin
- SingDrawPlayerCzesc(Nr.Left + 20, Skin_P1_NotesB, Nr.Width - 40, 0, 0, 15);
- SingDrawPlayerCzesc(Nr.Left + 20, Skin_P2_NotesB, Nr.Width - 40, 0, 1, 15);
+ SingDrawPlayerCzesc(Nr.Left + 20, Skin_P1_NotesB, Nr.Width - 40, 0, 0, 15, Alpha[0]);
+ SingDrawPlayerCzesc(Nr.Left + 20, Skin_P2_NotesB, Nr.Width - 40, 0, 1, 15, Alpha[0]);
end;
if ScreenAct = 2 then begin
- SingDrawPlayerCzesc(Nr.Left + 20, Skin_P1_NotesB, Nr.Width - 40, 0, 2, 15);
- SingDrawPlayerCzesc(Nr.Left + 20, Skin_P2_NotesB, Nr.Width - 40, 0, 3, 15);
+ SingDrawPlayerCzesc(Nr.Left + 20, Skin_P1_NotesB, Nr.Width - 40, 0, 2, 15, Alpha[0]);
+ SingDrawPlayerCzesc(Nr.Left + 20, Skin_P2_NotesB, Nr.Width - 40, 0, 3, 15, Alpha[0]);
end;
end;
@@ -1547,29 +1565,29 @@ begin NotesH := NotesH * 0.8;
if ScreenAct = 1 then begin
- SingDrawPlayerBGCzesc(Nr.Left + 20, 120+95, Nr.Right - 20, 0, 0, 12);
- SingDrawPlayerBGCzesc(Nr.Left + 20, 245+95, Nr.Right - 20, 0, 1, 12);
- SingDrawPlayerBGCzesc(Nr.Left + 20, 370+95, Nr.Right - 20, 0, 2, 12);
+ SingDrawPlayerBGCzesc(Nr.Left + 20, 120+95, Nr.Right - 20, 0, 0, 12, Alpha[0]);
+ SingDrawPlayerBGCzesc(Nr.Left + 20, 245+95, Nr.Right - 20, 0, 1, 12, Alpha[0]);
+ SingDrawPlayerBGCzesc(Nr.Left + 20, 370+95, Nr.Right - 20, 0, 2, 12, Alpha[0]);
end;
if ScreenAct = 2 then begin
- SingDrawPlayerBGCzesc(Nr.Left + 20, 120+95, Nr.Right - 20, 0, 3, 12);
- SingDrawPlayerBGCzesc(Nr.Left + 20, 245+95, Nr.Right - 20, 0, 4, 12);
- SingDrawPlayerBGCzesc(Nr.Left + 20, 370+95, Nr.Right - 20, 0, 5, 12);
+ SingDrawPlayerBGCzesc(Nr.Left + 20, 120+95, Nr.Right - 20, 0, 3, 12, Alpha[0]);
+ SingDrawPlayerBGCzesc(Nr.Left + 20, 245+95, Nr.Right - 20, 0, 4, 12, Alpha[0]);
+ SingDrawPlayerBGCzesc(Nr.Left + 20, 370+95, Nr.Right - 20, 0, 5, 12, Alpha[0]);
end;
- SingDrawCzesc(NR.Left + 20, 120+95, NR.Right - 20, 0, 12);
- SingDrawCzesc(NR.Left + 20, 245+95, NR.Right - 20, 0, 12);
- SingDrawCzesc(NR.Left + 20, 370+95, NR.Right - 20, 0, 12);
+ SingDrawCzesc(NR.Left + 20, 120+95, NR.Right - 20, 0, 12, Alpha[0]);
+ SingDrawCzesc(NR.Left + 20, 245+95, NR.Right - 20, 0, 12, Alpha[0]);
+ SingDrawCzesc(NR.Left + 20, 370+95, NR.Right - 20, 0, 12, Alpha[0]);
if ScreenAct = 1 then begin
- SingDrawPlayerCzesc(Nr.Left + 20, 120+95, Nr.Width - 40, 0, 0, 12);
- SingDrawPlayerCzesc(Nr.Left + 20, 245+95, Nr.Width - 40, 0, 1, 12);
- SingDrawPlayerCzesc(Nr.Left + 20, 370+95, Nr.Width - 40, 0, 2, 12);
+ SingDrawPlayerCzesc(Nr.Left + 20, 120+95, Nr.Width - 40, 0, 0, 12, Alpha[0]);
+ SingDrawPlayerCzesc(Nr.Left + 20, 245+95, Nr.Width - 40, 0, 1, 12, Alpha[0]);
+ SingDrawPlayerCzesc(Nr.Left + 20, 370+95, Nr.Width - 40, 0, 2, 12, Alpha[0]);
end;
if ScreenAct = 2 then begin
- SingDrawPlayerCzesc(Nr.Left + 20, 120+95, Nr.Width - 40, 0, 3, 12);
- SingDrawPlayerCzesc(Nr.Left + 20, 245+95, Nr.Width - 40, 0, 4, 12);
- SingDrawPlayerCzesc(Nr.Left + 20, 370+95, Nr.Width - 40, 0, 5, 12);
+ SingDrawPlayerCzesc(Nr.Left + 20, 120+95, Nr.Width - 40, 0, 3, 12, Alpha[0]);
+ SingDrawPlayerCzesc(Nr.Left + 20, 245+95, Nr.Width - 40, 0, 4, 12, Alpha[0]);
+ SingDrawPlayerCzesc(Nr.Left + 20, 370+95, Nr.Width - 40, 0, 5, 12, Alpha[0]);
end;
end;
end;
@@ -1737,14 +1755,14 @@ begin begin
st := Czesci[CP].Czesc[Czesci[CP].Akt].StartNote;
end_ := Czesci[CP].Czesc[Czesci[CP].Akt].Koniec;
- if AktSong.isDuet and (Length(Czesci[(CP+1) mod 2].Czesc[Czesci[CP].Akt].Nuta)>0)then
+ {if AktSong.isDuet and (Length(Czesci[(CP+1) mod 2].Czesc[Czesci[CP].Akt].Nuta)>0)then
begin
if (Czesci[(CP+1) mod 2].Czesc[Czesci[CP].Akt].Koniec > end_) then
end_ := Czesci[(CP+1) mod 2].Czesc[Czesci[CP].Akt].Koniec;
if (Czesci[(CP+1) mod 2].Czesc[Czesci[CP].Akt].StartNote < st) then
st := Czesci[(CP+1) mod 2].Czesc[Czesci[CP].Akt].StartNote;
- end;
+ end;}
end;
glColor3f(1, 1, 1);
diff --git a/Game/Code/Classes/UFiles.pas b/Game/Code/Classes/UFiles.pas index acab9abd..1787b740 100644 --- a/Game/Code/Classes/UFiles.pas +++ b/Game/Code/Classes/UFiles.pas @@ -563,7 +563,8 @@ begin Muzyka.IlNut := Muzyka.IlNut + 1;
Nuta[HighNut].Start := StartP;
- if IlNut = 1 then begin
+ if IlNut = 1 then
+ begin
StartNote := Nuta[HighNut].Start;
if Czesci[NrCzesci].Ilosc = 1 then
Start := -100;
@@ -623,6 +624,7 @@ begin Czesci[NrCzesciP].High := Czesci[NrCzesciP].High + 1;
Czesci[NrCzesciP].Ilosc := Czesci[NrCzesciP].Ilosc + 1;
Czesci[NrCzesciP].Czesc[Czesci[NrCzesciP].High].HighNut := -1;
+ Czesci[NrCzesciP].Czesc[Czesci[NrCzesciP].High].IlNut := 0;
if not AktSong.Relative then
Czesci[NrCzesciP].Czesc[Czesci[NrCzesciP].High].Start := Param1;
@@ -662,7 +664,15 @@ begin bt := low(integer);
numLines := Length(Czesci[p].Czesc);
- if(numLines=0) and not AktSong.isDuet then
+ if (numLines>0) and (Length(Czesci[p].Czesc[numLines-1].Nuta)=0) then
+ begin
+ Dec(numLines);
+ SetLength(Czesci[p].Czesc, numLines);
+ Dec(Czesci[p].High);
+ Dec(Czesci[p].Ilosc);
+ end;
+
+ if(numLines=0) then
begin
Log.LogError('Song ' + AktSong.Path + AktSong.Filename + ' has no lines?');
if (Ini.LoadFaultySongs=0) then
@@ -673,7 +683,7 @@ begin begin
numNotes := Length(Czesci[p].Czesc[line].Nuta);
- if(numNotes=0) and not AktSong.isDuet then
+ if(numNotes=0) then
begin
Log.LogError('Sentence ' + IntToStr(line+1) + ' in song ' + AktSong.Path + AktSong.Filename + ' has no notes?');
if (Ini.LoadFaultySongs=0) then
@@ -769,7 +779,7 @@ var Param2: integer;
Param3: integer;
ParamS: string;
- I: Integer;
+ I: integer;
isNewSentence: boolean;
begin
Result := false;
@@ -845,6 +855,7 @@ begin begin
AktSong.isDuet := true;
SetLength(Czesci, 2);
+ CP := -1;
end else
SetLength(Czesci, 1);
@@ -900,7 +911,8 @@ begin isNewSentence := false;
end;
- if TempC = '-' then begin
+ if TempC = '-' then
+ begin
if isNewSentence then
begin
Log.LogError('Double sentence break in file: "' + Name + '"; Line '+IntToStr(FileLineNo)+' (LoadSong)');
@@ -917,9 +929,17 @@ begin NewSentence(CP, (Param1 + Rel[CP]) * Mult, Param2, LoadFullFile)
else
begin
- // both singer
- NewSentence(0, (Param1 + Rel[0]) * Mult, Param2, LoadFullFile);
- NewSentence(1, (Param1 + Rel[1]) * Mult, Param2, LoadFullFile);
+ for I := 0 to 1 do
+ begin
+ if (Czesci[I].Czesc[Czesci[I].High].IlNut > 0) then
+ begin
+ with Czesci[I].Czesc[Czesci[I].High] do
+ begin
+ if (Nuta[HighNut].Start + Nuta[HighNut].Dlugosc <= (Param1 + Rel[I]) * Mult) then
+ NewSentence(I, (Param1 + Rel[I]) * Mult, Param2, LoadFullFile);
+ end;
+ end;
+ end;
end;
isNewSentence := true;
end; // if
@@ -935,7 +955,8 @@ begin end;
- if not AktSong.isDuet then begin
+ if not AktSong.isDuet then
+ begin
Czesci[CP].Czesc[Czesci[CP].High].BaseNote := Base[CP];
if LoadFullFile then
Czesci[CP].Czesc[Czesci[CP].High].LyricWidth := glTextWidth(PChar(Czesci[CP].Czesc[Czesci[CP].High].Lyric));
@@ -948,7 +969,8 @@ begin //Total Notes Patch End
end else
begin
- for Pet := 0 to High(Czesci) do begin
+ for Pet := 0 to High(Czesci) do
+ begin
Czesci[Pet].Czesc[Czesci[Pet].High].BaseNote := Base[Pet];
if LoadFullFile then
Czesci[Pet].Czesc[Czesci[Pet].High].LyricWidth := glTextWidth(PChar(Czesci[Pet].Czesc[Czesci[Pet].High].Lyric));
@@ -1113,81 +1135,27 @@ begin // write custom header tags (from 1.1)
WriteCustomTags;
- if not Song.isDuet then
+ for P := 0 to Length(Czesci) - 1 do
begin
- for C := 0 to Czesc[0].High do
+ if AktSong.isDuet then
begin
- WriteLine(0, C);
+ S := 'P' + IntToStr(P+1);
+ WriteLn(SongFile, S);
+ end;
- if C < Czesc[0].High then
- begin // don't write end of last sentence
- if not Relative then
- S := '- ' + IntToStr(Czesc[0].Czesc[C+1].Start)
- else
- begin
- S := '- ' + IntToStr(Czesc[0].Czesc[C+1].Start - RelativeSubTime) +
- ' ' + IntToStr(Czesc[0].Czesc[C+1].Start - RelativeSubTime);
- RelativeSubTime := Czesc[0].Czesc[C+1].Start;
- end;
- WriteLn(SongFile, S);
- end;
- end; // C
- end else
- begin
- P := -1;
- for C := 0 to Czesc[0].High do //go through all lines
+ for C := 0 to Czesc[P].High do
begin
- if isIdenticalLine(C) then
- begin
- //not end?
- if (C < Czesc[0].High) and (P <> 3) then
- begin
- //P1+P2 ==> P3
- S := 'P3';
- P := 3;
- WriteLn(SongFile, S);
- end;
- WriteLine(0, C);
- end else
- begin
- //singer 1 P1
- if (Length(Czesc[0].Czesc[C].Nuta)>0) then
- begin
- if (C < Czesc[0].High) and (P <> 1) then
- begin
- S := 'P1';
- P := 1;
- WriteLn(SongFile, S);
- end;
- WriteLine(0, C);
- end;
-
- //singer 2 P2
- if (Length(Czesc[1].Czesc[C].Nuta)>0) then
- begin
- if (C < Czesc[0].High) and (P <> 2) then
- begin
- S := 'P2';
- P := 2;
- WriteLn(SongFile, S);
- end;
- WriteLine(1, C);
- end;
- end;
-
- CP := P-1;
- if CP=2 then
- CP := 0;
+ WriteLine(P, C);
- if C < Czesc[CP].High then
+ if C < Czesc[P].High then
begin // don't write end of last sentence
if not Relative then
- S := '- ' + IntToStr(Czesc[CP].Czesc[C+1].Start)
+ S := '- ' + IntToStr(Czesc[P].Czesc[C+1].Start)
else
begin
- S := '- ' + IntToStr(Czesc[CP].Czesc[C+1].Start - RelativeSubTime) +
- ' ' + IntToStr(Czesc[CP].Czesc[C+1].Start - RelativeSubTime);
- RelativeSubTime := Czesc[CP].Czesc[C+1].Start;
+ S := '- ' + IntToStr(Czesc[P].Czesc[C+1].Start - RelativeSubTime) +
+ ' ' + IntToStr(Czesc[P].Czesc[C+1].Start - RelativeSubTime);
+ RelativeSubTime := Czesc[P].Czesc[C+1].Start;
end;
WriteLn(SongFile, S);
end;
diff --git a/Game/Code/Classes/UGraphicClasses.pas b/Game/Code/Classes/UGraphicClasses.pas index 6d1cd36e..260d7c5e 100644 --- a/Game/Code/Classes/UGraphicClasses.pas +++ b/Game/Code/Classes/UGraphicClasses.pas @@ -8,6 +8,8 @@ type TParticleType=(GoldenNote, PerfectNote, NoteHitTwinkle, PerfectLineTwinkle, ColoredStar, Flare);
+ TAlpha = array[0..3] of real; //p1 main, p2 main, p1 sub, p2 sub
+
TColour3f = Record
r, g, b: Real;
end;
@@ -24,13 +26,16 @@ type RecIndex : Integer; //To which rectangle this particle belongs (only GoldenNote)
StarType : TParticleType; // GoldenNote | PerfectNote | NoteHitTwinkle | PerfectLineTwinkle
Alpha : Real; // used for fading...
+ CP : Integer;
mX, mY : Real; // movement-vector for PerfectLineTwinkle
SizeMod : Real; // experimental size modifier
SurviveSentenceChange : Boolean;
- Constructor Create(cX,cY: Real; cScreen: Integer; cLive: Byte; cFrame : integer; cRecArrayIndex : Integer; cStarType : TParticleType; Player: Cardinal);
+ Constructor Create(cX,cY: Real; cScreen: Integer; cLive: Byte;
+ cFrame : integer; cRecArrayIndex : Integer; cStarType : TParticleType;
+ Player: Cardinal; CP: integer);
Destructor Destroy();
- procedure Draw;
+ procedure Draw(Alph: TAlpha);
procedure LiveOn;
end;
@@ -39,6 +44,7 @@ type TotalStarCount : Integer;
CurrentStarCount : Integer;
Screen : Integer;
+ CP : Integer;
end;
PerfectNotePositions = Record
@@ -57,20 +63,21 @@ type constructor Create;
destructor Destroy; override;
- procedure Draw;
+ procedure Draw(Alpha: TAlpha);
function Spawn(X, Y: Real;
Screen: Integer;
Live: Byte;
StartFrame: Integer;
RecArrayIndex: Integer; // this is only used with GoldenNotes
StarType: TParticleType;
- Player: Cardinal // for PerfectLineTwinkle
+ Player: Cardinal; // for PerfectLineTwinkle
+ CP: integer
): Cardinal;
- procedure SpawnRec();
+ procedure SpawnRec(Alph: TAlpha);
procedure Kill(index: Cardinal);
procedure KillAll();
- procedure SentenceChange();
- procedure SaveGoldenStarsRec(Xtop, Ytop, Xbottom, Ybottom: Real);
+ 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 SpawnPerfectLineTwinkle();
@@ -82,7 +89,9 @@ implementation uses sysutils, Windows, gl, UIni, UMain, UThemes, USkins, UGraphic, UDrawTexture, math, dialogs;
//TParticle
-Constructor TParticle.Create(cX,cY: Real; cScreen: Integer; cLive: Byte; cFrame : integer; cRecArrayIndex : Integer; cStarType : TParticleType; Player: Cardinal);
+Constructor TParticle.Create(cX,cY: Real; cScreen: Integer; cLive: Byte;
+ cFrame : integer; cRecArrayIndex : Integer; cStarType : TParticleType;
+ Player: Cardinal; CP: integer);
begin
inherited Create;
// in this constructor we set all initial values for our particle
@@ -94,6 +103,7 @@ begin RecIndex := cRecArrayIndex;
StarType := cStarType;
Alpha := (-cos((Frame+1)*2*pi/16)+1); // neat fade-in-and-out
+ Self.CP := CP;
SetLength(Scale,1);
Scale[0] := 1;
SurviveSentenceChange := False;
@@ -292,14 +302,14 @@ begin end;
end;
-procedure TParticle.Draw;
+procedure TParticle.Draw(Alph: TAlpha);
var L: Cardinal;
begin
if ScreenAct = Screen then
// this draws (multiple) texture(s) of our particle
for L:=0 to High(Col) do
begin
- glColor4f(Col[L].r, Col[L].g, Col[L].b, Alpha);
+ glColor4f(Col[L].r, Col[L].g, Col[L].b, Alpha*Alph[CP]);
glBindTexture(GL_TEXTURE_2D, Tex);
glEnable(GL_TEXTURE_2D);
@@ -339,7 +349,7 @@ begin end;
-procedure TEffectManager.Draw;
+procedure TEffectManager.Draw(Alpha: TAlpha);
var
I: Integer;
CurrentTime: Cardinal;
@@ -373,20 +383,22 @@ begin //Draw
for I := 0 to high(Particle) do
begin
- Particle[I].Draw;
+ Particle[I].Draw(Alpha);
end;
end;
// this method creates just one particle
-function TEffectManager.Spawn(X, Y: Real; Screen: Integer; Live: Byte; StartFrame : Integer; RecArrayIndex : Integer; StarType : TParticleType; Player: Cardinal): Cardinal;
+function TEffectManager.Spawn(X, Y: Real; Screen: Integer; Live: Byte;
+ StartFrame : Integer; RecArrayIndex : Integer; StarType : TParticleType;
+ Player: Cardinal; CP: integer): Cardinal;
begin
Result := Length(Particle);
SetLength(Particle, (Result + 1));
- Particle[Result] := TParticle.Create(X, Y, Screen, Live, StartFrame, RecArrayIndex, StarType, Player);
+ Particle[Result] := TParticle.Create(X, Y, Screen, Live, StartFrame, RecArrayIndex, StarType, Player, CP);
end;
// manage Sparkling of GoldenNote Bars
-procedure TEffectManager.SpawnRec();
+procedure TEffectManager.SpawnRec(Alph: TAlpha);
Var
Xkatze, Ykatze : Real;
RandomFrame : Integer;
@@ -402,11 +414,12 @@ for P:= 0 to high(RecArray) do Ykatze := RandomRange(Ceil(RecArray[P].yTop), Ceil(RecArray[P].yBottom));
RandomFrame := RandomRange(0,14);
// Spawn a GoldenNote Particle
- Spawn(Xkatze, Ykatze, RecArray[P].Screen, 16 - RandomFrame, RandomFrame, P, GoldenNote, 0);
+ Spawn(Xkatze, Ykatze, RecArray[P].Screen, 16 - RandomFrame,
+ RandomFrame, P, GoldenNote, 0, RecArray[P].CP);
inc(RecArray[P].CurrentStarCount);
end;
end;
- draw;
+ draw(Alph);
end;
// kill one particle (with given index in our particle array)
@@ -444,7 +457,7 @@ begin end;
end;
-procedure TEffectManager.SentenceChange();
+procedure TEffectManager.SentenceChange(CP: integer);
var c: Cardinal;
begin
c:=0;
@@ -486,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);
+ Spawn(Ceil(Right)+XKatze, YKatze, ScreenAct, LKatze, 0, -1, NoteHitTwinkle, 0, (Player+1) mod 2);
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);
+ Spawn(Ceil(Right)+XKatze, YKatze, ScreenAct, LKatze, 0, -1, NoteHitTwinkle, 0, (Player+1) mod 2);
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);
+ Spawn(Ceil(Right)+XKatze, YKatze, ScreenAct, LKatze, 0, -1, NoteHitTwinkle, 0, (Player+1) mod 2);
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);
+ Spawn(Ceil(Right)+XKatze, YKatze, ScreenAct, LKatze, 0, -1, NoteHitTwinkle, 0, (Player+1) mod 2);
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);
+ Spawn(Ceil(Right)+XKatze, YKatze, ScreenAct, LKatze, 0, -1, NoteHitTwinkle, 0, (Player+1) mod 2);
end;
exit; // found a matching GoldenRec, did spawning stuff... done
@@ -522,7 +535,7 @@ begin end;
end;
-procedure TEffectManager.SaveGoldenStarsRec(Xtop, Ytop, Xbottom, Ybottom: Real);
+procedure TEffectManager.SaveGoldenStarsRec(Xtop, Ytop, Xbottom, Ybottom: Real; CP: integer);
var
P : Integer; // P like used in Positions
NewIndex : Integer;
@@ -545,6 +558,7 @@ begin RecArray[NewIndex].TotalStarCount := ceil(Xbottom - Xtop) div 12 + 3;
RecArray[NewIndex].CurrentStarCount := 0;
RecArray[NewIndex].Screen := ScreenAct;
+ RecArray[NewIndex].CP := CP;
end;
procedure TEffectManager.SavePerfectNotePos(Xtop, Ytop: Real);
@@ -574,7 +588,7 @@ begin Xkatze := RandomRange(ceil(Xtop) - 5 , ceil(Xtop) + 10);
Ykatze := RandomRange(ceil(Ytop) - 5 , ceil(Ytop) + 10);
RandomFrame := RandomRange(0,14);
- Spawn(Xkatze, Ykatze, ScreenAct, 16 - RandomFrame, RandomFrame, -1, PerfectNote, 0);
+ Spawn(Xkatze, Ykatze, ScreenAct, 16 - RandomFrame, RandomFrame, -1, PerfectNote, 0, 0);
end; //for
end;
@@ -646,7 +660,7 @@ begin for I:= 0 to 80 do
begin
Life:=RandomRange(8,16);
- Spawn(RandomRange(Left,Right), RandomRange(Top,Bottom), cScreen, Life, 16-Life, -1, PerfectLineTwinkle, P);
+ Spawn(RandomRange(Left,Right), RandomRange(Top,Bottom), cScreen, Life, 16-Life, -1, PerfectLineTwinkle, P, (P+1) mod 2);
end;
end;
end;
diff --git a/Game/Code/Classes/UIni.pas b/Game/Code/Classes/UIni.pas index 85aff535..cc24e3a8 100644 --- a/Game/Code/Classes/UIni.pas +++ b/Game/Code/Classes/UIni.pas @@ -83,15 +83,9 @@ type SumPlayers: integer;
DuelRatio: integer;
- // Controller
- Joypad: integer;
-
// Soundcards
SoundCard: array[0..7, 1..2] of integer;
- // Devices
- LPT: integer;
-
procedure Load;
procedure Save;
procedure SaveNames;
@@ -183,9 +177,6 @@ const ISumPlayers: array[0..2] of string = ('Never', 'Dynamic', 'Always');
IDuelRatio: array[0..9] of string = ('normal', '10%', '20%', '30%', '40%', '50%', '60%', '70%', '80%', '90%');
- IJoypad: array[0..1] of string = ('Off', 'On');
- ILPT: array[0..2] of string = ('Off', 'LCD', 'Lights');
-
IChannel: array[0..6] of string = ('Off', '1', '2', '3', '4', '5', '6');
implementation
@@ -613,17 +604,6 @@ begin for Pet := 0 to High(IDuelRatio) do
if Tekst = IDuelRatio[Pet] then Ini.DuelRatio := Pet;
- // Joypad
- Tekst := IniFile.ReadString('Controller', 'Joypad', IJoypad[0]);
- for Pet := 0 to High(IJoypad) do
- if Tekst = IJoypad[Pet] then Ini.Joypad := Pet;
-
- // LCD
- Tekst := IniFile.ReadString('Devices', 'LPT', ILPT[0]);
- for Pet := 0 to High(ILPT) do
- if Tekst = ILPT[Pet] then Ini.LPT := Pet;
-
-
// SongPath
if (Params.SongPath <> '') then
SongPath := IncludeTrailingPathDelimiter(Params.SongPath)
@@ -851,10 +831,6 @@ begin Tekst := IDuelRatio[Ini.DuelRatio];
IniFile.WriteString('Advanced', 'DuelRatio', Tekst);
- // Joypad
- Tekst := IJoypad[Ini.Joypad];
- IniFile.WriteString('Controller', 'Joypad', Tekst);
-
IniFile.Free;
end;
end;
diff --git a/Game/Code/Classes/UJoystick.pas b/Game/Code/Classes/UJoystick.pas deleted file mode 100644 index cd9aadc5..00000000 --- a/Game/Code/Classes/UJoystick.pas +++ /dev/null @@ -1,273 +0,0 @@ -unit UJoystick;
-
-interface
-
-uses SDL;
-
-type
- TJoyButton = record
- State: integer;
- Enabled: boolean;
- Type_: byte;
- Sym: cardinal;
- end;
-
- TJoyHatState = record
- State: Boolean;
- LastTick: Cardinal;
- Enabled: boolean;
- Type_: byte;
- Sym: cardinal;
- end;
-
- TJoyUnit = record
- Button: array[0..15] of TJoyButton;
- HatState: Array[0..3] of TJoyHatState;
- end;
-
- TJoy = class
- constructor Create;
- procedure Update;
- end;
-
-var
- Joy: TJoy;
- JoyUnit: TJoyUnit;
- SDL_Joy: PSDL_Joystick;
- JoyEvent: TSDL_Event;
-
-implementation
-
-uses SysUtils, Windows, ULog;
-
-constructor TJoy.Create;
-var
- B{, N}: integer;
-begin
- //Old Corvus5 Method
- {// joystick support
- SDL_JoystickEventState(SDL_IGNORE);
- SDL_InitSubSystem(SDL_INIT_JOYSTICK);
- if SDL_NumJoysticks <> 1 then beep;
-
- SDL_Joy := SDL_JoystickOpen(0);
- if SDL_Joy = nil then beep;
-
- if SDL_JoystickNumButtons(SDL_Joy) <> 16 then beep;
-
-// SDL_JoystickEventState(SDL_ENABLE);
- // Events don't work - thay hang the whole application with SDL_JoystickEventState(SDL_ENABLE)
-
- // clear states
- for B := 0 to 15 do
- JoyUnit.Button[B].State := 1;
-
- // mapping
- JoyUnit.Button[1].Enabled := true;
- JoyUnit.Button[1].Type_ := SDL_KEYDOWN;
- JoyUnit.Button[1].Sym := SDLK_RETURN;
- JoyUnit.Button[2].Enabled := true;
- JoyUnit.Button[2].Type_ := SDL_KEYDOWN;
- JoyUnit.Button[2].Sym := SDLK_ESCAPE;
-
- JoyUnit.Button[12].Enabled := true;
- JoyUnit.Button[12].Type_ := SDL_KEYDOWN;
- JoyUnit.Button[12].Sym := SDLK_LEFT;
- JoyUnit.Button[13].Enabled := true;
- JoyUnit.Button[13].Type_ := SDL_KEYDOWN;
- JoyUnit.Button[13].Sym := SDLK_DOWN;
- JoyUnit.Button[14].Enabled := true;
- JoyUnit.Button[14].Type_ := SDL_KEYDOWN;
- JoyUnit.Button[14].Sym := SDLK_RIGHT;
- JoyUnit.Button[15].Enabled := true;
- JoyUnit.Button[15].Type_ := SDL_KEYDOWN;
- JoyUnit.Button[15].Sym := SDLK_UP;
- }
- //New Sarutas method
- SDL_JoystickEventState(SDL_IGNORE);
- SDL_InitSubSystem(SDL_INIT_JOYSTICK);
- if SDL_NumJoysticks < 1 then
- begin
- Log.LogError('No Joystick found');
- exit;
- end;
-
-
- SDL_Joy := SDL_JoystickOpen(0);
- if SDL_Joy = nil then
- begin
- Log.LogError('Could not Init Joystick');
- exit;
- end;
- //N := SDL_JoystickNumButtons(SDL_Joy);
- //if N < 6 then beep;
-
- for B := 0 to 5 do begin
- JoyUnit.Button[B].Enabled := true;
- JoyUnit.Button[B].State := 1;
- JoyUnit.Button[B].Type_ := SDL_KEYDOWN;
- end;
-
- JoyUnit.Button[0].Sym := SDLK_Return;
- JoyUnit.Button[1].Sym := SDLK_Escape;
- JoyUnit.Button[2].Sym := SDLK_M;
- JoyUnit.Button[3].Sym := SDLK_R;
-
- JoyUnit.Button[4].Sym := SDLK_RETURN;
- JoyUnit.Button[5].Sym := SDLK_ESCAPE;
-
- //Set HatState
- for B := 0 to 3 do begin
- JoyUnit.HatState[B].Enabled := true;
- JoyUnit.HatState[B].State := False;
- JoyUnit.HatState[B].Type_ := SDL_KEYDOWN;
- end;
-
- JoyUnit.HatState[0].Sym := SDLK_UP;
- JoyUnit.HatState[1].Sym := SDLK_RIGHT;
- JoyUnit.HatState[2].Sym := SDLK_DOWN;
- JoyUnit.HatState[3].Sym := SDLK_LEFT;
-end;
-
-procedure TJoy.Update;
-var
- B: integer;
- State: UInt8;
- Tick: Cardinal;
- Axes: Smallint;
-begin
- SDL_JoystickUpdate;
-
- //Manage Buttons
- for B := 0 to 15 do begin
- if (JoyUnit.Button[B].Enabled) and (JoyUnit.Button[B].State <> SDL_JoystickGetButton(SDL_Joy, B)) and (JoyUnit.Button[B].State = 0) then begin
- JoyEvent.type_ := JoyUnit.Button[B].Type_;
- JoyEvent.key.keysym.sym := JoyUnit.Button[B].Sym;
- SDL_PushEvent(@JoyEvent);
- end;
- end;
-
-
- for B := 0 to 15 do begin
- JoyUnit.Button[B].State := SDL_JoystickGetButton(SDL_Joy, B);
- end;
-
- //Get Tick
- Tick := Gettickcount;
-
- //Get CoolieHat
- if (SDL_JoystickNumHats(SDL_Joy)>=1) then
- State := SDL_JoystickGetHat(SDL_Joy, 0)
- else
- State := 0;
-
- //Get Axis
- if (SDL_JoystickNumAxes(SDL_Joy)>=2) then
- begin
- //Down - Up (X- Axis)
- Axes := SDL_JoystickGetAxis(SDL_Joy, 1);
- If Axes >= 15000 then
- State := State or SDL_HAT_Down
- Else If Axes <= -15000 then
- State := State or SDL_HAT_UP;
-
- //Left - Right (Y- Axis)
- Axes := SDL_JoystickGetAxis(SDL_Joy, 0);
- If Axes >= 15000 then
- State := State or SDL_HAT_Right
- Else If Axes <= -15000 then
- State := State or SDL_HAT_Left;
- end;
-
- //Manage Hat and joystick Events
- if (SDL_JoystickNumHats(SDL_Joy)>=1) OR (SDL_JoystickNumAxes(SDL_Joy)>=2) then
- begin
-
- //Up Button
- If (JoyUnit.HatState[0].Enabled) and ((SDL_HAT_UP AND State) = SDL_HAT_UP) then
- begin //IF Button is newly Pressed or if he is Pressed longer than 500 msecs
- if (JoyUnit.HatState[0].State = False) OR (JoyUnit.HatState[0].Lasttick < Tick) then
- begin
- //Set Tick and State
- if JoyUnit.HatState[0].State then
- JoyUnit.HatState[0].Lasttick := Tick + 200
- else
- JoyUnit.HatState[0].Lasttick := Tick + 500;
-
- JoyUnit.HatState[0].State := True;
-
- JoyEvent.type_ := JoyUnit.HatState[0].Type_;
- JoyEvent.key.keysym.sym := JoyUnit.HatState[0].Sym;
- SDL_PushEvent(@JoyEvent);
- end;
- end
- else
- JoyUnit.HatState[0].State := False;
-
- //Right Button
- If (JoyUnit.HatState[1].Enabled) and ((SDL_HAT_RIGHT AND State) = SDL_HAT_RIGHT) then
- begin //IF Button is newly Pressed or if he is Pressed longer than 500 msecs
- if (JoyUnit.HatState[1].State = False) OR (JoyUnit.HatState[1].Lasttick < Tick) then
- begin
- //Set Tick and State
- if JoyUnit.HatState[1].State then
- JoyUnit.HatState[1].Lasttick := Tick + 200
- else
- JoyUnit.HatState[1].Lasttick := Tick + 500;
-
- JoyUnit.HatState[1].State := True;
-
- JoyEvent.type_ := JoyUnit.HatState[1].Type_;
- JoyEvent.key.keysym.sym := JoyUnit.HatState[1].Sym;
- SDL_PushEvent(@JoyEvent);
- end;
- end
- else
- JoyUnit.HatState[1].State := False;
-
- //Down button
- If (JoyUnit.HatState[2].Enabled) and ((SDL_HAT_DOWN AND State) = SDL_HAT_DOWN) then
- begin //IF Button is newly Pressed or if he is Pressed longer than 230 msecs
- if (JoyUnit.HatState[2].State = False) OR (JoyUnit.HatState[2].Lasttick < Tick) then
- begin
- //Set Tick and State
- if JoyUnit.HatState[2].State then
- JoyUnit.HatState[2].Lasttick := Tick + 200
- else
- JoyUnit.HatState[2].Lasttick := Tick + 500;
-
- JoyUnit.HatState[2].State := True;
-
- JoyEvent.type_ := JoyUnit.HatState[2].Type_;
- JoyEvent.key.keysym.sym := JoyUnit.HatState[2].Sym;
- SDL_PushEvent(@JoyEvent);
- end;
- end
- else
- JoyUnit.HatState[2].State := False;
-
- //Left Button
- If (JoyUnit.HatState[3].Enabled) and ((SDL_HAT_LEFT AND State) = SDL_HAT_LEFT) then
- begin //IF Button is newly Pressed or if he is Pressed longer than 230 msecs
- if (JoyUnit.HatState[3].State = False) OR (JoyUnit.HatState[3].Lasttick < Tick) then
- begin
- //Set Tick and State
- if JoyUnit.HatState[3].State then
- JoyUnit.HatState[3].Lasttick := Tick + 200
- else
- JoyUnit.HatState[3].Lasttick := Tick + 500;
-
- JoyUnit.HatState[3].State := True;
-
- JoyEvent.type_ := JoyUnit.HatState[3].Type_;
- JoyEvent.key.keysym.sym := JoyUnit.HatState[3].Sym;
- SDL_PushEvent(@JoyEvent);
- end;
- end
- else
- JoyUnit.HatState[3].State := False;
- end;
-
-end;
-
-end.
diff --git a/Game/Code/Classes/ULCD.pas b/Game/Code/Classes/ULCD.pas deleted file mode 100644 index abdf3584..00000000 --- a/Game/Code/Classes/ULCD.pas +++ /dev/null @@ -1,289 +0,0 @@ -unit ULCD;
-
-interface
-
-type
- TLCD = class
- private
- Enabled: boolean;
- Text: array[1..6] of string;
- StartPos: integer;
- LineBR: integer;
- Position: integer;
- procedure WriteCommand(B: byte);
- procedure WriteData(B: byte);
- procedure WriteString(S: string);
- public
- HalfInterface: boolean;
- constructor Create;
- procedure Enable;
- procedure Clear;
- procedure WriteText(Line: integer; S: string);
- procedure MoveCursor(Line, Pos: integer);
- procedure ShowCursor;
- procedure HideCursor;
-
- // for 2x16
- procedure AddTextBR(S: string);
- procedure MoveCursorBR(Pos: integer);
- procedure ScrollUpBR;
- procedure AddTextArray(Line:integer; S: string);
- end;
-
-var
- LCD: TLCD;
-
-const
- Data = $378; // domyœlny adres portu
- Status = Data + 1;
- Control = Data + 2;
-
-implementation
-
-uses
- SysUtils,
- zlportio,
- UTime;
-
-procedure TLCD.WriteCommand(B: Byte);
-// Wysylanie komend sterujacych
-begin
- if not HalfInterface then begin
- zlioportwrite(Control, 0, $02);
- zlioportwrite(Data, 0, B);
- zlioportwrite(Control, 0, $03);
- end else begin
- zlioportwrite(Control, 0, $02);
- zlioportwrite(Data, 0, B and $F0);
- zlioportwrite(Control, 0, $03);
-
- TimeSleep(0.1);
-
- zlioportwrite(Control, 0, $02);
- zlioportwrite(Data, 0, (B * 16) and $F0);
- zlioportwrite(Control, 0, $03);
- end;
-
- if (B=1) or (B=2) then
- Sleep(2)
- else
- TimeSleep(0.1);
-end;
-
-procedure TLCD.WriteData(B: Byte);
-// Wysylanie danych
-begin
- if not HalfInterface then begin
- zlioportwrite(Control, 0, $06);
- zlioportwrite(Data, 0, B);
- zlioportwrite(Control, 0, $07);
- end else begin
- zlioportwrite(Control, 0, $06);
- zlioportwrite(Data, 0, B and $F0);
- zlioportwrite(Control, 0, $07);
-
- TimeSleep(0.1);
-
- zlioportwrite(Control, 0, $06);
- zlioportwrite(Data, 0, (B * 16) and $F0);
- zlioportwrite(Control, 0, $07);
- end;
-
- TimeSleep(0.1);
- Inc(Position);
-end;
-
-procedure TLCD.WriteString(S: string);
-// Wysylanie slow
-var
- I: integer;
-begin
- for I := 1 to Length(S) do
- WriteData(Ord(S[I]));
-end;
-
-constructor TLCD.Create;
-begin
-//
-end;
-
-procedure TLCD.Enable;
-var
- A: byte;
- B: byte;
-begin
- Enabled := true;
- if not HalfInterface then
- WriteCommand($38)
- else begin
- WriteCommand($33);
- WriteCommand($32);
- WriteCommand($28);
- end;
-
-// WriteCommand($06);
-// WriteCommand($0C);
-// sleep(10);
-end;
-
-procedure TLCD.Clear;
-begin
- if Enabled then begin
- WriteCommand(1);
- WriteCommand(2);
- Text[1] := '';
- Text[2] := '';
- Text[3] := '';
- Text[4] := '';
- Text[5] := '';
- Text[6] := '';
- StartPos := 1;
- LineBR := 1;
- end;
-end;
-
-procedure TLCD.WriteText(Line: integer; S: string);
-begin
- if Enabled then begin
- if Line <= 2 then begin
- MoveCursor(Line, 1);
- WriteString(S);
- end;
-
- Text[Line] := '';
- AddTextArray(Line, S);
- end;
-end;
-
-procedure TLCD.MoveCursor(Line, Pos: integer);
-var
- I: integer;
-begin
- if Enabled then begin
- Pos := Pos + (Line-1) * 40;
-
- if Position > Pos then begin
- WriteCommand(2);
- for I := 1 to Pos-1 do
- WriteCommand(20);
- end;
-
- if Position < Pos then
- for I := 1 to Pos - Position do
- WriteCommand(20);
-
- Position := Pos;
- end;
-end;
-
-procedure TLCD.ShowCursor;
-begin
- if Enabled then begin
- WriteCommand(14);
- end;
-end;
-
-procedure TLCD.HideCursor;
-begin
- if Enabled then begin
- WriteCommand(12);
- end;
-end;
-
-procedure TLCD.AddTextBR(S: string);
-var
- Word: string;
- W: integer;
- P: integer;
- L: integer;
-begin
- if Enabled then begin
- if LineBR <= 6 then begin
- L := LineBR;
- P := Pos(' ', S);
-
- if L <= 2 then
- MoveCursor(L, 1);
-
- while (L <= 6) and (P > 0) do begin
- Word := Copy(S, 1, P);
- if (Length(Text[L]) + Length(Word)-1) > 16 then begin
- L := L + 1;
- if L <= 2 then
- MoveCursor(L, 1);
- end;
-
- if L <= 6 then begin
- if L <= 2 then
- WriteString(Word);
- AddTextArray(L, Word);
- end;
-
- Delete(S, 1, P);
- P := Pos(' ', S)
- end;
-
- LineBR := L + 1;
- end;
- end;
-end;
-
-procedure TLCD.MoveCursorBR(Pos: integer);
-var
- I: integer;
- L: integer;
-begin
- if Enabled then begin
- Pos := Pos - (StartPos-1);
- if Pos <= Length(Text[1]) then
- MoveCursor(1, Pos);
-
- if Pos > Length(Text[1]) then begin
- // bez zawijania
-// Pos := Pos - Length(Text[1]);
-// MoveCursor(2, Pos);
-
- // z zawijaniem
- Pos := Pos - Length(Text[1]);
- ScrollUpBR;
- MoveCursor(1, Pos);
- end;
- end;
-end;
-
-procedure TLCD.ScrollUpBR;
-var
- T: array[1..5] of string;
- SP: integer;
- LBR: integer;
-begin
- if Enabled then begin
- T[1] := Text[2];
- T[2] := Text[3];
- T[3] := Text[4];
- T[4] := Text[5];
- T[5] := Text[6];
- SP := StartPos + Length(Text[1]);
- LBR := LineBR;
-
- Clear;
-
- StartPos := SP;
- WriteText(1, T[1]);
- WriteText(2, T[2]);
- WriteText(3, T[3]);
- WriteText(4, T[4]);
- WriteText(5, T[5]);
- LineBR := LBR-1;
- end;
-end;
-
-procedure TLCD.AddTextArray(Line: integer; S: string);
-begin
- if Enabled then begin
- Text[Line] := Text[Line] + S;
- end;
-end;
-
-end.
-
diff --git a/Game/Code/Classes/ULight.pas b/Game/Code/Classes/ULight.pas deleted file mode 100644 index 967d2ea1..00000000 --- a/Game/Code/Classes/ULight.pas +++ /dev/null @@ -1,116 +0,0 @@ -unit ULight;
-interface
-
-type
- TLight = class
- private
- Enabled: boolean;
- Light: array[0..7] of boolean;
- LightTime: array[0..7] of real; // time to stop, need to call update to change state
- LastTime: real;
- public
- constructor Create;
- procedure Enable;
- procedure SetState(State: integer);
- procedure AutoSetState;
- procedure TurnOn;
- procedure TurnOff;
- procedure LightOne(Number: integer; Time: real);
- procedure Refresh;
- end;
-
-var
- Light: TLight;
-
-const
- Data = $378; // default port address
- Status = Data + 1;
- Control = Data + 2;
-
-implementation
-
-uses
- SysUtils, zlportio, UTime;
-
-constructor TLight.Create;
-begin
- Enabled := false;
-end;
-
-procedure TLight.Enable;
-begin
- Enabled := true;
- LastTime := GetTime;
-end;
-
-procedure TLight.SetState(State: integer);
-begin
- if Enabled then
- PortWriteB($378, State);
-end;
-
-procedure TLight.AutoSetState;
-var
- State: integer;
-begin
- if Enabled then begin
- State := 0;
- if Light[0] then State := State + 2;
- if Light[1] then State := State + 1;
- // etc
- SetState(State);
- end;
-end;
-
-procedure TLight.TurnOn;
-begin
- if Enabled then
- SetState(3);
-end;
-
-procedure TLight.TurnOff;
-begin
- if Enabled then
- SetState(0);
-end;
-
-procedure TLight.LightOne(Number: integer; Time: real);
-begin
- if Enabled then begin
- if Light[Number] = false then begin
- Light[Number] := true;
- AutoSetState;
- end;
-
- LightTime[Number] := GetTime + Time/1000; // [s]
- end;
-end;
-
-procedure TLight.Refresh;
-var
- Time: real;
- TimeSkip: real;
- L: integer;
-begin
- if Enabled then begin
- Time := GetTime;
- TimeSkip := Time - LastTime;
- for L := 0 to 7 do begin
- if Light[L] = true then begin
- if LightTime[L] > Time then begin
- // jest jeszcze zapas - bez zmian
- //LightTime[L] := LightTime[L] - TimeSkip;
- end else begin
- // czas minal
- Light[L] := false;
- end;
- end;
- end;
- LastTime := Time;
- AutoSetState;
- end;
-end;
-
-end.
-
-
diff --git a/Game/Code/Classes/ULyrics.pas b/Game/Code/Classes/ULyrics.pas index 08563d66..c6a5e635 100644 --- a/Game/Code/Classes/ULyrics.pas +++ b/Game/Code/Classes/ULyrics.pas @@ -31,6 +31,7 @@ type StyleI: integer; // 0 - one selection, 1 - long selection, 2 - one selection with fade to normal text, 3 - long selection with fade with color from left
FontStyleI: integer; // font number
Word: array of TWord;
+ Alpha: real;
procedure SetX(Value: real);
procedure SetY(Value: real);
function GetClientX: real;
@@ -76,7 +77,9 @@ type function SelectedLength: integer; // LCD
procedure Clear;
- procedure Draw;
+ procedure Draw();
+ procedure SetAlpha(alpha: real);
+ function GetAlpha: real;
end;
@@ -86,6 +89,22 @@ type implementation
uses TextGL, UGraphic, UDrawTexture;
+procedure TLyric.SetAlpha(alpha: real);
+begin
+ Self.Alpha := alpha;
+
+ if (Self.Alpha>1) then
+ Self.Alpha := 1;
+
+ if (Self.Alpha<0) then
+ Self.Alpha := 0;
+end;
+
+function TLyric.GetAlpha: real;
+begin
+ Result := Alpha;
+end;
+
procedure TLyric.SetX(Value: real);
begin
XR := Value;
@@ -250,6 +269,7 @@ begin SetLength(Word, 0);
Text := '';
SelectedI := -1;
+ Alpha := 1;
end;
procedure TLyric.Refresh;
@@ -268,10 +288,11 @@ begin end;
end;
-procedure TLyric.Draw;
+procedure TLyric.Draw();
var
W: integer;
begin
+ glEnable(GL_BLEND);
case StyleI of
0:
begin
@@ -317,6 +338,7 @@ begin end;
end;
end; // case
+ glDisable(GL_BLEND);
end;
procedure TLyric.DrawNormal(W: integer);
@@ -325,7 +347,7 @@ begin SetFontPos(Word[W].X+ 10*ScreenX, Word[W].Y);
SetFontSize(Word[W].Size);
SetFontItalic(Word[W].Italic);
- glColor3f(Word[W].ColR, Word[W].ColG, Word[W].ColB);
+ glColor4f(Word[W].ColR, Word[W].ColG, Word[W].ColB, Alpha);
glPrint(pchar(Word[W].Text));
end;
@@ -339,11 +361,10 @@ begin SetFontPos(Word[W].X, Word[W].Y);
SetFontSize(Word[W].Size);
SetFontItalic(Word[W].Italic);
-
if D = 0 then
- glColor3f(ColR, ColG, ColB)
+ glColor4f(ColR, ColG, ColB, Alpha)
else
- glColor3f(ColSR, ColSG, ColSB);
+ glColor4f(ColSR, ColSG, ColSB, Alpha);
glPrint(pchar(Word[W].Text));
end;
@@ -358,7 +379,7 @@ begin SetFontPos(Word[W].X - D * Word[W].Width * (Word[W].Scale - 1) / 2 + (D+1)*10*ScreenX, Word[W].Y - D * 1.5 * Word[W].Size *(Word[W].Scale - 1));
SetFontSize(Word[W].Size + D * (Word[W].Size * Word[W].Scale - Word[W].Size));
SetFontItalic(Word[W].Italic);
- glColor3f(Word[W].ColR, Word[W].ColG, Word[W].ColB);
+ glColor4f(Word[W].ColR, Word[W].ColG, Word[W].ColB, Alpha);
glPrint(pchar(Word[W].Text))
end;
@@ -371,8 +392,8 @@ begin SetFontPos(Word[W].X, Word[W].Y);
SetFontSize(Word[W].Size);
SetFontItalic(Word[W].Italic);
- glColor3f(Word[W].ColR, Word[W].ColG, Word[W].ColB);
- glPrintDone(pchar(Word[W].Text), D, ColR, ColG, ColB);
+ glColor4f(Word[W].ColR, Word[W].ColG, Word[W].ColB, Alpha);
+ glPrintDone(pchar(Word[W].Text), D, ColR, ColG, ColB, Alpha);
end;
function TLyric.SelectedLetter; // LCD
diff --git a/Game/Code/Classes/UMain.pas b/Game/Code/Classes/UMain.pas index 04c19a47..c2497f32 100644 --- a/Game/Code/Classes/UMain.pas +++ b/Game/Code/Classes/UMain.pas @@ -112,7 +112,7 @@ function GetTimeFromBeat(Beat: integer): real; procedure ClearScores(PlayerNum: integer);
implementation
-uses USongs, UJoystick, math, UCommandLine, UVideo;
+uses USongs, math, UCommandLine, UVideo;
procedure MainLoop;
var
@@ -121,10 +121,6 @@ begin SDL_EnableKeyRepeat(125, 125);
While not Done do
Begin
- // joypad
- if (Ini.Joypad = 1) OR (Params.Joypad) then
- Joy.Update;
-
// keyboard events
CheckEvents;
@@ -395,7 +391,10 @@ begin for Pet := 0 to Czesci[CP].High do
begin
if Czas.AktBeat >= Czesci[CP].Czesc[Pet].Start then
- Czesci[CP].Akt := Pet;
+ begin
+ if (GetTimeFromBeat(Czesci[CP].Czesc[Pet].StartNote) <= Czas.Teraz+10) then
+ Czesci[CP].Akt := Pet;
+ end;
end;
// czysczenie nut gracza, gdy to jest nowa plansza
@@ -479,8 +478,7 @@ begin end;
//On Sentence Change...
- if(CP=0) then
- Sender.onSentenceChange(Czesci[CP].Akt);
+ Sender.onSentenceChange(CP, Czesci[CP].Akt);
end;
procedure NewBeat(CP: integer; Sender: TScreenSing);
@@ -514,19 +512,6 @@ begin if (Ini.BeatClick = 1) and ((Czas.AktBeatC + Czesci[CP].Resolution + Czesci[CP].NotesGAP) mod Czesci[CP].Resolution = 0) then
Music.PlayClick;
- // debug system on LPT
- {if ((Czas.AktBeatC + Czesci[CP].Resolution + Czesci[CP].NotesGAP) mod Czesci[CP].Resolution = 0) then
- begin
- //LPT_1 := 0;
-// Light.LightOne(0, 150);
-
-
-{ if ((Czas.AktBeatC + Czesci[0].Resolution + Czesci[0].NotesGAP) mod (Czesci[0].Resolution * 2) = 0) then
- Light.LightOne(0, 150)
- else
- Light.LightOne(1, 150)}
- //end;
-
if (Length(Czesci[CP].Czesc[Czesci[CP].Akt].Nuta)=0) then
Exit;
diff --git a/Game/Code/Classes/UMusic.pas b/Game/Code/Classes/UMusic.pas index 7fae3017..a5355bbe 100644 --- a/Game/Code/Classes/UMusic.pas +++ b/Game/Code/Classes/UMusic.pas @@ -245,7 +245,7 @@ begin while (i < length) do
begin
- dmch := round((((0 - lch^) + (rch^)) div 2)*1.5);
+ dmch := round((((0 - lch^) + (rch^)) / 2)*1.5);
lch^ := dmch;
rch^ := dmch;
@@ -479,9 +479,9 @@ begin //Old Sets Wave Volume
//BASS_SetVolume(Volume);
//New: Sets Volume only for this Application
- BASS_SetConfig(BASS_CONFIG_GVOL_SAMPLE, Volume);
- BASS_SetConfig(BASS_CONFIG_GVOL_STREAM, Volume);
- BASS_SetConfig(BASS_CONFIG_GVOL_MUSIC, Volume);
+ BASS_SetConfig(BASS_CONFIG_GVOL_SAMPLE, Volume*100);
+ BASS_SetConfig(BASS_CONFIG_GVOL_STREAM, Volume*100);
+ BASS_SetConfig(BASS_CONFIG_GVOL_MUSIC, Volume*100);
end;
procedure TMusic.SetMusicVolume(Volume: Integer);
@@ -491,10 +491,10 @@ begin Volume := 100;
//Set MP3 Volume
- BASS_ChannelSetAttributes (Bass, -1, Volume, -101);
+ BASS_ChannelSetAttribute(Bass, BASS_ATTRIB_VOL, Volume/100);
//Set Applause Volume
- BASS_ChannelSetAttributes (BassApplause, -1, Volume, -101);
+ BASS_ChannelSetAttribute(BassApplause, BASS_ATTRIB_VOL, Volume/100);
end;
procedure TMusic.Fade(InitVolume, TargetVolume: Integer; FadeTime: real);
@@ -507,9 +507,9 @@ begin else if TargetVolume<0 then
TargetVolume := 0;
- BASS_ChannelSetAttributes (Bass, -1, InitVolume, -101);
+ BASS_ChannelSetAttribute(Bass, BASS_ATTRIB_VOL, InitVolume/100);
time := round(FadeTime*1000);
- BASS_ChannelSlideAttributes (Bass, -1, TargetVolume, -101, time);
+ BASS_ChannelSlideAttribute(Bass, BASS_ATTRIB_VOL, TargetVolume/100, time);
end;
procedure TMusic.FadeStop(FadeTime: real);
@@ -517,7 +517,7 @@ var time: dword;
begin
time := round(FadeTime*1000);
- BASS_ChannelSlideAttributes (Bass, -1, -2, -101, time); //fade out and stop
+ BASS_ChannelSlideAttribute(Bass, BASS_ATTRIB_VOL, -1, time); //fade out and stop
end;
procedure TMusic.SetLoop(Enabled: boolean);
@@ -560,7 +560,7 @@ begin // if Loaded then begin
// MediaPlayer.StartPos := Round(Time);
bytes := BASS_ChannelSeconds2Bytes(Bass, Time);
- BASS_ChannelSetPosition(Bass, bytes);
+ BASS_ChannelSetPosition(Bass, bytes, BASS_POS_BYTE);
// end;
end;
@@ -603,7 +603,7 @@ var begin
//Result := 60;
- bytes := BASS_ChannelGetLength( Bass );
+ bytes := BASS_ChannelGetLength(Bass, BASS_POS_BYTE);
Result := BASS_ChannelBytes2Seconds(Bass, bytes);
{ if Assigned(MediaPlayer) then begin
@@ -618,7 +618,7 @@ var bytes: integer;
begin
//Result := 0;//MediaPlayer.Position / 1000;
- bytes := BASS_ChannelGetPosition(BASS);
+ bytes := BASS_ChannelGetPosition(BASS, BASS_POS_BYTE);
Result := BASS_ChannelBytes2Seconds(BASS, bytes);
end;
@@ -836,6 +836,7 @@ procedure TMusic.CaptureCard(RecordI, PlayerLeft, PlayerRight: byte); var
Error: integer;
ErrorMsg: string;
+ Player: integer;
begin
if not BASS_RecordInit(RecordI) then begin
Error := BASS_ErrorGetCode;
@@ -855,10 +856,11 @@ begin Log.LogError('Music -> CaptureCard: Error initializing record: ' + ErrorMsg);
- end else begin
-
+ end else
+ begin
+ Player := PlayerLeft + PlayerRight*256;
//SoundCard[RecordI].BassRecordStream := BASS_RecordStart(44100, 2, MakeLong(0, 20) , @GetMicrophone, PlayerLeft + PlayerRight*256);
- Recording.SoundCard[RecordI].BassRecordStream := BASS_RecordStart(44100, 2, MakeLong(0, 20) , @GetMicrophone, PlayerLeft + PlayerRight*256);
+ Recording.SoundCard[RecordI].BassRecordStream := BASS_RecordStart(44100, 2, MakeLong(0, 20) , @GetMicrophone, Pointer(Player));
{if SoundCard[RecordI].BassRecordStream = 0 then begin
Error := BASS_ErrorGetCode;
diff --git a/Game/Code/Classes/URecord.pas b/Game/Code/Classes/URecord.pas index c478aebc..03cf137e 100644 --- a/Game/Code/Classes/URecord.pas +++ b/Game/Code/Classes/URecord.pas @@ -276,12 +276,15 @@ end; constructor TRecord.Create;
var
+ Info: BASS_DEVICEINFO;
SC: integer; // soundcard
SCI: integer; // soundcard input
Descr: string;
InputName: string;
Flags: integer;
No: integer;
+ Proceed: boolean;
+
function isDuplicate(Desc: String): Boolean;
var
I: Integer;
@@ -302,12 +305,14 @@ var begin
// checks for recording devices and puts them into array;
SetLength(SoundCard, 0);
-
+ BASS_RecordFree;
SC := 0;
- Descr := BASS_RecordGetDeviceDescription(SC);
-
- while (Descr <> '') do begin
+ //Descr := BASS_RecordGetDeviceDescription(SC);
+ Proceed := BASS_RecordGetDeviceInfo(SC, &Info);
+ Descr := Info.name;
+ while {(Descr <> '')} Proceed and not (info.flags and BASS_DEVICE_ENABLED=0) do
+ begin
//If there is another SoundCard with the Same ID, Search an available Name
if (IsDuplicate(Descr)) then
begin
@@ -327,7 +332,7 @@ begin // mic[device] := -1; // default to no change
SCI := 0;
BASS_RecordInit(SC);
- Flags := BASS_RecordGetInput(SCI);
+ Flags := BASS_RecordGetInput(SCI, PSingle(nil)^);
InputName := BASS_RecordGetInputName(SCI);
// Log.LogError('Input #' + IntToStr(SCI) + ' (' + IntToStr(Flags) + '): ' + InputName);
@@ -335,8 +340,10 @@ begin SoundCard[SC].Input[SCI].Name := InputName;
// process each input
- while (Flags <> -1) do begin
- if SCI >= 1 then begin
+ while (Flags <> -1) and (Flags and BASS_INPUT_OFF<>0) do
+ begin
+ if SCI >= 1 then
+ begin
SetLength(SoundCard[SC].Input, SCI+1);
InputName := BASS_RecordGetInputName(SCI);
SoundCard[SC].Input[SCI].Name := InputName;
@@ -348,7 +355,7 @@ begin end;}
Inc(SCI);
- Flags := BASS_RecordGetInput(SCI);
+ Flags := BASS_RecordGetInput(SCI, PSingle(nil)^);
end;
{ if mic[device] <> -1 then begin
@@ -363,7 +370,9 @@ begin BASS_RecordFree;
Inc(SC);
- Descr := BASS_RecordGetDeviceDescription(SC);
+ //Descr := BASS_RecordGetDeviceDescription(SC);
+ Proceed := BASS_RecordGetDeviceInfo(SC, &Info);
+ Descr := Info.name;
end; // while
end;
end.
diff --git a/Game/Code/Classes/UThemes.pas b/Game/Code/Classes/UThemes.pas index 36ac18b4..12fd5d12 100644 --- a/Game/Code/Classes/UThemes.pas +++ b/Game/Code/Classes/UThemes.pas @@ -338,7 +338,8 @@ type StaticSongName : TThemeStatic;
TextSongName : TThemeText;
- StaticLyricDuetBar : TThemeStatic;
+ StaticLyricBar : TThemeStatic;
+ StaticLyricDuetBar: TThemeStatic;
//TimeBar mod
StaticTimeProgress: TThemeStatic;
@@ -1189,6 +1190,7 @@ begin ThemeLoadStatic(Sing.StaticSongName, 'SingSongNameStatic');
ThemeLoadText(Sing.TextSongName, 'SingSongNameText');
+ ThemeLoadStatic(Sing.StaticLyricBar, 'SingStaticLyricBar');
ThemeLoadStatic(Sing.StaticLyricDuetBar, 'SingStaticLyricDuetBar');
//TimeBar mod
diff --git a/Game/Code/Classes/UVideo.pas b/Game/Code/Classes/UVideo.pas index e59e4179..7342314c 100644 --- a/Game/Code/Classes/UVideo.pas +++ b/Game/Code/Classes/UVideo.pas @@ -34,7 +34,8 @@ uses SDL, dialogs, {$endif} {$ENDIF} - UIni; + UIni, + UTime; type TAspectCorrection = (acoStretch, acoCrop, acoLetterBox); //from 1.1 @@ -64,7 +65,9 @@ procedure GetVideoRect(var ScreenRect, TexRect: TRectCoords; Window: TRectCoords procedure SetAspectCorrection(aspect: TAspectCorrection); procedure ResetAspectCorrection; - +Const + MIN_FPS = 40; + MAX_FPS = 55; var VideoOpened: Boolean; @@ -256,7 +259,7 @@ begin glBindBuffer(GL_PIXEL_UNPACK_BUFFER_ARB, 0);
end; - mmfps := 50;
+ mmfps := (MAX_FPS-MIN_FPS)/2;
end; procedure acClose; @@ -388,13 +391,16 @@ begin if Ini.Debug = 1 then begin //frame decode debug display - GoldenRec.Spawn(200,85,1,16,0,-1,ColoredStar,$ffff00); + GoldenRec.Spawn(200,85,1,16,0,-1,ColoredStar,$ffff00,0); end; end; end; procedure acGetFrame(Time: Extended); +Const + MAX = 3000; + var FrameFinished: Integer; errnum: Integer; @@ -412,6 +418,36 @@ const begin if not VideoOpened then Exit; if VideoPaused then Exit; + + mmfps := (Display.mFPS+mmfps)/2; + if(Ini.PerformanceMode=1) then + begin + if (mmfps<MIN_FPS) then + begin + if(SkipLines<3) and (Counter<MAX) then
+ Counter := Counter + round(TimeSkip*1000)
+ else if (SkipLines<3) and (Counter>=MAX) then
+ begin
+ Inc(SkipLines);
+ mmfps:=(MAX_FPS-MIN_FPS)/2;
+ Counter := 0;
+ end;
+ end else if (mmfps>MAX_FPS) then + begin + if(SkipLines>0) and (Counter<MAX) then
+ Counter := Counter + round(TimeSkip*1000)
+ else if (SkipLines>0) and (Counter>=MAX) then
+ begin
+ Dec(SkipLines);
+ LastSkipLines := SkipLines;
+ Counter := 0;
+ end;
+ end else Counter := 0; + end; + + if (Counter>MAX) then + Counter := MAX; + if (NegativeSkipTime < 0)and(Time+NegativeSkipTime>=0) then NegativeSkipTime:=0; myTime:=Time+VideoSkipTime; @@ -429,7 +465,7 @@ begin if Ini.Debug = 1 then begin // frame delay debug display - GoldenRec.Spawn(200,65,1,16,0,-1,ColoredStar,$00ff00); + GoldenRec.Spawn(200,65,1,16,0,-1,ColoredStar,$00ff00,0); end; Exit;// we don't need a new frame now end; @@ -438,7 +474,7 @@ begin if Ini.Debug = 1 then begin //frame drop debug display - GoldenRec.Spawn(200,105,1,16,0,-1,ColoredStar,$ff0000); + GoldenRec.Spawn(200,105,1,16,0,-1,ColoredStar,$ff0000,0); end; DropFrame:=True; @@ -501,32 +537,6 @@ begin errnum:=1; //TODO!! if errnum >=0 then begin - mmfps := (Display.mFPS+mmfps)/2; - if(Ini.PerformanceMode=1) then - begin - if (mmfps<45) then - begin - if(SkipLines<3) and (Counter<100) then
- Counter := round(Counter+70/mmfps)
- else if (SkipLines<3) and (Counter>=100) then
- begin
- Inc(SkipLines);
- mmfps:=50;
- Counter := 0;
- end;
- end else if (mmfps>75) then - begin - if(SkipLines>0) and (Counter<=100) then
- Counter := round(Counter+70/mmfps)
- else if (SkipLines>0) and (Counter>=100) then
- begin
- Dec(SkipLines);
- LastSkipLines := SkipLines;
- Counter := 0;
- end;
- end else Counter := 0; - end; - if(not pbo_supported) then begin FrameDataPtr:=Pointer(videodecoder^.buffer); @@ -614,7 +624,7 @@ begin if Ini.Debug = 1 then begin //frame decode debug display - GoldenRec.Spawn(200,85,1,16,0,-1,ColoredStar,$ffff00); + GoldenRec.Spawn(200,85,1,16,0,-1,ColoredStar,$ffff00,0); end; end; @@ -916,8 +926,8 @@ begin glColor4f(0, 0, 0, 0.2); glbegin(gl_quads); glVertex2f(0, 50); - glVertex2f(0, 160); - glVertex2f(250, 160); + glVertex2f(0, 170); + glVertex2f(250, 170); glVertex2f(250, 50); glEnd; @@ -946,6 +956,9 @@ begin SetFontPos (5, 125); glPrint(PChar('skipL: '+inttostr(SkipLines))); + + SetFontPos (5, 140); + glPrint(PChar('Counter: '+inttostr(Counter))); end; end; diff --git a/Game/Code/SMpeg/USmpeg.pas b/Game/Code/SMpeg/USmpeg.pas deleted file mode 100644 index ed7e194a..00000000 --- a/Game/Code/SMpeg/USmpeg.pas +++ /dev/null @@ -1,307 +0,0 @@ -unit USmpeg;
-
-interface
-uses SDL,
- smpeg,
- gl,
- glu,
- glext,
- SysUtils,
- UIni;
-
-procedure OpenSmpeg(FileName: string);
-procedure SkipSmpeg(Time: single);
-procedure PlaySmpeg;
-procedure PauseSmpeg; //PauseMod
-procedure UpdateSmpeg;
-procedure CloseSmpeg;
-function glmovie_init(Width : GLuint; Height : GLuint ) : GLenum;
-procedure glmpeg_update(surface: PSDL_Surface; x: Sint32; y: Sint32; w: Uint32; h: Uint32); cdecl;
-procedure DrawSmpeg(frame: PGLubyte);
-procedure glmovie_resize( width : GLuint; height : GLuint );
-procedure glmovie_quit;
-
-var
- mpeg: PSMPEG;
- mpeg_info: TSMPEG_Info;
- surface: PSDL_Surface;
-
-type
- { Some data is redundant at this stage. }
- PGLMovieTexture = ^TGLMovieTexture;
- TGLMovieTexture = record
- id : GLuint; (* OpenGL texture id. *)
- poly_width : GLuint; (* Quad width for tile. *)
- poly_height : GLuint; (* Quad height for tile. *)
- movie_width : GLuint; (* Width of movie inside tile. *)
- movie_height : GLuint; (* Height of movie inside tile. *)
- skip_rows : GLuint; (* Number of rows of movie to skip *)
- skip_pixels : GLuint; (* Number of columns of movie to skip *)
- row : GLuint; (* Row number of tile in scheme. *)
- col : GLuint; (* Column number of tile in scheme. *)
- end;
-
-type
- TGLuintArray = array of GLuint;
- PGLuintArray = ^TGLuintArray;
- TGLMovieTextureArray = array of TGLMovieTexture;
- PGLMovieTextureArray = ^TGLMovieTextureArray;
-
-var
- (* Our evil maximum texture size. Boo 3Dfxnot *)
- texture_size : GLuint = 1024;//512;
- texture_ids : GLuint;
- textures: TGLMovieTexture;
- tiled_width : GLuint = 0;
- tiled_height : GLuint = 0;
- movie_width : GLuint = 0;
- movie_height : GLuint = 0;
-
-implementation
-
-procedure OpenSmpeg(FileName: string);
-begin
- mpeg := SMPEG_new(PChar(FileName), @mpeg_info, 0); // audio
- if ( mpeg = nil ) then begin
- SDL_Quit;
- Exit;
- end;
-
-// SMPEG_setvolume(mpeg, 50);
- SMPEG_enableaudio(mpeg, 0);
-
- (* Everything needs to be in RGB for GL, but needs to be 32-bit for SMPEG. *)
- surface := SDL_AllocSurface( SDL_SWSURFACE,
- mpeg_info.width,
- mpeg_info.height,
- 32,
- $000000FF,
- $0000FF00,
- $00FF0000,
- $FF000000 );
-
- if ( surface = nil ) then begin
- SDL_Quit;
- Exit;
- end;
-
- (* *Initialize* with mpeg size. *)
- if (glmovie_init( mpeg_info.width, mpeg_info.height ) <> GL_NO_ERROR ) then begin
- SDL_Quit;
- Exit;
- end;
-
- SMPEG_setdisplay(mpeg, surface, nil, @glmpeg_update);
-end;
-
-procedure SkipSmpeg(Time: single);
-begin
- SMPEG_skip(mpeg, Time);
-end;
-
-procedure PlaySmpeg;
-begin
- SMPEG_play(mpeg);
-end;
-
-//Pause Mod
-procedure PauseSmpeg;
-begin
- SMPEG_pause(mpeg);
-end;
-
-procedure UpdateSmpeg;
-begin
-// glmpeg_update(surface,0,0,0,0);
- DrawSmpeg( PGLubyte( surface.pixels ) );
-end;
-
-procedure CloseSmpeg;
-begin
- SMPEG_delete(mpeg);
- //Fixing the Memory Lag in earlyer Versions (X-Mas Mod, all Official Versions)
- glmovie_quit;
-end;
-
-function glmovie_init( Width : GLuint; Height : GLuint ) : GLenum;
-type
- PGLubyteArray = ^TGLubyteArray;
- TGLubyteArray = array of GLubyte;
-var
- (* Initial black texels. *)
- pixels : TGLubyteArray;
- (* Absolute offsets from within tiled frame. *)
- //offset_x: GLuint;
- //offset_y: GLuint;
- skip_rows : GLuint;
- skip_pixels : GLuint;
- i, j, current : GLuint;
-begin
- skip_rows := 0;
- current := 0;
- (* Save original movie dimensions. *)
- movie_width := width;
- movie_height := height;
-
- (* Get the power of 2 dimensions. *)
- tiled_width := 1024{512};
- tiled_height := 1024{512};
-
- texture_size := 1024{512};
-
- (* Time for fun with data type = record *)
- glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
- glEnable(GL_TEXTURE_2D);
- glEnable(GL_DITHER);
-
- glGenTextures(1, @texture_ids);
-
- current := 0;
- (* Setup texture. *)
- textures.id := texture_ids;
- textures.poly_width := texture_size;
- textures.poly_height := texture_size;
- textures.movie_width := movie_width - 2;
- textures.movie_height := movie_height - 2;
- textures.row := i;
- textures.col := j;
- textures.skip_pixels := skip_pixels;
- textures.skip_rows := skip_rows;
-
- SetLength( pixels, textures.poly_width * textures.poly_height * 4 );
- if ( pixels = nil ) then
- begin
- glDeleteTextures(1, @texture_ids);
- result := GL_OUT_OF_MEMORY;
- exit;
- end;
- //FillChar( pixels^, textures[ current ].poly_width * textures[ current ].poly_height * 4, 0 );
-
- (* Do all of our useful binding. *)
- glBindTexture(GL_TEXTURE_2D, texture_ids);
-// glTexEnvf( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL );
- glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP );
- glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP );
- glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
- glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR );
- (* Specify our 256x256 black texture. *)
- glTexImage2D( GL_TEXTURE_2D,
- 0,
- GL_RGB,
- 1024{512},//textures.poly_width,
- 1024{512},//textures.poly_height,
- 0,
- GL_RGBA,
- GL_UNSIGNED_BYTE,
- @pixels[0] );
- SetLength( pixels, 0 );
-
-
- (* Simple state setup at the end. *)
- result := glGetError( );
-end;
-
-procedure glmpeg_update( surface : PSDL_Surface; x : Sint32; y : Sint32; w : Uint32;
- h : Uint32 ); cdecl;
-var
- error : GLenum;
-begin
- glClear( GL_COLOR_BUFFER_BIT );
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity;
- DrawSmpeg( PGLubyte( surface.pixels ) );
- error := glGetError( );
- if ( error <> GL_NO_ERROR ) then Exit;
- SDL_GL_SwapBuffers;
-end;
-
-procedure DrawSmpeg(frame: PGLubyte);
-var
- Shift: GLdouble;
- CropT: real;
- CropB: real;
- TexT: real;
- TexB: real;
- TexL: real;
- TexR: real;
- Wide: boolean;
-begin
- (* full screen mpeg *)
-{ CropT := 0;
- CropB := 600;
- TexT := 0;
- TexB := 1;
- TexL := 0;
- TexW := 1;}
-
- // set movie texture crop
- Wide := false;
- if (textures.movie_width = 720-2) and (textures.movie_height = 344-2) then begin
- TexT := 0;
- TexB := 342/1024;
- Wide := true;
- end;
- if textures.movie_height = 304-2 then begin
- TexT := 0;
- TexB := 304/1024;
- Wide := true;
- end;
- if textures.movie_height = 152-2 then begin
- TexT := 0;
- TexB := 152/1024;
- Wide := true;
- end;
-
- CropT := 110; // (110/800 = 13,75% max crop)
- CropB := 490; // (110/800 = 13,75% max crop)
-
- if (textures.movie_height <> 304-2) and (textures.movie_height <> 152-2) and (textures.movie_height <> 344-2) then begin
- TexT := 110 / 600 * (textures.movie_height / 1024{512});
- TexB := 490 / 600 * (textures.movie_height / 1024{512});
-
- if Ini.MovieSize >= 1 then begin
- // full screen size
- CropT := 0;
- CropB := 600;
- TexT := 0;
- TexB := textures.movie_height / 1024{512};
- end;
- end;
-
- TexL := {10}0/600 * (textures.movie_width / 1024{512});
- TexR := {590}600/600 * (textures.movie_width / 1024{512});
-
- glEnable(GL_TEXTURE_2D);
- glDisable(GL_BLEND);
- glColor3f(1, 1, 1);
- glBindTexture( GL_TEXTURE_2D, texture_ids );
-// glPixelStorei( GL_UNPACK_ROW_LENGTH, movie_width );
- glPixelStorei( GL_UNPACK_SKIP_ROWS, 0);
- glPixelStorei( GL_UNPACK_SKIP_PIXELS, 0);
- glTexSubImage2D( GL_TEXTURE_2D, 0, 0, (* offset_x *) 0, (* offset_y *) textures.movie_width + 2, textures.movie_height + 2, GL_RGBA, GL_UNSIGNED_BYTE, frame );
-
- // draw
- glBegin( GL_QUADS );
- glTexCoord2f(TexL, TexT); glVertex2f(0, CropT);
- glTexCoord2f(TexL, TexB); glVertex2f(0, CropB);
- glTexCoord2f(TexR, TexB); glVertex2f(800, CropB);
- glTexCoord2f(TexR, TexT); glVertex2f(800, CropT);
- glEnd;
- glDisable(GL_TEXTURE_2D);
-end;
-
-procedure glmovie_resize( width : GLuint; height : GLuint );
-begin
- glViewport(0, 0, width, height);
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity;
- gluOrtho2D(0, 800, 600, 0);
-end;
-
-procedure glmovie_quit;
-begin
- glDeleteTextures(1, @texture_ids);
- SDL_FreeSurface(surface);
-end;
-
-end.
diff --git a/Game/Code/Screens/UScreenCredits.pas b/Game/Code/Screens/UScreenCredits.pas index f20a0797..ecdc332f 100644 --- a/Game/Code/Screens/UScreenCredits.pas +++ b/Game/Code/Screens/UScreenCredits.pas @@ -259,6 +259,7 @@ var f,g,h: Real;
STime:cardinal;
Delay:cardinal;
+ Alpha:TAlpha;
myPixel: longword;
myColor: Cardinal;
@@ -424,7 +425,7 @@ Data := Music.GetFFTData; for k:=1 to 3 do begin
l:=410+floor((CTime-Timings[21])/(Timings[1]-Timings[21])*(536-410))+RandomRange(-5,5);
j:=floor((Timings[1]-CTime)/22)+RandomRange(285,301);
- GoldenRec.Spawn(l, j, 1, 16, 0, -1, Flare, 0);
+ GoldenRec.Spawn(l, j, 1, 16, 0, -1, Flare, 0, 0);
end;
end;
@@ -486,15 +487,15 @@ Data := Music.GetFFTData; glColor4f(1, 1, 1, ESC_Alpha/20*j/10);
if (CTime >= STime+10) and (CTime<=STime+12) then begin
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 0);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 1);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 5);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 0);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 1);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 5);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 0);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 1);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 5);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 0, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 1, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 5, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 0, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 1, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 5, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 0, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 1, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 5, 0);
end;
glPushMatrix;
@@ -539,15 +540,15 @@ Data := Music.GetFFTData; glColor4f(1, 1, 1, ESC_Alpha/20*j/10);
if (CTime >= STime+20) and (CTime<=STime+22) then begin
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 0);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 1);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 5);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 0);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 1);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 5);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 0);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 1);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 5);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 0, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 1, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 5, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 0, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 1, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 5, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 0, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 1, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 5, 0);
end;
glPushMatrix;
@@ -597,15 +598,15 @@ Data := Music.GetFFTData; glColor4f(1, 1, 1, ESC_Alpha/20*j/10);
if (CTime >= STime+10) and (CTime<=STime+12) then begin
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 0);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 1);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 5);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 0);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 1);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 5);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 0);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 1);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 5);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 0, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 1, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 5, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 0, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 1, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 5, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 0, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 1, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 5, 0);
end;
glPushMatrix;
@@ -650,15 +651,15 @@ Data := Music.GetFFTData; glColor4f(1, 1, 1, ESC_Alpha/20*j/10);
if (CTime >= STime+10) and (CTime<=STime+12) then begin
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 0);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 1);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 5);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 0);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 1);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 5);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 0);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 1);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 5);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 0, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 1, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 5, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 0, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 1, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 5, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 0, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 1, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 5, 0);
end;
glPushMatrix;
@@ -706,15 +707,15 @@ Data := Music.GetFFTData; glColor4f(1, 1, 1, ESC_Alpha/20*j/10);
if (CTime >= STime+10) and (CTime<=STime+12) then begin
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 0);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 1);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 5);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 0);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 1);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 5);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 0);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 1);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 5);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 0, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 1, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 5, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 0, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 1, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 5, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 0, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 1, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 5, 0);
end;
@@ -765,15 +766,15 @@ Data := Music.GetFFTData; glColor4f(1, 1, 1, ESC_Alpha/20*j/10);
if (CTime >= STime+10) and (CTime<=STime+12) then begin
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 0);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 1);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 5);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 0);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 1);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 5);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 0);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 1);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 5);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 0, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 1, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 5, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 0, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 1, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 5, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 0, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 1, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 5, 0);
end;
glPushMatrix;
@@ -821,15 +822,15 @@ Data := Music.GetFFTData; glColor4f(1, 1, 1, ESC_Alpha/20*j/10);
if (CTime >= STime+10) and (CTime<=STime+12) then begin
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 0);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 1);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 5);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 0);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 1);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 5);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 0);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 1);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 5);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 0, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 1, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 5, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 0, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 1, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 5, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 0, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 1, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 5, 0);
end;
glPushMatrix;
@@ -879,15 +880,15 @@ Data := Music.GetFFTData; glColor4f(1, 1, 1, ESC_Alpha/20*j/10);
if (CTime >= STime+10) and (CTime<=STime+12) then begin
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 0);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 1);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 5);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 0);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 1);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 5);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 0);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 1);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 5);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 0, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 1, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 5, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 0, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 1, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 5, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 0, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 1, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 5, 0);
end;
glPushMatrix;
@@ -938,15 +939,15 @@ Data := Music.GetFFTData; glColor4f(1, 1, 1, ESC_Alpha/20*j/10);
if (CTime >= STime+10) and (CTime<=STime+12) then begin
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 0);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 1);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 5);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 0);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 1);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 5);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 0);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 1);
- GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 5);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 0, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 1, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 5, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 0, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 1, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 5, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 0, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 1, 0);
+ GoldenRec.Spawn(RandomRange(65,390), RandomRange(200,460), 1, 16, 0, -1, PerfectLineTwinkle, 5, 0);
end;
glPushMatrix;
@@ -986,7 +987,7 @@ Data := Music.GetFFTData; if Data[k]>0.2 then begin
l:=RandomRange(6,16);
j:=RandomRange(0,27);
- GoldenRec.Spawn(myLogoCoords[j,0], myLogoCoords[j,1], 16-l, l, 0, -1, PerfectNote, 0);
+ GoldenRec.Spawn(myLogoCoords[j,0], myLogoCoords[j,1], 16-l, l, 0, -1, PerfectNote, 0, 0);
end;
end;
@@ -1102,7 +1103,9 @@ Data := Music.GetFFTData; glPrint (Addr(RuntimeStr[1]));
}
// make the stars shine
- GoldenRec.Draw;
+ Alpha[0] := 1;
+ Alpha[1] := 1;
+ GoldenRec.Draw(Alpha);
//timing hack
// Draw_FunkyText;
diff --git a/Game/Code/Screens/UScreenEditSub.pas b/Game/Code/Screens/UScreenEditSub.pas index ae1a026e..8b3d3117 100644 --- a/Game/Code/Screens/UScreenEditSub.pas +++ b/Game/Code/Screens/UScreenEditSub.pas @@ -289,15 +289,15 @@ begin begin
// Insert start of sentece
if (AktNuta[CP] > 0) then
- DivideSentence
- else if AktSong.isDuet and
+ DivideSentence;
+ {else if AktSong.isDuet and
(Length(Czesci[(CP+1) mod 2].Czesc[Czesci[CP].Akt].Nuta)>0) then
begin
if (Czesci[CP].Czesc[Czesci[CP].Akt].Nuta[AktNuta[CP]].Start >
Czesci[(CP+1) mod 2].Czesc[Czesci[CP].Akt].Nuta[0].Start+
Czesci[(CP+1) mod 2].Czesc[Czesci[CP].Akt].Nuta[0].Dlugosc) then
DivideSentence;
- end;
+ end;}
end;
if SDL_ModState = KMOD_LSHIFT then
@@ -680,6 +680,14 @@ begin SDLK_T:
begin
+ MidiOut.PutShort($81, Czesci[CP].Czesc[Czesci[CP].Akt].Nuta[MidiLastNote].Ton + 60, 127);
+ PlaySentenceMidi := false;
+ PlayOneNoteMidi := false;
+ Music.Stop;
+ LineChanged[0]:=false;
+ LineChanged[1]:=false;
+ PlaySentence := false;
+ PlayOneNote := false;
// Fixes timings between sentences
FixTimings;
Text[TextDebug].Text := Language.Translate('EDITOR_FIX_TIMINGS');
@@ -688,6 +696,14 @@ begin SDLK_F4:
begin
+ MidiOut.PutShort($81, Czesci[CP].Czesc[Czesci[CP].Akt].Nuta[MidiLastNote].Ton + 60, 127);
+ PlaySentenceMidi := false;
+ PlayOneNoteMidi := false;
+ Music.Stop;
+ LineChanged[0]:=false;
+ LineChanged[1]:=false;
+ PlaySentence := false;
+ PlayOneNote := false;
// Enter Text Edit Mode
editText := Czesci[CP].Czesc[Czesci[CP].Akt].Nuta[AktNuta[CP]].Tekst;
TextEditMode := true;
@@ -696,6 +712,14 @@ begin SDLK_F5:
begin
// Enter BPM Edit Mode
+ MidiOut.PutShort($81, Czesci[CP].Czesc[Czesci[CP].Akt].Nuta[MidiLastNote].Ton + 60, 127);
+ PlaySentenceMidi := false;
+ PlayOneNoteMidi := false;
+ Music.Stop;
+ LineChanged[0]:=false;
+ LineChanged[1]:=false;
+ PlaySentence := false;
+ PlayOneNote := false;
Text[TextBPM].Text := Text[TextBPM].Text + '|';
BPMEditMode := true;
end;
@@ -1094,8 +1118,8 @@ begin begin
Refresh;
Inc(Czesci[CP].Akt);
- AktNuta[0] := 0;
- AktNuta[1] := 0;
+ AktNuta[CP] := 0;
+ //AktNuta[1] := 0;
if Czesci[CP].Akt > Czesci[CP].High then
Czesci[CP].Akt := 0;
@@ -1119,11 +1143,11 @@ begin end;
end;
- if AktSong.isDuet and (SDL_ModState = KMOD_LSHIFT or KMOD_LCTRL) and (CP=0) then
+ {if AktSong.isDuet and (SDL_ModState = KMOD_LSHIFT or KMOD_LCTRL) and (CP=0) then
DuetCopyLine;
if AktSong.isDuet and (SDL_ModState = KMOD_LSHIFT or KMOD_LCTRL or KMOD_LALT) and (CP=0) then
- DuetMoveLine;
+ DuetMoveLine;}
end;
SDLK_UP:
@@ -1166,11 +1190,11 @@ begin end;
end;
- if AktSong.isDuet and (SDL_ModState = KMOD_LSHIFT or KMOD_LCTRL) and (CP=1) then
+ {if AktSong.isDuet and (SDL_ModState = KMOD_LSHIFT or KMOD_LCTRL) and (CP=1) then
DuetCopyLine;
if AktSong.isDuet and (SDL_ModState = KMOD_LSHIFT or KMOD_LCTRL or KMOD_LALT) and (CP=1) then
- DuetMoveLine;
+ DuetMoveLine;}
end;
// Golden Note Patch
@@ -1577,6 +1601,7 @@ var S: integer;
Min: integer;
Max: integer;
+ len: integer;
function GetMin(L: integer): integer;
var
@@ -1628,8 +1653,9 @@ begin begin
for C := 1 to Length(Czesci[P].Czesc) - 1 do
begin
- Min := GetMin(C-1);
- Max := GetMax(C);
+ len := Length(Czesci[P].Czesc[C-1].Nuta);
+ Min := Czesci[P].Czesc[C-1].Nuta[len-1].Start + Czesci[P].Czesc[C-1].Nuta[len-1].Dlugosc;
+ Max := Czesci[P].Czesc[C].Nuta[0].Start;
case (Max - Min) of
0: S := Max;
1: S := Max;
@@ -1642,7 +1668,7 @@ begin Czesci[P].Czesc[C].Start := S;
end; // for
end;
-
+ {
//second run for duet mode:
if not AktSong.isDuet then
Exit;
@@ -1655,7 +1681,7 @@ begin if (Length(Czesci[P].Czesc[C-1].Nuta)=0) then
Czesci[P].Czesc[C].Start := Czesci[(P+1) mod 2].Czesc[C].Start;
end;
- end;
+ end; }
end;
procedure TScreenEditSub.DivideSentence;
@@ -1678,8 +1704,9 @@ begin CNew := CStart + 1;
- for P := 0 to Length(Czesci) - 1 do
- begin
+ P := CP;
+ {for P := 0 to Length(Czesci) - 1 do
+ begin}
// increase sentence length by 1
CLen := Length(Czesci[P].Czesc);
SetLength(Czesci[P].Czesc, CLen + 1);
@@ -1748,18 +1775,19 @@ begin end;
Czesci[P].Akt := Czesci[P].Akt + 1;
AktNuta[P] := 0;
- end;
+ //end;
Refresh;
Czesci[CP].Czesc[Czesci[CP].Akt].Nuta[AktNuta[CP]].Color := 2;
EditorLyric[CP].AddCzesc(CP, Czesci[CP].Akt);
EditorLyric[CP].Selected := AktNuta[CP];
+ {
if AktSong.isDuet then
begin
Czesci[(CP+1) mod 2].Akt := Czesci[CP].Akt;
EditorLyric[(CP+1) mod 2].AddCzesc((CP+1) mod 2, Czesci[(CP+1) mod 2].Akt);
- end;
+ end; }
end;
procedure TScreenEditSub.JoinSentence;
@@ -1770,8 +1798,9 @@ var NStart: integer;
NDst: integer;
begin
- for P := 0 to Length(Czesci) - 1 do
- begin
+ P := CP;
+ {for P := 0 to Length(Czesci) - 1 do
+ begin}
C := Czesci[CP].Akt;
// set new sentence
NStart := Czesci[P].Czesc[C].IlNut;
@@ -1803,18 +1832,18 @@ begin SetLength(Czesci[P].Czesc, Length(Czesci[P].Czesc) - 1);
Dec(Czesci[P].Ilosc);
Dec(Czesci[P].High);
- end;
+ //end;
Refresh;
Czesci[CP].Czesc[Czesci[CP].Akt].Nuta[AktNuta[CP]].Color := 2;
EditorLyric[CP].AddCzesc(CP, Czesci[CP].Akt);
EditorLyric[CP].Selected := AktNuta[CP];
- if AktSong.isDuet then
+ {if AktSong.isDuet then
begin
Czesci[(CP+1) mod 2].Akt := Czesci[CP].Akt;
EditorLyric[(CP+1) mod 2].AddCzesc((CP+1) mod 2, Czesci[(CP+1) mod 2].Akt);
- end;
+ end;}
end;
procedure TScreenEditSub.DivideNote;
@@ -1897,8 +1926,8 @@ begin end;
end;
EditorLyric[CP].AddCzesc(CP, Czesci[CP].Akt);
- if AktSong.isDuet then
- EditorLyric[(CP+1) mod 2].AddCzesc((CP+1) mod 2, Czesci[(CP+1) mod 2].Akt);
+ {if AktSong.isDuet then
+ EditorLyric[(CP+1) mod 2].AddCzesc((CP+1) mod 2, Czesci[(CP+1) mod 2].Akt);}
end;
procedure TScreenEditSub.DeleteSentence;
@@ -1912,20 +1941,20 @@ begin Pv := CP;
Pt := CP;
- if AktSong.isDuet then
+ {if AktSong.isDuet then
begin
if (Length(Czesci[(CP+1) mod 2].Czesc[Czesci[CP].Akt].Nuta)=0) then
begin
Pv := 0;
Pt := 1;
end;
- end;
+ end; }
for P := Pv to Pt do
begin
C := Czesci[CP].Akt;
- if (Pv <> Pt) or not AktSong.isDuet then
- begin
+ {if (Pv <> Pt) or not AktSong.isDuet then
+ begin}
//Move all Sentences after the current to the Left
for N := C+1 to Czesci[P].High do
//Czesci[P].Czesc[N-1] := Czesci[P].Czesc[N];
@@ -1941,7 +1970,7 @@ begin Czesci[P].Akt := C - 1
else
Czesci[P].Akt := 0;
- end else
+ {end else
begin
//delete all notes in that line
SetLength(Czesci[P].Czesc[C].Nuta, 0);
@@ -1950,11 +1979,12 @@ begin CP := (CP+1) mod 2;
AktNuta[CP] := 0;
AktNuta[(CP+1) mod 2] := 0;
- end;
+ end;}
end;
Refresh;
- SelectPrevNote();
- SelectNextNote();
+ //SelectPrevNote();
+ //SelectNextNote();
+ Czesci[CP].Czesc[Czesci[CP].Akt].Nuta[AktNuta[CP]].Color := 2;
end;
procedure TScreenEditSub.TransposeNote(Transpose: integer);
@@ -2166,7 +2196,7 @@ end; procedure TScreenEditSub.SelectNextNote();
begin
- if AktSong.isDuet then
+ {if AktSong.isDuet then
begin
Czesci[(CP+1) mod 2].Akt := Czesci[CP].Akt;
while (Length(Czesci[CP].Czesc[Czesci[CP].Akt].Nuta)=0) do
@@ -2188,18 +2218,19 @@ begin EditorLyric[0].Selected := 0;
EditorLyric[1].Selected := 0;
end else
- begin
- Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta[0]].Color := 2;
+ begin }
+ Czesci[CP].Czesc[Czesci[CP].Akt].Nuta[AktNuta[CP]].Color := 2;
- EditorLyric[0].AddCzesc(0, Czesci[0].Akt);
- EditorLyric[0].Selected := 0;
- end;
+ EditorLyric[CP].AddCzesc(CP, Czesci[CP].Akt);
+ EditorLyric[CP].Selected := 0;
+ //end;
end;
procedure TScreenEditSub.SelectPrevNote();
begin
- if AktSong.isDuet then
+ {if AktSong.isDuet then
begin
+ //beat := Czesci[CP].Czesc[Czesci[CP].Akt].Nuta[AktNuta[CP]].Start;
Czesci[(CP+1) mod 2].Akt := Czesci[CP].Akt;
while (Length(Czesci[CP].Czesc[Czesci[CP].Akt].Nuta)=0) do
begin
@@ -2220,12 +2251,11 @@ begin EditorLyric[0].Selected := 0;
EditorLyric[1].Selected := 0;
end else
- begin
- Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta[0]].Color := 2;
+ begin }
+ Czesci[CP].Czesc[Czesci[CP].Akt].Nuta[AktNuta[CP]].Color := 2;
- EditorLyric[0].AddCzesc(0, Czesci[0].Akt);
- EditorLyric[0].Selected := 0;
- end;
+ EditorLyric[CP].AddCzesc(CP, Czesci[CP].Akt);
+ EditorLyric[CP].Selected := 0;
end;
procedure TScreenEditSub.MakeSingle;
@@ -2233,11 +2263,11 @@ var C: integer;
begin
- for C := 0 to Length(Czesci[0].Czesc) - 1 do
+ {for C := 0 to Length(Czesci[0].Czesc) - 1 do
begin
if (Length(Czesci[0].Czesc[C].Nuta)=0) then
Czesci[0].Czesc[C] := Czesci[1].Czesc[C];
- end;
+ end;}
SetLength(Czesci, 1);
AktSong.isDuet := false;
CP := 0;
@@ -2266,7 +2296,7 @@ begin for L := 0 to Length(Czesci[0].Czesc) - 1 do
begin
- Czesci[1].Czesc[L].Start := Czesci[0].Czesc[L].Start;
+ {Czesci[1].Czesc[L].Start := Czesci[0].Czesc[L].Start;
Czesci[1].Czesc[L].StartNote := Czesci[0].Czesc[L].StartNote;
Czesci[1].Czesc[L].Lyric := '';
Czesci[1].Czesc[L].LyricWidth := 0;
@@ -2275,7 +2305,8 @@ begin Czesci[1].Czesc[L].HighNut := -1;
Czesci[1].Czesc[L].IlNut := 0;
Czesci[1].Czesc[L].TotalNotes := 0;
- SetLength(Czesci[1].Czesc[L].Nuta, 0);
+ SetLength(Czesci[1].Czesc[L].Nuta, 0);}
+ CopyLine(0, L, 1, L);
end;
AktSong.isDuet := true;
@@ -2296,21 +2327,23 @@ end; procedure TScreenEditSub.DuetCopyLine;
var
- L: integer;
- Src, Dst: integer;
+ LSrc, LDst: integer;
+ CSrc, CDst: integer;
begin
- L := Czesci[CP].Akt;
- Src := CP;
- Dst := (CP+1) mod 2;
+ CSrc := CP;
+ CDst := (CP+1) mod 2;
+ LSrc := Czesci[CSrc].Akt;
+ LDst := Czesci[CDst].Akt;
+
- CopyLine(Src, L, Dst, L);
+ CopyLine(CSrc, LSrc, CDst, LDst);
Refresh;
- EditorLyric[Dst].AddCzesc(Dst, Czesci[Src].Akt);
- EditorLyric[Dst].Selected := 0;
- AktNuta[Dst] := 0;
- Czesci[Src].Czesc[L].Nuta[AktNuta[Src]].Color := 2;
+ EditorLyric[CDst].AddCzesc(CDst, Czesci[CDst].Akt);
+ EditorLyric[CDst].Selected := 0;
+ AktNuta[CDst] := 0;
+ Czesci[CSrc].Czesc[LSrc].Nuta[AktNuta[CSrc]].Color := 2;
end;
procedure TScreenEditSub.CopyLine(Pf, Cf, Pt, Ct: integer);
@@ -2346,7 +2379,8 @@ end; procedure TScreenEditSub.DuetMoveLine;
begin
DuetCopyLine;
- Czesci[CP].Czesc[Czesci[CP].Akt].Lyric := '';
+ DeleteSentence;
+ {Czesci[CP].Czesc[Czesci[CP].Akt].Lyric := '';
Czesci[CP].Czesc[Czesci[CP].Akt].LyricWidth := 0;
Czesci[CP].Czesc[Czesci[CP].Akt].HighNut := -1;
Czesci[CP].Czesc[Czesci[CP].Akt].IlNut := 0;
@@ -2356,8 +2390,8 @@ begin EditorLyric[CP].AddCzesc(CP, Czesci[CP].Akt);
EditorLyric[CP].Selected := -1;
- CP := (CP+1) mod 2;
- Refresh;
+ CP := (CP+1) mod 2;}
+ //Refresh;
end;
procedure TScreenEditSub.Refresh;
@@ -2434,7 +2468,7 @@ begin //Set Volume
MP3Volume := 50;
- Music.SetVolume(MP3Volume);
+ Music.SetMusicVolume(MP3Volume);
CP := 0;
@@ -2476,8 +2510,6 @@ begin GetTimeFromBeat(Czesci[MedleyNotes.Preview.CP].Czesc[MedleyNotes.Preview.line].Nuta[MedleyNotes.Preview.note].start);
Music.Open(Path + AktSong.Mp3);
- //Set Down Music Volume for Better hearability of Midi Sounds
- //Music.SetVolume(40);
for I := 0 to Length(Czesci)-1 do
begin
@@ -2839,11 +2871,11 @@ begin // draw notes
if not AktSong.isDuet then
- SingDrawNoteLines(5, offset[0]+90, 795, 15)
+ SingDrawNoteLines(5, offset[0]+90, 795, 15, 1)
else
begin
- SingDrawNoteLines(5, offset[0]+45, 795, 15);
- SingDrawNoteLines(5, offset[1]-140, 795, 15);
+ SingDrawNoteLines(5, offset[0]+45, 795, 15, 1);
+ SingDrawNoteLines(5, offset[1]-140, 795, 15, 1);
end;
//Error Drawing when no Song is loaded
@@ -3320,7 +3352,6 @@ procedure TScreenEditSub.onHide; begin
MidiOut.Close;
MidiOut.Free;
- //Music.SetVolume(100);
end;
function TScreenEditSub.GetNoteName(Note: Integer): String;
diff --git a/Game/Code/Screens/UScreenLevel.pas b/Game/Code/Screens/UScreenLevel.pas index 145a3b2a..0edf989d 100644 --- a/Game/Code/Screens/UScreenLevel.pas +++ b/Game/Code/Screens/UScreenLevel.pas @@ -88,8 +88,6 @@ begin Interaction := Ini.Difficulty;
if not Help.SetHelpID(ID) then
Log.LogError('No Entry for Help-ID ' + ID + ' (ScreenLevel)');
-// LCD.WriteText(1, ' Choose mode: ');
-// UpdateLCD;
end;
procedure TScreenLevel.SetAnimationProgress(Progress: real);
diff --git a/Game/Code/Screens/UScreenPartyNewRound.pas b/Game/Code/Screens/UScreenPartyNewRound.pas index 7c043b7e..2a3db5b8 100644 --- a/Game/Code/Screens/UScreenPartyNewRound.pas +++ b/Game/Code/Screens/UScreenPartyNewRound.pas @@ -295,32 +295,14 @@ begin else
Text[TextNextPlayer3].Visible := False;
-
-// LCD.WriteText(1, ' Choose mode: ');
-// UpdateLCD;
end;
procedure TScreenPartyNewRound.Update;
-{
- //Set Visibility of Round Infos
- I := Length(PartySession.Rounds);
- if (I >= 1) then
- begin
- Static[StaticRound1].Visible := True;
- Text[TextRound1].Visible := True;
- Text[TextWinner1].Visible := True;
-
- //Texts:
- Text[TextRound1].Text := Language.Translate(DllMan.Plugins[PartySession.Rounds[0].Plugin].Name);
- Text[TextWinner1].Text := PartySession.GetWinnerString(0);
- end; }
-
-
-
var
N, R: Integer;
T: Integer;
NumRounds: Integer;
+
begin
//N:=0;
//current round-number
diff --git a/Game/Code/Screens/UScreenPartyScore.pas b/Game/Code/Screens/UScreenPartyScore.pas index 9dc824fb..cf08018d 100644 --- a/Game/Code/Screens/UScreenPartyScore.pas +++ b/Game/Code/Screens/UScreenPartyScore.pas @@ -285,10 +285,6 @@ begin Static[StaticTeam3BG].Visible := False;
Static[StaticTeam3Deco].Visible := False;
end;
-
-
-// LCD.WriteText(1, ' Choose mode: ');
-// UpdateLCD;
end;
procedure TScreenPartyScore.SetAnimationProgress(Progress: real);
diff --git a/Game/Code/Screens/UScreenPartyWin.pas b/Game/Code/Screens/UScreenPartyWin.pas index 057c1f8a..97e6e038 100644 --- a/Game/Code/Screens/UScreenPartyWin.pas +++ b/Game/Code/Screens/UScreenPartyWin.pas @@ -248,20 +248,10 @@ begin Static[StaticTeam3BG].Visible := False;
Static[StaticTeam3Deco].Visible := False;
end;
-
-
-// LCD.WriteText(1, ' Choose mode: ');
-// UpdateLCD;
end;
procedure TScreenPartyWin.SetAnimationProgress(Progress: real);
begin
- {if (ScreenSingModi.PlayerInfo.NumPlayers >= 1) then
- Static[StaticTeam1].Texture.ScaleW := Progress * ScreenSingModi.PlayerInfo.Playerinfo[0].Score / maxScore;
- if (ScreenSingModi.PlayerInfo.NumPlayers >= 2) then
- Static[StaticTeam2].Texture.ScaleW := Progress * ScreenSingModi.PlayerInfo.Playerinfo[1].Score / maxScore;
- if (ScreenSingModi.PlayerInfo.NumPlayers >= 3) then
- Static[StaticTeam3].Texture.ScaleW := Progress * ScreenSingModi.PlayerInfo.Playerinfo[2].Score / maxScore;}
end;
end.
diff --git a/Game/Code/Screens/UScreenSing.pas b/Game/Code/Screens/UScreenSing.pas index 06cb048c..e07d5023 100644 --- a/Game/Code/Screens/UScreenSing.pas +++ b/Game/Code/Screens/UScreenSing.pas @@ -21,8 +21,9 @@ type MP3Volume: integer;
MP3VolumeHandler: THandler;
- //Lyric bar for Duet mode
- StaticLyricDuetBar: integer;
+ //Lyric bars
+ StaticLyricBar: integer;
+ StaticLyricDuetBar: integer;
//TimeBar mod
StaticTimeProgress: integer;
@@ -34,6 +35,8 @@ type TextP1: integer;
TextP1Score: integer;
+ Alpha: TAlpha;
+
//moveable singbar mod
StaticP1SingBar: integer;
StaticP1ThreePSingBar: integer;
@@ -100,7 +103,7 @@ type //OnSentenceEnd for LineBonus + Singbar
procedure onSentenceEnd(CP: integer; S: Cardinal);
//OnSentenceChange (for Golden Notes)
- procedure onSentenceChange(S: Cardinal);
+ procedure onSentenceChange(CP: integer; S: Cardinal);
procedure SongError();
procedure LoadNextSong;
@@ -258,6 +261,7 @@ begin LoadFromTheme(Theme.Sing);
+ StaticLyricBar := AddStatic(Theme.Sing.StaticLyricBar);
StaticLyricDuetBar := AddStatic(Theme.Sing.StaticLyricDuetBar);
//TimeBar mod
@@ -921,6 +925,10 @@ begin Czas.Razem := AktSong.Finish / 1000;
end;
+ Czas.AktBeat := 0;
+ Czas.AktBeatC := 0;
+ Czas.AktBeatD := 0;
+
// main text
LyricMain[0].Clear;
LyricMain[0].X := 400;
@@ -987,7 +995,9 @@ begin //Kill all Stars not Killed yet
//GoldenStarsTwinkle Mod
- GoldenRec.SentenceChange;
+ GoldenRec.SentenceChange(0);
+ if AktSong.isDuet then
+ GoldenRec.SentenceChange(1);
//GoldenStarsTwinkle Mod End
//Set Num of Empty Sentences for Phrasen Bonus
@@ -1014,6 +1024,9 @@ begin end;
Music.CaptureStart;
+
+ for I := 0 to 3 - 1 do
+ Alpha[I] := 0;
if ((ScreenSong.Mode = smMedley) or ScreenSong.PartyMedley)
and (PlaylistMedley.CurrentMedleySong>1) then
@@ -1021,9 +1034,11 @@ begin end;
procedure TScreenSing.onShowFinish;
+var
+ I: integer;
+
begin
// play movie (II)
-
if AktSong.VideoLoaded then
begin
try
@@ -1054,6 +1069,9 @@ begin end;
function TScreenSing.Draw: boolean;
+Const
+ dt = 5;
+
var
Min: integer;
Sec: integer;
@@ -1061,6 +1079,8 @@ var Flash: real;
S: integer;
T: integer;
+ I, J, K:integer;
+ ab: real;
lastLine, LastWord: integer;
medley_end: boolean;
medley_start_applause: boolean;
@@ -1385,12 +1405,64 @@ begin end;
end;
end;
-
+
+ for I := 0 to Length(Czesci) - 1 do
+ begin
+ K := Czesci[I].Akt;
+ for J := 0 to Czesci[I].High do
+ begin
+ if Czas.AktBeat >= Czesci[I].Czesc[J].Start then
+ K := J;
+ end;
+
+ ab := GetTimeFromBeat(Czesci[I].Czesc[K].StartNote) - Czas.Teraz;
+
+ if (K = Czesci[I].High) then
+ ab := Czas.Teraz - GetTimeFromBeat(Czesci[I].Czesc[K].Nuta[Czesci[I].Czesc[K].HighNut].Start+
+ Czesci[I].Czesc[K].Nuta[Czesci[I].Czesc[K].HighNut].Dlugosc);
+
+ if (ab>2*dt) then
+ begin
+ Alpha[I] := Alpha[I]-TimeSkip/dt;
+ if (Alpha[I]<0) then
+ Alpha[I] := 0;
+ end else if (ab>dt) then
+ begin
+ Alpha[I] := Alpha[I]+TimeSkip/dt;
+ if (Alpha[I]>1) then
+ Alpha[I] := 1;
+ end else
+ Alpha[I] := 1;
+
+ if (K < Czesci[I].High) then
+ begin
+ ab := GetTimeFromBeat(Czesci[I].Czesc[K+1].StartNote) - Czas.Teraz;
+
+ if (ab>2*dt) then
+ Alpha[I+2] := 0
+ else if (ab>dt) then
+ Alpha[I+2] := (1-(ab-dt)/dt)
+ else
+ Alpha[I+2] := 1;
+ end;
+ end;
+
+ if not AktSong.isDuet then
+ begin
+ Alpha[1] := Alpha[0];
+ Alpha[3] := Alpha[2];
+ end;
+
+ Static[StaticLyricBar].Texture.Alpha := Alpha[1];
+
+ if AktSong.isDuet then
+ Static[StaticLyricDuetBar].Texture.Alpha := Alpha[0];
+
// draw custom items
- SingDraw; // always draw
+ SingDraw(Alpha); // always draw
//GoldenNoteStarsTwinkle Mod
- GoldenRec.SpawnRec;
+ GoldenRec.SpawnRec(Alpha);
//GoldenNoteStarsTwinkle Mod
// back stereo
@@ -1766,10 +1838,10 @@ begin end;
//Called on Sentence Change S= New Current Sentence
-procedure TScreenSing.onSentenceChange(S: Cardinal);
+procedure TScreenSing.onSentenceChange(CP: integer; S: Cardinal);
begin
//GoldenStarsTwinkle Mod
- GoldenRec.SentenceChange;
+ GoldenRec.SentenceChange(CP);
//GoldenStarsTwinkle Mod End
end;
diff --git a/Game/Code/Screens/UScreenSingModi.pas b/Game/Code/Screens/UScreenSingModi.pas index 6010aed8..6144c27f 100644 --- a/Game/Code/Screens/UScreenSingModi.pas +++ b/Game/Code/Screens/UScreenSingModi.pas @@ -276,16 +276,22 @@ begin end;
function TScreenSingModi.Draw: boolean;
+Const
+ dt = 5;
+
var
Min: integer;
Sec: integer;
Tekst: string;
- S, I: integer;
+ S, I: integer;
+ K, J: integer;
T: integer;
- lastLine, LastWord: integer;
+ lastLine, LastWord: integer;
medley_end: boolean;
medley_start_applause: boolean;
CurTime: real;
+ ab: real;
+
begin
//Aspect
if AspectHandler.changed and (Czas.Teraz>AspectHandler.change_time + 3) then
@@ -618,11 +624,59 @@ end; end;
end;
+ for I := 0 to Length(Czesci) - 1 do
+ begin
+ K := Czesci[I].Akt;
+ for J := 0 to Czesci[I].High do
+ begin
+ if Czas.AktBeat >= Czesci[I].Czesc[J].Start then
+ K := J;
+ end;
+ ab := GetTimeFromBeat(Czesci[I].Czesc[K].StartNote) - Czas.Teraz;
+
+ if (K = Czesci[I].High) then
+ ab := Czas.Teraz - GetTimeFromBeat(Czesci[I].Czesc[K].Nuta[Czesci[I].Czesc[K].HighNut].Start+
+ Czesci[I].Czesc[K].Nuta[Czesci[I].Czesc[K].HighNut].Dlugosc);
+
+ if (ab>2*dt) then
+ begin
+ Alpha[I] := Alpha[I]-TimeSkip/dt;
+ if (Alpha[I]<0) then
+ Alpha[I] := 0;
+ end else if (ab>dt) then
+ begin
+ Alpha[I] := Alpha[I]+TimeSkip/dt;
+ if (Alpha[I]>1) then
+ Alpha[I] := 1;
+ end else
+ Alpha[I] := 1;
+
+ if (K < Czesci[I].High) then
+ begin
+ ab := GetTimeFromBeat(Czesci[I].Czesc[K+1].StartNote) - Czas.Teraz;
+
+ if (ab>2*dt) then
+ Alpha[I+2] := 0
+ else if (ab>dt) then
+ Alpha[I+2] := (1-(ab-dt)/dt)
+ else
+ Alpha[I+2] := 1;
+ end;
+ end;
+
+ if not AktSong.isDuet then
+ begin
+ Alpha[1] := Alpha[0];
+ Alpha[3] := Alpha[2];
+ end;
+
+ Static[StaticLyricBar].Texture.Alpha := Alpha[1];
+
// draw custom items
- SingModiDraw(PlayerInfo); // always draw
+ SingModiDraw(PlayerInfo, Alpha); // always draw
//GoldenNoteStarsTwinkle Mod
- GoldenRec.SpawnRec;
+ GoldenRec.SpawnRec(Alpha);
//GoldenNoteStarsTwinkle Mod
//Update PlayerInfo
diff --git a/Game/Code/Screens/UScreenSong.pas b/Game/Code/Screens/UScreenSong.pas index 4c394ceb..bed5ae0a 100644 --- a/Game/Code/Screens/UScreenSong.pas +++ b/Game/Code/Screens/UScreenSong.pas @@ -165,7 +165,7 @@ type procedure SelectPrev;
procedure SkipTo(Target: Cardinal);
procedure RandomSongChallenge();
- procedure SkipTo2(Target: Integer); //skipt exactly to the target song nr.
+ procedure SkipTo2(Target: Integer); //skip exactly to the target song nr.
procedure FixSelected; //Show Wrong Song when Tabs on Fix
procedure FixSelected2; //Show Wrong Song when Tabs on Fix
procedure ShowCatTL(Cat: Integer);// Show Cat in Top left
@@ -1395,7 +1395,7 @@ begin Refresh(false);
PlaylistMan.LoadPlayLists;
-
+
if jump then
I2 := PlaylistMan.FindSong(Artist, Title)
else
@@ -2063,7 +2063,7 @@ end; procedure TScreenSong.onShow;
var
- I: Integer;
+ I: integer;
begin
if Music.VocalRemoverActivated() then
@@ -2154,13 +2154,8 @@ begin end else if (Mode<>smNormal) and (Ini.Tabs = 0) then
begin
CatSongs.SetFilter('', 0);
- end else if (Ini.Tabs = 0) then
- begin
- CatSongs.SetFilter('', 0);
- FixSelected;
end;
-
//Playlist Mode
if (Mode = smNormal) then
begin
diff --git a/Game/Code/Screens/UScreenSongJumpto.pas b/Game/Code/Screens/UScreenSongJumpto.pas index f4d0d796..af08edc9 100644 --- a/Game/Code/Screens/UScreenSongJumpto.pas +++ b/Game/Code/Screens/UScreenSongJumpto.pas @@ -105,6 +105,7 @@ begin begin
Button[0].Text[0].Text := '';
SetTextFound(CatSongs.SetFilter(Button[0].Text[0].Text, SelectType));
+ isDuet := false;
end;
end;
@@ -291,5 +292,4 @@ begin else
ResetDuetFilter;
end;
-
end.
diff --git a/Game/Code/lib/bass/bass.chm b/Game/Code/lib/bass/bass.chm Binary files differindex 1e8c5076..66bda199 100644 --- a/Game/Code/lib/bass/bass.chm +++ b/Game/Code/lib/bass/bass.chm diff --git a/Game/Code/lib/bass/bass.txt b/Game/Code/lib/bass/bass.txt index c60b6594..d21085dd 100644 --- a/Game/Code/lib/bass/bass.txt +++ b/Game/Code/lib/bass/bass.txt @@ -1,7 +1,8 @@ -BASS 2.3 - Copyright (c) 1999-2007 Ian Luck. All rights reserved.
+BASS 2.4
+Copyright (c) 1999-2010 Un4seen Developments Ltd. All rights reserved.
-Files that you should have found in the BASS "package"
-======================================================
+Files that you should have found in the BASS package
+====================================================
Win32 version
-------------
BASS.TXT This file
@@ -9,7 +10,7 @@ BASS.DLL The BASS module BASS.CHM BASS documentation
MP3-FREE
BASS.DLL BASS module using the Windows MP3 decoder
-C\ C/C++ API and samples...
+C\ C/C++ API and examples...
BASS.H BASS C/C++ header file
BASS.LIB BASS import library
BASS.DSW Visual C++ workspace for examples
@@ -23,7 +24,6 @@ C\ C/C++ API and samples... BASSTEST\ Simple playback example
BASSTEST.C
BASSTEST.RC
- BASSTEST.H
BASSTEST.DSP
MAKEFILE
CONTEST\ Console example
@@ -53,11 +53,6 @@ C\ C/C++ API and samples... LIVESPEC.C
LIVESPEC.DSP
MAKEFILE
- LOADNGET\ LoadLibrary/GetProcAddress example
- LOADNGET.C
- LOADNGET.RC
- LOADNGET.DSP
- MAKEFILE
MULTI\ Multiple device example
MULTI.C
MULTI.RC
@@ -104,7 +99,6 @@ C\ C/C++ API and samples... FXTEST.EXE
LIVEFX.EXE
LIVESPEC.EXE
- LOADNGET.EXE
MULTI.EXE
NETRADIO.EXE
RECTEST.EXE
@@ -112,8 +106,8 @@ C\ C/C++ API and samples... SPECTRUM.EXE
SYNTH.EXE
WRITEWAV.EXE
-VB\ Visual Basic API and samples...
- BASS.BAS BASS Visual Basic module file
+VB\ Visual Basic API and examples...
+ BASS.BAS BASS Visual Basic module
3DTEST\ 3D/EAX example
PRJ3DTEST.VBP
PRJ3DTEST.FRM
@@ -142,8 +136,8 @@ VB\ Visual Basic API and samples... MODLIVESPEC.BAS
MULTI\ Multiple device example
PRJMULTI.VBP
- PRJMULTI.FRM
- PRJDEVICE.FRM
+ FRMMULTI.FRM
+ FRMDEVICE.FRM
NETRADIO\ Internet streaming example
PRJNETRADIO.VBP
FRMNETRADIO.FRM
@@ -175,7 +169,7 @@ VB\ Visual Basic API and samples... FRMMEMORY.FRM
SYNCTEST.BAS
CBASS_TIME.CLS
-DELPHI\ Delphi API and samples...
+DELPHI\ Delphi API and examples...
BASS.PAS BASS Delphi unit
3DTEST\ 3D/EAX example
D3TEST.DPR
@@ -205,6 +199,8 @@ DELPHI\ Delphi API and samples... LIVEFX.DPR
UNIT1.PAS
UNIT1.DFM
+ LIVESPEC\ "Live" version of spectrum analyser example
+ LIVESPEC.DPR
MULTI\ Multiple device example
MULTI.DPR
UNIT1.PAS
@@ -235,6 +231,10 @@ DELPHI\ Delphi API and samples... SPEAKERS.DPR
UNIT1.PAS
UNIT1.DFM
+ SPECTRUM\ Spectrum analyser example
+ SPECTRUM.DPR
+ UNIT1.PAS
+ COMMON.INC
STREAMTEST\ User stream example
STREAMTEST.DPR
STMAIN.PAS
@@ -245,7 +245,7 @@ DELPHI\ Delphi API and samples... UNITMAIN.DFM
DYNAMIC\ Dynamic-loading Delphi API
DYNAMIC_BASS.PAS Dynamic-loading Delphi unit
-MASM\ MASM API and samples...
+MASM\ MASM API and examples...
BASS.INC BASS MASM include file
PLAYER\ Example MOD player
PLAYER.EXE
@@ -254,8 +254,8 @@ MASM\ MASM API and samples... TOOLBAR.BMP
COMPILE.BAT
-NOTE: To run the sample EXEs, first you'll have to copy BASS.DLL into the
- same directory as the EXEs.
+NOTE: To run the example EXEs, first you will have to copy BASS.DLL into the
+ same directory as them.
NOTE: To avoid unnecessary bloatage, the BASS DLLs are not digitally signed.
Signed versions are available on request (email: bass@un4seen.com).
@@ -287,9 +287,12 @@ CUSTLOOP\ Custom looping example MAKEFILE
DSPTEST\ DSP example
DSPTEST.C
- DSPTEST.RC
MAKEFILE
DSPTEST.NIB
+FXTEST\ DX8 effect example
+ FXTEST.C
+ MAKEFILE
+ FXTEST.NIB
LIVESPEC\ "Live" version of spectrum analyser example
LIVESPEC.C
MAKEFILE
@@ -352,64 +355,61 @@ Intel Macs. Main Features
=============
* Samples
-- supports WAV/AIFF/MP3/MP2/MP1/OGG and custom generated samples
+ supports WAV/AIFF/MP3/MP2/MP1/OGG and custom generated samples
* Sample streams
-- stream any sample data in 8/16/32 bit
+ stream any sample data in 8/16/32 bit, with both "push" and "pull" systems
* File streams
-- MP3/MP2/MP1/OGG/WAV/AIFF file streaming
+ MP3/MP2/MP1/OGG/WAV/AIFF file streaming
* Internet file streaming
-- stream MP3/MP2/MP1/OGG/WAV/AIFF files from the internet (inc. Shout/Icecast)
+ stream files from the internet, including Shout/Icecast
* User file streaming
-- stream MP3/MP2/MP1/OGG/WAV/AIFF files from anywhere using any delivery method
+ stream files from anywhere using any delivery method
* Multi-channel streaming
-- support for more than plain stereo, including multi-channel OGG/WAV/AIFF files
+ support for more than plain stereo, including multi-channel OGG/WAV/AIFF files
* MOD music
-- uses the same engine as XMPlay = best accuracy, speed and quality
+ uses the same engine as XMPlay = best accuracy, speed, and quality
* MO3 music
-- MP3/OGG compressed MOD music
+ MP3/OGG compressed MOD music
* Add-on system
-- support for more formats is available via add-ons (aka plugins)
+ support for more formats is available via add-ons (aka plugins)
* Multiple outputs
-- simultaneously use multiple soundcards, and move channels between them
+ simultaneously use multiple soundcards, and move channels between them
* Recording
-- flexible recording system, with support for multiple devices
+ flexible recording system, with support for multiple devices
* Decode without playback
-- streams and musics can be outputted in any way you want
+ streams and MOD musics can be outputted in any way you want
* Speaker assignment
-- assign streams and musics to specific speakers
+ assign streams and MOD musics to specific speakers
* High precision synchronization
-- synchronize events in your software to the music
+ synchronize events in your software to the streams and MOD musics
* DirectX 8 effects
-- chorus/compressor/distortion/echo/flanger/gargle/parameq/reverb
+ chorus/compressor/distortion/echo/flanger/gargle/parameq/reverb
* User defined DSP functions
-- custom effects may be applied to musics and streams
+ custom effects may be applied to musics and streams
* 32 bit floating-point decoding and processing
-- floating-point stream/music decoding, DSP, FX, and recording
+ floating-point stream/music decoding, DSP, FX, and recording
* 3D sound
-- play samples/streams/musics in any 3D position, with EAX support
-
-* Expandable
-- underlying DirectSound object interfaces are accessible
+ play samples/streams/musics in any 3D position, with EAX support
* Small
-- BASS is under 100KB (on Windows), so won't bloat your distribution
+ BASS is under 100KB (on Windows), so won't bloat your distribution
Using BASS
@@ -431,12 +431,6 @@ C/C++, Visual Basic, Delphi and MASM APIs are provided, to use BASS with another language you'll first have to convert the header file. Or, as a
last resort, you could use LoadLibrary and GetProcAddress.
-One benefit of the LoadLibrary method is that it allows you to look for
-the correct BASS version, because you can load and unload BASS.DLL at
-any time. This also allows those who'd prefer not to have a separate
-DLL to store it with the program (eg. in a resource), write it to disk,
-load it, use it, free it and delete it.
-
The downside is that you have to manually import each function that you
use, with the GetProcAddress function. But it has been made a lot simpler
to import BASS this way by the use of the BASSDEF #define. Here's a small
@@ -449,8 +443,6 @@ HINSTANCE bass=LoadLibrary("BASS.DLL"); // load BASS BASS_Init=GetProcAddress(bass,"BASS_Init"); // get BASS_Init
BASS_Init(-1,44100,0,hWnd,NULL); // call BASS_Init
-See the LOADNGET.C file for a more complete example.
-
To use BASS with Borland C++ Builder, you'll first have to create a
Borland C++ Builder import library for it. This is done by using the
IMPLIB tool that comes with Borland C++ Builder. Simply execute this:
@@ -496,36 +488,36 @@ The latest version of BASS can always be found at the BASS website: www.un4seen.com
-Copyright, disclaimer, and all that other jazz
-==============================================
-The BASS library is free for non-commercial use. If you are a non-
-commercial entity (eg. an individual) and are not charging for your
-product, and the product has no other commercial purpose, then you
-can use BASS in it for free. If you wish to use BASS in commercial
-products, then please also see the next section.
+Licence
+=======
+BASS is free for non-commercial use. If you are a non-commercial entity
+(eg. an individual) and you are not charging for your product, and the
+product has no other commercial purpose, then you can use BASS in it
+for free. If you wish to use BASS in commercial products, then please
+also see the next section.
TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, BASS IS PROVIDED
"AS IS", WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND/OR FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS SHALL NOT BE HELD
-LIABLE FOR ANY DAMAGE THAT MAY RESULT FROM THE USE OF BASS. BASICALLY,
-YOU USE BASS ENTIRELY AT YOUR OWN RISK.
+LIABLE FOR ANY DAMAGE THAT MAY RESULT FROM THE USE OF BASS. YOU USE
+BASS ENTIRELY AT YOUR OWN RISK.
Usage of BASS indicates that you agree to the above conditions.
All trademarks and other registered names contained in the BASS
package are the property of their respective owners.
-
-BASS in commercial products?
-============================
+Commercial licensing
+--------------------
BASS is available for use in your commercial products. The licence
types available are as follows:
SHAREWARE: Allows the usage of BASS in an unlimited number of your
shareware products, which must sell for no more than 40 Euros each.
-If you're an individual making and selling your own software (and
-its price is within the limit), this is the licence for you.
+If you are an individual (not a corporation) making and selling your
+own software (and its price is within the limit), this is the licence
+for you.
SINGLE COMMERCIAL: Allows the usage of BASS in a single commercial
product.
@@ -538,7 +530,7 @@ required. Please note the products must be end-user products, eg. not components
used by other products.
-These licences only cover your own software. not the publishing of
+These licences only cover your own software, not the publishing of
other's software. If you publish other's software, its developers (or
the software itself) will need to be licensed to use BASS.
@@ -549,7 +541,7 @@ licence covers one person or entity and is not transferable. These licences do not allow reselling/sublicensing of BASS. For example,
if a product is a development system, the users of said product are not
-licensed to use BASS in their productions - they will need their own
+licensed to use BASS in their productions; they will need their own
licences.
If the standard licences do not meet your requirements, or if you have
@@ -559,9 +551,8 @@ Visit the BASS website for the latest pricing: www.un4seen.com
-
MP3
-===
+---
MP3 technology is patented, and Thomson license the use of their and
Fraunhofer's patents. The inclusion of an MP3 decoder (eg. BASS) in a
commercial product requires an MP3 patent licence. Contact Thomson for
@@ -569,7 +560,7 @@ details: www.mp3licensing.com
-Alternatively, the "MP3-FREE" BASS version doesn't include its own MP3
+Alternatively, the "MP3-FREE" BASS version does not include its own MP3
decoder but instead makes use of the operating system's already licensed
decoder.
@@ -585,6 +576,220 @@ There are of course bug fixes and other little improvements made along the way too! To make upgrading simpler, all functions affected by a
change to the BASS interface are listed.
+2.4.6 - 17/6/2010
+-----------------
+* Support for APEv2 tags, including binary
+ BASS_TAG_APE (BASS_ChannelGetTags type)
+ BASS_TAG_APE_BINARY (BASS_ChannelGetTags type)
+* Unicode/IDN URL support
+ BASS_StreamCreateURL
+* Decoding position retrieval
+ BASS_POS_DECODE (BASS_ChannelGetPosition flag)
+* Support for OGG 6/7.1 channel configs
+ BASS_StreamCreateFile/User/Url
+* Support for setting syncs within mixtime SYNCPROCs
+ BASS_ChannelSetSync
+* Support for setting additional DSP/FX within DSPPROCs
+ BASS_ChannelSetDSP/FX
+* DC bias removal in FFT processing
+ BASS_DATA_FFT_REMOVEDC (BASS_ChannelGetData flag)
+* Fix for incorrect (2x) return value when getting FFT data from a 16-bit channel
+ BASS_ChannelGetData
+* Fix for incorrect (STOPPED instead of PAUSED) channel status following BASS_Pause
+ BASS_ChannelIsActive
+
+2.4.5 - 18/12/2009
+------------------
+* Support for little-endian AIFF files
+ BASS_StreamCreateFile/User/Url
+ BASS_SampleLoad
+* Support for 64-bit floating-point WAVE/AIFF files
+ BASS_StreamCreateFile/User/Url
+ BASS_SampleLoad
+* Input volume retrieval failure results in a reading of -1 instead of 1
+ BASS_RecordGetInput
+ RECTEST example updated
+* Input volume support on OSX
+ BASS_RecordSetInput
+ BASS_RecordGetInput
+ RECTEST example updated
+* Fix for deferred input settings on Vista
+ BASS_RecordSetInput
+* Windows MP3 codec given preference over other installed MP3 codecs (MP3-FREE version)
+ BASS_StreamCreateFile/User/Url
+ BASS_SampleLoad
+
+2.4.4 - 13/10/2009
+------------------
+* RIFF/BWF "radio traffic" tag retrieval
+ BASS_TAG_RIFF_CART (BASS_ChannelGetTags type)
+ TAG_CART structure
+* Support for ID3v2 tags in RIFF/WAVE/AIFF files ("ID3 " chunk)
+ BASS_TAG_ID3V2 (BASS_ChannelGetTags type)
+* Pushed fractional samples are refused rather than discarded
+ BASS_StreamPutData
+* DX8 effect emulation on OSX
+ BASS_FX_DX8_CHORUS/DISTORTION/ECHO/FLANGER/PARAMEQ/REVERB (BASS_ChannelSetFX types)
+ FXTEST example added
+* UTF-16 support on OSX
+ BASS_UNICODE (BASS_StreamCreateFile/SampleLoad/MusicLoad/PluginLoad flag)
+
+2.4.3 - 8/5/2009
+----------------
+* MOD order list retrieval
+ BASS_TAG_MUSIC_ORDERS (BASS_ChannelGetTags type)
+* Support for ID3v2 tags in RIFF/WAVE files ("id3 " chunk)
+ BASS_TAG_ID3V2 (BASS_ChannelGetTags type)
+* Improved position reporting precision on Vista
+ BASS_ChannelGetPosition
+* Length retrieval when streaming in blocks (BASS_STREAM_BLOCK)
+ BASS_ChannelGetLength
+* Support for CoreAudio codecs on OSX
+ BASS_StreamCreateFile/User
+ BASS_SampleLoad
+ BASS_TAG_CA_CODEC (BASS_ChannelGetTags type)
+ TAG_CA_CODEC structure
+* 3D algorithm option support on OSX
+ BASS_CONFIG_3DALGORITHM (BASS_SetConfig option)
+
+2.4.2 - 18/9/2008
+-----------------
+* RF64 support
+ BASS_StreamCreateFile/User
+* RIFF/BWF "Broadcast Audio Extension" tag retrieval
+ BASS_TAG_RIFF_BEXT (BASS_ChannelGetTags type)
+ TAG_BEXT structure
+* ID3v1 tag structure
+ TAG_ID3 structure
+* Multiple simultaneous recordings per device on Vista & OSX (as on XP)
+ BASS_RecordStart
+* DX8 effect parameter defaults updated/corrected in documentation
+
+2.4 - 2/4/2008
+--------------
+* "Push" streaming
+ STREAMPROC_PUSH (BASS_StreamCreate "proc")
+ BASS_StreamPutData
+ LIVEFX and MULTI examples updated
+* "Push" buffered file streaming
+ STREAMFILE_BUFFERPUSH (BASS_StreamCreateFileUser system)
+ BASS_StreamPutFileData
+* STREAMFILEPROC replaced by table of callbacks for each file operation
+ BASS_FILEPROCS (FILECLOSEPROC/FILELENPROC/FILEREADPROC/FILESEEKPROC)
+ STREAMFILEPROC *removed*
+* 64-bit file positioning
+ BASS_SampleLoad
+ BASS_MusicLoad
+ BASS_StreamCreateFile
+ BASS_StreamGetFilePosition
+* File buffer level retrieval
+ BASS_FILEPOS_BUFFER (BASS_StreamGetFilePosition mode)
+* Sinc interpolated MOD music mixing
+ BASS_MUSIC_SINCINTER (BASS_MusicLoad flag)
+* MO3 2.4 support
+ BASS_MusicLoad
+* MOD orders positioning incorporated into channel functions
+ BASS_ChannelGetLength
+ BASS_ChannelSetPosition
+ BASS_ChannelGetPosition
+ BASS_MusicGetOrderPosition *removed*
+ BASS_MusicGetOrders *removed*
+* Channel attribute functions consolidated
+ BASS_ChannelSetAttribute
+ BASS_ChannelGetAttribute
+ BASS_ChannelSlideAttribute
+ BASS_ChannelIsSliding
+ BASS_ChannelSetAttributes *removed*
+ BASS_ChannelGetAttributes *removed*
+ BASS_ChannelSlideAttributes *removed*
+ BASS_ChannelSetEAXMix *removed*
+ BASS_ChannelGetEAXMix *removed*
+ BASS_MusicSetAttribute *removed*
+ BASS_MusicGetAttribute *removed*
+* Floating-point volume and panning
+ BASS_SetVolume
+ BASS_GetVolume
+ BASS_RecordSetInput
+ BASS_RecordGetInput
+ BASS_ATTRIB_PAN/VOL (BASS_ChannelGet/Set/SlideAttribute options)
+ BASS_ATTRIB_MUSIC_VOL_CHAN/INST (BASS_ChannelGet/Set/SlideAttribute options)
+ BASS_SAMPLE (volume/pan/outvol members)
+ BASS_CONFIG_MAXVOL *removed*
+ BASSTEST and RECTEST examples updated
+* Output device volume control on Vista (as on other OS)
+ BASS_SetVolume
+ BASS_GetVolume
+* Multiple update threads
+ BASS_CONFIG_UPDATETHREADS
+ BASSTEST example updated
+* Global volume range increased to 10000
+ BASS_CONFIG_GVOL_SAMPLE/STREAM/MUSIC (BASS_SetConfig options)
+ BASSTEST example updated
+* Setting and retrieving of a sample's data
+ BASS_SampleSetData
+ BASS_SampleGetData
+ BASS_SampleCreate
+ BASS_SampleCreateDone *removed*
+* Channel flag setting mask
+ BASS_ChannelFlags
+ BASS_ChannelSetFlags *removed*
+ SPEAKERS example updated
+* 256 sample FFT
+ BASS_DATA_FFT256 (BASS_ChannelGetData flag)
+* Channel locking to prevent access by other threads
+ BASS_ChannelLock
+* Manual channel buffer updating
+ BASS_ChannelUpdate
+ BASS_ChannelPreBuf *removed*
+* Configurable manual update length
+ BASS_Update
+* Extended device information retrieval and detection of new/removed devices
+ BASS_GetDeviceInfo
+ BASS_RecordGetDeviceInfo
+ BASS_DEVICEINFO structure
+ BASS_GetDeviceDescription *removed*
+ BASS_RecordGetDeviceDescription *removed*
+ BASS_INFO (driver member) *removed*
+ BASS_RECORDINFO (driver member) *removed*
+ MULTI example updated
+* Default device change tracking on Windows (as on OSX)
+ BASS_Init
+ BASS_RecordInit
+* Speaker detection from Windows control panel
+ BASS_DEVICE_CPSPEAKERS (BASS_Init flag)
+* Channel automatically stopped & resumed for DX8 effects
+ BASS_ChannelSetFX
+ BASS_ChannelRemoveFX
+* "double" precision position conversion
+ BASS_ChannelBytes2Seconds
+ BASS_ChannelSeconds2Bytes
+* Separate config functions for pointers
+ BASS_SetConfigPtr
+ BASS_GetConfigPtr
+ BASS_CONFIG_NET_AGENT/PROXY (BASS_SetConfigPtr options)
+* Configurable file format verification length
+ BASS_CONFIG_VERIFY (BASS_SetConfig option)
+* Stream filename retrieval
+ BASS_CHANNELINFO (file member)
+* Channel sample retrieval
+ BASS_CHANNELINFO (sample member)
+* META syncs no longer receive metadata in the "data" parameter
+ BASS_SYNC_META (BASS_ChannelSetSync type)
+* Separate sync for OGG logical bitstream changes (instead of BASS_SYNC_META)
+ BASS_SYNC_OGG_CHANGE (BASS_ChannelSetSync type)
+ NETRADIO example updated (C version)
+* Message syncing removed (use PostMessage instead)
+ BASS_SYNC_MESSAGE (BASS_ChannelSetSync flag) *removed*
+* Data retrieval from stopped/paused channels
+ BASS_ChannelGetData
+* Callback "user" parameters changed to pointers
+ BASS_StreamCreate / STREAMPROC
+ BASS_StreamCreateFileUser
+ BASS_StreamCreateURL / DOWNLOADPROC
+ BASS_RecordStart / RECORDPROC
+ BASS_ChannelSetDSP / DSPPROC
+ BASS_ChannelSetSync / SYNCPROC
+
2.3.0.3 - 30/7/2007
-------------------
* FX state resetting
@@ -623,7 +828,7 @@ change to the BASS interface are listed. BASS_ChannelStop
* Sample channels created paused to prevent overriding before playback
BASS_SampleGetChannel
-* Separate "MP3-FREE" version using Windows/OSX MP3 decoder
+* Separate "MP3-FREE" version using the OS's MP3 decoder
BASS_CONFIG_MP3_CODEC *removed*
2.3.0.1 - 12/6/2006
@@ -964,7 +1169,7 @@ change to the BASS interface are listed. BASS_ChannelSeconds2Bytes return value is rounded down to nearest sample
BASS_ChannelGetData "length" param must equal a whole number of samples
Slide syncs are triggered by "-2" volume slides on "autofree" streams
-* Support for UNICODE filenames
+* Support for Unicode filenames
BASS_UNICODE (BASS_SampleLoad/BASS_StreamCreateFile/BASS_MusicLoad flag)
* 4096 sample FFT
BASS_DATA_FFT4096/S (BASS_ChannelGetData flags)
@@ -1351,7 +1556,7 @@ change to the BASS interface are listed. 0.8 - 24/1/2000
---------------
-* Improved MP3 performance on P2/K6 and above CPUs - fast!
+* Improved MP3 performance on P2/K6 and above CPUs
* User DSP functions on streams and MOD musics
BASS_ChannelSetDSP
BASS_ChannelRemoveDSP
@@ -1526,21 +1731,26 @@ change to the BASS interface are listed. * First public release
-Credits - API/Sample Contributors
-=================================
-Visual Basic - Adam Hoult, Hendrik Knaepen, Arthur Aminov,
- Peter Hebels
-Delphi - Titus Miloi, Rogier Timmermans, Alessandro Cappellozza,
- Jesse Naranjo, Chris Troesken
-MASM - Octavian Chis
+Credits
+=======
+Ogg Vorbis decoding is based on libogg/vorbis,
+Copyright (c) 2002-2004 Xiph.org Foundation
+
+CHMOX is (c) 2004 Stéphane Boisson, http://chmox.sourceforge.net/
-CHMOX is (c)2004 Stéphane Boisson, http://chmox.sourceforge.net/
+API/Sample contributors
+-----------------------
+Visual Basic: Adam Hoult, Hendrik Knaepen, Arthur Aminov,
+ Peter Hebels
+Delphi: Titus Miloi, Rogier Timmermans, Alessandro Cappellozza,
+ Jesse Naranjo, Chris Troesken, Evgeny Melnikov
+MASM: Octavian Chis
Bug reports, Suggestions, Comments, Enquiries, etc...
=====================================================
-If you have any of the aforementioned please see the BASS forum (at
-the website). If you can't find an answer there, you can email:
+If you have any of the aforementioned please visit the BASS forum at
+the website. If you can't find an answer there, you can also email:
bass@un4seen.com
diff --git a/Game/Code/lib/bass/delphi/bass.bpg b/Game/Code/lib/bass/delphi/bass.bpg index 55c2e004..da3e524f 100644 --- a/Game/Code/lib/bass/delphi/bass.bpg +++ b/Game/Code/lib/bass/delphi/bass.bpg @@ -37,6 +37,9 @@ FXtest.exe: fxtest\FXtest.dpr livefx.exe: livefx\livefx.dpr
$(DCC)
+livespec.exe: livespec\livespec.dpr
+ $(DCC)
+
Multi.exe: multi\Multi.dpr
$(DCC)
@@ -55,9 +58,15 @@ samplevis.exe: SampleVis\samplevis.dpr Speakers.exe: Speakers\Speakers.dpr
$(DCC)
+spectrum.exe: spectrum\spectrum.dpr
+ $(DCC)
+
StreamTest.exe: StreamTest\StreamTest.dpr
$(DCC)
+synth.exe: synth\synth.dpr
+ $(DCC)
+
writewav.exe: writewav\writewav.dpr
$(DCC)
diff --git a/Game/Code/lib/bass/delphi/bass.pas b/Game/Code/lib/bass/delphi/bass.pas index ba661699..bdcd5900 100644 --- a/Game/Code/lib/bass/delphi/bass.pas +++ b/Game/Code/lib/bass/delphi/bass.pas @@ -1,15 +1,17 @@ {
- BASS 2.3 Audio Library, (c) 1999-2007 Ian Luck.
- Please report bugs/suggestions/etc... to bass@un4seen.com
-
- See the BASS.CHM file for more complete documentation
+ BASS 2.4 Delphi unit
+ Copyright (c) 1999-2010 Un4seen Developments Ltd.
+ See the BASS.CHM file for more detailed documentation
How to install
- ----------------
+ --------------
Copy BASS.PAS to the \LIB subdirectory of your Delphi path or your project dir
+
+ NOTE: Delphi 2009 users should use the BASS_UNICODE flag where possible
}
-unit Bass;
+
+unit BASS;
interface
@@ -17,25 +19,25 @@ uses Windows;
const
- BASSVERSION = $203; // API version
+ BASSVERSION = $204; // API version
+ BASSVERSIONTEXT = '2.4';
// Use these to test for error from functions that return a DWORD or QWORD
- DW_ERROR = Cardinal(-1); // -1 (DWORD)
+ DW_ERROR = LongWord(-1); // -1 (DWORD)
QW_ERROR = Int64(-1); // -1 (QWORD)
- // Error codes returned by BASS_GetErrorCode()
+ // Error codes returned by BASS_ErrorGetCode()
BASS_OK = 0; // all is OK
BASS_ERROR_MEM = 1; // memory error
BASS_ERROR_FILEOPEN = 2; // can't open the file
BASS_ERROR_DRIVER = 3; // can't find a free sound driver
- BASS_ERROR_BUFLOST = 4; // the sample buffer was lost - please report this!
+ BASS_ERROR_BUFLOST = 4; // the sample buffer was lost
BASS_ERROR_HANDLE = 5; // invalid handle
BASS_ERROR_FORMAT = 6; // unsupported sample format
- BASS_ERROR_POSITION = 7; // invalid playback position
+ BASS_ERROR_POSITION = 7; // invalid position
BASS_ERROR_INIT = 8; // BASS_Init has not been successfully called
BASS_ERROR_START = 9; // BASS_Start has not been successfully called
BASS_ERROR_ALREADY = 14; // already initialized/paused/whatever
- BASS_ERROR_NOPAUSE = 16; // not paused
BASS_ERROR_NOCHAN = 18; // can't get a free channel
BASS_ERROR_ILLTYPE = 19; // an illegal type was specified
BASS_ERROR_ILLPARAM = 20; // an illegal parameter was specified
@@ -50,7 +52,6 @@ const BASS_ERROR_NONET = 32; // no internet connection could be opened
BASS_ERROR_CREATE = 33; // couldn't create the file
BASS_ERROR_NOFX = 34; // effects are not enabled
- BASS_ERROR_PLAYING = 35; // the channel is playing
BASS_ERROR_NOTAVAIL = 37; // requested data is not available
BASS_ERROR_DECODE = 38; // the channel is a "decoding channel"
BASS_ERROR_DX = 39; // a sufficient DirectX version is not installed
@@ -59,19 +60,41 @@ const BASS_ERROR_SPEAKER = 42; // unavailable speaker
BASS_ERROR_VERSION = 43; // invalid BASS version (used by add-ons)
BASS_ERROR_CODEC = 44; // codec is not available/supported
- BASS_ERROR_UNKNOWN = -1; // some other mystery error
+ BASS_ERROR_ENDED = 45; // the channel/file has ended
+ BASS_ERROR_BUSY = 46; // the device is busy
+ BASS_ERROR_UNKNOWN = -1; // some other mystery problem
+
+ // BASS_SetConfig options
+ BASS_CONFIG_BUFFER = 0;
+ BASS_CONFIG_UPDATEPERIOD = 1;
+ BASS_CONFIG_GVOL_SAMPLE = 4;
+ BASS_CONFIG_GVOL_STREAM = 5;
+ BASS_CONFIG_GVOL_MUSIC = 6;
+ BASS_CONFIG_CURVE_VOL = 7;
+ BASS_CONFIG_CURVE_PAN = 8;
+ BASS_CONFIG_FLOATDSP = 9;
+ BASS_CONFIG_3DALGORITHM = 10;
+ BASS_CONFIG_NET_TIMEOUT = 11;
+ BASS_CONFIG_NET_BUFFER = 12;
+ BASS_CONFIG_PAUSE_NOPLAY = 13;
+ BASS_CONFIG_NET_PREBUF = 15;
+ BASS_CONFIG_NET_PASSIVE = 18;
+ BASS_CONFIG_REC_BUFFER = 19;
+ BASS_CONFIG_NET_PLAYLIST = 21;
+ BASS_CONFIG_MUSIC_VIRTUAL = 22;
+ BASS_CONFIG_VERIFY = 23;
+ BASS_CONFIG_UPDATETHREADS = 24;
+
+ // BASS_SetConfigPtr options
+ BASS_CONFIG_NET_AGENT = 16;
+ BASS_CONFIG_NET_PROXY = 17;
// Initialization flags
BASS_DEVICE_8BITS = 1; // use 8 bit resolution, else 16 bit
BASS_DEVICE_MONO = 2; // use mono, else stereo
BASS_DEVICE_3D = 4; // enable 3D functionality
- {
- If the BASS_DEVICE_3D flag is not specified when
- initilizing BASS, then the 3D flags (BASS_SAMPLE_3D
- and BASS_MUSIC_3D) are ignored when loading/creating
- a sample/stream/music.
- }
BASS_DEVICE_LATENCY = 256; // calculate device latency (BASS_INFO struct)
+ BASS_DEVICE_CPSPEAKERS = 1024; // detect speakers via Windows control panel
BASS_DEVICE_SPEAKERS = 2048; // force enabling of speaker assignment
BASS_DEVICE_NOSPEAKER = 4096; // ignore speaker arrangement
@@ -79,28 +102,23 @@ const BASS_OBJECT_DS = 1; // IDirectSound
BASS_OBJECT_DS3DL = 2; // IDirectSound3DListener
+ // BASS_DEVICEINFO flags
+ BASS_DEVICE_ENABLED = 1;
+ BASS_DEVICE_DEFAULT = 2;
+ BASS_DEVICE_INIT = 4;
+
// BASS_INFO flags (from DSOUND.H)
- DSCAPS_CONTINUOUSRATE = $00000010;
- { supports all sample rates between min/maxrate }
- DSCAPS_EMULDRIVER = $00000020;
- { device does NOT have hardware DirectSound support }
- DSCAPS_CERTIFIED = $00000040;
- { device driver has been certified by Microsoft }
- {
- The following flags tell what type of samples are
- supported by HARDWARE mixing, all these formats are
- supported by SOFTWARE mixing
- }
+ DSCAPS_CONTINUOUSRATE = $00000010; // supports all sample rates between min/maxrate
+ DSCAPS_EMULDRIVER = $00000020; // device does NOT have hardware DirectSound support
+ DSCAPS_CERTIFIED = $00000040; // device driver has been certified by Microsoft
DSCAPS_SECONDARYMONO = $00000100; // mono
DSCAPS_SECONDARYSTEREO = $00000200; // stereo
DSCAPS_SECONDARY8BIT = $00000400; // 8 bit
DSCAPS_SECONDARY16BIT = $00000800; // 16 bit
// BASS_RECORDINFO flags (from DSOUND.H)
- DSCCAPS_EMULDRIVER = DSCAPS_EMULDRIVER;
- { device does NOT have hardware DirectSound recording support }
- DSCCAPS_CERTIFIED = DSCAPS_CERTIFIED;
- { device driver has been certified by Microsoft }
+ DSCCAPS_EMULDRIVER = DSCAPS_EMULDRIVER; // device does NOT have hardware DirectSound recording support
+ DSCCAPS_CERTIFIED = DSCAPS_CERTIFIED; // device driver has been certified by Microsoft
// defines for formats field of BASS_RECORDINFO (from MMSYSTEM.H)
WAVE_FORMAT_1M08 = $00000001; // 11.025 kHz, Mono, 8-bit
@@ -116,21 +134,20 @@ const WAVE_FORMAT_4M16 = $00000400; // 44.1 kHz, Mono, 16-bit
WAVE_FORMAT_4S16 = $00000800; // 44.1 kHz, Stereo, 16-bit
- // Sample info flags
BASS_SAMPLE_8BITS = 1; // 8 bit
BASS_SAMPLE_FLOAT = 256; // 32-bit floating-point
- BASS_SAMPLE_MONO = 2; // mono, else stereo
+ BASS_SAMPLE_MONO = 2; // mono
BASS_SAMPLE_LOOP = 4; // looped
- BASS_SAMPLE_3D = 8; // 3D functionality enabled
- BASS_SAMPLE_SOFTWARE = 16; // it's NOT using hardware mixing
- BASS_SAMPLE_MUTEMAX = 32; // muted at max distance (3D only)
- BASS_SAMPLE_VAM = 64; // uses the DX7 voice allocation & management
- BASS_SAMPLE_FX = 128; // old implementation of DX8 effects are enabled
+ BASS_SAMPLE_3D = 8; // 3D functionality
+ BASS_SAMPLE_SOFTWARE = 16; // not using hardware mixing
+ BASS_SAMPLE_MUTEMAX = 32; // mute at max distance (3D only)
+ BASS_SAMPLE_VAM = 64; // DX7 voice allocation & management
+ BASS_SAMPLE_FX = 128; // old implementation of DX8 effects
BASS_SAMPLE_OVER_VOL = $10000; // override lowest volume
BASS_SAMPLE_OVER_POS = $20000; // override longest playing
BASS_SAMPLE_OVER_DIST = $30000; // override furthest from listener (3D only)
- BASS_STREAM_PRESCAN = $20000; // enable pin-point seeking (MP3/MP2/MP1)
+ BASS_STREAM_PRESCAN = $20000; // enable pin-point seeking/length (MP3/MP2/MP1)
BASS_MP3_SETPOS = BASS_STREAM_PRESCAN;
BASS_STREAM_AUTOFREE = $40000; // automatically free the stream when it stop/ends
BASS_STREAM_RESTRATE = $80000; // restrict the download rate of internet file streams
@@ -138,13 +155,13 @@ const BASS_STREAM_DECODE = $200000;// don't play the stream, only decode (BASS_ChannelGetData)
BASS_STREAM_STATUS = $800000;// give server status info (HTTP/ICY tags) in DOWNLOADPROC
- BASS_MUSIC_FLOAT = BASS_SAMPLE_FLOAT; // 32-bit floating-point
- BASS_MUSIC_MONO = BASS_SAMPLE_MONO; // force mono mixing (less CPU usage)
- BASS_MUSIC_LOOP = BASS_SAMPLE_LOOP; // loop music
- BASS_MUSIC_3D = BASS_SAMPLE_3D; // enable 3D functionality
- BASS_MUSIC_FX = BASS_SAMPLE_FX; // enable old implementation of DX8 effects
- BASS_MUSIC_AUTOFREE = BASS_STREAM_AUTOFREE; // automatically free the music when it stop/ends
- BASS_MUSIC_DECODE = BASS_STREAM_DECODE; // don't play the music, only decode (BASS_ChannelGetData)
+ BASS_MUSIC_FLOAT = BASS_SAMPLE_FLOAT;
+ BASS_MUSIC_MONO = BASS_SAMPLE_MONO;
+ BASS_MUSIC_LOOP = BASS_SAMPLE_LOOP;
+ BASS_MUSIC_3D = BASS_SAMPLE_3D;
+ BASS_MUSIC_FX = BASS_SAMPLE_FX;
+ BASS_MUSIC_AUTOFREE = BASS_STREAM_AUTOFREE;
+ BASS_MUSIC_DECODE = BASS_STREAM_DECODE;
BASS_MUSIC_PRESCAN = BASS_STREAM_PRESCAN; // calculate playback length
BASS_MUSIC_CALCLEN = BASS_MUSIC_PRESCAN;
BASS_MUSIC_RAMP = $200; // normal ramping
@@ -153,7 +170,8 @@ const BASS_MUSIC_SURROUND2 = $1000; // surround sound (mode 2)
BASS_MUSIC_FT2MOD = $2000; // play .MOD as FastTracker 2 does
BASS_MUSIC_PT1MOD = $4000; // play .MOD as ProTracker 1 does
- BASS_MUSIC_NONINTER = $10000; // non-interpolated mixing
+ BASS_MUSIC_NONINTER = $10000; // non-interpolated sample mixing
+ BASS_MUSIC_SINCINTER = $800000; // sinc interpolated sample mixing
BASS_MUSIC_POSRESET = $8000; // stop all notes when moving position
BASS_MUSIC_POSRESETEX = $400000; // stop all notes and reset bmp/etc when moving position
BASS_MUSIC_STOPBACK = $80000; // stop the music on a backwards jump effect
@@ -179,44 +197,12 @@ const BASS_RECORD_PAUSE = $8000; // start recording paused
- // DX7 voice allocation flags
+ // DX7 voice allocation & management flags
BASS_VAM_HARDWARE = 1;
- {
- Play the sample in hardware. If no hardware voices are available then
- the "play" call will fail
- }
BASS_VAM_SOFTWARE = 2;
- {
- Play the sample in software (ie. non-accelerated). No other VAM flags
- may be used together with this flag.
- }
-
- // DX7 voice management flags
- {
- These flags enable hardware resource stealing... if the hardware has no
- available voices, a currently playing buffer will be stopped to make room
- for the new buffer. NOTE: only samples loaded/created with the
- BASS_SAMPLE_VAM flag are considered for termination by the DX7 voice
- management.
- }
BASS_VAM_TERM_TIME = 4;
- {
- If there are no free hardware voices, the buffer to be terminated will be
- the one with the least time left to play.
- }
BASS_VAM_TERM_DIST = 8;
- {
- If there are no free hardware voices, the buffer to be terminated will be
- one that was loaded/created with the BASS_SAMPLE_MUTEMAX flag and is
- beyond
- it's max distance. If there are no buffers that match this criteria, then
- the "play" call will fail.
- }
BASS_VAM_TERM_PRIO = 16;
- {
- If there are no free hardware voices, the buffer to be terminated will be
- the one with the lowest priority.
- }
// BASS_CHANNELINFO types
BASS_CTYPE_SAMPLE = 1;
@@ -238,21 +224,15 @@ const BASS_CTYPE_MUSIC_MO3 = $00100; // MO3 flag
// 3D channel modes
- BASS_3DMODE_NORMAL = 0;
- { normal 3D processing }
- BASS_3DMODE_RELATIVE = 1;
- {
- The channel's 3D position (position/velocity/
- orientation) are relative to the listener. When the
- listener's position/velocity/orientation is changed
- with BASS_Set3DPosition, the channel's position
- relative to the listener does not change.
- }
- BASS_3DMODE_OFF = 2;
- {
- Turn off 3D processing on the channel, the sound will
- be played in the center.
- }
+ BASS_3DMODE_NORMAL = 0; // normal 3D processing
+ BASS_3DMODE_RELATIVE = 1; // position is relative to the listener
+ BASS_3DMODE_OFF = 2; // no 3D processing
+
+ // software 3D mixing algorithms (used with BASS_CONFIG_3DALGORITHM)
+ BASS_3DALG_DEFAULT = 0;
+ BASS_3DALG_OFF = 1;
+ BASS_3DALG_FULL = 2;
+ BASS_3DALG_LIGHT = 3;
// EAX environments, use with BASS_SetEAXParameters
EAX_ENVIRONMENT_GENERIC = 0;
@@ -284,118 +264,41 @@ const // total number of environments
EAX_ENVIRONMENT_COUNT = 26;
- // software 3D mixing algorithm modes (used with BASS_Set3DAlgorithm)
- BASS_3DALG_DEFAULT = 0;
- {
- default algorithm (currently translates to BASS_3DALG_OFF)
- }
- BASS_3DALG_OFF = 1;
- {
- Uses normal left and right panning. The vertical axis is ignored except
- for scaling of volume due to distance. Doppler shift and volume scaling
- are still applied, but the 3D filtering is not performed. This is the
- most CPU efficient software implementation, but provides no virtual 3D
- audio effect. Head Related Transfer Function processing will not be done.
- Since only normal stereo panning is used, a channel using this algorithm
- may be accelerated by a 2D hardware voice if no free 3D hardware voices
- are available.
- }
- BASS_3DALG_FULL = 2;
- {
- This algorithm gives the highest quality 3D audio effect, but uses more
- CPU. Requires Windows 98 2nd Edition or Windows 2000 that uses WDM
- drivers, if this mode is not available then BASS_3DALG_OFF will be used
- instead.
- }
- BASS_3DALG_LIGHT = 3;
- {
- This algorithm gives a good 3D audio effect, and uses less CPU than the
- FULL mode. Requires Windows 98 2nd Edition or Windows 2000 that uses WDM
- drivers, if this mode is not available then BASS_3DALG_OFF will be used
- instead.
- }
+ BASS_STREAMPROC_END = $80000000; // end of user stream flag
- {
- Sync types (with BASS_ChannelSetSync() "param" and
- SYNCPROC "data" definitions) & flags.
- }
- BASS_SYNC_POS = 0;
- {
- Sync when a channel reaches a position.
- param: position in bytes
- data : not used
- }
- BASS_SYNC_END = 2;
- {
- Sync when a channel reaches the end.
- param: not used
- data : not used
- }
- BASS_SYNC_META = 4;
- {
- Sync when metadata is received in a stream.
- param: not used
- data : pointer to the metadata
- }
- BASS_SYNC_SLIDE = 5;
- {
- Sync when an attribute slide is completed.
- param: not used
- data : the type of slide completed (one of the BASS_SLIDE_xxx values)
- }
- BASS_SYNC_STALL = 6;
- {
- Sync when playback has stalled.
- param: not used
- data : 0=stalled, 1=resumed
- }
- BASS_SYNC_DOWNLOAD = 7;
- {
- Sync when downloading of an internet (or "buffered" user file) stream has ended.
- param: not used
- data : not used
- }
- BASS_SYNC_FREE = 8;
- {
- Sync when a channel is freed.
- param: not used
- data : not used
- }
- BASS_SYNC_SETPOS = 11;
- {
- Sync when a channel's position is set.
- param: not used
- data : 0 = playback buffer not flushed, 1 = playback buffer flushed
- }
- BASS_SYNC_MUSICPOS = 10;
- {
- Sync when a MOD music reaches an order:row position.
- param: LOWORD=order (0=first, -1=all) HIWORD=row (0=first, -1=all)
- data : LOWORD=order HIWORD=row
- }
- BASS_SYNC_MUSICINST = 1;
- {
- Sync when an instrument (sample for the non-instrument based formats)
- is played in a MOD music (not including retrigs).
- param: LOWORD=instrument (1=first) HIWORD=note (0=c0...119=b9, -1=all)
- data : LOWORD=note HIWORD=volume (0-64)
- }
- BASS_SYNC_MUSICFX = 3;
- {
- Sync when the "sync" effect (XM/MTM/MOD: E8x/Wxx, IT/S3M: S2x) is used.
- param: 0:data=pos, 1:data="x" value
- data : param=0: LOWORD=order HIWORD=row, param=1: "x" value
- }
- BASS_SYNC_MESSAGE = $20000000;
- { FLAG: post a Windows message (instead of callback)
- When using a window message "callback", the message to post is given in the "proc"
- parameter of BASS_ChannelSetSync, and is posted to the window specified in the BASS_Init
- call. The message parameters are: WPARAM = data, LPARAM = user.
- }
- BASS_SYNC_MIXTIME = $40000000;
- { FLAG: sync at mixtime, else at playtime }
- BASS_SYNC_ONETIME = $80000000;
- { FLAG: sync only once, else continuously }
+
+ // BASS_StreamCreateFileUser file systems
+ STREAMFILE_NOBUFFER = 0;
+ STREAMFILE_BUFFER = 1;
+ STREAMFILE_BUFFERPUSH = 2;
+
+ // BASS_StreamPutFileData options
+ BASS_FILEDATA_END = 0; // end & close the file
+
+ // BASS_StreamGetFilePosition modes
+ BASS_FILEPOS_CURRENT = 0;
+ BASS_FILEPOS_DECODE = BASS_FILEPOS_CURRENT;
+ BASS_FILEPOS_DOWNLOAD = 1;
+ BASS_FILEPOS_END = 2;
+ BASS_FILEPOS_START = 3;
+ BASS_FILEPOS_CONNECTED = 4;
+ BASS_FILEPOS_BUFFER = 5;
+
+ // BASS_ChannelSetSync types
+ BASS_SYNC_POS = 0;
+ BASS_SYNC_END = 2;
+ BASS_SYNC_META = 4;
+ BASS_SYNC_SLIDE = 5;
+ BASS_SYNC_STALL = 6;
+ BASS_SYNC_DOWNLOAD = 7;
+ BASS_SYNC_FREE = 8;
+ BASS_SYNC_SETPOS = 11;
+ BASS_SYNC_MUSICPOS = 10;
+ BASS_SYNC_MUSICINST = 1;
+ BASS_SYNC_MUSICFX = 3;
+ BASS_SYNC_OGG_CHANGE = 12;
+ BASS_SYNC_MIXTIME = $40000000; // FLAG: sync at mixtime, else at playtime
+ BASS_SYNC_ONETIME = $80000000; // FLAG: sync only once, else continuously
// BASS_ChannelIsActive return values
BASS_ACTIVE_STOPPED = 0;
@@ -403,59 +306,63 @@ const BASS_ACTIVE_STALLED = 2;
BASS_ACTIVE_PAUSED = 3;
- // BASS_ChannelIsSliding return flags
- BASS_SLIDE_FREQ = 1;
- BASS_SLIDE_VOL = 2;
- BASS_SLIDE_PAN = 4;
+ // Channel attributes
+ BASS_ATTRIB_FREQ = 1;
+ BASS_ATTRIB_VOL = 2;
+ BASS_ATTRIB_PAN = 3;
+ BASS_ATTRIB_EAXMIX = 4;
+ BASS_ATTRIB_MUSIC_AMPLIFY = $100;
+ BASS_ATTRIB_MUSIC_PANSEP = $101;
+ BASS_ATTRIB_MUSIC_PSCALER = $102;
+ BASS_ATTRIB_MUSIC_BPM = $103;
+ BASS_ATTRIB_MUSIC_SPEED = $104;
+ BASS_ATTRIB_MUSIC_VOL_GLOBAL = $105;
+ BASS_ATTRIB_MUSIC_VOL_CHAN = $200; // + channel #
+ BASS_ATTRIB_MUSIC_VOL_INST = $300; // + instrument #
// BASS_ChannelGetData flags
BASS_DATA_AVAILABLE = 0; // query how much data is buffered
BASS_DATA_FLOAT = $40000000; // flag: return floating-point sample data
- BASS_DATA_FFT512 = $80000000; // 512 sample FFT
- BASS_DATA_FFT1024 = $80000001; // 1024 FFT
- BASS_DATA_FFT2048 = $80000002; // 2048 FFT
- BASS_DATA_FFT4096 = $80000003; // 4096 FFT
- BASS_DATA_FFT8192 = $80000004; // 8192 FFT
+ BASS_DATA_FFT256 = $80000000; // 256 sample FFT
+ BASS_DATA_FFT512 = $80000001; // 512 FFT
+ BASS_DATA_FFT1024 = $80000002; // 1024 FFT
+ BASS_DATA_FFT2048 = $80000003; // 2048 FFT
+ BASS_DATA_FFT4096 = $80000004; // 4096 FFT
+ BASS_DATA_FFT8192 = $80000005; // 8192 FFT
BASS_DATA_FFT_INDIVIDUAL = $10; // FFT flag: FFT for each channel, else all combined
BASS_DATA_FFT_NOWINDOW = $20; // FFT flag: no Hanning window
+ BASS_DATA_FFT_REMOVEDC = $40; // FFT flag: pre-remove DC bias
// BASS_ChannelGetTags types : what's returned
- BASS_TAG_ID3 = 0; // ID3v1 tags : 128 byte block
+ BASS_TAG_ID3 = 0; // ID3v1 tags : TAG_ID3 structure
BASS_TAG_ID3V2 = 1; // ID3v2 tags : variable length block
- BASS_TAG_OGG = 2; // OGG comments : array of null-terminated strings
- BASS_TAG_HTTP = 3; // HTTP headers : array of null-terminated strings
- BASS_TAG_ICY = 4; // ICY headers : array of null-terminated strings
- BASS_TAG_META = 5; // ICY metadata : null-terminated string
- BASS_TAG_VENDOR = 9; // OGG encoder : null-terminated string
+ BASS_TAG_OGG = 2; // OGG comments : series of null-terminated UTF-8 strings
+ BASS_TAG_HTTP = 3; // HTTP headers : series of null-terminated ANSI strings
+ BASS_TAG_ICY = 4; // ICY headers : series of null-terminated ANSI strings
+ BASS_TAG_META = 5; // ICY metadata : ANSI string
+ BASS_TAG_APE = 6; // APEv2 tags : series of null-terminated UTF-8 strings
+ BASS_TAG_VENDOR = 9; // OGG encoder : UTF-8 string
BASS_TAG_LYRICS3 = 10; // Lyric3v2 tag : ASCII string
- BASS_TAG_RIFF_INFO = $100; // RIFF/WAVE tags : array of null-terminated ANSI strings
+ BASS_TAG_RIFF_INFO = $100; // RIFF "INFO" tags : series of null-terminated ANSI strings
+ BASS_TAG_RIFF_BEXT = $101; // RIFF/BWF "bext" tags : TAG_BEXT structure
+ BASS_TAG_RIFF_CART = $102; // RIFF/BWF "cart" tags : TAG_CART structure
+ BASS_TAG_APE_BINARY = $1000; // + index #, binary APEv2 tag : TAG_APE_BINARY structure
BASS_TAG_MUSIC_NAME = $10000; // MOD music name : ANSI string
BASS_TAG_MUSIC_MESSAGE = $10001; // MOD message : ANSI string
+ BASS_TAG_MUSIC_ORDERS = $10002; // MOD order list : BYTE array of pattern numbers
BASS_TAG_MUSIC_INST = $10100; // + instrument #, MOD instrument name : ANSI string
BASS_TAG_MUSIC_SAMPLE = $10300; // + sample #, MOD sample name : ANSI string
- BASS_FX_CHORUS = 0; // GUID_DSFX_STANDARD_CHORUS
- BASS_FX_COMPRESSOR = 1; // GUID_DSFX_STANDARD_COMPRESSOR
- BASS_FX_DISTORTION = 2; // GUID_DSFX_STANDARD_DISTORTION
- BASS_FX_ECHO = 3; // GUID_DSFX_STANDARD_ECHO
- BASS_FX_FLANGER = 4; // GUID_DSFX_STANDARD_FLANGER
- BASS_FX_GARGLE = 5; // GUID_DSFX_STANDARD_GARGLE
- BASS_FX_I3DL2REVERB = 6; // GUID_DSFX_STANDARD_I3DL2REVERB
- BASS_FX_PARAMEQ = 7; // GUID_DSFX_STANDARD_PARAMEQ
- BASS_FX_REVERB = 8; // GUID_DSFX_WAVES_REVERB
-
- BASS_FX_PHASE_NEG_180 = 0;
- BASS_FX_PHASE_NEG_90 = 1;
- BASS_FX_PHASE_ZERO = 2;
- BASS_FX_PHASE_90 = 3;
- BASS_FX_PHASE_180 = 4;
+ // BASS_ChannelGetLength/GetPosition/SetPosition modes
+ BASS_POS_BYTE = 0; // byte position
+ BASS_POS_MUSIC_ORDER = 1; // order.row position, MAKELONG(order,row)
+ BASS_POS_DECODE = $10000000; // flag: get the decoding (not playing) position
// BASS_RecordSetInput flags
BASS_INPUT_OFF = $10000;
BASS_INPUT_ON = $20000;
- BASS_INPUT_LEVEL = $40000;
- BASS_INPUT_TYPE_MASK = $ff000000;
+ BASS_INPUT_TYPE_MASK = $FF000000;
BASS_INPUT_TYPE_UNDEF = $00000000;
BASS_INPUT_TYPE_DIGITAL = $01000000;
BASS_INPUT_TYPE_LINE = $02000000;
@@ -466,65 +373,29 @@ const BASS_INPUT_TYPE_SPEAKER = $07000000;
BASS_INPUT_TYPE_WAVE = $08000000;
BASS_INPUT_TYPE_AUX = $09000000;
- BASS_INPUT_TYPE_ANALOG = $0a000000;
-
- // BASS_SetNetConfig flags
- BASS_NET_TIMEOUT = 0;
- BASS_NET_BUFFER = 1;
-
- // BASS_StreamGetFilePosition modes
- BASS_FILEPOS_CURRENT = 0;
- BASS_FILEPOS_DECODE = BASS_FILEPOS_CURRENT;
- BASS_FILEPOS_DOWNLOAD = 1;
- BASS_FILEPOS_END = 2;
- BASS_FILEPOS_START = 3;
- BASS_FILEPOS_CONNECTED = 4;
-
- // STREAMFILEPROC actions
- BASS_FILE_CLOSE = 0;
- BASS_FILE_READ = 1;
- BASS_FILE_LEN = 3;
- BASS_FILE_SEEK = 4;
-
- BASS_STREAMPROC_END = $80000000; // end of user stream flag
-
- // BASS_MusicSet/GetAttribute options
- BASS_MUSIC_ATTRIB_AMPLIFY = 0;
- BASS_MUSIC_ATTRIB_PANSEP = 1;
- BASS_MUSIC_ATTRIB_PSCALER = 2;
- BASS_MUSIC_ATTRIB_BPM = 3;
- BASS_MUSIC_ATTRIB_SPEED = 4;
- BASS_MUSIC_ATTRIB_VOL_GLOBAL = 5;
- BASS_MUSIC_ATTRIB_VOL_CHAN = $100; // + channel #
- BASS_MUSIC_ATTRIB_VOL_INST = $200; // + instrument #
-
- // BASS_Set/GetConfig options
- BASS_CONFIG_BUFFER = 0;
- BASS_CONFIG_UPDATEPERIOD = 1;
- BASS_CONFIG_MAXVOL = 3;
- BASS_CONFIG_GVOL_SAMPLE = 4;
- BASS_CONFIG_GVOL_STREAM = 5;
- BASS_CONFIG_GVOL_MUSIC = 6;
- BASS_CONFIG_CURVE_VOL = 7;
- BASS_CONFIG_CURVE_PAN = 8;
- BASS_CONFIG_FLOATDSP = 9;
- BASS_CONFIG_3DALGORITHM = 10;
- BASS_CONFIG_NET_TIMEOUT = 11;
- BASS_CONFIG_NET_BUFFER = 12;
- BASS_CONFIG_PAUSE_NOPLAY = 13;
- BASS_CONFIG_NET_PREBUF = 15;
- BASS_CONFIG_NET_AGENT = 16;
- BASS_CONFIG_NET_PROXY = 17;
- BASS_CONFIG_NET_PASSIVE = 18;
- BASS_CONFIG_REC_BUFFER = 19;
- BASS_CONFIG_NET_PLAYLIST = 21;
- BASS_CONFIG_MUSIC_VIRTUAL = 22;
+ BASS_INPUT_TYPE_ANALOG = $0A000000;
+
+ BASS_FX_DX8_CHORUS = 0;
+ BASS_FX_DX8_COMPRESSOR = 1;
+ BASS_FX_DX8_DISTORTION = 2;
+ BASS_FX_DX8_ECHO = 3;
+ BASS_FX_DX8_FLANGER = 4;
+ BASS_FX_DX8_GARGLE = 5;
+ BASS_FX_DX8_I3DL2REVERB = 6;
+ BASS_FX_DX8_PARAMEQ = 7;
+ BASS_FX_DX8_REVERB = 8;
+
+ BASS_DX8_PHASE_NEG_180 = 0;
+ BASS_DX8_PHASE_NEG_90 = 1;
+ BASS_DX8_PHASE_ZERO = 2;
+ BASS_DX8_PHASE_90 = 3;
+ BASS_DX8_PHASE_180 = 4;
type
- DWORD = cardinal;
+ DWORD = LongWord;
BOOL = LongBool;
FLOAT = Single;
- QWORD = int64; // 64-bit (replace "int64" with "comp" if using Delphi 3)
+ QWORD = Int64;
HMUSIC = DWORD; // MOD music handle
HSAMPLE = DWORD; // sample handle
@@ -536,6 +407,13 @@ type HFX = DWORD; // DX8 effect handle
HPLUGIN = DWORD; // Plugin handle
+ // Device info structure
+ BASS_DEVICEINFO = record
+ name: PAnsiChar; // description
+ driver: PAnsiChar; // driver
+ flags: DWORD;
+ end;
+
BASS_INFO = record
flags: DWORD; // device capabilities (DSCAPS_xxx flags)
hwsize: DWORD; // size of total device hardware memory
@@ -548,75 +426,68 @@ type minbuf: DWORD; // recommended minimum buffer length in ms (requires BASS_DEVICE_LATENCY)
dsver: DWORD; // DirectSound version
latency: DWORD; // delay (in ms) before start of playback (requires BASS_DEVICE_LATENCY)
- initflags: DWORD; // "flags" parameter of BASS_Init call
+ initflags: DWORD; // BASS_Init "flags" parameter
speakers: DWORD; // number of speakers available
- driver: PChar; // driver
freq: DWORD; // current output rate (OSX only)
end;
+ // Recording device info structure
BASS_RECORDINFO = record
flags: DWORD; // device capabilities (DSCCAPS_xxx flags)
formats: DWORD; // supported standard formats (WAVE_FORMAT_xxx flags)
inputs: DWORD; // number of inputs
singlein: BOOL; // only 1 input can be set at a time
- driver: PChar; // driver
freq: DWORD; // current input rate (OSX only)
end;
- BASS_CHANNELINFO = record
- freq: DWORD; // default playback rate
- chans: DWORD; // channels
- flags: DWORD; // BASS_SAMPLE/STREAM/MUSIC/SPEAKER flags
- ctype: DWORD; // type of channel
- origres: DWORD; // original resolution
- plugin: HPLUGIN; // plugin
- end;
-
- BASS_PLUGINFORM = record
- ctype: DWORD; // channel type
- name: PChar; // format description
- exts: PChar; // file extension filter (*.ext1;*.ext2;etc...)
- end;
- PBASS_PLUGINFORMS = ^TBASS_PLUGINFORMS;
- TBASS_PLUGINFORMS = array[0..maxInt div sizeOf(BASS_PLUGINFORM) - 1] of BASS_PLUGINFORM;
-
- BASS_PLUGININFO = record
- version: DWORD; // version (same form as BASS_GetVersion)
- formatc: DWORD; // number of formats
- formats: PBASS_PLUGINFORMS; // the array of formats
- end;
- PBASS_PLUGININFO = ^BASS_PLUGININFO;
-
// Sample info structure
BASS_SAMPLE = record
freq: DWORD; // default playback rate
- volume: DWORD; // default volume (0-100)
- pan: Integer; // default pan (-100=left, 0=middle, 100=right)
+ volume: FLOAT; // default volume (0-100)
+ pan: FLOAT; // default pan (-100=left, 0=middle, 100=right)
flags: DWORD; // BASS_SAMPLE_xxx flags
length: DWORD; // length (in samples, not bytes)
max: DWORD; // maximum simultaneous playbacks
origres: DWORD; // original resolution
chans: DWORD; // number of channels
mingap: DWORD; // minimum gap (ms) between creating channels
- {
- The following are the sample's default 3D attributes
- (if the sample is 3D, BASS_SAMPLE_3D is in flags)
- see BASS_ChannelSet3DAttributes
- }
mode3d: DWORD; // BASS_3DMODE_xxx mode
mindist: FLOAT; // minimum distance
maxdist: FLOAT; // maximum distance
iangle: DWORD; // angle of inside projection cone
oangle: DWORD; // angle of outside projection cone
- outvol: DWORD; // delta-volume outside the projection cone
- {
- The following are the defaults used if the sample uses the DirectX 7
- voice allocation/management features.
- }
+ outvol: FLOAT; // delta-volume outside the projection cone
vam: DWORD; // voice allocation/management flags (BASS_VAM_xxx)
priority: DWORD; // priority (0=lowest, $ffffffff=highest)
end;
+ // Channel info structure
+ BASS_CHANNELINFO = record
+ freq: DWORD; // default playback rate
+ chans: DWORD; // channels
+ flags: DWORD; // BASS_SAMPLE/STREAM/MUSIC/SPEAKER flags
+ ctype: DWORD; // type of channel
+ origres: DWORD; // original resolution
+ plugin: HPLUGIN; // plugin
+ sample: HSAMPLE; // sample
+ filename: PChar; // filename
+ end;
+
+ BASS_PLUGINFORM = record
+ ctype: DWORD; // channel type
+ name: PAnsiChar; // format description
+ exts: PAnsiChar; // file extension filter (*.ext1;*.ext2;etc...)
+ end;
+ PBASS_PLUGINFORMS = ^TBASS_PLUGINFORMS;
+ TBASS_PLUGINFORMS = array[0..maxInt div sizeOf(BASS_PLUGINFORM) - 1] of BASS_PLUGINFORM;
+
+ BASS_PLUGININFO = record
+ version: DWORD; // version (same form as BASS_GetVersion)
+ formatc: DWORD; // number of formats
+ formats: PBASS_PLUGINFORMS; // the array of formats
+ end;
+ PBASS_PLUGININFO = ^BASS_PLUGININFO;
+
// 3D vector (for 3D positions/velocities/orientations)
BASS_3DVECTOR = record
x: FLOAT; // +=right, -=left
@@ -624,17 +495,62 @@ type z: FLOAT; // +=front, -=behind
end;
- BASS_FXCHORUS = record
+ // User file stream callback functions
+ FILECLOSEPROC = procedure(user: Pointer); stdcall;
+ FILELENPROC = function(user: Pointer): QWORD; stdcall;
+ FILEREADPROC = function(buffer: Pointer; length: DWORD; user: Pointer): DWORD; stdcall;
+ FILESEEKPROC = function(offset: QWORD; user: Pointer): BOOL; stdcall;
+
+ BASS_FILEPROCS = record
+ close: FILECLOSEPROC;
+ length: FILELENPROC;
+ read: FILEREADPROC;
+ seek: FILESEEKPROC;
+ end;
+
+ // ID3v1 tag structure
+ TAG_ID3 = record
+ id: Array[0..2] of AnsiChar;
+ title: Array[0..29] of AnsiChar;
+ artist: Array[0..29] of AnsiChar;
+ album: Array[0..29] of AnsiChar;
+ year: Array[0..3] of AnsiChar;
+ comment: Array[0..29] of AnsiChar;
+ genre: Byte;
+ end;
+
+ // Binary APEv2 tag structure
+ TAG_APE_BINARY = record
+ key: PAnsiChar;
+ data: PAnsiChar;
+ length: DWORD;
+ end;
+
+ // BWF "bext" tag structure
+ TAG_BEXT = packed record
+ Description: Array[0..255] of AnsiChar; // description
+ Originator: Array[0..31] of AnsiChar; // name of the originator
+ OriginatorReference: Array[0..31] of AnsiChar; // reference of the originator
+ OriginationDate: Array[0..9] of AnsiChar; // date of creation (yyyy-mm-dd)
+ OriginationTime: Array[0..7] of AnsiChar; // time of creation (hh-mm-ss)
+ TimeReference: QWORD; // first sample count since midnight (little-endian)
+ Version: Word; // BWF version (little-endian)
+ UMID: Array[0..63] of Byte; // SMPTE UMID
+ Reserved: Array[0..189] of Byte;
+ CodingHistory: Array of AnsiChar; // history
+ end;
+
+ BASS_DX8_CHORUS = record
fWetDryMix: FLOAT;
fDepth: FLOAT;
fFeedback: FLOAT;
fFrequency: FLOAT;
lWaveform: DWORD; // 0=triangle, 1=sine
fDelay: FLOAT;
- lPhase: DWORD; // BASS_FX_PHASE_xxx
+ lPhase: DWORD; // BASS_DX8_PHASE_xxx
end;
- BASS_FXCOMPRESSOR = record
+ BASS_DX8_COMPRESSOR = record
fGain: FLOAT;
fAttack: FLOAT;
fRelease: FLOAT;
@@ -643,7 +559,7 @@ type fPredelay: FLOAT;
end;
- BASS_FXDISTORTION = record
+ BASS_DX8_DISTORTION = record
fGain: FLOAT;
fEdge: FLOAT;
fPostEQCenterFrequency: FLOAT;
@@ -651,7 +567,7 @@ type fPreLowpassCutoff: FLOAT;
end;
- BASS_FXECHO = record
+ BASS_DX8_ECHO = record
fWetDryMix: FLOAT;
fFeedback: FLOAT;
fLeftDelay: FLOAT;
@@ -659,43 +575,43 @@ type lPanDelay: BOOL;
end;
- BASS_FXFLANGER = record
+ BASS_DX8_FLANGER = record
fWetDryMix: FLOAT;
fDepth: FLOAT;
fFeedback: FLOAT;
fFrequency: FLOAT;
lWaveform: DWORD; // 0=triangle, 1=sine
fDelay: FLOAT;
- lPhase: DWORD; // BASS_FX_PHASE_xxx
+ lPhase: DWORD; // BASS_DX8_PHASE_xxx
end;
- BASS_FXGARGLE = record
+ BASS_DX8_GARGLE = record
dwRateHz: DWORD; // Rate of modulation in hz
dwWaveShape: DWORD; // 0=triangle, 1=square
end;
- BASS_FXI3DL2REVERB = record
- lRoom: Longint; // [-10000, 0] default: -1000 mB
- lRoomHF: Longint; // [-10000, 0] default: 0 mB
+ BASS_DX8_I3DL2REVERB = record
+ lRoom: LongInt; // [-10000, 0] default: -1000 mB
+ lRoomHF: LongInt; // [-10000, 0] default: 0 mB
flRoomRolloffFactor: FLOAT; // [0.0, 10.0] default: 0.0
flDecayTime: FLOAT; // [0.1, 20.0] default: 1.49s
flDecayHFRatio: FLOAT; // [0.1, 2.0] default: 0.83
- lReflections: Longint; // [-10000, 1000] default: -2602 mB
+ lReflections: LongInt; // [-10000, 1000] default: -2602 mB
flReflectionsDelay: FLOAT; // [0.0, 0.3] default: 0.007 s
- lReverb: Longint; // [-10000, 2000] default: 200 mB
+ lReverb: LongInt; // [-10000, 2000] default: 200 mB
flReverbDelay: FLOAT; // [0.0, 0.1] default: 0.011 s
flDiffusion: FLOAT; // [0.0, 100.0] default: 100.0 %
flDensity: FLOAT; // [0.0, 100.0] default: 100.0 %
flHFReference: FLOAT; // [20.0, 20000.0] default: 5000.0 Hz
end;
- BASS_FXPARAMEQ = record
+ BASS_DX8_PARAMEQ = record
fCenter: FLOAT;
fBandwidth: FLOAT;
fGain: FLOAT;
end;
- BASS_FXREVERB = record
+ BASS_DX8_REVERB = record
fInGain: FLOAT; // [-96.0,0.0] default: 0.0 dB
fReverbMix: FLOAT; // [-96.0,0.0] default: 0.0 db
fReverbTime: FLOAT; // [0.001,3000.0] default: 1000.0 ms
@@ -703,7 +619,7 @@ type end;
// callback function types
- STREAMPROC = function(handle: HSTREAM; buffer: Pointer; length: DWORD; user: DWORD): DWORD; stdcall;
+ STREAMPROC = function(handle: HSTREAM; buffer: Pointer; length: DWORD; user: Pointer): DWORD; stdcall;
{
User stream callback function. NOTE: A stream function should obviously be as
quick as possible, other streams (and MOD musics) can't be mixed until
@@ -716,17 +632,14 @@ type the stream.
}
- STREAMFILEPROC = function(action, param1, param2, user: DWORD): DWORD; stdcall;
- {
- User file stream callback function.
- action : The action to perform, one of BASS_FILE_xxx values.
- param1 : Depends on "action"
- param2 : Depends on "action"
- user : The 'user' parameter value given when calling BASS_StreamCreate
- RETURN : Depends on "action"
- }
+const
+ // special STREAMPROCs
+ STREAMPROC_DUMMY : STREAMPROC = STREAMPROC(0); // "dummy" stream
+ STREAMPROC_PUSH : STREAMPROC = STREAMPROC(-1); // push stream
+
+type
- DOWNLOADPROC = procedure(buffer: Pointer; length: DWORD; user: DWORD); stdcall;
+ DOWNLOADPROC = procedure(buffer: Pointer; length: DWORD; user: Pointer); stdcall;
{
Internet stream download callback function.
buffer : Buffer containing the downloaded data... NULL=end of download
@@ -734,7 +647,7 @@ type user : The 'user' parameter value given when calling BASS_StreamCreateURL
}
- SYNCPROC = procedure(handle: HSYNC; channel, data: DWORD; user: DWORD); stdcall;
+ SYNCPROC = procedure(handle: HSYNC; channel, data: DWORD; user: Pointer); stdcall;
{
Sync callback function. NOTE: a sync callback function should be very
quick as other syncs cannot be processed until it has finished. If the
@@ -746,7 +659,7 @@ type user : The 'user' parameter given when calling BASS_ChannelSetSync
}
- DSPPROC = procedure(handle: HDSP; channel: DWORD; buffer: Pointer; length: DWORD; user: DWORD); stdcall;
+ DSPPROC = procedure(handle: HDSP; channel: DWORD; buffer: Pointer; length: DWORD; user: Pointer); stdcall;
{
DSP callback function. NOTE: A DSP function should obviously be as quick
as possible... other DSP functions, streams and MOD musics can not be
@@ -758,7 +671,7 @@ type user : The 'user' parameter given when calling BASS_ChannelSetDSP
}
- RECORDPROC = function(handle: HRECORD; buffer: Pointer; length: DWORD; user: DWORD): BOOL; stdcall;
+ RECORDPROC = function(handle: HRECORD; buffer: Pointer; length: DWORD; user: Pointer): BOOL; stdcall;
{
Recording callback function.
handle : The recording handle
@@ -773,24 +686,26 @@ type const
bassdll = 'bass.dll';
-function BASS_SetConfig(option, value: DWORD): DWORD; stdcall; external bassdll;
+function BASS_SetConfig(option, value: DWORD): BOOL; stdcall; external bassdll;
function BASS_GetConfig(option: DWORD): DWORD; stdcall; external bassdll;
+function BASS_SetConfigPtr(option: DWORD; value: Pointer): BOOL; stdcall; external bassdll;
+function BASS_GetConfigPtr(option: DWORD): Pointer; stdcall; external bassdll;
function BASS_GetVersion: DWORD; stdcall; external bassdll;
-function BASS_GetDeviceDescription(device: DWORD): PChar; stdcall; external bassdll;
-function BASS_ErrorGetCode: Integer; stdcall; external bassdll;
-function BASS_Init(device: Integer; freq, flags: DWORD; win: HWND; clsid: PGUID): BOOL; stdcall; external bassdll;
+function BASS_ErrorGetCode: LongInt; stdcall; external bassdll;
+function BASS_GetDeviceInfo(device: DWORD; var info: BASS_DEVICEINFO): BOOL; stdcall; external bassdll;
+function BASS_Init(device: LongInt; freq, flags: DWORD; win: HWND; clsid: PGUID): BOOL; stdcall; external bassdll;
function BASS_SetDevice(device: DWORD): BOOL; stdcall; external bassdll;
function BASS_GetDevice: DWORD; stdcall; external bassdll;
function BASS_Free: BOOL; stdcall; external bassdll;
function BASS_GetDSoundObject(obj: DWORD): Pointer; stdcall; external bassdll;
function BASS_GetInfo(var info: BASS_INFO): BOOL; stdcall; external bassdll;
-function BASS_Update: BOOL; stdcall; external bassdll;
+function BASS_Update(length: DWORD): BOOL; stdcall; external bassdll;
function BASS_GetCPU: FLOAT; stdcall; external bassdll;
function BASS_Start: BOOL; stdcall; external bassdll;
function BASS_Stop: BOOL; stdcall; external bassdll;
function BASS_Pause: BOOL; stdcall; external bassdll;
-function BASS_SetVolume(volume: DWORD): BOOL; stdcall; external bassdll;
-function BASS_GetVolume: Integer; stdcall; external bassdll;
+function BASS_SetVolume(volume: FLOAT): BOOL; stdcall; external bassdll;
+function BASS_GetVolume: FLOAT; stdcall; external bassdll;
function BASS_PluginLoad(filename: PChar; flags: DWORD): HPLUGIN; stdcall; external bassdll;
function BASS_PluginFree(handle: HPLUGIN): BOOL; stdcall; external bassdll;
@@ -801,78 +716,76 @@ function BASS_Get3DFactors(var distf, rollf, doppf: FLOAT): BOOL; stdcall; exter function BASS_Set3DPosition(var pos, vel, front, top: BASS_3DVECTOR): BOOL; stdcall; external bassdll;
function BASS_Get3DPosition(var pos, vel, front, top: BASS_3DVECTOR): BOOL; stdcall; external bassdll;
procedure BASS_Apply3D; stdcall; external bassdll;
-function BASS_SetEAXParameters(env: Integer; vol, decay, damp: FLOAT): BOOL; stdcall; external bassdll;
+function BASS_SetEAXParameters(env: LongInt; vol, decay, damp: FLOAT): BOOL; stdcall; external bassdll;
function BASS_GetEAXParameters(var env: DWORD; var vol, decay, damp: FLOAT): BOOL; stdcall; external bassdll;
-function BASS_MusicLoad(mem: BOOL; f: Pointer; offset, length, flags, freq: DWORD): HMUSIC; stdcall; external bassdll;
+function BASS_MusicLoad(mem: BOOL; f: Pointer; offset: QWORD; length, flags, freq: DWORD): HMUSIC; stdcall; external bassdll;
function BASS_MusicFree(handle: HMUSIC): BOOL; stdcall; external bassdll;
-function BASS_MusicSetAttribute(handle: HMUSIC; attrib,value: DWORD): DWORD; stdcall; external bassdll;
-function BASS_MusicGetAttribute(handle: HMUSIC; attrib: DWORD): DWORD; stdcall; external bassdll;
-function BASS_MusicGetOrders(handle: HMUSIC): DWORD; stdcall; external bassdll;
-function BASS_MusicGetOrderPosition(handle: HMUSIC): DWORD; stdcall; external bassdll;
-
-function BASS_SampleLoad(mem: BOOL; f: Pointer; offset, length, max, flags: DWORD): HSAMPLE; stdcall; external bassdll;
-function BASS_SampleCreate(length, freq, chans, max, flags: DWORD): Pointer; stdcall; external bassdll;
-function BASS_SampleCreateDone: HSAMPLE; stdcall; external bassdll;
+
+function BASS_SampleLoad(mem: BOOL; f: Pointer; offset: QWORD; length, max, flags: DWORD): HSAMPLE; stdcall; external bassdll;
+function BASS_SampleCreate(length, freq, chans, max, flags: DWORD): HSAMPLE; stdcall; external bassdll;
function BASS_SampleFree(handle: HSAMPLE): BOOL; stdcall; external bassdll;
+function BASS_SampleSetData(handle: HSAMPLE; buffer: Pointer): BOOL; stdcall; external bassdll;
+function BASS_SampleGetData(handle: HSAMPLE; buffer: Pointer): BOOL; stdcall; external bassdll;
function BASS_SampleGetInfo(handle: HSAMPLE; var info: BASS_SAMPLE): BOOL; stdcall; external bassdll;
function BASS_SampleSetInfo(handle: HSAMPLE; var info: BASS_SAMPLE): BOOL; stdcall; external bassdll;
function BASS_SampleGetChannel(handle: HSAMPLE; onlynew: BOOL): HCHANNEL; stdcall; external bassdll;
function BASS_SampleGetChannels(handle: HSAMPLE; channels: Pointer): DWORD; stdcall; external bassdll;
function BASS_SampleStop(handle: HSAMPLE): BOOL; stdcall; external bassdll;
-function BASS_StreamCreate(freq, chans, flags: DWORD; proc: Pointer; user: DWORD): HSTREAM; stdcall; external bassdll;
-function BASS_StreamCreateFile(mem: BOOL; f: Pointer; offset, length, flags: DWORD): HSTREAM; stdcall; external bassdll;
-function BASS_StreamCreateURL(url: PChar; offset: DWORD; flags: DWORD; proc: DOWNLOADPROC; user: DWORD):HSTREAM; stdcall; external bassdll;
-function BASS_StreamCreateFileUser(buffered: BOOL; flags: DWORD; proc: STREAMFILEPROC; user: DWORD): HSTREAM; stdcall; external bassdll;
+function BASS_StreamCreate(freq, chans, flags: DWORD; proc: STREAMPROC; user: Pointer): HSTREAM; stdcall; external bassdll;
+function BASS_StreamCreateFile(mem: BOOL; f: Pointer; offset, length: QWORD; flags: DWORD): HSTREAM; stdcall; external bassdll;
+function BASS_StreamCreateURL(url: PAnsiChar; offset: DWORD; flags: DWORD; proc: DOWNLOADPROC; user: Pointer):HSTREAM; stdcall; external bassdll;
+function BASS_StreamCreateFileUser(system, flags: DWORD; var procs: BASS_FILEPROCS; user: Pointer): HSTREAM; stdcall; external bassdll;
function BASS_StreamFree(handle: HSTREAM): BOOL; stdcall; external bassdll;
-function BASS_StreamGetFilePosition(handle:HSTREAM; mode:DWORD) : DWORD;stdcall;external bassdll;
+function BASS_StreamGetFilePosition(handle: HSTREAM; mode: DWORD): QWORD; stdcall; external bassdll;
+function BASS_StreamPutData(handle: HSTREAM; buffer: Pointer; length: DWORD): DWORD; stdcall; external bassdll;
+function BASS_StreamPutFileData(handle: HSTREAM; buffer: Pointer; length: DWORD): DWORD; stdcall; external bassdll;
-function BASS_RecordGetDeviceDescription(devnum: DWORD):PChar;stdcall;external bassdll;
-function BASS_RecordInit(device: Integer):BOOL;stdcall;external bassdll;
+function BASS_RecordGetDeviceInfo(device: DWORD; var info: BASS_DEVICEINFO): BOOL; stdcall; external bassdll;
+function BASS_RecordInit(device: LongInt):BOOL; stdcall; external bassdll;
function BASS_RecordSetDevice(device: DWORD): BOOL; stdcall; external bassdll;
function BASS_RecordGetDevice: DWORD; stdcall; external bassdll;
-function BASS_RecordFree:BOOL;stdcall;external bassdll;
-function BASS_RecordGetInfo(var info:BASS_RECORDINFO):BOOL;stdcall;external bassdll;
-function BASS_RecordGetInputName(input:Integer):PChar;stdcall;external bassdll;
-function BASS_RecordSetInput(input:Integer; setting:DWORD):BOOL;stdcall;external bassdll;
-function BASS_RecordGetInput(input:Integer):DWORD;stdcall;external bassdll;
-function BASS_RecordStart(freq,chans,flags:DWORD; proc:RECORDPROC; user:DWORD):HRECORD;stdcall;external bassdll;
-
-function BASS_ChannelBytes2Seconds(handle: DWORD; pos: QWORD): FLOAT; stdcall;external bassdll;
-function BASS_ChannelSeconds2Bytes(handle: DWORD; pos: FLOAT): QWORD; stdcall;external bassdll;
+function BASS_RecordFree: BOOL; stdcall; external bassdll;
+function BASS_RecordGetInfo(var info: BASS_RECORDINFO): BOOL; stdcall; external bassdll;
+function BASS_RecordGetInputName(input: LongInt): PAnsiChar; stdcall; external bassdll;
+function BASS_RecordSetInput(input: LongInt; flags: DWORD; volume: FLOAT): BOOL; stdcall; external bassdll;
+function BASS_RecordGetInput(input: LongInt; var volume: FLOAT): DWORD; stdcall; external bassdll;
+function BASS_RecordStart(freq, chans, flags: DWORD; proc: RECORDPROC; user: Pointer): HRECORD; stdcall; external bassdll;
+
+function BASS_ChannelBytes2Seconds(handle: DWORD; pos: QWORD): Double; stdcall;external bassdll;
+function BASS_ChannelSeconds2Bytes(handle: DWORD; pos: Double): QWORD; stdcall;external bassdll;
function BASS_ChannelGetDevice(handle: DWORD): DWORD; stdcall; external bassdll;
function BASS_ChannelSetDevice(handle, device: DWORD): BOOL; stdcall; external bassdll;
function BASS_ChannelIsActive(handle: DWORD): DWORD; stdcall;external bassdll;
-function BASS_ChannelGetInfo(handle: DWORD; var info:BASS_CHANNELINFO):BOOL;stdcall;external bassdll;
-function BASS_ChannelGetTags(handle: HSTREAM; tags : DWORD): PChar; stdcall; external bassdll;
-function BASS_ChannelSetFlags(handle, flags: DWORD): BOOL; stdcall; external bassdll;
-function BASS_ChannelPreBuf(handle, length: DWORD): BOOL; stdcall; external bassdll;
+function BASS_ChannelGetInfo(handle: DWORD; var info: BASS_CHANNELINFO):BOOL;stdcall;external bassdll;
+function BASS_ChannelGetTags(handle: HSTREAM; tags: DWORD): PAnsiChar; stdcall; external bassdll;
+function BASS_ChannelFlags(handle, flags, mask: DWORD): DWORD; stdcall; external bassdll;
+function BASS_ChannelUpdate(handle, length: DWORD): BOOL; stdcall; external bassdll;
+function BASS_ChannelLock(handle: DWORD; lock: BOOL): BOOL; stdcall; external bassdll;
function BASS_ChannelPlay(handle: DWORD; restart: BOOL): BOOL; stdcall; external bassdll;
function BASS_ChannelStop(handle: DWORD): BOOL; stdcall; external bassdll;
function BASS_ChannelPause(handle: DWORD): BOOL; stdcall; external bassdll;
-function BASS_ChannelSetAttributes(handle: DWORD; freq, volume, pan: Integer): BOOL; stdcall; external bassdll;
-function BASS_ChannelGetAttributes(handle: DWORD; var freq, volume: DWORD; var pan: Integer): BOOL; stdcall; external bassdll;
-function BASS_ChannelSlideAttributes(handle: DWORD; freq, volume, pan: Integer; time: DWORD): BOOL; stdcall; external bassdll;
-function BASS_ChannelIsSliding(handle: DWORD): DWORD; stdcall;external bassdll;
-function BASS_ChannelSet3DAttributes(handle: DWORD; mode: Integer; min, max: FLOAT; iangle, oangle, outvol: Integer): BOOL; stdcall; external bassdll;
+function BASS_ChannelSetAttribute(handle, attrib: DWORD; value: FLOAT): BOOL; stdcall; external bassdll;
+function BASS_ChannelGetAttribute(handle, attrib: DWORD; var value: FLOAT): BOOL; stdcall; external bassdll;
+function BASS_ChannelSlideAttribute(handle, attrib: DWORD; value: FLOAT; time: DWORD): BOOL; stdcall; external bassdll;
+function BASS_ChannelIsSliding(handle, attrib: DWORD): BOOL; stdcall;external bassdll;
+function BASS_ChannelSet3DAttributes(handle: DWORD; mode: LongInt; min, max: FLOAT; iangle, oangle, outvol: LongInt): BOOL; stdcall; external bassdll;
function BASS_ChannelGet3DAttributes(handle: DWORD; var mode: DWORD; var min, max: FLOAT; var iangle, oangle, outvol: DWORD): BOOL; stdcall; external bassdll;
function BASS_ChannelSet3DPosition(handle: DWORD; var pos, orient, vel: BASS_3DVECTOR): BOOL; stdcall; external bassdll;
function BASS_ChannelGet3DPosition(handle: DWORD; var pos, orient, vel: BASS_3DVECTOR): BOOL; stdcall; external bassdll;
-function BASS_ChannelGetLength(handle: DWORD): QWORD; stdcall; external bassdll;
-function BASS_ChannelSetPosition(handle: DWORD; pos: QWORD): BOOL; stdcall; external bassdll;
-function BASS_ChannelGetPosition(handle: DWORD): QWORD; stdcall; external bassdll;
+function BASS_ChannelGetLength(handle, mode: DWORD): QWORD; stdcall; external bassdll;
+function BASS_ChannelSetPosition(handle: DWORD; pos: QWORD; mode: DWORD): BOOL; stdcall; external bassdll;
+function BASS_ChannelGetPosition(handle, mode: DWORD): QWORD; stdcall; external bassdll;
function BASS_ChannelGetLevel(handle: DWORD): DWORD; stdcall; external bassdll;
function BASS_ChannelGetData(handle: DWORD; buffer: Pointer; length: DWORD): DWORD; stdcall; external bassdll;
-function BASS_ChannelSetSync(handle: DWORD; stype: DWORD; param: QWORD; proc: SYNCPROC; user: DWORD): HSYNC; stdcall; external bassdll;
+function BASS_ChannelSetSync(handle: DWORD; type_: DWORD; param: QWORD; proc: SYNCPROC; user: Pointer): HSYNC; stdcall; external bassdll;
function BASS_ChannelRemoveSync(handle: DWORD; sync: HSYNC): BOOL; stdcall; external bassdll;
-function BASS_ChannelSetDSP(handle: DWORD; proc: DSPPROC; user: DWORD; priority: Integer): HDSP; stdcall; external bassdll;
+function BASS_ChannelSetDSP(handle: DWORD; proc: DSPPROC; user: Pointer; priority: LongInt): HDSP; stdcall; external bassdll;
function BASS_ChannelRemoveDSP(handle: DWORD; dsp: HDSP): BOOL; stdcall; external bassdll;
-function BASS_ChannelSetEAXMix(handle: DWORD; mix: FLOAT): BOOL; stdcall; external bassdll;
-function BASS_ChannelGetEAXMix(handle: DWORD; var mix: FLOAT): BOOL; stdcall; external bassdll;
function BASS_ChannelSetLink(handle, chan: DWORD): BOOL; stdcall; external bassdll;
function BASS_ChannelRemoveLink(handle, chan: DWORD): BOOL; stdcall; external bassdll;
-function BASS_ChannelSetFX(handle, etype: DWORD; priority: Integer): HFX; stdcall; external bassdll;
+function BASS_ChannelSetFX(handle, type_: DWORD; priority: LongInt): HFX; stdcall; external bassdll;
function BASS_ChannelRemoveFX(handle: DWORD; fx: HFX): BOOL; stdcall; external bassdll;
function BASS_FXSetParameters(handle: HFX; par: Pointer): BOOL; stdcall; external bassdll;
@@ -881,8 +794,7 @@ function BASS_FXReset(handle: HFX): BOOL; stdcall; external bassdll; function BASS_SPEAKER_N(n: DWORD): DWORD;
-function MAKEMUSICPOS(order,row: DWORD): DWORD;
-function BASS_SetEAXPreset(env: Integer): BOOL;
+function BASS_SetEAXPreset(env: LongInt): BOOL;
{
This function is defined in the implementation part of this unit.
It is not part of BASS.DLL but an extra function which makes it easier
@@ -898,12 +810,7 @@ begin Result := n shl 24;
end;
-function MAKEMUSICPOS(order,row: DWORD): DWORD;
-begin
- Result := $80000000 or DWORD(MAKELONG(order,row));
-end;
-
-function BASS_SetEAXPreset(env: Integer): BOOL;
+function BASS_SetEAXPreset(env: LongInt): BOOL;
begin
case (env) of
EAX_ENVIRONMENT_GENERIC:
@@ -964,5 +871,4 @@ begin end;
end.
-// END OF FILE /////////////////////////////////////////////////////////////////
diff --git a/Game/Output/Themes/Blue Sensation.ini b/Game/Output/Themes/Blue Sensation.ini index f7373508..ab90d97c 100644 --- a/Game/Output/Themes/Blue Sensation.ini +++ b/Game/Output/Themes/Blue Sensation.ini @@ -957,16 +957,6 @@ Color =White Align=0
[SingStatic1]
-;TextBG
-Tex =LyricBar
-X =0
-Y =490
-W =800
-H =80
-Color =White
-Type=Font Black
-
-[SingStatic2]
;TimeBar
Tex =TimeBar1
X =0
@@ -985,7 +975,7 @@ H =4 Color=White
Type=Font Black
-[SingStatic3]
+[SingStatic2]
;the thing behind the time progress
Tex =TimeBar2
X =50
@@ -995,6 +985,16 @@ H =8 Color=Gray
Type=Font Black
+[SingStaticLyricBar]
+;TextBG
+Tex =LyricBar
+X =0
+Y =490
+W =800
+H =80
+Color =White
+Type=Font Black
+
[SingStaticLyricDuetBar]
;TextBG
Tex =LyricBar
diff --git a/Game/Output/Themes/Deluxe.ini b/Game/Output/Themes/Deluxe.ini index a36e9ba6..77d0ae34 100644 --- a/Game/Output/Themes/Deluxe.ini +++ b/Game/Output/Themes/Deluxe.ini @@ -623,16 +623,6 @@ Texts =1 ;Align=1
[SingStatic1]
-;TextBG
-Tex =LyricBar
-X =10
-Y =490
-W =780
-H =85
-Color =GrayLightest
-Type=Font Black
-
-[SingStatic2]
;TimeBar
Tex =TimeBar1
X =10
@@ -649,7 +639,7 @@ W =700 H =7
Color=White
-[SingStatic3]
+[SingStatic2]
;the thing behind the time progress
Tex =TimeBar2
X =20
@@ -659,6 +649,16 @@ H =7 Color=GrayLightest
Type=Font Black
+[SingStaticLyricBar]
+;TextBG
+Tex =LyricBar
+X =10
+Y =490
+W =780
+H =85
+Color =GrayLightest
+Type=Font Black
+
[SingStaticLyricDuetBar]
;TextBG
Tex =LyricBar
diff --git a/Game/Output/Themes/iStar.ini b/Game/Output/Themes/iStar.ini index 83f851a7..eb02e430 100644 --- a/Game/Output/Themes/iStar.ini +++ b/Game/Output/Themes/iStar.ini @@ -936,16 +936,6 @@ Color =White Align=0
[SingStatic1]
-;TextBG
-Tex =LyricBar
-X =10
-Y =490
-W =780
-H =85
-Color =White
-Type=Font Black
-
-[SingStatic2]
;TimeBar
Tex =TimeBar1
X =10
@@ -962,7 +952,7 @@ W =652 H =7
Color=White
-[SingStatic3]
+[SingStatic2]
;the thing behind the time progress
Tex =TimeBar2
X =70
@@ -972,6 +962,16 @@ H =7 Color=GrayDark
Type=Font Black
+[SingStaticLyricBar]
+;TextBG
+Tex =LyricBar
+X =10
+Y =490
+W =780
+H =85
+Color =White
+Type=Font Black
+
[SingStaticLyricDuetBar]
;TextBG
Tex =LyricBar
diff --git a/Game/Output/acinerella.dll b/Game/Output/acinerella.dll Binary files differindex 884cee92..22c6949c 100644 --- a/Game/Output/acinerella.dll +++ b/Game/Output/acinerella.dll diff --git a/Game/Output/bass.dll b/Game/Output/bass.dll Binary files differindex 964d8996..e4bd7d4c 100644 --- a/Game/Output/bass.dll +++ b/Game/Output/bass.dll |