Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Rename unused items #424
Rename unused items #424
Changes from all commits
8a5851a
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why delete these descriptions? Explaining input and output is nice actually.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These comments are misplaced since they refer to
UseItem_
,TossItem_
, andIsKeyItem_
, respectively. See also #302.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comments which describe the input/output of a routine are not at all the type of redundant comments referred to by #302.
That being said, these description comments are also already repeated on
TossItem_
,IsKeyItem_
, so removing them from here could be fine, but the description onUseItem
is not repeated onUseItem_
.That being said, it's kind of nice for the description to be on the entrypoint in home/ rather than the implementation in engine/, since the entrypoints are kind of like the "api" of home; convenient to access and convenient to read.
I really like the way this approach is used in poketcg for example:
https://github.com/pret/poketcg/blob/43b7b92/src/home/coin_toss.asm#L1-L13
The comments are not "misplaced" as you say; they are absolutely true in reference to the routines where they are placed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do current pokegold and pokecrystal feature similar comments? If not, should they? It'd be nice to have a standardized approach across the different projects...
Would you like to add the comment in
UseItem_
or to restore the deleted comments and remove the duplicates from the implementation routines?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could be persuaded both ways. I see pros and cons to both.
Taking the coin toss example from poketcg, the implementation routine has no description comment on top, which makes sense to me since the code more so speaks for itself:
https://github.com/pret/poketcg/blob/43b7b92/src/engine/duel/core.asm#L7817
Although maybe it would be better if the implementation routine at least had a tl;dr description or something, I dunno.
I'm also not super concerned with standardizing, given that many different people work on the different disassemblies, and the games themselves are structured differently enough that it may be best to consider many things on an individual level. Of course, consistency and uniformity when it's easy is good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the code is simple or speaks for itself; then it doens't really need a comment imo.
I prefer routine input/output/description comments to go near the routine doing the majority of the "work". Especially if home is only being used as a way to jump far. If the home jump moves registers around, then it could have an additional small comment stating so, but most of the time this should be painfully obvious and simple to read.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like there is conflicting feedback about this. What should I do?