flaki / clouduboy

In-browser game editor for the web & microcontrollers
http://twitter.com/clouduboy
MIT License
35 stars 3 forks source link

Improve sprite detection #20

Open flaki opened 8 years ago

flaki commented 8 years ago

Improve detection of sprite dimensions in the editor.

flaki commented 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.