sprito/example.py

18 lines
335 B
Python

#import the module
from sprito import *
#create indexed sprite
sprite = SpriteIndexed(8, 8, [0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08]*8)
#create raw sprite from sprite
raw_sprite = sprite.to_raw(PALLET_BYTE)
#draw indexed sprite
sprite.draw(0, 0, PALLET_BYTE)
#draw raw sprite
raw_sprite.draw(16, 0)
#display
show_screen()