Rev 8899 | Rev 12200 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 8899 | Rev 11124 | ||
---|---|---|---|
Line 100... | Line 100... | ||
100 | if(strcmp(typ,"noscore")==0 && ( |
100 | if(strcmp(typ,"noscore")==0 && ( |
101 | ( i < 7 || ( i > 7 && strcmp(data[7],"noscore")!=0) |
101 | ( i < 7 || ( i > 7 && strcmp(data[7],"noscore")!=0) |
102 | || (i > 8 && strcmp(data[8], typ)!=0)) |
102 | || (i > 8 && strcmp(data[8], typ)!=0)) |
103 | )){ return; } |
103 | )){ return; } |
104 | t-=tab->lasttime; tab->lasttime=-1; if(t<0) t+=24*3600; |
104 | t-=tab->lasttime; tab->lasttime=-1; if(t<0) t+=24*3600; |
- | 105 | if(t<0) t=0; |
|
105 |
|
106 | if(t>5*3600) t=5*3600; |
106 | scores[sccnt].dure=t; scores[sccnt].next=-1; |
107 | scores[sccnt].dure=t; scores[sccnt].next=-1; |
107 | scores[sccnt].score=(double) atof(data[5])*100+0.5; |
108 | scores[sccnt].score=(double) atof(data[5])*100+0.5; |
108 | if(tab->scorecnt>0) scores[tab->lastscore].next=sccnt; |
109 | if(tab->scorecnt>0) scores[tab->lastscore].next=sccnt; |
109 | else tab->firstscore=sccnt; |
110 | else tab->firstscore=sccnt; |
110 | tab->lastscore=sccnt; sccnt++; tab->scorecnt++; |
111 | tab->lastscore=sccnt; sccnt++; tab->scorecnt++; |
Line 192... | Line 193... | ||
192 | scmin=10; scmax=0; durmin=24*3600; durmax=0; |
193 | scmin=10; scmax=0; durmin=24*3600; durmax=0; |
193 | {int k; for(k=0; k<10; k++) best[k]=0 ;} |
194 | {int k; for(k=0; k<10; k++) best[k]=0 ;} |
194 | for(i=0,j=dat->firstscore; i<dat->scorecnt; i++) { |
195 | for(i=0,j=dat->firstscore; i<dat->scorecnt; i++) { |
195 | s=(double) scores[j].score/100; d=(double) scores[j].dure/60; |
196 | s=(double) scores[j].score/100; d=(double) scores[j].dure/60; |
196 | scsum+=s; dursum+=d; |
197 | scsum+=s; dursum+=d; |
- | 198 | if(scmin>s) scmin=s; |
|
197 |
|
199 | if(scmax<s) scmax=s; |
- | 200 | if(durmin>d) durmin=d; |
|
198 |
|
201 | if(durmax<d) durmax=d; |
199 | { |
202 | { |
200 | int k, l = 0; |
203 | int k, l = 0; |
201 | for (k = 0; k < 10; k++) if (best[k] < best[l]) l = k; |
204 | for (k = 0; k < 10; k++) if (best[k] < best[l]) l = k; |
202 | if (best[l] < s) best[l] = s; |
205 | if (best[l] < s) best[l] = s; |
203 | } |
206 | } |