equal
deleted
inserted
replaced
822 return (v!=0) | (v >> (sizeof(int32)*8-1)); |
822 return (v!=0) | (v >> (sizeof(int32)*8-1)); |
823 } |
823 } |
824 |
824 |
825 static void CompanyLeagueWndProc(Window *w, WindowEvent *e) |
825 static void CompanyLeagueWndProc(Window *w, WindowEvent *e) |
826 { |
826 { |
827 switch(e->event) { |
827 switch (e->event) { |
828 case WE_PAINT: { |
828 case WE_PAINT: { |
829 const Player* p; |
829 const Player* p; |
830 const Player* plist[MAX_PLAYERS]; |
830 Player const *plist[MAX_PLAYERS]; |
831 uint pl_num; |
831 uint pl_num; |
832 uint i; |
832 uint i; |
833 |
833 |
834 DrawWindowWidgets(w); |
834 DrawWindowWidgets(w); |
835 |
835 |
838 if (p->is_active) |
838 if (p->is_active) |
839 plist[pl_num++] = p; |
839 plist[pl_num++] = p; |
840 } |
840 } |
841 assert(pl_num > 0); |
841 assert(pl_num > 0); |
842 |
842 |
843 qsort(plist, pl_num, sizeof(Player*), _perf_hist_comp); |
843 qsort((void*)plist, pl_num, sizeof(Player*), _perf_hist_comp); |
844 |
844 |
845 i = 0; |
845 i = 0; |
846 do { |
846 do { |
847 SetDParam(0, i + STR_01AC_1ST); |
847 SetDParam(0, i + STR_01AC_1ST); |
848 p = plist[i]; |
848 p = plist[i]; |