aboutsummaryrefslogtreecommitdiffstats
path: root/src/base/UGraphicClasses.pas
diff options
context:
space:
mode:
authork-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c>2016-01-01 22:53:55 +0000
committerk-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c>2016-01-01 22:53:55 +0000
commit9f1d6ca324242597369ac41c6f9fb29cb4aace1b (patch)
treeeb48d99b35888e3a0d043a5878280d42f34f512c /src/base/UGraphicClasses.pas
parent3544189cdf2cb38a3446ae968d9024406fcabe2a (diff)
downloadusdx-9f1d6ca324242597369ac41c6f9fb29cb4aace1b.tar.gz
usdx-9f1d6ca324242597369ac41c6f9fb29cb4aace1b.tar.xz
usdx-9f1d6ca324242597369ac41c6f9fb29cb4aace1b.zip
mainly change sentence-related stuff
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@3161 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'src/base/UGraphicClasses.pas')
-rw-r--r--src/base/UGraphicClasses.pas83
1 files changed, 70 insertions, 13 deletions
diff --git a/src/base/UGraphicClasses.pas b/src/base/UGraphicClasses.pas
index 3e2ed642..9d19a214 100644
--- a/src/base/UGraphicClasses.pas
+++ b/src/base/UGraphicClasses.pas
@@ -65,12 +65,12 @@ type
SurviveSentenceChange : Boolean;
constructor Create(cX, cY : real;
- cScreen : integer;
- cLive : byte;
- cFrame : integer;
- cRecArrayIndex : integer;
- cStarType : TParticleType;
- Player : cardinal);
+ cScreen : integer;
+ cLive : byte;
+ cFrame : integer;
+ cRecArrayIndex : integer;
+ cStarType : TParticleType;
+ Player : cardinal);
destructor Destroy(); override;
procedure Draw;
procedure LiveOn;
@@ -111,7 +111,7 @@ type
procedure SpawnRec();
procedure Kill(index: cardinal);
procedure KillAll();
- procedure SentenceChange();
+ procedure SentenceChange(CP: integer);
procedure SaveGoldenStarsRec(Xtop, Ytop, Xbottom, Ybottom: real);
procedure SavePerfectNotePos(Xtop, Ytop: real);
procedure GoldenNoteTwinkle(Top, Bottom, Right: real; Player: integer);
@@ -356,6 +356,11 @@ procedure TParticle.Draw;
var
L: cardinal;
begin
+ { if screens = 2 and playerplay <= 3 the 2nd screen shows the
+ textures of screen 1 }
+ if (Screens = 2) and (PlayersPlay <= 3) then
+ ScreenAct := 1;
+
if (ScreenAct = Screen) then
begin
glEnable(GL_TEXTURE_2D);
@@ -511,9 +516,10 @@ begin
end;
end;
-procedure TEffectManager.SentenceChange();
+procedure TEffectManager.SentenceChange(CP: integer);
var
c: cardinal;
+ p: integer;
begin
c := 0;
while c <= High(Particle) do
@@ -527,7 +533,8 @@ begin
SetLength(PerfNoteArray,0); // remove PerfectNote positions
for c := 0 to 5 do
begin
- TwinkleArray[c] := 0; // reset GoldenNoteHit memory
+ if ((c mod 2) = CP) then
+ TwinkleArray[c] := 0; // reset GoldenNoteHit memory
end;
end;
@@ -651,7 +658,7 @@ procedure TEffectManager.SpawnPerfectLineTwinkle();
var
P, I, Life: cardinal;
Left, Right, Top, Bottom: cardinal;
- cScreen: integer;
+ cScreen, Nstars: integer;
begin
// calculation of coordinates done with hardcoded values like in UDraw.pas
// might need to be adjusted if drawing of SingScreen is modified
@@ -665,10 +672,43 @@ begin
Left := 30;
end;
Right := 770;
+
// spawn effect for every player with a perfect line
for P := 0 to PlayersPlay-1 do
if Player[P].LastSentencePerfect then
begin
+ // 3 and 6 players in 1 screen
+ if (Ini.Screens = 0) then
+ begin
+ if (PlayersPlay = 4) then
+ begin
+ if (P <= 1) then
+ begin
+ Left := 30;
+ Right := 385;
+ end
+ else
+ begin
+ Left := 415;
+ Right := 770;
+ end;
+ end;
+
+ if (PlayersPlay = 6) then
+ begin
+ if (P <= 2) then
+ begin
+ Left := 30;
+ Right := 385;
+ end
+ else
+ begin
+ Left := 415;
+ Right := 770;
+ end;
+ end;
+ end;
+
// calculate area where notes of this player are drawn
case PlayersPlay of
1: begin
@@ -689,7 +729,13 @@ begin
end;
case P of
0,1: cScreen := 1;
- else cScreen := 2;
+ else
+ begin
+ if (Ini.Screens = 1) then
+ cScreen := 2
+ else
+ cScreen := 1;
+ end;
end;
end;
3,6: begin
@@ -709,12 +755,23 @@ begin
end;
case P of
0,1,2: cScreen := 1;
- else cScreen := 2;
+ else
+ begin
+ if (Ini.Screens = 1) then
+ cScreen := 2
+ else
+ cScreen := 1;
+ end;
end;
end;
end;
+
// spawn Sparkling Stars inside calculated coordinates
- for I := 0 to 80 do
+ Nstars := 80;
+ if (Ini.Screens = 0) and (PlayersPlay > 3) then
+ Nstars := 40;
+
+ for I := 0 to Nstars do
begin
Life := RandomRange(8,16);
Spawn(RandomRange(Left,Right), RandomRange(Top,Bottom), cScreen, Life, 16-Life, -1, PerfectLineTwinkle, P);