Skip to content

convert palettes.asm to standard hex colors #465

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

Merged
merged 3 commits into from
Oct 26, 2022
Merged

Conversation

KelseyHigham
Copy link
Collaborator

@KelseyHigham KelseyHigham commented Oct 24, 2022

Closes #356! Thank you to @Calindro and @daid for help with this.

@@ -1370,712 +1370,718 @@ func_021_54F9::
pop de ; $5516: $D1
ret ; $5517: $C9


; These 6 object palettes are always in RAM while you're controlling Link

Data_021_5518::
Copy link
Collaborator

Choose a reason for hiding this comment

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

Perhaps rename this label, and the following ones with comments that indicate you've discovered what they're used for? For example

Suggested change
Data_021_5518::
GreenObjectPalette::

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, renaming the most obvious labels could be a nice addition, if you still have some bandwidth for this.

(But otherwise for me this PR already stands by itself: the documentation pass can also come later.)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, for sure!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ah, I wasn't sure whether they should be labeled by their identity, or by their usage. for example, I'm not sure if that label is intended to reference the green object palette specifically, or the group of 6 object palettes.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

depending on the code, it might make sense to have two labels there:

ObjectPalettes::
GreenObjectPalette::

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

and with the red and blue tunic, I wasn't sure if they should be labeled RedObjectPalette (what the palette is for) or RedTunicPalette (what the label is for).

Copy link
Collaborator

Choose a reason for hiding this comment

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

Two labels are definitely a possibility (this pattern is used several times in the code).

About the type of the label, hmm, I think RedTunicPalette would be more helpful for people browsing through the code: instead of having to read the code at the call site to see a comment stating "this red palette is used for the red tunic", one can just read the data. But it's definitely open to discussions :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

committing this as-is for now, and I'll change the labels when I figure out what the green label is used for.

Copy link
Collaborator

@kemenaran kemenaran left a comment

Choose a reason for hiding this comment

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

Yay, thanks for this huge work! Colors are definitely going to be more readable now. Plus I guess it will now be easier to search where a specific palette is used, by simply searching in the code the hex color components of the palette.

@KelseyHigham KelseyHigham merged commit a6d70d2 into main Oct 26, 2022
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.

Convert palettes to RGB format
3 participants