summaryrefslogtreecommitdiffstats
path: root/mbbsd/dark.c
diff options
context:
space:
mode:
authorptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-04-24 04:14:20 +0800
committerptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-04-24 04:14:20 +0800
commitb282f3c6dca2a15ef4da7ee6c1f970e5ae926b67 (patch)
treef56efde1e7cab917738b51472fc83df42c2cbf69 /mbbsd/dark.c
parent8e3a8b2bcaadc819bf4bfa5fd7d36d8701d2076c (diff)
downloadpttbbs-b282f3c6dca2a15ef4da7ee6c1f970e5ae926b67.tar
pttbbs-b282f3c6dca2a15ef4da7ee6c1f970e5ae926b67.tar.gz
pttbbs-b282f3c6dca2a15ef4da7ee6c1f970e5ae926b67.tar.bz2
pttbbs-b282f3c6dca2a15ef4da7ee6c1f970e5ae926b67.tar.lz
pttbbs-b282f3c6dca2a15ef4da7ee6c1f970e5ae926b67.tar.xz
pttbbs-b282f3c6dca2a15ef4da7ee6c1f970e5ae926b67.tar.zst
pttbbs-b282f3c6dca2a15ef4da7ee6c1f970e5ae926b67.zip
reoragnize functions
mprints, pprints -> mouts remove useless refresh, pressanykey(), sleep,... git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1833 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/dark.c')
-rw-r--r--mbbsd/dark.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/mbbsd/dark.c b/mbbsd/dark.c
index 60f64dbd..65fd85ab 100644
--- a/mbbsd/dark.c
+++ b/mbbsd/dark.c
@@ -34,7 +34,7 @@ brdswap(sint y, sint x, sint ly, sint lx)
}
static void
-pprints(sint y, sint x, char *s)
+mouts(sint y, sint x, char *s)
{
move(y, x);
clrtoeol();
@@ -370,11 +370,11 @@ main_dark(int fd, userinfo_t * uin)
if (currutmp->turn) {
brd_rand();
send(fd, &brd, sizeof(brd), 0);
- pprints(21, 0, " ¡»§A¬O¥ý¤â");
- pprints(22, 0, " ¡»½ü¨ì§A¤U¤F");
+ mouts(21, 0, " ¡»§A¬O¥ý¤â");
+ mouts(22, 0, " ¡»½ü¨ì§A¤U¤F");
} else {
recv(fd, &brd, sizeof(brd), 0);
- pprints(21, 0, " ¡»§A¬O«á¤â");
+ mouts(21, 0, " ¡»§A¬O«á¤â");
}
move(12, 3);
prints("%s[0³Ó0±Ñ]¢þ¢û.%s[0³Ó0±Ñ]", currutmp->userid, currutmp->mateid);
@@ -412,20 +412,20 @@ main_dark(int fd, userinfo_t * uin)
break;
}
if (curr.end == -3)
- pprints(23, 30, "\033[33m­n¨D¦X´Ñ\033[m");
+ mouts(23, 30, "\033[33m­n¨D¦X´Ñ\033[m");
else if (curr.end == -4)
- pprints(23, 30, "\033[33m­n¨D´«Ãä\033[m");
+ mouts(23, 30, "\033[33m­n¨D´«Ãä\033[m");
else if (curr.end == -5)
- pprints(23, 30, "\033[33m­n¨D³s¦Y\033[m");
+ mouts(23, 30, "\033[33m­n¨D³s¦Y\033[m");
else
- pprints(23, 30, "");
+ mouts(23, 30, "");
recv(fd, &brd, sizeof(brd), 0);
my = curr.y;
mx = curr.x;
redraw();
if (curr.end)
- pprints(22, 0, " ¡»½ü¨ì§A¤U¤F");
+ mouts(22, 0, " ¡»½ü¨ì§A¤U¤F");
move(cury[my], curx[mx]);
} else {
if (currutmp->turn == 'p') {
@@ -434,7 +434,7 @@ main_dark(int fd, userinfo_t * uin)
currutmp->turn = 'e';
break;
} else {
- pprints(23, 30, "");
+ mouts(23, 30, "");
*buf = 0;
currutmp->turn = (uin->turn) ? 0 : 1;
}
@@ -442,17 +442,17 @@ main_dark(int fd, userinfo_t * uin)
if (ch == 'y') {
currutmp->color = (currutmp->color == '1') ? '0' : '1';
uin->color = (uin->color == '1') ? '0' : '1';
- pprints(21, 0, (currutmp->color == '1') ? " \033[1;33m¡»§A«ù¬õ¦â´Ñ\033[m" : " \033[1;33m¡»§A«ù¶Â¦â´Ñ\033[m");
+ mouts(21, 0, (currutmp->color == '1') ? " \033[1;33m¡»§A«ù¬õ¦â´Ñ\033[m" : " \033[1;33m¡»§A«ù¶Â¦â´Ñ\033[m");
} else {
- pprints(23, 30, "");
+ mouts(23, 30, "");
currutmp->turn = (uin->turn) ? 0 : 1;
}
} else if (currutmp->turn == 'g') {
if (ch == 'y') {
cont = 1;
- pprints(21, 0, " \033[1;33m¡»§A«ù¬õ¦â´Ñ\033[m ¥i³s¦Y");
+ mouts(21, 0, " \033[1;33m¡»§A«ù¬õ¦â´Ñ\033[m ¥i³s¦Y");
} else {
- pprints(23, 30, "");
+ mouts(23, 30, "");
currutmp->turn = (uin->turn) ? 0 : 1;
}
}
@@ -460,7 +460,7 @@ main_dark(int fd, userinfo_t * uin)
if (uin->turn == 'g') {
cont = 1;
uin->turn = (currutmp->turn) ? 0 : 1;
- pprints(21, 10, "¥i³s¦Y");
+ mouts(21, 10, "¥i³s¦Y");
}
end = playing(fd, currutmp->color - '0', ch, &go_on, uin);
@@ -493,12 +493,12 @@ main_dark(int fd, userinfo_t * uin)
continue;
}
if (!i && currutmp->color == '1') {
- pprints(21, 0, " \033[1;33m¡»§A«ù¬õ¦â´Ñ\033[m");
+ mouts(21, 0, " \033[1;33m¡»§A«ù¬õ¦â´Ñ\033[m");
i++;
move(cury[my], curx[mx]);
}
if (!i && currutmp->color == '0') {
- pprints(21, 0, " \033[1;33m¡»§A«ù¶Â¦â´Ñ\033[m");
+ mouts(21, 0, " \033[1;33m¡»§A«ù¶Â¦â´Ñ\033[m");
i++;
move(cury[my], curx[mx]);
}
@@ -540,7 +540,7 @@ main_dark(int fd, userinfo_t * uin)
}
break;
case -3:
- pprints(22, 0, "¦X´Ñ­ò!! ¤U¦¸¦b¤À°ª¤U§a ^_^");
+ mouts(22, 0, "¦X´Ñ­ò!! ¤U¦¸¦b¤À°ª¤U§a ^_^");
break;
default:
add_io(0, 0);