73 lines
923 B
Plaintext
73 lines
923 B
Plaintext
#include data/scripts/defs/defs.scr
|
|
#include data/scripts/defs/charanim.scr
|
|
|
|
#include out/usa/include/sprites.h
|
|
|
|
|
|
/*
|
|
_setCharacterAnimation(CHAR_SPONGEBOB,ANIM_QUIET);
|
|
_setText(123);
|
|
pause;
|
|
*/
|
|
|
|
|
|
#define x $tmp1
|
|
#define y $tmp2
|
|
#define vx $tmp3
|
|
#define vy $tmp4
|
|
#define velocity 5
|
|
|
|
x=100;
|
|
y=100;
|
|
vx=velocity;
|
|
vy=velocity;
|
|
while(1==1)
|
|
{
|
|
// Readout for fps :)
|
|
$tmp0=_getFrameTime();
|
|
if($tmp0>10)$tmp0=10;
|
|
$tmp5=50;
|
|
do{
|
|
_drawSprite(FRM__BUTU,$tmp5,50,0);
|
|
$tmp5=$tmp5+20;
|
|
$tmp0=$tmp0-1;
|
|
}while($tmp0>0);
|
|
|
|
|
|
// Bouncy thing
|
|
_drawSprite(FRM__BUTC,x,y,100);
|
|
$tmp0=_getFrameTime();
|
|
do
|
|
{
|
|
x=x+vx;
|
|
if(x>512)
|
|
{
|
|
vx=0-velocity;
|
|
x=x-velocity;
|
|
}
|
|
else if(x<0)
|
|
{
|
|
vx=velocity;
|
|
x=x+velocity;
|
|
}
|
|
|
|
y=y+vy;
|
|
if(y>256)
|
|
{
|
|
vy=0-velocity;
|
|
y=y-velocity;
|
|
}
|
|
else if(y<0)
|
|
{
|
|
vy=velocity;
|
|
y=y+velocity;
|
|
}
|
|
$tmp0=$tmp0-1;
|
|
}
|
|
while($tmp0>0);
|
|
|
|
|
|
// End of frame..
|
|
pause;
|
|
}
|
|
stop; |