aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Classes/UGraphicClasses.pas
diff options
context:
space:
mode:
authorbrunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-10-05 18:28:42 +0000
committerbrunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-10-05 18:28:42 +0000
commit65ddad359ed3b9b739215ec89a7645455ae10dce (patch)
tree7fdc703f290b37e68ce0e6a2c56d5bdd2f7ee07b /Game/Code/Classes/UGraphicClasses.pas
parentdbe444f87b85da27a37f38e80bfd540178b8dde0 (diff)
downloadusdx-65ddad359ed3b9b739215ec89a7645455ae10dce.tar.gz
usdx-65ddad359ed3b9b739215ec89a7645455ae10dce.tar.xz
usdx-65ddad359ed3b9b739215ec89a7645455ae10dce.zip
- added webcam support
- faster program start - faster sorting (mergesort) - sync lyrics to music - some new backgrounds and credits graphics (thx to MezzoX) - own thread for video decoding - finished 6-Player-on-one-screen-mode - changqed player-colors - fixed some bugs... git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/1.0.1 Challenge MOD@2637 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game/Code/Classes/UGraphicClasses.pas')
-rw-r--r--Game/Code/Classes/UGraphicClasses.pas55
1 files changed, 44 insertions, 11 deletions
diff --git a/Game/Code/Classes/UGraphicClasses.pas b/Game/Code/Classes/UGraphicClasses.pas
index ac19af6c..d9aeb227 100644
--- a/Game/Code/Classes/UGraphicClasses.pas
+++ b/Game/Code/Classes/UGraphicClasses.pas
@@ -595,9 +595,11 @@ end;
procedure TEffectManager.SpawnPerfectLineTwinkle();
var
- P,I,Life: Cardinal;
+ P,I,Life: Cardinal;
Left, Right, Top, Bottom: Cardinal;
- cScreen: Integer;
+ cScreen: Integer;
+
+ P4Mode: boolean;
begin
// calculation of coordinates done with hardcoded values like in UDraw.pas
// might need to be adjusted if drawing of SingScreen is modified
@@ -607,10 +609,12 @@ begin
begin
Left := 30;
Right := 770;
+ P4Mode := false;
end else
begin
Left := 15;
Right := 385;
+ P4Mode := true;
end;
// spawn effect for every player with a perfect line
@@ -635,10 +639,14 @@ begin
Top:=Bottom-105;
end;
end;
- case P of
- 0,1: cScreen:=1;
- else cScreen:=2;
- end;
+ if not P4Mode then
+ begin
+ case P of
+ 0,1: cScreen:=1;
+ else cScreen:=2;
+ end;
+ end else
+ cScreen := 1;
end;
3,6: begin
case P of
@@ -655,17 +663,42 @@ begin
Bottom:=Top+85;
end;
end;
- case P of
- 0,1,2: cScreen:=1;
- else cScreen:=2;
- end;
+ if not P4Mode then
+ begin
+ case P of
+ 0,1,2: cScreen:=1;
+ else cScreen:=2;
+ end;
+ end else
+ cScreen:=1;
end;
end;
// spawn Sparkling Stars inside calculated coordinates
for I:= 0 to 80 do
begin
Life:=RandomRange(8,16);
- Spawn(RandomRange(Left,Right), RandomRange(Top,Bottom), cScreen, Life, 16-Life, -1, PerfectLineTwinkle, P, (P+1) mod 2);
+ if not P4Mode then
+ Spawn(RandomRange(Left,Right), RandomRange(Top,Bottom), cScreen, Life, 16-Life, -1, PerfectLineTwinkle, P, (P+1) mod 2)
+ else
+ begin
+ if PlayersPlay=4 then
+ begin
+ case P of
+ 0,1:
+ Spawn(RandomRange(Left,Right), RandomRange(Top,Bottom), cScreen, Life, 16-Life, -1, PerfectLineTwinkle, P, (P+1) mod 2);
+ 2,3:
+ Spawn(RandomRange(Left+400,Right+400), RandomRange(Top,Bottom), cScreen, Life, 16-Life, -1, PerfectLineTwinkle, P, (P+1) mod 2);
+ end;
+ end else
+ begin
+ case P of
+ 0,1,2:
+ Spawn(RandomRange(Left,Right), RandomRange(Top,Bottom), cScreen, Life, 16-Life, -1, PerfectLineTwinkle, P, (P+1) mod 2);
+ 3,4,5:
+ Spawn(RandomRange(Left+400,Right+400), RandomRange(Top,Bottom), cScreen, Life, 16-Life, -1, PerfectLineTwinkle, P, (P+1) mod 2);
+ end;
+ end;
+ end;
end;
end;
end;