35 lines
447 B
Plaintext
35 lines
447 B
Plaintext
sprite dum [
|
|
` x x `
|
|
` x x `
|
|
` x x `
|
|
` `
|
|
`x x`
|
|
` xxxxxx `
|
|
]
|
|
|
|
fun main(): u8 {
|
|
var x = 0;
|
|
var y = 27;
|
|
var vx = 1;
|
|
var vy = 0;
|
|
var a = 1;
|
|
while(1) {
|
|
var draw_y = 32 - y;
|
|
draw_sprite(dum, x, draw_y);
|
|
set_delay(1);
|
|
while(get_delay()){}
|
|
|
|
vy = vy - a;
|
|
y = y + vy;
|
|
x = x + vx;
|
|
if(6-y) {
|
|
|
|
} else {
|
|
var vtemp = vy;
|
|
vy = 0 - vtemp;
|
|
vy = vy + 1;
|
|
}
|
|
clear();
|
|
}
|
|
}
|