Open flaki opened 8 years ago
static PROGMEM const byte title_sprites[64 * 2 * 3] = { ... }
The above image sprite is 64 x ( 23(8) ) = /*64x48*/
in dimensions. 64 could be used to guess the width, then the rest can be calculated from byte_count / 64 * 8
.
Improve detection of sprite dimensions in the editor.
[ ] Add support for inline (non-commented-out) sprite sizes:
(check for decimal integers in first two bytes, check if the rest of the bytes checks out length-wise with the hint, and if yes, use as dimensions hint but discard first two bytes while creating the pixel bitmap)
[ ] Add support for sizing multi-frame sprites properly:
(initially, just make sure these work, later add animation/frame-by-frame editing in sprite editor)
[ ] Add binary constant support (these formats also usually hint at sprite dimensions):
drawImage
commands/similar patterns that use the defined image and specify image dimensions)[ ] Further improve declaration parser
Accept
static
, also bothunsigned char
andbyte
, ignore length specifier between the brackets (or maybe use it for sprite hinting)The PROGMEM pragma could be all over the place, like after the variable name:
Also there might be a space before the
[]
specifier: