Пример #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();
}
Пример #2
0
Parent::~Parent()
{
	delete mChild;
	mChild = 0;

	InitGraph();
	InitSoftImage();
	InitSoundMem();
	InitFontToHandle();
}
Пример #3
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();
}
Пример #4
0
bool SoundManager::DieMain()
{
	InitSoundMem();
	return true;
}