Esempio n. 1
0
void BmsPlayer::bmsSoundTest(){
	ChronoTimer timer, calcflame;
	FpsTimer fps;
	std::vector<int> i(1296, 0);

	while (ProcessMessage() == 0){
		play_channel_sound(1, timer.GetLapTime());
		for (int j = 11; j < 20; j++){
			play_channel_sound(j, timer.GetLapTime());
		}

		// TODO : play_channel_graph関数がめっちゃ重い
		//i.at(4) += play_channel_graph(4, i.at(4), timer.GetLapTime());

		if (calcflame.GetLapTime() >= (1.0 / GetRefreshRate()) * 1000000){
			DrawFormatString(0, 0, GetColor(255, 255, 255), "SoundTest");
			DrawFormatString(0, 15, GetColor(255, 255, 255), "GENRE : %s", parser->getHeader("GENRE").c_str());
			DrawFormatString(0, 30, GetColor(255, 255, 255), "TITLE : %s", parser->getHeader("TITLE").c_str());
			DrawFormatString(0, 45, GetColor(255, 255, 255), "ARTIST: %s", parser->getHeader("ARTIST").c_str());
			DrawFormatString(0, 60, GetColor(255, 255, 255), "BPM   : %s", parser->getHeader("BPM").c_str());
			DrawFormatString(0, 75, GetColor(255, 255, 255), "TIME  : %d", timer.GetLapTime());
			DrawFormatString(0, 90, GetColor(255, 255, 255), "内部FPS : %d", fps.GetLapTime());
			DrawFormatString(0, 120, GetColor(255, 255, 255), "解像度 : %d(us)", fps.GetDiff());
			DrawFormatString(0, 135, GetColor(255, 255, 255), "RefLate : %d", GetRefreshRate());

			ScreenFlip();
			ClearDrawScreen();
			calcflame.ResetTime();
			fps.ResetTime();
		}
	}

	InitSoundMem();
}
Esempio n. 2
0
BEGIN_INANITY_GRAPHICS

DxgiMonitorMode::DxgiMonitorMode(const DXGI_MODE_DESC& desc)
: desc(desc)
{
	// generate a name of monitor mode
	std::ostringstream stream;

	// width, height
	stream << GetWidth() << 'x' << GetHeight();
	// format
	switch(desc.Format)
	{
	case DXGI_FORMAT_R8G8B8A8_UNORM:
		stream << ", 32 bit";
		break;
	case DXGI_FORMAT_B5G6R5_UNORM:
		stream << ", 16 bit";
		break;
	}

	// refresh rate
	stream << ", " << GetRefreshRate() << " Hz";

	// scanline ordering
	switch(desc.ScanlineOrdering)
	{
	case DXGI_MODE_SCANLINE_ORDER_PROGRESSIVE:
		stream << ", progressive";
		break;
	case DXGI_MODE_SCANLINE_ORDER_UPPER_FIELD_FIRST:
		stream << ", interlaced upper-first";
		break;
	case DXGI_MODE_SCANLINE_ORDER_LOWER_FIELD_FIRST:
		stream << ", interlaced lower-first";
		break;
	}

	// scaling
	switch(desc.Scaling)
	{
	case DXGI_MODE_SCALING_CENTERED:
		stream << ", centered";
		break;
	case DXGI_MODE_SCALING_STRETCHED:
		stream << ", stretched";
		break;
	}

	name = stream.str();
}
Esempio n. 3
0
QVariantMap UIDirect3D9Window::GetDisplayDetails(void)
{
    QVariantMap result;
    QSize mm = GetPhysicalSize();
    QSize pixels = GetSize();

    result.insert("refreshrate", GetRefreshRate());
    result.insert("widthmm", mm.width());
    result.insert("heightmm", mm.height());
    result.insert("aspectratio", (float)mm.width() / (float)mm.height());
    result.insert("widthpixels", pixels.width());
    result.insert("heightpixels", pixels.height());
    result.insert("renderer", "Direct3D9");
    result.insert("studiolevels", m_studioLevels);
    return result;
}
Esempio n. 4
0
void BmsPlayer::bmsPlay(){
	ChronoTimer calcflame;

	// メディアロード開始
	SetUseASyncLoadFlag(TRUE);
	setSoundToMem();
	setGraphToMem();

	SetUseASyncLoadFlag(FALSE);
	
	while (ProcessMessage() == 0 && GetASyncLoadNum() != 0){
		if (calcflame.GetLapTime() >= (1.0 / GetRefreshRate()) * 100000){
			system_graph.drawsystembg();
			system_graph.drawsystem();
			DrawFormatString(450, 60, GetColor(255, 255, 255), "GENRE : %s", parser->getHeader("GENRE").c_str());
			DrawFormatString(450, 75, GetColor(255, 255, 255), "TITLE : %s", parser->getHeader("TITLE").c_str());
			DrawFormatString(450, 90, GetColor(255, 255, 255), "ARTIST: %s", parser->getHeader("ARTIST").c_str());
			DrawFormatString(450, 105, GetColor(255, 255, 255), "BPM   : %s", parser->getHeader("BPM").c_str());
			DrawFormatString(450, 120, GetColor(255, 255, 255), "Loading...");

			ScreenFlip();
			ClearDrawScreen();
			calcflame.ResetTime();
		}
	}

	// ゲーム用タイマー
	input.ResetTime();

	// 入力関係
	Result score;

	int grph_i = 0;

	while (ProcessMessage() == 0)
	{
		// プレー処理
		play_channel_sound(1, input.GetLapTime());
		for (int j = 11; j < 20; j++){
			play_channel_sound(j, input.GetLapTime());
		}

		input.inputUpdate();
		checkJudge(input.GetLapTime());

		// 描画ブロック
		if (calcflame.GetLapTime() >= (1.0 / GetRefreshRate()) * 100000){
			system_graph.drawsystembg();

			SetDrawMode(DX_DRAWMODE_BILINEAR);
			grph_i += play_channel_graph(4, grph_i, input.GetLapTime());

			SetDrawMode(DX_DRAWMODE_NEAREST);

			drawInterface(input.GetLapTime());
			system_graph.drawsystem();

			DrawFormatString(150, 300, GetColor(255, 255, 255), "PERFECT %d", combo_debug);

			ScreenFlip();
			ClearDrawScreen();
			calcflame.ResetTime();
		}
	}

	// リザルトクラス呼び出しとか



	InitSoundMem();
}