コード例 #1
0
ファイル: fadeacross.cpp プロジェクト: foxblock/Pong
TransitionFadeAcross::TransitionFadeAcross( Stage* Target, int Frames )
{
	Stage* sourceStage = FRAMEWORK->ProgramStages->Current();
	targetStage = Target;

	transitionFrames = Frames;
	currentFrame = transitionFrames;

	sourceRender = al_create_bitmap( FRAMEWORK->Display_GetWidth(), FRAMEWORK->Display_GetHeight() );
	FRAMEWORK->Display_SetTarget( sourceRender );
	sourceStage->Render();
	targetRender = al_create_bitmap( FRAMEWORK->Display_GetWidth(), FRAMEWORK->Display_GetHeight() );
	FRAMEWORK->Display_SetTarget( targetRender );
	targetStage->Render();
	FRAMEWORK->Display_SetTarget();
}
コード例 #2
0
ファイル: fadeacross.cpp プロジェクト: pmprog/0Wave
TransitionFadeAcross::TransitionFadeAcross( Stage* Target, int Frames )
{
	Stage* sourceStage = FRAMEWORK->ProgramStages->Current();
	targetStage = Target;

	transitionFrames = Frames;
	currentFrame = 0;

	sourceRender = al_create_bitmap( DISPLAY->GetWidth(), DISPLAY->GetHeight() );
	DISPLAY->SetTarget( sourceRender );
	sourceStage->Render();
	targetRender = al_create_bitmap( DISPLAY->GetWidth(), DISPLAY->GetHeight() );
	DISPLAY->SetTarget( targetRender );
	targetStage->Render();
	DISPLAY->ClearTarget();
}