2020-04-09 18:13:04 +02:00
|
|
|
#import the module
|
|
|
|
from sprito import *
|
|
|
|
|
|
|
|
#create indexed sprite
|
2020-04-12 18:28:39 +02:00
|
|
|
sprite = SpriteIndexed(8, 8, [0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08]*8)
|
2020-04-09 18:13:04 +02:00
|
|
|
|
|
|
|
#create raw sprite from sprite
|
2020-04-12 18:26:35 +02:00
|
|
|
raw_sprite = sprite.to_raw(PALLET_BYTE)
|
2020-04-09 18:13:04 +02:00
|
|
|
|
|
|
|
#draw indexed sprite
|
2020-04-12 18:26:35 +02:00
|
|
|
sprite.draw(0, 0, PALLET_BYTE)
|
2020-04-09 18:13:04 +02:00
|
|
|
|
|
|
|
#draw raw sprite
|
|
|
|
raw_sprite.draw(16, 0)
|
|
|
|
|
|
|
|
#display
|
2020-04-09 18:15:42 +02:00
|
|
|
show_screen()
|