-
Notifications
You must be signed in to change notification settings - Fork 462
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
Misc FAKE fixes #1783
base: main
Are you sure you want to change the base?
Misc FAKE fixes #1783
Conversation
@@ -1687,9 +1687,8 @@ PlayerExplosive Player_GetExplosiveHeld(Player* player) { | |||
PlayerSword Player_SwordFromIA(Player* player, PlayerItemAction itemAction) { | |||
PlayerSword sword = PLAYER_SWORD_KOKIRI; | |||
|
|||
//! FAKE: | |||
if ((itemAction == PLAYER_IA_LAST_USED) || |
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.
Note I just removed the fake label here as I actually don't think this is a fake.
//! FAKE: | ||
// https://decomp.me/scratch/JrEnl | ||
Matrix_MultVec3f(&(init->elements + i)->dim.vtx[j], &sp54[j]); | ||
Matrix_MultVec3f(init->elements[i].dim.vtx + j, &sp54[j]); |
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.
Looks better (though might still be considered a fake). Note this matches what was already in func_809CE068
in BgSpdweb
//! FAKE: | ||
csId = CutsceneManager_GetAdditionalCsId(this->csIdList[i] = csId); | ||
// clang-format off | ||
this->csIdList[i] = csId; \ |
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.
Perhaps still a fake, but I prefer this over what it was. Possibly a macro of some kind?
@@ -3803,29 +3802,28 @@ void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList1, G | |||
} | |||
} | |||
} else if (limbIndex == PLAYER_LIMB_HEAD) { | |||
//! FAKE: | |||
if (((*dList1 != NULL) && ((((void)0, player->currentMask)) != (((void)0, PLAYER_MASK_NONE)))) && | |||
if (((*dList1 != NULL) && ((u32)player->currentMask != PLAYER_MASK_NONE)) && |
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.
Would this match too?
if (((*dList1 != NULL) && ((u32)player->currentMask != PLAYER_MASK_NONE)) && | |
if (((*dList1 != NULL) && ((PlayerMask)player->currentMask != PLAYER_MASK_NONE)) && |
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.
Does not work. The real solution would be !player->currentMask
, but to keep the comparison to the enum we need the u32
cast (see #1783 (comment))
phi_v1 = &arg0->unk_0480[i]; | ||
//! FAKE: | ||
if (1) {} | ||
iter = &arg0->unk_0480[i]; |
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.
Would it match if you moved the temp here?
iter = &arg0->unk_0480[i]; | |
EnKusa2UnkBssSubStruct2* iter = &arg0->unk_0480[i]; |
@@ -263,10 +263,8 @@ void EnPoSisters_MatchPlayerY(EnPoSisters* this, PlayState* play) { | |||
// equalize to player height | |||
Math_ApproachF(&this->actor.world.pos.y, player->actor.world.pos.y + 5.0f, 0.5f, 3.0f); | |||
|
|||
if (this->floatingBobbingTimer == 0) { | |||
if ((u32)this->floatingBobbingTimer == 0) { |
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 is still kinda fake tho
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.
Did you try !this->floatingBobbingTimer
?
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->floatingBobbingTimer
is probably the correct solution, yeah. However I thought we decided it was fine to use u32
casts to still keep the explicit comparison to 0 (we at least have multiple examples of it in the repo already).
@@ -1053,10 +1053,7 @@ void EnTrt_ItemGiven(EnTrt* this, PlayState* play) { | |||
break; | |||
|
|||
default: | |||
//! FAKE: | |||
if (1) {} | |||
this->textId = 0x849; |
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.
It may be a good idea to add a comment noting this is lacking the final break;
Tried going through and fixing things marked as
FAKE
.Note there are some that I couldn't fully fix, but was able to find a way to match with an
if (1)
instead. In those cases I did change them to imo the better fake match.