Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 'list' subcommand for palette, imageset, sprite, tilemap and bitmap elements #17

Merged
merged 1 commit into from
May 25, 2020

Conversation

CJLove
Copy link
Contributor

@CJLove CJLove commented May 23, 2020

Just getting my feet wet with Rust :). This PR adds a list subcommand for the above elements so the user running aloevera interactively on a project file can see a summary of what elements exist.

Sample output (logging elided):

> aloevera -p /tmp/test.av palette list
Palettes:
  kq5_pal: 256 colors

> aloevera -p /tmp/test.av bitmap list
Bitmaps:
  kq5_bmp: width 320 depth 8

> aloevera -p /tmp/test.av imageset list
Image sets:
  kq5_screen: 1 320x100 frames depth 8

> aloevera -p /tmp/chopper.av sprite list
Sprites:
  chopper_sprite: 64x32 depth 4

> aloevera -p /tmp/chopper.av tilemap list
Tilemaps:
  chopper_tilemap: map 128x64 tiles 8x8 mode Tile4BPP

@yeastplume
Copy link
Owner

yeastplume commented May 25, 2020

Looks great, especially if it's your first time out with Rust!

It might be an idea to have a list 'all' command as well that outputs all elements in the file. The current data is just dumbly serialized to a very unnecessarily chunky json format, and I think addressing #2 will involve writing a custom serde binary serialiser which will mean we'll need to have commands to output the contents of a project file. So very handy to have this in place before that work is done.

@yeastplume yeastplume merged commit f95adad into yeastplume:master May 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants