출구 정렬
2007.04.12 13:02
제 목:[초보] 무한대전 출구 부분...
올린이:muhan (김준식 ) 99/01/05 11:21 읽음:347 관련자료 있음(TL)
-----------------------------------------------------------------------------
/* 무한대전에서의 출구 생성부분 개량
*
* 현재운영중인 무한대전 또는 "무한대전 소스를 수정한 머드"들 중에서
* 상업적으로 사용되는 곳을 제외하면, 누구나 이소스를 사용할수 있습니다.
*
* 설명: 출구 그래프가.. 1바이트에서 2바이트로 나옴...
* 또, 동 서 남 북 위 밑 으로 출구이름이 정열됨... ^^
* 방제목만 가운데로 몰림...
* 설명을 제대로 못드리겠네여... 그냥 추가하시면 알게됨..
*
* 나머지는 각 무한대전에 알맞게 수정하셔서 쓰시면 됩니다.
*
* 1999년 1월 5일 By Muhan.
*/
/**********************************************************************/
/* display_rom */
/**********************************************************************/
void display_rom(ply_ptr, rom_ptr)
creature *ply_ptr;
room *rom_ptr;
{
xtag *xp;
ctag *cp;
otag *op;
creature *crt_ptr;
char str[2048];
int fd, n=0, m, t, light = 0;
int name_check, leng; /* 추가 */
char exit_1[3][6]={ " ", " ", " ", }; /* 추가 */
char exit_2[2][20]={ "", "", }; /* 추가 */
char exit_3[4][4]={ " ", " ", " ", " ", }; /* 추가 */
char exit_4[6][4]={ "", "", "", "", "", "", }; /* 추가 */
int n2;
/* 생략 */
if(!F_ISSET(ply_ptr, PNORNM)) {
/* 가운데로 방이름만 정렬 시킴 */
ANSI(fd, CYAN);
print(fd, "==");
leng = strlen(cut_space(rom_ptr->name));
if(leng < 59) {
print(fd, " ");
for(name_check=0; name_check < (59-leng)/2; name_check++) {
print(fd, " ");
}
printa(fd, "%s", cut_space(rom_ptr->name));
for(name_check=0; name_check < (59-leng)/2; name_check++) {
print(fd, " ");
}
print(fd, " ");
}
print(fd, "==");
ANSI(fd, WHITE);
/* 생략 */
else {
n=n2=0;
str[0] = 0;
xp = rom_ptr->first_ext;
while(xp) {
if(!F_ISSET(xp->ext, XSECRT) && !F_ISSET(xp->ext, XNOSEE)
&& (F_ISSET(ply_ptr, PDINVI) ? 1 : !F_ISSET(xp->ext, XINVIS))) {
if(!strcmp(xp->ext->name, "동")) {
strcpy(exit_3[0], "▷");
strcpy(exit_4[0], "동 ");
}
else
if(!strcmp(xp->ext->name, "서")) {
strcpy(exit_3[1], "◁");
strcpy(exit_4[1], "서 ");
}
else
if(!strcmp(xp->ext->name, "남")) {
strcpy(exit_3[2], "▽");
strcpy(exit_4[2], "남 ");
}
else
if(!strcmp(xp->ext->name, "북")) {
strcpy(exit_3[3], "△");
strcpy(exit_4[3], "북 ");
}
else
if(!strcmp(xp->ext->name, "위"))
strcpy(exit_4[4], "위 ");
else
if(!strcmp(xp->ext->name, "밑"))
strcpy(exit_4[5], "밑 ");
else {
strcat(str, xp->ext->name);
strcat(str, " ");
n++;
}
n2++;
}
xp = xp->next_tag;
}
if(!n2) {
ANSI(fd, CCCYA);
print(fd, "\n ○ ");
ANSI(fd, CCWHI);
print(fd, " 갈수 있는 방향은");
ANSI(fd, CCGRE);
print(fd, " *출구없음* ");
ANSI(fd, CCWHI);
print(fd, "입니다.\n");
}
else {
ANSI(fd, CCCYA);
strcpy(exit_1[0], " ");
strcat(exit_1[0], exit_3[3]);
strcat(exit_1[0], "");
print(fd, "%s\n", exit_1[0]);
strcpy(exit_1[1], exit_3[1]);
strcat(exit_1[1], "○");
strcat(exit_1[1], exit_3[0]);
print(fd, "%s", exit_1[1]);
strcat(exit_2[0], exit_4[0]);
strcat(exit_2[0], exit_4[1]);
strcat(exit_2[0], exit_4[2]);
strcat(exit_2[0], exit_4[3]);
strcat(exit_2[0], exit_4[4]);
strcat(exit_2[0], exit_4[5]);
strcat(exit_2[0], str);
ANSI(fd, CCWHI);
print(fd, " 갈수 있는 출구는");
ANSI(fd, CCGRE);
print(fd, " %s", exit_2[0]);
ANSI(fd, CCWHI);
print(fd, "입니다.\n");
ANSI(fd, CCCYA);
strcpy(exit_1[2], " ");
strcat(exit_1[2], exit_3[2]);
strcat(exit_1[2], "");
print(fd, "%s\n", exit_1[2]);
ANSI(fd, CCWHI);
}
}
/* 생략 */
이상입니다.
..^^..
-초보-
홈지기 "그륨"
올린이:muhan (김준식 ) 99/01/05 11:21 읽음:347 관련자료 있음(TL)
-----------------------------------------------------------------------------
/* 무한대전에서의 출구 생성부분 개량
*
* 현재운영중인 무한대전 또는 "무한대전 소스를 수정한 머드"들 중에서
* 상업적으로 사용되는 곳을 제외하면, 누구나 이소스를 사용할수 있습니다.
*
* 설명: 출구 그래프가.. 1바이트에서 2바이트로 나옴...
* 또, 동 서 남 북 위 밑 으로 출구이름이 정열됨... ^^
* 방제목만 가운데로 몰림...
* 설명을 제대로 못드리겠네여... 그냥 추가하시면 알게됨..
*
* 나머지는 각 무한대전에 알맞게 수정하셔서 쓰시면 됩니다.
*
* 1999년 1월 5일 By Muhan.
*/
/**********************************************************************/
/* display_rom */
/**********************************************************************/
void display_rom(ply_ptr, rom_ptr)
creature *ply_ptr;
room *rom_ptr;
{
xtag *xp;
ctag *cp;
otag *op;
creature *crt_ptr;
char str[2048];
int fd, n=0, m, t, light = 0;
int name_check, leng; /* 추가 */
char exit_1[3][6]={ " ", " ", " ", }; /* 추가 */
char exit_2[2][20]={ "", "", }; /* 추가 */
char exit_3[4][4]={ " ", " ", " ", " ", }; /* 추가 */
char exit_4[6][4]={ "", "", "", "", "", "", }; /* 추가 */
int n2;
/* 생략 */
if(!F_ISSET(ply_ptr, PNORNM)) {
/* 가운데로 방이름만 정렬 시킴 */
ANSI(fd, CYAN);
print(fd, "==");
leng = strlen(cut_space(rom_ptr->name));
if(leng < 59) {
print(fd, " ");
for(name_check=0; name_check < (59-leng)/2; name_check++) {
print(fd, " ");
}
printa(fd, "%s", cut_space(rom_ptr->name));
for(name_check=0; name_check < (59-leng)/2; name_check++) {
print(fd, " ");
}
print(fd, " ");
}
print(fd, "==");
ANSI(fd, WHITE);
/* 생략 */
else {
n=n2=0;
str[0] = 0;
xp = rom_ptr->first_ext;
while(xp) {
if(!F_ISSET(xp->ext, XSECRT) && !F_ISSET(xp->ext, XNOSEE)
&& (F_ISSET(ply_ptr, PDINVI) ? 1 : !F_ISSET(xp->ext, XINVIS))) {
if(!strcmp(xp->ext->name, "동")) {
strcpy(exit_3[0], "▷");
strcpy(exit_4[0], "동 ");
}
else
if(!strcmp(xp->ext->name, "서")) {
strcpy(exit_3[1], "◁");
strcpy(exit_4[1], "서 ");
}
else
if(!strcmp(xp->ext->name, "남")) {
strcpy(exit_3[2], "▽");
strcpy(exit_4[2], "남 ");
}
else
if(!strcmp(xp->ext->name, "북")) {
strcpy(exit_3[3], "△");
strcpy(exit_4[3], "북 ");
}
else
if(!strcmp(xp->ext->name, "위"))
strcpy(exit_4[4], "위 ");
else
if(!strcmp(xp->ext->name, "밑"))
strcpy(exit_4[5], "밑 ");
else {
strcat(str, xp->ext->name);
strcat(str, " ");
n++;
}
n2++;
}
xp = xp->next_tag;
}
if(!n2) {
ANSI(fd, CCCYA);
print(fd, "\n ○ ");
ANSI(fd, CCWHI);
print(fd, " 갈수 있는 방향은");
ANSI(fd, CCGRE);
print(fd, " *출구없음* ");
ANSI(fd, CCWHI);
print(fd, "입니다.\n");
}
else {
ANSI(fd, CCCYA);
strcpy(exit_1[0], " ");
strcat(exit_1[0], exit_3[3]);
strcat(exit_1[0], "");
print(fd, "%s\n", exit_1[0]);
strcpy(exit_1[1], exit_3[1]);
strcat(exit_1[1], "○");
strcat(exit_1[1], exit_3[0]);
print(fd, "%s", exit_1[1]);
strcat(exit_2[0], exit_4[0]);
strcat(exit_2[0], exit_4[1]);
strcat(exit_2[0], exit_4[2]);
strcat(exit_2[0], exit_4[3]);
strcat(exit_2[0], exit_4[4]);
strcat(exit_2[0], exit_4[5]);
strcat(exit_2[0], str);
ANSI(fd, CCWHI);
print(fd, " 갈수 있는 출구는");
ANSI(fd, CCGRE);
print(fd, " %s", exit_2[0]);
ANSI(fd, CCWHI);
print(fd, "입니다.\n");
ANSI(fd, CCCYA);
strcpy(exit_1[2], " ");
strcat(exit_1[2], exit_3[2]);
strcat(exit_1[2], "");
print(fd, "%s\n", exit_1[2]);
ANSI(fd, CCWHI);
}
}
/* 생략 */
이상입니다.
..^^..
-초보-
홈지기 "그륨"
댓글 0
번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|
77 | *괴물이름 방폭 버그 수정 | 그리움 | 2007.04.12 | 533 |
76 | 연타기능 - 직업별 연타 | 그리움 | 2007.04.12 | 479 |
75 | 게시판 버그 해결 방법. | 그리움 | 2007.04.12 | 470 |
74 | 연타기능 - 연타수 자동 | 그리움 | 2007.04.12 | 447 |
73 | 무한대전 방 데이터 Convert | 그리움 | 2007.11.23 | 423 |
72 | 주민등록번호 검사 소스 | 그리움 | 2007.04.12 | 420 |
71 | 몹 소환하여 소환몹이 대신 싸우게 하기 | 그리움 | 2007.11.23 | 398 |
70 | 물건, 몹의 번호 찾아내기. | 그리움 | 2007.07.04 | 392 |
69 | 감옥/퇴소 | 그리움 | 2007.04.12 | 338 |
68 | 개척 소스 | 그리움 | 2007.04.12 | 302 |
67 | 머드에서 몹 심기 | 그리움 | 2007.04.12 | 287 |
66 | 온라인 리붓 | 그리움 | 2007.04.12 | 287 |
65 | 방전체 공격루틴 #2 | 그리움 | 2007.04.12 | 287 |
64 | 이동하는 몹 | 그리움 | 2007.04.12 | 283 |
63 | 프롬프트 그래프화 #2 | 그리움 | 2007.04.12 | 280 |
62 | 낚시 | 그리움 | 2007.04.12 | 280 |
61 | 운영자명령 "보고" | 그리움 | 2007.04.12 | 280 |
60 | Mordor에 있는 몹 소환 소스 | 그리움 | 2007.04.12 | 277 |
59 | 프롬프트 그래프화 | 그리움 | 2007.04.12 | 271 |
58 | 귀환장소 수정판 | 그리움 | 2007.04.12 | 263 |