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

General renaming and small structural changes in berry_patches.c - item.c #310

Merged
merged 11 commits into from
Nov 25, 2024

Conversation

Viperio19
Copy link
Contributor

I went through some files in src and just made a bunch of small changes like making declarations more concise, removing unnecessary scoping, naming variables and arguments, and making the argument names match in the respective .h files.

@lhearachel lhearachel self-requested a review November 21, 2024 02:00
Comment on lines -663 to +661
FieldBattleDTO *dto;
FieldSystem *fieldSystem = FieldTask_GetFieldSystem(task);

dto = FieldBattleDTO_New(HEAP_ID_FIELDMAP, BATTLE_TYPE_TRAINER);
FieldBattleDTO *dto = FieldBattleDTO_New(HEAP_ID_FIELDMAP, BATTLE_TYPE_TRAINER);
Copy link
Collaborator

Choose a reason for hiding this comment

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

aside: I had purposefully left them in this order for consistency's sake across similar functions, but I'm not attached-enough to it to go against changing it.

{
GF_ASSERT(param0->isActive == 1);
GF_ASSERT(FS_UnloadOverlay(MI_PROCESSOR_ARM9, param0->id) == TRUE);
GF_ASSERT(loadedOverlays->isActive == 1);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
GF_ASSERT(loadedOverlays->isActive == 1);
GF_ASSERT(loadedOverlays->isActive == TRUE);

And similar for other occurrences in this file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have applied these and the other suggestions in the new commit


param0->isActive = 0;
loadedOverlays->isActive = 0;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
loadedOverlays->isActive = 0;
loadedOverlays->isActive = FALSE;

Comment on lines 779 to 783
if (CommSys_IsPlayerConnected(i)) {
if (sCommunicationSystem->unk_664[i] > 3) {
return FALSE;
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
if (CommSys_IsPlayerConnected(i)) {
if (sCommunicationSystem->unk_664[i] > 3) {
return FALSE;
}
}
if (CommSys_IsPlayerConnected(i) && sCommunicationSystem->unk_664[i] > 3) {
return FALSE;
}

Copy link
Collaborator

@lhearachel lhearachel left a comment

Choose a reason for hiding this comment

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

Just a few paren-cleanup tasks left here and this'll be mergeable.

src/communication_system.c Outdated Show resolved Hide resolved
src/communication_system.c Outdated Show resolved Hide resolved
src/communication_system.c Outdated Show resolved Hide resolved
src/communication_system.c Outdated Show resolved Hide resolved
src/communication_system.c Outdated Show resolved Hide resolved
src/game_overlay.c Outdated Show resolved Hide resolved
@Viperio19
Copy link
Contributor Author

Just a few paren-cleanup tasks left here and this'll be mergeable.

Done!

@lhearachel lhearachel merged commit bf91edc into pret:main Nov 25, 2024
2 checks passed
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