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

Allow custom charmaps #34

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

BlueAnthem37510
Copy link

Allows user to set custom character map(s) using the RGBDS character mapping

Should hopefully satisfy issue #33 also? :)

To use this a path to the file containing the character map(s) is added to the command. This file will be copied to the disassembly and included in game.asm

To mark which text should use the custom character map ":cm" is added to the end of the text label otherwise it will use the default to handle text. Additionally ",[index]" may be used after this to specify which character map should be used if there are multiple.

Please see below for example using Dragon Warrior Monsters.

Command line
image

Symbols
image

Character map file
image

Disassembly
image

game.asm
image

Copy link
Collaborator

@ISSOtm ISSOtm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello! Thank you for the PR. I really like the idea!

However, before reviewing the code itself, I would like to iterate on the design (mostly the syntax) a little.

Noteworthy also is that RGBDS v0.9.0 has added multi-value charmaps (CHARMAP "<br>", 13, 10), which may be a little more complicated to handle, since you'd start needing leftmost-longest semantics. (As mentioned above, I haven't looked at the implementation, so I don't know if you have implemented such support.)

@BlueAnthem37510
Copy link
Author

Hi @ISSOtm thank you for checking my pr and the suggestions!

I had been waiting for multi character support to be added forever I can't believe I missed that! Makes the text look so much cleaner.
image
image

Regarding the syntax I've compromised a little (or perhaps overdoing it?) by allowing "cm" or "charmap" and indexing or the character map name
image

I added some warnings also if the user makes a typo or an out of range index, I'm happy for this to be handled a different way though.
image

Let me know what you think!

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.

2 participants