spritesheet
a utility for drawing sprite data from a BMP loaded in a buffer to a display
new spritesheet([options])Options
| Name | Type | Default | Description |
|---|---|---|---|
| buffername | symbol | the UInt8 buffer to load BMP sprite data from | |
| initialheight | Index | The pixel height of a sprite | |
| initialwidth | Index | The pixel width of a sprite |
Methods
bind(displaybuffer, displaydata): out1
Arguments
| Name | Type | Default | Description |
|---|---|---|---|
| displaybuffer | UInt8BufferRef | ||
| displaydata | array<Index, 5> |
Returns
| Name | Type | Description |
|---|---|---|
| out1 |
cols(): out1
Returns
| Name | Type | Description |
|---|---|---|
| out1 | Index |
count(): out1
Returns
| Name | Type | Description |
|---|---|---|
| out1 | Index |
draw(sprite, pixel_x, pixel_y): out1
Arguments
| Name | Type | Default | Description |
|---|---|---|---|
| sprite | Index | ||
| pixel_x | Int | ||
| pixel_y | Int |
Returns
| Name | Type | Description |
|---|---|---|
| out1 | bool | returns true if it can successfully given the various formats etc |
draw_code(code, pixel_x, pixel_y): out1
Arguments
| Name | Type | Default | Description |
|---|---|---|---|
| code | Index | ||
| pixel_x | Int | ||
| pixel_y | Int |
Returns
| Name | Type | Description |
|---|---|---|
| out1 | bool | returns true if it can successfully given the various formats etc |
height(): out1
Returns
| Name | Type | Description |
|---|---|---|
| out1 | Int |
next(): void
reset(): void
rows(): out1
Returns
| Name | Type | Description |
|---|---|---|
| out1 | Index |
setspritesize(width, height): out1
Arguments
| Name | Type | Default | Description |
|---|---|---|---|
| width | Index | ||
| height | Index |
Returns
| Name | Type | Description |
|---|---|---|
| out1 |
valid(): out1
Returns
| Name | Type | Description |
|---|---|---|
| out1 | bool |
width(): out1
Returns
| Name | Type | Description |
|---|---|---|
| out1 | Int |