출구 정렬
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
번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|
57 | 특수 아이템 만들기 | 그리움 | 2007.04.12 | 253 |
56 | 몹과 자신을 "비교" | 그리움 | 2007.04.12 | 219 |
55 | 패거리 전쟁시 적과 아군 구분 | 그리움 | 2007.04.12 | 216 |
54 | 순위 소스 | 그리움 | 2007.04.12 | 215 |
53 | 개량형 우체국 | 그리움 | 2007.04.12 | 228 |
52 | 명성치 도입 | 그리움 | 2007.04.12 | 229 |
51 | 자기 아파트 방설명은 자기가 #2 | 그리움 | 2007.04.12 | 222 |
50 | 이동력 추가하기 | 그리움 | 2007.04.12 | 225 |
49 | 경매 소스 | 그리움 | 2007.04.12 | 217 |
48 | 글자색, 배경색 15색 사용하기 | 그리움 | 2007.04.12 | 213 |
47 | Ctrl+Enter 패치하기 | 그리움 | 2007.04.12 | 198 |
46 | 패거리 상점 만들기 | 그리움 | 2007.04.12 | 199 |
45 | 귀환장소 설정 | 그리움 | 2007.04.12 | 228 |
» | 출구 정렬 | 그리움 | 2007.04.12 | 222 |
43 | 게시판 검색 기능 추가하기 | 그리움 | 2007.04.12 | 207 |
42 | 암호 *****로 보이게 하기 | 그리움 | 2007.04.12 | 215 |
41 | 레벨을 32767까지 가능하게 | 그리움 | 2007.04.12 | 236 |
40 | 잡담 안시 사용하기 | 그리움 | 2007.04.12 | 236 |
39 | 지도 소스 #2 | 그리움 | 2007.04.12 | 230 |
38 | 베팅소스 | 그리움 | 2007.04.12 | 242 |