Lines Matching +full:x +full:- +full:max

1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
63 " /- _ `-/ '",
67 " `-^--'`< '",
70 " `-----' /",
71 "<----. __ / __ \\",
72 "<----|====O)))==) \\) /====",
73 "<----' `--' `.__,' \\",
77 " ,' ,-----' |",
78 " `--{__________)",
133 sc_vtb_erase(&sc->cur_scp->scr, in clear_daemon()
134 (ypos + y)*sc->cur_scp->xsize + xpos + xoff, in clear_daemon()
135 xlen - xoff, in clear_daemon()
136 sc->scr_map[0x20], ATTR(FG_LIGHTGREY | BG_BLACK)); in clear_daemon()
144 int x, y; in draw_daemon() local
152 px = DAEMON_MAX_WIDTH - xlen; in draw_daemon()
155 for (x = xoff; (x < xlen) && (daemon_pic[y][px] != '\0'); x++, px++) { in draw_daemon()
165 sc_vtb_putc(&sc->cur_scp->scr, in draw_daemon()
166 (ypos + y)*sc->cur_scp->xsize in draw_daemon()
167 + xpos + x, in draw_daemon()
168 sc->scr_map[daemon_pic[y][px]], in draw_daemon()
171 sc_vtb_putc(&sc->cur_scp->scr, in draw_daemon()
172 (ypos + y)*sc->cur_scp->xsize in draw_daemon()
174 - px - 1, in draw_daemon()
175 sc->scr_map[xflip_symbol(daemon_pic[y][px])], in draw_daemon()
187 sc_vtb_erase(&sc->cur_scp->scr, in clear_string()
188 ypos*sc->cur_scp->xsize + xpos + xoff, len - xoff, in clear_string()
189 sc->scr_map[0x20], ATTR(FG_LIGHTGREY | BG_BLACK)); in clear_string()
195 int x; in draw_string() local
197 for (x = xoff; x < len; x++) in draw_string()
198 sc_vtb_putc(&sc->cur_scp->scr, in draw_string()
199 ypos*sc->cur_scp->xsize + xpos + x, in draw_string()
200 sc->scr_map[s[x]], ATTR(FG_LIGHTGREEN | BG_BLACK)); in draw_string()
207 static int txdir = -1, tydir = -1; in daemon_saver()
215 int min, max; in daemon_saver() local
220 scp = sc->cur_scp; in daemon_saver()
223 if (adp->va_info.vi_flags & V_INFO_GRAPHICS) in daemon_saver()
227 sc_vtb_clear(&scp->scr, sc->scr_map[0x20], in daemon_saver()
229 vidd_set_hw_cursor(adp, -1, -1); in daemon_saver()
245 * the picture is between min and max. in daemon_saver()
247 if (scp->xsize <= DAEMON_MAX_WIDTH) { in daemon_saver()
254 min = scp->xsize - DAEMON_MAX_WIDTH - 10; in daemon_saver()
255 max = 10; in daemon_saver()
258 max = scp->xsize - DAEMON_MAX_WIDTH; in daemon_saver()
263 } else if (dxpos >= max) { in daemon_saver()
264 dxpos = max; in daemon_saver()
265 dxdir = -1; in daemon_saver()
268 if (scp->ysize <= DAEMON_MAX_HEIGHT) { in daemon_saver()
269 min = scp->ysize - DAEMON_MAX_HEIGHT - 10; in daemon_saver()
270 max = 10; in daemon_saver()
273 max = scp->ysize - DAEMON_MAX_HEIGHT; in daemon_saver()
278 } else if (dypos >= max) { in daemon_saver()
279 dypos = max; in daemon_saver()
280 dydir = -1; in daemon_saver()
283 moved_daemon = -1; in daemon_saver()
292 xoff = -dxpos; in daemon_saver()
293 if (dxpos >= scp->xsize) in daemon_saver()
295 else if (dxpos + xlen > scp->xsize) in daemon_saver()
296 xlen = scp->xsize - dxpos; in daemon_saver()
302 yoff = -dypos; in daemon_saver()
303 if (dypos >= scp->ysize) in daemon_saver()
305 else if (dypos + ylen > scp->ysize) in daemon_saver()
306 ylen = scp->ysize - dypos; in daemon_saver()
309 if (scp->xsize <= messagelen) { in daemon_saver()
310 min = scp->xsize - messagelen - 10; in daemon_saver()
311 max = 10; in daemon_saver()
314 max = scp->xsize - messagelen; in daemon_saver()
319 } else if (txpos >= max) { in daemon_saver()
320 txpos = max; in daemon_saver()
321 txdir = -1; in daemon_saver()
326 } else if (typos >= scp->ysize - 1) { in daemon_saver()
327 typos = scp->ysize - 1; in daemon_saver()
328 tydir = -1; in daemon_saver()
337 toff = -txpos; in daemon_saver()
338 if (txpos >= scp->xsize) in daemon_saver()
340 else if (txpos + tlen > scp->xsize) in daemon_saver()
341 tlen = scp->xsize - txpos; in daemon_saver()
371 sprintf(message, "%s - %s %s", prison0.pr_hostname, ostype, osrelease); in daemon_init()