summaryrefslogtreecommitdiffstats
path: root/mbbsd/chess.c
diff options
context:
space:
mode:
authorscw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-08-18 01:03:48 +0800
committerscw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-08-18 01:03:48 +0800
commit5902b48489d6c12f430b07ac8746c96d7dbeedb1 (patch)
treeb1c3daa0bd8680890ba9f1a51deea091b2f031ec /mbbsd/chess.c
parent2de529f734a9db9813596e75a088b3de7d31dd70 (diff)
downloadpttbbs-5902b48489d6c12f430b07ac8746c96d7dbeedb1.tar
pttbbs-5902b48489d6c12f430b07ac8746c96d7dbeedb1.tar.gz
pttbbs-5902b48489d6c12f430b07ac8746c96d7dbeedb1.tar.bz2
pttbbs-5902b48489d6c12f430b07ac8746c96d7dbeedb1.tar.lz
pttbbs-5902b48489d6c12f430b07ac8746c96d7dbeedb1.tar.xz
pttbbs-5902b48489d6c12f430b07ac8746c96d7dbeedb1.tar.zst
pttbbs-5902b48489d6c12f430b07ac8746c96d7dbeedb1.zip
Don't move two steps when client is dbcs-awared.
(don't know if this is a good solution) git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3058 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/chess.c')
-rw-r--r--mbbsd/chess.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/mbbsd/chess.c b/mbbsd/chess.c
index bac430e0..226feadf 100644
--- a/mbbsd/chess.c
+++ b/mbbsd/chess.c
@@ -339,6 +339,9 @@ ChessPlayFuncMy(ChessInfo* info)
int endturn = 0;
ChessGameResult game_result = CHESS_RESULT_CONTINUE;
int ch;
+#ifdef DBCSAWARE
+ int move_count = 0;
+#endif
info->ipass = 0;
bell();
@@ -413,12 +416,30 @@ ChessPlayFuncMy(ChessInfo* info)
break;
case KEY_LEFT:
+#ifdef DBCSAWARE
+ if (!ISDBCSAWARE()) {
+ if (++move_count >= 2)
+ move_count = 0;
+ else
+ break;
+ }
+#endif /* defined(DBCSAWARE) */
+
info->cursor.c--;
if (info->cursor.c < 0)
info->cursor.c = info->constants->board_width - 1;
break;
case KEY_RIGHT:
+#ifdef DBCSAWARE
+ if (!ISDBCSAWARE()) {
+ if (++move_count >= 2)
+ move_count = 0;
+ else
+ break;
+ }
+#endif /* defined(DBCSAWARE) */
+
info->cursor.c++;
if (info->cursor.c >= info->constants->board_width)
info->cursor.c = 0;