#include "libforest/gbi_extensions.h"
#include "PR/gbi.h"
#include "evw_anime.h"
#include "c_keyframe.h"
#include "ac_npc.h"
#include "ef_effect_control.h"

u8 cKF_ckcb_r_npc_1_ha_e1_tbl[] = { 56, 7, 0, 7, 7, 7, 0, 7, 7, 7, 0, 7, 7, 7, 0, 7, 7, 0, 7, 7, 7, 7, 0, 7, 0, 0 };

s16 cKF_kn_npc_1_ha_e1_tbl[] = { 2, 2, 2, 2, 4, 2, 3, 4, 3, 2, 2, 2, 2, 2, 2, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2,
                                 2, 2, 2, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 4, 2, 2, 2, 2 };

s16 cKF_c_npc_1_ha_e1_tbl[] = { 0,    0, 900, 0,   0, 1800, 0, 0, 1800, 0, 900, 0, 0,   0,
                                -900, 0, 0,   900, 0, -900, 0, 0, 0,    0, 0,   0, -900 };

s16 cKF_ds_npc_1_ha_e1_tbl[] = {
    1, 0,    0, 8, 0,    0,    1, 722,  0,  8, 722,  0, 1, 0,    0, 8, 0,    0, 1, 0,    0,    8, 0,    0,   1, 60,   0,
    2, 30,   0, 4, 60,   0,    8, 60,   0,  1, 50,   0, 8, 50,   0, 1, 0,    0, 5, -115, 0,    8, -64,  0,   1, -520, 0,
    2, -550, 0, 4, -515, 0,    8, -519, 0,  1, -100, 0, 5, 0,    0, 8, -45,  0, 1, 0,    0,    8, 0,    0,   1, 450,  0,
    8, 450,  0, 1, -100, 0,    8, -100, 0,  1, 25,   0, 8, 25,   0, 1, 135,  0, 8, 135,  0,    1, 105,  0,   8, 105,  0,
    1, 0,    0, 4, 250,  0,    8, 125,  0,  1, -800, 0, 2, -850, 0, 8, -800, 0, 1, 100,  0,    4, -150, 0,   8, -50,  0,
    1, 0,    0, 8, 0,    0,    1, 0,    0,  8, 0,    0, 1, 600,  0, 8, 600,  0, 1, 0,    0,    8, 0,    0,   1, 0,    0,
    8, 0,    0, 1, 0,    0,    8, 0,    0,  1, 0,    0, 8, 0,    0, 1, 0,    0, 8, 0,    0,    1, 0,    0,   8, 0,    0,
    1, 0,    0, 8, 0,    0,    1, 0,    0,  8, 0,    0, 1, 0,    0, 8, 0,    0, 1, 0,    0,    8, 0,    0,   1, -140, 0,
    5, -90,  0, 8, -90,  -101, 1, -100, 76, 8, -100, 0, 1, 0,    0, 4, -75,  0, 8, -75,  0,    1, -300, 0,   4, -275, 0,
    8, -300, 0, 1, -400, 0,    4, -350, 0,  8, -350, 0, 1, -200, 0, 4, -225, 0, 8, -300, 0,    1, -600, 0,   4, -425, 0,
    8, -450, 0, 1, 50,   0,    4, -100, 0,  8, -150, 0, 1, 0,    0, 4, 0,    0, 8, 0,    0,    1, -200, 0,   4, -175, 0,
    8, -200, 0, 1, -350, 0,    4, -375, 0,  8, -350, 0, 1, -100, 0, 4, -50,  0, 8, -100, 0,    1, -600, 0,   4, -550, 0,
    8, -600, 0, 1, 0,    0,    4, 0,    0,  8, 0,    0, 1, 0,    0, 8, 0,    0, 1, 0,    0,    8, 0,    0,   1, 0,    0,
    8, 0,    0, 1, 0,    0,    8, 0,    0,  1, -50,  0, 3, -100, 0, 6, 0,    0, 8, -20,  -112, 1, -50,  -74, 8, -45,  0,
    1, 0,    0, 8, 0,    0,    1, 0,    0,  8, 0,    0, 1, 0,    0, 8, 0,    0
};

u8 npc_1_ha_e10_tex_index[] = { 3, 3, 3, 3, 4, 4, 4, 4 };

u8 npc_1_ha_e11_tex_index[] = { 0, 1, 2, 2, 2, 6, 6, 6 };

aNPC_Animation_c cKF_ba_r_npc_1_ha_e1 = {
    { cKF_ckcb_r_npc_1_ha_e1_tbl, cKF_ds_npc_1_ha_e1_tbl, cKF_kn_npc_1_ha_e1_tbl, cKF_c_npc_1_ha_e1_tbl, -1, 8 },
    1.0f,
    8.0f,
    cKF_FRAMECONTROL_STOP,
    -4.0f,
    npc_1_ha_e11_tex_index,
    aNPC_EYE_TEX0,
    -1,
    npc_1_ha_e10_tex_index,
    aNPC_MOUTH_TEX0,
    -1,
    5,
    eEC_EFFECT_HA,
    NULL,
    NULL,
};
