sync on
sync rate 60
autocam off

load effect "RM.fx",1,0
vec = make vector4(1)
set vector4 1,20,20,-100,0.0
set effect constant vector 1,"lightpos",1

load image "jetnorm.png",1,1

Load object "jet.x",1
texture object 1,1,1


set object effect 1,1

Loop object 1,0,40
set object speed 1,30
position camera 0,10,-40

yrotate object 1,90
gosub init_bloom
cc = 0
Do

if spacekey()
   if cc = 0 then cc = 1 else cc = 0
   Loop object 1,60,72
   set object speed 1,30
else
   if upkey()
      Loop object 1,0,40
      set object speed 1,40
   else
      Loop object 1,50,60
      set object speed 1,8
   endif
endif

XX# = Wrapvalue(XX# + (MouseMoveY()/4.0))
ZZ# = ZZ# + MouseMoveZ()/4.0
position object 1,0,0,ZZ#
if cc = 0 then YY# = Wrapvalue(YY# + (MouseMoveX()/4.0)) else YY# = Wrapvalue(YY# + 0.5)
Yrotate object 1,YY#
Xrotate object 1,XX#
gosub update_bloom
sync
loop

