mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-27 20:24:18 +01:00
Merge https://github.com/pret/pokeemerald into Matching
This commit is contained in:
commit
3b43fc12fc
@ -3967,24 +3967,25 @@ static void AnimProtect(struct Sprite* sprite)
|
|||||||
|
|
||||||
static void AnimProtect_Step(struct Sprite *sprite)
|
static void AnimProtect_Step(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
int i, id, savedPal;
|
int i, savedPal;
|
||||||
sprite->data[5] += 96;
|
sprite->data[5] += 96;
|
||||||
sprite->pos2.x = -(sprite->data[5] >> 8);
|
sprite->pos2.x = -(sprite->data[5] >> 8);
|
||||||
if (++sprite->data[1] > 1)
|
if (++sprite->data[1] > 1)
|
||||||
{
|
{
|
||||||
|
int id;
|
||||||
sprite->data[1] = 0;
|
sprite->data[1] = 0;
|
||||||
savedPal = gPlttBufferFaded[sprite->data[2] + 1];
|
savedPal = gPlttBufferFaded[sprite->data[2] + 1];
|
||||||
i = 0;
|
i = 0;
|
||||||
while (i < 6)
|
do
|
||||||
{
|
{
|
||||||
id = sprite->data[2] + ++i;
|
id = sprite->data[2] + ++i;
|
||||||
gPlttBufferFaded[id] = gPlttBufferFaded[id + 1];
|
gPlttBufferFaded[id] = gPlttBufferFaded[id + 1];
|
||||||
}
|
} while (i < 6);
|
||||||
|
|
||||||
gPlttBufferFaded[sprite->data[2] + 7] = savedPal;
|
gPlttBufferFaded[sprite->data[2] + 7] = savedPal;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sprite->data[7] > 6 && sprite->data[0] >0 && ++sprite->data[6] > 1)
|
if (sprite->data[7] > 6 && sprite->data[0] > 0 && ++sprite->data[6] > 1)
|
||||||
{
|
{
|
||||||
sprite->data[6] = 0;
|
sprite->data[6] = 0;
|
||||||
sprite->data[7] -= 1;
|
sprite->data[7] -= 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user