nsmryan / RustRoguelike

This Rust Roguelike is a Roguelike written in Rust.
17 stars 3 forks source link

SpriteSheets For Single Sprites #488

Open nsmryan opened 2 years ago

nsmryan commented 2 years ago

Currently the sprite sheet system doesn't really understand multiple vs single sprite lines in the atlas file. This is usually fine, but we use a weird way to determine whether the sprite is cut into multiple subsprites in a sheet.

This means that the UI in particular needs to track that it is not cut into subsprites, but the atlas file parsing does not understand this.

Consider: Checking sprite names for something ui related. Fixing them after they are parsed- ad-hoc but would work. Adding a way to specify whether sprites are sheets themselves or just a single image.

nsmryan commented 2 years ago

This change would simplify with automatically deriving parsing and printing for sprites, which would then be used for drawcmds.

nsmryan commented 2 years ago

I put in an ad-hoc fix for this where I just check for the word button in the sprite name.