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

s16 cKF_c_npc_1_a2_r1_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_a2_r1_tbl[] = {
    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, 50,   0, 2, 30,  0, 5, 80,   0,   7, 78,   -79, 9, 70,   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,
    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, 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,   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, 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,
    9, 0,    0, 1, -50, 0, 3, -80,  0,   6, 20,   0,   9, 20,   0,   1, 0,    0, 9, 0,    -77, 1, 0,    0,
    7, 0,    0, 9, 0,   0, 1, -53,  0,   9, -50,  -74, 1, -270, 0,   4, -305, 0, 7, -270, 0,   8, -285, 0,
    9, -278, 0, 1, 140, 0, 9, 140,  0,   1, -693, 0,   9, -692, 0,   1, -115, 0, 9, -115, 0,   1, 403,  0,
    7, 400,  0, 9, 400, 0, 1, -548, 0,   9, -548, -74, 1, 98,   0,   4, 125,  0, 7, 90,   0,   8, 105,  0,
    9, 98,   0, 1, 0,   0, 9, 0,    0,   1, -793, 0,   9, -792, 0,   1, 0,    0, 9, 0,    0,   1, -545, 0,
    9, -545, 0, 1, 293, 0, 9, 293,  0,   1, -500, 0,   9, -500, 0,   1, -10,  0, 9, 0,    0,   1, -51,  0,
    4, -90,  0, 7, 30,  0, 9, 13,   -76, 1, 0,    0,   9, 0,    142, 1, 0,    0, 9, 0,    0,   1, 0,    0,
    4, -100, 0, 7, 140, 0, 9, 70,   0,   1, 0,    0,   9, 0,    0
};

static u8 npc_1_a_r10_tex_index[] = { 0, 3, 3, 3, 3, 3, 4, 4, 4 };

static u8 npc_1_a_r11_tex_index[] = { 0, 1, 2, 2, 2, 2, 5, 5, 5 };

aNPC_Animation_c cKF_ba_r_npc_1_a2_r1 = {
    { cKF_ckcb_r_npc_1_a2_r1_tbl, cKF_ds_npc_1_a2_r1_tbl, cKF_kn_npc_1_a2_r1_tbl, cKF_c_npc_1_a2_r1_tbl, -1, 9 },
    1.0f,
    9.0f,
    cKF_FRAMECONTROL_STOP,
    -5.0f,
    npc_1_a_r11_tex_index,
    aNPC_EYE_TEX0,
    -1,
    npc_1_a_r10_tex_index,
    aNPC_MOUTH_TEX0,
    -1,
    -1,
    -1,
    NULL,
    NULL,
};
