From 0a8c26c6cb91df44d81ec63cc422a540190a878a Mon Sep 17 00:00:00 2001 From: piaip Date: Fri, 21 Dec 2007 17:18:33 +0000 Subject: - change big_picture to inansistr() api. - pmore: also disable scrolling for traditional movies git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3722 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/go.c | 12 +++++++++--- mbbsd/gomo.c | 12 +++++++++--- mbbsd/pmore.c | 3 ++- mbbsd/reversi.c | 12 +++++++++--- 4 files changed, 29 insertions(+), 10 deletions(-) diff --git a/mbbsd/go.c b/mbbsd/go.c index 701d4365..44cf9cc8 100644 --- a/mbbsd/go.c +++ b/mbbsd/go.c @@ -827,7 +827,8 @@ go_genlog(ChessInfo* info, FILE* fp, ChessGameResult result) { const static char ColName[] = "ABCDEFGHJKLMNOPQRST"; const int nStep = info->history.used; - int i; + char buf[ANSILINELEN] = ""; + int i, x, y; int sethand = 0; if (nStep > 0) { @@ -837,9 +838,14 @@ go_genlog(ChessInfo* info, FILE* fp, ChessGameResult result) sethand = step->loc.r; } - if (big_picture) + getyx(&y, &x); for (i = 1; i <= 22; i++) - fprintf(fp, "%.*s\n", big_picture[i].len, big_picture[i].data); + { + move(i, 0); + inansistr(buf, sizeof(buf)-1); + fprintf(fp, "%s\n", buf); + } + move(y, x); fprintf(fp, "\n"); fprintf(fp, "按 z 可進入打譜模式\n"); diff --git a/mbbsd/gomo.c b/mbbsd/gomo.c index 3416adc0..90f72c63 100644 --- a/mbbsd/gomo.c +++ b/mbbsd/gomo.c @@ -420,12 +420,18 @@ gomo_gameend(ChessInfo* info, ChessGameResult result) static void gomo_genlog(ChessInfo* info, FILE* fp, ChessGameResult result) { + char buf[ANSILINELEN] = ""; const int nStep = info->history.used; - int i; + int i, x, y; - if(big_picture) + getyx(&y, &x); for (i = 1; i <= 18; i++) - fprintf(fp, "%.*s\n", big_picture[i].len, big_picture[i].data); + { + move(i, 0); + inansistr(buf, sizeof(buf)-1); + fprintf(fp, "%s\n", buf); + } + move(y, x); fprintf(fp, "\n"); fprintf(fp, "按 z 可進入打譜模式\n"); diff --git a/mbbsd/pmore.c b/mbbsd/pmore.c index 7640d2e8..e95ad341 100644 --- a/mbbsd/pmore.c +++ b/mbbsd/pmore.c @@ -1055,7 +1055,8 @@ mf_display() #if defined(PMORE_USE_ASCII_MOVIE) && !defined(PMORE_USING_POOR_TERM) // For movies, maybe clear() is better. // Let's enable for good terminals (which does not need workarounds) - if (mfmovie.mode == MFDISP_MOVIE_PLAYING) + if (mfmovie.mode == MFDISP_MOVIE_PLAYING || + mfmovie.mode == MFDISP_MOVIE_PLAYING_OLD) { clear(); move(0, 0); } else diff --git a/mbbsd/reversi.c b/mbbsd/reversi.c index 6bc3f6df..ea64f35a 100644 --- a/mbbsd/reversi.c +++ b/mbbsd/reversi.c @@ -343,12 +343,18 @@ reversi_gameend(ChessInfo* info, ChessGameResult result) static void reversi_genlog(ChessInfo* info, FILE* fp, ChessGameResult result) { + char buf[ANSILINELEN] = ""; const int nStep = info->history.used; - int i; + int i, x, y; - if (big_picture) + getyx(&y, &x); for (i = 2; i <= 21; i++) - fprintf(fp, "%.*s\n", big_picture[i].len, big_picture[i].data); + { + move(i, 0); + inansistr(buf, sizeof(buf)-1); + fprintf(fp, "%s\n", buf); + } + move(y, x); fprintf(fp, "\n"); fprintf(fp, "按 z 可進入打譜模式\n"); -- cgit v1.2.3