equal
deleted
inserted
replaced
430 int r = (ta->GetActivity() * 100 * ta->population) - (tb->GetActivity() * 100 * tb->population); |
430 int r = (ta->GetActivity() * 100 * ta->population) - (tb->GetActivity() * 100 * tb->population); |
431 if (_town_sort_order & 1) r = -r; |
431 if (_town_sort_order & 1) r = -r; |
432 return r; |
432 return r; |
433 } |
433 } |
434 |
434 |
435 static void MakeSortedTownList(void) |
435 static void MakeSortedTownList() |
436 { |
436 { |
437 const Town* t; |
437 const Town* t; |
438 int (*townsortproc[])(const void *a, const void *b) = { |
438 int (*townsortproc[])(const void *a, const void *b) = { |
439 TownNameSorter, TownPopSorter, TownGDPSorter, TownOutputSorter |
439 TownNameSorter, TownPopSorter, TownGDPSorter, TownOutputSorter |
440 }; |
440 }; |
541 _town_directory_widgets, |
541 _town_directory_widgets, |
542 TownDirectoryWndProc |
542 TownDirectoryWndProc |
543 }; |
543 }; |
544 |
544 |
545 |
545 |
546 void ShowTownDirectory(void) |
546 void ShowTownDirectory() |
547 { |
547 { |
548 Window *w = AllocateWindowDescFront(&_town_directory_desc, 0); |
548 Window *w = AllocateWindowDescFront(&_town_directory_desc, 0); |
549 |
549 |
550 if (w != NULL) { |
550 if (w != NULL) { |
551 w->vscroll.cap = 16; |
551 w->vscroll.cap = 16; |