-
Notifications
You must be signed in to change notification settings - Fork 148
Decomp/pokegear configure #405
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
base: master
Are you sure you want to change the base?
Conversation
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.
few things, some I didn't repeat for every instance because they apply to every file etc
| @@ -0,0 +1,57 @@ | |||
| #ifndef GUARD_POKEHEARTGOLD_APPLICATION_POKEGEAR_CONFIGURE_POKEGEAR_CONFIGURE_INTERNAL_H | |||
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.
can we have a more sane name pls (and one that follows the convention of the other ones)
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.
the name is a representation of the path relative to the includedir, as has been standard for this project
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.
sure, it's just this one does get kinda long but I guess that's fair, though I would prefer it to not have GUARD in front as the others don't, but it's not siginificant
| #include "touchscreen.h" | ||
|
|
||
| enum TouchscreenListMenuTextAlignment { | ||
| TSMENU_ALN_LEFT, |
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'd prefer a longer and more descriptive value
(at least expand ALN to ALIGN)
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.
decline
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.
ok... is there any particular reason? the expanded name would be more descriptive
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 would be unnecessarily verbose, and "aln" is a common-enough shortening of "alignment" to be well understood
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 don't consider this to be unnecessarily verbose by any means, we use ALIGN elsewhere in the project so it's a bit inconsistent to just switch to ALN
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.
this is pointless bikeshedding
| @@ -0,0 +1,387 @@ | |||
| #include "application/pokegear/configure/pokegear_configure_internal.h" | |||
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.
global.h include?
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.
not needed
| int PokegearConfigure_ContextMenu(PokegearConfigureAppData *configureApp) { | ||
| int input; | ||
|
|
||
| input = TouchscreenListMenu_HandleInput(configureApp->contextMenu); |
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.
merge declaration and assignment?
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.
the style for this component is declare first, assign later
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 don't believe we ever actually agreed on this style, so we probably should actually agree on this
(if we did I'd appreciate a link to where we discussed this because I can't remember this immediately)
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.
Enough functions within the pokegear scope require forward-declaration of locals to match, that it is likely the style used by the original dev for all functions therein. I may go back at some point and retro the rest of pokegear to fit this style.
| int i; | ||
| GX_SetGraphicsMode(GX_DISPMODE_GRAPHICS, GX_BGMODE_0, GX_BG0_AS_2D); | ||
|
|
||
| { |
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.
is there a reason for this empty scope?
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's standard for these types of routines
| @@ -0,0 +1,149 @@ | |||
| #include "application/pokegear/configure/pokegear_configure_internal.h" | |||
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.
global.h?
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.
not needed
| .wrapAround = TRUE, | ||
| .centered = TRUE, | ||
| .xOffset = 0, | ||
| .bgId = 1, |
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.
bgid constant?
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.
okay this one's fair
| void PokegearConfigure_LoadGraphics_Internal(PokegearConfigureAppData *configureApp) { | ||
| NARC *narc; | ||
|
|
||
| narc = NARC_New(NARC_a_1_4_5, configureApp->heapId); |
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.
merge declaration and assignment
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.
ditto
|
|
||
| BOOL PokegearConfigure_Exit(OverlayManager *man, int *state) { | ||
| PokegearConfigureAppData *configureApp; | ||
| enum HeapID heapID; |
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.
does this one needs to be a separate variable?
does it match without?
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 absolutely does need to be a separate variable, otherwise it's a read-after-free
| configureApp->pokegear->reselectAppCB = PokegearConfigure_OnReselectApp; | ||
| configureApp->skin = Pokegear_GetBackgroundStyle(configureApp->pokegear->savePokegear); | ||
| configureApp->unlockedSkins = Pokegear_GetUnlockedSkins(configureApp->pokegear->savePokegear); | ||
| configureApp->unlockedSkins = 0xFF; // nani the fuck? |
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.
yeah this is a bug lmao
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 don't think it's a bug, i think it's a feature that was removed later in development
dismissing so as not to block any approvals
No description provided.