diff options
author | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2008-07-02 08:23:35 +0000 |
---|---|---|
committer | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2008-07-02 08:23:35 +0000 |
commit | 94b9441d2ec4fba0c65a25296f3693b727eea799 (patch) | |
tree | 14cca8764f5d185a1138c238aca58ce8552889f1 /Game/Code/Classes | |
parent | faf4c13bf41a17ce920a2194fc396f8bf7b44331 (diff) | |
download | usdx-94b9441d2ec4fba0c65a25296f3693b727eea799.tar.gz usdx-94b9441d2ec4fba0c65a25296f3693b727eea799.tar.xz usdx-94b9441d2ec4fba0c65a25296f3693b727eea799.zip |
indenting and cleanup
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1158 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r-- | Game/Code/Classes/ULight.pas | 5 | ||||
-rw-r--r-- | Game/Code/Classes/ULog.pas | 75 |
2 files changed, 38 insertions, 42 deletions
diff --git a/Game/Code/Classes/ULight.pas b/Game/Code/Classes/ULight.pas index a4bebfd2..a0a399ab 100644 --- a/Game/Code/Classes/ULight.pas +++ b/Game/Code/Classes/ULight.pas @@ -123,19 +123,14 @@ end; procedure TLight.Refresh; var Time: real; -// TimeSkip: real; L: integer; begin if Enabled then begin Time := GetTime; -// TimeSkip := Time - LastTime; for L := 0 to 7 do begin if Light[L] = true then begin if LightTime[L] > Time then begin - // jest jeszcze zapas - bez zmian - //LightTime[L] := LightTime[L] - TimeSkip; end else begin - // czas minal Light[L] := false; end; end; diff --git a/Game/Code/Classes/ULog.pas b/Game/Code/Classes/ULog.pas index 95502df8..8394d73e 100644 --- a/Game/Code/Classes/ULog.pas +++ b/Game/Code/Classes/ULog.pas @@ -190,51 +190,52 @@ begin end; end; - if BenchmarkFileOpened then - begin - Miliseconds := Trunc(Frac(BenchmarkTimeLength[Number]) * 1000); - Seconds := Trunc(BenchmarkTimeLength[Number]) mod 60; - Minutes := Trunc((BenchmarkTimeLength[Number] - Seconds) / 60); -// ValueText := FloatToStr(BenchmarkTimeLength[Number]); - -{ ValueText := FloatToStr( - SecondOf(BenchmarkTimeLength[Number]) + MilliSecondOf(BenchmarkTimeLength[Number])/1000 - ); - if MinuteOf(BenchmarkTimeLength[Number]) >= 1 then - ValueText := IntToStr(MinuteOf(BenchmarkTimeLength[Number])) + ':' + ValueText; - WriteLn(FileBenchmark, Text + ': ' + ValueText + ' seconds');} - - if (Minutes = 0) and (Seconds = 0) then begin - MilisecondsS := IntToStr(Miliseconds); - ValueText := MilisecondsS + ' miliseconds'; - end; + if BenchmarkFileOpened then + begin + Miliseconds := Trunc(Frac(BenchmarkTimeLength[Number]) * 1000); + Seconds := Trunc(BenchmarkTimeLength[Number]) mod 60; + Minutes := Trunc((BenchmarkTimeLength[Number] - Seconds) / 60); + //ValueText := FloatToStr(BenchmarkTimeLength[Number]); + + { + ValueText := FloatToStr(SecondOf(BenchmarkTimeLength[Number]) + + MilliSecondOf(BenchmarkTimeLength[Number])/1000); + if MinuteOf(BenchmarkTimeLength[Number]) >= 1 then + ValueText := IntToStr(MinuteOf(BenchmarkTimeLength[Number])) + ':' + ValueText; + WriteLn(FileBenchmark, Text + ': ' + ValueText + ' seconds'); + } + + if (Minutes = 0) and (Seconds = 0) then begin + MilisecondsS := IntToStr(Miliseconds); + ValueText := MilisecondsS + ' miliseconds'; + end; - if (Minutes = 0) and (Seconds >= 1) then begin - MilisecondsS := IntToStr(Miliseconds); - while Length(MilisecondsS) < 3 do - MilisecondsS := '0' + MilisecondsS; + if (Minutes = 0) and (Seconds >= 1) then begin + MilisecondsS := IntToStr(Miliseconds); + while Length(MilisecondsS) < 3 do + MilisecondsS := '0' + MilisecondsS; - SecondsS := IntToStr(Seconds); + SecondsS := IntToStr(Seconds); - ValueText := SecondsS + ',' + MilisecondsS + ' seconds'; - end; + ValueText := SecondsS + ',' + MilisecondsS + ' seconds'; + end; - if Minutes >= 1 then begin - MilisecondsS := IntToStr(Miliseconds); - while Length(MilisecondsS) < 3 do - MilisecondsS := '0' + MilisecondsS; + if Minutes >= 1 then begin + MilisecondsS := IntToStr(Miliseconds); + while Length(MilisecondsS) < 3 do + MilisecondsS := '0' + MilisecondsS; - SecondsS := IntToStr(Seconds); - while Length(SecondsS) < 2 do - SecondsS := '0' + SecondsS; + SecondsS := IntToStr(Seconds); + while Length(SecondsS) < 2 do + SecondsS := '0' + SecondsS; - MinutesS := IntToStr(Minutes); + MinutesS := IntToStr(Minutes); - ValueText := MinutesS + ':' + SecondsS + ',' + MilisecondsS + ' minutes'; - end; + ValueText := MinutesS + ':' + SecondsS + ',' + MilisecondsS + ' minutes'; + end; - WriteLn(BenchmarkFile, Text + ': ' + ValueText); - Flush(BenchmarkFile); + WriteLn(BenchmarkFile, Text + ': ' + ValueText); + Flush(BenchmarkFile); end; end; end; |