#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_d1_tbl[] = { 32, 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_d1_tbl[] = { 2, 2, 4, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
                                 2, 2, 2, 3, 2, 4, 4, 4, 2, 5, 2, 4, 4, 4, 2, 5, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2 };

s16 cKF_c_npc_1_ha_d1_tbl[] = { 2400, 0,    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_d1_tbl[] = {
    1, 0,    0,    8, 0,    0,   1, 0,    0,    8, 0,    0,    1, 80,   0,    2, 50,   0,    4, 80,   0, 8, 80,   0,
    1, 0,    0,    8, 0,    0,   1, -750, 0,    8, -750, 150,  1, -500, -149, 2, -550, 0,    4, -500, 0, 8, -500, -149,
    1, 300,  0,    8, 300,  148, 1, 0,    0,    8, 0,    0,    1, 350,  0,    8, 350,  305,  1, 0,    0, 8, 0,    0,
    1, 0,    0,    8, 0,    0,   1, -100, 0,    8, -100, 0,    1, 0,    0,    8, 0,    0,    1, 750,  0, 8, 750,  -147,
    1, -500, -150, 2, -550, 0,   4, -500, 0,    8, -500, -150, 1, -300, 0,    8, -300, -148, 1, 0,    0, 8, 0,    0,
    1, 350,  0,    8, 350,  302, 1, 0,    0,    8, 0,    0,    1, 0,    0,    8, 0,    0,    1, -100, 0, 8, -100, 0,
    1, 0,    0,    8, 0,    0,   1, 0,    0,    8, 0,    0,    1, -250, 0,    8, -250, 0,    1, 0,    0, 8, 0,    0,
    1, 0,    0,    8, 0,    0,   1, -100, 0,    8, -100, 0,    1, 0,    0,    8, 0,    0,    1, 0,    0, 8, 0,    0,
    1, -100, -101, 5, -50,  0,   8, -50,  -101, 1, 0,    0,    8, 0,    0,    1, 0,    0,    3, 0,    0, 5, -200, 0,
    8, -200, 0,    1, 50,   0,   3, -150, 0,    5, -100, 0,    8, -100, 0,    1, -650, 0,    3, -650, 0, 5, -600, 0,
    8, -600, 0,    1, 0,    0,   8, 0,    0,    1, -250, 0,    5, -300, 0,    6, -200, 0,    7, -250, 0, 8, -250, 0,
    1, 0,    0,    8, 0,    0,   1, 0,    0,    3, 0,    0,    5, 200,  0,    8, 200,  0,    1, 50,   0, 3, -150, 0,
    5, -100, 0,    8, -100, 0,   1, 650,  0,    3, 650,  0,    5, 600,  0,    8, 600,  0,    1, 0,    0, 8, 0,    0,
    1, -250, 0,    5, -300, 0,   6, -200, 0,    7, -250, 0,    8, -250, 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,    -152,
    3, -50,  0,    6, 50,   0,   8, 30,   -112, 1, 0,    -99,  8, 5,    0,    1, 0,    0,    8, 0,    0, 1, 0,    0,
    8, 0,    0,    1, 0,    0,   8, 0,    0
};

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

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

aNPC_Animation_c cKF_ba_r_npc_1_ha_d1 = {
    { cKF_ckcb_r_npc_1_ha_d1_tbl, cKF_ds_npc_1_ha_d1_tbl, cKF_kn_npc_1_ha_d1_tbl, cKF_c_npc_1_ha_d1_tbl, -1, 8 },
    1.0f,
    8.0f,
    cKF_FRAMECONTROL_STOP,
    -4.0f,
    npc_1_ha_d10_tex_index,
    aNPC_EYE_TEX0,
    -1,
    npc_1_ha_d11_tex_index,
    aNPC_MOUTH_TEX0,
    -1,
    5,
    eEC_EFFECT_HA,
    NULL,
    NULL,
};
