Skip to content

Get rid of a few gotos in player.c - #27

Open
idefix02 wants to merge 3 commits into
SAT-R:mainfrom
idefix02:player.c-goto-purge
Open

idefix02 wants to merge 3 commits into
SAT-R:mainfrom
idefix02:player.c-goto-purge

Conversation

@idefix02

Copy link
Copy Markdown
Contributor

No description provided.

}
temp_r1_2 = (s16)temp_r4->a.unk0;
if ((s32)temp_r1_2 <= 0x77) {
} else if (temp_r4->a.unk0 <= 0x77) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If you could make all these ifs to < (value+1) (just with the direct constant as decimal-integer, not literally +1), it should still match.
Would prefer it to be changed to that, if possible! :)

goto block_15;
}
if ((s32)temp_r1_2 <= 0xEF) {
} else if (temp_r4->a.unk0 <= 0xEF) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Here and...

goto block_16;
}
if ((s32)temp_r1_2 <= 0x167) {
} else if (temp_r4->a.unk0 <= 0x167) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

...here as well! :D

This branch has not been deployed

No deployments
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