SBSPSS/data/Scripts/test.scr

73 lines
924 B
Plaintext
Raw Normal View History

2000-12-20 21:15:24 +01:00
#include data/scripts/defs/defs.scr
#include data/scripts/defs/charanim.scr
2000-12-08 21:47:12 +01:00
2001-04-04 22:50:42 +02:00
#include out/usa/include/ingamefx.h
2001-01-02 17:02:35 +01:00
2000-12-08 21:47:12 +01:00
2000-12-22 18:10:46 +01:00
/*
_setCharacterAnimation(CHAR_SPONGEBOB,ANIM_QUIET);
_setText(123);
pause;
*/
2000-12-20 21:15:24 +01:00
#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)
{
2001-01-02 17:02:35 +01:00
// Readout for fps :)
2000-12-22 18:10:46 +01:00
$tmp0=_getFrameTime();
2001-01-10 18:27:12 +01:00
if($tmp0>10)$tmp0=10;
2000-12-22 18:10:46 +01:00
$tmp5=50;
do{
2001-01-02 17:02:35 +01:00
_drawSprite(FRM__BUTU,$tmp5,50,0);
2000-12-22 18:10:46 +01:00
$tmp5=$tmp5+20;
$tmp0=$tmp0-1;
}while($tmp0>0);
2000-12-20 23:46:12 +01:00
2001-01-02 17:02:35 +01:00
// Bouncy thing
_drawSprite(FRM__BUTC,x,y,100);
2000-12-20 21:15:24 +01:00
$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);
2001-01-02 17:02:35 +01:00
// End of frame..
2000-12-20 21:15:24 +01:00
pause;
}
2000-12-15 21:29:33 +01:00
stop;