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

png2sprite produces lowercase hex that doesn't copy-paste into BASIC #79

Open
Robert-Lloyd3 opened this issue Nov 7, 2019 · 0 comments

Comments

@Robert-Lloyd3
Copy link

Robert-Lloyd3 commented Nov 7, 2019

Line 113:
if args.f == 'acme' or args.f == 'basic': file.write("$%02x" % best)

Writes to file:
10007 DATA $00,$00,$00,__$bc__,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00

Pastes to BASIC:
10007 DATA $00,$00,$00,__$|-__,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00

LIST outputs:
10007 DATA $00,$00,$00,__$__,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00

Changing the string formatting to use capital-letter-X HEX formatting will fix output for BASIC, but I don't know if this will fix or break ACME:
if args.f == 'acme' or args.f == 'basic': file.write("$%02X" % best)

I don't use ACME. Can someone verify and submit the best fix to keep this DRY?

Thanks.

@Robert-Lloyd3 Robert-Lloyd3 changed the title png2spirte produces lowercase hex that doesn't copy-paste into BASIC png2sprite produces lowercase hex that doesn't copy-paste into BASIC Nov 7, 2019
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

No branches or pull requests

1 participant