home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip: Shareware for Win 95
/
Chip-Shareware-Win95.bin
/
grafika
/
formula
/
killsold.sx_
/
killsold.sx
Wrap
Text File
|
1995-08-28
|
582b
|
31 lines
/////////////////////////////////
// KILL MUNGER Soldier ball
///////////////
message "Execute KILLMAIN"
return
initialize: bitmaps
s = new sprite
r = floor (rnd 3)
b = bitmaps get r
u,v = b.dim[1]/2,b.dim[0]/2
x,y = -u,-v
vx,vy = rnd 12 - 6, rnd 12 - 6
mvx,mvy = mod vx, mod vy
vx,vy = vx+mvx, vy+mvy
return @s
update_pos:
x = x + vx
y = y + vy
t = bound x,y to 0-u,GRAPHICS_XMAX+u; 0-u,GRAPHICS_YMAX+u mode TILE
call draw_frame
draw_frame:
b = bitmaps get r
sprite s bitmap b trans 0,255,0 at x-u,y-v depth y
get_pos:
return x,y