aboutsummaryrefslogtreecommitdiffstats
path: root/Game
diff options
context:
space:
mode:
authorbrunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-12-14 16:26:07 +0000
committerbrunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-12-14 16:26:07 +0000
commita6a7f942525bd42aa3e59ef4dfac71493468b561 (patch)
tree7d1898ba32d5c82d6733ce66350462e705111113 /Game
parent89fdb71c854b2b5081e1cb5ec3e26e1bb93e3b60 (diff)
downloadusdx-a6a7f942525bd42aa3e59ef4dfac71493468b561.tar.gz
usdx-a6a7f942525bd42aa3e59ef4dfac71493468b561.tar.xz
usdx-a6a7f942525bd42aa3e59ef4dfac71493468b561.zip
- fixed perfect note effect for duets
- fixed sorting by year (wrong decade) - fixed double party score on last round - added shortcut to options screen "O" git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/1.0.1 Challenge MOD@2759 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game')
-rw-r--r--Game/Code/Classes/UDraw.pas5
-rw-r--r--Game/Code/Classes/UGraphicClasses.pas126
-rw-r--r--Game/Code/Classes/USongs.pas2
-rw-r--r--Game/Code/Screens/UScreenPartyScore.pas1
-rw-r--r--Game/Code/Screens/UScreenSing.pas6
-rw-r--r--Game/Code/Screens/UScreenSong.pas13
-rw-r--r--Game/Code/Screens/UScreenSongJumpto.pas31
-rw-r--r--Game/Code/UltraStar.dpr2
-rw-r--r--Game/Output/Changelog.german.txt4
-rw-r--r--Game/Output/Changelog.txt4
10 files changed, 116 insertions, 78 deletions
diff --git a/Game/Code/Classes/UDraw.pas b/Game/Code/Classes/UDraw.pas
index 90efe40e..11808614 100644
--- a/Game/Code/Classes/UDraw.pas
+++ b/Game/Code/Classes/UDraw.pas
@@ -464,9 +464,10 @@ begin
glTexCoord2f(Tex_Right[NrGracza+1].TexW, 0); glVertex2f(Rec.Right, Rec.Top);
glEnd;
- if Perfect and (Ini.EffectSing=1) then begin
+ if Perfect and (Ini.EffectSing=1) then
+ begin
if not (Start+Dlugosc-1 = Czas.AktBeatD) then
- GoldenRec.SavePerfectNotePos(Rec.Left, Rec.Top);
+ GoldenRec.SavePerfectNotePos(Rec.Left, Rec.Top, CP);
end;
end; // with
end; // for
diff --git a/Game/Code/Classes/UGraphicClasses.pas b/Game/Code/Classes/UGraphicClasses.pas
index 6f192af6..86cdd162 100644
--- a/Game/Code/Classes/UGraphicClasses.pas
+++ b/Game/Code/Classes/UGraphicClasses.pas
@@ -48,8 +48,9 @@ type
end;
PerfectNotePositions = Record
- xPos, yPos : Real;
- Screen : Integer;
+ xPos, yPos: real;
+ Screen: integer;
+ CP: integer;
end;
TEffectManager = Class
@@ -78,7 +79,7 @@ type
procedure KillAll();
procedure SentenceChange(CP: integer); //TODO!!!!
procedure SaveGoldenStarsRec(Xtop, Ytop, Xbottom, Ybottom: Real; CP: integer);
- procedure SavePerfectNotePos(Xtop, Ytop: Real);
+ procedure SavePerfectNotePos(Xtop, Ytop: Real; CP: integer);
procedure GoldenNoteTwinkle(Top,Bottom,Right: Real; Player: Integer; CP: Integer);
procedure SpawnPerfectLineTwinkle();
end;
@@ -411,7 +412,7 @@ Var
begin
//Spawn a random amount of stars within the given coordinates
//RandomRange(0,14) <- this one starts at a random frame, 16 is our last frame - would be senseless to start a particle with 16, cause it would be dead at the next frame
-for P:= 0 to high(RecArray) do
+ for P:= 0 to high(RecArray) do
begin
while (RecArray[P].TotalStarCount > RecArray[P].CurrentStarCount) do
begin
@@ -463,18 +464,47 @@ begin
end;
procedure TEffectManager.SentenceChange(CP: integer);
-var c: Cardinal;
+var
+ c: integer;
+ i: integer;
+
begin
c:=0;
while c <= High(Particle) do
begin
- if Particle[c].SurviveSentenceChange then
+ if Particle[c].SurviveSentenceChange or (Particle[c].CP <> CP) then
inc(c)
else
Kill(c);
end;
- SetLength(RecArray,0); // remove GoldenRec positions
- SetLength(PerfNoteArray,0); // remove PerfectNote positions
+
+ i := 0;
+ while i<=high(RecArray) do
+ begin
+ c := high(RecArray);
+ if (RecArray[i].CP = CP) then
+ begin
+ RecArray[i] := RecArray[c];
+ SetLength(RecArray, c);
+ end else
+ inc(i);
+ end;
+
+ i := 0;
+ while i<=high(PerfNoteArray) do
+ begin
+ c := high(PerfNoteArray);
+ if (PerfNoteArray[i].CP = CP) then
+ begin
+ PerfNoteArray[i] := PerfNoteArray[c];
+ SetLength(PerfNoteArray, c);
+ end else
+ inc(i);
+ end;
+
+ //SetLength(RecArray,0); // remove GoldenRec positions
+ //SetLength(PerfNoteArray,0); // remove PerfectNote positions
+
for c:=0 to 5 do
begin
TwinkleArray[c] := 0; // reset GoldenNoteHit memory
@@ -545,57 +575,59 @@ var
P : Integer; // P like used in Positions
NewIndex : Integer;
begin
- For P := 0 to high(RecArray) do // Do we already have that "new" position?
- begin
- if (ceil(RecArray[P].xTop) = ceil(Xtop)) and
+ for P := 0 to high(RecArray) do // Do we already have that "new" position?
+ begin
+ if (ceil(RecArray[P].xTop) = ceil(Xtop)) and
(ceil(RecArray[P].yTop) = ceil(Ytop)) and
(ScreenAct = RecArray[p].Screen) then
exit; // it's already in the array, so we don't have to create a new one
- end;
+ end;
// we got a new position, add the new positions to our array
- NewIndex := Length(RecArray);
- SetLength(RecArray, NewIndex + 1);
- RecArray[NewIndex].xTop := Xtop;
- RecArray[NewIndex].yTop := Ytop;
- RecArray[NewIndex].xBottom := Xbottom;
- RecArray[NewIndex].yBottom := Ybottom;
- RecArray[NewIndex].TotalStarCount := ceil(Xbottom - Xtop) div 12 + 3;
- RecArray[NewIndex].CurrentStarCount := 0;
- RecArray[NewIndex].Screen := ScreenAct;
- RecArray[NewIndex].CP := CP;
+ NewIndex := Length(RecArray);
+ SetLength(RecArray, NewIndex + 1);
+ RecArray[NewIndex].xTop := Xtop;
+ RecArray[NewIndex].yTop := Ytop;
+ RecArray[NewIndex].xBottom := Xbottom;
+ RecArray[NewIndex].yBottom := Ybottom;
+ RecArray[NewIndex].TotalStarCount := ceil(Xbottom - Xtop) div 12 + 3;
+ RecArray[NewIndex].CurrentStarCount := 0;
+ RecArray[NewIndex].Screen := ScreenAct;
+ RecArray[NewIndex].CP := CP;
end;
-procedure TEffectManager.SavePerfectNotePos(Xtop, Ytop: Real);
+procedure TEffectManager.SavePerfectNotePos(Xtop, Ytop: Real; CP: integer);
var
P : Integer; // P like used in Positions
NewIndex : Integer;
RandomFrame : Integer;
Xkatze, Ykatze : Integer;
begin
- For P := 0 to high(PerfNoteArray) do // Do we already have that "new" position?
+ for P := 0 to high(PerfNoteArray) do // Do we already have that "new" position?
+ begin
+ with PerfNoteArray[P] do
begin
- with PerfNoteArray[P] do
if (ceil(xPos) = ceil(Xtop)) and (ceil(yPos) = ceil(Ytop)) and
- (Screen = ScreenAct) then
+ (Screen = ScreenAct) then
exit; // it's already in the array, so we don't have to create a new one
- end; //for
+ end;
+ end; //for
// we got a new position, add the new positions to our array
- NewIndex := Length(PerfNoteArray);
- SetLength(PerfNoteArray, NewIndex + 1);
- PerfNoteArray[NewIndex].xPos := Xtop;
- PerfNoteArray[NewIndex].yPos := Ytop;
- PerfNoteArray[NewIndex].Screen := ScreenAct;
-
- for P:= 0 to 2 do
- begin
- Xkatze := RandomRange(ceil(Xtop) - 5 , ceil(Xtop) + 10);
- Ykatze := RandomRange(ceil(Ytop) - 5 , ceil(Ytop) + 10);
- RandomFrame := RandomRange(0,14);
- Spawn(Xkatze, Ykatze, ScreenAct, 16 - RandomFrame, RandomFrame, -1, PerfectNote, 0, 0);
- end; //for
-
+ NewIndex := Length(PerfNoteArray);
+ SetLength(PerfNoteArray, NewIndex + 1);
+ PerfNoteArray[NewIndex].xPos := Xtop;
+ PerfNoteArray[NewIndex].yPos := Ytop;
+ PerfNoteArray[NewIndex].Screen := ScreenAct;
+ PerfNoteArray[NewIndex].CP := CP;
+
+ for P:= 0 to 2 do
+ begin
+ Xkatze := RandomRange(ceil(Xtop) - 5 , ceil(Xtop) + 10);
+ Ykatze := RandomRange(ceil(Ytop) - 5 , ceil(Ytop) + 10);
+ RandomFrame := RandomRange(0,14);
+ Spawn(Xkatze, Ykatze, ScreenAct, 16 - RandomFrame, RandomFrame, -1, PerfectNote, 0, CP);
+ end; //for
end;
procedure TEffectManager.SpawnPerfectLineTwinkle();
@@ -603,8 +635,8 @@ var
P,I,Life: Cardinal;
Left, Right, Top, Bottom: Cardinal;
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
@@ -683,24 +715,24 @@ begin
begin
Life:=RandomRange(8,16);
if not P4Mode then
- Spawn(RandomRange(Left,Right), RandomRange(Top,Bottom), cScreen, Life, 16-Life, -1, PerfectLineTwinkle, P, (P+1) mod 2)
+ Spawn(RandomRange(Left,Right), RandomRange(Top,Bottom), cScreen, Life, 16-Life, -1, PerfectLineTwinkle, P, P 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);
+ Spawn(RandomRange(Left,Right), RandomRange(Top,Bottom), cScreen, Life, 16-Life, -1, PerfectLineTwinkle, P, P mod 2);
2,3:
- Spawn(RandomRange(Left+400,Right+400), RandomRange(Top,Bottom), cScreen, Life, 16-Life, -1, PerfectLineTwinkle, P, (P+1) mod 2);
+ Spawn(RandomRange(Left+400,Right+400), RandomRange(Top,Bottom), cScreen, Life, 16-Life, -1, PerfectLineTwinkle, P, P 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);
+ Spawn(RandomRange(Left,Right), RandomRange(Top,Bottom), cScreen, Life, 16-Life, -1, PerfectLineTwinkle, P, P 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);
+ Spawn(RandomRange(Left+400,Right+400), RandomRange(Top,Bottom), cScreen, Life, 16-Life, -1, PerfectLineTwinkle, P, P mod 2);
end;
end;
end;
diff --git a/Game/Code/Classes/USongs.pas b/Game/Code/Classes/USongs.pas
index f21deb69..593c4943 100644
--- a/Game/Code/Classes/USongs.pas
+++ b/Game/Code/Classes/USongs.pas
@@ -776,7 +776,7 @@ begin
begin
I := Songs.SongSort[S].Year;
if (I <> -1) then
- tempstr := IntToStr(Round(I/10)*10) + '-' + IntToStr(Round(I/10)*10+9)
+ tempstr := IntToStr(Trunc(I/10)*10) + '-' + IntToStr(Trunc(I/10)*10+9)
else
tempstr := 'undefined';
diff --git a/Game/Code/Screens/UScreenPartyScore.pas b/Game/Code/Screens/UScreenPartyScore.pas
index 01a4349e..d7acb33c 100644
--- a/Game/Code/Screens/UScreenPartyScore.pas
+++ b/Game/Code/Screens/UScreenPartyScore.pas
@@ -117,7 +117,6 @@ begin
FadeTo(@ScreenPartyNewRound)
else
begin
- PartySession.EndRound;
FadeTo(@ScreenPartyWin);
end;
Fadeout := true;
diff --git a/Game/Code/Screens/UScreenSing.pas b/Game/Code/Screens/UScreenSing.pas
index 70da386b..c15b0f85 100644
--- a/Game/Code/Screens/UScreenSing.pas
+++ b/Game/Code/Screens/UScreenSing.pas
@@ -221,9 +221,9 @@ begin
SDLK_N:
begin
- if (ScreenSong.Mode <> smNormal) then
+ if (ScreenSong.Mode <> smNormal) and (ScreenSong.Mode <> smMedley)then
Exit;
-
+
Inc(ShowNotes);
if (ShowNotes>4) then
ShowNotes:=0;
@@ -283,7 +283,7 @@ begin
SDLK_S:
begin
- if (ScreenSong.Mode = smNormal) then
+ if (ScreenSong.Mode = smNormal) or (ScreenSong.Mode = smMedley) then
Ini.PossibleScore := (Ini.PossibleScore+1) mod 4;
//Ini.Save;
end;
diff --git a/Game/Code/Screens/UScreenSong.pas b/Game/Code/Screens/UScreenSong.pas
index 9cc87a41..157eed41 100644
--- a/Game/Code/Screens/UScreenSong.pas
+++ b/Game/Code/Screens/UScreenSong.pas
@@ -515,6 +515,19 @@ begin
else
Music.EnableVocalRemover;
end;
+
+ SDLK_O:
+ begin
+ if (Mode = smNormal) then
+ begin
+ Music.Stop;
+ Music.PlayBack;
+ acClose;
+
+ FadeTo(@ScreenOptions);
+ FadeOut := true;
+ end;
+ end;
SDLK_A:
begin
diff --git a/Game/Code/Screens/UScreenSongJumpto.pas b/Game/Code/Screens/UScreenSongJumpto.pas
index b210dd7e..4c84f67c 100644
--- a/Game/Code/Screens/UScreenSongJumpto.pas
+++ b/Game/Code/Screens/UScreenSongJumpto.pas
@@ -47,26 +47,23 @@ uses UGraphic, UHelp, UMain, UIni, UTexture, ULanguage, UParty, USongs, UScreenS
function TScreenSongJumpto.ParseInput(PressedKey: Cardinal; ScanCode: byte; PressedDown: Boolean): Boolean;
begin
Result := true;
+
+ if not (ScanCode in [0..31, 127..159]) then
+ begin
+ if not isDuet then
+ begin
+ if Interaction = 0 then
+ begin
+ Button[0].Text[0].Text := Button[0].Text[0].Text + chr(ScanCode);
+ SetTextFound(CatSongs.SetFilter(Button[0].Text[0].Text, SelectType));
+ end;
+ end;
+ Exit;
+ end;
+
If (PressedDown) Then
begin // Key Down
case PressedKey of
- SDLK_0..SDLK_9, SDLK_A..SDLK_Z,
- SDLK_SPACE, SDLK_MINUS, SDLK_EXCLAIM,
- SDLK_COMMA, SDLK_SLASH, SDLK_ASTERISK,
- SDLK_QUESTION, SDLK_QUOTE, SDLK_QUOTEDBL,
- SDLK_LEFTBRACKET, SDLK_SEMICOLON,
- SDLK_PERIOD:
- begin
- if not isDuet then
- begin
- if Interaction = 0 then
- begin
- Button[0].Text[0].Text := Button[0].Text[0].Text + chr(ScanCode);
- SetTextFound(CatSongs.SetFilter(Button[0].Text[0].Text, SelectType));
- end;
- end;
- end;
-
//MP3-Volume Up
SDLK_PAGEUP:
begin
diff --git a/Game/Code/UltraStar.dpr b/Game/Code/UltraStar.dpr
index ab4559d0..989508f4 100644
--- a/Game/Code/UltraStar.dpr
+++ b/Game/Code/UltraStar.dpr
@@ -122,7 +122,7 @@ uses
UVideo in 'Classes\UVideo.pas';
const
- Version = 'UltraStar Deluxe Challenge, Medley & Duet Edition r9 RC9';
+ Version = 'UltraStar Deluxe Challenge, Medley & Duet Edition r9';
var
WndTitle: string;
diff --git a/Game/Output/Changelog.german.txt b/Game/Output/Changelog.german.txt
index f57d0d32..b77cb934 100644
--- a/Game/Output/Changelog.german.txt
+++ b/Game/Output/Changelog.german.txt
@@ -1,4 +1,4 @@
-Ultrastar Deluxe Challenge, Medley & Duet Edition r9 RC9 vom 24.11.2010
+Ultrastar Deluxe Challenge, Medley & Duet Edition r9 vom 30.11.2010
-----------------------------
New: (Allgemein) Mehrere Song-Ordner werden unterstützt (wie bei der 1.1).
New: (Allgemein) Die Anzahl der Spieler kann bei der Namenseingabe mit Shift+Hoch/Runter angepasst werden.
@@ -6,8 +6,6 @@ New: (Allgemein) Sortierung nach Jahr (pro Dekade).
Upd: (Allgemein) Mit N kann man nun auch die Lyrics ausblenden.
Upd: (Editor) Man kann nun zwischen zwei Spuren bei Duetten hin- und herkopieren (wenn es passt).
-Ultrastar Deluxe Challenge, Medley & Duet Edition r9 RC7.2 vom 07.11.2010
------------------------------
New: (Allgemein) DUETT-Support! Song-Syntax wie von hawkear vorgeschlagen, allerdings auf 2 Stimmen begrenzt. Im Editor können die Lieder erstellt/geändert werden.
New: (Allgemein) Webcam-Support
New: (Allgemein) Neue Fonts (höhere Auflösung)
diff --git a/Game/Output/Changelog.txt b/Game/Output/Changelog.txt
index 21510ad6..c35f5dfd 100644
--- a/Game/Output/Changelog.txt
+++ b/Game/Output/Changelog.txt
@@ -1,4 +1,4 @@
-Ultrastar Deluxe Challenge, Medley & Duet Edition r9 RC9 (24.11.2010)
+Ultrastar Deluxe Challenge, Medley & Duet Edition r9 (30.11.2010)
-----------------------------
New: (General) Support for more than one song folder (like in 1.1).
New: (General) Adjust number of players in name screen with SHIFT+UP/DOWN.
@@ -6,8 +6,6 @@ New: (General) Sort by Year (by decade).
Upd: (General) Disable lyrics with "N".
Upd: (Editor) Copy or move lines between duet tracks.
-Ultrastar Deluxe Challenge, Medley & Duet Edition r9 RC7.2 (07.11.2010)
------------------------------
New: (General) DUET support! Song syntax as proposed by hawkear, however, limited to 2 parts. Duet songs can be created and edited in the editor.
New: (General) Webcam support.
New: (General) New Fonst (higher resolution)