#ifndef POKEPLATINUM_HEALING_MACHINE_ANIMATION_H
#define POKEPLATINUM_HEALING_MACHINE_ANIMATION_H

#include "field/field_system_decl.h"

#define HEALING_MACHINE_ANIMATION_STATE_START                    0
#define HEALING_MACHINE_ANIMATION_STATE_ADD_POKEBALL             1
#define HEALING_MACHINE_ANIMATION_STATE_WAIT_FOR_POKEBALL        2
#define HEALING_MACHINE_ANIMATION_STATE_PLAY_FINAL_ANIMATION     3
#define HEALING_MACHINE_ANIMATION_STATE_WAIT_FOR_FINAL_ANIMATION 4
#define HEALING_MACHINE_ANIMATION_STATE_CLEAN_UP                 5

#define HEALING_MACHINE_ANIMATION_POKEBALL_TAG 0x10
#define HEALING_MACHINE_ANIMATION_SCREEN_TAG   0x20

#define HEALING_MACHINE_ANIMATION_POKEBALL_MAX_TICKS 15

#define HEALING_MACHINE_ANIMATION_POKEBALL_OFFSET_POSITIVE ((FX32_ONE * 4) + (FX32_ONE / 2))
#define HEALING_MACHINE_ANIMATION_POKEBALL_OFFSET_NEGATIVE -HEALING_MACHINE_ANIMATION_POKEBALL_OFFSET_POSITIVE

#define HEALING_MACHINE_ANIMATION_POKEBALL_OFFSET_Y_ALL    (FX32_ONE * 12)
#define HEALING_MACHINE_ANIMATION_POKEBALL_OFFSET_X_LEFT   HEALING_MACHINE_ANIMATION_POKEBALL_OFFSET_NEGATIVE
#define HEALING_MACHINE_ANIMATION_POKEBALL_OFFSET_X_RIGHT  HEALING_MACHINE_ANIMATION_POKEBALL_OFFSET_POSITIVE
#define HEALING_MACHINE_ANIMATION_POKEBALL_OFFSET_Z_TOP    HEALING_MACHINE_ANIMATION_POKEBALL_OFFSET_NEGATIVE
#define HEALING_MACHINE_ANIMATION_POKEBALL_OFFSET_Z_MIDDLE 0x0
#define HEALING_MACHINE_ANIMATION_POKEBALL_OFFSET_Z_BOTTOM HEALING_MACHINE_ANIMATION_POKEBALL_OFFSET_POSITIVE

#define HEALING_MACHINE_ANIMATION_CREATE_POKEBALL_OFFSETS(zPos, xPos) { \
    HEALING_MACHINE_ANIMATION_POKEBALL_OFFSET_X_##xPos,                 \
    HEALING_MACHINE_ANIMATION_POKEBALL_OFFSET_Y_ALL,                    \
    HEALING_MACHINE_ANIMATION_POKEBALL_OFFSET_Z_##zPos,                 \
}

void FieldSystem_PlayHealingAnimation_Pokecenter(FieldSystem *fieldSystem, const u8 pokeballCount);
void FieldSystem_PlayHealingAnimation_HallOfFame(FieldSystem *fieldSystem, const u8 pokeballCount);

#endif // POKEPLATINUM_HEALING_MACHINE_ANIMATION_H
