Exemplo n.º 1
0
//ロード
void Scene::Load() {
	if (loadFlag == 2)
		return;

	if (loadFlag == 0) {
		ContentLoad();
		loadFlag = 1;
	}

	if (loadFlag == 1 && GetASyncLoadNum() == 0) {
		viewFlag = TRUE;
		loadFlag = 2;
	}
}
Exemplo n.º 2
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();
}