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

s16 cKF_c_npc_1_a1_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_a1_tbl[] = {
    1, 0,    0,   9, 0,    0, 1, 1000, 0, 9, 1000, 0,   1, 0,    0,     9, 0,    0,     1, 0,    0,    9, 0,    0,
    1, 0,    0,   2, -20,  0, 5, 30,   0, 7, 28,   -79, 9, 20,   0,     1, 0,    0,     9, 0,    0,    1, -175, 0,
    9, -175, 0,   1, -100, 0, 2, -110, 0, 6, 30,   0,   8, 25,   -146,  9, 20,   0,     1, 25,   0,    6, 5,    0,
    9, 5,    0,   1, 0,    0, 9, 0,    0, 1, 200,  0,   3, 160,  -1403, 6, 0,    0,     9, 0,    0,    1, 0,    0,
    9, 0,    0,   1, 0,    0, 9, 0,    0, 1, -100, 0,   6, 0,    0,     9, 0,    0,     1, 0,    0,    9, 0,    0,
    1, 175,  0,   9, 175,  0, 1, -100, 0, 2, -110, 0,   6, 30,   0,     8, 25,   -145,  9, 20,   0,    1, -25,  0,
    6, -5,   0,   9, -5,   0, 1, 0,    0, 9, 0,    0,   1, 200,  0,     3, 160,  -1401, 6, 0,    0,    9, 0,    0,
    1, 0,    0,   9, 0,    0, 1, 0,    0, 9, 0,    0,   1, -100, 0,     6, 0,    0,     9, 0,    0,    1, 0,    0,
    9, 0,    0,   1, 0,    0, 9, 0,    0, 1, 60,   0,   5, -250, 0,     7, -55,  0,     9, -110, 0,    1, 0,    0,
    9, 0,    0,   1, 0,    0, 9, 0,    0, 1, 82,   0,   4, 200,  0,     6, -150, 0,     9, 0,    -899, 1, 0,    0,
    9, 0,    0,   1, 0,    0, 9, 0,    0, 1, 2,    -78, 3, -30,  0,     6, 70,   0,     9, 70,   0,    1, 0,    0,
    9, 0,    -77, 1, 0,    0, 7, 0,    0, 9, 0,    0,   1, 58,   0,     9, 60,   -74,   1, -564, 0,    4, -600, 0,
    7, -565, 0,   8, -580, 0, 9, -573, 0, 1, 0,    0,   9, 0,    0,     1, -57,  468,   9, -57,  0,    1, 0,    0,
    9, 0,    0,   1, 0,    0, 7, 0,    0, 9, 0,    0,   1, 58,   0,     9, 60,   -74,   1, 564,  0,    4, 600,  0,
    7, 565,  0,   8, 580,  0, 9, 573,  0, 1, 0,    0,   9, 0,    0,     1, -57,  0,     9, -57,  0,    1, 0,    0,
    9, 0,    0,   1, 0,    0, 9, 0,    0, 1, 0,    0,   9, 0,    0,     1, 0,    0,     9, 0,    0,    1, 0,    0,
    9, 0,    0,   1, 0,    0, 3, 30,   0, 5, -50,  0,   7, 50,   0,     8, 30,   0,     9, 53,   -76,  1, 0,    0,
    9, 0,    142, 1, 0,    0, 9, 0,    0, 1, 0,    0,   4, 0,    0,     7, -150, 0,     9, -150, 0,    1, 0,    0,
    9, 0,    0
};

u8 npc_1_a10_tex_index[] = { 0, 0, 0, 0, 0, 0, 1, 1, 1 };

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

aNPC_Animation_c cKF_ba_r_npc_1_a1 = {
    { cKF_ckcb_r_npc_1_a1_tbl, cKF_ds_npc_1_a1_tbl, cKF_kn_npc_1_a1_tbl, cKF_c_npc_1_a1_tbl, -1, 9 },
    1.0f,
    9.0f,
    cKF_FRAMECONTROL_STOP,
    -5.0f,
    npc_1_a11_tex_index,
    aNPC_EYE_TEX0,
    -1,
    npc_1_a10_tex_index,
    aNPC_MOUTH_TEX0,
    -1,
    8,
    eEC_EFFECT_KANTANHU,
    NULL,
    NULL,
};
