-
Notifications
You must be signed in to change notification settings - Fork 3
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 Random to the counterpick CSS in ranked #6
base: main
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.
I would also change the places where CKIND_GANONDORF is being used and replace with a new constant CKIND_LAST_INDEX or similar so you dont have to replace all the places on the code, just change the value of the constant.
As it is right now it makes it hard to scale as too many changes are needed in different places.
Components/CharPickerDialog.c
Outdated
@@ -30,6 +34,9 @@ static void _InputsThink(GOBJ *gobj) { | |||
|
|||
if (downInputs & HSD_BUTTON_A) { | |||
SFX_PlayCommon(CommonSound_ACCEPT); // Play "accept" sound | |||
if (cpd->state.char_selection_idx == 26) { // Select random |
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.
@walz0 same as the previous comment but this would be a different named constant, something like CKIND_RANDOM
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.
should be much more scalable / readable now, i added constants for random and last index and refactored every instance where i used CKIND_GANONDORF +1 or 26
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.
LGTM
@JLaferri bumping this for possible merge since its been approved for a while |
Adds a CSIcon with the Question material to the CharPickerDialog. Uses HSD_Randi to select a random character and proceeds with the normal character confirm logic.