aboutsummaryrefslogtreecommitdiffstats
path: root/unicode/src/screens
diff options
context:
space:
mode:
Diffstat (limited to 'unicode/src/screens')
-rw-r--r--unicode/src/screens/UScreenCredits.pas1262
-rw-r--r--unicode/src/screens/UScreenEditConvert.pas86
-rw-r--r--unicode/src/screens/UScreenEditHeader.pas6
-rw-r--r--unicode/src/screens/UScreenEditSub.pas100
-rw-r--r--unicode/src/screens/UScreenLevel.pas29
-rw-r--r--unicode/src/screens/UScreenLoading.pas9
-rw-r--r--unicode/src/screens/UScreenMain.pas44
-rw-r--r--unicode/src/screens/UScreenName.pas22
-rw-r--r--unicode/src/screens/UScreenOpen.pas10
-rw-r--r--unicode/src/screens/UScreenOptions.pas6
-rw-r--r--unicode/src/screens/UScreenOptionsAdvanced.pas48
-rw-r--r--unicode/src/screens/UScreenOptionsGame.pas47
-rw-r--r--unicode/src/screens/UScreenOptionsGraphics.pas46
-rw-r--r--unicode/src/screens/UScreenOptionsLyrics.pas29
-rw-r--r--unicode/src/screens/UScreenOptionsRecord.pas15
-rw-r--r--unicode/src/screens/UScreenOptionsSound.pas50
-rw-r--r--unicode/src/screens/UScreenOptionsThemes.pas17
-rw-r--r--unicode/src/screens/UScreenPartyNewRound.pas311
-rw-r--r--unicode/src/screens/UScreenPartyOptions.pas15
-rw-r--r--unicode/src/screens/UScreenPartyPlayer.pas94
-rw-r--r--unicode/src/screens/UScreenPartyScore.pas149
-rw-r--r--unicode/src/screens/UScreenPartyWin.pas137
-rw-r--r--unicode/src/screens/UScreenPopup.pas71
-rw-r--r--unicode/src/screens/UScreenScore.pas10
-rw-r--r--unicode/src/screens/UScreenSing.pas20
-rw-r--r--unicode/src/screens/UScreenSingModi.pas419
-rw-r--r--unicode/src/screens/UScreenSong.pas209
-rw-r--r--unicode/src/screens/UScreenSongJumpto.pas34
-rw-r--r--unicode/src/screens/UScreenSongMenu.pas20
-rw-r--r--unicode/src/screens/UScreenStatDetail.pas45
-rw-r--r--unicode/src/screens/UScreenStatMain.pas36
-rw-r--r--unicode/src/screens/UScreenTop5.pas38
-rw-r--r--unicode/src/screens/UScreenWelcome.pas39
33 files changed, 1683 insertions, 1790 deletions
diff --git a/unicode/src/screens/UScreenCredits.pas b/unicode/src/screens/UScreenCredits.pas
index cff83d70..25fa96df 100644
--- a/unicode/src/screens/UScreenCredits.pas
+++ b/unicode/src/screens/UScreenCredits.pas
@@ -34,30 +34,30 @@ interface
{$I switches.inc}
uses
- SysUtils,
- UMenu,
- SDL,
- SDL_Image,
- UDisplay,
- UTexture,
- gl,
- UMusic,
- UFiles,
- UThemes,
- UGraphicClasses;
+ SysUtils,
+ UMenu,
+ SDL,
+ SDL_Image,
+ UDisplay,
+ UTexture,
+ gl,
+ UMusic,
+ UFiles,
+ UThemes,
+ UGraphicClasses;
type
- TCreditsStages=(InitialDelay, Intro, MainPart, Outro);
+ TCreditsStages=(InitialDelay,Intro,MainPart,Outro);
TScreenCredits = class(TMenu)
public
- Credits_X: real;
- Credits_Time: cardinal;
- Credits_Alpha: cardinal;
- CTime: cardinal;
- CTime_hold: cardinal;
- ESC_Alpha: integer;
+ Credits_X: Real;
+ Credits_Time: Cardinal;
+ Credits_Alpha: Cardinal;
+ CTime: Cardinal;
+ CTime_hold: Cardinal;
+ ESC_Alpha: Integer;
credits_entry: TTexture;
credits_entry_dx: TTexture;
@@ -89,16 +89,16 @@ type
deluxe_slidein: cardinal;
- CurrentScrollText: string;
- NextScrollUpdate: real;
- EndofLastScrollingPart: cardinal;
- CurrentScrollStart, CurrentScrollEnd: integer;
+ CurrentScrollText: String;
+ NextScrollUpdate: Real;
+ EndofLastScrollingPart: Cardinal;
+ CurrentScrollStart, CurrentScrollEnd: Integer;
CRDTS_Stage: TCreditsStages;
- Fadeout: boolean;
+ Fadeout: boolean;
constructor Create; override;
- function ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean; override;
+ function ParseInput(PressedKey: Cardinal; CharCode: UCS4Char; PressedDown: Boolean): Boolean; override;
function Draw: boolean; override;
procedure onShow; override;
procedure onHide; override;
@@ -108,12 +108,12 @@ type
const
Funky_Text: string =
- 'Grandma Deluxe has arrived! Thanks to Corvus5 for the massive work on UltraStar, Wome for the nice tune you are hearing, '+
- 'all the people who put massive effort and work in new songs (do not forget UltraStar w/o songs would be nothing), ppl from '+
+ 'Grandma Deluxe has arrived! Thanks to Corvus5 for the massive work on UltraStar, Wome for the nice tune you´re hearing, '+
+ 'all the people who put massive effort and work in new songs (don´t forget UltraStar w/o songs would be nothing), ppl from '+
'irc helping us - eBandit and Gabari, scene ppl who really helped instead of compiling and running away. Greetings to DennisTheMenace for betatesting, '+
'Demoscene.tv, pouet.net, KakiArts, Sourceforge,..';
- CRDTS_BG_FILE = 'credits_v5_bg.png';
+ CRDTS_BG_FILE = 'credits_v5_bg.png';
CRDTS_OVL_FILE = 'credits_v5_overlay.png';
CRDTS_blindguard_FILE = 'names_blindguard.png';
CRDTS_blindy_FILE = 'names_blindy.png';
@@ -137,7 +137,7 @@ const
OUTRO_ESC_FILE = 'outro-esc.png';
OUTRO_EXD_FILE = 'outro-exit-dark.png';
- Timings: array[0..21] of cardinal=(
+ Timings: array[0..21] of Cardinal=(
20, // 0 Delay before Start
149, // 1 End first Intro Zoom
@@ -178,10 +178,10 @@ uses
UCommon,
UPath;
-function TScreenCredits.ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean;
+function TScreenCredits.ParseInput(PressedKey: Cardinal; CharCode: UCS4Char; PressedDown: Boolean): Boolean;
begin
Result := true;
- if (PressedDown) then
+ If (PressedDown) Then
begin // Key Down
case PressedKey of
@@ -191,15 +191,15 @@ begin
FadeTo(@ScreenMain);
AudioPlayback.PlaySound(SoundLib.Back);
end;
-{
+ {
SDLK_SPACE:
begin
setlength(CTime_hold,length(CTime_hold)+1);
CTime_hold[high(CTime_hold)]:=CTime;
end;
-}
- end; // esac
- end; // fi
+ }
+ end;//esac
+ end; //fi
end;
constructor TScreenCredits.Create;
@@ -243,22 +243,22 @@ end;
function TScreenCredits.Draw: boolean;
begin
DrawCredits;
- Draw := true;
+ Draw:=true;
end;
procedure TScreenCredits.onShow;
begin
inherited;
- CRDTS_Stage := InitialDelay;
- Credits_X := 580;
+ CRDTS_Stage:=InitialDelay;
+ Credits_X := 580;
deluxe_slidein := 0;
- Credits_Alpha := 0;
-// Music.SetLoop(true); loop loops not, shit
+ Credits_Alpha := 0;
+ //Music.SetLoop(true); loop loops not, shit
AudioPlayback.Open(soundpath + 'wome-credits-tune.mp3'); // thank you wetue
-// Music.Play;
- CTime := 0;
-// setlength(CTime_hold,0);
+ //Music.Play;
+ CTime:=0;
+ //setlength(CTime_hold,0);
end;
procedure TScreenCredits.onHide;
@@ -268,17 +268,17 @@ end;
Procedure TScreenCredits.Draw_FunkyText;
var
- S: integer;
- X, Y, A: real;
+ S: Integer;
+ X,Y,A: Real;
visibleText: string;
begin
SetFontSize(30);
- // init ScrollingText
+ //Init ScrollingText
if (CTime = Timings[7]) then
begin
- // set position of text
- Credits_X := 600;
+ //Set Position of Text
+ Credits_X := 600;
CurrentScrollStart := 1;
CurrentScrollEnd := 1;
end;
@@ -291,8 +291,8 @@ begin
for S := 1 to length(visibleText) do
begin
- Y := abs(sin((Credits_X + X) * 0.93 { * (((Credits_X + X)) / 1200) } / 100 * pi));
- SetFontPos(Credits_X + X, 538 - Y * (Credits_X + X) * (Credits_X + X) * (Credits_X + X) / 1000000);
+ Y := abs(sin((Credits_X+X)*0.93{*(((Credits_X+X))/1200)}/100*pi));
+ SetFontPos(Credits_X+X, 538-Y*(Credits_X+X)*(Credits_X+X)*(Credits_X+X)/1000000);
if (Credits_X + X > 32) then
A := 17
@@ -301,10 +301,10 @@ begin
else
A := 0;
- glColor4f(230 / 255 - 40 / 255 + Y * (Credits_X + X)/ 900,
- 200 / 255 - 30 / 255 + Y * (Credits_X + X)/ 1000,
- 155 / 255 - 20 / 255 + Y * (Credits_X + X)/ 1100,
- A / 17);
+ glColor4f(230/255-40/255+Y*(Credits_X+X)/900,
+ 200/255-30/255+Y*(Credits_X+X)/1000,
+ 155/255-20/255+Y*(Credits_X+X)/1100,
+ A/17);
glPrint(visibleText[S]);
X := X + glTextWidth(visibleText[S]);
end;
@@ -323,53 +323,50 @@ begin
inc(CurrentScrollEnd);
end;
end;
-{
-// timing hack
- X:=5;
- SetFontStyle(2);
- SetFontItalic(false);
- SetFontSize(27);
- glColor4f(1, 1, 1, 1);
- for S := 0 to high(CTime_hold) do
- begin
- visibleText := inttostr(CTime_hold[S]);
- SetFontPos (500, X);
- glPrint(visibleText[0]);
- X := X + 20;
- end;
-}
+ { // timing hack
+ X:=5;
+ SetFontStyle (2);
+ SetFontItalic(False);
+ SetFontSize(27);
+ glColor4f(1, 1, 1, 1);
+ for S:=0 to high(CTime_hold) do begin
+ visibleText:=inttostr(CTime_hold[S]);
+ SetFontPos (500, X);
+ glPrint (visibleText[0]);
+ X:=X+20;
+ end;
+ }
end;
procedure Start3D;
begin
- glMatrixMode(GL_PROJECTION);
- glPushMatrix;
- glLoadIdentity;
- glFrustum(-0.3 * 4 / 3, 0.3 * 4 / 3, -0.3, 0.3, 1, 1000);
- glMatrixMode(GL_MODELVIEW);
- glLoadIdentity;
+ glMatrixMode(GL_PROJECTION);
+ glPushMatrix;
+ glLoadIdentity;
+ glFrustum(-0.3*4/3,0.3*4/3,-0.3,0.3,1,1000);
+ glMatrixMode(GL_MODELVIEW);
+ glLoadIdentity;
end;
-
procedure End3D;
begin
- glMatrixMode(GL_PROJECTION);
- glPopMatrix;
- glMatrixMode(GL_MODELVIEW);
+ glMatrixMode(GL_PROJECTION);
+ glPopMatrix;
+ glMatrixMode(GL_MODELVIEW);
end;
procedure TScreenCredits.DrawCredits;
var
- T: cardinal;
- Data: TFFTData;
- j, k, l: cardinal;
- f, g: real;
- STime: cardinal;
- Delay: cardinal;
- myScale: real;
- myAngle: real;
+ T: Cardinal;
+ Data: TFFTData;
+ j,k,l:cardinal;
+ f,g: Real;
+ STime:cardinal;
+ Delay:cardinal;
+ myScale: Real;
+ myAngle: Real;
const
- myLogoCoords: array[0..27,0..1] of cardinal = (
- ( 39,32),( 84,32),(100,16),(125,24),
+ myLogoCoords: Array[0..27,0..1] of Cardinal = (
+ (39,32),(84,32),(100,16),(125,24),
(154,31),(156,58),(168,32),(203,36),
(258,34),(251,50),(274,93),(294,84),
(232,54),(278,62),(319,34),(336,92),
@@ -378,10 +375,10 @@ const
(450,32),(485,34),(444,91),(486,93)
);
begin
- // dis does teh muiwk y0r to be translated :-)
+ //dis does teh muiwk y0r
AudioPlayback.GetFFTData(Data);
- Log.LogStatus('', ' JB-1');
+ Log.LogStatus('',' JB-1');
T := SDL_GetTicks() div 33;
if T <> Credits_Time then
@@ -391,172 +388,165 @@ begin
inc(CTime_hold);
Credits_X := Credits_X-2;
- Log.LogStatus('', ' JB-2');
- if (CRDTS_Stage=InitialDelay) and (CTime = Timings[0]) then
+ Log.LogStatus('',' JB-2');
+ if (CRDTS_Stage=InitialDelay) and (CTime=Timings[0]) then
begin
-// CTime := Timings[20];
-// CRDTS_Stage := Outro;
- CRDTS_Stage := Intro;
- CTime := 0;
+ //CTime:=Timings[20];
+ //CRDTS_Stage:=Outro;
+ CRDTS_Stage:=Intro;
+ CTime:=0;
AudioPlayback.Play;
end;
- if (CRDTS_Stage = Intro) and (CTime = Timings[7]) then
+ if (CRDTS_Stage=Intro) and (CTime=Timings[7]) then
begin
- CRDTS_Stage := MainPart;
+ CRDTS_Stage:=MainPart;
end;
- if (CRDTS_Stage = MainPart) and (CTime = Timings[20]) then
+ if (CRDTS_Stage=MainPart) and (CTime=Timings[20]) then
begin
- CRDTS_Stage := Outro;
+ CRDTS_Stage:=Outro;
end;
end;
- Log.LogStatus('', ' JB-3');
+ Log.LogStatus('',' JB-3');
- // draw background
- if CRDTS_Stage = InitialDelay then
- begin
- glClearColor(0, 0, 0, 0);
- glClear(GL_COLOR_BUFFER_BIT or GL_DEPTH_BUFFER_BIT);
- end
+ //draw background
+ if CRDTS_Stage=InitialDelay then
+ begin
+ glClearColor(0,0,0,0);
+ glClear(GL_COLOR_BUFFER_BIT or GL_DEPTH_BUFFER_BIT);
+ end
else
- if CRDTS_Stage = Intro then
- begin
- Start3D;
- glPushMatrix;
+ if CRDTS_Stage=Intro then
+ begin
+ Start3D;
+ glPushMatrix;
- glClearColor(0, 0, 0, 0);
- glClear(GL_COLOR_BUFFER_BIT or GL_DEPTH_BUFFER_BIT);
+ glClearColor(0,0,0,0);
+ glClear(GL_COLOR_BUFFER_BIT or GL_DEPTH_BUFFER_BIT);
- glEnable(GL_TEXTURE_2D);
- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- glEnable(GL_BLEND);
+ glEnable(GL_TEXTURE_2D);
+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+ glEnable(GL_BLEND);
- if CTime < Timings[1] then
- begin
- myScale := 0.5 + 0.5 * (Timings[1] - CTime) / (Timings[1]); // slowly move layers together
- myAngle := cos((CTime) * pi / ((Timings[1]) * 2)); // and make logo face towards camera
- end
- else
- begin // this is the part when the logo stands still
- myScale := 0.5;
- myAngle := 0;
- end;
- if CTime > Timings[2] then
- begin
- myScale := 0.5 + 0.5 * (CTime - Timings[2]) / (Timings[3] - Timings[2]); // get some space between layers
- myAngle := 0;
- end;
-// if CTime > Timings[3] then myScale := 1; // keep the space between layers
- glTranslatef(0, 0, -5 + 0.5 * myScale);
- if CTime > Timings[3] then
- myScale := 1; // keep the space between layers
- if CTime > Timings[3] then
- begin // make logo rotate left and grow
-// myScale := (CTime - Timings[4]) / (Timings[7] - Timings[4]);
- glRotatef(20 * sqr(CTime - Timings[3]) / sqr((Timings[7] - Timings[3]) / 2), 0, 0, 1);
- glScalef(1 + sqr(CTime - Timings[3]) / (32 * (Timings[7] - Timings[3])), 1 + sqr(CTime - Timings[3]) / (32 * (Timings[7] - Timings[3])), 1);
- end;
- if CTime < Timings[2] then
- glRotatef(30 * myAngle, 0.5 * myScale + myScale, 1 + myScale, 0);
-// glScalef(0.5, 0.5, 0.5);
- glScalef(4/3, -1, 1);
- glColor4f(1, 1, 1, 1);
+ if CTime < Timings[1] then begin
+ myScale:= 0.5+0.5*(Timings[1]-CTime)/(Timings[1]); // slowly move layers together
+ myAngle:=cos((CTime)*pi/((Timings[1])*2)); // and make logo face towards camera
+ end else begin // this is the part when the logo stands still
+ myScale:=0.5;
+ myAngle:=0;
+ end;
+ if CTime > Timings[2] then begin
+ myScale:= 0.5+0.5*(CTime-Timings[2])/(Timings[3]-Timings[2]); // get some space between layers
+ myAngle:=0;
+ end;
+ //if CTime > Timings[3] then myScale:=1; // keep the space between layers
+ glTranslatef(0,0,-5+0.5*myScale);
+ if CTime > Timings[3] then myScale:=1; // keep the space between layers
+ if CTime > Timings[3] then begin // make logo rotate left and grow
+ //myScale:=(CTime-Timings[4])/(Timings[7]-Timings[4]);
+ glRotatef(20*sqr(CTime-Timings[3])/sqr((Timings[7]-Timings[3])/2),0,0,1);
+ glScalef(1+sqr(CTime-Timings[3])/(32*(Timings[7]-Timings[3])),1+sqr(CTime-Timings[3])/(32*(Timings[7]-Timings[3])),1);
+ end;
+ if CTime < Timings[2] then
+ glRotatef(30*myAngle,0.5*myScale+myScale,1+myScale,0);
+ //glScalef(0.5,0.5,0.5);
+ glScalef(4/3,-1,1);
+ glColor4f(1, 1, 1, 1);
- glBindTexture(GL_TEXTURE_2D, intro_layer01.TexNum);
- glbegin(gl_quads);
- glTexCoord2f(0, 0); glVertex3f(-1, -1, -0.4 * myScale);
- glTexCoord2f(0, 1); glVertex3f(-1, 1, -0.4 * myScale);
- glTexCoord2f(1, 1); glVertex3f( 1, 1, -0.4 * myScale);
- glTexCoord2f(1, 0); glVertex3f( 1, -1, -0.4 * myScale);
- glEnd;
- glBindTexture(GL_TEXTURE_2D, intro_layer02.TexNum);
- glbegin(gl_quads);
- glTexCoord2f(0, 0); glVertex3f(-1, -1, -0.3 * myScale);
- glTexCoord2f(0, 1); glVertex3f(-1, 1, -0.3 * myScale);
- glTexCoord2f(1, 1); glVertex3f( 1, 1, -0.3 * myScale);
- glTexCoord2f(1, 0); glVertex3f( 1, -1, -0.3 * myScale);
- glEnd;
- glBindTexture(GL_TEXTURE_2D, intro_layer03.TexNum);
- glbegin(gl_quads);
- glTexCoord2f(0, 0); glVertex3f(-1, -1, -0.2 * myScale);
- glTexCoord2f(0, 1); glVertex3f(-1, 1, -0.2 * myScale);
- glTexCoord2f(1, 1); glVertex3f( 1, 1, -0.2 * myScale);
- glTexCoord2f(1, 0); glVertex3f( 1, -1, -0.2 * myScale);
- glEnd;
- glBindTexture(GL_TEXTURE_2D, intro_layer04.TexNum);
- glbegin(gl_quads);
- glTexCoord2f(0, 0); glVertex3f(-1, -1, -0.1 * myScale);
- glTexCoord2f(0, 1); glVertex3f(-1, 1, -0.1 * myScale);
- glTexCoord2f(1, 1); glVertex3f( 1, 1, -0.1 * myScale);
- glTexCoord2f(1, 0); glVertex3f( 1, -1, -0.1 * myScale);
- glEnd;
- glBindTexture(GL_TEXTURE_2D, intro_layer05.TexNum);
- glbegin(gl_quads);
- glTexCoord2f(0, 0); glVertex3f(-1, -1, 0 * myScale);
- glTexCoord2f(0, 1); glVertex3f(-1, 1, 0 * myScale);
- glTexCoord2f(1, 1); glVertex3f( 1, 1, 0 * myScale);
- glTexCoord2f(1, 0); glVertex3f( 1, -1, 0 * myScale);
- glEnd;
- glBindTexture(GL_TEXTURE_2D, intro_layer06.TexNum);
- glbegin(gl_quads);
- glTexCoord2f(0, 0); glVertex3f(-1, -1, 0.1 * myScale);
- glTexCoord2f(0, 1); glVertex3f(-1, 1, 0.1 * myScale);
- glTexCoord2f(1, 1); glVertex3f( 1, 1, 0.1 * myScale);
- glTexCoord2f(1, 0); glVertex3f( 1, -1, 0.1 * myScale);
- glEnd;
- glBindTexture(GL_TEXTURE_2D, intro_layer07.TexNum);
- glbegin(gl_quads);
- glTexCoord2f(0, 0); glVertex3f(-1, -1, 0.2 * myScale);
- glTexCoord2f(0, 1); glVertex3f(-1, 1, 0.2 * myScale);
- glTexCoord2f(1, 1); glVertex3f( 1, 1, 0.2 * myScale);
- glTexCoord2f(1, 0); glVertex3f( 1, -1, 0.2 * myScale);
- glEnd;
- glBindTexture(GL_TEXTURE_2D, intro_layer08.TexNum);
- glbegin(gl_quads);
- glTexCoord2f(0, 0); glVertex3f(-1, -1, 0.3 * myScale);
- glTexCoord2f(0, 1); glVertex3f(-1, 1, 0.3 * myScale);
- glTexCoord2f(1, 1); glVertex3f( 1, 1, 0.3 * myScale);
- glTexCoord2f(1, 0); glVertex3f( 1, -1, 0.3 * myScale);
- glEnd;
- glBindTexture(GL_TEXTURE_2D, intro_layer09.TexNum);
- glbegin(gl_quads);
- glTexCoord2f(0, 0); glVertex3f(-1, -1, 0.22 * myScale);
- glTexCoord2f(0, 1); glVertex3f(-1, 1, 0.22 * myScale);
- glTexCoord2f(1, 1); glVertex3f( 1, 1, 0.22 * myScale);
- glTexCoord2f(1, 0); glVertex3f( 1, -1, 0.22 * myScale);
- glEnd;
- gldisable(gl_texture_2d);
- glDisable(GL_BLEND);
-
- glPopMatrix;
- End3D;
-
- // do some sparkling effects
- if (CTime < Timings[1]) and (CTime > Timings[21]) then
- begin
- 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);
- end;
- end;
+ glBindTexture(GL_TEXTURE_2D, intro_layer01.TexNum);
+ glbegin(gl_quads);
+ glTexCoord2f(0,0);glVertex3f(-1, -1, -0.4 * myScale);
+ glTexCoord2f(0,1);glVertex3f(-1, 1, -0.4 * myScale);
+ glTexCoord2f(1,1); glVertex3f(1, 1, -0.4 * myScale);
+ glTexCoord2f(1,0);glVertex3f(1, -1, -0.4 * myScale);
+ glEnd;
+ glBindTexture(GL_TEXTURE_2D, intro_layer02.TexNum);
+ glbegin(gl_quads);
+ glTexCoord2f(0,0);glVertex3f(-1, -1, -0.3 * myScale);
+ glTexCoord2f(0,1);glVertex3f(-1, 1, -0.3 * myScale);
+ glTexCoord2f(1,1); glVertex3f(1, 1, -0.3 * myScale);
+ glTexCoord2f(1,0);glVertex3f(1, -1, -0.3 * myScale);
+ glEnd;
+ glBindTexture(GL_TEXTURE_2D, intro_layer03.TexNum);
+ glbegin(gl_quads);
+ glTexCoord2f(0,0);glVertex3f(-1, -1, -0.2 * myScale);
+ glTexCoord2f(0,1);glVertex3f(-1, 1, -0.2 * myScale);
+ glTexCoord2f(1,1); glVertex3f(1, 1, -0.2 * myScale);
+ glTexCoord2f(1,0);glVertex3f(1, -1, -0.2 * myScale);
+ glEnd;
+ glBindTexture(GL_TEXTURE_2D, intro_layer04.TexNum);
+ glbegin(gl_quads);
+ glTexCoord2f(0,0);glVertex3f(-1, -1, -0.1 * myScale);
+ glTexCoord2f(0,1);glVertex3f(-1, 1, -0.1 * myScale);
+ glTexCoord2f(1,1); glVertex3f(1, 1, -0.1 * myScale);
+ glTexCoord2f(1,0);glVertex3f(1, -1, -0.1 * myScale);
+ glEnd;
+ glBindTexture(GL_TEXTURE_2D, intro_layer05.TexNum);
+ glbegin(gl_quads);
+ glTexCoord2f(0,0);glVertex3f(-1, -1, 0 * myScale);
+ glTexCoord2f(0,1);glVertex3f(-1, 1, 0 * myScale);
+ glTexCoord2f(1,1); glVertex3f(1, 1, 0 * myScale);
+ glTexCoord2f(1,0);glVertex3f(1, -1, 0 * myScale);
+ glEnd;
+ glBindTexture(GL_TEXTURE_2D, intro_layer06.TexNum);
+ glbegin(gl_quads);
+ glTexCoord2f(0,0);glVertex3f(-1, -1, 0.1 * myScale);
+ glTexCoord2f(0,1);glVertex3f(-1, 1, 0.1 * myScale);
+ glTexCoord2f(1,1); glVertex3f(1, 1, 0.1 * myScale);
+ glTexCoord2f(1,0);glVertex3f(1, -1, 0.1 * myScale);
+ glEnd;
+ glBindTexture(GL_TEXTURE_2D, intro_layer07.TexNum);
+ glbegin(gl_quads);
+ glTexCoord2f(0,0);glVertex3f(-1, -1, 0.2 * myScale);
+ glTexCoord2f(0,1);glVertex3f(-1, 1, 0.2 * myScale);
+ glTexCoord2f(1,1); glVertex3f(1, 1, 0.2 * myScale);
+ glTexCoord2f(1,0);glVertex3f(1, -1, 0.2 * myScale);
+ glEnd;
+ glBindTexture(GL_TEXTURE_2D, intro_layer08.TexNum);
+ glbegin(gl_quads);
+ glTexCoord2f(0,0);glVertex3f(-1, -1, 0.3 * myScale);
+ glTexCoord2f(0,1);glVertex3f(-1, 1, 0.3 * myScale);
+ glTexCoord2f(1,1); glVertex3f(1, 1, 0.3 * myScale);
+ glTexCoord2f(1,0);glVertex3f(1, -1, 0.3 * myScale);
+ glEnd;
+ glBindTexture(GL_TEXTURE_2D, intro_layer09.TexNum);
+ glbegin(gl_quads);
+ glTexCoord2f(0,0);glVertex3f(-1, -1, 0.22 * myScale);
+ glTexCoord2f(0,1);glVertex3f(-1, 1, 0.22 * myScale);
+ glTexCoord2f(1,1); glVertex3f(1, 1, 0.22 * myScale);
+ glTexCoord2f(1,0);glVertex3f(1, -1, 0.22 * myScale);
+ glEnd;
+ gldisable(gl_texture_2d);
+ glDisable(GL_BLEND);
- // fade to white at end
- if Ctime > Timings[6] then
- begin
- glColor4f(1, 1, 1, sqr(CTime - Timings[6]) * (CTime - Timings[6]) / sqr(Timings[7] - Timings[6]));
- glEnable(GL_BLEND);
- glBegin(GL_QUADS);
- glVertex2f( 0, 0);
- glVertex2f( 0, 600);
- glVertex2f(800, 600);
- glVertex2f(800, 0);
- glEnd;
- glDisable(GL_BLEND);
- end;
+ glPopMatrix;
+ End3D;
- end;
+ // do some sparkling effects
+ if (CTime < Timings[1]) and (CTime > Timings[21]) then
+ begin
+ 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);
+ end;
+ end;
+
+ // fade to white at end
+ if Ctime > Timings[6] then
+ begin
+ glColor4f(1,1,1,sqr(Ctime-Timings[6])*(Ctime-Timings[6])/sqr(Timings[7]-Timings[6]));
+ glEnable(GL_BLEND);
+ glBegin(GL_QUADS);
+ glVertex2f(0,0);
+ glVertex2f(0,600);
+ glVertex2f(800,600);
+ glVertex2f(800,0);
+ glEnd;
+ glDisable(GL_BLEND);
+ end;
+
+ end;
if (CRDTS_Stage=MainPart) then
// main credits screen background, scroller, logo and girl
begin
@@ -568,10 +558,10 @@ begin
glColor4f(1, 1, 1, 1);
glBindTexture(GL_TEXTURE_2D, credits_bg_tex.TexNum);
glbegin(gl_quads);
- glTexCoord2f( 0, 0); glVertex2f( 0, 0);
- glTexCoord2f( 0, 600/1024); glVertex2f( 0, 600);
- glTexCoord2f(800/1024, 600/1024); glVertex2f(800, 600);
- glTexCoord2f(800/1024, 0); glVertex2f(800, 0);
+ glTexCoord2f(0,0);glVertex2f(0, 0);
+ glTexCoord2f(0,600/1024);glVertex2f(0, 600);
+ glTexCoord2f(800/1024,600/1024); glVertex2f(800, 600);
+ glTexCoord2f(800/1024,0);glVertex2f(800, 0);
glEnd;
glDisable(GL_TEXTURE_2D);
glDisable(GL_BLEND);
@@ -582,50 +572,38 @@ begin
//#########################################################################
// draw credits names
- Log.LogStatus('', ' JB-4');
+
+ Log.LogStatus('',' JB-4');
// BlindGuard (rotate in from upper left, rotate out to lower right)
- STime := Timings[9] - 10;
- Delay := Timings[10] - Timings[9];
+ STime:=Timings[9]-10;
+ Delay:=Timings[10]-Timings[9];
if CTime > STime then
begin
- k := 0;
- ESC_Alpha := 20;
+ k:=0;
+ ESC_Alpha:=20;
try
- for j := 0 to 40 do
+ for j:=0 to 40 do
begin
- if (j < length(Data)) and
- (k < length(Data)) then
+ if ( j < length( Data ) ) AND
+ ( k < length( Data ) ) then
begin
if Data[j] >= Data[k] then
- k := j;
+ k:=j;
end;
end;
except
end;
- if Data[k] > 0.25 then
- ESC_Alpha := 5
- else
- inc(ESC_Alpha);
- if ESC_Alpha > 20 then
- ESC_Alpha := 20;
- if ((CTime - STime) < 20) then
- ESC_Alpha := 20;
- if CTime <= STime + 10 then
- j := CTime - STime
- else
- j := 10;
- if (CTime >= STime + Delay - 10) then
- if (CTime <= STime + Delay) then
- j := (STime + Delay) - CTime
- else
- j := 0;
- glColor4f(1, 1, 1, ESC_Alpha / 20 * j / 10);
-
- if (CTime >= STime + 10) and (CTime <= STime + 12) then
- begin
+ if Data[k]>0.25 then ESC_Alpha:=5 else inc(ESC_Alpha);
+ if ESC_Alpha >20 then ESC_Alpha:=20;
+ if ((CTime-STime)<20) then ESC_Alpha:=20;
+ if CTime <=STime+10 then j:=CTime-STime else j:=10;
+ if (CTime >=STime+Delay-10) then if (CTime <=STime+Delay) then j:=(STime+Delay)-CTime else j:=0;
+ 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);
@@ -638,26 +616,23 @@ begin
end;
glPushMatrix;
- gltranslatef(0, 329, 0);
- if CTime <= STime + 10 then
- glrotatef((CTime - STime) * 9 + 270, 0, 0, 1);
- gltranslatef(223, 0, 0);
- if CTime >= STime + Delay - 10 then
- if CTime <= STime + Delay then
- begin
- gltranslatef(223, 0, 0);
- glrotatef((integer(CTime) - (integer(STime + Delay) - 10)) * -9, 0, 0, 1);
- gltranslatef(-223, 0, 0);
- end;
+ gltranslatef(0,329,0);
+ if CTime <= STime+10 then begin glrotatef((CTime-STime)*9+270,0,0,1);end;
+ gltranslatef(223,0,0);
+ if CTime >=STime+Delay-10 then if CTime <=STime+Delay then begin
+ gltranslatef(223,0,0);
+ glrotatef((integer(CTime)-(integer(STime+Delay)-10))*-9,0,0,1);
+ gltranslatef(-223,0,0);
+ end;
glBindTexture(GL_TEXTURE_2D, credits_blindguard.TexNum);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_BLEND);
glEnable(GL_TEXTURE_2D);
glbegin(gl_quads);
- glTexCoord2f(0, 0); glVertex2f(-163, -129);
- glTexCoord2f(0, 1); glVertex2f(-163, 129);
- glTexCoord2f(1, 1); glVertex2f( 163, 129);
- glTexCoord2f(1, 0); glVertex2f( 163, -129);
+ glTexCoord2f(0,0);glVertex2f(-163, -129);
+ glTexCoord2f(0,1);glVertex2f(-163, 129);
+ glTexCoord2f(1,1); glVertex2f(163, 129);
+ glTexCoord2f(1,0);glVertex2f(163, -129);
glEnd;
gldisable(gl_texture_2d);
gldisable(GL_BLEND);
@@ -665,47 +640,35 @@ begin
end;
// Blindy (zoom from 0 to full size and rotation, zoom zo doubble size and shift to upper right)
- STime := Timings[10] - 10;
- Delay := Timings[11] - Timings[10] + 5;
+ STime:=Timings[10]-10;
+ Delay:=Timings[11]-Timings[10]+5;
if CTime > STime then
begin
- k := 0;
- ESC_Alpha := 20;
+ k:=0;
+ ESC_Alpha:=20;
try
- for j := 0 to 40 do
+ for j:=0 to 40 do
begin
- if (j < length(Data)) and
- (k < length(Data)) then
+ if ( j < length( Data ) ) AND
+ ( k < length( Data ) ) then
begin
if Data[j] >= Data[k] then
- k := j;
+ k:=j;
end;
end;
except
end;
- if Data[k] > 0.25 then
- ESC_Alpha := 5
- else
- inc(ESC_Alpha);
- if ESC_Alpha > 20 then
- ESC_Alpha := 20;
- if ((CTime - STime) < 20) then
- ESC_Alpha := 20;
- if CTime <= STime + 10 then
- j := CTime - STime
- else
- j := 10;
- if (CTime >= STime + Delay - 10) then
- if (CTime <= STime + Delay) then
- j := (STime + Delay) - CTime
- else
- j := 0;
- glColor4f(1, 1, 1, ESC_Alpha / 20 * j / 10);
-
- if (CTime >= STime+20) and (CTime<=STime+22) then
- begin
+
+ if Data[k]>0.25 then ESC_Alpha:=5 else inc(ESC_Alpha);
+ if ESC_Alpha >20 then ESC_Alpha:=20;
+ if ((CTime-STime)<20) then ESC_Alpha:=20;
+ if CTime <=STime+10 then j:=CTime-STime else j:=10;
+ if (CTime >=STime+Delay-10) then if (CTime <=STime+Delay) then j:=(STime+Delay)-CTime else j:=0;
+ 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);
@@ -718,31 +681,28 @@ begin
end;
glPushMatrix;
- gltranslatef(223, 329, 0);
- if CTime <= STime + 20 then
- begin
- j := CTime - Stime;
- glscalef(j * j / 400, j * j / 400, j * j / 400);
- glrotatef(j * 18.0, 0, 0, 1);
+ gltranslatef(223,329,0);
+ if CTime <= STime+20 then begin
+ j:=CTime-Stime;
+ glscalef(j*j/400,j*j/400,j*j/400);
+ glrotatef(j*18.0,0,0,1);
+ end;
+ if CTime >=STime+Delay-10 then if CTime <=STime+Delay then begin
+ j:=CTime-(STime+Delay-10);
+ f:=j*10.0;
+ gltranslatef(f*3,-f,0);
+ glscalef(1+j/10,1+j/10,1+j/10);
+ glrotatef(j*9.0,0,0,1);
end;
- if CTime >= STime + Delay - 10 then
- if CTime <= STime + Delay then
- begin
- j := CTime - (STime + Delay - 10);
- f := j * 10.0;
- gltranslatef(f * 3, -f, 0);
- glscalef(1 + j / 10, 1 + j / 10, 1 + j / 10);
- glrotatef(j * 9.0, 0, 0, 1);
- end;
glBindTexture(GL_TEXTURE_2D, credits_blindy.TexNum);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_BLEND);
glEnable(GL_TEXTURE_2D);
glbegin(gl_quads);
- glTexCoord2f(0, 0); glVertex2f(-163, -129);
- glTexCoord2f(0, 1); glVertex2f(-163, 129);
- glTexCoord2f(1, 1); glVertex2f( 163, 129);
- glTexCoord2f(1, 0); glVertex2f( 163, -129);
+ glTexCoord2f(0,0);glVertex2f(-163, -129);
+ glTexCoord2f(0,1);glVertex2f(-163, 129);
+ glTexCoord2f(1,1); glVertex2f(163, 129);
+ glTexCoord2f(1,0);glVertex2f(163, -129);
glEnd;
gldisable(gl_texture_2d);
gldisable(GL_BLEND);
@@ -750,47 +710,35 @@ begin
end;
// Canni (shift in from left, shift out to upper right)
- STime := Timings[11] - 10;
- Delay := Timings[12] - Timings[11] + 5;
+ STime:=Timings[11]-10;
+ Delay:=Timings[12]-Timings[11]+5;
if CTime > STime then
begin
- k := 0;
- ESC_Alpha := 20;
+ k:=0;
+ ESC_Alpha:=20;
try
- for j := 0 to 40 do
+ for j:=0 to 40 do
begin
- if (j < length(Data)) and
- (k < length(Data)) then
+ if ( j < length( Data ) ) AND
+ ( k < length( Data ) ) then
begin
if Data[j] >= Data[k] then
- k := j;
+ k:=j;
end;
end;
except
end;
- if Data[k] > 0.25 then
- ESC_Alpha := 5
- else
- inc(ESC_Alpha);
- if ESC_Alpha > 20 then
- ESC_Alpha := 20;
- if ((CTime - STime) < 20) then
- ESC_Alpha := 20;
- if CTime <= STime + 10 then
- j := CTime - STime
- else
- j := 10;
- if (CTime >= STime + Delay - 10) then
- if (CTime <= STime + Delay) then
- j := (STime + Delay) - CTime
- else
- j := 0;
- glColor4f(1, 1, 1, ESC_Alpha / 20 * j / 10);
-
- if (CTime >= STime + 10) and (CTime <= STime + 12) then
- begin
+
+ if Data[k]>0.25 then ESC_Alpha:=5 else inc(ESC_Alpha);
+ if ESC_Alpha >20 then ESC_Alpha:=20;
+ if ((CTime-STime)<20) then ESC_Alpha:=20;
+ if CTime <=STime+10 then j:=CTime-STime else j:=10;
+ if (CTime >=STime+Delay-10) then if (CTime <=STime+Delay) then j:=(STime+Delay)-CTime else j:=0;
+ 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);
@@ -803,26 +751,23 @@ begin
end;
glPushMatrix;
- gltranslatef(223, 329, 0);
- if CTime <= STime + 10 then
- begin
- gltranslatef(((CTime - STime) * 21.0) - 210, 0, 0);
+ gltranslatef(223,329,0);
+ if CTime <= STime+10 then begin
+ gltranslatef(((CTime-STime)*21.0)-210,0,0);
+ end;
+ if CTime >=STime+Delay-10 then if CTime <=STime+Delay then begin
+ j:=(CTime-(STime+Delay-10))*21;
+ gltranslatef(j,-j/2,0);
end;
- if CTime >= STime + Delay - 10 then
- if CTime <= STime + Delay then
- begin
- j := (CTime - (STime + Delay - 10)) * 21;
- gltranslatef(j, -j / 2, 0);
- end;
glBindTexture(GL_TEXTURE_2D, credits_canni.TexNum);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_BLEND);
glEnable(GL_TEXTURE_2D);
glbegin(gl_quads);
- glTexCoord2f(0, 0); glVertex2f(-163, -129);
- glTexCoord2f(0, 1); glVertex2f(-163, 129);
- glTexCoord2f(1, 1); glVertex2f( 163, 129);
- glTexCoord2f(1, 0); glVertex2f( 163, -129);
+ glTexCoord2f(0,0);glVertex2f(-163, -129);
+ glTexCoord2f(0,1);glVertex2f(-163, 129);
+ glTexCoord2f(1,1); glVertex2f(163, 129);
+ glTexCoord2f(1,0);glVertex2f(163, -129);
glEnd;
gldisable(gl_texture_2d);
gldisable(GL_BLEND);
@@ -830,47 +775,35 @@ begin
end;
// Commandio (flip in from down, flip out to upper right)
- STime := Timings[12] - 10;
- Delay := Timings[13] - Timings[12];
+ STime:=Timings[12]-10;
+ Delay:=Timings[13]-Timings[12];
if CTime > STime then
begin
- k := 0;
- ESC_Alpha := 20;
+ k:=0;
+ ESC_Alpha:=20;
try
- for j := 0 to 40 do
+ for j:=0 to 40 do
begin
- if (j < length(Data)) and
- (k < length(Data)) then
+ if ( j < length( Data ) ) AND
+ ( k < length( Data ) ) then
begin
if Data[j] >= Data[k] then
- k := j;
+ k:=j;
end;
end;
except
end;
- if Data[k] > 0.25 then
- ESC_Alpha := 5
- else
- inc(ESC_Alpha);
- if ESC_Alpha > 20 then
- ESC_Alpha := 20;
- if ((CTime - STime) < 20) then
- ESC_Alpha := 20;
- if CTime <= STime + 10 then
- j := CTime - STime
- else
- j := 10;
- if (CTime >= STime + Delay - 10) then
- if (CTime <= STime + Delay) then
- j := (STime + Delay) - CTime
- else
- j := 0;
- glColor4f(1, 1, 1, ESC_Alpha / 20 * j / 10);
-
- if (CTime >= STime + 10) and (CTime <= STime + 12) then
- begin
+
+ if Data[k]>0.25 then ESC_Alpha:=5 else inc(ESC_Alpha);
+ if ESC_Alpha >20 then ESC_Alpha:=20;
+ if ((CTime-STime)<20) then ESC_Alpha:=20;
+ if CTime <=STime+10 then j:=CTime-STime else j:=10;
+ if (CTime >=STime+Delay-10) then if (CTime <=STime+Delay) then j:=(STime+Delay)-CTime else j:=0;
+ 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);
@@ -883,27 +816,25 @@ begin
end;
glPushMatrix;
- gltranslatef(223, 329, 0);
- if CTime <= STime + 10 then
- f := 258.0 - 25.8 * (CTime - STime)
+ gltranslatef(223,329,0);
+ if CTime <= STime+10 then
+ f:=258.0-25.8*(CTime-STime)
else
- f := 0;
- g := 0;
- if CTime >= STime + Delay - 10 then
- if CTime <= STime + Delay then
- begin
- j := CTime - (STime + Delay - 10);
- g := 32.6 * j;
- end;
+ f:=0;
+ g:=0;
+ if CTime >=STime+Delay-10 then if CTime <=STime+Delay then begin
+ j:=CTime-(STime+Delay-10);
+ g:=32.6*j;
+ end;
glBindTexture(GL_TEXTURE_2D, credits_commandio.TexNum);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_BLEND);
glEnable(GL_TEXTURE_2D);
glbegin(gl_quads);
- glTexCoord2f(0, 0); glVertex2f(-163 + g - f * 1.5, -129 + f * 1.5 - g/2);
- glTexCoord2f(0, 1); glVertex2f(-163 + g * 1.5, 129 - (g * 1.5 * 258 / 326));
- glTexCoord2f(1, 1); glVertex2f( 163 + g, 129 + g / 4);
- glTexCoord2f(1, 0); glVertex2f( 163 + f * 1.5 + g / 4, -129 + f * 1.5 - g / 4);
+ glTexCoord2f(0,0);glVertex2f(-163+g-f*1.5, -129+f*1.5-g/2);
+ glTexCoord2f(0,1);glVertex2f(-163+g*1.5, 129-(g*1.5*258/326));
+ glTexCoord2f(1,1); glVertex2f(163+g, 129+g/4);
+ glTexCoord2f(1,0);glVertex2f(163+f*1.5+g/4, -129+f*1.5-g/4);
glEnd;
gldisable(gl_texture_2d);
gldisable(GL_BLEND);
@@ -911,57 +842,46 @@ begin
end;
// lazy joker (just scrolls from left to right, no twinkling stars, no on-beat flashing)
- STime := Timings[13] - 35;
- Delay := Timings[14] - Timings[13] + 5;
+ STime:=Timings[13]-35;
+ Delay:=Timings[14]-Timings[13]+5;
if CTime > STime then
begin
- k := 0;
+ k:=0;
try
- for j := 0 to 40 do
+ for j:=0 to 40 do
begin
- if (j < length(Data)) and
- (k < length(Data)) then
+ if ( j < length( Data ) ) AND
+ ( k < length( Data ) ) then
begin
if Data[j] >= Data[k] then
- k := j;
+ k:=j;
end;
end;
except
end;
- if Data[k] > 0.25 then
- ESC_Alpha := 5
- else
- inc(ESC_Alpha);
- if ESC_Alpha > 20 then
- ESC_Alpha := 20;
- if ((CTime - STime) > 10) and ((CTime - STime) < 20) then
- ESC_Alpha := 20;
- ESC_Alpha := 10;
- f := CTime - STime;
- if CTime <= STime + 40 then
- j := CTime - STime
- else
- j := 40;
- if (CTime >= STime + Delay - 40) then
- if (CTime <= STime + Delay) then
- j := (STime + Delay) - CTime
- else
- j := 0;
- glColor4f(1, 1, 1, ESC_Alpha / 20 * j * j / 1600);
+
+ if Data[k]>0.25 then ESC_Alpha:=5 else inc(ESC_Alpha);
+ if ESC_Alpha >20 then ESC_Alpha:=20;
+ if ((CTime-STime)>10) and ((CTime-STime)<20) then ESC_Alpha:=20;
+ ESC_Alpha:=10;
+ f:=CTime-STime;
+ if CTime <=STime+40 then j:=CTime-STime else j:=40;
+ if (CTime >=STime+Delay-40) then if (CTime <=STime+Delay) then j:=(STime+Delay)-CTime else j:=0;
+ glColor4f(1, 1, 1, ESC_Alpha/20*j*j/1600);
glPushMatrix;
- gltranslatef(180 + (f - 70), 329, 0);
+ gltranslatef(180+(f-70),329,0);
glBindTexture(GL_TEXTURE_2D, credits_lazyjoker.TexNum);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_BLEND);
glEnable(GL_TEXTURE_2D);
glbegin(gl_quads);
- glTexCoord2f(0, 0); glVertex2f(-163, -129);
- glTexCoord2f(0, 1); glVertex2f(-163, 129);
- glTexCoord2f(1, 1); glVertex2f( 163, 129);
- glTexCoord2f(1, 0); glVertex2f( 163, -129);
+ glTexCoord2f(0,0);glVertex2f(-163, -129);
+ glTexCoord2f(0,1);glVertex2f(-163, 129);
+ glTexCoord2f(1,1); glVertex2f(163, 129);
+ glTexCoord2f(1,0);glVertex2f(163, -129);
glEnd;
gldisable(gl_texture_2d);
gldisable(GL_BLEND);
@@ -969,47 +889,36 @@ begin
end;
// Mog (flip in from right, flip out to lower right)
- STime := Timings[14] - 10;
- Delay := Timings[15] - Timings[14] + 5;
+ STime:=Timings[14]-10;
+ Delay:=Timings[15]-Timings[14]+5;
if CTime > STime then
begin
- k := 0;
- ESC_Alpha := 20;
+ k:=0;
+ ESC_Alpha:=20;
+
try
- for j := 0 to 40 do
+ for j:=0 to 40 do
begin
- if (j < length(Data)) and
- (k < length(Data)) then
+ if ( j < length( Data ) ) AND
+ ( k < length( Data ) ) then
begin
if Data[j] >= Data[k] then
- k := j;
+ k:=j;
end;
end;
except
end;
- if Data[k] > 0.25 then
- ESC_Alpha := 5
- else
- inc(ESC_Alpha);
- if ESC_Alpha > 20 then
- ESC_Alpha := 20;
- if ((CTime - STime) < 20) then
- ESC_Alpha := 20;
- if CTime <= STime + 10 then
- j := CTime - STime
- else
- j := 10;
- if (CTime >= STime + Delay - 10) then
- if (CTime <= STime + Delay) then
- j := (STime + Delay) - CTime
- else
- j := 0;
- glColor4f(1, 1, 1, ESC_Alpha / 20 * j / 10);
-
- if (CTime >= STime + 10) and (CTime <= STime + 12) then
- begin
+
+ if Data[k]>0.25 then ESC_Alpha:=5 else inc(ESC_Alpha);
+ if ESC_Alpha >20 then ESC_Alpha:=20;
+ if ((CTime-STime)<20) then ESC_Alpha:=20;
+ if CTime <=STime+10 then j:=CTime-STime else j:=10;
+ if (CTime >=STime+Delay-10) then if (CTime <=STime+Delay) then j:=(STime+Delay)-CTime else j:=0;
+ 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);
@@ -1022,28 +931,26 @@ begin
end;
glPushMatrix;
- gltranslatef(223, 329, 0);
- if CTime <= STime + 10 then
- f := 326.0 - 32.6 * (CTime - STime)
+ gltranslatef(223,329,0);
+ if CTime <= STime+10 then
+ f:=326.0-32.6*(CTime-STime)
else
- f := 0;
-
- g := 0;
- if CTime >= STime + Delay - 10 then
- if CTime <= STime + Delay then
- begin
- j := CTime - (STime + Delay - 10);
- g := 32.6 * j;
- end;
+ f:=0;
+
+ g:=0;
+ if CTime >=STime+Delay-10 then if CTime <=STime+Delay then begin
+ j:=CTime-(STime+Delay-10);
+ g:=32.6*j;
+ end;
glBindTexture(GL_TEXTURE_2D, credits_mog.TexNum);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_BLEND);
glEnable(GL_TEXTURE_2D);
glbegin(gl_quads);
- glTexCoord2f(0, 0); glVertex2f(-163 + g * 1.5, -129 + g * 1.5);
- glTexCoord2f(0, 1); glVertex2f(-163 + g * 1.2, 129 + g);
- glTexCoord2f(1, 1); glVertex2f( 163 - f + g / 2, 129 + f * 1.5 + g / 4);
- glTexCoord2f(1, 0); glVertex2f( 163 - f + g * 1.5, -129 - f * 1.5);
+ glTexCoord2f(0,0);glVertex2f(-163+g*1.5, -129+g*1.5);
+ glTexCoord2f(0,1);glVertex2f(-163+g*1.2, 129+g);
+ glTexCoord2f(1,1); glVertex2f(163-f+g/2, 129+f*1.5+g/4);
+ glTexCoord2f(1,0);glVertex2f(163-f+g*1.5, -129-f*1.5);
glEnd;
gldisable(gl_texture_2d);
gldisable(GL_BLEND);
@@ -1051,47 +958,35 @@ begin
end;
// Mota (rotate in from upper right, shift out to lower left while shrinking and rotateing)
- STime := Timings[15] - 10;
- Delay := Timings[16] - Timings[15] + 5;
+ STime:=Timings[15]-10;
+ Delay:=Timings[16]-Timings[15]+5;
if CTime > STime then
begin
- k := 0;
- ESC_Alpha := 20;
+ k:=0;
+ ESC_Alpha:=20;
try
- for j := 0 to 40 do
+ for j:=0 to 40 do
begin
- if (j < length(Data)) and
- (k < length(Data)) then
+ if ( j < length( Data ) ) AND
+ ( k < length( Data ) ) then
begin
if Data[j] >= Data[k] then
- k := j;
+ k:=j;
end;
end;
except
end;
- if Data[k] > 0.25 then
- ESC_Alpha := 5
- else
- inc(ESC_Alpha);
- if ESC_Alpha > 20 then
- ESC_Alpha := 20;
- if ((CTime - STime) < 20) then
- ESC_Alpha := 20;
- if CTime <= STime + 10 then
- j := CTime - STime
- else
- j := 10;
- if (CTime >= STime + Delay - 10) then
- if (CTime <= STime + Delay) then
- j := (STime + Delay) - CTime
- else
- j := 0;
- glColor4f(1, 1, 1, ESC_Alpha / 20 * j / 10);
-
- if (CTime >= STime + 10) and (CTime <= STime + 12) then
- begin
+
+ if Data[k]>0.25 then ESC_Alpha:=5 else inc(ESC_Alpha);
+ if ESC_Alpha >20 then ESC_Alpha:=20;
+ if ((CTime-STime)<20) then ESC_Alpha:=20;
+ if CTime <=STime+10 then j:=CTime-STime else j:=10;
+ if (CTime >=STime+Delay-10) then if (CTime <=STime+Delay) then j:=(STime+Delay)-CTime else j:=0;
+ 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);
@@ -1104,31 +999,28 @@ begin
end;
glPushMatrix;
- gltranslatef(223, 329, 0);
- if CTime <= STime + 10 then
- begin
- gltranslatef(223, 0, 0);
- glrotatef((10 - (CTime - STime)) * 9, 0, 0, 1);
- gltranslatef(-223, 0, 0);
+ gltranslatef(223,329,0);
+ if CTime <= STime+10 then begin
+ gltranslatef(223,0,0);
+ glrotatef((10-(CTime-STime))*9,0,0,1);
+ gltranslatef(-223,0,0);
+ end;
+ if CTime >=STime+Delay-10 then if CTime <=STime+Delay then begin
+ j:=CTime-(STime+Delay-10);
+ f:=j*10.0;
+ gltranslatef(-f*2,-f,0);
+ glscalef(1-j/10,1-j/10,1-j/10);
+ glrotatef(-j*9.0,0,0,1);
end;
- if CTime >= STime + Delay - 10 then
- if CTime <= STime + Delay then
- begin
- j := CTime - (STime + Delay - 10);
- f := j * 10.0;
- gltranslatef(-f * 2, -f, 0);
- glscalef(1 - j / 10, 1 - j / 10, 1 - j / 10);
- glrotatef(-j * 9.0, 0, 0, 1);
- end;
glBindTexture(GL_TEXTURE_2D, credits_mota.TexNum);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_BLEND);
glEnable(GL_TEXTURE_2D);
glbegin(gl_quads);
- glTexCoord2f(0, 0); glVertex2f(-163, -129);
- glTexCoord2f(0, 1); glVertex2f(-163, 129);
- glTexCoord2f(1, 1); glVertex2f( 163, 129);
- glTexCoord2f(1, 0); glVertex2f( 163, -129);
+ glTexCoord2f(0,0);glVertex2f(-163, -129);
+ glTexCoord2f(0,1);glVertex2f(-163, 129);
+ glTexCoord2f(1,1); glVertex2f(163, 129);
+ glTexCoord2f(1,0);glVertex2f(163, -129);
glEnd;
gldisable(gl_texture_2d);
gldisable(GL_BLEND);
@@ -1136,47 +1028,35 @@ begin
end;
// Skillmaster (shift in from lower right, rotate out to upper right)
- STime := Timings[16] - 10;
- Delay := Timings[17] - Timings[16] + 5;
+ STime:=Timings[16]-10;
+ Delay:=Timings[17]-Timings[16]+5;
if CTime > STime then
begin
- k := 0;
- ESC_Alpha := 20;
+ k:=0;
+ ESC_Alpha:=20;
try
- for j := 0 to 40 do
+ for j:=0 to 40 do
begin
- if (j < length(Data)) and
- (k < length(Data)) then
+ if ( j < length( Data ) ) AND
+ ( k < length( Data ) ) then
begin
if Data[j] >= Data[k] then
- k := j;
+ k:=j;
end;
end;
except
end;
- if Data[k] > 0.25 then
- ESC_Alpha := 5
- else
- inc(ESC_Alpha);
- if ESC_Alpha > 20 then
- ESC_Alpha := 20;
- if ((CTime - STime) < 20) then
- ESC_Alpha := 20;
- if CTime <= STime + 10 then
- j := CTime - STime
- else
- j := 10;
- if (CTime >= STime + Delay - 10) then
- if (CTime <= STime + Delay) then
- j := (STime + Delay) - CTime
- else
- j := 0;
- glColor4f(1, 1, 1, ESC_Alpha / 20 * j / 10);
-
- if (CTime >= STime + 10) and (CTime <= STime + 12) then
- begin
+
+ if Data[k]>0.25 then ESC_Alpha:=5 else inc(ESC_Alpha);
+ if ESC_Alpha >20 then ESC_Alpha:=20;
+ if ((CTime-STime)<20) then ESC_Alpha:=20;
+ if CTime <=STime+10 then j:=CTime-STime else j:=10;
+ if (CTime >=STime+Delay-10) then if (CTime <=STime+Delay) then j:=(STime+Delay)-CTime else j:=0;
+ 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);
@@ -1189,31 +1069,28 @@ begin
end;
glPushMatrix;
- gltranslatef(223, 329, 0);
- if CTime <= STime + 10 then
- begin
- j := STime + 10 - CTime;
- f := j * 10.0;
- gltranslatef(+f * 2, +f / 2, 0);
+ gltranslatef(223,329,0);
+ if CTime <= STime+10 then begin
+ j:=STime+10-CTime;
+ f:=j*10.0;
+ gltranslatef(+f*2,+f/2,0);
+ end;
+ if CTime >=STime+Delay-10 then if CTime <=STime+Delay then begin
+ j:=CTime-(STime+Delay-10);
+ gltranslatef(0,-223,0);
+ glrotatef(integer(j)*-9,0,0,1);
+ gltranslatef(0,223,0);
+ glrotatef(j*9,0,0,1);
end;
- if CTime >= STime + Delay - 10 then
- if CTime <= STime + Delay then
- begin
- j := CTime - (STime + Delay - 10);
- gltranslatef(0, -223, 0);
- glrotatef(integer(j) * -9, 0, 0, 1);
- gltranslatef(0, 223, 0);
- glrotatef(j * 9, 0, 0, 1);
- end;
glBindTexture(GL_TEXTURE_2D, credits_skillmaster.TexNum);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_BLEND);
glEnable(GL_TEXTURE_2D);
glbegin(gl_quads);
- glTexCoord2f(0, 0); glVertex2f(-163, -129);
- glTexCoord2f(0, 1); glVertex2f(-163, 129);
- glTexCoord2f(1, 1); glVertex2f( 163, 129);
- glTexCoord2f(1, 0); glVertex2f( 163, -129);
+ glTexCoord2f(0,0);glVertex2f(-163, -129);
+ glTexCoord2f(0,1);glVertex2f(-163, 129);
+ glTexCoord2f(1,1); glVertex2f(163, 129);
+ glTexCoord2f(1,0);glVertex2f(163, -129);
glEnd;
gldisable(gl_texture_2d);
gldisable(GL_BLEND);
@@ -1221,47 +1098,35 @@ begin
end;
// WhiteShark (flip in from lower left, flip out to upper right)
- STime := Timings[17] - 10;
- Delay := Timings[18] - Timings[17];
+ STime:=Timings[17]-10;
+ Delay:=Timings[18]-Timings[17];
if CTime > STime then
begin
- k := 0;
- ESC_Alpha := 20;
+ k:=0;
+ ESC_Alpha:=20;
try
- for j := 0 to 40 do
+ for j:=0 to 40 do
begin
- if (j < length(Data)) and
- (k < length(Data)) then
+ if ( j < length( Data ) ) AND
+ ( k < length( Data ) ) then
begin
if Data[j] >= Data[k] then
- k := j;
+ k:=j;
end;
end;
except
end;
- if Data[k] > 0.25 then
- ESC_Alpha := 5
- else
- inc(ESC_Alpha);
- if ESC_Alpha > 20 then
- ESC_Alpha := 20;
- if ((CTime - STime) < 20) then
- ESC_Alpha := 20;
- if CTime <= STime + 10 then
- j := CTime - STime
- else
- j := 10;
- if (CTime >= STime + Delay - 10) then
- if (CTime <= STime + Delay) then
- j := (STime + Delay) - CTime
- else
- j := 0;
- glColor4f(1, 1, 1, ESC_Alpha / 20 * j / 10);
-
- if (CTime >= STime + 10) and (CTime <= STime + 12) then
- begin
+
+ if Data[k]>0.25 then ESC_Alpha:=5 else inc(ESC_Alpha);
+ if ESC_Alpha >20 then ESC_Alpha:=20;
+ if ((CTime-STime)<20) then ESC_Alpha:=20;
+ if CTime <=STime+10 then j:=CTime-STime else j:=10;
+ if (CTime >=STime+Delay-10) then if (CTime <=STime+Delay) then j:=(STime+Delay)-CTime else j:=0;
+ 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);
@@ -1274,20 +1139,20 @@ begin
end;
glPushMatrix;
- gltranslatef(223, 329, 0);
- if CTime <= STime + 10 then
- f := 326.0 - 32.6 * (CTime - STime)
+ gltranslatef(223,329,0);
+ if CTime <= STime+10 then
+ f:=326.0-32.6*(CTime-STime)
else
- f := 0;
+ f:=0;
- if (CTime >= STime + Delay - 10) and (CTime <= STime + Delay) then
+ if (CTime >= STime+Delay-10) and (CTime <= STime+Delay) then
begin
- j := CTime - (STime + Delay - 10);
- g := 32.6 * j;
+ j:=CTime-(STime+Delay-10);
+ g:=32.6*j;
end
else
begin
- g := 0;
+ g:=0;
end;
glBindTexture(GL_TEXTURE_2D, credits_whiteshark.TexNum);
@@ -1295,50 +1160,51 @@ begin
glEnable(GL_BLEND);
glEnable(GL_TEXTURE_2D);
glbegin(gl_quads);
- glTexCoord2f(0, 0); glVertex2f(-163 - f + g, -129 + f / 4 - g / 2);
- glTexCoord2f(0, 1); glVertex2f(-163 - f / 4 + g, 129 + g / 2 + f / 4);
- glTexCoord2f(1, 1); glVertex2f( 163 - f * 1.2 + g / 4, 129 + f / 2 - g / 4);
- glTexCoord2f(1, 0); glVertex2f( 163 - f * 1.5 + g / 4, -129 + f * 1.5 + g / 4);
+ glTexCoord2f(0,0);glVertex2f(-163-f+g, -129+f/4-g/2);
+ glTexCoord2f(0,1);glVertex2f(-163-f/4+g, 129+g/2+f/4);
+ glTexCoord2f(1,1); glVertex2f(163-f*1.2+g/4, 129+f/2-g/4);
+ glTexCoord2f(1,0);glVertex2f(163-f*1.5+g/4, -129+f*1.5+g/4);
glEnd;
gldisable(gl_texture_2d);
gldisable(GL_BLEND);
glPopMatrix;
end;
- Log.LogStatus('', ' JB-103');
+
+ Log.LogStatus('',' JB-103');
// ####################################################################
// do some twinkle stuff (kinda on beat)
- if (CTime > Timings[8] ) and
- (CTime < Timings[19]) then
+ if (CTime > Timings[8] ) and
+ (CTime < Timings[19] ) then
begin
k := 0;
try
- for j := 0 to 40 do
+ for j:=0 to 40 do
begin
- if (j < length(Data)) and
- (k < length(Data)) then
+ if ( j < length( Data ) ) AND
+ ( k < length( Data ) ) then
begin
if Data[j] >= Data[k] then
- k := j;
+ k:=j;
end;
end;
except
end;
- if Data[k] > 0.2 then
+ if Data[k]>0.2 then
begin
- l := RandomRange(6, 16);
- j := RandomRange(0, 27);
+ l := RandomRange(6,16);
+ j := RandomRange(0,27);
GoldenRec.Spawn(myLogoCoords[j,0], myLogoCoords[j,1], 16-l, l, 0, -1, PerfectNote, 0);
end;
end;
//#################################################
- // draw the rest of the main screen (girl and logo)
+ // draw the rest of the main screen (girl and logo
glEnable(GL_TEXTURE_2D);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
@@ -1346,21 +1212,21 @@ begin
glColor4f(1, 1, 1, 1);
glBindTexture(GL_TEXTURE_2D, credits_bg_ovl.TexNum);
glbegin(gl_quads);
- glTexCoord2f( 0, 0); glVertex2f(800-393, 0);
- glTexCoord2f( 0, 600/1024); glVertex2f(800-393, 600);
- glTexCoord2f(393/512, 600/1024); glVertex2f(800, 600);
- glTexCoord2f(393/512, 0); glVertex2f(800, 0);
+ glTexCoord2f(0,0);glVertex2f(800-393, 0);
+ glTexCoord2f(0,600/1024);glVertex2f(800-393, 600);
+ glTexCoord2f(393/512,600/1024); glVertex2f(800, 600);
+ glTexCoord2f(393/512,0);glVertex2f(800, 0);
glEnd;
-{
+ {
glBindTexture(GL_TEXTURE_2D, credits_bg_logo.TexNum);
glbegin(gl_quads);
- glTexCoord2f( 0, 0); glVertex2f( 0, 0);
- glTexCoord2f( 0, 112/128); glVertex2f( 0, 112);
- glTexCoord2f(497/512, 112/128); glVertex2f(497, 112);
- glTexCoord2f(497/512, 0); glVertex2f(497, 0);
+ glTexCoord2f(0,0);glVertex2f(0, 0);
+ glTexCoord2f(0,112/128);glVertex2f(0, 112);
+ glTexCoord2f(497/512,112/128); glVertex2f(497, 112);
+ glTexCoord2f(497/512,0);glVertex2f(497, 0);
glEnd;
-}
+ }
gldisable(gl_texture_2d);
glDisable(GL_BLEND);
@@ -1368,35 +1234,33 @@ begin
// fade out at end of main part
if Ctime > Timings[19] then
begin
- glColor4f(0, 0, 0, (CTime - Timings[19]) / (Timings[20] - Timings[19]));
+ glColor4f(0,0,0,(Ctime-Timings[19])/(Timings[20]-Timings[19]));
glEnable(GL_BLEND);
glBegin(GL_QUADS);
- glVertex2f( 0, 0);
- glVertex2f( 0, 600);
- glVertex2f(800, 600);
- glVertex2f(800, 0);
+ glVertex2f(0,0);
+ glVertex2f(0,600);
+ glVertex2f(800,600);
+ glVertex2f(800,0);
glEnd;
glDisable(GL_BLEND);
end;
end
else
- if (CRDTS_Stage = Outro) then
+ if (CRDTS_Stage=Outro) then
begin
- if CTime = Timings[20] then
- begin
- CTime_hold := 0;
+ if CTime=Timings[20] then begin
+ CTime_hold:=0;
AudioPlayback.Stop;
AudioPlayback.Open(soundpath + 'credits-outro-tune.mp3');
AudioPlayback.SetVolume(0.2);
- AudioPlayback.SetLoop(true);
+ AudioPlayback.SetLoop(True);
AudioPlayback.Play;
end;
- if CTime_hold > 231 then
- begin
+ if CTime_hold > 231 then begin
AudioPlayback.Play;
- Ctime_hold := 0;
+ Ctime_hold:=0;
end;
- glClearColor(0, 0, 0, 0);
+ glClearColor(0,0,0,0);
glClear(GL_COLOR_BUFFER_BIT or GL_DEPTH_BUFFER_BIT);
// do something useful
@@ -1408,36 +1272,34 @@ begin
glColor4f(1, 1, 1, 1);
glBindTexture(GL_TEXTURE_2D, outro_bg.TexNum);
glbegin(gl_quads);
- glTexCoord2f( 0, 0); glVertex2f( 0, 0);
- glTexCoord2f( 0, 600/1024); glVertex2f( 0, 600);
- glTexCoord2f(800/1024, 600/1024); glVertex2f(800, 600);
- glTexCoord2f(800/1024, 0); glVertex2f(800, 0);
+ glTexCoord2f(0,0);glVertex2f(0, 0);
+ glTexCoord2f(0,600/1024);glVertex2f(0, 600);
+ glTexCoord2f(800/1024,600/1024); glVertex2f(800, 600);
+ glTexCoord2f(800/1024,0);glVertex2f(800, 0);
glEnd;
- // outro overlays
- glColor4f(1, 1, 1, (1 + sin(CTime / 15)) / 3 + 1/3);
+ //outro overlays
+ glColor4f(1, 1, 1, (1+sin(CTime/15))/3+1/3);
glBindTexture(GL_TEXTURE_2D, outro_esc.TexNum);
glbegin(gl_quads);
- glTexCoord2f( 0, 0); glVertex2f( 0, 0);
- glTexCoord2f( 0, 223/256); glVertex2f( 0, 223);
- glTexCoord2f(487/512, 223/256); glVertex2f(487, 223);
- glTexCoord2f(487/512, 0); glVertex2f(487, 0);
+ glTexCoord2f(0,0);glVertex2f(0, 0);
+ glTexCoord2f(0,223/256);glVertex2f(0, 223);
+ glTexCoord2f(487/512,223/256); glVertex2f(487, 223);
+ glTexCoord2f(487/512,0);glVertex2f(487, 0);
glEnd;
- ESC_Alpha := 20;
- if (RandomRange(0,20) > 18) and (ESC_Alpha = 20) then
- ESC_Alpha := 0
- else
- inc(ESC_Alpha);
- if ESC_Alpha > 20 then
- ESC_Alpha := 20;
- glColor4f(1, 1, 1, ESC_Alpha / 20);
+ ESC_Alpha:=20;
+ if (RandomRange(0,20) > 18) and (ESC_Alpha=20) then
+ ESC_Alpha:=0
+ else inc(ESC_Alpha);
+ if ESC_Alpha > 20 then ESC_Alpha:=20;
+ glColor4f(1, 1, 1, ESC_Alpha/20);
glBindTexture(GL_TEXTURE_2D, outro_exd.TexNum);
glbegin(gl_quads);
- glTexCoord2f( 0, 0); glVertex2f(800-310, 600-247);
- glTexCoord2f( 0, 247/256); glVertex2f(800-310, 600 );
- glTexCoord2f(310/512, 247/256); glVertex2f(800, 600 );
- glTexCoord2f(310/512, 0); glVertex2f(800, 600-247);
+ glTexCoord2f(0,0);glVertex2f(800-310, 600-247);
+ glTexCoord2f(0,247/256);glVertex2f(800-310, 600);
+ glTexCoord2f(310/512,247/256); glVertex2f(800, 600);
+ glTexCoord2f(310/512,0);glVertex2f(800, 600-247);
glEnd;
glDisable(GL_TEXTURE_2D);
glDisable(GL_BLEND);
@@ -1446,17 +1308,17 @@ begin
// ...
end;
-{
+ {
// draw credits runtime counter
- SetFontStyle (2);
- SetFontItalic(false);
+ SetFontStyle (2);
+ SetFontItalic(False);
SetFontSize(27);
SetFontPos (5, 5);
glColor4f(1, 1, 1, 1);
-// RuntimeStr := 'CTime: ' + inttostr(floor(CTime / 30.320663991914489602156136106092)) + '.' + inttostr(floor(CTime / 3.0320663991914489602156136106092) - floor(CTime / 30.320663991914489602156136106092) * 10);
- RuntimeStr := 'CTime: ' + inttostr(CTime);
+ //RuntimeStr:='CTime: '+inttostr(floor(CTime/30.320663991914489602156136106092))+'.'+inttostr(floor(CTime/3.0320663991914489602156136106092)-floor(CTime/30.320663991914489602156136106092)*10);
+ RuntimeStr:='CTime: '+inttostr(CTime);
glPrint (RuntimeStr[1]);
-}
+ }
// make the stars shine
GoldenRec.Draw;
diff --git a/unicode/src/screens/UScreenEditConvert.pas b/unicode/src/screens/UScreenEditConvert.pas
index 109a828b..835590ed 100644
--- a/unicode/src/screens/UScreenEditConvert.pas
+++ b/unicode/src/screens/UScreenEditConvert.pas
@@ -34,7 +34,6 @@ interface
{$I switches.inc}
uses
- math,
UMenu,
SDL,
{$IFDEF UseMIDIPort}
@@ -138,7 +137,7 @@ uses
function TScreenEditConvert.ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean;
begin
Result := true;
- if (PressedDown) then
+ If (PressedDown) Then
begin // Key Down
// check normal keys
case UCS4UpperCase(CharCode) of
@@ -181,15 +180,15 @@ begin
end;
if Interaction = 2 then
- begin
+ begin
Selected := true;
{$IFDEF UseMIDIPort}
MidiFile.OnMidiEvent := nil;
{$ENDIF}
{for T := 0 to High(ATrack) do
- begin
+ begin
if ATrack[T].Hear then
- begin
+ begin
MidiTrack := MidiFile.GetTrack(T);
MidiTrack.OnMidiEvent := MidiFile1MidiEvent;
end;
@@ -198,9 +197,9 @@ begin
end;
if Interaction = 3 then
- begin
+ begin
if SelectedNumber > 0 then
- begin
+ begin
Extract;
SaveSong(Song, Lines, ChangeFileExt(ConversionFileName, '.txt'), false);
end;
@@ -211,16 +210,16 @@ begin
SDLK_SPACE:
begin
// ATrack[Sel].Hear := not ATrack[Sel].Hear;
- if Notes in ATrack[Sel].Status then
- begin
- ATrack[Sel].Status := ATrack[Sel].Status - [Notes];
- if Lyrics in ATrack[Sel].Status then
- ATrack[Sel].Status := ATrack[Sel].Status - [Lyrics]
- else
- ATrack[Sel].Status := ATrack[Sel].Status + [Lyrics];
- end
- else
- ATrack[Sel].Status := ATrack[Sel].Status + [Notes];
+ if Notes in ATrack[Sel].Status then
+ begin
+ ATrack[Sel].Status := ATrack[Sel].Status - [Notes];
+ if Lyrics in ATrack[Sel].Status then
+ ATrack[Sel].Status := ATrack[Sel].Status - [Lyrics]
+ else
+ ATrack[Sel].Status := ATrack[Sel].Status + [Lyrics];
+ end
+ else
+ ATrack[Sel].Status := ATrack[Sel].Status + [Notes];
{ if Selected then
begin
@@ -246,13 +245,13 @@ begin
begin
Inc(Sel);
if Sel > High(ATrack) then
- Sel := 0;
+ Sel := 0;
end;
SDLK_UP:
begin
Dec(Sel);
if Sel < 0 then
- Sel := High(ATrack);
+ Sel := High(ATrack);
end;
end;
end;
@@ -314,7 +313,7 @@ begin
for N := 0 to High(ATrack[T].Note) do
begin
if (ATrack[T].Note[N].EventType = 9) and (ATrack[T].Note[N].Data2 > 0) then
- begin
+ begin
Nu := Length(Note);
SetLength(Note, Nu + 1);
Note[Nu].Start := Round(ATrack[T].Note[N].Start / Ticks);
@@ -336,7 +335,7 @@ begin
for N := 0 to High(ATrack[T].Note) do
begin
if (ATrack[T].Note[N].EventType = 15) then
- begin
+ begin
// Log.LogStatus('<' + Track[T].Note[N].Str + '>', 'MIDI');
AddLyric(Round(ATrack[T].Note[N].Start / Ticks), ATrack[T].Note[N].Str);
end;
@@ -454,6 +453,7 @@ begin
AddButton(500, 20, 100, 40, Skin.GetTextureFileName('ButtonF'));
AddButtonText(20, 5, 0, 0, 0, 'Save');
+
{ MidiOut := TMidiOutput.Create(nil);
// MidiOut.Close;
// MidiOut.DeviceID := 0;
@@ -493,11 +493,13 @@ begin
Log.LogStatus(MidiOut.ProductName, 'MIDI');
MidiOut.Open;
+
if FileExists(ConversionFileName) then
begin
MidiFile.Filename := ConversionFileName;
MidiFile.ReadFile;
+
Len := 0;
Sel := 0;
BPM := MidiFile.Bpm;
@@ -577,7 +579,7 @@ var
Bottom: real;
X: real;
Y: real;
- Height: real;
+ H: real;
YSkip: real;
begin
// draw static menu
@@ -585,24 +587,20 @@ begin
Y := 100;
- Height := min(480, 40 * Length(ATrack));
- Bottom := Y + Height;
+ H := Length(ATrack)*40;
+ if H > 480 then
+ H := 480;
+ Bottom := Y + H;
- if Length(ATrack) = 0 then // prevent crash with uncomplete code.
- begin
- Log.LogDebug ('UScreenEditConvert -> TScreenEditConvert.Draw:', 'Length(ATrack) = 0');
- YSkip := 40;
- end
- else
- YSkip := Height / Length(ATrack);
+ YSkip := H / Length(ATrack);
// select
- DrawQuad(10, Y + Sel*YSkip, 780, YSkip, 0.8, 0.8, 0.8);
+ DrawQuad(10, Y+Sel*YSkip, 780, YSkip, 0.8, 0.8, 0.8);
// selected - now me use Status System
for Count := 0 to High(ATrack) do
if ATrack[Count].Hear then
- DrawQuad(10, Y + Count*YSkip, 50, YSkip, 0.8, 0.3, 0.3);
+ DrawQuad(10, Y+Count*YSkip, 50, YSkip, 0.8, 0.3, 0.3);
glColor3f(0, 0, 0);
for Count := 0 to High(ATrack) do
begin
@@ -620,12 +618,12 @@ begin
end;
end;
- DrawLine( 10, Y, 10, Bottom, 0, 0, 0);
- DrawLine( 60, Y, 60, Bottom, 0, 0, 0);
+ DrawLine(10, Y, 10, Bottom, 0, 0, 0);
+ DrawLine(60, Y, 60, Bottom, 0, 0, 0);
DrawLine(790, Y, 790, Bottom, 0, 0, 0);
for Count := 0 to Length(ATrack) do
- DrawLine(10, Y + Count*YSkip, 790, Y + Count*YSkip, 0, 0, 0);
+ DrawLine(10, Y+Count*YSkip, 790, Y+Count*YSkip, 0, 0, 0);
for Count := 0 to High(ATrack) do
begin
@@ -638,21 +636,9 @@ begin
for Count2 := 0 to High(ATrack[Count].Note) do
begin
if ATrack[Count].Note[Count2].EventType = 9 then
- DrawQuad(60 + ATrack[Count].Note[Count2].Start/Len*725,
- Y + (Count+1)*YSkip - ATrack[Count].Note[Count2].Data1*35/127,
- 3,
- 3,
- ColR[Count],
- ColG[Count],
- ColB[Count]);
+ DrawQuad(60 + ATrack[Count].Note[Count2].Start/Len * 725, Y + (Count+1)*YSkip - ATrack[Count].Note[Count2].Data1*35/127, 3, 3, ColR[Count], ColG[Count], ColB[Count]);
if ATrack[Count].Note[Count2].EventType = 15 then
- DrawLine(60 + ATrack[Count].Note[Count2].Start/Len*725,
- Y + 0.75*YSkip + Count*YSkip,
- 60 + ATrack[Count].Note[Count2].Start/Len*725,
- Y + YSkip + Count*YSkip,
- ColR[Count],
- ColG[Count],
- ColB[Count]);
+ DrawLine(60 + ATrack[Count].Note[Count2].Start/Len * 725, Y + 0.75 * YSkip + Count*YSkip, 60 + ATrack[Count].Note[Count2].Start/Len * 725, Y + YSkip + Count*YSkip, ColR[Count], ColG[Count], ColB[Count]);
end;
// playing line
diff --git a/unicode/src/screens/UScreenEditHeader.pas b/unicode/src/screens/UScreenEditHeader.pas
index fed226ba..2548069d 100644
--- a/unicode/src/screens/UScreenEditHeader.pas
+++ b/unicode/src/screens/UScreenEditHeader.pas
@@ -116,7 +116,7 @@ begin
SDLK_RETURN:
begin
if Interaction = 1 then
- begin
+ begin
// Save;
end;
end;
@@ -159,7 +159,7 @@ begin
begin
T := Interaction - 2 + TextTitle;
if (Interaction >= 2) and (Interaction <= 13) and (Length(Text[T].Text) >= 1) then
- begin
+ begin
Text[T].DeleteLastLetter;
SetRoundButtons;
end;
@@ -170,7 +170,7 @@ begin
32..255:
begin
if (Interaction >= 2) and (Interaction <= 13) then
- begin
+ begin
Text[Interaction - 2 + TextTitle].Text :=
Text[Interaction - 2 + TextTitle].Text + UCS4ToUTF8String(CharCode);
SetRoundButtons;
diff --git a/unicode/src/screens/UScreenEditSub.pas b/unicode/src/screens/UScreenEditSub.pas
index 23ab427b..a892651a 100644
--- a/unicode/src/screens/UScreenEditSub.pas
+++ b/unicode/src/screens/UScreenEditSub.pas
@@ -133,11 +133,11 @@ uses
ULanguage,
UUnicodeUtils;
-// Method for input parsing. If false is returned, GetNextWindow
+// Method for input parsing. If False is returned, GetNextWindow
// should be checked to know the next window to load;
function TScreenEditSub.ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean;
var
- SDL_ModState: word;
+ SDL_ModState: Word;
R: real;
begin
Result := true;
@@ -206,7 +206,7 @@ begin
begin
// Paste text
if SDL_ModState = KMOD_LCTRL then
- begin
+ begin
if Lines[0].Line[Lines[0].Current].HighNote >= Lines[0].Line[CopySrc].HighNote then
PasteText
else
@@ -214,7 +214,7 @@ begin
end;
if SDL_ModState = KMOD_LCTRL + KMOD_LSHIFT then
- begin
+ begin
CopySentence(CopySrc, Lines[0].Current);
end;
end;
@@ -334,7 +334,7 @@ begin
SDLK_4:
begin
if SDL_ModState = KMOD_LCTRL + KMOD_LSHIFT then
- begin
+ begin
CopySentence(CopySrc, Lines[0].Current);
CopySentence(CopySrc+1, Lines[0].Current+1);
CopySentence(CopySrc+2, Lines[0].Current+2);
@@ -342,14 +342,14 @@ begin
end;
if SDL_ModState = KMOD_LCTRL + KMOD_LSHIFT + KMOD_LALT then
- begin
+ begin
CopySentences(CopySrc, Lines[0].Current, 4);
end;
end;
SDLK_5:
begin
if SDL_ModState = KMOD_LCTRL + KMOD_LSHIFT then
- begin
+ begin
CopySentence(CopySrc, Lines[0].Current);
CopySentence(CopySrc+1, Lines[0].Current+1);
CopySentence(CopySrc+2, Lines[0].Current+2);
@@ -358,7 +358,7 @@ begin
end;
if SDL_ModState = KMOD_LCTRL + KMOD_LSHIFT + KMOD_LALT then
- begin
+ begin
CopySentences(CopySrc, Lines[0].Current, 5);
end;
end;
@@ -401,21 +401,21 @@ begin
SDLK_SLASH:
begin
if SDL_ModState = 0 then
- begin
+ begin
// Insert start of sentece
if CurrentNote > 0 then
DivideSentence;
end;
if SDL_ModState = KMOD_LSHIFT then
- begin
+ begin
// Join next sentence with current
if Lines[0].Current < Lines[0].High then
JoinSentence;
end;
if SDL_ModState = KMOD_LCTRL then
- begin
+ begin
// divide note
DivideNote;
end;
@@ -450,7 +450,7 @@ begin
SDLK_DELETE:
begin
if SDL_ModState = KMOD_LCTRL then
- begin
+ begin
// moves text to right in current sentence
DeleteNote;
end;
@@ -466,24 +466,24 @@ begin
begin
// right
if SDL_ModState = 0 then
- begin
+ begin
Lines[0].Line[Lines[0].Current].Note[CurrentNote].Color := 0;
Inc(CurrentNote);
if CurrentNote > Lines[0].Line[Lines[0].Current].HighNote then
- CurrentNote := 0;
+ CurrentNote := 0;
Lines[0].Line[Lines[0].Current].Note[CurrentNote].Color := 1;
Lyric.Selected := CurrentNote;
end;
// ctrl + right
if SDL_ModState = KMOD_LCTRL then
- begin
+ begin
if Lines[0].Line[Lines[0].Current].Note[CurrentNote].Length > 1 then
- begin
+ begin
Dec(Lines[0].Line[Lines[0].Current].Note[CurrentNote].Length);
Inc(Lines[0].Line[Lines[0].Current].Note[CurrentNote].Start);
if CurrentNote = 0 then
- begin
+ begin
Inc(Lines[0].Line[Lines[0].Current].Start);
end;
end;
@@ -491,10 +491,10 @@ begin
// shift + right
if SDL_ModState = KMOD_LSHIFT then
- begin
+ begin
Inc(Lines[0].Line[Lines[0].Current].Note[CurrentNote].Start);
if CurrentNote = 0 then
- begin
+ begin
Inc(Lines[0].Line[Lines[0].Current].Start);
end;
if CurrentNote = Lines[0].Line[Lines[0].Current].HighNote then
@@ -503,7 +503,7 @@ begin
// alt + right
if SDL_ModState = KMOD_LALT then
- begin
+ begin
Inc(Lines[0].Line[Lines[0].Current].Note[CurrentNote].Length);
if CurrentNote = Lines[0].Line[Lines[0].Current].HighNote then
Inc(Lines[0].Line[Lines[0].Current].End_);
@@ -511,7 +511,7 @@ begin
// alt + ctrl + shift + right = move all from cursor to right
if SDL_ModState = KMOD_LALT + KMOD_LCTRL + KMOD_LSHIFT then
- begin
+ begin
MoveAllToEnd(1);
end;
@@ -521,34 +521,34 @@ begin
begin
// left
if SDL_ModState = 0 then
- begin
+ begin
Lines[0].Line[Lines[0].Current].Note[CurrentNote].Color := 0;
Dec(CurrentNote);
if CurrentNote = -1 then
- CurrentNote := Lines[0].Line[Lines[0].Current].HighNote;
+ CurrentNote := Lines[0].Line[Lines[0].Current].HighNote;
Lines[0].Line[Lines[0].Current].Note[CurrentNote].Color := 1;
Lyric.Selected := CurrentNote;
end;
// ctrl + left
if SDL_ModState = KMOD_LCTRL then
- begin
+ begin
Dec(Lines[0].Line[Lines[0].Current].Note[CurrentNote].Start);
Inc(Lines[0].Line[Lines[0].Current].Note[CurrentNote].Length);
if CurrentNote = 0 then
- begin
+ begin
Dec(Lines[0].Line[Lines[0].Current].Start);
end;
end;
// shift + left
if SDL_ModState = KMOD_LSHIFT then
- begin
+ begin
Dec(Lines[0].Line[Lines[0].Current].Note[CurrentNote].Start);
// resizing sentences
if CurrentNote = 0 then
- begin
+ begin
Dec(Lines[0].Line[Lines[0].Current].Start);
end;
@@ -559,9 +559,9 @@ begin
// alt + left
if SDL_ModState = KMOD_LALT then
- begin
+ begin
if Lines[0].Line[Lines[0].Current].Note[CurrentNote].Length > 1 then
- begin
+ begin
Dec(Lines[0].Line[Lines[0].Current].Note[CurrentNote].Length);
if CurrentNote = Lines[0].Line[Lines[0].Current].HighNote then
Dec(Lines[0].Line[Lines[0].Current].End_);
@@ -570,7 +570,7 @@ begin
// alt + ctrl + shift + right = move all from cursor to left
if SDL_ModState = KMOD_LALT + KMOD_LCTRL + KMOD_LSHIFT then
- begin
+ begin
MoveAllToEnd(-1);
end;
@@ -581,7 +581,7 @@ begin
// skip to next sentence
if SDL_ModState = 0 then
- begin {$IFDEF UseMIDIPort}
+ begin {$IFDEF UseMIDIPort}
MidiOut.PutShort($81, Lines[0].Line[Lines[0].Current].Note[MidiLastNote].Tone + 60, 127);
PlaySentenceMidi := false;
{$endif}
@@ -590,7 +590,7 @@ begin
Inc(Lines[0].Current);
CurrentNote := 0;
if Lines[0].Current > Lines[0].High then
- Lines[0].Current := 0;
+ Lines[0].Current := 0;
Lines[0].Line[Lines[0].Current].Note[CurrentNote].Color := 1;
Lyric.AddLine(Lines[0].Current);
@@ -601,7 +601,7 @@ begin
// decrease tone
if SDL_ModState = KMOD_LCTRL then
- begin
+ begin
TransposeNote(-1);
end;
@@ -612,7 +612,7 @@ begin
// skip to previous sentence
if SDL_ModState = 0 then
- begin
+ begin
{$IFDEF UseMIDIPort}
MidiOut.PutShort($81, Lines[0].Line[Lines[0].Current].Note[MidiLastNote].Tone + 60, 127);
PlaySentenceMidi := false;
@@ -622,7 +622,7 @@ begin
Dec(Lines[0].Current);
CurrentNote := 0;
if Lines[0].Current = -1 then
- Lines[0].Current := Lines[0].High;
+ Lines[0].Current := Lines[0].High;
Lines[0].Line[Lines[0].Current].Note[CurrentNote].Color := 1;
Lyric.AddLine(Lines[0].Current);
@@ -633,7 +633,7 @@ begin
// increase tone
if SDL_ModState = KMOD_LCTRL then
- begin
+ begin
TransposeNote(1);
end;
end;
@@ -645,7 +645,7 @@ end;
function TScreenEditSub.ParseInputEditText(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean;
var
- SDL_ModState: word;
+ SDL_ModState: Word;
begin
// used when in Text Edit Mode
Result := true;
@@ -682,11 +682,11 @@ begin
begin
// right
if SDL_ModState = 0 then
- begin
+ begin
Lines[0].Line[Lines[0].Current].Note[CurrentNote].Color := 0;
Inc(CurrentNote);
if CurrentNote > Lines[0].Line[Lines[0].Current].HighNote then
- CurrentNote := 0;
+ CurrentNote := 0;
Lines[0].Line[Lines[0].Current].Note[CurrentNote].Color := 1;
Lyric.Selected := CurrentNote;
end;
@@ -695,11 +695,11 @@ begin
begin
// left
if SDL_ModState = 0 then
- begin
+ begin
Lines[0].Line[Lines[0].Current].Note[CurrentNote].Color := 0;
Dec(CurrentNote);
if CurrentNote = -1 then
- CurrentNote := Lines[0].Line[Lines[0].Current].HighNote;
+ CurrentNote := Lines[0].Line[Lines[0].Current].HighNote;
Lines[0].Line[Lines[0].Current].Note[CurrentNote].Color := 1;
Lyric.Selected := CurrentNote;
end;
@@ -880,7 +880,7 @@ begin
Lines[0].Line[CNew].Start := Lines[0].Line[CStart].Note[NStart].Start;
Lines[0].Line[CNew].Lyric := '';
Lines[0].Line[CNew].End_ := 0;
- Lines[0].Line[CNew].BaseNote := 0;//High(integer); // TODO: High (integer) will causes a memory exception later in this procedure. Weird!
+ Lines[0].Line[CNew].BaseNote := 0;//High(Integer); // TODO: High (Integer) will causes a memory exception later in this procedure. Weird!
Lines[0].Line[CNew].HighNote := -1;
SetLength(Lines[0].Line[CNew].Note, 0);
@@ -910,9 +910,9 @@ begin
//recalculate BaseNote of the divided Sentence
with Lines[0].Line[CStart] do
begin
- BaseNote := High(integer);
+ BaseNote := High(Integer);
- for N := 0 to HighNote do
+ For N := 0 to HighNote do
if Note[N].Tone < BaseNote then
BaseNote := Note[N].Tone;
end;
@@ -994,7 +994,7 @@ begin
C := Lines[0].Current;
//Do Not delete Last Note
- if (Lines[0].High > 0) or (Lines[0].Line[C].HighNote > 0) then
+ if (Lines[0].High > 0) OR (Lines[0].Line[C].HighNote > 0) then
begin
// we copy all notes from the next to the selected one
@@ -1184,6 +1184,7 @@ begin
CopySentence(Src + C, Dst + C);
end;
+
constructor TScreenEditSub.Create;
begin
inherited Create;
@@ -1252,7 +1253,7 @@ begin
else
Error := not CurrentSong.LoadSong();
except
- Error := true;
+ Error := True;
end;
if Error then
@@ -1284,7 +1285,7 @@ begin
Lyric.Clear;
Lyric.X := 400;
Lyric.Y := 500;
- Lyric.Align := atCenter;
+ Lyric.Align := center;
Lyric.Size := 42;
Lyric.ColR := 0;
Lyric.ColG := 0;
@@ -1317,6 +1318,7 @@ begin
{$IFDEF UseMIDIPort}
MidiPos := USTime.GetTime - MidiTime + MidiStart;
+
// stop the music
if (MidiPos > MidiStop) then
begin
@@ -1335,6 +1337,7 @@ begin
if (Lines[0].Line[Lines[0].Current].Note[Pet].Start = AktBeat) then
begin
+
LastClick := AktBeat;
{$IFDEF UseMIDIPort}
if Pet > 0 then
@@ -1426,8 +1429,7 @@ begin
end;
function TScreenEditSub.GetNoteName(Note: integer): string;
-var
- N1, N2: integer;
+var N1, N2: integer;
begin
if (Note > 0) then
begin
diff --git a/unicode/src/screens/UScreenLevel.pas b/unicode/src/screens/UScreenLevel.pas
index caf63a33..188b32f2 100644
--- a/unicode/src/screens/UScreenLevel.pas
+++ b/unicode/src/screens/UScreenLevel.pas
@@ -34,37 +34,30 @@ interface
{$I switches.inc}
uses
- UMenu,
- SDL,
- UDisplay,
- UMusic,
- UFiles,
- SysUtils,
- UThemes;
+ UMenu, SDL, UDisplay, UMusic, UFiles, SysUtils, UThemes;
type
TScreenLevel = class(TMenu)
public
constructor Create; override;
- function ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean; override;
+ function ParseInput(PressedKey: Cardinal; CharCode: UCS4Char; PressedDown: Boolean): Boolean; override;
procedure onShow; override;
procedure SetAnimationProgress(Progress: real); override;
end;
implementation
-uses
- UGraphic,
- UMain,
- UIni,
- USong,
- UTexture,
- UUnicodeUtils;
-
-function TScreenLevel.ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean;
+uses UGraphic,
+ UMain,
+ UIni,
+ USong,
+ UTexture,
+ UUnicodeUtils;
+
+function TScreenLevel.ParseInput(PressedKey: Cardinal; CharCode: UCS4Char; PressedDown: Boolean): Boolean;
begin
Result := true;
- if (PressedDown) then
+ If (PressedDown) Then
begin // Key Down
// check normal keys
case UCS4UpperCase(CharCode) of
diff --git a/unicode/src/screens/UScreenLoading.pas b/unicode/src/screens/UScreenLoading.pas
index 429a3261..e52823be 100644
--- a/unicode/src/screens/UScreenLoading.pas
+++ b/unicode/src/screens/UScreenLoading.pas
@@ -46,16 +46,15 @@ type
Fadeout: boolean;
constructor Create; override;
procedure onShow; override;
- function ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean; override;
+ function ParseInput(PressedKey: Cardinal; CharCode: UCS4Char; PressedDown: Boolean): Boolean; override;
end;
implementation
-uses
- UGraphic,
- UTime;
+uses UGraphic,
+ UTime;
-function TScreenLoading.ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean;
+function TScreenLoading.ParseInput(PressedKey: Cardinal; CharCode: UCS4Char; PressedDown: Boolean): Boolean;
begin
Result := true;
end;
diff --git a/unicode/src/screens/UScreenMain.pas b/unicode/src/screens/UScreenMain.pas
index 8ce6307c..eb2e051e 100644
--- a/unicode/src/screens/UScreenMain.pas
+++ b/unicode/src/screens/UScreenMain.pas
@@ -52,7 +52,10 @@ type
function ParseInput(PressedKey: Cardinal; CharCode: UCS4Char;
PressedDown: boolean): boolean; override;
procedure onShow; override;
- procedure SetInteraction(Num: integer); override;
+ procedure InteractNext; override;
+ procedure InteractPrev; override;
+ procedure InteractInc; override;
+ procedure InteractDec; override;
procedure SetAnimationProgress(Progress: real); override;
end;
@@ -77,7 +80,7 @@ function TScreenMain.ParseInput(PressedKey: Cardinal; CharCode: UCS4Char;
var
SDL_ModState: word;
begin
- Result := true;
+ Result := True;
SDL_ModState := SDL_GetModState and (KMOD_LSHIFT + KMOD_RSHIFT +
KMOD_LCTRL + KMOD_RCTRL + KMOD_LALT + KMOD_RALT);
@@ -87,7 +90,7 @@ begin
// check normal keys
case UCS4UpperCase(CharCode) of
Ord('Q'): begin
- Result := false;
+ Result := False;
Exit;
end;
Ord('C'): begin
@@ -121,7 +124,7 @@ begin
SDLK_ESCAPE,
SDLK_BACKSPACE:
begin
- Result := false;
+ Result := False;
end;
SDLK_RETURN:
@@ -136,7 +139,7 @@ begin
if (Ini.Players = 4) then
PlayersPlay := 6;
- ScreenName.Goto_SingScreen := false;
+ ScreenName.Goto_SingScreen := False;
FadeTo(@ScreenName, SoundLib.Start);
end
else //show error message
@@ -180,7 +183,7 @@ begin
//Exit
if Interaction = 5 then
begin
- Result := false;
+ Result := False;
end;
end;
{**
@@ -231,19 +234,36 @@ end;
procedure TScreenMain.onShow;
begin
inherited;
-
- { display cursor (on moved) }
- Display.SetCursor;
-
{**
* Start background music
*}
SoundLib.StartBgMusic;
end;
-procedure TScreenMain.SetInteraction(Num: integer);
+procedure TScreenMain.InteractNext;
+begin
+ inherited InteractNext;
+ Text[TextDescription].Text := Theme.Main.Description[Interaction];
+ Text[TextDescriptionLong].Text := Theme.Main.DescriptionLong[Interaction];
+end;
+
+procedure TScreenMain.InteractPrev;
+begin
+ inherited InteractPrev;
+ Text[TextDescription].Text := Theme.Main.Description[Interaction];
+ Text[TextDescriptionLong].Text := Theme.Main.DescriptionLong[Interaction];
+end;
+
+procedure TScreenMain.InteractDec;
+begin
+ inherited InteractDec;
+ Text[TextDescription].Text := Theme.Main.Description[Interaction];
+ Text[TextDescriptionLong].Text := Theme.Main.DescriptionLong[Interaction];
+end;
+
+procedure TScreenMain.InteractInc;
begin
- inherited SetInteraction(Num);
+ inherited InteractInc;
Text[TextDescription].Text := Theme.Main.Description[Interaction];
Text[TextDescriptionLong].Text := Theme.Main.DescriptionLong[Interaction];
end;
diff --git a/unicode/src/screens/UScreenName.pas b/unicode/src/screens/UScreenName.pas
index dc2f14ef..64e90cc9 100644
--- a/unicode/src/screens/UScreenName.pas
+++ b/unicode/src/screens/UScreenName.pas
@@ -45,9 +45,9 @@ uses
type
TScreenName = class(TMenu)
public
- Goto_SingScreen: boolean; //If true then next Screen in SingScreen
+ Goto_SingScreen: Boolean; //If True then next Screen in SingScreen
constructor Create; override;
- function ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean; override;
+ function ParseInput(PressedKey: Cardinal; CharCode: UCS4Char; PressedDown: Boolean): Boolean; override;
procedure onShow; override;
procedure SetAnimationProgress(Progress: real); override;
end;
@@ -63,13 +63,13 @@ uses
UUnicodeUtils;
-function TScreenName.ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean;
+function TScreenName.ParseInput(PressedKey: Cardinal; CharCode: UCS4Char; PressedDown: Boolean): Boolean;
var
- I: integer;
- SDL_ModState: word;
+ I: integer;
+SDL_ModState: Word;
begin
Result := true;
- if (PressedDown) then
+ If (PressedDown) Then
begin // Key Down
SDL_ModState := SDL_GetModState and (KMOD_LSHIFT + KMOD_RSHIFT
@@ -196,6 +196,7 @@ begin
Button[Interaction].Text[0].Text := Ini.NameTemplate[11];
end;
+
SDLK_BACKSPACE:
begin
Button[Interaction].Text[0].DeleteLastLetter;
@@ -223,7 +224,7 @@ begin
else
FadeTo(@ScreenLevel);
- GoTo_SingScreen := false;
+ GoTo_SingScreen := False;
end;
// Up and Down could be done at the same time,
@@ -245,6 +246,7 @@ begin
LoadFromTheme(Theme.Name);
+
for I := 1 to 6 do
AddButton(Theme.Name.ButtonPlayer[I]);
@@ -260,14 +262,12 @@ begin
for I := 1 to 6 do
Button[I-1].Text[0].Text := Ini.Name[I-1];
- for I := 1 to PlayersPlay do
- begin
+ for I := 1 to PlayersPlay do begin
Button[I-1].Visible := true;
Button[I-1].Selectable := true;
end;
- for I := PlayersPlay+1 to 6 do
- begin
+ for I := PlayersPlay+1 to 6 do begin
Button[I-1].Visible := false;
Button[I-1].Selectable := false;
end;
diff --git a/unicode/src/screens/UScreenOpen.pas b/unicode/src/screens/UScreenOpen.pas
index 718ef546..fa65a1df 100644
--- a/unicode/src/screens/UScreenOpen.pas
+++ b/unicode/src/screens/UScreenOpen.pas
@@ -92,7 +92,7 @@ begin
Ord(' '), Ord('-'), Ord('.'), Ord(':'), Ord('\'):
begin
if Interaction = 0 then
- begin
+ begin
Text[TextN].Text := Text[TextN].Text + UCS4ToUTF8String(CharCode);
end;
end;
@@ -123,7 +123,7 @@ begin
SDLK_RETURN:
begin
if (Interaction = 2) then
- begin
+ begin
//Update Filename and go to last Screen
ConversionFileName := Text[TextN].Text;
AudioPlayback.PlaySound(SoundLib.Back);
@@ -207,8 +207,7 @@ begin
Interaction := 0;
end;
-(*
-function TScreenEditSub.Draw: boolean;
+(*function TScreenEditSub.Draw: boolean;
var
Min: integer;
Sec: integer;
@@ -220,7 +219,6 @@ end;
procedure TScreenEditSub.Finish;
begin
//
-end;
-*)
+end;*)
end.
diff --git a/unicode/src/screens/UScreenOptions.pas b/unicode/src/screens/UScreenOptions.pas
index 24f1f3d7..ff2a3fe2 100644
--- a/unicode/src/screens/UScreenOptions.pas
+++ b/unicode/src/screens/UScreenOptions.pas
@@ -48,7 +48,7 @@ type
public
TextDescription: integer;
constructor Create; override;
- function ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean; override;
+ function ParseInput(PressedKey: Cardinal; CharCode: UCS4Char; PressedDown: Boolean): Boolean; override;
procedure onShow; override;
procedure InteractNext; override;
procedure InteractPrev; override;
@@ -63,10 +63,10 @@ uses
UGraphic,
UUnicodeUtils;
-function TScreenOptions.ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean;
+function TScreenOptions.ParseInput(PressedKey: Cardinal; CharCode: UCS4Char; PressedDown: Boolean): Boolean;
begin
Result := true;
- if (PressedDown) then
+ If (PressedDown) Then
begin // Key Down
// check normal keys
case UCS4UpperCase(CharCode) of
diff --git a/unicode/src/screens/UScreenOptionsAdvanced.pas b/unicode/src/screens/UScreenOptionsAdvanced.pas
index 65aec66f..a6564bf1 100644
--- a/unicode/src/screens/UScreenOptionsAdvanced.pas
+++ b/unicode/src/screens/UScreenOptionsAdvanced.pas
@@ -34,8 +34,8 @@ interface
{$I switches.inc}
uses
- UMenu,
SDL,
+ UMenu,
UDisplay,
UMusic,
UFiles,
@@ -46,7 +46,7 @@ type
TScreenOptionsAdvanced = class(TMenu)
public
constructor Create; override;
- function ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean; override;
+ function ParseInput(PressedKey: Cardinal; CharCode: UCS4Char; PressedDown: Boolean): Boolean; override;
procedure onShow; override;
end;
@@ -57,10 +57,10 @@ uses
UUnicodeUtils,
SysUtils;
-function TScreenOptionsAdvanced.ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean;
+function TScreenOptionsAdvanced.ParseInput(PressedKey: Cardinal; CharCode: UCS4Char; PressedDown: Boolean): Boolean;
begin
Result := true;
- if (PressedDown) then
+ If (PressedDown) Then
begin // Key Down
// check normal keys
case UCS4UpperCase(CharCode) of
@@ -85,8 +85,7 @@ begin
begin
//SelectLoadAnimation Hidden because it is useless atm
//if SelInteraction = 7 then begin
- if SelInteraction = 6 then
- begin
+ if SelInteraction = 6 then begin
Ini.Save;
AudioPlayback.PlaySound(SoundLib.Back);
FadeTo(@ScreenOptions);
@@ -100,8 +99,7 @@ begin
begin
//SelectLoadAnimation Hidden because it is useless atm
//if (SelInteraction >= 0) and (SelInteraction <= 6) then begin
- if (SelInteraction >= 0) and (SelInteraction <= 5) then
- begin
+ if (SelInteraction >= 0) and (SelInteraction <= 5) then begin
AudioPlayback.PlaySound(SoundLib.Option);
InteractInc;
end;
@@ -110,8 +108,7 @@ begin
begin
//SelectLoadAnimation Hidden because it is useless atm
//if (SelInteraction >= 0) and (SelInteraction <= 6) then begin
- if (SelInteraction >= 0) and (SelInteraction <= 5) then
- begin
+ if (SelInteraction >= 0) and (SelInteraction <= 5) then begin
AudioPlayback.PlaySound(SoundLib.Option);
InteractDec;
end;
@@ -129,30 +126,13 @@ begin
LoadFromTheme(Theme.OptionsAdvanced);
//SelectLoadAnimation Hidden because it is useless atm
- //AddSelect(Theme.OptionsAdvanced.SelectLoadAnimation, Ini.LoadAnimation, ILoadAnimationTranslated);
- Theme.OptionsAdvanced.SelectScreenFade.showArrows := true;
- Theme.OptionsAdvanced.SelectScreenFade.oneItemOnly := true;
- AddSelectSlide(Theme.OptionsAdvanced.SelectScreenFade, Ini.ScreenFade, IScreenFadeTranslated);
-
- Theme.OptionsAdvanced.SelectEffectSing.showArrows := true;
- Theme.OptionsAdvanced.SelectEffectSing.oneItemOnly := true;
- AddSelectSlide(Theme.OptionsAdvanced.SelectEffectSing, Ini.EffectSing, IEffectSingTranslated);
-
- Theme.OptionsAdvanced.SelectLineBonus.showArrows := true;
- Theme.OptionsAdvanced.SelectLineBonus.oneItemOnly := true;
- AddSelectSlide(Theme.OptionsAdvanced.SelectLineBonus, Ini.LineBonus, ILineBonusTranslated);
-
- Theme.OptionsAdvanced.SelectOnSongClick.showArrows := true;
- Theme.OptionsAdvanced.SelectOnSongClick.oneItemOnly := true;
- AddSelectSlide(Theme.OptionsAdvanced.SelectOnSongClick, Ini.OnSongClick, IOnSongClickTranslated);
-
- Theme.OptionsAdvanced.SelectAskbeforeDel.showArrows := true;
- Theme.OptionsAdvanced.SelectAskbeforeDel.oneItemOnly := true;
- AddSelectSlide(Theme.OptionsAdvanced.SelectAskbeforeDel, Ini.AskBeforeDel, IAskbeforeDelTranslated);
-
- Theme.OptionsAdvanced.SelectPartyPopup.showArrows := true;
- Theme.OptionsAdvanced.SelectPartyPopup.oneItemOnly := true;
- AddSelectSlide(Theme.OptionsAdvanced.SelectPartyPopup, Ini.PartyPopup, IPartyPopupTranslated);
+ //AddSelect(Theme.OptionsAdvanced.SelectLoadAnimation, Ini.LoadAnimation, ILoadAnimation);
+ AddSelectSlide(Theme.OptionsAdvanced.SelectScreenFade, Ini.ScreenFade, IScreenFade);
+ AddSelectSlide(Theme.OptionsAdvanced.SelectEffectSing, Ini.EffectSing, IEffectSing);
+ AddSelectSlide(Theme.OptionsAdvanced.SelectLineBonus, Ini.LineBonus, ILineBonus);
+ AddSelectSlide(Theme.OptionsAdvanced.SelectOnSongClick, Ini.OnSongClick, IOnSongClick);
+ AddSelectSlide(Theme.OptionsAdvanced.SelectAskbeforeDel, Ini.AskBeforeDel, IAskbeforeDel);
+ AddSelectSlide(Theme.OptionsAdvanced.SelectPartyPopup, Ini.PartyPopup, IPartyPopup);
AddButton(Theme.OptionsAdvanced.ButtonExit);
if (Length(Button[0].Text)=0) then
diff --git a/unicode/src/screens/UScreenOptionsGame.pas b/unicode/src/screens/UScreenOptionsGame.pas
index 1e7bbb3a..c5af4ca2 100644
--- a/unicode/src/screens/UScreenOptionsGame.pas
+++ b/unicode/src/screens/UScreenOptionsGame.pas
@@ -40,15 +40,15 @@ uses
UMusic,
UFiles,
UIni,
- USongs,
- UThemes;
+ UThemes,
+ USongs;
type
TScreenOptionsGame = class(TMenu)
public
old_Tabs, old_Sorting: integer;
constructor Create; override;
- function ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean; override;
+ function ParseInput(PressedKey: Cardinal; CharCode: UCS4Char; PressedDown: Boolean): Boolean; override;
procedure onShow; override;
procedure RefreshSongs;
end;
@@ -60,12 +60,10 @@ uses
UUnicodeUtils,
SysUtils;
-function TScreenOptionsGame.ParseInput(PressedKey: cardinal;
- CharCode: UCS4Char;
- PressedDown: boolean): boolean;
+function TScreenOptionsGame.ParseInput(PressedKey: Cardinal; CharCode: UCS4Char; PressedDown: Boolean): Boolean;
begin
Result := true;
- if PressedDown then
+ If (PressedDown) Then
begin // Key Down
// check normal keys
case UCS4UpperCase(CharCode) of
@@ -83,12 +81,12 @@ begin
begin
AudioPlayback.PlaySound(SoundLib.Back);
RefreshSongs;
+
FadeTo(@ScreenOptions);
end;
SDLK_RETURN:
begin
- if SelInteraction = 6 then
- begin
+ if SelInteraction = 6 then begin
AudioPlayback.PlaySound(SoundLib.Back);
RefreshSongs;
FadeTo(@ScreenOptions);
@@ -128,34 +126,15 @@ begin
old_Sorting := Ini.Sorting;
old_Tabs := Ini.Tabs;
- Theme.OptionsGame.SelectPlayers.showArrows := true;
- Theme.OptionsGame.SelectPlayers.oneItemOnly := true;
AddSelectSlide(Theme.OptionsGame.SelectPlayers, Ini.Players, IPlayers);
-
- Theme.OptionsGame.SelectDifficulty.showArrows := true;
- Theme.OptionsGame.SelectDifficulty.oneItemOnly := true;
- AddSelectSlide(Theme.OptionsGame.SelectDifficulty, Ini.Difficulty, IDifficultyTranslated);
-
- Theme.OptionsGame.SelectLanguage.showArrows := true;
- Theme.OptionsGame.SelectLanguage.oneItemOnly := true;
+ AddSelectSlide(Theme.OptionsGame.SelectDifficulty, Ini.Difficulty, IDifficulty);
AddSelectSlide(Theme.OptionsGame.SelectLanguage, Ini.Language, ILanguage);
-
- Theme.OptionsGame.SelectTabs.showArrows := true;
- Theme.OptionsGame.SelectTabs.oneItemOnly := true;
- AddSelectSlide(Theme.OptionsGame.SelectTabs, Ini.Tabs, ITabsTranslated);
-
- Theme.OptionsGame.SelectSorting.showArrows := true;
- Theme.OptionsGame.SelectSorting.oneItemOnly := true;
- AddSelectSlide(Theme.OptionsGame.SelectSorting, Ini.Sorting, ISortingTranslated);
-
- Theme.OptionsGame.SelectDebug.showArrows := true;
- Theme.OptionsGame.SelectDebug.oneItemOnly := true;
- AddSelectSlide(Theme.OptionsGame.SelectDebug, Ini.Debug, IDebugTranslated);
-
-
+ AddSelectSlide(Theme.OptionsGame.SelectTabs, Ini.Tabs, ITabs);
+ AddSelectSlide(Theme.OptionsGame.SelectSorting, Ini.Sorting, ISorting);
+ AddSelectSlide(Theme.OptionsGame.SelectDebug, Ini.Debug, IDebug);
AddButton(Theme.OptionsGame.ButtonExit);
- if (Length(Button[0].Text) = 0) then
+ if (Length(Button[0].Text)=0) then
AddButtonText(14, 20, Theme.Options.Description[7]);
end;
@@ -163,7 +142,7 @@ end;
//Refresh Songs Patch
procedure TScreenOptionsGame.RefreshSongs;
begin
- if (ini.Sorting <> old_Sorting) or (ini.Tabs <> old_Tabs) then
+if (ini.Sorting <> old_Sorting) or (ini.Tabs <> old_Tabs) then
ScreenSong.Refresh;
end;
diff --git a/unicode/src/screens/UScreenOptionsGraphics.pas b/unicode/src/screens/UScreenOptionsGraphics.pas
index 2be3dd66..a0890dbe 100644
--- a/unicode/src/screens/UScreenOptionsGraphics.pas
+++ b/unicode/src/screens/UScreenOptionsGraphics.pas
@@ -46,7 +46,7 @@ type
TScreenOptionsGraphics = class(TMenu)
public
constructor Create; override;
- function ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean; override;
+ function ParseInput(PressedKey: Cardinal; CharCode: UCS4Char; PressedDown: Boolean): Boolean; override;
procedure onShow; override;
end;
@@ -58,10 +58,10 @@ uses
UUnicodeUtils,
SysUtils;
-function TScreenOptionsGraphics.ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean;
+function TScreenOptionsGraphics.ParseInput(PressedKey: Cardinal; CharCode: UCS4Char; PressedDown: Boolean): Boolean;
begin
Result := true;
- if (PressedDown) then
+ If (PressedDown) Then
begin // Key Down
// check normal keys
case UCS4UpperCase(CharCode) of
@@ -84,12 +84,10 @@ begin
end;
SDLK_RETURN:
begin
-{ if SelInteraction <= 1 then
- begin
+{ if SelInteraction <= 1 then begin
Restart := true;
end;}
- if SelInteraction = 6 then
- begin
+ if SelInteraction = 6 then begin
Ini.Save;
AudioPlayback.PlaySound(SoundLib.Back);
// FIXME: changing the video mode does not work this way in windows
@@ -107,16 +105,14 @@ begin
InteractPrev;
SDLK_RIGHT:
begin
- if (SelInteraction >= 0) and (SelInteraction < 6) then
- begin
+ if (SelInteraction >= 0) and (SelInteraction < 6) then begin
AudioPlayback.PlaySound(SoundLib.Option);
InteractInc;
end;
end;
SDLK_LEFT:
begin
- if (SelInteraction >= 0) and (SelInteraction < 6) then
- begin
+ if (SelInteraction >= 0) and (SelInteraction < 6) then begin
AudioPlayback.PlaySound(SoundLib.Option);
InteractDec;
end;
@@ -132,29 +128,13 @@ begin
inherited Create;
LoadFromTheme(Theme.OptionsGraphics);
- Theme.OptionsGraphics.SelectResolution.showArrows := true;
- Theme.OptionsGraphics.SelectResolution.oneItemOnly := true;
- AddSelectSlide(Theme.OptionsGraphics.SelectResolution, Ini.Resolution, IResolution);
+ AddSelectSlide(Theme.OptionsGraphics.SelectResolution, Ini.Resolution, IResolution);
+ AddSelectSlide(Theme.OptionsGraphics.SelectFullscreen, Ini.Fullscreen, IFullscreen);
+ AddSelectSlide(Theme.OptionsGraphics.SelectDepth, Ini.Depth, IDepth);
+ AddSelectSlide(Theme.OptionsGraphics.SelectVisualizer, Ini.VisualizerOption, IVisualizer);
+ AddSelectSlide(Theme.OptionsGraphics.SelectOscilloscope, Ini.Oscilloscope, IOscilloscope);
+ AddSelectSlide(Theme.OptionsGraphics.SelectMovieSize, Ini.MovieSize, IMovieSize);
- Theme.OptionsGraphics.SelectFullscreen.showArrows := true;
- Theme.OptionsGraphics.SelectFullscreen.oneItemOnly := true;
- AddSelectSlide(Theme.OptionsGraphics.SelectFullscreen, Ini.Fullscreen, IFullScreenTranslated);
-
- Theme.OptionsGraphics.SelectDepth.showArrows := true;
- Theme.OptionsGraphics.SelectDepth.oneItemOnly := true;
- AddSelectSlide(Theme.OptionsGraphics.SelectDepth, Ini.Depth, IDepth);
-
- Theme.OptionsGraphics.SelectVisualizer.showArrows := true;
- Theme.OptionsGraphics.SelectVisualizer.oneItemOnly := true;
- AddSelectSlide(Theme.OptionsGraphics.SelectVisualizer, Ini.VisualizerOption, IVisualizerTranslated);
-
- Theme.OptionsGraphics.SelectOscilloscope.showArrows := true;
- Theme.OptionsGraphics.SelectOscilloscope.oneItemOnly := true;
- AddSelectSlide(Theme.OptionsGraphics.SelectOscilloscope, Ini.Oscilloscope, IOscilloscopeTranslated);
-
- Theme.OptionsGraphics.SelectMovieSize.showArrows := true;
- Theme.OptionsGraphics.SelectMovieSize.oneItemOnly := true;
- AddSelectSlide(Theme.OptionsGraphics.SelectMovieSize, Ini.MovieSize, IMovieSizeTranslated);
AddButton(Theme.OptionsGraphics.ButtonExit);
if (Length(Button[0].Text)=0) then
diff --git a/unicode/src/screens/UScreenOptionsLyrics.pas b/unicode/src/screens/UScreenOptionsLyrics.pas
index d3fbf441..c8995ae4 100644
--- a/unicode/src/screens/UScreenOptionsLyrics.pas
+++ b/unicode/src/screens/UScreenOptionsLyrics.pas
@@ -46,7 +46,7 @@ type
TScreenOptionsLyrics = class(TMenu)
public
constructor Create; override;
- function ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean; override;
+ function ParseInput(PressedKey: Cardinal; CharCode: UCS4Char; PressedDown: Boolean): Boolean; override;
procedure onShow; override;
end;
@@ -57,10 +57,10 @@ uses
UUnicodeUtils,
SysUtils;
-function TScreenOptionsLyrics.ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean;
+function TScreenOptionsLyrics.ParseInput(PressedKey: Cardinal; CharCode: UCS4Char; PressedDown: Boolean): Boolean;
begin
Result := true;
- if (PressedDown) then
+ If (PressedDown) Then
begin // Key Down
// check normal keys
case UCS4UpperCase(CharCode) of
@@ -83,8 +83,7 @@ begin
end;
SDLK_RETURN:
begin
- if SelInteraction = 3 then
- begin
+ if SelInteraction = 3 then begin
Ini.Save;
AudioPlayback.PlaySound(SoundLib.Back);
FadeTo(@ScreenOptions);
@@ -96,16 +95,14 @@ begin
InteractPrev;
SDLK_RIGHT:
begin
- if (SelInteraction >= 0) and (SelInteraction <= 3) then
- begin
+ if (SelInteraction >= 0) and (SelInteraction <= 3) then begin
AudioPlayback.PlaySound(SoundLib.Option);
InteractInc;
end;
end;
SDLK_LEFT:
begin
- if (SelInteraction >= 0) and (SelInteraction <= 3) then
- begin
+ if (SelInteraction >= 0) and (SelInteraction <= 3) then begin
AudioPlayback.PlaySound(SoundLib.Option);
InteractDec;
end;
@@ -120,17 +117,11 @@ begin
LoadFromTheme(Theme.OptionsLyrics);
- Theme.OptionsLyrics.SelectLyricsFont.showArrows := true;
- Theme.OptionsLyrics.SelectLyricsFont.oneItemOnly := true;
- AddSelectSlide(Theme.OptionsLyrics.SelectLyricsFont, Ini.LyricsFont, ILyricsFontTranslated);
+ AddSelectSlide(Theme.OptionsLyrics.SelectLyricsFont, Ini.LyricsFont, ILyricsFont);
+ AddSelectSlide(Theme.OptionsLyrics.SelectLyricsEffect, Ini.LyricsEffect, ILyricsEffect);
+ //AddSelect(Theme.OptionsLyrics.SelectSolmization, Ini.Solmization, ISolmization); GAH!!!!11 DIE!!!
+ AddSelectSlide(Theme.OptionsLyrics.SelectNoteLines, Ini.NoteLines, INoteLines);
- Theme.OptionsLyrics.SelectLyricsEffect.showArrows := true;
- Theme.OptionsLyrics.SelectLyricsEffect.oneItemOnly := true;
- AddSelectSlide(Theme.OptionsLyrics.SelectLyricsEffect, Ini.LyricsEffect, ILyricsEffectTranslated);
-
- Theme.OptionsLyrics.SelectNoteLines.showArrows := true;
- Theme.OptionsLyrics.SelectNoteLines.oneItemOnly := true;
- AddSelectSlide(Theme.OptionsLyrics.SelectNoteLines, Ini.NoteLines, INoteLinesTranslated);
AddButton(Theme.OptionsLyrics.ButtonExit);
if (Length(Button[0].Text)=0) then
diff --git a/unicode/src/screens/UScreenOptionsRecord.pas b/unicode/src/screens/UScreenOptionsRecord.pas
index cdacd5f6..0cf9eb37 100644
--- a/unicode/src/screens/UScreenOptionsRecord.pas
+++ b/unicode/src/screens/UScreenOptionsRecord.pas
@@ -95,7 +95,7 @@ type
public
constructor Create; override;
function Draw: boolean; override;
- function ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean; override;
+ function ParseInput(PressedKey: Cardinal; CharCode: UCS4Char; PressedDown: Boolean): Boolean; override;
procedure onShow; override;
procedure onHide; override;
end;
@@ -129,10 +129,10 @@ uses
UUnicodeUtils,
ULog;
-function TScreenOptionsRecord.ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean;
+function TScreenOptionsRecord.ParseInput(PressedKey: Cardinal; CharCode: UCS4Char; PressedDown: Boolean): Boolean;
begin
Result := true;
- if (PressedDown) then
+ If (PressedDown) Then
begin // Key Down
// check normal keys
case UCS4UpperCase(CharCode) of
@@ -245,8 +245,6 @@ begin
InputDeviceNames[DeviceIndex] := AudioInputProcessor.DeviceList[DeviceIndex].Name;
end;
// add device-selection slider (InteractionID: 0)
- Theme.OptionsRecord.SelectSlideCard.showArrows := true;
- Theme.OptionsRecord.SelectSlideCard.oneItemOnly := true;
AddSelectSlide(Theme.OptionsRecord.SelectSlideCard, CurrentDeviceIndex, InputDeviceNames);
// init source-selection slider
@@ -255,9 +253,6 @@ begin
begin
InputSourceNames[SourceIndex] := InputDevice.Source[SourceIndex].Name;
end;
-
- Theme.OptionsRecord.SelectSlideInput.showArrows := true;
- Theme.OptionsRecord.SelectSlideInput.oneItemOnly := true;
// add source-selection slider (InteractionID: 1)
SelectInputSourceID := AddSelectSlide(Theme.OptionsRecord.SelectSlideInput,
InputDeviceCfg.Input, InputSourceNames);
@@ -490,6 +485,7 @@ begin
PreviewDeviceIndex := -1;
end;
+
procedure TScreenOptionsRecord.DrawVolume(x, y, Width, Height: single);
var
x1, y1, x2, y2: single;
@@ -807,7 +803,8 @@ begin
end;
end;
- Result := true;
+ Result := True;
end;
+
end.
diff --git a/unicode/src/screens/UScreenOptionsSound.pas b/unicode/src/screens/UScreenOptionsSound.pas
index f9a4c158..d0125a9d 100644
--- a/unicode/src/screens/UScreenOptionsSound.pas
+++ b/unicode/src/screens/UScreenOptionsSound.pas
@@ -34,8 +34,8 @@ interface
{$I switches.inc}
uses
- UMenu,
SDL,
+ UMenu,
UDisplay,
UMusic,
UFiles,
@@ -46,7 +46,7 @@ type
TScreenOptionsSound = class(TMenu)
public
constructor Create; override;
- function ParseInput(PressedKey: cardinal; CharCode: UCS4Char;
+ function ParseInput(PressedKey: Cardinal; CharCode: UCS4Char;
PressedDown: boolean): boolean; override;
procedure onShow; override;
end;
@@ -61,14 +61,14 @@ uses
function TScreenOptionsSound.ParseInput(PressedKey: cardinal;
CharCode: UCS4Char; PressedDown: boolean): boolean;
begin
- Result := true;
+ Result := True;
if (PressedDown) then
begin // Key Down
// check normal keys
case UCS4UpperCase(CharCode) of
Ord('Q'):
begin
- Result := false;
+ Result := False;
Exit;
end;
end;
@@ -137,39 +137,19 @@ begin
LoadFromTheme(Theme.OptionsSound);
- Theme.OptionsSound.SelectSlideVoicePassthrough.showArrows := true;
- Theme.OptionsSound.SelectSlideVoicePassthrough.oneItemOnly := true;
- AddSelectSlide(Theme.OptionsSound.SelectSlideVoicePassthrough, Ini.VoicePassthrough, IVoicePassthroughTranslated);
-
- Theme.OptionsSound.SelectBackgroundMusic.showArrows := true;
- Theme.OptionsSound.SelectBackgroundMusic.oneItemOnly := true;
- AddSelectSlide(Theme.OptionsSound.SelectBackgroundMusic, Ini.BackgroundMusicOption, IBackgroundMusicTranslated);
-
+ AddSelectSlide(Theme.OptionsSound.SelectSlideVoicePassthrough,
+ Ini.VoicePassthrough, IVoicePassthrough);
+ AddSelectSlide(Theme.OptionsSound.SelectBackgroundMusic,
+ Ini.BackgroundMusicOption, IBackgroundMusic);
+ AddSelectSlide(Theme.OptionsSound.SelectMicBoost, Ini.MicBoost, IMicBoost);
// TODO: - MicBoost needs to be moved to ScreenOptionsRecord
- Theme.OptionsSound.SelectMicBoost.showArrows := true;
- Theme.OptionsSound.SelectMicBoost.oneItemOnly := true;
- AddSelectSlide(Theme.OptionsSound.SelectMicBoost, Ini.MicBoost, IMicBoostTranslated);
-
-
- Theme.OptionsSound.SelectClickAssist.showArrows := true;
- Theme.OptionsSound.SelectClickAssist.oneItemOnly := true;
- AddSelectSlide(Theme.OptionsSound.SelectClickAssist, Ini.ClickAssist, IClickAssistTranslated);
-
- Theme.OptionsSound.SelectBeatClick.showArrows := true;
- Theme.OptionsSound.SelectBeatClick.oneItemOnly := true;
- AddSelectSlide(Theme.OptionsSound.SelectBeatClick, Ini.BeatClick, IBeatClickTranslated);
-
- Theme.OptionsSound.SelectThreshold.showArrows := true;
- Theme.OptionsSound.SelectThreshold.oneItemOnly := true;
+ AddSelectSlide(Theme.OptionsSound.SelectClickAssist, Ini.ClickAssist, IClickAssist);
+ AddSelectSlide(Theme.OptionsSound.SelectBeatClick, Ini.BeatClick, IBeatClick);
AddSelectSlide(Theme.OptionsSound.SelectThreshold, Ini.ThresholdIndex, IThreshold);
-
- Theme.OptionsSound.SelectSlidePreviewVolume.showArrows := true;
- Theme.OptionsSound.SelectSlidePreviewVolume.oneItemOnly := true;
- AddSelectSlide(Theme.OptionsSound.SelectSlidePreviewVolume, Ini.PreviewVolume, IPreviewVolumeTranslated);
-
- Theme.OptionsSound.SelectSlidePreviewFading.showArrows := true;
- Theme.OptionsSound.SelectSlidePreviewFading.oneItemOnly := true;
- AddSelectSlide(Theme.OptionsSound.SelectSlidePreviewFading, Ini.PreviewFading, IPreviewFadingTranslated);
+ AddSelectSlide(Theme.OptionsSound.SelectSlidePreviewVolume,
+ Ini.PreviewVolume, IPreviewVolume);
+ AddSelectSlide(Theme.OptionsSound.SelectSlidePreviewFading,
+ Ini.PreviewFading, IPreviewFading);
AddButton(Theme.OptionsSound.ButtonExit);
if (Length(Button[0].Text) = 0) then
diff --git a/unicode/src/screens/UScreenOptionsThemes.pas b/unicode/src/screens/UScreenOptionsThemes.pas
index aaee3fd9..64816d34 100644
--- a/unicode/src/screens/UScreenOptionsThemes.pas
+++ b/unicode/src/screens/UScreenOptionsThemes.pas
@@ -47,9 +47,9 @@ type
private
procedure ReloadTheme;
public
- SkinSelect: integer;
+ SkinSelect: Integer;
constructor Create; override;
- function ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean; override;
+ function ParseInput(PressedKey: Cardinal; CharCode: UCS4Char; PressedDown: Boolean): Boolean; override;
procedure onShow; override;
procedure InteractInc; override;
procedure InteractDec; override;
@@ -65,10 +65,10 @@ uses
UUnicodeUtils,
USkins;
-function TScreenOptionsThemes.ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean;
+function TScreenOptionsThemes.ParseInput(PressedKey: Cardinal; CharCode: UCS4Char; PressedDown: Boolean): Boolean;
begin
Result := true;
- if (PressedDown) then
+ If (PressedDown) Then
begin // Key Down
// check normal keys
case UCS4UpperCase(CharCode) of
@@ -162,17 +162,11 @@ begin
LoadFromTheme(Theme.OptionsThemes);
- Theme.OptionsThemes.SelectTheme.showArrows := true;
- Theme.OptionsThemes.SelectTheme.oneItemOnly := true;
AddSelectSlide(Theme.OptionsThemes.SelectTheme, Ini.Theme, ITheme);
- Theme.OptionsThemes.SelectSkin.showArrows := true;
- Theme.OptionsThemes.SelectSkin.oneItemOnly := true;
SkinSelect := AddSelectSlide(Theme.OptionsThemes.SelectSkin, Ini.SkinNo, ISkin);
- Theme.OptionsThemes.SelectColor.showArrows := true;
- Theme.OptionsThemes.SelectColor.oneItemOnly := true;
- AddSelectSlide(Theme.OptionsThemes.SelectColor, Ini.Color, IColorTranslated);
+ AddSelectSlide(Theme.OptionsThemes.SelectColor, Ini.Color, IColor);
AddButton(Theme.OptionsThemes.ButtonExit);
if (Length(Button[0].Text)=0) then
@@ -197,6 +191,7 @@ begin
ScreenOptionsThemes.Interaction := self.Interaction;
ScreenOptionsThemes.Draw;
+
Display.Draw;
SwapBuffers;
diff --git a/unicode/src/screens/UScreenPartyNewRound.pas b/unicode/src/screens/UScreenPartyNewRound.pas
index 4c90b4c7..afcf2f9d 100644
--- a/unicode/src/screens/UScreenPartyNewRound.pas
+++ b/unicode/src/screens/UScreenPartyNewRound.pas
@@ -34,72 +34,73 @@ interface
{$I switches.inc}
uses
- UMenu,
SDL,
+ SysUtils,
+ UMenu,
UDisplay,
UMusic,
UFiles,
- SysUtils,
UThemes;
type
TScreenPartyNewRound = class(TMenu)
public
//Texts:
- TextRound1: cardinal;
- TextRound2: cardinal;
- TextRound3: cardinal;
- TextRound4: cardinal;
- TextRound5: cardinal;
- TextRound6: cardinal;
- TextRound7: cardinal;
-
- TextWinner1: cardinal;
- TextWinner2: cardinal;
- TextWinner3: cardinal;
- TextWinner4: cardinal;
- TextWinner5: cardinal;
- TextWinner6: cardinal;
- TextWinner7: cardinal;
-
- TextNextRound: cardinal;
- TextNextRoundNo: cardinal;
- TextNextPlayer1: cardinal;
- TextNextPlayer2: cardinal;
- TextNextPlayer3: cardinal;
+ TextRound1: Cardinal;
+ TextRound2: Cardinal;
+ TextRound3: Cardinal;
+ TextRound4: Cardinal;
+ TextRound5: Cardinal;
+ TextRound6: Cardinal;
+ TextRound7: Cardinal;
+
+ TextWinner1: Cardinal;
+ TextWinner2: Cardinal;
+ TextWinner3: Cardinal;
+ TextWinner4: Cardinal;
+ TextWinner5: Cardinal;
+ TextWinner6: Cardinal;
+ TextWinner7: Cardinal;
+
+ TextNextRound: Cardinal;
+ TextNextRoundNo: Cardinal;
+ TextNextPlayer1: Cardinal;
+ TextNextPlayer2: Cardinal;
+ TextNextPlayer3: Cardinal;
//Statics
- StaticRound1: cardinal;
- StaticRound2: cardinal;
- StaticRound3: cardinal;
- StaticRound4: cardinal;
- StaticRound5: cardinal;
- StaticRound6: cardinal;
- StaticRound7: cardinal;
+ StaticRound1: Cardinal;
+ StaticRound2: Cardinal;
+ StaticRound3: Cardinal;
+ StaticRound4: Cardinal;
+ StaticRound5: Cardinal;
+ StaticRound6: Cardinal;
+ StaticRound7: Cardinal;
//Scores
- TextScoreTeam1: cardinal;
- TextScoreTeam2: cardinal;
- TextScoreTeam3: cardinal;
- TextNameTeam1: cardinal;
- TextNameTeam2: cardinal;
- TextNameTeam3: cardinal;
+ TextScoreTeam1: Cardinal;
+ TextScoreTeam2: Cardinal;
+ TextScoreTeam3: Cardinal;
+ TextNameTeam1: Cardinal;
+ TextNameTeam2: Cardinal;
+ TextNameTeam3: Cardinal;
- TextTeam1Players: cardinal;
- TextTeam2Players: cardinal;
- TextTeam3Players: cardinal;
+ TextTeam1Players: Cardinal;
+ TextTeam2Players: Cardinal;
+ TextTeam3Players: Cardinal;
+
+ StaticTeam1: Cardinal;
+ StaticTeam2: Cardinal;
+ StaticTeam3: Cardinal;
+ StaticNextPlayer1: Cardinal;
+ StaticNextPlayer2: Cardinal;
+ StaticNextPlayer3: Cardinal;
- StaticTeam1: cardinal;
- StaticTeam2: cardinal;
- StaticTeam3: cardinal;
- StaticNextPlayer1: cardinal;
- StaticNextPlayer2: cardinal;
- StaticNextPlayer3: cardinal;
constructor Create; override;
- function ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean; override;
+ function ParseInput(PressedKey: Cardinal; CharCode: UCS4Char; PressedDown: Boolean): Boolean; override;
procedure onShow; override;
procedure SetAnimationProgress(Progress: real); override;
end;
@@ -118,10 +119,10 @@ uses
ULog,
UUnicodeUtils;
-function TScreenPartyNewRound.ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean;
+function TScreenPartyNewRound.ParseInput(PressedKey: Cardinal; CharCode: UCS4Char; PressedDown: Boolean): Boolean;
begin
Result := true;
- if (PressedDown) then
+ If (PressedDown) Then
begin // Key Down
// check normal keys
case UCS4UpperCase(CharCode) of
@@ -218,19 +219,19 @@ end;
procedure TScreenPartyNewRound.onShow;
var
- I: integer;
- function GetTeamPlayers(const Num: byte): string;
+ I: Integer;
+ function GetTeamPlayers(const Num: Byte): String;
var
Players: array of UTF8String;
- J: byte;
- begin
- if (Num-1 >= PartySession.Teams.NumTeams) then
+ //J: Byte;
+ begin // to-do : Party
+ if (Num-1 >= {PartySession.Teams.NumTeams}0) then
exit;
- //Create Players array
+ {//Create Players Array
SetLength(Players, PartySession.Teams.TeamInfo[Num-1].NumPlayers);
- for J := 0 to PartySession.Teams.TeamInfo[Num-1].NumPlayers-1 do
- Players[J] := string(PartySession.Teams.TeamInfo[Num-1].PlayerInfo[J].Name);
+ For J := 0 to PartySession.Teams.TeamInfo[Num-1].NumPlayers-1 do
+ Players[J] := String(PartySession.Teams.TeamInfo[Num-1].PlayerInfo[J].Name);}
//Implode and Return
Result := Language.Implode(Players);
@@ -238,191 +239,193 @@ var
begin
inherited;
- PartySession.StartRound;
+ // to-do : Party
+ //PartySession.StartRound;
//Set Visibility of Round Infos
- I := Length(PartySession.Rounds);
+ // to-do : Party
+ I := {Length(PartySession.Rounds)}0;
if (I >= 1) then
begin
- Static[StaticRound1].Visible := true;
- Text[TextRound1].Visible := true;
- Text[TextWinner1].Visible := true;
+ 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);
+ //Text[TextRound1].Text := Language.Translate(DllMan.Plugins[PartySession.Rounds[0].Plugin].Name);
+ //Text[TextWinner1].Text := PartySession.GetWinnerString(0);
end
else
begin
- Static[StaticRound1].Visible := false;
- Text[TextRound1].Visible := false;
- Text[TextWinner1].Visible := false;
+ Static[StaticRound1].Visible := False;
+ Text[TextRound1].Visible := False;
+ Text[TextWinner1].Visible := False;
end;
if (I >= 2) then
begin
- Static[StaticRound2].Visible := true;
- Text[TextRound2].Visible := true;
- Text[TextWinner2].Visible := true;
+ Static[StaticRound2].Visible := True;
+ Text[TextRound2].Visible := True;
+ Text[TextWinner2].Visible := True;
//Texts:
- Text[TextRound2].Text := Language.Translate(DllMan.Plugins[PartySession.Rounds[1].Plugin].Name);
- Text[TextWinner2].Text := PartySession.GetWinnerString(1);
+ //Text[TextRound2].Text := Language.Translate(DllMan.Plugins[PartySession.Rounds[1].Plugin].Name);
+ //Text[TextWinner2].Text := PartySession.GetWinnerString(1);
end
else
begin
- Static[StaticRound2].Visible := false;
- Text[TextRound2].Visible := false;
- Text[TextWinner2].Visible := false;
+ Static[StaticRound2].Visible := False;
+ Text[TextRound2].Visible := False;
+ Text[TextWinner2].Visible := False;
end;
if (I >= 3) then
begin
- Static[StaticRound3].Visible := true;
- Text[TextRound3].Visible := true;
- Text[TextWinner3].Visible := true;
+ Static[StaticRound3].Visible := True;
+ Text[TextRound3].Visible := True;
+ Text[TextWinner3].Visible := True;
//Texts:
- Text[TextRound3].Text := Language.Translate(DllMan.Plugins[PartySession.Rounds[2].Plugin].Name);
- Text[TextWinner3].Text := PartySession.GetWinnerString(2);
+ //Text[TextRound3].Text := Language.Translate(DllMan.Plugins[PartySession.Rounds[2].Plugin].Name);
+ //Text[TextWinner3].Text := PartySession.GetWinnerString(2);
end
else
begin
- Static[StaticRound3].Visible := false;
- Text[TextRound3].Visible := false;
- Text[TextWinner3].Visible := false;
+ Static[StaticRound3].Visible := False;
+ Text[TextRound3].Visible := False;
+ Text[TextWinner3].Visible := False;
end;
if (I >= 4) then
begin
- Static[StaticRound4].Visible := true;
- Text[TextRound4].Visible := true;
- Text[TextWinner4].Visible := true;
+ Static[StaticRound4].Visible := True;
+ Text[TextRound4].Visible := True;
+ Text[TextWinner4].Visible := True;
//Texts:
- Text[TextRound4].Text := Language.Translate(DllMan.Plugins[PartySession.Rounds[3].Plugin].Name);
- Text[TextWinner4].Text := PartySession.GetWinnerString(3);
+ //Text[TextRound4].Text := Language.Translate(DllMan.Plugins[PartySession.Rounds[3].Plugin].Name);
+ //Text[TextWinner4].Text := PartySession.GetWinnerString(3);
end
else
begin
- Static[StaticRound4].Visible := false;
- Text[TextRound4].Visible := false;
- Text[TextWinner4].Visible := false;
+ Static[StaticRound4].Visible := False;
+ Text[TextRound4].Visible := False;
+ Text[TextWinner4].Visible := False;
end;
if (I >= 5) then
begin
- Static[StaticRound5].Visible := true;
- Text[TextRound5].Visible := true;
- Text[TextWinner5].Visible := true;
+ Static[StaticRound5].Visible := True;
+ Text[TextRound5].Visible := True;
+ Text[TextWinner5].Visible := True;
//Texts:
- Text[TextRound5].Text := Language.Translate(DllMan.Plugins[PartySession.Rounds[4].Plugin].Name);
- Text[TextWinner5].Text := PartySession.GetWinnerString(4);
+ //Text[TextRound5].Text := Language.Translate(DllMan.Plugins[PartySession.Rounds[4].Plugin].Name);
+ //Text[TextWinner5].Text := PartySession.GetWinnerString(4);
end
else
begin
- Static[StaticRound5].Visible := false;
- Text[TextRound5].Visible := false;
- Text[TextWinner5].Visible := false;
+ Static[StaticRound5].Visible := False;
+ Text[TextRound5].Visible := False;
+ Text[TextWinner5].Visible := False;
end;
if (I >= 6) then
begin
- Static[StaticRound6].Visible := true;
- Text[TextRound6].Visible := true;
- Text[TextWinner6].Visible := true;
+ Static[StaticRound6].Visible := True;
+ Text[TextRound6].Visible := True;
+ Text[TextWinner6].Visible := True;
//Texts:
- Text[TextRound6].Text := Language.Translate(DllMan.Plugins[PartySession.Rounds[5].Plugin].Name);
- Text[TextWinner6].Text := PartySession.GetWinnerString(5);
+ //Text[TextRound6].Text := Language.Translate(DllMan.Plugins[PartySession.Rounds[5].Plugin].Name);
+ //Text[TextWinner6].Text := PartySession.GetWinnerString(5);
end
else
begin
- Static[StaticRound6].Visible := false;
- Text[TextRound6].Visible := false;
- Text[TextWinner6].Visible := false;
+ Static[StaticRound6].Visible := False;
+ Text[TextRound6].Visible := False;
+ Text[TextWinner6].Visible := False;
end;
if (I >= 7) then
begin
- Static[StaticRound7].Visible := true;
- Text[TextRound7].Visible := true;
- Text[TextWinner7].Visible := true;
+ Static[StaticRound7].Visible := True;
+ Text[TextRound7].Visible := True;
+ Text[TextWinner7].Visible := True;
//Texts:
- Text[TextRound7].Text := Language.Translate(DllMan.Plugins[PartySession.Rounds[6].Plugin].Name);
- Text[TextWinner7].Text := PartySession.GetWinnerString(6);
+ //Text[TextRound7].Text := Language.Translate(DllMan.Plugins[PartySession.Rounds[6].Plugin].Name);
+ //Text[TextWinner7].Text := PartySession.GetWinnerString(6);
end
else
begin
- Static[StaticRound7].Visible := false;
- Text[TextRound7].Visible := false;
- Text[TextWinner7].Visible := false;
+ Static[StaticRound7].Visible := False;
+ Text[TextRound7].Visible := False;
+ Text[TextWinner7].Visible := False;
end;
//Display Scores
- if (PartySession.Teams.NumTeams >= 1) then
+ {if (PartySession.Teams.NumTeams >= 1) then
begin
Text[TextScoreTeam1].Text := InttoStr(PartySession.Teams.TeamInfo[0].Score);
- Text[TextNameTeam1].Text := string(PartySession.Teams.TeamInfo[0].Name);
+ Text[TextNameTeam1].Text := String(PartySession.Teams.TeamInfo[0].Name);
Text[TextTeam1Players].Text := GetTeamPlayers(1);
- Text[TextScoreTeam1].Visible := true;
- Text[TextNameTeam1].Visible := true;
- Text[TextTeam1Players].Visible := true;
- Static[StaticTeam1].Visible := true;
- Static[StaticNextPlayer1].Visible := true;
+ Text[TextScoreTeam1].Visible := True;
+ Text[TextNameTeam1].Visible := True;
+ Text[TextTeam1Players].Visible := True;
+ Static[StaticTeam1].Visible := True;
+ Static[StaticNextPlayer1].Visible := True;
end
else
begin
- Text[TextScoreTeam1].Visible := false;
- Text[TextNameTeam1].Visible := false;
- Text[TextTeam1Players].Visible := false;
- Static[StaticTeam1].Visible := false;
- Static[StaticNextPlayer1].Visible := false;
+ Text[TextScoreTeam1].Visible := False;
+ Text[TextNameTeam1].Visible := False;
+ Text[TextTeam1Players].Visible := False;
+ Static[StaticTeam1].Visible := False;
+ Static[StaticNextPlayer1].Visible := False;
end;
if (PartySession.Teams.NumTeams >= 2) then
begin
Text[TextScoreTeam2].Text := InttoStr(PartySession.Teams.TeamInfo[1].Score);
- Text[TextNameTeam2].Text := string(PartySession.Teams.TeamInfo[1].Name);
+ Text[TextNameTeam2].Text := String(PartySession.Teams.TeamInfo[1].Name);
Text[TextTeam2Players].Text := GetTeamPlayers(2);
- Text[TextScoreTeam2].Visible := true;
- Text[TextNameTeam2].Visible := true;
- Text[TextTeam2Players].Visible := true;
- Static[StaticTeam2].Visible := true;
- Static[StaticNextPlayer2].Visible := true;
+ Text[TextScoreTeam2].Visible := True;
+ Text[TextNameTeam2].Visible := True;
+ Text[TextTeam2Players].Visible := True;
+ Static[StaticTeam2].Visible := True;
+ Static[StaticNextPlayer2].Visible := True;
end
else
begin
- Text[TextScoreTeam2].Visible := false;
- Text[TextNameTeam2].Visible := false;
- Text[TextTeam2Players].Visible := false;
- Static[StaticTeam2].Visible := false;
- Static[StaticNextPlayer2].Visible := false;
+ Text[TextScoreTeam2].Visible := False;
+ Text[TextNameTeam2].Visible := False;
+ Text[TextTeam2Players].Visible := False;
+ Static[StaticTeam2].Visible := False;
+ Static[StaticNextPlayer2].Visible := False;
end;
if (PartySession.Teams.NumTeams >= 3) then
begin
Text[TextScoreTeam3].Text := InttoStr(PartySession.Teams.TeamInfo[2].Score);
- Text[TextNameTeam3].Text := string(PartySession.Teams.TeamInfo[2].Name);
+ Text[TextNameTeam3].Text := String(PartySession.Teams.TeamInfo[2].Name);
Text[TextTeam3Players].Text := GetTeamPlayers(3);
- Text[TextScoreTeam3].Visible := true;
- Text[TextNameTeam3].Visible := true;
- Text[TextTeam3Players].Visible := true;
- Static[StaticTeam3].Visible := true;
- Static[StaticNextPlayer3].Visible := true;
+ Text[TextScoreTeam3].Visible := True;
+ Text[TextNameTeam3].Visible := True;
+ Text[TextTeam3Players].Visible := True;
+ Static[StaticTeam3].Visible := True;
+ Static[StaticNextPlayer3].Visible := True;
end
else
begin
- Text[TextScoreTeam3].Visible := false;
- Text[TextNameTeam3].Visible := false;
- Text[TextTeam3Players].Visible := false;
- Static[StaticTeam3].Visible := false;
- Static[StaticNextPlayer3].Visible := false;
+ Text[TextScoreTeam3].Visible := False;
+ Text[TextNameTeam3].Visible := False;
+ Text[TextTeam3Players].Visible := False;
+ Static[StaticTeam3].Visible := False;
+ Static[StaticNextPlayer3].Visible := False;
end;
//nextRound Texts
@@ -431,26 +434,26 @@ begin
if (PartySession.Teams.NumTeams >= 1) then
begin
Text[TextNextPlayer1].Text := PartySession.Teams.Teaminfo[0].Playerinfo[PartySession.Teams.Teaminfo[0].CurPlayer].Name;
- Text[TextNextPlayer1].Visible := true;
+ Text[TextNextPlayer1].Visible := True;
end
else
- Text[TextNextPlayer1].Visible := false;
+ Text[TextNextPlayer1].Visible := False;
if (PartySession.Teams.NumTeams >= 2) then
begin
Text[TextNextPlayer2].Text := PartySession.Teams.Teaminfo[1].Playerinfo[PartySession.Teams.Teaminfo[1].CurPlayer].Name;
- Text[TextNextPlayer2].Visible := true;
+ Text[TextNextPlayer2].Visible := True;
end
else
- Text[TextNextPlayer2].Visible := false;
+ Text[TextNextPlayer2].Visible := False;
if (PartySession.Teams.NumTeams >= 3) then
begin
Text[TextNextPlayer3].Text := PartySession.Teams.Teaminfo[2].Playerinfo[PartySession.Teams.Teaminfo[2].CurPlayer].Name;
- Text[TextNextPlayer3].Visible := true;
+ Text[TextNextPlayer3].Visible := True;
end
else
- Text[TextNextPlayer3].Visible := false;
+ Text[TextNextPlayer3].Visible := False; }
end;
procedure TScreenPartyNewRound.SetAnimationProgress(Progress: real);
diff --git a/unicode/src/screens/UScreenPartyOptions.pas b/unicode/src/screens/UScreenPartyOptions.pas
index b7226a5e..74c51b15 100644
--- a/unicode/src/screens/UScreenPartyOptions.pas
+++ b/unicode/src/screens/UScreenPartyOptions.pas
@@ -125,11 +125,11 @@ begin
// Don't start when SinglePlayer Teams but only Multiplayer Plugins available
OnlyMultiPlayer := true;
for I := 0 to High(DLLMan.Plugins) do
- begin
+ begin
OnlyMultiPlayer := (OnlyMultiPlayer and DLLMan.Plugins[I].TeamModeOnly);
end;
if (OnlyMultiPlayer) and ((NumPlayer1 = 0) or (NumPlayer2 = 0) or ((NumPlayer3 = 0) and (NumTeams = 1))) then
- begin
+ begin
ScreenPopupError.ShowPopup(Language.Translate('ERROR_NO_PLUGINS'));
Exit;
end;
@@ -137,11 +137,12 @@ begin
Ini.Difficulty := SelectsS[SelectLevel].SelectedOption;
Ini.SaveLevel;
+
//Save Num Teams:
- PartySession.Teams.NumTeams := NumTeams + 2;
+ {PartySession.Teams.NumTeams := NumTeams + 2;
PartySession.Teams.Teaminfo[0].NumPlayers := NumPlayer1+1;
PartySession.Teams.Teaminfo[1].NumPlayers := NumPlayer2+1;
- PartySession.Teams.Teaminfo[2].NumPlayers := NumPlayer3+1;
+ PartySession.Teams.Teaminfo[2].NumPlayers := NumPlayer3+1;}
//Save Playlist
PlaylistMan.Mode := TSingMode( Playlist );
@@ -170,7 +171,8 @@ begin
PlaylistMan.CurPlayList := Playlist2;
//Start Party
- PartySession.StartNewParty(Rounds + 2);
+ // to-do : Party
+ //PartySession.StartNewParty(Rounds + 2);
AudioPlayback.PlaySound(SoundLib.Start);
//Go to Player Screen
@@ -256,8 +258,7 @@ begin
end;
procedure TScreenPartyOptions.SetPlaylist2;
-var
- I: integer;
+var I: integer;
begin
case Playlist of
0:
diff --git a/unicode/src/screens/UScreenPartyPlayer.pas b/unicode/src/screens/UScreenPartyPlayer.pas
index 9f40983a..3e453058 100644
--- a/unicode/src/screens/UScreenPartyPlayer.pas
+++ b/unicode/src/screens/UScreenPartyPlayer.pas
@@ -45,26 +45,26 @@ uses
type
TScreenPartyPlayer = class(TMenu)
public
- Team1Name: cardinal;
- Player1Name: cardinal;
- Player2Name: cardinal;
- Player3Name: cardinal;
- Player4Name: cardinal;
-
- Team2Name: cardinal;
- Player5Name: cardinal;
- Player6Name: cardinal;
- Player7Name: cardinal;
- Player8Name: cardinal;
-
- Team3Name: cardinal;
- Player9Name: cardinal;
- Player10Name: cardinal;
- Player11Name: cardinal;
- Player12Name: cardinal;
+ Team1Name: Cardinal;
+ Player1Name: Cardinal;
+ Player2Name: Cardinal;
+ Player3Name: Cardinal;
+ Player4Name: Cardinal;
+
+ Team2Name: Cardinal;
+ Player5Name: Cardinal;
+ Player6Name: Cardinal;
+ Player7Name: Cardinal;
+ Player8Name: Cardinal;
+
+ Team3Name: Cardinal;
+ Player9Name: Cardinal;
+ Player10Name: Cardinal;
+ Player11Name: Cardinal;
+ Player12Name: Cardinal;
constructor Create; override;
- function ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean; override;
+ function ParseInput(PressedKey: Cardinal; CharCode: UCS4Char; PressedDown: Boolean): Boolean; override;
procedure onShow; override;
procedure SetAnimationProgress(Progress: real); override;
end;
@@ -79,11 +79,9 @@ uses
UParty,
UUnicodeUtils;
-function TScreenPartyPlayer.ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean;
+function TScreenPartyPlayer.ParseInput(PressedKey: Cardinal; CharCode: UCS4Char; PressedDown: Boolean): Boolean;
var
- SDL_ModState: word;
- I, J: integer;
-
+ SDL_ModState: Word;
procedure IntNext;
begin
repeat
@@ -247,7 +245,7 @@ begin
SDLK_RETURN:
begin
- //Save PlayerNames
+ {//Save PlayerNames
for I := 0 to PartySession.Teams.NumTeams-1 do
begin
PartySession.Teams.Teaminfo[I].Name := PChar(Button[I*5].Text[0].Text);
@@ -258,8 +256,8 @@ begin
end;
end;
- AudioPlayback.PlaySound(SoundLib.Start);
- FadeTo(@ScreenPartyNewRound);
+ AudioPlayback.PlayStart;
+ FadeTo(@ScreenPartyNewRound);}
end;
// Up and Down could be done at the same time,
@@ -274,6 +272,8 @@ begin
end;
constructor TScreenPartyPlayer.Create;
+//var
+// I: integer; // Auto Removed, Unused Variable
begin
inherited Create;
@@ -321,9 +321,9 @@ begin
Button[10].Text[0].Text := Ini.NameTeam[2];
// Templates for Names Mod end
- if (PartySession.Teams.NumTeams>=1) then
+ {If (PartySession.Teams.NumTeams>=1) then
begin
- Button[0].Visible := true;
+ Button[0].Visible := True;
Button[1].Visible := (PartySession.Teams.Teaminfo[0].NumPlayers >=1);
Button[2].Visible := (PartySession.Teams.Teaminfo[0].NumPlayers >=2);
Button[3].Visible := (PartySession.Teams.Teaminfo[0].NumPlayers >=3);
@@ -331,16 +331,16 @@ begin
end
else
begin
- Button[0].Visible := false;
- Button[1].Visible := false;
- Button[2].Visible := false;
- Button[3].Visible := false;
- Button[4].Visible := false;
+ Button[0].Visible := False;
+ Button[1].Visible := False;
+ Button[2].Visible := False;
+ Button[3].Visible := False;
+ Button[4].Visible := False;
end;
- if (PartySession.Teams.NumTeams>=2) then
+ If (PartySession.Teams.NumTeams>=2) then
begin
- Button[5].Visible := true;
+ Button[5].Visible := True;
Button[6].Visible := (PartySession.Teams.Teaminfo[1].NumPlayers >=1);
Button[7].Visible := (PartySession.Teams.Teaminfo[1].NumPlayers >=2);
Button[8].Visible := (PartySession.Teams.Teaminfo[1].NumPlayers >=3);
@@ -348,16 +348,16 @@ begin
end
else
begin
- Button[5].Visible := false;
- Button[6].Visible := false;
- Button[7].Visible := false;
- Button[8].Visible := false;
- Button[9].Visible := false;
+ Button[5].Visible := False;
+ Button[6].Visible := False;
+ Button[7].Visible := False;
+ Button[8].Visible := False;
+ Button[9].Visible := False;
end;
- if (PartySession.Teams.NumTeams>=3) then
+ If (PartySession.Teams.NumTeams>=3) then
begin
- Button[10].Visible := true;
+ Button[10].Visible := True;
Button[11].Visible := (PartySession.Teams.Teaminfo[2].NumPlayers >=1);
Button[12].Visible := (PartySession.Teams.Teaminfo[2].NumPlayers >=2);
Button[13].Visible := (PartySession.Teams.Teaminfo[2].NumPlayers >=3);
@@ -365,12 +365,12 @@ begin
end
else
begin
- Button[10].Visible := false;
- Button[11].Visible := false;
- Button[12].Visible := false;
- Button[13].Visible := false;
- Button[14].Visible := false;
- end;
+ Button[10].Visible := False;
+ Button[11].Visible := False;
+ Button[12].Visible := False;
+ Button[13].Visible := False;
+ Button[14].Visible := False;
+ end; }
end;
diff --git a/unicode/src/screens/UScreenPartyScore.pas b/unicode/src/screens/UScreenPartyScore.pas
index 4daa77c3..5934a389 100644
--- a/unicode/src/screens/UScreenPartyScore.pas
+++ b/unicode/src/screens/UScreenPartyScore.pas
@@ -34,42 +34,42 @@ interface
{$I switches.inc}
uses
- UMenu,
SDL,
+ SysUtils,
+ UMenu,
UDisplay,
UMusic,
- SysUtils,
UThemes;
type
TScreenPartyScore = class(TMenu)
public
- TextScoreTeam1: cardinal;
- TextScoreTeam2: cardinal;
- TextScoreTeam3: cardinal;
- TextNameTeam1: cardinal;
- TextNameTeam2: cardinal;
- TextNameTeam3: cardinal;
- StaticTeam1: cardinal;
- StaticTeam1BG: cardinal;
- StaticTeam1Deco: cardinal;
- StaticTeam2: cardinal;
- StaticTeam2BG: cardinal;
- StaticTeam2Deco: cardinal;
- StaticTeam3: cardinal;
- StaticTeam3BG: cardinal;
- StaticTeam3Deco: cardinal;
- TextWinner: cardinal;
-
- DecoTex: array[0..5] of integer;
- DecoColor: array[0..5] of Record
- R, G, B: real;
+ TextScoreTeam1: Cardinal;
+ TextScoreTeam2: Cardinal;
+ TextScoreTeam3: Cardinal;
+ TextNameTeam1: Cardinal;
+ TextNameTeam2: Cardinal;
+ TextNameTeam3: Cardinal;
+ StaticTeam1: Cardinal;
+ StaticTeam1BG: Cardinal;
+ StaticTeam1Deco: Cardinal;
+ StaticTeam2: Cardinal;
+ StaticTeam2BG: Cardinal;
+ StaticTeam2Deco: Cardinal;
+ StaticTeam3: Cardinal;
+ StaticTeam3BG: Cardinal;
+ StaticTeam3Deco: Cardinal;
+ TextWinner: Cardinal;
+
+ DecoTex: Array[0..5] of Integer;
+ DecoColor: Array[0..5] of Record
+ R, G, B: Real;
end;
- MaxScore: word;
+ MaxScore: Word;
constructor Create; override;
- function ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean; override;
+ function ParseInput(PressedKey: Cardinal; CharCode: UCS4Char; PressedDown: Boolean): Boolean; override;
procedure onShow; override;
procedure SetAnimationProgress(Progress: real); override;
end;
@@ -86,10 +86,10 @@ uses
USkins,
UUnicodeUtils;
-function TScreenPartyScore.ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean;
+function TScreenPartyScore.ParseInput(PressedKey: Cardinal; CharCode: UCS4Char; PressedDown: Boolean): Boolean;
begin
Result := true;
- if (PressedDown) then
+ If (PressedDown) Then
begin // Key Down
// check normal keys
case UCS4UpperCase(CharCode) of
@@ -106,21 +106,22 @@ begin
SDLK_BACKSPACE :
begin
AudioPlayback.PlaySound(SoundLib.Start);
- if (PartySession.CurRound < High(PartySession.Rounds)) then
+ {if (PartySession.CurRound < High(PartySession.Rounds)) then
FadeTo(@ScreenPartyNewRound)
- else
+ else // to-do : Party
begin
- PartySession.EndRound;
+ PartySession.EndRound; }
FadeTo(@ScreenPartyWin);
- end;
+ //end;
end;
SDLK_RETURN:
begin
AudioPlayback.PlaySound(SoundLib.Start);
- if (PartySession.CurRound < High(PartySession.Rounds)) then
+ // to-do : Party
+ {if (PartySession.CurRound < High(PartySession.Rounds)) then
FadeTo(@ScreenPartyNewRound)
- else
+ else }
FadeTo(@ScreenPartyWin);
end;
end;
@@ -131,8 +132,8 @@ constructor TScreenPartyScore.Create;
var
// I: integer; // Auto Removed, Unused Variable
Tex: TTexture;
- R, G, B: real;
- Color: integer;
+ R, G, B: Real;
+ Color: Integer;
begin
inherited Create;
@@ -197,11 +198,12 @@ end;
procedure TScreenPartyScore.onShow;
var
- I, J: integer;
- Placings: array [0..5] of byte;
+ I, J: Integer;
+ Placings: Array [0..5] of Byte;
begin
inherited;
+
//Get Maxscore
MaxScore := 0;
@@ -216,10 +218,11 @@ begin
begin
Placings[I] := 0;
for J := 0 to ScreenSingModi.PlayerInfo.NumPlayers - 1 do
- if (ScreenSingModi.PlayerInfo.Playerinfo[J].Score > ScreenSingModi.PlayerInfo.Playerinfo[I].Score) then
+ If (ScreenSingModi.PlayerInfo.Playerinfo[J].Score > ScreenSingModi.PlayerInfo.Playerinfo[I].Score) then
Inc(Placings[I]);
end;
+
//Set Static Length
Static[StaticTeam1].Texture.ScaleW := ScreenSingModi.PlayerInfo.Playerinfo[0].Percentage / 100;
Static[StaticTeam2].Texture.ScaleW := ScreenSingModi.PlayerInfo.Playerinfo[1].Percentage / 100;
@@ -230,16 +233,16 @@ begin
if Static[StaticTeam2].Texture.ScaleW > 99 then Static[StaticTeam2].Texture.ScaleW := 99;
if Static[StaticTeam3].Texture.ScaleW > 99 then Static[StaticTeam3].Texture.ScaleW := 99;
- //End Last Round
- PartySession.EndRound;
+ //End Last Round // to-do : Party
+ //PartySession.EndRound;
//Set Winnertext
- Text[TextWinner].Text := Format(Language.Translate('PARTY_SCORE_WINS'), [PartySession.GetWinnerString(PartySession.CurRound)]);
+ //Text[TextWinner].Text := Format(Language.Translate('PARTY_SCORE_WINS'), [PartySession.GetWinnerString(PartySession.CurRound)]);
if (ScreenSingModi.PlayerInfo.NumPlayers >= 1) then
begin
Text[TextScoreTeam1].Text := InttoStr(ScreenSingModi.PlayerInfo.Playerinfo[0].Score);
- Text[TextNameTeam1].Text := string(ScreenSingModi.TeamInfo.Teaminfo[0].Name);
+ Text[TextNameTeam1].Text := String(ScreenSingModi.TeamInfo.Teaminfo[0].Name);
//Set Deco Texture
if Theme.PartyScore.DecoTextures.ChangeTextures then
@@ -250,25 +253,25 @@ begin
Static[StaticTeam1Deco].Texture.ColB := DecoColor[Placings[0]].B;
end;
- Text[TextScoreTeam1].Visible := true;
- Text[TextNameTeam1].Visible := true;
- Static[StaticTeam1].Visible := true;
- Static[StaticTeam1BG].Visible := true;
- Static[StaticTeam1Deco].Visible := true;
+ Text[TextScoreTeam1].Visible := True;
+ Text[TextNameTeam1].Visible := True;
+ Static[StaticTeam1].Visible := True;
+ Static[StaticTeam1BG].Visible := True;
+ Static[StaticTeam1Deco].Visible := True;
end
else
begin
- Text[TextScoreTeam1].Visible := false;
- Text[TextNameTeam1].Visible := false;
- Static[StaticTeam1].Visible := false;
- Static[StaticTeam1BG].Visible := false;
- Static[StaticTeam1Deco].Visible := false;
+ Text[TextScoreTeam1].Visible := False;
+ Text[TextNameTeam1].Visible := False;
+ Static[StaticTeam1].Visible := False;
+ Static[StaticTeam1BG].Visible := False;
+ Static[StaticTeam1Deco].Visible := False;
end;
if (ScreenSingModi.PlayerInfo.NumPlayers >= 2) then
begin
Text[TextScoreTeam2].Text := InttoStr(ScreenSingModi.PlayerInfo.Playerinfo[1].Score);
- Text[TextNameTeam2].Text := string(ScreenSingModi.TeamInfo.Teaminfo[1].Name);
+ Text[TextNameTeam2].Text := String(ScreenSingModi.TeamInfo.Teaminfo[1].Name);
//Set Deco Texture
if Theme.PartyScore.DecoTextures.ChangeTextures then
@@ -279,25 +282,25 @@ begin
Static[StaticTeam2Deco].Texture.ColB := DecoColor[Placings[1]].B;
end;
- Text[TextScoreTeam2].Visible := true;
- Text[TextNameTeam2].Visible := true;
- Static[StaticTeam2].Visible := true;
- Static[StaticTeam2BG].Visible := true;
- Static[StaticTeam2Deco].Visible := true;
+ Text[TextScoreTeam2].Visible := True;
+ Text[TextNameTeam2].Visible := True;
+ Static[StaticTeam2].Visible := True;
+ Static[StaticTeam2BG].Visible := True;
+ Static[StaticTeam2Deco].Visible := True;
end
else
begin
- Text[TextScoreTeam2].Visible := false;
- Text[TextNameTeam2].Visible := false;
- Static[StaticTeam2].Visible := false;
- Static[StaticTeam2BG].Visible := false;
- Static[StaticTeam2Deco].Visible := false;
+ Text[TextScoreTeam2].Visible := False;
+ Text[TextNameTeam2].Visible := False;
+ Static[StaticTeam2].Visible := False;
+ Static[StaticTeam2BG].Visible := False;
+ Static[StaticTeam2Deco].Visible := False;
end;
if (ScreenSingModi.PlayerInfo.NumPlayers >= 3) then
begin
Text[TextScoreTeam3].Text := InttoStr(ScreenSingModi.PlayerInfo.Playerinfo[2].Score);
- Text[TextNameTeam3].Text := string(ScreenSingModi.TeamInfo.Teaminfo[2].Name);
+ Text[TextNameTeam3].Text := String(ScreenSingModi.TeamInfo.Teaminfo[2].Name);
//Set Deco Texture
if Theme.PartyScore.DecoTextures.ChangeTextures then
@@ -308,19 +311,19 @@ begin
Static[StaticTeam3Deco].Texture.ColB := DecoColor[Placings[2]].B;
end;
- Text[TextScoreTeam3].Visible := true;
- Text[TextNameTeam3].Visible := true;
- Static[StaticTeam3].Visible := true;
- Static[StaticTeam3BG].Visible := true;
- Static[StaticTeam3Deco].Visible := true;
+ Text[TextScoreTeam3].Visible := True;
+ Text[TextNameTeam3].Visible := True;
+ Static[StaticTeam3].Visible := True;
+ Static[StaticTeam3BG].Visible := True;
+ Static[StaticTeam3Deco].Visible := True;
end
else
begin
- Text[TextScoreTeam3].Visible := false;
- Text[TextNameTeam3].Visible := false;
- Static[StaticTeam3].Visible := false;
- Static[StaticTeam3BG].Visible := false;
- Static[StaticTeam3Deco].Visible := false;
+ Text[TextScoreTeam3].Visible := False;
+ Text[TextNameTeam3].Visible := False;
+ Static[StaticTeam3].Visible := False;
+ Static[StaticTeam3BG].Visible := False;
+ Static[StaticTeam3Deco].Visible := False;
end;
end;
diff --git a/unicode/src/screens/UScreenPartyWin.pas b/unicode/src/screens/UScreenPartyWin.pas
index caa1519e..dc3c5ac0 100644
--- a/unicode/src/screens/UScreenPartyWin.pas
+++ b/unicode/src/screens/UScreenPartyWin.pas
@@ -35,34 +35,34 @@ interface
uses
SDL,
+ SysUtils,
UMenu,
UDisplay,
UMusic,
- SysUtils,
UThemes;
type
TScreenPartyWin = class(TMenu)
public
- TextScoreTeam1: cardinal;
- TextScoreTeam2: cardinal;
- TextScoreTeam3: cardinal;
- TextNameTeam1: cardinal;
- TextNameTeam2: cardinal;
- TextNameTeam3: cardinal;
- StaticTeam1: cardinal;
- StaticTeam1BG: cardinal;
- StaticTeam1Deco: cardinal;
- StaticTeam2: cardinal;
- StaticTeam2BG: cardinal;
- StaticTeam2Deco: cardinal;
- StaticTeam3: cardinal;
- StaticTeam3BG: cardinal;
- StaticTeam3Deco: cardinal;
- TextWinner: cardinal;
+ TextScoreTeam1: Cardinal;
+ TextScoreTeam2: Cardinal;
+ TextScoreTeam3: Cardinal;
+ TextNameTeam1: Cardinal;
+ TextNameTeam2: Cardinal;
+ TextNameTeam3: Cardinal;
+ StaticTeam1: Cardinal;
+ StaticTeam1BG: Cardinal;
+ StaticTeam1Deco: Cardinal;
+ StaticTeam2: Cardinal;
+ StaticTeam2BG: Cardinal;
+ StaticTeam2Deco: Cardinal;
+ StaticTeam3: Cardinal;
+ StaticTeam3BG: Cardinal;
+ StaticTeam3Deco: Cardinal;
+ TextWinner: Cardinal;
constructor Create; override;
- function ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean; override;
+ function ParseInput(PressedKey: Cardinal; CharCode: UCS4Char; PressedDown: Boolean): Boolean; override;
procedure onShow; override;
procedure SetAnimationProgress(Progress: real); override;
end;
@@ -77,10 +77,10 @@ uses
ULanguage,
UUnicodeUtils;
-function TScreenPartyWin.ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean;
+function TScreenPartyWin.ParseInput(PressedKey: Cardinal; CharCode: UCS4Char; PressedDown: Boolean): Boolean;
begin
Result := true;
- if (PressedDown) then
+ If (PressedDown) Then
begin // Key Down
// check normal keys
case UCS4UpperCase(CharCode) of
@@ -138,13 +138,13 @@ begin
end;
procedure TScreenPartyWin.onShow;
-var
- I: integer;
- Placing: TeamOrderArray;
+//var
+// I: Integer; // Auto Removed, Unused Variable
+// Placing: Integer; // Auto Removed, Unused Variable
- Function GetTeamColor(Team: byte): cardinal;
+ Function GetTeamColor(Team: Byte): Cardinal;
var
- NameString: string;
+ NameString: String;
begin
NameString := 'P' + InttoStr(Team+1) + 'Dark';
@@ -154,24 +154,25 @@ var
begin
inherited;
+ // to-do : Party
//Get Team Placing
- Placing := PartySession.GetTeamOrder;
+ //Placing := PartySession.GetTeamOrder;
//Set Winnertext
- Text[TextWinner].Text := Format(Language.Translate('PARTY_SCORE_WINS'), [PartySession.Teams.Teaminfo[Placing[0]].Name]);
- if (PartySession.Teams.NumTeams >= 1) then
+ //Text[TextWinner].Text := Format(Language.Translate('PARTY_SCORE_WINS'), [PartySession.Teams.Teaminfo[Placing[0]].Name]);
+ {if (PartySession.Teams.NumTeams >= 1) then
begin
Text[TextScoreTeam1].Text := InttoStr(PartySession.Teams.TeamInfo[Placing[0]].Score);
- Text[TextNameTeam1].Text := string(PartySession.Teams.TeamInfo[Placing[0]].Name);
+ Text[TextNameTeam1].Text := String(PartySession.Teams.TeamInfo[Placing[0]].Name);
- Text[TextScoreTeam1].Visible := true;
- Text[TextNameTeam1].Visible := true;
- Static[StaticTeam1].Visible := true;
- Static[StaticTeam1BG].Visible := true;
- Static[StaticTeam1Deco].Visible := true;
+ Text[TextScoreTeam1].Visible := True;
+ Text[TextNameTeam1].Visible := True;
+ Static[StaticTeam1].Visible := True;
+ Static[StaticTeam1BG].Visible := True;
+ Static[StaticTeam1Deco].Visible := True;
//Set Static Color to Team Color
- if (Theme.PartyWin.StaticTeam1BG.Color = 'TeamColor') then
+ If (Theme.PartyWin.StaticTeam1BG.Color = 'TeamColor') then
begin
I := GetTeamColor(Placing[0]);
if (I <> -1) then
@@ -182,7 +183,7 @@ begin
end;
end;
- if (Theme.PartyWin.StaticTeam1.Color = 'TeamColor') then
+ If (Theme.PartyWin.StaticTeam1.Color = 'TeamColor') then
begin
I := GetTeamColor(Placing[0]);
if (I <> -1) then
@@ -195,26 +196,26 @@ begin
end
else
begin
- Text[TextScoreTeam1].Visible := false;
- Text[TextNameTeam1].Visible := false;
- Static[StaticTeam1].Visible := false;
- Static[StaticTeam1BG].Visible := false;
- Static[StaticTeam1Deco].Visible := false;
+ Text[TextScoreTeam1].Visible := False;
+ Text[TextNameTeam1].Visible := False;
+ Static[StaticTeam1].Visible := False;
+ Static[StaticTeam1BG].Visible := False;
+ Static[StaticTeam1Deco].Visible := False;
end;
if (PartySession.Teams.NumTeams >= 2) then
begin
Text[TextScoreTeam2].Text := InttoStr(PartySession.Teams.TeamInfo[Placing[1]].Score);
- Text[TextNameTeam2].Text := string(PartySession.Teams.TeamInfo[Placing[1]].Name);
+ Text[TextNameTeam2].Text := String(PartySession.Teams.TeamInfo[Placing[1]].Name);
- Text[TextScoreTeam2].Visible := true;
- Text[TextNameTeam2].Visible := true;
- Static[StaticTeam2].Visible := true;
- Static[StaticTeam2BG].Visible := true;
- Static[StaticTeam2Deco].Visible := true;
+ Text[TextScoreTeam2].Visible := True;
+ Text[TextNameTeam2].Visible := True;
+ Static[StaticTeam2].Visible := True;
+ Static[StaticTeam2BG].Visible := True;
+ Static[StaticTeam2Deco].Visible := True;
//Set Static Color to Team Color
- if (Theme.PartyWin.StaticTeam2BG.Color = 'TeamColor') then
+ If (Theme.PartyWin.StaticTeam2BG.Color = 'TeamColor') then
begin
I := GetTeamColor(Placing[1]);
if (I <> -1) then
@@ -225,7 +226,7 @@ begin
end;
end;
- if (Theme.PartyWin.StaticTeam2.Color = 'TeamColor') then
+ If (Theme.PartyWin.StaticTeam2.Color = 'TeamColor') then
begin
I := GetTeamColor(Placing[1]);
if (I <> -1) then
@@ -238,26 +239,26 @@ begin
end
else
begin
- Text[TextScoreTeam2].Visible := false;
- Text[TextNameTeam2].Visible := false;
- Static[StaticTeam2].Visible := false;
- Static[StaticTeam2BG].Visible := false;
- Static[StaticTeam2Deco].Visible := false;
+ Text[TextScoreTeam2].Visible := False;
+ Text[TextNameTeam2].Visible := False;
+ Static[StaticTeam2].Visible := False;
+ Static[StaticTeam2BG].Visible := False;
+ Static[StaticTeam2Deco].Visible := False;
end;
if (PartySession.Teams.NumTeams >= 3) then
begin
Text[TextScoreTeam3].Text := InttoStr(PartySession.Teams.TeamInfo[Placing[2]].Score);
- Text[TextNameTeam3].Text := string(PartySession.Teams.TeamInfo[Placing[2]].Name);
+ Text[TextNameTeam3].Text := String(PartySession.Teams.TeamInfo[Placing[2]].Name);
- Text[TextScoreTeam3].Visible := true;
- Text[TextNameTeam3].Visible := true;
- Static[StaticTeam3].Visible := true;
- Static[StaticTeam3BG].Visible := true;
- Static[StaticTeam3Deco].Visible := true;
+ Text[TextScoreTeam3].Visible := True;
+ Text[TextNameTeam3].Visible := True;
+ Static[StaticTeam3].Visible := True;
+ Static[StaticTeam3BG].Visible := True;
+ Static[StaticTeam3Deco].Visible := True;
//Set Static Color to Team Color
- if (Theme.PartyWin.StaticTeam3BG.Color = 'TeamColor') then
+ If (Theme.PartyWin.StaticTeam3BG.Color = 'TeamColor') then
begin
I := GetTeamColor(Placing[2]);
if (I <> -1) then
@@ -268,7 +269,7 @@ begin
end;
end;
- if (Theme.PartyWin.StaticTeam3.Color = 'TeamColor') then
+ If (Theme.PartyWin.StaticTeam3.Color = 'TeamColor') then
begin
I := GetTeamColor(Placing[2]);
if (I <> -1) then
@@ -281,12 +282,12 @@ begin
end
else
begin
- Text[TextScoreTeam3].Visible := false;
- Text[TextNameTeam3].Visible := false;
- Static[StaticTeam3].Visible := false;
- Static[StaticTeam3BG].Visible := false;
- Static[StaticTeam3Deco].Visible := false;
- end;
+ Text[TextScoreTeam3].Visible := False;
+ Text[TextNameTeam3].Visible := False;
+ Static[StaticTeam3].Visible := False;
+ Static[StaticTeam3BG].Visible := False;
+ Static[StaticTeam3Deco].Visible := False;
+ end; }
end;
procedure TScreenPartyWin.SetAnimationProgress(Progress: real);
diff --git a/unicode/src/screens/UScreenPopup.pas b/unicode/src/screens/UScreenPopup.pas
index 223d83ef..74107117 100644
--- a/unicode/src/screens/UScreenPopup.pas
+++ b/unicode/src/screens/UScreenPopup.pas
@@ -34,43 +34,44 @@ interface
{$I switches.inc}
uses
- UMenu,
SDL,
+ SysUtils,
+ UMenu,
UMusic,
UFiles,
- SysUtils,
UThemes;
type
TScreenPopupCheck = class(TMenu)
public
- Visible: boolean; //Whether the Menu should be Drawn
+ Visible: Boolean; //Whether the Menu should be Drawn
constructor Create; override;
- function ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean; override;
+ function ParseInput(PressedKey: Cardinal; CharCode: UCS4Char; PressedDown: Boolean): Boolean; override;
procedure onShow; override;
- procedure ShowPopup(msg: string);
+ procedure ShowPopup(msg: String);
function Draw: boolean; override;
end;
type
TScreenPopupError = class(TMenu)
{ private
- CurMenu: byte; //Num of the cur. Shown Menu}
+ CurMenu: Byte; //Num of the cur. Shown Menu}
public
- Visible: boolean; //Whether the Menu should be Drawn
+ Visible: Boolean; //Whether the Menu should be Drawn
constructor Create; override;
- function ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean; override;
+ function ParseInput(PressedKey: Cardinal; CharCode: UCS4Char; PressedDown: Boolean): Boolean; override;
procedure onShow; override;
procedure onHide; override;
- procedure ShowPopup(msg: string);
+ procedure ShowPopup(msg: String);
function Draw: boolean; override;
end;
var
-// ISelections: array of string;
- SelectValue: integer;
+// ISelections: Array of String;
+ SelectValue: Integer;
+
implementation
@@ -85,10 +86,10 @@ uses
UDisplay,
UUnicodeUtils;
-function TScreenPopupCheck.ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean;
+function TScreenPopupCheck.ParseInput(PressedKey: Cardinal; CharCode: UCS4Char; PressedDown: Boolean): Boolean;
begin
Result := true;
- if (PressedDown) then
+ If (PressedDown) Then
begin // Key Down
// check normal keys
case UCS4UpperCase(CharCode) of
@@ -104,9 +105,9 @@ begin
SDLK_ESCAPE,
SDLK_BACKSPACE :
begin
- Display.CheckOK := false;
- Display.NextScreenWithCheck := NIL;
- Visible := false;
+ Display.CheckOK:=False;
+ Display.NextScreenWithCheck:=NIL;
+ Visible:=False;
Result := false;
end;
@@ -123,14 +124,14 @@ begin
ScreenSingModi.Finish;
end;
- Display.CheckOK := true;
+ Display.CheckOK:=True;
end;
1: begin
- Display.CheckOK := false;
- Display.NextScreenWithCheck := NIL;
+ Display.CheckOK:=False;
+ Display.NextScreenWithCheck:=NIL;
end;
end;
- Visible := false;
+ Visible:=False;
Result := false;
end;
@@ -172,15 +173,15 @@ begin
inherited;
end;
-procedure TScreenPopupCheck.ShowPopup(msg: string);
+procedure TScreenPopupCheck.ShowPopup(msg: String);
begin
Interaction := 0; //Reset Interaction
- Visible := true; //Set Visible
+ Visible := True; //Set Visible
Text[0].Text := Language.Translate(msg);
- Button[0].Visible := true;
- Button[1].Visible := true;
+ Button[0].Visible := True;
+ Button[1].Visible := True;
Button[0].Text[0].Text := Language.Translate('SONG_MENU_YES');
Button[1].Text[0].Text := Language.Translate('SONG_MENU_NO');
@@ -190,10 +191,10 @@ end;
// error popup
-function TScreenPopupError.ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean;
+function TScreenPopupError.ParseInput(PressedKey: Cardinal; CharCode: UCS4Char; PressedDown: Boolean): Boolean;
begin
Result := true;
- if (PressedDown) then
+ If (PressedDown) Then
begin // Key Down
case PressedKey of
@@ -205,13 +206,13 @@ begin
SDLK_ESCAPE,
SDLK_BACKSPACE :
begin
- Visible := false;
+ Visible:=False;
Result := false;
end;
SDLK_RETURN:
begin
- Visible := false;
+ Visible:=False;
Result := false;
end;
@@ -241,7 +242,7 @@ end;
function TScreenPopupError.Draw: boolean;
begin
- Draw := inherited Draw;
+ Draw:=inherited Draw;
end;
procedure TScreenPopupError.onShow;
@@ -254,26 +255,26 @@ procedure TScreenPopupError.onHide;
begin
end;
-procedure TScreenPopupError.ShowPopup(msg: string);
+procedure TScreenPopupError.ShowPopup(msg: String);
begin
Interaction := 0; //Reset Interaction
- Visible := true; //Set Visible
+ Visible := True; //Set Visible
Background.OnShow;
{ //dirty hack... Text[0] is invisible for some strange reason
for i:=1 to high(Text) do
if i-1 <= high(msg) then
begin
- Text[i].Visible := true;
+ Text[i].Visible:=True;
Text[i].Text := msg[i-1];
end
else
begin
- Text[i].Visible := false;
+ Text[i].Visible:=False;
end;}
- Text[0].Text := msg;
+ Text[0].Text:=msg;
- Button[0].Visible := true;
+ Button[0].Visible := True;
Button[0].Text[0].Text := 'OK';
end;
diff --git a/unicode/src/screens/UScreenScore.pas b/unicode/src/screens/UScreenScore.pas
index e07d0b9e..5c312938 100644
--- a/unicode/src/screens/UScreenScore.pas
+++ b/unicode/src/screens/UScreenScore.pas
@@ -129,7 +129,6 @@ type
constructor Create; override;
function ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean; override;
- function ParseMouse(MouseButton: Integer; BtnDown: Boolean; X, Y: integer): boolean; override;
procedure onShow; override;
procedure onShowFinish; override;
function Draw: boolean; override;
@@ -194,15 +193,6 @@ begin
end;
end;
-function TScreenScore.ParseMouse(MouseButton: Integer; BtnDown: Boolean; X, Y: integer): boolean;
-begin
- Result := True;
- if (MouseButton = SDL_BUTTON_LEFT) and BtnDown then begin
- //left-click anywhere sends return
- ParseInput(SDLK_RETURN, 0, true);
- end;
-end;
-
constructor TScreenScore.Create;
var
Player: integer;
diff --git a/unicode/src/screens/UScreenSing.pas b/unicode/src/screens/UScreenSing.pas
index 86a811f4..05683c83 100644
--- a/unicode/src/screens/UScreenSing.pas
+++ b/unicode/src/screens/UScreenSing.pas
@@ -58,8 +58,9 @@ type
type
TScreenSing = class(TMenu)
- protected
+ private
VideoLoaded: boolean;
+ protected
Paused: boolean; // pause mod
LyricsSync: TLyricsSyncSource;
NumEmptySentences: integer;
@@ -127,13 +128,12 @@ uses
UNote,
URecord,
USong,
- UDisplay,
UUnicodeUtils;
// method for input parsing. if false is returned, getnextwindow
// should be checked to know the next window to load;
-function TScreenSing.ParseInput(PressedKey: cardinal; CharCode: UCS4Char;
+function TScreenSing.ParseInput(PressedKey: Cardinal; CharCode: UCS4Char;
PressedDown: boolean): boolean;
begin
Result := true;
@@ -255,9 +255,6 @@ constructor TScreenSing.Create;
begin
inherited Create;
- //too dangerous, a mouse button is quickly pressed by accident
- RightMbESC := false;
-
fShowVisualization := false;
fCurrentVideoPlaybackEngine := VideoPlayback;
@@ -302,8 +299,8 @@ begin
Static[StaticPausePopup].Visible := false;
Lyrics := TLyricEngine.Create(
- Theme.LyricBar.UpperX, Theme.LyricBar.UpperY, Theme.LyricBar.UpperW, Theme.LyricBar.UpperH,
- Theme.LyricBar.LowerX, Theme.LyricBar.LowerY, Theme.LyricBar.LowerW, Theme.LyricBar.LowerH);
+ Skin_LyricsUpperX, Skin_LyricsUpperY, Skin_LyricsUpperW, Skin_LyricsUpperH,
+ Skin_LyricsLowerX, Skin_LyricsLowerY, Skin_LyricsLowerW, Skin_LyricsLowerH);
LyricsSync := TLyricsSyncSource.Create();
end;
@@ -628,9 +625,6 @@ end;
procedure TScreenSing.onShowFinish;
begin
- // hide cursor on singscreen show
- Display.SetCursor;
-
// start lyrics
LyricsState.Resume();
@@ -651,7 +645,6 @@ begin
end;
Background.OnFinish;
- Display.SetCursor;
end;
function TScreenSing.Draw: boolean;
@@ -752,9 +745,10 @@ begin
begin
// Just call this once
// when Screens = 2
- if (ScreenAct = 1) then
+ If (ScreenAct = 1) then
fCurrentVideoPlaybackEngine.GetFrame(CurrentSong.VideoGAP + LyricsState.GetCurrentTime());
+
fCurrentVideoPlaybackEngine.DrawGL(ScreenAct);
end;
end;
diff --git a/unicode/src/screens/UScreenSingModi.pas b/unicode/src/screens/UScreenSingModi.pas
index 3ae5b7dc..b9c9365d 100644
--- a/unicode/src/screens/UScreenSingModi.pas
+++ b/unicode/src/screens/UScreenSingModi.pas
@@ -33,45 +33,74 @@ interface
{$I switches.inc}
-uses
- UMenu,
- UMusic,
- SDL,
- SysUtils,
- UFiles,
- UTime,
- USongs,
- UIni,
- ULog,
- UTexture,
- ULyrics,
- TextGL,
- gl,
-
- UThemes,
- UScreenSing,
- ModiSDK;
+
+uses UMenu,
+ UMusic,
+ SDL,
+ SysUtils,
+ UFiles,
+ UTime,
+ USongs,
+ UIni,
+ ULog,
+ UTexture,
+ ULyrics,
+ TextGL,
+ gl,
+
+ UThemes,
+ UScreenSing,
+ ModiSDK;
type
TScreenSingModi = class(TScreenSing)
protected
-
+ //paused: boolean; //Pause Mod
+ //PauseTime: Real;
+ //NumEmptySentences: integer;
public
- Winner: byte; //Who Wins
+ //TextTime: integer;
+
+ //StaticP1: integer;
+ //StaticP1ScoreBG: integer;
+ //TextP1: integer;
+ //TextP1Score: integer;
+
+ //StaticP2R: integer;
+ //StaticP2RScoreBG: integer;
+ //TextP2R: integer;
+ //TextP2RScore: integer;
+
+ //StaticP2M: integer;
+ //StaticP2MScoreBG: integer;
+ //TextP2M: integer;
+ //TextP2MScore: integer;
+
+ //StaticP3R: integer;
+ //StaticP3RScoreBG: integer;
+ //TextP3R: integer;
+ //TextP3RScore: integer;
+
+ //Tex_Background: TTexture;
+ //FadeOut: boolean;
+ //LyricMain: TLyric;
+ //LyricSub: TLyric;
+ Winner: Byte; //Who Wins
PlayerInfo: TPlayerInfo;
TeamInfo: TTeamInfo;
constructor Create; override;
procedure onShow; override;
//procedure onShowFinish; override;
- function ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean; override;
+ function ParseInput(PressedKey: Cardinal; CharCode: UCS4Char; PressedDown: Boolean): Boolean; override;
function Draw: boolean; override;
procedure Finish; override;
+ //procedure Pause; //Pause Mod(Toggles Pause)
end;
type
TCustomSoundEntry = record
- Filename : string;
+ Filename : String;
Stream : TAudioPlaybackStream;
end;
@@ -80,19 +109,11 @@ var
CustomSounds: array of TCustomSoundEntry;
//Procedured for Plugin
-function LoadTex(const Name: PChar; Typ: TTextureType): TsmallTexture;
- {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-//function Translate (const Name: PChar): PChar;
-// {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-//Procedure to Print Text
-procedure Print(const Style, Size: byte; const X, Y: real; const Text: PChar);
- {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-//Procedure that loads a Custom Sound
-function LoadSound(const Name: PChar): cardinal;
- {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-//Plays a Custom Sound
-procedure PlaySound(const Index: cardinal);
- {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+function LoadTex (const Name: PChar; Typ: TTextureType): TsmallTexture; stdcall;
+//function Translate (const Name: PChar): PChar; stdcall;
+procedure Print (const Style, Size: Byte; const X, Y: Real; const Text: PChar); stdcall; //Procedure to Print Text
+function LoadSound (const Name: PChar): Cardinal; stdcall; //Procedure that loads a Custom Sound
+procedure PlaySound (const Index: Cardinal); stdcall; //Plays a Custom Sound
//Utilys
function ToSentences(Const Lines: TLines): TSentences;
@@ -112,12 +133,12 @@ uses
URecord,
USkins;
-// Method for input parsing. If false is returned, GetNextWindow
+// Method for input parsing. If False is returned, GetNextWindow
// should be checked to know the next window to load;
-function TScreenSingModi.ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean;
+function TScreenSingModi.ParseInput(PressedKey: Cardinal; CharCode: UCS4Char; PressedDown: Boolean): Boolean;
begin
Result := true;
- if (PressedDown) then
+ If (PressedDown) Then
begin // Key Down
case PressedKey of
@@ -143,7 +164,7 @@ end;
function ToSentences(Const Lines: TLines): TSentences;
var
- I, J: integer;
+ I, J: Integer;
begin
Result.Current := Lines.Current;
Result.High := Lines.High;
@@ -178,7 +199,7 @@ end;
procedure TScreenSingModi.onShow;
var
- I: integer;
+ I: Integer;
begin
inherited;
@@ -200,14 +221,14 @@ begin
PlayerInfo.Playerinfo[I].Name := PChar(Ini.Name[I]);
PlayerInfo.Playerinfo[I].Score := 0;
PlayerInfo.Playerinfo[I].Bar := 50;
- PlayerInfo.Playerinfo[I].Enabled := true;
+ PlayerInfo.Playerinfo[I].Enabled := True;
end;
for I := PlayerInfo.NumPlayers to high(PlayerInfo.Playerinfo) do
begin
PlayerInfo.Playerinfo[I].Score:= 0;
PlayerInfo.Playerinfo[I].Bar := 0;
- PlayerInfo.Playerinfo[I].Enabled := false;
+ PlayerInfo.Playerinfo[I].Enabled := False;
end;
{Case PlayersPlay of
@@ -254,22 +275,18 @@ begin
end;
// Set Background (Little Workaround, maybe change sometime)
- if (DLLMan.Selected.LoadBack) and (DLLMan.Selected.LoadSong) then
+ if (DLLMan.Selected.LoadBack) AND (DLLMan.Selected.LoadSong) then
ScreenSing.Tex_Background := Tex_Background;
Winner := 0;
//Set Score Visibility
- Scores.Visible := DLLMan.Selected.ShowScore;
-
- {if PlayersPlay = 1 then
- begin
+ {if PlayersPlay = 1 then begin
Text[TextP1Score].Visible := DLLMan.Selected.ShowScore;
Static[StaticP1ScoreBG].Visible := DLLMan.Selected.ShowScore;
end;
- if (PlayersPlay = 2) or (PlayersPlay = 4) then
- begin
+ if (PlayersPlay = 2) OR (PlayersPlay = 4) then begin
Text[TextP1TwoPScore].Visible := DLLMan.Selected.ShowScore;
Static[StaticP1TwoPScoreBG].Visible := DLLMan.Selected.ShowScore;
@@ -277,8 +294,7 @@ begin
Static[StaticP2RScoreBG].Visible := DLLMan.Selected.ShowScore;
end;
- if (PlayersPlay = 3) or (PlayersPlay = 6) then
- begin
+ if (PlayersPlay = 3) OR (PlayersPlay = 6) then begin
Text[TextP1ThreePScore].Visible := DLLMan.Selected.ShowScore;
Static[StaticP1ThreePScoreBG].Visible := DLLMan.Selected.ShowScore;
@@ -314,39 +330,116 @@ begin
end;
end;
- Background.Draw;
+ //Show Score
+ if DLLMan.Selected.ShowScore then
+ begin
+ {//ScoreBG Mod
+ // set player colors
+ if PlayersPlay = 4 then begin
+ if ScreenAct = 1 then begin
+ LoadColor(Static[StaticP1TwoP].Texture.ColR, Static[StaticP1TwoP].Texture.ColG,
+ Static[StaticP1TwoP].Texture.ColB, 'P1Dark');
+ LoadColor(Static[StaticP2R].Texture.ColR, Static[StaticP2R].Texture.ColG,
+ Static[StaticP2R].Texture.ColB, 'P2Dark');
- // draw background picture (if any, and if no visualizations)
- // when we don't check for visualizations the visualizations would
- // be overdrawn by the picture when {UNDEFINED UseTexture} in UVisualizer
- if (DllMan.Selected.LoadSong) and (DllMan.Selected.LoadBack) and (not fShowVisualization) then
- SingDrawBackground;
- // set player names (for 2 screens and only Singstar skin)
- if ScreenAct = 1 then
- begin
- Text[TextP1].Text := 'P1';
- Text[TextP1TwoP].Text := 'P1'; // added for ps3 skin
- Text[TextP1ThreeP].Text := 'P1'; // added for ps3 skin
- Text[TextP2R].Text := 'P2';
- Text[TextP2M].Text := 'P2';
- Text[TextP3R].Text := 'P3';
- end
- Else if ScreenAct = 2 then
- begin
- case PlayersPlay of
- 4: begin
- Text[TextP1TwoP].Text := 'P3';
- Text[TextP2R].Text := 'P4';
- end;
- 6: begin
- Text[TextP1ThreeP].Text := 'P4';
- Text[TextP2M].Text := 'P5';
- Text[TextP3R].Text := 'P6';
- end;
- end; // case
- end; // if
+ LoadColor(Static[StaticP1TwoPScoreBG].Texture.ColR, Static[StaticP1TwoPScoreBG].Texture.ColG,
+ Static[StaticP1TwoPScoreBG].Texture.ColB, 'P1Dark');
+ LoadColor(Static[StaticP2RScoreBG].Texture.ColR, Static[StaticP2RScoreBG].Texture.ColG,
+ Static[StaticP2RScoreBG].Texture.ColB, 'P2Dark');
+
+
+
+ end;
+ if ScreenAct = 2 then begin
+ LoadColor(Static[StaticP1TwoP].Texture.ColR, Static[StaticP1TwoP].Texture.ColG,
+ Static[StaticP1TwoP].Texture.ColB, 'P3Dark');
+ LoadColor(Static[StaticP2R].Texture.ColR, Static[StaticP2R].Texture.ColG,
+ Static[StaticP2R].Texture.ColB, 'P4Dark');
+
+
+
+ LoadColor(Static[StaticP1TwoPScoreBG].Texture.ColR, Static[StaticP1TwoPScoreBG].Texture.ColG,
+ Static[StaticP1TwoPScoreBG].Texture.ColB, 'P3Dark');
+ LoadColor(Static[StaticP2RScoreBG].Texture.ColR, Static[StaticP2RScoreBG].Texture.ColG,
+ Static[StaticP2RScoreBG].Texture.ColB, 'P4Dark');
+
+
+
+ end;
+ end;
+
+ if PlayersPlay = 6 then begin
+ if ScreenAct = 1 then begin
+ LoadColor(Static[StaticP1ThreeP].Texture.ColR, Static[StaticP1ThreeP].Texture.ColG,
+ Static[StaticP1ThreeP].Texture.ColB, 'P1Dark');
+ LoadColor(Static[StaticP2M].Texture.ColR, Static[StaticP2M].Texture.ColG,
+ Static[StaticP2R].Texture.ColB, 'P2Dark');
+ LoadColor(Static[StaticP3R].Texture.ColR, Static[StaticP3R].Texture.ColG,
+ Static[StaticP3R].Texture.ColB, 'P3Dark');
+
+
+
+ LoadColor(Static[StaticP1ThreePScoreBG].Texture.ColR, Static[StaticP1ThreePScoreBG].Texture.ColG,
+ Static[StaticP1ThreePScoreBG].Texture.ColB, 'P1Dark');
+ LoadColor(Static[StaticP2MScoreBG].Texture.ColR, Static[StaticP2MScoreBG].Texture.ColG,
+ Static[StaticP2RScoreBG].Texture.ColB, 'P2Dark');
+ LoadColor(Static[StaticP3RScoreBG].Texture.ColR, Static[StaticP3RScoreBG].Texture.ColG,
+ Static[StaticP3RScoreBG].Texture.ColB, 'P3Dark');
+
+
+
+ end;
+ if ScreenAct = 2 then begin
+ LoadColor(Static[StaticP1ThreeP].Texture.ColR, Static[StaticP1ThreeP].Texture.ColG,
+ Static[StaticP1ThreeP].Texture.ColB, 'P4Dark');
+ LoadColor(Static[StaticP2M].Texture.ColR, Static[StaticP2M].Texture.ColG,
+ Static[StaticP2R].Texture.ColB, 'P5Dark');
+ LoadColor(Static[StaticP3R].Texture.ColR, Static[StaticP3R].Texture.ColG,
+ Static[StaticP3R].Texture.ColB, 'P6Dark');
+
+
+
+
+ LoadColor(Static[StaticP1ThreePScoreBG].Texture.ColR, Static[StaticP1ThreePScoreBG].Texture.ColG,
+ Static[StaticP1ThreePScoreBG].Texture.ColB, 'P4Dark');
+ LoadColor(Static[StaticP2MScoreBG].Texture.ColR, Static[StaticP2MScoreBG].Texture.ColG,
+ Static[StaticP2RScoreBG].Texture.ColB, 'P5Dark');
+ LoadColor(Static[StaticP3RScoreBG].Texture.ColR, Static[StaticP3RScoreBG].Texture.ColG,
+ Static[StaticP3RScoreBG].Texture.ColB, 'P6Dark');
+
+
+
+
+ end;
+ end;
+ //end ScoreBG Mod }
+
+ // set player names (for 2 screens and only Singstar skin)
+ if ScreenAct = 1 then begin
+ Text[TextP1].Text := 'P1';
+ Text[TextP1TwoP].Text := 'P1'; // added for ps3 skin
+ Text[TextP1ThreeP].Text := 'P1'; // added for ps3 skin
+ Text[TextP2R].Text := 'P2';
+ Text[TextP2M].Text := 'P2';
+ Text[TextP3R].Text := 'P3';
+ end;
+
+ if ScreenAct = 2 then begin
+ case PlayersPlay of
+ 4: begin
+ Text[TextP1TwoP].Text := 'P3';
+ Text[TextP2R].Text := 'P4';
+ end;
+ 6: begin
+ Text[TextP1ThreeP].Text := 'P4';
+ Text[TextP2M].Text := 'P5';
+ Text[TextP3R].Text := 'P6';
+ end;
+ end; // case
+ end; // if
+
// stereo <- and where iss P2M? or P3?
Static[StaticP1].Texture.X := Static[StaticP1].Texture.X + 10*ScreenX;
@@ -358,6 +451,92 @@ begin
Static[StaticP2R].Texture.X := Static[StaticP2R].Texture.X + 10*ScreenX;
Text[TextP2R].X := Text[TextP2R].X + 10*ScreenX;
+ {Static[StaticP2RScoreBG].Texture.X := Static[StaticP2RScoreBG].Texture.X + 10*ScreenX;
+ Text[TextP2RScore].X := Text[TextP2RScore].X + 10*ScreenX;}
+
+ // .. and scores
+ {if PlayersPlay = 1 then begin
+ TextStr := IntToStr(Player[0].ScoreTotalI);
+ while Length(TextStr) < 5 do TextStr := '0' + TextStr;
+ Text[TextP1Score].Text := TextStr;
+ end;
+
+ if PlayersPlay = 2 then begin
+ TextStr := IntToStr(Player[0].ScoreTotalI);
+ while Length(TextStr) < 5 do TextStr := '0' + TextStr;
+ Text[TextP1TwoPScore].Text := TextStr;
+
+ TextStr := IntToStr(Player[1].ScoreTotalI);
+ while Length(TextStr) < 5 do TextStr := '0' + TextStr;
+ Text[TextP2RScore].Text := TextStr;
+ end;
+
+ if PlayersPlay = 3 then begin
+ TextStr := IntToStr(Player[0].ScoreTotalI);
+ while Length(TextStr) < 5 do TextStr := '0' + TextStr;
+ Text[TextP1ThreePScore].Text := TextStr;
+
+ TextStr := IntToStr(Player[1].ScoreTotalI);
+ while Length(TextStr) < 5 do TextStr := '0' + TextStr;
+ Text[TextP2MScore].Text := TextStr;
+
+ TextStr := IntToStr(Player[2].ScoreTotalI);
+ while Length(TextStr) < 5 do TextStr := '0' + TextStr;
+ Text[TextP3RScore].Text := TextStr;
+ end;
+
+ if PlayersPlay = 4 then begin
+ if ScreenAct = 1 then begin
+ TextStr := IntToStr(Player[0].ScoreTotalI);
+ while Length(TextStr) < 5 do TextStr := '0' + TextStr;
+ Text[TextP1TwoPScore].Text := TextStr;
+
+ TextStr := IntToStr(Player[1].ScoreTotalI);
+ while Length(TextStr) < 5 do TextStr := '0' + TextStr;
+ Text[TextP2RScore].Text := TextStr;
+ end;
+ if ScreenAct = 2 then begin
+ TextStr := IntToStr(Player[2].ScoreTotalI);
+ while Length(TextStr) < 5 do TextStr := '0' + TextStr;
+ Text[TextP1TwoPScore].Text := TextStr;
+
+ TextStr := IntToStr(Player[3].ScoreTotalI);
+ while Length(TextStr) < 5 do TextStr := '0' + TextStr;
+ Text[TextP2RScore].Text := TextStr;
+ end;
+ end;
+
+ if PlayersPlay = 6 then begin
+ if ScreenAct = 1 then begin
+ TextStr := IntToStr(Player[0].ScoreTotalI);
+ while Length(TextStr) < 5 do TextStr := '0' + TextStr;
+ Text[TextP1ThreePScore].Text := TextStr;
+
+ TextStr := IntToStr(Player[1].ScoreTotalI);
+ while Length(TextStr) < 5 do TextStr := '0' + TextStr;
+ Text[TextP2MScore].Text := TextStr;
+
+ TextStr := IntToStr(Player[2].ScoreTotalI);
+ while Length(TextStr) < 5 do TextStr := '0' + TextStr;
+ Text[TextP3RScore].Text := TextStr;
+ end;
+ if ScreenAct = 2 then begin
+ TextStr := IntToStr(Player[3].ScoreTotalI);
+ while Length(TextStr) < 5 do TextStr := '0' + TextStr;
+ Text[TextP1ThreePScore].Text := TextStr;
+
+ TextStr := IntToStr(Player[4].ScoreTotalI);
+ while Length(TextStr) < 5 do TextStr := '0' + TextStr;
+ Text[TextP2MScore].Text := TextStr;
+
+ TextStr := IntToStr(Player[5].ScoreTotalI);
+ while Length(TextStr) < 5 do TextStr := '0' + TextStr;
+ Text[TextP3RScore].Text := TextStr;
+ end;
+ end; }
+
+ end; //ShowScore
+
for S := 1 to 1 do
Static[S].Texture.X := Static[S].Texture.X + 10*ScreenX;
@@ -378,43 +557,30 @@ begin
Text[TextTimeText].Text := Text[TextTimeText].Text + IntToStr(Sec);
end;
+ // draw static menu (BG)
+ DrawBG;
+
+ //Draw Background
+ if (DllMan.Selected.LoadSong) AND (DllMan.Selected.LoadBack) then
+ SingDrawBackground;
+
// update and draw movie
-{ if ShowFinish and CurrentSong.VideoLoaded and DllMan.Selected.LoadVideo then
- begin
+{ if ShowFinish and CurrentSong.VideoLoaded AND DllMan.Selected.LoadVideo then begin
UpdateSmpeg; // this only draws
end;}
- // update and draw movie
- if (ShowFinish and (VideoLoaded or fShowVisualization) and DllMan.Selected.LoadVideo) then
- begin
- if assigned(fCurrentVideoPlaybackEngine) then
- begin
- // Just call this once
- // when Screens = 2
- if (ScreenAct = 1) then
- fCurrentVideoPlaybackEngine.GetFrame(CurrentSong.VideoGAP + LyricsState.GetCurrentTime());
-
- fCurrentVideoPlaybackEngine.DrawGL(ScreenAct);
- end;
- end;
-
// draw static menu (FG)
DrawFG;
- if ShowFinish then
- begin
+ if ShowFinish then begin
if DllMan.Selected.LoadSong then
begin
- if (not AudioPlayback.Finished) and ((CurrentSong.Finish = 0) or (LyricsState.GetCurrentTime*1000 <= CurrentSong.Finish)) then
- begin
+ if (not AudioPlayback.Finished) and ((CurrentSong.Finish = 0) or (LyricsState.GetCurrentTime*1000 <= CurrentSong.Finish)) then begin
//Pause Mod:
if not Paused then
Sing(Self); // analyze song
- end
- else
- begin
- if not FadeOut then
- begin
+ end else begin
+ if not FadeOut then begin
Finish;
FadeOut := true;
FadeTo(@ScreenPartyScore);
@@ -430,9 +596,6 @@ begin
GoldenRec.SpawnRec;
//GoldenNoteStarsTwinkle Mod
- //Draw Score
- Scores.Draw;
-
//Update PlayerInfo
for I := 0 to PlayerInfo.NumPlayers-1 do
begin
@@ -443,15 +606,14 @@ begin
end;
end;
- if ((ShowFinish) and (not Paused)) then
+ if ((ShowFinish) AND (NOT Paused)) then
begin
if not DLLMan.PluginDraw(Playerinfo, Lines[0].Current) then
begin
- if not FadeOut then
- begin
- Finish;
- FadeOut := true;
- FadeTo(@ScreenPartyScore);
+ if not FadeOut then begin
+ Finish;
+ FadeOut := true;
+ FadeTo(@ScreenPartyScore);
end;
end;
end;
@@ -475,12 +637,14 @@ begin
{Static[StaticP1ScoreBG].Texture.X := Static[StaticP1ScoreBG].Texture.X - 10*ScreenX;
Text[TextP1Score].X := Text[TextP1Score].X - 10*ScreenX;}
+
Static[StaticP2R].Texture.X := Static[StaticP2R].Texture.X - 10*ScreenX;
Text[TextP2R].X := Text[TextP2R].X - 10*ScreenX;
{Static[StaticP2RScoreBG].Texture.X := Static[StaticP2RScoreBG].Texture.X - 10*ScreenX;
Text[TextP2RScore].X := Text[TextP2RScore].X - 10*ScreenX;}
+
for S := 1 to 1 do
Static[S].Texture.X := Static[S].Texture.X - 10*ScreenX;
@@ -501,13 +665,13 @@ Winner := DllMan.PluginFinish(PlayerInfo);
//DLLMan.UnLoadPlugin;
end;
-function LoadTex(const Name: PChar; Typ: TTextureType): TsmallTexture;
+function LoadTex (const Name: PChar; Typ: TTextureType): TsmallTexture; stdcall;
var
- Texname, EXT: string;
+ Texname, EXT: String;
Tex: TTexture;
begin
//Get texture Name
- TexName := Skin.GetTextureFileName(string(Name));
+ TexName := Skin.GetTextureFileName(String(Name));
//Get File Typ
Ext := ExtractFileExt(TexName);
if (uppercase(Ext) = '.JPG') then
@@ -524,11 +688,10 @@ end;
{
function Translate (const Name: PChar): PChar; stdcall;
begin
- Result := PChar(Language.Translate(string(Name)));
+ Result := PChar(Language.Translate(String(Name)));
end; }
-//Procedure to Print Text
-procedure Print(const Style, Size: byte; const X, Y: real; const Text: PChar);
+procedure Print(const Style, Size: Byte; const X, Y: Real; const Text: PChar); stdcall; //Procedure to Print Text
begin
SetFontItalic ((Style and 128) = 128);
SetFontStyle(Style and 7);
@@ -536,15 +699,14 @@ begin
// used by Hold_The_Line / TeamDuell
SetFontSize(Size);
SetFontPos (X, Y);
- glPrint (Language.Translate(string(Text)));
+ glPrint (Language.Translate(String(Text)));
end;
-//Procedure that loads a Custom Sound
-function LoadSound(const Name: PChar): cardinal;
+function LoadSound(const Name: PChar): Cardinal; stdcall; //Procedure that loads a Custom Sound
var
Stream: TAudioPlaybackStream;
- i: integer;
- Filename: string;
+ i: Integer;
+ Filename: String;
begin
//Search for Sound in already loaded Sounds
Filename := UpperCase(SoundPath + Name);
@@ -557,7 +719,7 @@ begin
end;
end;
- Stream := AudioPlayback.OpenSound(SoundPath + string(Name));
+ Stream := AudioPlayback.OpenSound(SoundPath + String(Name));
if (Stream = nil) then
begin
Result := 0;
@@ -569,8 +731,7 @@ begin
Result := High(CustomSounds);
end;
-//Plays a Custom Sound
-procedure PlaySound(const Index: cardinal);
+procedure PlaySound(const Index: Cardinal); stdcall; //Plays a Custom Sound
begin
if (Index <= High(CustomSounds)) then
AudioPlayback.PlaySound(CustomSounds[Index].Stream);
diff --git a/unicode/src/screens/UScreenSong.pas b/unicode/src/screens/UScreenSong.pas
index 00d90930..da725a59 100644
--- a/unicode/src/screens/UScreenSong.pas
+++ b/unicode/src/screens/UScreenSong.pas
@@ -33,23 +33,24 @@ interface
{$I switches.inc}
+
uses
- SysUtils,
- SDL,
- UCommon,
- UDisplay,
- UFiles,
- UIni,
- ULanguage,
- ULog,
UMenu,
- UMenuEqualizer,
+ SDL,
UMusic,
- USong,
+ UFiles,
+ UTime,
+ UDisplay,
USongs,
- UTexture,
+ SysUtils,
+ UCommon,
+ ULog,
UThemes,
- UTime;
+ UTexture,
+ ULanguage,
+ USong,
+ UIni,
+ UMenuEqualizer;
type
TScreenSong = class(TMenu)
@@ -110,6 +111,7 @@ type
StaticNonParty: array of cardinal;
TextNonParty: array of cardinal;
+
constructor Create; override;
procedure SetScroll;
//procedure SetScroll1;
@@ -119,7 +121,6 @@ type
procedure SetScroll5;
procedure SetScroll6;
function ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean; override;
- function ParseMouse(MouseButton: integer; BtnDown: boolean; X, Y: integer): boolean; override;
function Draw: boolean; override;
procedure GenerateThumbnails();
procedure onShow; override;
@@ -141,7 +142,7 @@ type
//procedures for Menu
procedure StartSong;
procedure OpenEditor;
- procedure DoJoker(Team: byte);
+ procedure DoJoker(Team: Byte);
procedure SelectPlayers;
procedure UnloadDetailedCover;
@@ -177,7 +178,7 @@ begin
if CatSongs.VisibleSongs > 0 then
begin
I2:= 0;
- for I := Low(CatSongs.Song) to High(Catsongs.Song) do
+ for I := low(CatSongs.Song) to High(Catsongs.Song) do
begin
if CatSongs.Song[I].Visible then
inc(I2);
@@ -198,7 +199,7 @@ begin
if CatSongs.VisibleSongs > 0 then
begin
I2:= 0;
- for I := Low(CatSongs.Song) to High(Catsongs.Song) do
+ for I := low(CatSongs.Song) to High(Catsongs.Song) do
begin
if CatSongs.Song[I].Visible then
inc(I2);
@@ -242,13 +243,14 @@ begin
end;
//Show Cat in Top Left Mod End
-// Method for input parsing. If false is returned, GetNextWindow
+
+// Method for input parsing. If False is returned, GetNextWindow
// should be checked to know the next window to load;
function TScreenSong.ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean;
var
I: integer;
I2: integer;
- SDL_ModState: word;
+ SDL_ModState: Word;
UpperLetter: UCS4Char;
TempStr: UTF8String;
begin
@@ -284,7 +286,7 @@ begin
//Jump To Titel
if (SDL_ModState = (KMOD_LALT or KMOD_LSHIFT)) then
begin
- for I := 1 to High(CatSongs.Song) do
+ for I := 1 to high(CatSongs.Song) do
begin
if (CatSongs.Song[(I + Interaction) mod I2].Visible) then
begin
@@ -307,7 +309,7 @@ begin
//Jump to Artist
else if (SDL_ModState = KMOD_LALT) then
begin
- for I := 1 to High(CatSongs.Song) do
+ for I := 1 to high(CatSongs.Song) do
begin
if (CatSongs.Song[(I + Interaction) mod I2].Visible) then
begin
@@ -405,25 +407,25 @@ begin
if (Songs.SongList.Count > 0) and
(Mode = smNormal) then
begin
- if (SDL_ModState = KMOD_LSHIFT) and (Ini.TabsAtStartup = 1) then // random category
+ if (SDL_ModState = KMOD_LSHIFT) and (Ini.TabsAtStartup = 1) then //Random Category
begin
- I2 := 0; // count cats
- for I := 0 to High(CatSongs.Song) do
+ I2 := 0; //Count Cats
+ for I:= 0 to high(CatSongs.Song) do
begin
if CatSongs.Song[I].Main then
Inc(I2);
end;
- I2 := Random(I2 + 1); // random and include I2
+ I2 := Random(I2)+1; //Zufall
- // find cat:
- for I := 0 to High(CatSongs.Song) do
+ //Find Cat:
+ for I:= 0 to high(CatSongs.Song) do
begin
if CatSongs.Song[I].Main then
Dec(I2);
- if (I2 <= 0) then
+ if (I2<=0) then
begin
- // show cat in top left mod
+ //Show Cat in Top Left Mod
ShowCatTL (I);
Interaction := I;
@@ -436,38 +438,38 @@ begin
end;
end;
end
- else if (SDL_ModState = KMOD_LCTRL) and (Ini.TabsAtStartup = 1) then // random in all categories
+ else if (SDL_ModState = KMOD_LCTRL) and (Ini.TabsAtStartup = 1) then //random in All Categorys
begin
repeat
- I2 := Random(High(CatSongs.Song) + 1);
+ I2 := Random(high(CatSongs.Song)+1) + 1;
until (not CatSongs.Song[I2].Main);
- // search cat
+ //Search Cat
for I := I2 downto 0 do
begin
if CatSongs.Song[I].Main then
break;
end;
- // in I is now the categorie in I2 the song
+ //In I is now the categorie in I2 the song
- // choose cat
+ //Choose Cat
CatSongs.ShowCategoryList;
- // show cat in top left mod
+ //Show Cat in Top Left Mod
ShowCatTL (I);
CatSongs.ClickCategoryButton(I);
SelectNext;
- // Fix: not existing song selected:
- //if (I + 1 = I2) then
- Inc(I2);
+ //Fix: Not Existing Song selected:
+ //if (I+1=I2) then
+ Inc(I2);
- // choose song
- SkipTo(I2 - I);
+ //Choose Song
+ SkipTo(I2-I);
end
- else // random in one category
+ else //Random in one Category
begin
SkipTo(Random(CatSongs.VisibleSongs));
end;
@@ -499,7 +501,7 @@ begin
break;
end;
if (I <= 1) then
- Interaction := High(CatSongs.Song)
+ Interaction := high(CatSongs.Song)
else
Interaction := I - 1;
@@ -511,6 +513,7 @@ begin
//Show Cat in Top Left Mod
HideCatTL;
+
//Show Wrong Song when Tabs on Fix
SelectNext;
FixSelected;
@@ -616,13 +619,13 @@ begin
begin
I := Interaction;
if I <= 0 then
- I := 1;
+ I := 1;
while not catsongs.Song[I].Main do
begin
Inc (I);
- if (I > High(catsongs.Song)) then
- I := Low(catsongs.Song);
+ if (I > high(catsongs.Song)) then
+ I := low(catsongs.Song);
end;
Interaction := I;
@@ -658,15 +661,15 @@ begin
I := Interaction;
I2 := 0;
if I <= 0 then
- I := 1;
+ I := 1;
while not catsongs.Song[I].Main or (I2 = 0) do
begin
if catsongs.Song[I].Main then
Inc(I2);
Dec (I);
- if (I < Low(catsongs.Song)) then
- I := High(catsongs.Song);
+ if (I < low(catsongs.Song)) then
+ I := high(catsongs.Song);
end;
Interaction := I;
@@ -712,61 +715,41 @@ begin
end;
SDLK_1:
- begin //Joker
- if (Mode = smPartyMode) and (PartySession.Teams.NumTeams >= 1) and (PartySession.Teams.Teaminfo[0].Joker > 0) then
+ begin //Joker // to-do : Party
+ {if (Mode = smPartyMode) and (PartySession.Teams.NumTeams >= 1) and (PartySession.Teams.Teaminfo[0].Joker > 0) then
begin
//Use Joker
Dec(PartySession.Teams.Teaminfo[0].Joker);
SelectRandomSong;
SetJoker;
- end;
+ end; }
end;
SDLK_2:
begin //Joker
- if (Mode = smPartyMode) and (PartySession.Teams.NumTeams >= 2) and (PartySession.Teams.Teaminfo[1].Joker > 0) then
+ {if (Mode = smPartyMode) and (PartySession.Teams.NumTeams >= 2) and (PartySession.Teams.Teaminfo[1].Joker > 0) then
begin
//Use Joker
Dec(PartySession.Teams.Teaminfo[1].Joker);
SelectRandomSong;
SetJoker;
- end;
+ end; }
end;
SDLK_3:
begin //Joker
- if (Mode = smPartyMode) and (PartySession.Teams.NumTeams >= 3) and (PartySession.Teams.Teaminfo[2].Joker > 0) then
+ {if (Mode = smPartyMode) and (PartySession.Teams.NumTeams >= 3) and (PartySession.Teams.Teaminfo[2].Joker > 0) then
begin
//Use Joker
Dec(PartySession.Teams.Teaminfo[2].Joker);
SelectRandomSong;
SetJoker;
- end;
+ end; }
end;
end;
end; // if (PressedDown)
end;
-function TScreenSong.ParseMouse(MouseButton: integer; BtnDown: boolean; X, Y: integer): boolean;
-begin
- Result := true;
-
- if RightMbESC and (MouseButton = SDL_BUTTON_RIGHT) and BtnDown then
- //if RightMbESC is set, send ESC keypress
- Result:=ParseInput(SDLK_ESCAPE, 0, true);
-
- //song scrolling with mousewheel
- if (MouseButton = SDL_BUTTON_WHEELDOWN) and BtnDown then
- ParseInput(SDLK_RIGHT, 0, true);
-
- if (MouseButton = SDL_BUTTON_WHEELUP) and BtnDown then
- ParseInput(SDLK_LEFT, 0, true);
-
- //LMB anywhere starts
- if (MouseButton = SDL_BUTTON_LEFT) and BtnDown then
- ParseInput(SDLK_RETURN, 0, true);
-end;
-
constructor TScreenSong.Create;
var
i: integer;
@@ -828,6 +811,7 @@ begin
GenerateThumbnails();
+
// Randomize Patch
Randomize;
@@ -982,6 +966,7 @@ begin
if CatSongs.Song[B].Visible then
Inc(VisInt);
+
if VisCount <= 6 then
begin
Typ := 0;
@@ -1010,6 +995,7 @@ begin
end;
+
// hide all buttons
for B := 0 to High(Button) do
begin
@@ -1027,6 +1013,7 @@ begin
end;
}
+
if Typ = 0 then
begin
for B := 0 to High(Button) do
@@ -1323,26 +1310,27 @@ begin
if Button[B].Visible then // optimization for 1000 songs - updates only visible songs, hiding in tabs becomes useful for maintaing good speed
begin
- Factor := 2 * pi * (CatSongs.VisibleIndex(B) - SongCurrent) / VS {CatSongs.VisibleSongs};// 0.5.0 (II): takes another 16ms
+ Factor := 2 * pi * (CatSongs.VisibleIndex(B) - SongCurrent) / VS {CatSongs.VisibleSongs};// 0.5.0 (II): takes another 16ms
+
+ Z := (1 + cos(Factor)) / 2;
+ Z2 := (1 + 2*Z) / 3;
- Z := (1 + cos(Factor)) / 2;
- Z2 := (1 + 2*Z) / 3;
- Button[B].Y := Theme.Song.Cover.Y + (0.185 * Theme.Song.Cover.H * VS * sin(Factor)) * Z2 - ((Button[B].H - Theme.Song.Cover.H)/2); // 0.5.0 (I): 2 times faster by not calling CatSongs.VisibleSongs
- Button[B].Z := Z / 2 + 0.3;
+ Button[B].Y := Theme.Song.Cover.Y + (0.185 * Theme.Song.Cover.H * VS * sin(Factor)) * Z2 - ((Button[B].H - Theme.Song.Cover.H)/2); // 0.5.0 (I): 2 times faster by not calling CatSongs.VisibleSongs
+ Button[B].Z := Z / 2 + 0.3;
- Button[B].W := Theme.Song.Cover.H * Z2;
+ Button[B].W := Theme.Song.Cover.H * Z2;
- //Button[B].Y := {50 +} 140 + 50 - 50 * Z2;
- Button[B].X := Theme.Song.Cover.X + (Theme.Song.Cover.H - Abs(Button[B].H)) * 0.7 ;
- Button[B].H := Button[B].W;
+ //Button[B].Y := {50 +} 140 + 50 - 50 * Z2;
+ Button[B].X := Theme.Song.Cover.X + (Theme.Song.Cover.H - Abs(Button[B].H)) * 0.7 ;
+ Button[B].H := Button[B].W;
end;
end;
end
else
begin
//Change Pos of all Buttons
- for B := Low(Button) to High(Button) do
+ for B := low(Button) to high(Button) do
begin
Button[B].Visible := CatSongs.Song[B].Visible; //Adjust Visibility
if Button[B].Visible then //Only Change Pos for Visible Buttons
@@ -1370,6 +1358,7 @@ begin
Diff := (Button[B].H - Theme.Song.Cover.H)/2;
+
X := Sin(Angle*1.3)*0.9;
Button[B].Y := Theme.Song.Cover.Y + Theme.Song.Cover.W * X - Diff;
@@ -1379,9 +1368,9 @@ begin
// limit-bg-covers hack
if (abs(VS/2-abs(Pos))>10) then
- Button[B].Visible := false;
+ Button[B].Visible := false;
if VS > 25 then
- VS:=25;
+ VS:=25;
// end of limit-bg-covers hack
if Pos < 0 then
@@ -1399,6 +1388,7 @@ begin
Button[B].X := Theme.Song.Cover.X - (Button[B].H - Theme.Song.Cover.H)*0.5;
+
Button[B].DeSelectReflectionspacing := 15 * Button[B].H/Theme.Song.Cover.H;
Button[B].Y := Theme.Song.Cover.Y+Theme.Song.Cover.H/2-Button[b].H/2+Theme.Song.Cover.W/320*(Theme.Song.Cover.H*sin(Angle/2)*1.52);
@@ -1408,6 +1398,7 @@ begin
end;
end;
+
procedure TScreenSong.onShow;
begin
inherited;
@@ -1471,7 +1462,7 @@ begin
AudioPlayback.SetVolume(1.0);
// if preview is deactivated: load musicfile now
- if (IPreviewVolumeVals[Ini.PreviewVolume] = 0) then
+ If (IPreviewVolumeVals[Ini.PreviewVolume] = 0) then
AudioPlayback.Open(CatSongs.Song[Interaction].Path + CatSongs.Song[Interaction].Mp3);
// if hide then stop music (for party mode popup on exit)
@@ -1731,40 +1722,41 @@ var
I, I2: integer;
begin
case PlaylistMan.Mode of
- smNormal: // all songs just select random song
+ smNormal: //All Songs Just Select Random Song
begin
- // when tabs are activated then use tab method
+ //When Tabs are activated then use Tab Method
if (Ini.TabsAtStartup = 1) then
begin
repeat
- I2 := Low(CatSongs.Song) + Random(High(CatSongs.Song) + 1 - Low(CatSongs.Song));
+ I2 := Random(high(CatSongs.Song)+1) - low(CatSongs.Song)+1;
until CatSongs.Song[I2].Main = false;
- // search cat
- for I := I2 downto Low(CatSongs.Song) do
+ //Search Cat
+ for I := I2 downto low(CatSongs.Song) do
begin
if CatSongs.Song[I].Main then
break;
end;
- // I is the cat number, I2 is the no of the song within this cat
+ //In I ist jetzt die Kategorie in I2 der Song
+ //I is the CatNum, I2 is the No of the Song within this Cat
- // choose cat
+ //Choose Cat
CatSongs.ShowCategoryList;
- // show cat in top left mod
- ShowCatTL(I);
+ //Show Cat in Top Left Mod
+ ShowCatTL (I);
CatSongs.ClickCategoryButton(I);
SelectNext;
- // choose song
- SkipTo(I2 - I);
+ //Choose Song
+ SkipTo(I2-I);
end
- // when tabs are deactivated use easy method
+ //When Tabs are deactivated use easy Method
else
SkipTo(Random(CatSongs.VisibleSongs));
end;
- smPartyMode: // one category select category and select random song
+ smPartyMode: //One Category Select Category and Select Random Song
begin
CatSongs.ShowCategoryList;
CatSongs.ClickCategoryButton(PlaylistMan.CurPlayList);
@@ -1775,7 +1767,7 @@ begin
SkipTo(Random(CatSongs.VisibleSongs));
end;
- smPlaylistRandom: // playlist: select playlist and select random song
+ smPlaylistRandom: //Playlist: Select Playlist and Select Random Song
begin
PlaylistMan.SetPlayList(PlaylistMan.CurPlayList);
@@ -1792,8 +1784,10 @@ end;
procedure TScreenSong.SetJoker;
begin
// If Party Mode
+ // to-do : Party
if Mode = smPartyMode then //Show Joker that are available
begin
+ (*
if (PartySession.Teams.NumTeams >= 1) then
begin
Static[StaticTeam1Joker1].Visible := (PartySession.Teams.Teaminfo[0].Joker >= 1);
@@ -1844,6 +1838,7 @@ begin
Static[StaticTeam3Joker4].Visible := false;
Static[StaticTeam3Joker5].Visible := false;
end;
+ *)
end
else
begin //Hide all
@@ -1875,19 +1870,19 @@ begin
//Set Visibility of Party Statics and Text
Visible := (Mode = smPartyMode);
- for I := 0 to High(StaticParty) do
+ for I := 0 to high(StaticParty) do
Static[StaticParty[I]].Visible := Visible;
- for I := 0 to High(TextParty) do
+ for I := 0 to high(TextParty) do
Text[TextParty[I]].Visible := Visible;
//Set Visibility of Non Party Statics and Text
Visible := not Visible;
- for I := 0 to High(StaticNonParty) do
+ for I := 0 to high(StaticNonParty) do
Static[StaticNonParty[I]].Visible := Visible;
- for I := 0 to High(TextNonParty) do
+ for I := 0 to high(TextNonParty) do
Text[TextNonParty[I]].Visible := Visible;
end;
@@ -1932,8 +1927,9 @@ begin
end;
//Team No of Team (0-5)
-procedure TScreenSong.DoJoker (Team: byte);
+procedure TScreenSong.DoJoker (Team: Byte);
begin
+ {
if (Mode = smPartyMode) and
(PartySession.Teams.NumTeams >= Team + 1) and
(PartySession.Teams.Teaminfo[Team].Joker > 0) then
@@ -1943,6 +1939,7 @@ begin
SelectRandomSong;
SetJoker;
end;
+ }
end;
//Detailed Cover Unloading. Unloads the Detailed, uncached Cover of the cur. Song
diff --git a/unicode/src/screens/UScreenSongJumpto.pas b/unicode/src/screens/UScreenSongJumpto.pas
index 7405742a..b6979f63 100644
--- a/unicode/src/screens/UScreenSongJumpto.pas
+++ b/unicode/src/screens/UScreenSongJumpto.pas
@@ -34,9 +34,9 @@ interface
{$I switches.inc}
uses
+ SDL,
SysUtils,
UMenu,
- SDL,
UDisplay,
UMusic,
UFiles,
@@ -47,20 +47,20 @@ type
TScreenSongJumpto = class(TMenu)
private
//For ChangeMusic
- fLastPlayed: integer;
- fVisible: boolean;
+ fLastPlayed: Integer;
+ fVisible: Boolean;
fSelectType: TSongFilter;
- fVisSongs: integer;
+ fVisSongs: Integer;
- procedure SetTextFound(const Count: cardinal);
+ procedure SetTextFound(Count: Cardinal);
//Visible //Whether the Menu should be Drawn
//Whether the Menu should be Drawn
- procedure SetVisible(Value: boolean);
+ procedure SetVisible(Value: Boolean);
public
constructor Create; override;
- function ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean; override;
+ function ParseInput(PressedKey: Cardinal; CharCode: UCS4Char; PressedDown: Boolean): Boolean; override;
procedure onShow; override;
function Draw: boolean; override;
@@ -80,10 +80,10 @@ uses
ULog,
UUnicodeUtils;
-function TScreenSongJumpto.ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean;
+function TScreenSongJumpto.ParseInput(PressedKey: Cardinal; CharCode: UCS4Char; PressedDown: Boolean): Boolean;
begin
Result := true;
- if (PressedDown) then
+ If (PressedDown) Then
begin // Key Down
// check normal keys
if (IsAlphaNumericChar(CharCode) or
@@ -100,7 +100,7 @@ begin
case PressedKey of
SDLK_BACKSPACE:
begin
- if (Interaction = 0) and (Length(Button[0].Text[0].Text) > 0) then
+ if (Interaction = 0) AND (Length(Button[0].Text[0].Text) > 0) then
begin
Button[0].Text[0].DeleteLastLetter();
SetTextFound(CatSongs.SetFilter(Button[0].Text[0].Text, fSelectType));
@@ -110,9 +110,9 @@ begin
SDLK_RETURN,
SDLK_ESCAPE:
begin
- Visible := false;
+ Visible := False;
AudioPlayback.PlaySound(SoundLib.Back);
- if (fVisSongs = 0) and (Length(Button[0].Text[0].Text) > 0) then
+ if (fVisSongs = 0) AND (Length(Button[0].Text[0].Text) > 0) then
begin
ScreenSong.UnLoadDetailedCover;
Button[0].Text[0].Text := '';
@@ -168,14 +168,15 @@ begin
fSelectType := fltAll;
AddSelectSlide(Theme.SongJumpto.SelectSlideType, PInteger(@fSelectType)^, Theme.SongJumpto.IType);
+
Interaction := 0;
fLastPlayed := 0;
end;
-procedure TScreenSongJumpto.SetVisible(Value: boolean);
+procedure TScreenSongJumpto.SetVisible(Value: Boolean);
begin
//If change from invisible to Visible then OnShow
- if (fVisible = false) and (Value = true) then
+ if (fVisible = False) AND (Value = True) then
OnShow;
fVisible := Value;
@@ -196,7 +197,7 @@ begin
//Select Input
Interaction := 0;
- Button[0].Text[0].Selected := true;
+ Button[0].Text[0].Selected := True;
fLastPlayed := ScreenSong.Interaction;
end;
@@ -206,7 +207,7 @@ begin
Result := inherited Draw;
end;
-procedure TScreenSongJumpto.SetTextFound(const Count: cardinal);
+procedure TScreenSongJumpto.SetTextFound(Count: Cardinal);
begin
if (Count = 0) then
begin
@@ -224,6 +225,7 @@ begin
ScreenSong.ShowCatTLCustom(Format(Theme.SongJumpto.CatText, [Button[0].Text[0].Text]));
end;
+
//Set visSongs
fVisSongs := Count;
diff --git a/unicode/src/screens/UScreenSongMenu.pas b/unicode/src/screens/UScreenSongMenu.pas
index e09dd9b5..b8720b86 100644
--- a/unicode/src/screens/UScreenSongMenu.pas
+++ b/unicode/src/screens/UScreenSongMenu.pas
@@ -196,6 +196,7 @@ begin
SetLength(ISelections, 1);
ISelections[0] := 'Dummy';
+
AddText(Theme.SongMenu.TextMenu);
LoadFromTheme(Theme.SongMenu);
@@ -401,16 +402,19 @@ begin
begin
CurMenu := sMenu;
Text[0].Text := Language.Translate('SONG_MENU_NAME_PARTY_JOKER');
-
- Button[0].Visible := (PartySession.Teams.NumTeams >= 1) and (PartySession.Teams.Teaminfo[0].Joker > 0);
+ // to-do : Party
+{
+ Button[0].Visible := (PartySession.Teams.NumTeams >= 1) and (PartySession.Teams.Teaminfo[0].Joker > 0);
Button[1].Visible := (PartySession.Teams.NumTeams >= 2) and (PartySession.Teams.Teaminfo[1].Joker > 0);
Button[2].Visible := (PartySession.Teams.NumTeams >= 3) and (PartySession.Teams.Teaminfo[2].Joker > 0);
+}
Button[3].Visible := true;
SelectsS[0].Visible := false;
-
- Button[0].Text[0].Text := string(PartySession.Teams.Teaminfo[0].Name);
- Button[1].Text[0].Text := string(PartySession.Teams.Teaminfo[1].Name);
- Button[2].Text[0].Text := string(PartySession.Teams.Teaminfo[2].Name);
+{
+ Button[0].Text[0].Text := String(PartySession.Teams.Teaminfo[0].Name);
+ Button[1].Text[0].Text := String(PartySession.Teams.Teaminfo[1].Name);
+ Button[2].Text[0].Text := String(PartySession.Teams.Teaminfo[2].Name);
+}
Button[3].Text[0].Text := Language.Translate('SONG_MENU_CANCEL');
// set right interaction
@@ -421,10 +425,10 @@ begin
if (not Button[2].Visible) then
Interaction := 4
else
- Interaction := 2;
+ Interaction := 2;
end
else
- Interaction := 1;
+ Interaction := 1;
end;
end;
diff --git a/unicode/src/screens/UScreenStatDetail.pas b/unicode/src/screens/UScreenStatDetail.pas
index 5a0419b7..6241ee2e 100644
--- a/unicode/src/screens/UScreenStatDetail.pas
+++ b/unicode/src/screens/UScreenStatDetail.pas
@@ -47,20 +47,21 @@ type
TScreenStatDetail = class(TMenu)
public
Typ: TStatType;
- Page: cardinal;
- Count: byte;
- Reversed: boolean;
+ Page: Cardinal;
+ Count: Byte;
+ Reversed: Boolean;
+
+ TotEntrys: Cardinal;
+ TotPages: Cardinal;
- TotEntrys: cardinal;
- TotPages: cardinal;
constructor Create; override;
- function ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean; override;
+ function ParseInput(PressedKey: Cardinal; CharCode: UCS4Char; PressedDown: Boolean): Boolean; override;
procedure onShow; override;
procedure SetAnimationProgress(Progress: real); override;
procedure SetTitle;
- Procedure SetPage(NewPage: cardinal);
+ Procedure SetPage(NewPage: Cardinal);
end;
implementation
@@ -73,10 +74,10 @@ uses
ULog,
UUnicodeUtils;
-function TScreenStatDetail.ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean;
+function TScreenStatDetail.ParseInput(PressedKey: Cardinal; CharCode: UCS4Char; PressedDown: Boolean): Boolean;
begin
Result := true;
- if (PressedDown) then
+ If (PressedDown) Then
begin // Key Down
// check normal keys
case UCS4UpperCase(CharCode) of
@@ -97,28 +98,24 @@ begin
end;
SDLK_RETURN:
begin
- if Interaction = 0 then
- begin
+ if Interaction = 0 then begin
//Next Page
SetPage(Page+1);
end;
- if Interaction = 1 then
- begin
+ if Interaction = 1 then begin
//Previous Page
if (Page > 0) then
SetPage(Page-1);
end;
- if Interaction = 2 then
- begin
+ if Interaction = 2 then begin
//Reverse Order
Reversed := not Reversed;
SetPage(Page);
end;
- if Interaction = 3 then
- begin
+ if Interaction = 3 then begin
AudioPlayback.PlaySound(SoundLib.Back);
FadeTo(@ScreenStatMain);
end;
@@ -191,7 +188,7 @@ begin
SetTitle;
//Show First Page
- Reversed := false;
+ Reversed := False;
SetPage(0);
end;
@@ -203,12 +200,12 @@ begin
Text[Count].Text := Theme.StatDetail.Description[Ord(Typ)];
end;
-procedure TScreenStatDetail.SetPage(NewPage: cardinal);
+procedure TScreenStatDetail.SetPage(NewPage: Cardinal);
var
StatList: TList;
- I: integer;
- FormatStr: string;
- PerPage: byte;
+ I: Integer;
+ FormatStr: String;
+ PerPage: Byte;
begin
// fetch statistics
StatList := Database.GetStats(Typ, Count, NewPage, Reversed);
@@ -292,9 +289,9 @@ begin
Database.FreeStats(StatList);
end;
+
procedure TScreenStatDetail.SetAnimationProgress(Progress: real);
-var
- I: integer;
+var I: Integer;
begin
for I := 0 to High(Button) do
Button[I].Texture.ScaleW := Progress;
diff --git a/unicode/src/screens/UScreenStatMain.pas b/unicode/src/screens/UScreenStatMain.pas
index 6d4d3f5b..a183f04c 100644
--- a/unicode/src/screens/UScreenStatMain.pas
+++ b/unicode/src/screens/UScreenStatMain.pas
@@ -46,14 +46,14 @@ type
TScreenStatMain = class(TMenu)
private
//Some Stat Value that don't need to be calculated 2 times
- SongsWithVid: cardinal;
+ SongsWithVid: Cardinal;
function FormatOverviewIntro(FormatStr: string): string;
function FormatSongOverview(FormatStr: string): string;
function FormatPlayerOverview(FormatStr: string): string;
public
TextOverview: integer;
constructor Create; override;
- function ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean; override;
+ function ParseInput(PressedKey: Cardinal; CharCode: UCS4Char; PressedDown: Boolean): Boolean; override;
procedure onShow; override;
procedure SetAnimationProgress(Progress: real); override;
@@ -73,10 +73,10 @@ uses
ULog,
UUnicodeUtils;
-function TScreenStatMain.ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean;
+function TScreenStatMain.ParseInput(PressedKey: Cardinal; CharCode: UCS4Char; PressedDown: Boolean): Boolean;
begin
Result := true;
- if (PressedDown) then
+ If (PressedDown) Then
begin // Key Down
// check normal keys
case UCS4UpperCase(CharCode) of
@@ -165,7 +165,7 @@ begin
//Set Songs with Vid
SongsWithVid := 0;
- for I := 0 to Songs.SongList.Count -1 do
+ For I := 0 to Songs.SongList.Count -1 do
if (TSong(Songs.SongList[I]).Video <> '') then
Inc(SongsWithVid);
end;
@@ -180,7 +180,7 @@ end;
function TScreenStatMain.FormatOverviewIntro(FormatStr: string): string;
var
- Year, Month, Day: word;
+ Year, Month, Day: Word;
begin
{Format:
%0:d Ultrastar Version
@@ -201,8 +201,8 @@ end;
function TScreenStatMain.FormatSongOverview(FormatStr: string): string;
var
- CntSongs, CntSungSongs, CntVidSongs: integer;
- MostPopSongArtist, MostPopSongTitle: string;
+ CntSongs, CntSungSongs, CntVidSongs: Integer;
+ MostPopSongArtist, MostPopSongTitle: String;
StatList: TList;
MostSungSong: TStatResultMostSungSong;
begin
@@ -217,7 +217,7 @@ begin
CntSungSongs := Database.GetTotalEntrys(stMostSungSong);
CntVidSongs := SongsWithVid;
- StatList := Database.GetStats(stMostSungSong, 1, 0, false);
+ StatList := Database.GetStats(stMostSungSong, 1, 0, False);
if ((StatList <> nil) and (StatList.Count > 0)) then
begin
MostSungSong := StatList[0];
@@ -245,11 +245,11 @@ end;
function TScreenStatMain.FormatPlayerOverview(FormatStr: string): string;
var
- CntPlayers: integer;
+ CntPlayers: Integer;
BestScoreStat: TStatResultBestScores;
BestSingerStat: TStatResultBestSingers;
- BestPlayer, BestScorePlayer: string;
- BestPlayerScore, BestScore: integer;
+ BestPlayer, BestScorePlayer: String;
+ BestPlayerScore, BestScore: Integer;
SingerStats, ScoreStats: TList;
begin
{Format:
@@ -261,7 +261,7 @@ begin
CntPlayers := Database.GetTotalEntrys(stBestSingers);
- SingerStats := Database.GetStats(stBestSingers, 1, 0, false);
+ SingerStats := Database.GetStats(stBestSingers, 1, 0, False);
if ((SingerStats <> nil) and (SingerStats.Count > 0)) then
begin
BestSingerStat := SingerStats[0];
@@ -275,7 +275,7 @@ begin
end;
Database.FreeStats(SingerStats);
- ScoreStats := Database.GetStats(stBestScores, 1, 0, false);
+ ScoreStats := Database.GetStats(stBestScores, 1, 0, False);
if ((ScoreStats <> nil) and (ScoreStats.Count > 0)) then
begin
BestScoreStat := ScoreStats[0];
@@ -303,7 +303,7 @@ end;
procedure TScreenStatMain.SetOverview;
var
- Overview: string;
+ Overview: String;
begin
// Format overview
Overview := FormatOverviewIntro(Language.Translate('STAT_OVERVIEW_INTRO')) + '\n \n' +
@@ -312,11 +312,11 @@ begin
Text[0].Text := Overview;
end;
+
procedure TScreenStatMain.SetAnimationProgress(Progress: real);
-var
- I: integer;
+var I: Integer;
begin
- for I := 0 to high(Button) do
+ For I := 0 to high(Button) do
Button[I].Texture.ScaleW := Progress;
end;
diff --git a/unicode/src/screens/UScreenTop5.pas b/unicode/src/screens/UScreenTop5.pas
index eeec8ed7..eaa90ab1 100644
--- a/unicode/src/screens/UScreenTop5.pas
+++ b/unicode/src/screens/UScreenTop5.pas
@@ -57,7 +57,6 @@ type
constructor Create; override;
function ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean; override;
- function ParseMouse(MouseButton: integer; BtnDown: boolean; X, Y: integer): boolean; override;
procedure onShow; override;
function Draw: boolean; override;
end;
@@ -72,12 +71,10 @@ uses
UNote,
UUnicodeUtils;
-function TScreenTop5.ParseInput(PressedKey: cardinal;
- CharCode: UCS4Char;
- PressedDown: boolean): boolean;
+function TScreenTop5.ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean;
begin
Result := true;
- if PressedDown then
+ if (PressedDown) then
begin
// check normal keys
case UCS4UpperCase(CharCode) of
@@ -95,7 +92,7 @@ begin
SDLK_RETURN:
begin
if (not Fadeout) then
- begin
+ begin
FadeTo(@ScreenSong);
Fadeout := true;
end;
@@ -108,16 +105,6 @@ begin
end;
end;
-function TScreenTop5.ParseMouse(MouseButton: integer;
- BtnDown: boolean;
- X, Y: integer): boolean;
-begin
- Result := true;
- if (MouseButton = SDL_BUTTON_LEFT) and BtnDown then
- //left-click anywhere sends return
- ParseInput(SDLK_RETURN, 0, true);
-end;
-
constructor TScreenTop5.Create;
var
I: integer;
@@ -126,16 +113,19 @@ begin
LoadFromTheme(Theme.Top5);
- TextLevel := AddText(Theme.Top5.TextLevel);
+
+ TextLevel := AddText(Theme.Top5.TextLevel);
TextArtistTitle := AddText(Theme.Top5.TextArtistTitle);
for I := 0 to 4 do
- begin
- StaticNumber[I+1] := AddStatic(Theme.Top5.StaticNumber[I]);
- TextNumber[I+1] := AddText (Theme.Top5.TextNumber[I]);
- TextName[I+1] := AddText (Theme.Top5.TextName[I]);
- TextScore[I+1] := AddText (Theme.Top5.TextScore[I]);
- end;
+ StaticNumber[I+1] := AddStatic( Theme.Top5.StaticNumber[I] );
+
+ for I := 0 to 4 do
+ TextNumber[I+1] := AddText(Theme.Top5.TextNumber[I]);
+ for I := 0 to 4 do
+ TextName[I+1] := AddText(Theme.Top5.TextName[I]);
+ for I := 0 to 4 do
+ TextScore[I+1] := AddText(Theme.Top5.TextScore[I]);
end;
@@ -172,7 +162,7 @@ begin
Text[TextScore[I]].Text := IntToStr(CurrentSong.Score[Ini.Difficulty, I-1].Score);
end;
- for I := Length(CurrentSong.Score[Ini.Difficulty]) + 1 to 5 do
+ for I := Length(CurrentSong.Score[Ini.Difficulty])+1 to 5 do
begin
Static[StaticNumber[I]].Visible := false;
Text[TextNumber[I]].Visible := false;
diff --git a/unicode/src/screens/UScreenWelcome.pas b/unicode/src/screens/UScreenWelcome.pas
index b798629f..4df2b6f7 100644
--- a/unicode/src/screens/UScreenWelcome.pas
+++ b/unicode/src/screens/UScreenWelcome.pas
@@ -34,10 +34,7 @@ interface
{$I switches.inc}
uses
- UMenu,
- SDL,
- SysUtils,
- UThemes;
+ UMenu, SDL, SysUtils, UThemes;
type
TScreenWelcome = class(TMenu)
@@ -45,29 +42,24 @@ type
Animation: real;
Fadeout: boolean;
constructor Create; override;
- function ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean; override;
+ function ParseInput(PressedKey: Cardinal; CharCode: UCS4Char; PressedDown: Boolean): Boolean; override;
function Draw: boolean; override;
procedure onShow; override;
end;
implementation
-uses
- UGraphic,
- UTime,
- USkins,
- UTexture;
+uses UGraphic, UTime, USkins, UTexture;
-function TScreenWelcome.ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean;
+function TScreenWelcome.ParseInput(PressedKey: Cardinal; CharCode: UCS4Char; PressedDown: Boolean): Boolean;
begin
Result := true;
- if (PressedDown) then
- begin
+ If (PressedDown) Then begin
case PressedKey of
SDLK_ESCAPE,
SDLK_BACKSPACE :
begin
- Result := false;
+ Result := False;
end;
SDLK_RETURN:
begin
@@ -110,14 +102,12 @@ begin
// draw nothing
Min := 0; Max := 1000;
- if (Animation >= Min) and (Animation < Max) then
- begin
+ if (Animation >= Min) and (Animation < Max) then begin
end;
// popup
Min := 1000; Max := 1120;
- if (Animation >= Min) and (Animation < Max) then
- begin
+ if (Animation >= Min) and (Animation < Max) then begin
Factor := (Animation - Min) / (Max - Min);
Static[0].Texture.X := 600;
Static[0].Texture.Y := 600 - Factor * 230;
@@ -127,8 +117,7 @@ begin
// bounce
Min := 1120; Max := 1200;
- if (Animation >= Min) and (Animation < Max) then
- begin
+ if (Animation >= Min) and (Animation < Max) then begin
Factor := (Animation - Min) / (Max - Min);
Static[0].Texture.Y := 370 + Factor * 50;
Static[0].Texture.H := 230 - Factor * 50;
@@ -136,15 +125,14 @@ begin
// run
Min := 1500; Max := 3500;
- if (Animation >= Min) and (Animation < Max) then
- begin
+ if (Animation >= Min) and (Animation < Max) then begin
Factor := (Animation - Min) / (Max - Min);
Static[0].Texture.X := 600 - Factor * 1400;
Static[0].Texture.H := 180;
- for Count := 1 to 5 do
- begin
+
+ for Count := 1 to 5 do begin
Static[Count].Texture.X := 770 - Factor * 1400;
Static[Count].Texture.W := 150 + Factor * 200;
Static[Count].Texture.Alpha := Factor * 0.5;
@@ -152,8 +140,7 @@ begin
end;
Min := 3500;
- if (Animation >= Min) and (not Fadeout) then
- begin
+ if (Animation >= Min) and (not Fadeout) then begin
FadeTo(@ScreenMain);
Fadeout := true;
end;