city41 / sromcrom

Graphics pipeline tool for Neo Geo development
GNU General Public License v3.0
11 stars 2 forks source link

tileset auto animation support #2

Closed city41 closed 11 months ago

city41 commented 2 years ago

Tilesets need to support auto animation. This will be very similar to how cromImages support it, but each individual tile is examined to see if it needs it.

A tileset specifies it wants auto animation with the autoAnimation?: 4 | 8 key. If this key is present, then the provided png is divided into 4 or 8 frames, depending on the value. When generating the tile sources for this tileset, need to examine frames 1-n for each tile. If all the frames are empty (alpha=0), then this particular tile does not have auto animation. If any tile is not empty, then slurp them up as child frames for this source. From there the existing auto animation system will take over.

During tileset code emit, need to also emit the autoAnimation flag, but I think that will already happen.

city41 commented 11 months ago

This is now in 0.13.0