fix index calc bug in palette.set_color

This commit is contained in:
Irmen de Jong 2021-09-28 23:12:59 +02:00
parent 9acec4d952
commit 4bd4733e52

View File

@ -9,7 +9,7 @@ palette {
ubyte c
sub set_color(ubyte index, uword color) {
vera_palette_ptr = $fa00+index*2
vera_palette_ptr = $fa00+(index as uword * 2)
cx16.vpoke(1, vera_palette_ptr, lsb(color))
vera_palette_ptr++
cx16.vpoke(1, vera_palette_ptr, msb(color))