aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Classes
diff options
context:
space:
mode:
Diffstat (limited to 'Game/Code/Classes')
-rw-r--r--Game/Code/Classes/UIni.pas13
-rw-r--r--Game/Code/Classes/UParty.pas41
-rw-r--r--Game/Code/Classes/UVideo.pas4
3 files changed, 51 insertions, 7 deletions
diff --git a/Game/Code/Classes/UIni.pas b/Game/Code/Classes/UIni.pas
index df291ec3..e5891f58 100644
--- a/Game/Code/Classes/UIni.pas
+++ b/Game/Code/Classes/UIni.pas
@@ -23,6 +23,7 @@ type
Sorting: integer;
Debug: integer;
LoadFaultySongs:integer;
+ NewPartyPoints: integer;
// Graphics
Screens: integer;
@@ -122,6 +123,7 @@ const
IDebug: array[0..1] of string = ('Off', 'On');
ILoadFaultySongs: array[0..1] of string = ('Off', 'On');
+ INewPartyPoints: array[0..1] of string = ('Off', 'On');
IScreens: array[0..1] of string = ('1', '2');
IFullScreen: array[0..1] of string = ('Off', 'On');
@@ -257,6 +259,11 @@ begin
for Pet := 0 to High(ILoadFaultySongs) do
if Tekst = ILoadFaultySongs[Pet] then Ini.LoadFaultySongs := Pet;
+ // NewPartyPoints
+ Tekst := IniFile.ReadString('Game', 'NewPartyPoints', INewPartyPoints[1]);
+ for Pet := 0 to High(INewPartyPoints) do
+ if Tekst = INewPartyPoints[Pet] then Ini.NewPartyPoints := Pet;
+
//if Ini.Debug = 1 then SongPath := 'E:\UltraStar 03\Songs\';
// Screens
@@ -645,6 +652,10 @@ begin
Tekst := ILoadFaultySongs[Ini.LoadFaultySongs];
IniFile.WriteString('Game', 'LoadFaultySongs', Tekst);
+ // NewPartyPoints
+ Tekst := INewPartyPoints[Ini.NewPartyPoints];
+ IniFile.WriteString('Game', 'NewPartyPoints', Tekst);
+
// Screens
Tekst := IScreens[Ini.Screens];
IniFile.WriteString('Graphics', 'Screens', Tekst);
@@ -849,4 +860,4 @@ begin
end;
end;
-end.
+end. \ No newline at end of file
diff --git a/Game/Code/Classes/UParty.pas b/Game/Code/Classes/UParty.pas
index a843c393..db0328aa 100644
--- a/Game/Code/Classes/UParty.pas
+++ b/Game/Code/Classes/UParty.pas
@@ -2,7 +2,7 @@ unit UParty;
interface
-uses ModiSDK;
+uses ModiSDK, UIni;
type
TRoundInfo = record
@@ -53,6 +53,7 @@ type
var
PartySession: TParty_Session;
+ Placings: Array [0..5] of Byte;
implementation
@@ -320,7 +321,7 @@ end;
//----------
procedure TParty_Session.EndRound;
var
- I, MaxScore: Integer;
+ I, J, MaxScore: Integer;
begin
//Copy Winner
if Rounds[CurRound].Medley then
@@ -362,8 +363,40 @@ begin
Rounds[CurRound].Winner := 0;
end else
Rounds[CurRound].Winner := ScreenSingModi.Winner;
+
//Set Scores
- GenScores;
+
+ if (Ini.NewPartyPoints = 1) then
+ begin
+
+ MaxScore := 0;
+ for I := 0 to ScreenSingModi.PlayerInfo.NumPlayers-1 do
+ if (ScreenSingModi.PlayerInfo.Playerinfo[I].Score > MaxScore) then
+ MaxScore := ScreenSingModi.PlayerInfo.Playerinfo[I].Score;
+
+
+ if (MaxScore > 0) then
+ begin
+ //New Points
+ //Get Placings
+ for I := 0 to Teams.NumTeams-1 do
+ begin
+ Placings[I] := 0;
+ for J := 0 to Teams.NumTeams-1 do
+ If (ScreenSingModi.PlayerInfo.Playerinfo[J].Score > ScreenSingModi.PlayerInfo.Playerinfo[I].Score) then
+ Inc(Placings[I]);
+ end;
+
+ for I := 0 to Teams.NumTeams-1 do
+ Teams.Teaminfo[I].Score := Teams.Teaminfo[I].Score + ((Placings[I] - (Teams.NumTeams-1)) * -1);
+ end
+ end
+ else
+ //Old Points
+ GenScores;
+
+
+
//Increase TimesPlayed 4 all Players
For I := 0 to Teams.NumTeams-1 do
@@ -402,4 +435,4 @@ begin
Result[I] := ATeams[I].TeamNum;
end;
-end.
+end. \ No newline at end of file
diff --git a/Game/Code/Classes/UVideo.pas b/Game/Code/Classes/UVideo.pas
index 68b892c8..b37166c1 100644
--- a/Game/Code/Classes/UVideo.pas
+++ b/Game/Code/Classes/UVideo.pas
@@ -158,7 +158,7 @@ begin
VideoTime := 0;
LastFrameTime := 0;
TimeDifference := 0;
-
+ Counter := 0;
acClose;
if not FileExists(FileName) then
@@ -546,7 +546,7 @@ begin
end else if (mmfps>75) then
begin
if(SkipLines>0) and (Counter<=100) then
- Counter := round(Counter+50/mmfps)
+ Counter := round(Counter+70/mmfps)
else if (SkipLines>0) and (Counter>=100) then
begin
Dec(SkipLines);