mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 19:47:35 +01:00
Use HFLIP, VFLIP
This commit is contained in:
parent
a46f7952f9
commit
f7cf4fa154
@ -68,6 +68,10 @@ struct OamData
|
||||
/*0x06*/ u16 affineParam;
|
||||
};
|
||||
|
||||
#define ST_OAM_MNUM_HFLIP 0x08
|
||||
#define ST_OAM_MNUM_VFLIP 0x10
|
||||
#define ST_OAM_MNUM_FLIP_MASK 0x18
|
||||
|
||||
#define ST_OAM_OBJ_NORMAL 0
|
||||
#define ST_OAM_OBJ_BLEND 1
|
||||
#define ST_OAM_OBJ_WINDOW 2
|
||||
|
@ -2547,7 +2547,7 @@ static void AnimPetalDanceSmallFlowerStep(struct Sprite* sprite)
|
||||
{
|
||||
sprite->pos2.x += Sin(sprite->data[5], 8);
|
||||
if ((u16)(sprite->data[5] - 59) < 5 || (u16)(sprite->data[5] - 187) < 5)
|
||||
sprite->oam.matrixNum ^= 0x8; // horizontal flip
|
||||
sprite->oam.matrixNum ^= ST_OAM_MNUM_HFLIP;
|
||||
|
||||
sprite->data[5] += 5;
|
||||
sprite->data[5] &= 0xFF;
|
||||
@ -4380,19 +4380,19 @@ void sub_8101898(struct Sprite* sprite)
|
||||
{
|
||||
sprite->pos1.x -= 0x18;
|
||||
sprite->pos1.y += 0x18;
|
||||
sprite->oam.matrixNum = 16;
|
||||
sprite->oam.matrixNum = ST_OAM_MNUM_VFLIP;
|
||||
}
|
||||
else if ((s16)sprite->oam.affineParam == 3)
|
||||
{
|
||||
sprite->pos1.x += 0x18;
|
||||
sprite->pos1.y -= 0x18;
|
||||
sprite->oam.matrixNum = 8;
|
||||
sprite->oam.matrixNum = ST_OAM_MNUM_HFLIP;
|
||||
}
|
||||
else
|
||||
{
|
||||
sprite->pos1.x += 0x18;
|
||||
sprite->pos1.y += 0x18;
|
||||
sprite->oam.matrixNum = 24;
|
||||
sprite->oam.matrixNum = ST_OAM_MNUM_HFLIP | ST_OAM_MNUM_VFLIP;
|
||||
}
|
||||
|
||||
sprite->oam.tileNum = (sprite->oam.tileNum + 16);
|
||||
@ -5105,7 +5105,7 @@ void sub_8102844(struct Sprite* sprite)
|
||||
sprite->data[7] = sprite->pos1.y;
|
||||
if (IsContest())
|
||||
{
|
||||
sprite->oam.matrixNum = 8;
|
||||
sprite->oam.matrixNum = ST_OAM_MNUM_HFLIP;
|
||||
sprite->pos1.x += 40;
|
||||
sprite->pos1.y += 20;
|
||||
sprite->data[2] = sprite->pos1.x << 7;
|
||||
@ -5130,7 +5130,7 @@ void sub_8102844(struct Sprite* sprite)
|
||||
sprite->data[3] = -0x1400 / sprite->data[1];
|
||||
sprite->data[4] = sprite->pos1.y << 7;
|
||||
sprite->data[5] = 0xA00 / sprite->data[1];
|
||||
sprite->oam.matrixNum = 24;
|
||||
sprite->oam.matrixNum = (ST_OAM_MNUM_HFLIP | ST_OAM_MNUM_VFLIP);
|
||||
}
|
||||
|
||||
sprite->callback = sub_810296C;
|
||||
@ -5387,7 +5387,7 @@ void sub_8102FB8(struct Sprite* sprite)
|
||||
s16 a;
|
||||
if (gBattleAnimArgs[0] == 1)
|
||||
{
|
||||
sprite->oam.matrixNum = 8;
|
||||
sprite->oam.matrixNum = ST_OAM_MNUM_HFLIP;
|
||||
a = 16;
|
||||
}
|
||||
else
|
||||
|
@ -1609,10 +1609,10 @@ static void sub_8103C0C(u8 taskId)
|
||||
switch (gTasks[taskId].data[4])
|
||||
{
|
||||
case 1:
|
||||
sprite->oam.matrixNum |= 24;
|
||||
sprite->oam.matrixNum |= (ST_OAM_MNUM_HFLIP | ST_OAM_MNUM_VFLIP);
|
||||
break;
|
||||
case 2:
|
||||
sprite->oam.matrixNum = 8;
|
||||
sprite->oam.matrixNum = ST_OAM_MNUM_HFLIP;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1618,7 +1618,7 @@ void sub_815AAA4(struct Sprite *sprite)
|
||||
|
||||
if (gBattleAnimArgs[2] == 0)
|
||||
{
|
||||
sprite->oam.matrixNum = 8;
|
||||
sprite->oam.matrixNum = ST_OAM_MNUM_HFLIP;
|
||||
sprite->pos2.x = -12;
|
||||
sprite->data[1] = 2;
|
||||
}
|
||||
@ -4167,7 +4167,7 @@ void AnimSmellingSaltsHand(struct Sprite *sprite)
|
||||
sprite->pos1.y = GetBattlerSpriteCoord(battler, 3);
|
||||
if (gBattleAnimArgs[1] == 0)
|
||||
{
|
||||
sprite->oam.matrixNum |= 0x8;
|
||||
sprite->oam.matrixNum |= ST_OAM_MNUM_HFLIP;
|
||||
sprite->pos1.x = GetBattlerSpriteCoordAttr(battler, BATTLER_COORD_ATTR_LEFT) - 8;
|
||||
}
|
||||
else
|
||||
@ -4317,7 +4317,7 @@ void AnimHelpingHandClap(struct Sprite *sprite)
|
||||
{
|
||||
if (gBattleAnimArgs[0] == 0)
|
||||
{
|
||||
sprite->oam.matrixNum |= 0x8; // horizontal flip
|
||||
sprite->oam.matrixNum |= ST_OAM_MNUM_HFLIP;
|
||||
sprite->pos1.x = 100;
|
||||
sprite->data[7] = 1;
|
||||
}
|
||||
@ -4545,7 +4545,7 @@ void AnimForesightMagnifyingGlass(struct Sprite *sprite)
|
||||
}
|
||||
|
||||
if (GetBattlerSide(sprite->data[7]) == B_SIDE_OPPONENT)
|
||||
sprite->oam.matrixNum = 8; // horizontal flip
|
||||
sprite->oam.matrixNum = ST_OAM_MNUM_HFLIP;
|
||||
|
||||
sprite->oam.priority = GetBattlerSpriteBGPriority(sprite->data[7]);
|
||||
sprite->oam.objMode = ST_OAM_OBJ_BLEND;
|
||||
|
@ -1536,7 +1536,7 @@ u8 CreatePartyStatusSummarySprites(u8 battlerId, struct HpAndStatus *partyInfo,
|
||||
if (isOpponent)
|
||||
{
|
||||
gSprites[summaryBarSpriteId].pos1.x -= 96;
|
||||
gSprites[summaryBarSpriteId].oam.matrixNum = 8;
|
||||
gSprites[summaryBarSpriteId].oam.matrixNum = ST_OAM_MNUM_HFLIP;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -667,9 +667,9 @@ static void sub_810A75C(struct Sprite *sprite)
|
||||
sprite->oam.tileNum += gBattleAnimArgs[3] * 4;
|
||||
|
||||
if (gBattleAnimArgs[3] == 1)
|
||||
sprite->oam.matrixNum = 8;
|
||||
sprite->oam.matrixNum = ST_OAM_MNUM_HFLIP;
|
||||
else if (gBattleAnimArgs[3] == 2)
|
||||
sprite->oam.matrixNum = 16;
|
||||
sprite->oam.matrixNum = ST_OAM_MNUM_VFLIP;
|
||||
|
||||
sprite->data[0] = gBattleAnimArgs[2];
|
||||
sprite->callback = WaitAnimForDuration;
|
||||
|
@ -912,9 +912,9 @@ void sub_810D874(struct Sprite *sprite)
|
||||
}
|
||||
|
||||
if (IsContest())
|
||||
sprite->oam.matrixNum |= 0x8;
|
||||
sprite->oam.matrixNum |= ST_OAM_MNUM_HFLIP;
|
||||
else if (GetBattlerSide(battler) == B_SIDE_PLAYER)
|
||||
sprite->oam.matrixNum |= 0x18;
|
||||
sprite->oam.matrixNum |= (ST_OAM_MNUM_HFLIP | ST_OAM_MNUM_VFLIP);
|
||||
|
||||
sprite->data[0] = 16;
|
||||
sprite->data[1] = sprite->pos1.x;
|
||||
|
@ -1800,7 +1800,7 @@ void sub_810EEF8(struct Sprite *sprite)
|
||||
sprite->data[2] = gBattleAnimArgs[0];
|
||||
|
||||
if (sprite->data[2])
|
||||
sprite->oam.matrixNum = 8;
|
||||
sprite->oam.matrixNum = ST_OAM_MNUM_HFLIP;
|
||||
|
||||
if (gBattleAnimArgs[1] == 0)
|
||||
{
|
||||
|
@ -1039,7 +1039,7 @@ static void sub_81129F0(struct Sprite *sprite)
|
||||
{
|
||||
xDelta = 24;
|
||||
xDelta2 = -2;
|
||||
sprite->oam.matrixNum = 8;
|
||||
sprite->oam.matrixNum = ST_OAM_MNUM_HFLIP;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -508,7 +508,7 @@ void AnimDirtParticleAcrossScreen(struct Sprite *sprite)
|
||||
sprite->pos1.x = 304;
|
||||
gBattleAnimArgs[1] = -gBattleAnimArgs[1];
|
||||
sprite->data[5] = 1;
|
||||
sprite->oam.matrixNum = 8;
|
||||
sprite->oam.matrixNum = ST_OAM_MNUM_HFLIP;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user