aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Classes/UMain.pas
diff options
context:
space:
mode:
authorbrunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-10-06 15:29:51 +0000
committerbrunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-10-06 15:29:51 +0000
commit336f66e50677c95a802d321b61b3e282e016f668 (patch)
tree30bc272f533161938bae8fb2f250905a49082572 /Game/Code/Classes/UMain.pas
parent65ddad359ed3b9b739215ec89a7645455ae10dce (diff)
downloadusdx-336f66e50677c95a802d321b61b3e282e016f668.tar.gz
usdx-336f66e50677c95a802d321b61b3e282e016f668.tar.xz
usdx-336f66e50677c95a802d321b61b3e282e016f668.zip
less cpu usage for threads
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/1.0.1 Challenge MOD@2638 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r--Game/Code/Classes/UMain.pas32
1 files changed, 20 insertions, 12 deletions
diff --git a/Game/Code/Classes/UMain.pas b/Game/Code/Classes/UMain.pas
index c8b398b7..ecbc9c59 100644
--- a/Game/Code/Classes/UMain.pas
+++ b/Game/Code/Classes/UMain.pas
@@ -579,6 +579,7 @@ begin
SMin := 0;
SMax := Czesci[P].Akt;
+ SDet := SMin;
// check if we can add new note
Mozna := false;
for S := SMin to SMax do
@@ -721,12 +722,15 @@ begin
if (Czesci[P].Czesc[S].Nuta[N].Start + tap < Czas.AktBeatD) then
tap := Czas.AktBeatD - Czesci[P].Czesc[S].Nuta[N].Start - tap;
- if (Ini.LineBonus = 0) then
- // add points without LineBonus
- SumN := SumN + 10000 / Czesci[P].Wartosc * Czesci[P].Czesc[S].Nuta[N].Wartosc * tap
- else
- // add points with Line Bonus
- SumN := SumN + 9000 / Czesci[P].Wartosc * Czesci[P].Czesc[S].Nuta[N].Wartosc * tap;
+ if (tap<>0) then
+ begin
+ if (Ini.LineBonus = 0) then
+ // add points without LineBonus
+ SumN := SumN + 10000 / Czesci[P].Wartosc * Czesci[P].Czesc[S].Nuta[N].Wartosc * tap
+ else
+ // add points with Line Bonus
+ SumN := SumN + 9000 / Czesci[P].Wartosc * Czesci[P].Czesc[S].Nuta[N].Wartosc * tap;
+ end;
end;
end;
@@ -754,6 +758,7 @@ begin
SMin := 0;
SMax := Czesci[P].Akt;
+ SDet := SMin;
// check if we can add new note
Mozna := false;
for S := SMin to SMax do
@@ -896,12 +901,15 @@ begin
if (Czesci[P].Czesc[S].Nuta[N].Start + tap < Czas.AktBeatD) then
tap := Czas.AktBeatD - Czesci[P].Czesc[S].Nuta[N].Start - tap;
- if (Ini.LineBonus = 0) then
- // add points without LineBonus
- SumN := SumN + 10000 / Czesci[P].Wartosc * Czesci[P].Czesc[S].Nuta[N].Wartosc * tap
- else
- // add points with Line Bonus
- SumN := SumN + 9000 / Czesci[P].Wartosc * Czesci[P].Czesc[S].Nuta[N].Wartosc * tap;
+ if (tap<>0) then
+ begin
+ if (Ini.LineBonus = 0) then
+ // add points without LineBonus
+ SumN := SumN + 10000 / Czesci[P].Wartosc * Czesci[P].Czesc[S].Nuta[N].Wartosc * tap
+ else
+ // add points with Line Bonus
+ SumN := SumN + 9000 / Czesci[P].Wartosc * Czesci[P].Czesc[S].Nuta[N].Wartosc * tap;
+ end;
end;
end;