Decompile battle_anim_effects_1.c

This commit is contained in:
Marcus Huderle 2018-12-16 11:35:10 -06:00
parent 9c5fa4a787
commit d1e6e705cc
10 changed files with 5540 additions and 11657 deletions

File diff suppressed because it is too large Load Diff

View File

@ -132,6 +132,12 @@ u8 sub_80A80C8(struct Task *task);
void sub_80A8EE4(struct Sprite *);
void sub_80A67F4(struct Sprite *);
void sub_80A6D48(u32 bgId, const void *src);
void sub_80A7160(struct Sprite *sprite);
bool8 sub_80A70E8(struct Sprite *sprite);
void sub_80A70C0(struct Sprite *sprite);
void TranslateMonBGUntil(struct Sprite *sprite);
void TranslateSpriteOverDuration(struct Sprite *sprite);
void sub_80A77C8(struct Sprite *sprite);
enum
{

View File

@ -1,6 +1,8 @@
#ifndef GUARD_BATTLE_INTERFACE_H
#define GUARD_BATTLE_INTERFACE_H
#include "battle_controllers.h"
enum
{
HP_CURRENT,

View File

@ -157,7 +157,7 @@ SECTIONS {
src/safari_zone.o(.text);
asm/contest_link_80FC4F4.o(.text);
src/item_use.o(.text);
asm/battle_anim_effects_1.o(.text);
src/battle_anim_effects_1.o(.text);
asm/battle_anim_effects_2.o(.text);
asm/water.o(.text);
src/fire.o(.text);
@ -483,7 +483,7 @@ SECTIONS {
src/field_special_scene.o(.rodata);
src/rotating_gate.o(.rodata);
src/item_use.o(.rodata);
src/effects_1.o(.rodata);
src/battle_anim_effects_1.o(.rodata);
src/effects_2.o(.rodata);
src/water.o(.rodata);
src/fire.o(.rodata);

View File

@ -35,7 +35,6 @@ extern const union AffineAnimCmd *gUnknown_082FF6C0[];
// This file's functions.
void sub_80A64EC(struct Sprite *sprite);
void sub_80A653C(struct Sprite *sprite);
void sub_80A6FB4(struct Sprite *sprite);
void sub_80A7144(struct Sprite *sprite);
void sub_80A791C(struct Sprite *sprite);
@ -539,7 +538,7 @@ void WaitAnimForDuration(struct Sprite *sprite)
void sub_80A64D0(struct Sprite *sprite)
{
sub_80A64EC(sprite);
sprite->callback = sub_80A653C;
sprite->callback = TranslateSpriteOverDuration;
sprite->callback(sprite);
}
@ -557,7 +556,7 @@ void sub_80A64EC(struct Sprite *sprite)
sprite->data[1] = old;
}
void sub_80A653C(struct Sprite *sprite)
void TranslateSpriteOverDuration(struct Sprite *sprite)
{
if (sprite->data[0] > 0)
{
@ -613,7 +612,7 @@ void sub_80A65EC(struct Sprite *sprite)
sprite->callback = sub_80A64D0;
}
void sub_80A6630(struct Sprite *sprite)
void TranslateMonBGUntil(struct Sprite *sprite)
{
if (sprite->data[0] > 0)
{
@ -627,7 +626,7 @@ void sub_80A6630(struct Sprite *sprite)
}
}
// Same as sub_80A6630, but it operates on sub-pixel values
// Same as TranslateMonBGUntil, but it operates on sub-pixel values
// to handle slower translations.
void sub_80A6680(struct Sprite *sprite)
{

View File

@ -441,14 +441,14 @@ static void DoHorizontalLunge(struct Sprite *sprite)
sprite->data[3] = gBattlerSpriteIds[gBattleAnimAttacker];
sprite->data[4] = gBattleAnimArgs[0];
StoreSpriteCallbackInData6(sprite, ReverseHorizontalLungeDirection);
sprite->callback = sub_80A6630;
sprite->callback = TranslateMonBGUntil;
}
static void ReverseHorizontalLungeDirection(struct Sprite *sprite)
{
sprite->data[0] = sprite->data[4];
sprite->data[1] = -sprite->data[1];
sprite->callback = sub_80A6630;
sprite->callback = TranslateMonBGUntil;
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
}
@ -468,14 +468,14 @@ static void DoVerticalDip(struct Sprite *sprite)
sprite->data[3] = spriteId;
sprite->data[4] = gBattleAnimArgs[0];
StoreSpriteCallbackInData6(sprite, ReverseVerticalDipDirection);
sprite->callback = sub_80A6630;
sprite->callback = TranslateMonBGUntil;
}
static void ReverseVerticalDipDirection(struct Sprite *sprite)
{
sprite->data[0] = sprite->data[4];
sprite->data[2] = -sprite->data[2];
sprite->callback = sub_80A6630;
sprite->callback = TranslateMonBGUntil;
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
}

5520
src/battle_anim_effects_1.c Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -726,7 +726,7 @@ static void AnimFireCross(struct Sprite *sprite)
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
sprite->callback = sub_80A653C; //TranslateSpriteOverDuration
sprite->callback = TranslateSpriteOverDuration;
}
static void sub_81093A4(struct Sprite *sprite)

View File

@ -285,8 +285,7 @@ gUnknown_0203A034: @ 203A034
gUnknown_0203A0F4: @ 203A0F4
.space 0x4
gUnknown_0203A0F8: @ 203A0F8
.space 0x8
.include "src/battle_anim_effects_1.o"
gUnknown_0203A100: @ 203A100
.space 0x10