Esempio n. 1
0
void Sys::disp_frame()
{
	if( sys.signal_exit_flag )
		return;

	if( option_menu.is_active() )
	{
		// ##### begin Gilbert 3/11 ######//
		option_menu.disp(need_redraw_flag);
		// ##### end Gilbert 3/11 ######//
		blt_virtual_buf();
	}
	else
	{
		// -------- re-draw the whole screen if needed, such as after task switching ---------//

		if( need_redraw_flag )
		{
			info.disp_panel();
			world.paint();
			disp_button();
			world.refresh();
			disp_view();

			if( in_game_menu.is_active() )
			{
				vga.use_back();
				in_game_menu.disp();
				vga.use_front();
			}

			vga_util.blt_buf(0,0, VGA_WIDTH-1, VGA_HEIGHT-1, 0);
			// ###### begin Gilbert 4/11 ######//
			disp_view_mode();
			// ###### end Gilbert 4/11 ######//

			info.disp();
		}
		else
		{
			update_view();
			info.update();
		}

		//--------- display the map and info area --------//

		disp_map();

		blt_virtual_buf();

		//---------- display help ----------//

		if( !remote.is_enable() )		// help is only available in a single player game as it has to pause the game
			help.disp();
	}
	// ####### end Glbert 24/10 #######//

	anim_line.inc_phase();		// originally in Sys::process()

	need_redraw_flag = 0;
}
Esempio n. 2
0
// 入力検知から画面の描画までのループ(ゲーム本体に近い)
int Display::game_loop(int IsContinue)
{
	Character character;
	IsometricView iso;

	// プレイヤーの初期位置は一つ目の部屋の左上
	character.player_coordinate_init();
	LATEST_HIT_DIRECT = character.player_input();
	// IsometricView表示
	if(IsQuarter == IDYES){
		//iso.DisplayIsometricView();

		IsContinue = IDYES;
		while(ProcessMessage() == 0 /*&& CheckHitKey(KEY_INPUT_ESCAPE) == 0*/)
		{
			//ClearDrawScreen();
			LATEST_HIT_DIRECT = character.player_input();

			if(character.player_move() == GAME_OVER){
				// プレイヤーの移動先が空間かtailの時ゲームオーバー
				return MessageGameOver();
			}

			ClearDrawScreen();
			iso.DisplayIsometricView();

			LATEST_HIT_DIRECT = character.player_input();
			//ScreenFlip(); 
			// 残りのアイテムが無くなったらクリア
			if(LeftItemNum == 0){
				return MessageEnding();
			}
		}
	}

	// IsometricViewでない時
	if(IsQuarter == IDNO){
		//disp_map();
		LATEST_HIT_DIRECT = character.player_input();
		IsContinue = IDYES;
		while(ProcessMessage() == 0 /*&& CheckHitKey(KEY_INPUT_ESCAPE) == 0*/)
		{
			//ClearDrawScreen();
			LATEST_HIT_DIRECT = character.player_input();

			character.player_input();
			if(character.player_move() == GAME_OVER){
				// プレイヤーの移動先が空間かtailの時ゲームオーバー
				return MessageGameOver();
			}

			ClearDrawScreen();
			disp_map();
			
			LATEST_HIT_DIRECT = character.player_input();
			//ScreenFlip(); 
			// 残りのアイテムが無くなったらクリア
			if(LeftItemNum == 0){
				return MessageEnding();
			}
		}
	}

	return 0;
}