#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_ha1_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_ha1_tbl[] = { 2, 3, 3, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2,
                               2, 4, 2, 2, 3, 2, 4, 4, 4, 2, 3, 2, 4, 4, 4, 2, 3, 2, 2, 2, 2, 2, 4, 2, 3, 4, 3 };

s16 cKF_c_npc_1_ha1_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_ha1_tbl[] = {
    1, 0,    0,    8, 0,    0,   1, 1000, 0,    4, 1025, 0, 8, 1025, 0,    1, 0,    0,    4, -100, 0, 8, -100, 0,
    1, 0,    0,    8, 0,    0,   1, 0,    0,    2, -50,  0, 4, 5,    622,  8, 30,   0,    1, 0,    0, 8, 0,    0,
    1, -175, 0,    8, -175, 0,   1, -100, 0,    2, -150, 0, 4, -60,  0,    8, -60,  0,    1, 25,   0, 8, 25,   0,
    1, 0,    0,    8, 0,    0,   1, 200,  0,    2, 300,  0, 4, 100,  0,    8, 100,  0,    1, 0,    0, 8, 0,    0,
    1, 0,    0,    8, 0,    0,   1, -100, 0,    2, -200, 0, 4, -100, 0,    8, -100, 0,    1, 0,    0, 8, 0,    0,
    1, 175,  0,    8, 175,  0,   1, -100, 0,    2, -150, 0, 4, -60,  0,    8, -60,  0,    1, -25,  0, 8, -25,  0,
    1, 0,    0,    8, 0,    0,   1, 200,  0,    2, 300,  0, 4, 100,  0,    8, 100,  0,    1, 0,    0, 8, 0,    0,
    1, 0,    0,    8, 0,    0,   1, -100, 0,    2, -200, 0, 4, -100, 0,    8, -100, 0,    1, 0,    0, 8, 0,    0,
    1, 0,    0,    8, 0,    0,   1, 60,   0,    4, -300, 0, 6, -200, 0,    8, -260, -404, 1, 0,    0, 8, 0,    0,
    1, 0,    0,    8, 0,    0,   1, 82,   0,    4, -50,  0, 6, 50,   0,    8, 20,   -511, 1, 0,    0, 8, 0,    0,
    1, 0,    0,    8, 0,    0,   1, 2,    0,    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, 58,   0, 3, -150, 0,    5, -100, 0,    8, -100, 0, 1, -564, 240,
    3, -650, 0,    5, -600, 0,   8, -600, 0,    1, 0,    0, 8, 0,    0,    1, -57,  0,    5, -160, 0, 8, -110, 0,
    1, 0,    0,    8, 0,    0,   1, 0,    0,    3, 0,    0, 5, 200,  0,    8, 200,  0,    1, 58,   0, 3, -150, 0,
    5, -100, 0,    8, -100, 0,   1, 564,  -272, 3, 650,  0, 5, 600,  0,    8, 600,  0,    1, 0,    0, 8, 0,    0,
    1, -57,  0,    5, -160, 0,   8, -110, 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,    3, -50,  0, 6, 50,   0,
    8, 30,   -112, 1, 0,    -99, 8, 5,    0,    1, 0,    0, 6, 0,    0,    8, 0,    0,    1, 0,    0, 3, 0,    0,
    6, -150, 0,    8, -150, 0,   1, 0,    0,    6, 0,    0, 8, 0,    0
};

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

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

aNPC_Animation_c cKF_ba_r_npc_1_ha1 = {
    { cKF_ckcb_r_npc_1_ha1_tbl, cKF_ds_npc_1_ha1_tbl, cKF_kn_npc_1_ha1_tbl, cKF_c_npc_1_ha1_tbl, -1, 8 },
    1.0f,
    8.0f,
    cKF_FRAMECONTROL_STOP,
    -4.0f,
    npc_1_ha11_tex_index,
    aNPC_EYE_TEX0,
    -1,
    npc_1_ha10_tex_index,
    aNPC_MOUTH_TEX0,
    -1,
    5,
    eEC_EFFECT_HA,
    NULL,
    NULL,
};
