As promised, I do have some more time at the moment, so here is the next chapter of the Fenix Tutorial
Fenix Tutorial Chapter 2
Fenix Tutorial Chapter 2
program moving_sprite; //name of your program
begin
graph_mode=mode_16bits; //16 bit modus
set_mode(m320x240); //gp32 resolution
set_fps(30,0); //frames per second, frameskip
load_fpg("sprite.fpg"); //loading a fpg into memory
sprite(160,120); //calling a process called sprite with x value (160) and y value (120)
end;
process sprite(x,y); //process called sprite
begin
graph=1; //uses the first graphic in the loaded fpg for this process
loop
x+=5; //moves this process (this sprite) 5 pixels to the right
if(x==320) //if this process reaches the 320th pixel,
x=0; //let it appear on the left side of the screen
end; //end the "if" case
frame;
end; //end loop
end; //end process