Simple rotozoomers

Post Reply
User avatar
NightRadio
Site Admin
Posts: 2860
Joined: Fri Jan 23, 2004 12:28 am
Location: Ekaterinburg. Russia
Contact:

Simple rotozoomers

Post by NightRadio » Thu Sep 29, 2011 3:03 pm

Code: Select all

scr1 = get_screen()
scr2 = clone( scr1 )

clear( BLACK )

start:

t_scale( 1.1, 1.1, 1 )
t_rotate( 0 + (rand()&3)-1, 0, 0, 1 )
x = ( rand() & 3 ) - 1
y = ( rand() & 3 ) - 1
pixi( scr2, 0, 0 )
t_reset()
x = ( rand() & 15 ) - 7
y = ( rand() & 15 ) - 7
r = rand() & 255
g = rand() & 255
b = rand() & 255
c = get_color( r, g, b )
s = 1
fbox( x, y, s, s, c )

frame()

t = scr1
scr1 = scr2
scr2 = t
set_screen( scr1 )

while( get_event() ) { if EVT[ EVT_TYPE ] == EVT_QUIT { halt } }

go start

Code: Select all

cr1 = get_screen()
scr2 = clone( scr1 )

clear( BLACK )

start:

transp( 230 )
t_scale( 1.1, 1.1, 1 )
t_rotate( 0 + (rand()&3)-1, 0, 0, 1 )
x = ( rand() & 3 ) - 1
y = ( rand() & 3 ) - 1
pixi( scr2, 0, 0 )
t_reset()
transp( 256 )
x = ( rand() & 15 ) - 7
y = ( rand() & 15 ) - 7
r = rand() & 255
g = rand() & 255
b = rand() & 255
c = get_color( r, g, b )
s = 1
fbox( x, y, s, s, c )

frame()

t = scr1
scr1 = scr2
scr2 = t
set_screen( scr1 )

while( get_event() ) { if EVT[ EVT_TYPE ] == EVT_QUIT { halt } }

go start
Image

Post Reply