Program testmodeseven;
GLOBAL
fpg_test;
color;
BEGIN
set_mode(m800x600);
set_fps(30,0);
fpg_test=load_fpg("test.fpg");
put_screen(fpg_test, 1);
start_mode7(0, fpg_test, 2, -1, 0, 0);
m7[0].color=10;
m7[0].camera=id;
m7[0].distance=20;
m7[0].height=165;
m7[0].focus=900;
ctype=c_m7;
resolution=100;
angle=90000;
x=36150;
y=107425;
write(0 ,20,30,3,"Mode 7 test demo");
write(0 ,20,50,3,"Current settings:");
write(0 ,20,60,3,"Height:");
write_int(0 ,80,60,3, &m7[0].height);
write(0 ,20,70,3,"Horizon:");
write_int(0 ,80,70,3, &m7[0].horizon);
write(0 ,20,80,3,"Focus:");
write_int(0 ,80,80,3, &m7[0].focus);
write(0 ,20,90,3,"X and Y:");
write_int(0 ,80,90,3, &X);
write_int(0 ,150,90,3 &y);
write_int(0 ,80,100,3, &angle);
write(0 ,20,70+50,3,"W S A D to steer");
write(0 ,20,80+50,3,"Up and down arrows to adjust height");
write(0 ,20,90+50,3,"Y and H to adjust horizon");
write(0 ,20,100+50,3,"I and K to adjust focus");
WHILE (NOT key(_esc))
IF (key(_w));
advance(250);
END
IF (key(_s));
advance(-250);
END
IF (key(_a));
angle+=5000;
END
IF (key(_d));
angle-=5000;
END
If (key(_up));
m7[0].height+=5;
End
If (key(_down));
m7[0].height-=5;
End
If (key(_Y));
m7[0].horizon+=100;
End
If (key(_H));
m7[0].horizon-=100;
End
If (key(_I));
m7[0].focus+=5;
End
If (key(_K));
m7[0].focus-=5;
End
FRAME;
END
stop_mode7(0);
let_me_alone();
END
|