some more fakematch fix

This commit is contained in:
DizzyEggg 2019-02-01 12:26:40 +01:00
parent e3bec4b480
commit c0db311637
2 changed files with 155 additions and 154 deletions

View File

@ -917,7 +917,7 @@ void AnimSwirlingSnowball_Step2(struct Sprite *sprite)
sprite->pos2.x = 0;
sprite->data[0] = 128;
tempVar = GetBattlerSide(gBattleAnimAttacker) != 0 ? 20 : -20;
tempVar = GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER ? 20 : -20;
sprite->data[3] = Sin(sprite->data[0], tempVar);
sprite->data[4] = Cos(sprite->data[0], 0xF);
@ -1262,6 +1262,7 @@ void AnimTask_Haze2(u8 taskId)
SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(0, 0));
SetAnimBgAttribute(1, BG_ANIM_PRIORITY, 1);
DestroyAnimVisualTask(taskId);
break;
}
}
@ -1363,6 +1364,7 @@ void AnimTask_OverlayFogTiles(u8 taskId)
SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(0, 0));
SetAnimBgAttribute(1, BG_ANIM_PRIORITY, 1);
DestroyAnimVisualTask(taskId);
break;
}
}
@ -1425,8 +1427,6 @@ void InitPoisonGasCloudAnim(struct Sprite *sprite)
void MovePoisonGasCloud(struct Sprite *sprite)
{
int value;
register s16 value2 asm("r5");
int unused;
switch (sprite->data[7] & 0xFF)
{
@ -1441,8 +1441,7 @@ void MovePoisonGasCloud(struct Sprite *sprite)
if (sprite->data[0] <= 0)
{
value2 = 80;
sprite->data[0] = value2;
sprite->data[0] = 80;
sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimTarget, 0);
sprite->data[1] = sprite->pos1.x;
sprite->data[2] = sprite->pos1.x;
@ -1450,10 +1449,12 @@ void MovePoisonGasCloud(struct Sprite *sprite)
sprite->data[3] = sprite->pos1.y;
sprite->data[4] = sprite->pos1.y + 29;
sprite->data[7]++;
if (!IsContest() && gBattlerPositions[gBattleAnimTarget] & 1)
if (IsContest())
sprite->data[5] = 80;
else if (GET_BATTLER_SIDE2(gBattleAnimTarget) != B_SIDE_PLAYER)
sprite->data[5] = 204;
else
sprite->data[5] = value2;
sprite->data[5] = 80;
sprite->pos2.y = 0;
value = gSineTable[sprite->data[5]];
@ -1490,13 +1491,13 @@ void MovePoisonGasCloud(struct Sprite *sprite)
if (sprite->data[0] <= 0)
{
asm("mov r5, #0"); // unused local variable?
unused = 0;
sprite->data[0] = 0x300;
sprite->data[1] = sprite->pos1.x += sprite->pos2.x;
sprite->data[3] = sprite->pos1.y += sprite->pos2.y;
sprite->data[4] = sprite->pos1.y + 4;
if (!IsContest() && gBattlerPositions[gBattleAnimTarget] & 1)
if (IsContest())
sprite->data[2] = -0x10;
else if (GET_BATTLER_SIDE2(gBattleAnimTarget) != B_SIDE_PLAYER)
sprite->data[2] = 0x100;
else
sprite->data[2] = -0x10;

View File

@ -154,7 +154,7 @@ void ReadPlttIntoBuffers(void)
bool8 BeginNormalPaletteFade(u32 selectedPalettes, s8 delay, u8 startY, u8 targetY, u16 blendColor)
{
u8 temp;
register u32 _blendColor asm("r8") = blendColor;
u16 color = blendColor;
if (gPaletteFade.active)
{
@ -175,7 +175,7 @@ bool8 BeginNormalPaletteFade(u32 selectedPalettes, s8 delay, u8 startY, u8 targe
gPaletteFade_delay = delay;
gPaletteFade.y = startY;
gPaletteFade.targetY = targetY;
gPaletteFade.blendColor = _blendColor;
gPaletteFade.blendColor = color;
gPaletteFade.active = 1;
gPaletteFade.mode = NORMAL_FADE;