| 4119 | } |
| 4120 | |
| 4121 | staticfn void |
| 4122 | show_direction_keys( |
| 4123 | winid win, /* should specify a window which is using a fixed-width font */ |
| 4124 | char centerchar, /* '.' or '@' or ' ' */ |
| 4125 | boolean nodiag) |
| 4126 | { |
| 4127 | char buf[BUFSZ]; |
| 4128 | |
| 4129 | if (!centerchar) |
| 4130 | centerchar = ' '; |
| 4131 | |
| 4132 | if (nodiag) { |
| 4133 | Sprintf(buf, " %s ", |
| 4134 | visctrl(cmd_from_func(do_move_north))); |
| 4135 | putstr(win, 0, buf); |
| 4136 | putstr(win, 0, " | "); |
| 4137 | Sprintf(buf, " %s- %c -%s", |
| 4138 | visctrl(cmd_from_func(do_move_west)), |
| 4139 | centerchar, |
| 4140 | visctrl(cmd_from_func(do_move_east))); |
| 4141 | putstr(win, 0, buf); |
| 4142 | putstr(win, 0, " | "); |
| 4143 | Sprintf(buf, " %s ", |
| 4144 | visctrl(cmd_from_func(do_move_south))); |
| 4145 | putstr(win, 0, buf); |
| 4146 | } else { |
| 4147 | Sprintf(buf, " %s %s %s", |
| 4148 | visctrl(cmd_from_func(do_move_northwest)), |
| 4149 | visctrl(cmd_from_func(do_move_north)), |
| 4150 | visctrl(cmd_from_func(do_move_northeast))); |
| 4151 | putstr(win, 0, buf); |
| 4152 | putstr(win, 0, " \\ | / "); |
| 4153 | Sprintf(buf, " %s- %c -%s", |
| 4154 | visctrl(cmd_from_func(do_move_west)), |
| 4155 | centerchar, |
| 4156 | visctrl(cmd_from_func(do_move_east))); |
| 4157 | putstr(win, 0, buf); |
| 4158 | putstr(win, 0, " / | \\ "); |
| 4159 | Sprintf(buf, " %s %s %s", |
| 4160 | visctrl(cmd_from_func(do_move_southwest)), |
| 4161 | visctrl(cmd_from_func(do_move_south)), |
| 4162 | visctrl(cmd_from_func(do_move_southeast))); |
| 4163 | putstr(win, 0, buf); |
| 4164 | }; |
| 4165 | } |
| 4166 | |
| 4167 | /* explain choices if player has asked for getdir() help or has given |
| 4168 | an invalid direction after a prefix key ('F', 'g', 'm', &c), which |
no test coverage detected