Vydělávej až 160.000 Kč měsíčně! Akreditované rekvalifikační kurzy s garancí práce od 0 Kč. Více informací.
Hledáme nové posily do ITnetwork týmu. Podívej se na volné pozice a přidej se do nejagilnější firmy na trhu - Více informací.

pageturn

room_transition FX

cpp

/*
SPECIÁLNÍ EFEKT PŘECHODU MEZI MÍSTNOSTMI - OTÁČENÍ STRÁNKY
*/
//pageturn(surface_previous,surface_next,width, heigth, fraction);

var surface_previous;
surface_previous=argument0;
var surface_next;
surface_next=argument1;
var surface_width;
surface_width=argument2;
var surface_height;
surface_height=argument3;
var fraction;
fraction=argument4;

var y_line, shadow, shadow_alpha, alphabackup;


shadow=20;
shadow_alpha=0.5;
alphabackup=draw_get_alpha();
alphashine=0.5;
y_line= -shadow + fraction*(surface_width+(2*shadow));  //<0,width>


//most bottom new frame
draw_surface_general(surface_next,0,0,y_line,surface_height,0,0,1,1,0,c_white,c_white,c_white,c_white,1);
//draw_shadow
draw_set_alpha(shadow_alpha);
draw_rectangle_color(y_line-shadow,0,y_line,surface_height,c_black,c_black,c_black,c_black,0);
draw_set_alpha(alphabackup);
//middle layer = rest of previous frame
draw_surface_general(surface_previous,y_line,0,surface_width-y_line,surface_height,y_line,0,1,1,0,c_white,c_white,c_white,c_white,1);
//topmost previous turned frame
draw_surface_general(surface_previous,0,0,y_line,surface_height,2*y_line,0,-1,1,0,c_white,c_white,c_white,c_white,1);
//draw_shine
draw_set_alpha(alphashine);
draw_rectangle_color(y_line,0,2*y_line,surface_height,c_black,c_white,c_white,c_black,0);
draw_set_alpha(alphabackup);

return(y_line);

Neformátovaný

Přidáno: 20.10.2013
Expirace: Neuvedeno

Avatar
Autor: TomBen
Aktivity