Skip to content

Conversation

@PikalaxALT
Copy link
Collaborator

No description provided.

@PikalaxALT PikalaxALT self-assigned this Aug 23, 2025
@PikalaxALT PikalaxALT marked this pull request as ready for review August 23, 2025 23:08
Copy link
Member

@red031000 red031000 left a 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
Copy link
Member

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)

Copy link
Collaborator Author

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

Copy link
Member

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,
Copy link
Member

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)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

decline

Copy link
Member

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

Copy link
Collaborator Author

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

Copy link
Member

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

Copy link
Collaborator Author

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"
Copy link
Member

Choose a reason for hiding this comment

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

global.h include?

Copy link
Collaborator Author

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);
Copy link
Member

Choose a reason for hiding this comment

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

merge declaration and assignment?

Copy link
Collaborator Author

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

Copy link
Member

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)

Copy link
Collaborator Author

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);

{
Copy link
Member

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?

Copy link
Collaborator Author

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"
Copy link
Member

Choose a reason for hiding this comment

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

global.h?

Copy link
Collaborator Author

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,
Copy link
Member

Choose a reason for hiding this comment

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

bgid constant?

Copy link
Collaborator Author

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);
Copy link
Member

Choose a reason for hiding this comment

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

merge declaration and assignment

Copy link
Collaborator Author

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;
Copy link
Member

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?

Copy link
Collaborator Author

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?
Copy link
Member

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

Copy link
Collaborator Author

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

@red031000 red031000 dismissed their stale review August 28, 2025 02:00

dismissing so as not to block any approvals

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants