There are many ways to implement this, but the present here only use one scaler. The idea is to display picture A, and blend picture B to back buffer many times until only picture B is visible. This can be expressed in pseudo-code like this:
load_image(A)
flip_buff(X, Y)
MoveAndScaleRectangles(A->Y)
flip_buff(Y, X)
MoveAndScaleRectangles(A->X)
load_image(B)
SetupChannel(ID_Z, B);
EnableAlphaFading(ID_Z);
while(A_is_visible)
{
flip_buff(X, Y);
SetupChannel(ID_X, X);
SetupChannel(ID_NX, Y);
SetupChannel(ID_Z, B);
AlphaPalette(1 to 255);
BlendAndScaleRectangles( B->Y);
}
0 意見:
張貼留言