aboutsummaryrefslogtreecommitdiffstats
path: root/Game
diff options
context:
space:
mode:
authormogguh <mogguh@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-03-22 22:10:33 +0000
committermogguh <mogguh@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-03-22 22:10:33 +0000
commit07174bc088f8b14203a1417e7ffe0cc8a8be5e73 (patch)
treefac6d696f5a4223d6b83f96ae14f398bf3d36e37 /Game
parentc33620b856f5106ba95638106c5a55ff88e5290c (diff)
downloadusdx-07174bc088f8b14203a1417e7ffe0cc8a8be5e73.tar.gz
usdx-07174bc088f8b14203a1417e7ffe0cc8a8be5e73.tar.xz
usdx-07174bc088f8b14203a1417e7ffe0cc8a8be5e73.zip
Added new texture for perfect sung note (formerly NoteStar), now named NotePerfectStar (view skin: W&C.ini). NoteStar is now used for golden notes.
There's also a difference in drawing both, PerfectNoteStar is bigger, and drawn in white - whereas GoldenNotes are smaller and yellow. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@17 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game')
-rw-r--r--Game/Code/Classes/UDraw.pas15
-rw-r--r--Game/Code/Classes/UGraphic.pas3
-rw-r--r--Game/Code/Classes/UGraphicClasses.pas43
3 files changed, 40 insertions, 21 deletions
diff --git a/Game/Code/Classes/UDraw.pas b/Game/Code/Classes/UDraw.pas
index 31291788..2e742172 100644
--- a/Game/Code/Classes/UDraw.pas
+++ b/Game/Code/Classes/UDraw.pas
@@ -12,9 +12,10 @@ procedure SingDrawBeatDelimeters(Left, Top, Right: real; NrCzesci: integer);
procedure SingDrawCzesc(Left, Top, Right: real; NrCzesci: integer; Space: integer);
procedure SingDrawPlayerCzesc(X, Y, W: real; NrGracza: integer; Space: integer);
procedure SingDrawPlayerBGCzesc(Left, Top, Right: real; NrCzesci, NrGracza: integer; Space: integer);
+{ for no use since we have UGraphicClasses
procedure SingDrawStar(X, Y, A: real);
procedure SingGoldenStar(X, Y, A: real);
-
+}
// The Singbar
procedure SingDrawSingbar(X, Y, W, H: real; Percent: integer);
@@ -381,8 +382,8 @@ var
//inc(Starfr);
//Starfr := Starfr mod 128;
-
- SingDrawStar(Rec.Left+2, Rec.Top+4, A);
+ GoldenRec.SavePerfectNotePos(Rec.Left, Rec.Top);
+ { SingDrawStar(Rec.Left+2, Rec.Top+4, A);}
end;
// detekt
@@ -500,6 +501,7 @@ begin
end;
end;
+{not used anymore tough we have UGraphicClasses
procedure SingDrawStar(X, Y, A: real);
var
TempR: real;
@@ -509,7 +511,7 @@ var
W := 32;
H := 32;
- // Golden Star Patch
+// Golden Star Patch
// case Z of
// 1: glColor4f(1, 1, 1, A);
// 2: glColor4f(1, 1, 0.3, A);
@@ -530,8 +532,9 @@ var
glTexCoord2f((1/16) * Starframe, 1); glVertex2f(X+W, Y-H);
glEnd;
end;
+}
-
+{not used anymore tough we have UGraphicClasses
procedure SingGoldenStar(X, Y, A: real);
var
TempR: real;
@@ -554,7 +557,7 @@ var
glTexCoord2f((1/16) * StarfrG2, 1); glVertex2f(X+W, Y-H);
glEnd;
end;
-
+}
procedure SingDraw;
var
diff --git a/Game/Code/Classes/UGraphic.pas b/Game/Code/Classes/UGraphic.pas
index 05a9fda7..8238eace 100644
--- a/Game/Code/Classes/UGraphic.pas
+++ b/Game/Code/Classes/UGraphic.pas
@@ -70,6 +70,8 @@ var
Tex_BG_Right: array[1..6] of TTexture;
Tex_Note_Star: TTexture;
+ Tex_Note_Perfect_Star: TTexture;
+
Tex_Ball: TTexture;
FullScreen: boolean;
@@ -186,6 +188,7 @@ begin
Tex_BG_Right[P] := Texture.LoadTexture(pchar(Skin.GetTextureFileName('NoteBGRight')), 'BMP', 'Alpha Black Colored', Col);
end;
+ Tex_Note_Perfect_Star := Texture.LoadTexture(pchar(Skin.GetTextureFileName('NotePerfectStar')), 'JPG', 'Font Black', 0);
Tex_Note_Star := Texture.LoadTexture(pchar(Skin.GetTextureFileName('NoteStar')), 'JPG', 'Font Black', 0);
Tex_Ball := Texture.LoadTexture(pchar(Skin.GetTextureFileName('Ball')), 'BMP', 'Transparent', $FF00FF);
diff --git a/Game/Code/Classes/UGraphicClasses.pas b/Game/Code/Classes/UGraphicClasses.pas
index d66bd142..6c131b50 100644
--- a/Game/Code/Classes/UGraphicClasses.pas
+++ b/Game/Code/Classes/UGraphicClasses.pas
@@ -8,9 +8,10 @@ type
Frame : Byte; //act. Frame
Tex : Cardinal; //Tex num from Textur Manager
Live : Byte; //How many Cycles before Kill
- RecIndex : Integer; //To which rectangle belongs this particle
+ RecIndex : Integer; //To which rectangle this particle belongs
+ StarType : Integer; // 1: GoldenNote | 2: PerfectNote
- Constructor Create(cX,cY: Real; cTex: Cardinal; cLive: Byte; cFrame : integer; RecArrayIndex : Integer);
+ Constructor Create(cX,cY: Real; cTex: Cardinal; cLive: Byte; cFrame : integer; cRecArrayIndex : Integer; cStarType : Integer);
procedure Draw;
end;
@@ -32,7 +33,7 @@ type
constructor Create;
procedure Draw;
- function Spawn(X, Y: Real; Tex: Cardinal; Live: Byte; StartFrame : Integer; RecArrayIndex : Integer): Cardinal;
+ function Spawn(X, Y: Real; Tex: Cardinal; Live: Byte; StartFrame : Integer; RecArrayIndex : Integer; StarType : Integer): Cardinal;
procedure SpawnRec();
procedure Kill(index: Cardinal);
procedure KillAll();
@@ -47,14 +48,15 @@ implementation
uses sysutils, Windows,OpenGl12, UThemes, USkins, UGraphic, UDrawTexture, UTexture, math, dialogs;
//TParticle
-Constructor TParticle.Create(cX,cY: Real; cTex: Cardinal; cLive: Byte; cFrame : integer; RecArrayIndex : Integer);
+Constructor TParticle.Create(cX,cY: Real; cTex: Cardinal; cLive: Byte; cFrame : integer; cRecArrayIndex : Integer; cStarType : Integer);
begin
X := cX;
Y := cY;
Tex := cTex;
Live := cLive;
Frame:= cFrame;
- RecIndex := RecArrayIndex;
+ RecIndex := cRecArrayIndex;
+ StarType := cStarType;
end;
@@ -63,16 +65,27 @@ var
W, H: real;
Alpha : real;
begin
- W := 20;
- H := 20;
-
Alpha := (-cos((Frame+1)*2*pi/16)+1); //Fade Eyecandy
- glColor4f(0.99, 1, 0.6, Alpha);
+ Case StarType of
+ 1:
+ begin
+ W := 20;
+ H := 20;
+ glColor4f(0.99, 1, 0.6, Alpha);
+ end;
+ 2:
+ begin
+ W := 30;
+ H := 30;
+ glColor4f(1, 1, 0.95, Alpha);
+ end;
+ end;
+
glEnable(GL_TEXTURE_2D);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- glBindTexture(GL_TEXTURE_2D, Tex_Note_Star.TexNum);
+ glBindTexture(GL_TEXTURE_2D, Tex);
begin
glBegin(GL_QUADS);
@@ -139,11 +152,11 @@ begin
end;
-function TEffectManager.Spawn(X, Y: Real; Tex: Cardinal; Live: Byte; StartFrame : Integer; RecArrayIndex : Integer): Cardinal;
+function TEffectManager.Spawn(X, Y: Real; Tex: Cardinal; Live: Byte; StartFrame : Integer; RecArrayIndex : Integer; StarType : Integer): Cardinal;
begin
Result := Length(Particle);
SetLength(Particle, (Result + 1));
- Particle[Result] := TParticle.Create(X, Y, Tex, Live, StartFrame, RecArrayIndex);
+ Particle[Result] := TParticle.Create(X, Y, Tex, Live, StartFrame, RecArrayIndex, StarType);
end;
@@ -162,7 +175,7 @@ for P:= 0 to high(RecArray) do
Xkatze := RandomRange(Ceil(RecArray[P].xTop), Ceil(RecArray[P].xBottom));
Ykatze := RandomRange(Ceil(RecArray[P].yTop), Ceil(RecArray[P].yBottom));
RandomFrame := RandomRange(0,14);
- Spawn(Xkatze, Ykatze, Tex_Note_Star.TexNum, 16 - RandomFrame, RandomFrame, P);
+ Spawn(Xkatze, Ykatze, Tex_Note_Star.TexNum, 16 - RandomFrame, RandomFrame, P, 1);
inc(RecArray[P].CurrentStarCount);
end;
end;
@@ -183,7 +196,7 @@ for P:= 0 to 2 do
Xkatze := RandomRange(ceil(xPos) - 5 , ceil(xPos) + 10);
Ykatze := RandomRange(ceil(yPos) - 5 , ceil(yPos) + 10);
RandomFrame := RandomRange(0,14);
- Spawn(Xkatze, Ykatze, Tex_Note_Star.TexNum, 16 - RandomFrame, RandomFrame, -1);
+ Spawn(Xkatze, Ykatze, Tex_Note_Star.TexNum, 16 - RandomFrame, RandomFrame, -1, 2);
end;
draw;
end;
@@ -265,7 +278,7 @@ begin
Xkatze := RandomRange(ceil(Xtop) - 5 , ceil(Xtop) + 10);
Ykatze := RandomRange(ceil(Ytop) - 5 , ceil(Ytop) + 10);
RandomFrame := RandomRange(0,14);
- Spawn(Xkatze, Ykatze, Tex_Note_Star.TexNum, 16 - RandomFrame, RandomFrame, -1);
+ Spawn(Xkatze, Ykatze, Tex_Note_Perfect_Star.TexNum, 16 - RandomFrame, RandomFrame, -1, 2);
end;
end;