get rid of nonmatching fakematch sub_809542C

This commit is contained in:
DizzyEggg 2024-10-31 12:12:25 +01:00
parent cc3f1d1096
commit 9d0ce06023
3 changed files with 10 additions and 28 deletions

View File

@ -943,10 +943,7 @@ bool8 UseAttack(Entity *a0)
EntityInfo *monInfo = GetEntInfo(mon);
Unk_Entity_x184 *strPtr = &monInfo->unk184[monInfo->notMoving];
#ifndef NONMATCHING
// Dummy needed to match, feel free to remove if you do not care about matching.
i++;i--;
#endif // NONMATCHING
ASM_MATCH_TRICK(i);
if (monInfo->numMoveTiles != 0) {
IncreaseEntityPixelPos(mon, strPtr->lastMoveIncrement.x, strPtr->lastMoveIncrement.y);
if (--strPtr->walkAnimFramesLeft == 0) {

View File

@ -272,21 +272,10 @@ s32 sub_8095400(u32 param_1)
void sub_809542C(WonderMailSub *param_1)
{
u32 seed;
#ifndef NONMATCHING
register unkStruct_203B480 *preload asm("r2");
#else
unkStruct_203B480 *preload;
#endif
u8 buffer [20];
u8 buffer[20];
gUnknown_203B480->mailType = 1;
preload = gUnknown_203B480;
seed = param_1->seed;
preload->unk4.dungeon = param_1->dungeon;
preload->unk4.seed = seed;
gUnknown_203B480->unk4 = *param_1;
sub_8094D28(Rand32Bit());
gUnknown_203B480->unk10.unk10 = sub_8094E4C();
gUnknown_203B480->clientSpecies = GetPlayerPokemonStruct()->speciesNum;

View File

@ -771,21 +771,17 @@ bool8 IsAITargetEligible(s32 targetingFlags, Entity *user, Entity *target, Move
s32 WeightMove(Entity *user, s32 targetingFlags, Entity *target, u32 moveType)
{
#ifndef NONMATCHING
register EntityInfo *targetData asm("r4");
#else
EntityInfo *targetData;
#endif
s32 targetingFlags2 = (s16) targetingFlags;
u8 moveType2 = moveType;
u8 weight = 1;
EntityInfo *targetData2;
targetData2 = targetData = GetEntInfo(target);
if (!targetData->isNotTeamMember || (targetingFlags2 & 0xF) != TARGETING_FLAG_TARGET_OTHER)
{
targetData = GetEntInfo(target);
if (!targetData->isNotTeamMember)
return 1;
}
else if (IQSkillIsEnabled(user, IQ_EXP_GO_GETTER))
if ((targetingFlags2 & 0xF) != TARGETING_FLAG_TARGET_OTHER)
return 1;
if (IQSkillIsEnabled(user, IQ_EXP_GO_GETTER))
{
// BUG: expYieldRankings has lower values as the Pokémon's experience yield increases.
// This causes Exp. Go-Getter to prioritize Pokémon worth less experience
@ -794,7 +790,7 @@ s32 WeightMove(Entity *user, s32 targetingFlags, Entity *target, u32 moveType)
}
else if (IQSkillIsEnabled(user, IQ_EFFICIENCY_EXPERT))
{
weight = -12 - targetData2->HP;
weight = -12 - targetData->HP;
if (weight == 0)
{
weight = 1;