refreshed examples

This commit is contained in:
Irmen de Jong 2020-03-14 18:11:24 +01:00
parent 1de328b2e8
commit d28dd92b47
28 changed files with 12 additions and 12 deletions

View File

@ -16,7 +16,7 @@ sub start() {
void c64.CHRIN()
c64.CLEARSCR()
while true {
forever {
uword note
for note in notes {
ubyte note1 = lsb(note)

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -19,7 +19,7 @@ main {
sub start() {
float time=0.0
while true {
forever {
rotate_vertices(time)
c64scr.clear_screenchars(32)
draw_edges()
@ -78,7 +78,7 @@ main {
for i in 0 to len(xcoor)-1 {
rz = rotatedz[i]
if rz >= 0.1 {
persp = (5.0+rz)/height
persp = (5.0+rz)/(height as float)
sx = rotatedx[i] / persp + width/2.0 as ubyte
sy = rotatedy[i] / persp + height/2.0 as ubyte
c64scr.setcc(sx, sy, 46, i+2)
@ -88,7 +88,7 @@ main {
for i in 0 to len(xcoor)-1 {
rz = rotatedz[i]
if rz < 0.1 {
persp = (5.0+rz)/height
persp = (5.0+rz)/(height as float)
sx = rotatedx[i] / persp + width/2.0 as ubyte
sy = rotatedy[i] / persp + height/2.0 as ubyte
c64scr.setcc(sx, sy, 81, i+2)

View File

@ -82,7 +82,7 @@ main {
uword angley
uword anglez
word rz=33
while true {
forever {
c64.TIME_LO=0
rotate_vertices(msb(anglex), msb(angley), msb(anglez))
position_sprites()

View File

@ -22,7 +22,7 @@ main {
uword angley
uword anglez
word rz=33
while true {
forever {
rotate_vertices(msb(anglex), msb(angley), msb(anglez))
c64scr.clear_screenchars(32)
draw_edges()

View File

@ -46,7 +46,7 @@ main {
if dx >= dy {
; TODO fix assembler problem when defining label here
while true {
forever {
c64scr.setcc(x, y, 42, 5)
if x==x2
return
@ -59,7 +59,7 @@ main {
}
} else {
; TODO fix assembler problem when defining label here
while true {
forever {
c64scr.setcc(x, y, 42, 5)
if y == y2
return

View File

@ -12,7 +12,7 @@ main {
; calculate primes
c64scr.print("prime numbers up to 255:\n\n")
ubyte amount=0
while true {
forever {
ubyte prime = find_next_prime()
if prime==0
break

View File

@ -8,7 +8,7 @@ main {
c64.SCROLY &= %11101111 ; blank the screen
c64utils.set_rasterirq_excl(40) ; register exclusive raster irq handler
while true {
forever {
; enjoy the moving bars :)
}

View File

@ -11,7 +11,7 @@ main {
float t
ubyte color
while true {
forever {
float x = sin(t)
float y = cos(t*1.1356)
ubyte xx=(x * width/2.2) + width/2.0 as ubyte

View File

@ -15,7 +15,7 @@ main {
Ball ball
while true {
forever {
ubyte x = msb(sin8u(msb(ball.anglex)) as uword * width)
ubyte y = msb(cos8u(msb(ball.angley)) as uword * height)
c64scr.setcc(x, y, 81, ball.color)