From 07174bc088f8b14203a1417e7ffe0cc8a8be5e73 Mon Sep 17 00:00:00 2001 From: mogguh Date: Thu, 22 Mar 2007 22:10:33 +0000 Subject: 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 --- Game/Code/Classes/UDraw.pas | 15 +++++++----- Game/Code/Classes/UGraphic.pas | 3 +++ Game/Code/Classes/UGraphicClasses.pas | 43 ++++++++++++++++++++++------------ Skins/Deluxe/Note Star.jpg | Bin 20091 -> 22332 bytes Skins/Deluxe/NotePerfectStar.jpg | Bin 0 -> 27633 bytes Skins/Deluxe/W&C.ini | 1 + 6 files changed, 41 insertions(+), 21 deletions(-) create mode 100644 Skins/Deluxe/NotePerfectStar.jpg 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; diff --git a/Skins/Deluxe/Note Star.jpg b/Skins/Deluxe/Note Star.jpg index dcdd805c..1ef6243d 100644 Binary files a/Skins/Deluxe/Note Star.jpg and b/Skins/Deluxe/Note Star.jpg differ diff --git a/Skins/Deluxe/NotePerfectStar.jpg b/Skins/Deluxe/NotePerfectStar.jpg new file mode 100644 index 00000000..189a22a3 Binary files /dev/null and b/Skins/Deluxe/NotePerfectStar.jpg differ diff --git a/Skins/Deluxe/W&C.ini b/Skins/Deluxe/W&C.ini index 2adfce3b..992ab1dc 100644 --- a/Skins/Deluxe/W&C.ini +++ b/Skins/Deluxe/W&C.ini @@ -16,6 +16,7 @@ NoteBGLeft=Note BG Left.bmp NoteBGMid=Note BG Mid.bmp NoteBGRight=Note BG Right.bmp NoteStar=Note Star.jpg +NotePerfectStar=NotePerfectStar.jpg Ball=Ball.bmp SongCover=Song Cover.jpg -- cgit v1.2.3