From 32aef93553362699206b564cbd34d367d177fdb7 Mon Sep 17 00:00:00 2001 From: scw Date: Thu, 13 Nov 2008 17:08:20 +0000 Subject: Enable chess country for reversi git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4416 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- include/pttstruct.h | 3 ++- mbbsd/admin.c | 5 +++-- util/chesscountry.c | 4 ++++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/include/pttstruct.h b/include/pttstruct.h index 1c7df5d8..74c61199 100644 --- a/include/pttstruct.h +++ b/include/pttstruct.h @@ -230,7 +230,8 @@ typedef struct boardheader_t { /* 256 bytes */ #define CHESSCODE_FIVE 1 #define CHESSCODE_CCHESS 2 #define CHESSCODE_GO 3 -#define CHESSCODE_MAX 3 +#define CHESSCODE_REVERSI 4 +#define CHESSCODE_MAX 4 #endif /* defined(CHESSCOUNTRY) */ diff --git a/mbbsd/admin.c b/mbbsd/admin.c index 4706f999..5629c52d 100644 --- a/mbbsd/admin.c +++ b/mbbsd/admin.c @@ -639,8 +639,9 @@ m_mod_board(char *bname) #ifdef CHESSCOUNTRY if (HasUserPerm(PERM_SYSOP)) { snprintf(genbuf, sizeof(genbuf), "%d", bh.chesscountry); - if (getdata_str(16, 0, "設定棋國 (0)無 (1)五子棋 (2)象棋 (3)圍棋", ans, - sizeof(ans), NUMECHO, genbuf)){ + if (getdata_str(16, 0, + "設定棋國 (0)無 (1)五子棋 (2)象棋 (3)圍棋 (4) 黑白棋", + ans, sizeof(ans), NUMECHO, genbuf)){ newbh.chesscountry = atoi(ans); if (newbh.chesscountry > CHESSCODE_MAX || newbh.chesscountry < CHESSCODE_NONE) diff --git a/util/chesscountry.c b/util/chesscountry.c index 51f0baa3..c3665e5d 100644 --- a/util/chesscountry.c +++ b/util/chesscountry.c @@ -78,6 +78,10 @@ main(void) photo_fname = "photo_go"; chess_name = "圍棋"; break; + case CHESSCODE_REVERSI: + photo_fname = "photo_reversi"; + chess_name = "黑白棋"; + break; default: continue; } -- cgit v1.2.3