Esempio n. 1
0
void main(){
    uint gametime=0;
    objectclass *otmp;
    srandom((long)time(NULL));
    randomizepotions();
    randomizescrolls();
    level lev1(1);
    char in;
    dungeon dun;
    hero u;
    monstclass *mon;    

    dun.setcurrentlev(&lev1);
    dun.sethero(&u);
    lev1.putmonat(&u,5,10);
    otmp=randompotion();
    lev1.putobj(otmp,5,12);
    otmp=randomscroll();
    lev1.putobj(otmp,5,13);
    //mon=new newt;
    //lev1.putmonat(mon,5,11);
   
    lev1.draw(u);
    in=cin.get();
    while(in!='Q'){
        switch (in){
            case 'h':
            case 'j':
            case 'k':
            case 'l':
            case 'y':
            case 'u':
            case 'b':
            case 'n':
            case '1':   
            case '2':
            case '3':
            case '4':
            case '6':
            case '7':
            case '8':
            case '9': dun.heromove(in);break;
            case 'i': u.inventory();break;
            case ',': u.pickup();break;
            case 'q': u.quaff();break;
            // case 'W':u.wear();break;
            // case 't':u.takeoff();break;
            // case 'r':y.remove();break;
            // case 'p':u.puton();break;
            case 'I':u.identify();break;
        };
        //lev1.draw();
        movehome();
        gametime=timer++;
        in=cin.get();
    }
    cout << "\x1b[37;0m" <<endl;
}
Esempio n. 2
0
void main(void)
{
	pr();	
	lev1();
	choose();
	system("cls");
	pr();
	gotoxy(1,11);
	printf("반드시 프로그램 경로까지 입력해야 하며( Ex. C:\\test.txt)");
	gotoxy(1,12);
	printf("AEGIS프로그램과 같은 폴더내에 있는 경우는 경로를 생략해도 됩니다.");
	gotoxy(1,14);
	printf("※ 파일 이름에 띄어쓰기가 있는 경우에는 올바르게 실행되지 않습니다!");
	gotoxy(1,8);
	printf("잠금 또는 잠금해제(암호화 또는 복호화)할 파일명(확장자 필수!!) : ");
	scanf("%s",&inf);
	ec();
}