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(); }
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(); }