diff options
Diffstat (limited to 'mbbsd')
-rw-r--r-- | mbbsd/io.c | 10 | ||||
-rw-r--r-- | mbbsd/talk.c | 8 |
2 files changed, 11 insertions, 7 deletions
@@ -285,16 +285,20 @@ igetch() if (currutmp == NULL) return (ch); +#define WB_OFO_WINDOW_HEIGHT ((WB_OFO_MSG_BOTTOM) - (WB_OFO_USER_TOP) + 1) + if (currutmp->msgs[0].pid && WATERMODE(WATER_OFO) && wmofo == NOTREPLYING) { int y, x, my_newfd; - screenline_t *screen0 = calloc(t_lines, sizeof(screenline_t)); - memcpy(screen0, big_picture, t_lines * sizeof(screenline_t)); + screenline_t *screen0 = calloc(WB_OFO_WINDOW_HEIGHT, sizeof(screenline_t)); + memcpy(screen0, &big_picture[WB_OFO_USER_TOP - 1], + WB_OFO_WINDOW_HEIGHT * sizeof(screenline_t)); getyx(&y, &x); my_newfd = i_newfd; i_newfd = 0; my_write2(); - memcpy(big_picture, screen0, t_lines * sizeof(screenline_t)); + memcpy(&big_picture[WB_OFO_USER_TOP - 1], screen0, + WB_OFO_WINDOW_HEIGHT * sizeof(screenline_t)); i_newfd = my_newfd; move(y, x); free(screen0); diff --git a/mbbsd/talk.c b/mbbsd/talk.c index 672dff81..b0c22f4c 100644 --- a/mbbsd/talk.c +++ b/mbbsd/talk.c @@ -498,9 +498,9 @@ my_write2(void) currstat = DBACK; //init screen - move(7, 28); + move(WB_OFO_USER_TOP, WB_OFO_USER_LEFT); outs("\033[1;33;46m ↑ 水球反擊對象 ↓\033[0m"); - for (i = 0; i < 5; ++i) + for (i = 0; i < WB_OFO_USER_HEIGHT;++i) if (swater[i] == NULL || swater[i]->pid == 0) break; else { @@ -510,10 +510,10 @@ my_write2(void) swater[i]->uin = search_ulist_pid(swater[i]->pid); water_scr(swater[i], i, 0); } - move(15, 4); + move(WB_OFO_MSG_TOP, WB_OFO_MSG_LEFT); outs("\033[0m \033[1;35m◇\033[1;36m────────────────" "─────────────────\033[1;35m◇\033[0m "); - move(22, 4); + move(WB_OFO_MSG_BOTTOM, WB_OFO_MSG_LEFT); outs(" \033[1;35m◇\033[1;36m────────────────" "─────────────────\033[1;35m◇\033[0m "); water_scr(swater[0], 0, 1); |