program istappen; global //Sets global variables score=0; hiscore; level=8; mm7=9; time=0; bkg; de=0; ani=1; begin //Starts the program repeat //Loops the main code let_me_alone(); //Kills all processes clear_screen(); //Removes all gfx delete_text(0); //Deletes all text set_title ("Istappen EX + Alpha 2 : Turbo Edition"); //Set windowtext (if running on computer) score=0; level=10; mm7=9; time=0; de=0; load("score.dat",hiscore); //Loads scores from file score.dat set_mode(320,240,8); //Sets graphic mode. Resolution x,y and colordepth load_fpg("istapp.fpg"); //Loads graphics title(); //Calls process title write_int(0,110,102,0,&hiscore); //Prints highscore on screen loop //Waits for keypress if (key(_space)) break; end //Breaks the loop and continues the program frame; end //Updates the screen let_me_alone(); delete_text(0); write_int(0,0,0,0,&score); start_mode7(0,0,2,2,0,64); //Starts mode 7. number, file, graphic, background, screen region, horizon m7.focus=160; //Different parameters for the Mode 7 field. m7.height=60; m7.distance=0; m7.camera=ctr(); //Makes the process "ctr" the camera ctype=c_m7; backg(); //Calls the processes used ingame man(); cloud(); cloud2(); cloud3(); cloud4(); loop //Main Loop if (rand(0,100)305) //This prevents the player from moving x=x-4; //outside the screen end frame; //Updates the screen. Without this the end //graphics won't show up end process tapp(x) //This process takes the x value from begin //where it was called graph=4; y=-75; //Sets the icicle above the screen repeat //so you won't see when it appears if (collision(TYPE tapp)); //Checks if an icicle hits another icicle return; //If it does, return to main loop and do no end //continue to draw this icicle if (collision(TYPE man)); //Checks if the icicle hits the player de=1; //de=1 will end the main loop end y=y+5; //Moves icicle down frame; until (y>245); //Until it has reached the bottom of the screen end process pack(x) //Works in the same was as the icicle begin graph=5; y=-75; repeat if (collision(TYPE tapp)); return; end if (collision(TYPE man)); score=score+500; return; end y=y+5; frame; until (y>245); end process cloud() //Creates a cloud for a nice background effect begin graph=7; x=-50; //Starts outside the screen y=25; repeat x=x+2; frame; if (x>355); //and moves to the right until it has reached x=-50; //the edge of the screen. y=rand(10,35); //It will then get a new y-value end until (y<0) end process cloud2() begin graph=8; x=100; y=10; repeat x=x+1; frame; if (x>355); x=-50; y=rand(10,35); end until (y<0) end process cloud3() begin graph=9; x=250; y=15; repeat x=x+1; frame; if (x>355); x=-50; y=rand(10,35); end until (y<0) end process backg() //The mode7 background begin ctype=c_m7; x=100; y=100; loop frame; end end process cloud4() begin graph=10; x=175; y=35; repeat x=x+3; frame; if (x>355); x=-50; y=rand(10,35); end until (y<0) end process ctr(); //Mode7 camera begin x=100; y=100; loop if (key(_left)) //Moves just as the player does y=y-2; end if (key(_right)) y=y+2; end if (y<35) y=y+2; end if (y>163) y=y-2; end PUT(bkg,001,30+y,50); //The 2d-background, which also moves frame; end end process title(); //Displays the title-screen begin x=160; y=120; graph=11; loop frame; end end