static void sub_80DD9FC(struct Sprite *sprite) { sprite->data[0] += 8; sprite->data[3] += sprite->data[1]; sprite->data[4] += sprite->data[2]; sprite->pos2.x += sprite->data[3] / 40; sprite->pos2.y -= Sin(sprite->data[0], sprite->data[5]); if (sprite->data[0] > 140) DestroyAnimSprite(sprite); }
static void sub_80DD02C(struct Sprite *sprite) { sprite->data[4] += sprite->data[1]; sprite->pos2.y = -(sprite->data[4] >> 8); sprite->pos2.x = Sin(sprite->data[5], sprite->data[3]); sprite->data[5] = (sprite->data[5] + sprite->data[2]) & 0xFF; if (--sprite->data[0] == -1) { DestroyAnimSprite(sprite); } }
static void sub_80D2094(struct Sprite* sprite) { s16 y; sprite->data[2] += sprite->data[1]; sprite->pos2.y = -((u16)sprite->data[2] >> 8); sprite->pos2.x = Sin(sprite->data[3], 4); sprite->data[3] = (sprite->data[3] + 3) & 0xFF; y = sprite->pos1.y + sprite->pos2.y; if (y <= 0x48) { sprite->invisible = sprite->data[3] % 2; if (y <= 0x40) DestroyAnimSprite(sprite); } }
static void sub_80CEEE8(struct Sprite* sprite) { if (TranslateAnimSpriteByDeltas(sprite) == 0) { s16 a; a = Sin(sprite->data[5], 8); if (sprite->pos2.x < 0) a = -a; sprite->pos2.x += a; sprite->pos2.y += Sin(sprite->data[5], 4); sprite->data[5] = (sprite->data[5] + 8) & 0xFF; } else { DestroyAnimSprite(sprite); } }
static void sub_80CAACC(struct Sprite* sprite) { if (sub_8078CE8(sprite)) { DestroyAnimSprite(sprite); } else { sprite->pos2.y += Cos(sprite->data[5], 12); if (sprite->data[5] <= 0x7E) { sprite->subpriority = sprite->data[6]; } else { sprite->subpriority = sprite->data[6] + 1; } sprite->data[5] = (sprite->data[5] + 24) & 0xFF; } }
static void sub_80DD928(struct Sprite *sprite) { sprite->invisible = 0; if (sprite->data[3] != 0) { sprite->pos2.y = sprite->data[2] + sprite->data[3]; sprite->data[3] += sprite->data[0]; sprite->data[0]++; if (sprite->data[3] > 0) { sprite->data[3] = 0; } } else { if (--sprite->data[1] == 0) { DestroyAnimSprite(sprite); } } }
void sub_80D5CC0(struct Sprite *sprite) { if (!sprite->data[0]) { sprite->data[1] = gBattleAnimArgs[0]; sprite->data[0] += 1; } sprite->data[3] += 0xC0 * 2; sprite->data[4] += 0xA0; sprite->pos2.x = Sin(sprite->data[1], sprite->data[3] >> 8); sprite->pos2.y = Cos(sprite->data[1], sprite->data[4] >> 8); sprite->data[1] = (sprite->data[1] + 7) & 0xFF; if (gMain.inBattle) { if (sprite->data[1] < 64 || sprite->data[1] > 195) sprite->oam.priority = sub_8079ED4(gAnimBankTarget); else sprite->oam.priority = sub_8079ED4(gAnimBankTarget) + 1; } else { if (sprite->data[1] < 64 || sprite->data[1] > 195) sprite->subpriority = 0x1D; else sprite->subpriority = 0x1F; } if (++sprite->data[2] > 0x14) sprite->invisible ^= 1; if (sprite->data[2] == 0x1E) DestroyAnimSprite(sprite); }
static void sub_80CA9F8(struct Sprite* sprite) { if (TranslateAnimSpriteLinearAndSine(sprite)) DestroyAnimSprite(sprite); }
static void sub_80CE354(struct Sprite* sprite) { if (sprite->data[0]) DestroyAnimSprite(sprite); }
static void sub_80D020C(struct Sprite* sprite) { if (sprite->animEnded == 1) DestroyAnimSprite(sprite); }