| 45 | } |
| 46 | |
| 47 | char * |
| 48 | do_statusline1(void) |
| 49 | { |
| 50 | static char newbot1[BUFSZ]; |
| 51 | char *nb; |
| 52 | int i, j; |
| 53 | |
| 54 | if (suppress_map_output()) |
| 55 | return strcpy(newbot1, ""); |
| 56 | |
| 57 | Strcpy(newbot1, svp.plname); |
| 58 | if ('a' <= newbot1[0] && newbot1[0] <= 'z') |
| 59 | newbot1[0] += 'A' - 'a'; |
| 60 | newbot1[BOTL_NSIZ] = 0; |
| 61 | Sprintf(nb = eos(newbot1), " the "); |
| 62 | |
| 63 | if (Upolyd) { |
| 64 | char mbot[BUFSZ]; |
| 65 | int k = 0; |
| 66 | |
| 67 | Strcpy(mbot, pmname(&mons[u.umonnum], Ugender)); |
| 68 | while (mbot[k] != 0) { |
| 69 | if ((k == 0 || (k > 0 && mbot[k - 1] == ' ')) && 'a' <= mbot[k] |
| 70 | && mbot[k] <= 'z') |
| 71 | mbot[k] += 'A' - 'a'; |
| 72 | k++; |
| 73 | } |
| 74 | Strcpy(nb = eos(nb), mbot); |
| 75 | } else { |
| 76 | Strcpy(nb = eos(nb), rank()); |
| 77 | } |
| 78 | |
| 79 | Sprintf(nb = eos(nb), " "); |
| 80 | i = gm.mrank_sz + 15; |
| 81 | j = (int) ((nb + 2) - newbot1); /* strlen(newbot1) but less computation */ |
| 82 | if ((i - j) > 0) |
| 83 | Sprintf(nb = eos(nb), "%*s", i - j, " "); /* pad with spaces */ |
| 84 | |
| 85 | Sprintf(nb = eos(nb), "St:%s Dx:%-1d Co:%-1d In:%-1d Wi:%-1d Ch:%-1d", |
| 86 | get_strength_str(), |
| 87 | ACURR(A_DEX), ACURR(A_CON), ACURR(A_INT), ACURR(A_WIS), |
| 88 | ACURR(A_CHA)); |
| 89 | Sprintf(nb = eos(nb), "%s", |
| 90 | (u.ualign.type == A_CHAOTIC) ? " Chaotic" |
| 91 | : (u.ualign.type == A_NEUTRAL) ? " Neutral" |
| 92 | : " Lawful"); |
| 93 | #ifdef SCORE_ON_BOTL |
| 94 | if (flags.showscore) |
| 95 | Sprintf(nb = eos(nb), " S:%ld", botl_score()); |
| 96 | #endif |
| 97 | return newbot1; |
| 98 | } |
| 99 | |
| 100 | char * |
| 101 | do_statusline2(void) |
no test coverage detected