SBSPSS/data/Scripts/test.scr
2000-12-22 17:10:46 +00:00

66 lines
811 B
Plaintext

#include data/scripts/defs/defs.scr
#include data/scripts/defs/charanim.scr
/*
_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();
$tmp5=50;
do{
_drawSprite(4,$tmp5,50,10);
$tmp5=$tmp5+20;
$tmp0=$tmp0-1;
}while($tmp0>0);
_drawSprite(0,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);
pause;
}
stop;