mirror of
https://github.com/irmen/prog8.git
synced 2024-07-10 23:29:02 +00:00
fix index calc bug in palette.set_color
This commit is contained in:
parent
9acec4d952
commit
4bd4733e52
@ -9,7 +9,7 @@ palette {
|
|||||||
ubyte c
|
ubyte c
|
||||||
|
|
||||||
sub set_color(ubyte index, uword color) {
|
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))
|
cx16.vpoke(1, vera_palette_ptr, lsb(color))
|
||||||
vera_palette_ptr++
|
vera_palette_ptr++
|
||||||
cx16.vpoke(1, vera_palette_ptr, msb(color))
|
cx16.vpoke(1, vera_palette_ptr, msb(color))
|
||||||
|
Loading…
Reference in New Issue
Block a user