Пример #1
0
void awoken()
{
	add_output("As your eyes open, the haze departs and you've remembered everything. You're a bomb disposalistifier, in the UNITED NATIONS ARMY OF ELVES.");
	newline_output();
	add_output("In the foreground, is a large angry man shouting at you. In the background, there is a small robot spinning slowly round in circles.");
	get_command();
	add_output("OR .... ");
	add_output("> SLEEP");
	newline_output();
	add_output("You'd really love to sleep. You'd probably get in quite a bit of trouble for going to sleep in front of the Major though.");
	add_output("What are you going to do?");
	newline_output();
	get_command();
	while(!p3_get_up.compare(0, current_command))
	{
		p3_talk_to_major.respond(0, current_command);
		add_output("What are you going to do? (Note that everything seems to be at a strange angle)");
		get_command();
	}
	add_output("It suddenly clicks, that you are LYING on the EXPENSIVE BOMB DISPOSAL ROBOT's control system. You wake up here, like 3/5 times.");
	add_output("...");
	add_output("...");
	add_output("...");
	add_output("Ohmigosh.");	
	add_output("Well you've left yourself in a real doozy here. You've fallen asleep whilst DISPOSING OF A BOMB with your faithful BOMB DISPOSAL ROBOT.");
	add_output("The MAJOR is still ranting on about something. You decide to listen in.");
	continue_game();
	add_output("MAJOR: \"YOU BLOODY BUFFOON, I CAN\'T BELIEVE YOU FELL ASLEEP IN THE MIDDLE OF A CRITICAL BOMB DISPOSAL MISSION. THERE ARE LIVES ON THE LINE, AND YOUR BLOODY ROBOT IS JUST THERE DOING A GODDAMN JIG\"");
	continue_game();;
	add_output("You notice, again, that your robot is spinning in circles. You can't fault the MAJOR on this one, the robot is definitely doing some sort of dance.");
	add_output("MAJOR: \"ARE YOU EVEN LOGGED IN TO THE DAMN CONSOLE? SO HELP ME ELVEN GOD-KING, I WILL MAKE YOU RUN BASIC TRAINING AGAIN IF YOU DON\'T DEFUSE THIS BOMB IN THE NEXT 5 MINUTES\"");
	continue_game();
	add_output("You always thought it strange that everything the MAJOR said was some sort of KEY CLUE. However, you really don't want to run basic training again. That was a serious hassle.");
	newline_output();
	add_output("What do you want to do? (hint: you should probably try to LOG IN to the console, like the MAJOR says)");
	get_command();
	while(!p3_log_in.compare(0, current_command))
	{
		if(current_command.substr(0,4) == "SLAP")
		{
			add_output("You consider taking a good swing at the MAJOR, but with those BRISTLING MUSCLES, you think perhaps, that you might damage your hand in the process.");
			get_command();
		}
		// COME BACK TO THIS AND ADD S***E	
	}
	add_output("Good choice, you decide to LOG IN to the robots A.C.C.E.S.S. system"); 
	add_output("(fyi, that stands for Access Control Circuit Emulator Synchotron System)");
	add_output("((double fyi, yes, you know that is a stupid name))");
	newline_output();
}
Пример #2
0
void introduction()
{
	newline_output();
	newline_output();
	newline_output();
	add_output("Made by /bCIANb/ and /bFIONNb/ for MS-DOS", "c");
	add_output("Copyright (C) 1979.", "c");
  add_output("This is a text adventure game! There will be some text and some adventure.", "c");
  add_output("Acceptable commands are \"LISTEN\". Maybe there will be more, maybe there will be less.", "c");
  add_output("The adventure will start after a brief haiku...", "c");
	continue_game();
}
Пример #3
0
void Game::intro() {
	cout << "Welcome to Delver!" << endl;
	cout << "1. New Game" << endl;
	cout << "2. Continue" << endl;
	
	int user_input = utility::get_user_input(2);
	if (user_input == 1) {
		new_game();
	}
	else if (user_input == 2) {
		continue_game();
	}
}
Пример #4
0
void g1_human_class::think()
{
	i4_bool process_input = i4_T;

	if (playback_think())
	{
		process_input=i4_F;
	}


	g1_player_piece_class * stank = commander();
	if ((g1_current_controller->view.get_view_mode()!=G1_ACTION_MODE &&
		 g1_current_controller->view.get_view_mode()!=G1_FOLLOW_MODE))
	{
		process_input=i4_F;
	}

	if (!process_input) //are we controlling the stank?
	{
		g1_input.deque_time(g1_input_class::LEFT);
		g1_input.deque_time(g1_input_class::RIGHT);
		g1_input.deque_time(g1_input_class::UP);
		g1_input.deque_time(g1_input_class::DOWN);
		g1_input.deque_time(g1_input_class::STRAFE_LEFT);
		g1_input.deque_time(g1_input_class::STRAFE_RIGHT);
		g1_input.deque_time(g1_input_class::STRAFE_UP);
		g1_input.deque_time(g1_input_class::STRAFE_DOWN);
		g1_input.deque_time(g1_input_class::ZOOM_IN);
		g1_input.deque_time(g1_input_class::ZOOM_OUT);
		g1_input.deque_time(g1_input_class::ZOOM_LEFT);
		g1_input.deque_time(g1_input_class::ZOOM_RIGHT);

		g1_input.deque_time(g1_input_class::ZOOM_UP);
		g1_input.deque_time(g1_input_class::ZOOM_DOWN);
//	if (g1_current_controller->view.get_view_mode()==G1_STRATEGY_MODE)
//		{
//		g1_resources.startegy_camera_dist+=(strategy_up-strategy_down)*G1_HZ/1000.0f;
//		if (g1_resources.startegy_camera_dist<=0.1f) g1_resources.startegy_camera_dist=0.1f;
//		g1_resources.startegy_camera_angle+=(strategy_out-strategy_in)*G1_HZ/1000.0f;
//		if (g1_resources.startegy_camera_angle<=0.1f) g1_resources.startegy_camera_angle=0.1f;
//		}
	}
	else
	{
		//keys are buffered in the order pressed, so do a reversed comparison
		if (memcmp(g1_input.grab_cheat_keys(),"DOG",3)==0)
		{
			g1_input.clear_cheat_keys();
			if (stank)
			{
				stank->toggle_stank_flag(g1_player_piece_class::ST_GODMODE);
			}
		}

		//This would actually belong the receive_event() function of
		//the border frame class, but it needs to be executed regardless
		//of wheter an event is outstanding.
		if (g1_border.get())
		{
			i4_float heh;
			i4_float cx=g1_border->last_mouse_x();
			i4_float lx=g1_border->prev_mouse_x();
			i4_float cy=g1_border->last_mouse_y();
			i4_float ly=g1_border->prev_mouse_y();
			if (cy<7)
			{
				heh=-0.2f;
			}
			else if (cy>(g1_border->height()-7))
			{
				heh=0.2f;
			}
			else
			{
				heh = ((cy - ly)*0.01f);
			}
			mouse_look_increment_y += heh;

			//if (mev->x<5)
			//  heh=-1.0f;
			//else if (mev->x>(width()-5))
			//  heh=1.0f;
			//else
			//if (mev->x>20&&mev->x<(width()-20))
			//    heh = (((sw32)mev->x - (sw32)mev->lx)*0.01f);
			//else
			//  heh=0;

			if (cx<20)
			{
				heh=-0.1f;
			}
			else if (cx>(g1_border->width()-20))
			{
				heh=0.1f;
			}
			else
			{
				heh = ((cx - lx)*0.01f);
			}
			mouse_look_increment_x += heh;
			g1_border->clear_mouse_move();
		}
		g1_map_piece_class * whofor=controlled();


		sw32
		left_ms=g1_input.deque_time(g1_input_class::LEFT),
		right_ms=g1_input.deque_time(g1_input_class::RIGHT),
		up_ms=g1_input.deque_time(g1_input_class::UP),
		down_ms=g1_input.deque_time(g1_input_class::DOWN),
		sleft_ms=g1_input.deque_time(g1_input_class::STRAFE_LEFT),
		sright_ms=g1_input.deque_time(g1_input_class::STRAFE_RIGHT);
		sw32 sup_ms=g1_input.deque_time(g1_input_class::STRAFE_UP);
		sw32 sdown_ms=g1_input.deque_time(g1_input_class::STRAFE_DOWN);
		sw32 zoom_in=g1_input.deque_time(g1_input_class::ZOOM_IN),
			 zoom_out=g1_input.deque_time(g1_input_class::ZOOM_OUT),
			 zoom_left=g1_input.deque_time(g1_input_class::ZOOM_LEFT),
			 zoom_right=g1_input.deque_time(g1_input_class::ZOOM_RIGHT),
			 zoom_up=g1_input.deque_time(g1_input_class::ZOOM_UP),
			 zoom_down=g1_input.deque_time(g1_input_class::ZOOM_DOWN);

		look(mouse_look_increment_x, mouse_look_increment_y,whofor);
		mouse_look_increment_y = mouse_look_increment_x = 0;
		turn( g1_resources.player_turn_speed*(left_ms-right_ms)*G1_HZ/1000.0f, whofor );
		accelerate( (up_ms-down_ms)*G1_HZ/1000.0f,whofor);
		strafe( (sright_ms-sleft_ms)*G1_HZ/1000.0f,
			   (sup_ms-sdown_ms)*G1_HZ/1000.0f,whofor);
		if (g1_current_controller->view.get_view_mode()==G1_FOLLOW_MODE)
		{
			g1_resources.follow_camera_dist+=(zoom_out-zoom_in)*G1_HZ/1000.0f;
			if (g1_resources.follow_camera_dist<=0.5f)
			{
				g1_resources.follow_camera_dist=0.5f;
			}
			g1_resources.follow_camera_height+=(zoom_up-zoom_down)*G1_HZ/1000.0f;
			g1_resources.follow_camera_rotation+=(zoom_right-zoom_left)*G1_HZ/1000.0f;
		}

		//if (sright_ms>0)
		//  sright_ms=sright_ms+1;

		if (g1_input.button_1())
		{
			fire0(whofor);
		}
		if (g1_input.button_2())
		{
			fire1(whofor);
		}
		if (g1_input.button_3())
		{
			fire2(whofor);
		}
	}


	if (g1_input.key_pressed)
	{
		continue_game();
	}

	g1_input.key_pressed=i4_F;
}