示例#1
0
int sted()
{
	for(;;)
	{
		clear();
		refresh();
		wprintw(stdscr, "To add a character type press 1.\nTo view an character type press 4.\nTo save the enemy file press 7.\nTo save the enemy file under a different name press 8.\nTo edit enemies press 9\nTo delete a character type press 0.\n");
		input [0] = bie();
		if(input[0] == '1')
			addst();
		if(input[0] == '4')
			viewst();
		if(input[0] == '7')
			savest(filename);
		if(input[0] == '8')
		{
			stufffilename();
			savest(filename);
		}
		if(input[0] == '9')
			break;
		if(input[0] == '.')
			plusone(3);
		if(input[0] == ',')
			minusone(3);
		if(input[0] == '/')
			checkone(3);
		if(input[0] == '0')
			clearst();
		wprintw(stdscr, "Press any key to continue.\n");
		bie();
	}
	return 0;
}
示例#2
0
int itgred()
{
	for(;;)
	{
		clear();
		refresh();
		wprintw(stdscr, "To add an item group press 1.\nTo view an item group press 4.\nTo save the enemy file press 7.\nTo save the enemy file under a different name press 8.\nTo edit items press 9\nTo delete an item group press 0.\n");
		input [0] = bie();
		if(input[0] == '1')
			additgr();
		if(input[0] == '4')
			viewitgr();
		if(input[0] == '7')
			saveen(filename);
		if(input[0] == '8')
		{
			stufffilename();
			saveen(filename);
		}
		if(input[0] == '9')
			break;
		if(input[0] == '.')
			plusone(6);
		if(input[0] == ',')
			minusone(6);
		if(input[0] == '/')
			checkone(6);
		if(input[0] == '0')
			clearitgr();
		wprintw(stdscr, "Press any key to continue.\n");
		bie();
	}
	if(input[0] == '9')
		ited();
	return 0;
}
示例#3
0
int chared()
{
	for(;;)
	{
		clear();
		refresh();
		wprintw(stdscr, "To add a character press 1.\nTo view a character press 4.\nTo save the enemy file press 7.\nTo save the enemy file under a different name press 8.\nTo edit equations press 9\nTo delete a character press 0.\n");
		input [0] = bie();
		if(input[0] == '1')
			addcha();
		if(input[0] == '4')
			viewch();
		if(input[0] == '7')
			saveen(filename);
		if(input[0] == '8')
		{
			stufffilename();
			saveen(filename);
		}
		if(input[0] == '9')
			break;
		if(input[0] == '.')
			plusone(1);
		if(input[0] == ',')
			minusone(1);
		if(input[0] == '/')
			checkone(1);
		if(input[0] == '0')
			clearch();
		wprintw(stdscr, "Press any key to continue.\n");
		bie();
	}
	if(input[0] == '9')
		eqed();
	return 0;
}
示例#4
0
void DreamGenContext::obname(uint8 command, uint8 commandType) {
	if (data.byte(kReasseschanges) == 0) {
		if ((commandType == data.byte(kCommandtype)) && (command == data.byte(kCommand))) {
			if (data.byte(kWalkandexam) == 1) {
				walkandexamine();
				return;
			} else if (data.word(kMousebutton) == 0)
				return;
			else if ((data.byte(kCommandtype) == 3) && (data.byte(kLastflag) < 2))
				return;
			else if ((data.byte(kManspath) != data.byte(kPointerspath)) || (data.byte(kCommandtype) == 3)) {
				setwalk();
				data.byte(kReasseschanges) = 1;
				return;
			} else if (! finishedwalkingCPP())
				return;
			else if (data.byte(kCommandtype) == 5) {
				if (data.word(kWatchingtime) == 0)
					talk();
				return;
			} else {
				if (data.word(kWatchingtime) == 0)
					examineob();
				return;
			}
		}
	} else
		data.byte(kReasseschanges) = 0;

	data.byte(kCommand) = command;
	data.byte(kCommandtype) = commandType;
	if ((data.byte(kLinepointer) != 254) || (data.word(kWatchingtime) != 0) || (data.byte(kFacing) != data.byte(kTurntoface))) {
		blocknametext();
		return;
	} else if (data.byte(kCommandtype) != 3) {
		if (data.byte(kManspath) != data.byte(kPointerspath)) {
			walktotext();
			return;
		} else if (data.byte(kCommandtype) == 3) {
			blocknametext();
			return;
		} else if (data.byte(kCommandtype) == 5) {
			personnametext();
			return;
		} else {
			examineobtext();
			return;
		}
	}
	if (data.byte(kManspath) == data.byte(kPointerspath)) {
		uint8 flag, flagEx, type, flagX, flagY;
		checkone(data.byte(kRyanx) + 12, data.byte(kRyany) + 12, &flag, &flagEx, &type, &flagX, &flagY);
		if (flag < 2) {
			blocknametext();
			return;
		}
	}

	getflagunderp();
	if (data.byte(kLastflag) < 2) {
		blocknametext();
		return;
	} else if (data.byte(kLastflag) >= 128) {
		blocknametext();
		return;
	} else {
		walktotext();
		return;
	}
}
示例#5
0
void DreamGenContext::getflagunderp(uint8 *flag, uint8 *flagEx) {
	uint8 type, flagX, flagY;
	checkone(data.word(kMousex) - data.word(kMapadx), data.word(kMousey) - data.word(kMapady), flag, flagEx, &type, &flagX, &flagY);
	cl = data.byte(kLastflag) = *flag;
	ch = data.byte(kLastflagex) = *flagEx;
}