| 2940 | } |
| 2941 | |
| 2942 | staticfn void |
| 2943 | setup_gendmenu( |
| 2944 | winid win, |
| 2945 | boolean filtering, |
| 2946 | int role, int race, int algn) |
| 2947 | { |
| 2948 | anything any; |
| 2949 | boolean gend_ok; |
| 2950 | int i; |
| 2951 | char this_ch; |
| 2952 | int clr = NO_COLOR; |
| 2953 | |
| 2954 | any = cg.zeroany; |
| 2955 | for (i = 0; i < ROLE_GENDERS; i++) { |
| 2956 | /* no ok_align(); gender isn't constrained by alignment */ |
| 2957 | gend_ok = (ok_gend(role, race, i, algn) |
| 2958 | && ok_role(role, race, i, algn) |
| 2959 | && ok_race(role, race, i, algn)); |
| 2960 | if (filtering && !gend_ok) |
| 2961 | continue; |
| 2962 | if (filtering) |
| 2963 | any.a_int = i + 1; |
| 2964 | else |
| 2965 | any.a_string = genders[i].adj; |
| 2966 | this_ch = *genders[i].adj; |
| 2967 | /* (see setup_racemenu for explanation of selector letters |
| 2968 | and setup_rolemenu for preselection) */ |
| 2969 | add_menu(win, &nul_glyphinfo, &any, |
| 2970 | filtering ? this_ch : highc(this_ch), |
| 2971 | filtering ? highc(this_ch) : 0, |
| 2972 | ATR_NONE, clr, genders[i].adj, |
| 2973 | (!filtering && !gend_ok) |
| 2974 | ? MENU_ITEMFLAGS_SELECTED : MENU_ITEMFLAGS_NONE); |
| 2975 | } |
| 2976 | } |
| 2977 | |
| 2978 | staticfn void |
| 2979 | setup_algnmenu( |