-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add Chooseboxmon special #5428
base: upcoming
Are you sure you want to change the base?
Add Chooseboxmon special #5428
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.
Simple code review, haven't tested this in practice yet
src/pokemon_storage_system.c
Outdated
@@ -6197,7 +6221,7 @@ static void SaveCursorPos(void) | |||
sSavedCursorPosition = sCursorPosition; | |||
} | |||
|
|||
static u8 GetSavedCursorPos(void) | |||
u8 GetSavedCursorPos(void) |
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.
What's the point of this no longer being static if it isn't used outside of this file?
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.
Ah, this can be changed back to static. I was calling this in other files before I set the cursor position to gSpecialVar_0x8004
@@ -10210,3 +10247,14 @@ void UpdateSpeciesSpritePSS(struct BoxPokemon *boxMon) | |||
} | |||
sJustOpenedBag = FALSE; | |||
} | |||
|
|||
u8 GetInPartyMenu(void) |
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 function is unused
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 made it for determining if the pokemon was in the party or not from other files after the pokemon had been selected. Not sure if there was another way to determine this
Co-authored-by: Bassoonian <[email protected]>
Description
Adds a
ChooseBoxMon
special that can be used instead ofChoosePartyMon
to select a Pokemon. This only provides functionality forChooseBoxMon
and does not modify any other functions to handle the results.ChooseBoxMon
returns the species selected inVAR_RESULT
(for NPCs that ask to see specific Pokemon) and the Pc box cursor position/party slot id inVAR_0x8004
(asChoosePartyMon
uses that var for the party slot id).The
BoxMon
data can be found by using these 3 functionsGetInPartyMenu
which returns 1 if the Pokemon selected is in the party, 0 otherwiseGetSavedCursorPos
returns either the party slot id of the slot id in the boxStorageGetCurrentBox
returns the box idYou can then use either
&gPlayerParty[slotId]
or&gPokemonStoragePtr->boxes[boxId][slotId]
to get the Pokemon's data.See this commit for an example of how to use this for the daycare.
Images
Discord contact info
paccy.