Just playing about with below code, what am I doing wrong?
Or is it just a pc artifact? I haven't deployed to my gp2x yet.
---------
program thingy2;
global
score[1];
id1;
id2;
gr_ball;
gr_bullet;
begin
set_title("thingy!!!!!");
full_screen = false;
gr_ball = new_map(10,10,8);
map_clear(0,gr_ball,13);
gr_bullet = new_map(5,5,8);
map_clear(0,gr_bullet,13);
set_mode(m320x240);
x=0;
id1=write(0,0,100,1,"Hello");
SET_TEXT_COLOR(25);
id2=write(0,300,50,1,"Something else");
task();
while (x20)
//delete_text(0);
x+=1;
MOVE_TEXT(id1,x,100);
Frame 50;
If (Key(_enter)) Return; End
end;
Loop
Frame;
If (Key(_enter)) Return; End
end;
end
Process task()
begin
x = 160;
y = 120;
graph = gr_ball;
loop
If (Key(_right)) x+=1; End
If (Key(_left)) x-=1; End
If (Key(_down)) y+=1; End
If (Key(_up)) y-=1; End
If (Key(_space)) bullet(x,y); End
Frame;
end;
end
Process bullet(myx,myy)
begin
x=myx;
y=myy;
graph = gr_bullet;
while (y>0)
y--;
Frame 15;
end;
end;
Or is it just a pc artifact? I haven't deployed to my gp2x yet.
---------
program thingy2;
global
score[1];
id1;
id2;
gr_ball;
gr_bullet;
begin
set_title("thingy!!!!!");
full_screen = false;
gr_ball = new_map(10,10,8);
map_clear(0,gr_ball,13);
gr_bullet = new_map(5,5,8);
map_clear(0,gr_bullet,13);
set_mode(m320x240);
x=0;
id1=write(0,0,100,1,"Hello");
SET_TEXT_COLOR(25);
id2=write(0,300,50,1,"Something else");
task();
while (x20)
//delete_text(0);
x+=1;
MOVE_TEXT(id1,x,100);
Frame 50;
If (Key(_enter)) Return; End
end;
Loop
Frame;
If (Key(_enter)) Return; End
end;
end
Process task()
begin
x = 160;
y = 120;
graph = gr_ball;
loop
If (Key(_right)) x+=1; End
If (Key(_left)) x-=1; End
If (Key(_down)) y+=1; End
If (Key(_up)) y-=1; End
If (Key(_space)) bullet(x,y); End
Frame;
end;
end
Process bullet(myx,myy)
begin
x=myx;
y=myy;
graph = gr_bullet;
while (y>0)
y--;
Frame 15;
end;
end;