| 1757 | static boolean mongen_order_init = FALSE; |
| 1758 | |
| 1759 | staticfn int QSORTCALLBACK |
| 1760 | cmp_init_mongen_order(const void *p1, const void *p2) |
| 1761 | { |
| 1762 | int i1 = *((int *) p1), i2 = *((int *) p2); |
| 1763 | #if 0 |
| 1764 | /* This will cause these to be moved last in the mlet sort order */ |
| 1765 | int offset1 = ((mons[i1].geno & (G_NOGEN | G_UNIQ)) != 0) ? 99 : 0, |
| 1766 | offset2 = ((mons[i2].geno & (G_NOGEN | G_UNIQ)) != 0) ? 99 : 0; |
| 1767 | #else |
| 1768 | int offset1 = 0, offset2 = 0; |
| 1769 | #endif |
| 1770 | |
| 1771 | /* incorporate the mlet into the sort values for comparison */ |
| 1772 | int difficulty1 = |
| 1773 | ((mons[i1].difficulty + offset1) | ((int) mons[i1].mlet << 8)), |
| 1774 | difficulty2 = |
| 1775 | ((mons[i2].difficulty + offset2) | ((int) mons[i2].mlet << 8)); |
| 1776 | return difficulty1 - difficulty2; |
| 1777 | } |
| 1778 | |
| 1779 | #if (NH_DEVEL_STATUS != NH_STATUS_RELEASED) |
| 1780 | staticfn void check_mongen_order(void); |
nothing calls this directly
no outgoing calls
no test coverage detected