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

s16 cKF_c_npc_1_keitai_talk1_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_keitai_talk1_tbl[] = {
    1,  -1000, 0, 15, -1000, 0, 1,  2000, 0, 15, 2000, 0,   1,  6000, 0,   15, 6000, 0,   1,  -450, 0, 15, -450, 0,
    1,  0,     0, 7,  10,    0, 10, 0,    0, 15, 0,    0,   1,  0,    0,   15, 0,    0,   1,  -175, 0, 15, -175, 0,
    1,  -100,  0, 15, -100,  0, 1,  25,   0, 15, 25,   0,   1,  0,    0,   15, 0,    0,   1,  200,  0, 15, 200,  0,
    1,  0,     0, 15, 0,     0, 1,  0,    0, 15, 0,    0,   1,  -100, 0,   15, -100, 0,   1,  0,    0, 15, 0,    0,
    1,  175,   0, 15, 175,   0, 1,  -100, 0, 15, -100, 0,   1,  -25,  0,   15, -25,  0,   1,  0,    0, 15, 0,    0,
    1,  200,   0, 15, 200,   0, 1,  0,    0, 15, 0,    0,   1,  0,    0,   15, 0,    0,   1,  -100, 0, 15, -100, 0,
    1,  0,     0, 15, 0,     0, 1,  0,    0, 15, 0,    0,   1,  60,   0,   15, 60,   0,   1,  0,    0, 15, 0,    0,
    1,  0,     0, 15, 0,     0, 1,  80,   0, 15, 80,   0,   1,  0,    0,   15, 0,    0,   1,  -80,  0, 8,  -100, 0,
    15, -100,  0, 1,  50,    0, 4,  20,   0, 8,  50,   0,   11, 40,   -85, 15, 40,   100, 1,  -100, 0, 15, -100, 0,
    1,  0,     0, 15, 0,     0, 1,  50,   0, 15, 50,   132, 1,  -650, 0,   4,  -670, 0,   9,  -600, 0, 15, -620, 0,
    1,  0,     0, 15, 0,     0, 1,  -250, 0, 15, -250, 0,   1,  0,    0,   15, 0,    0,   1,  600,  0, 15, 600,  0,
    1,  -200,  0, 15, -200,  0, 1,  -100, 0, 15, -100, 0,   1,  0,    0,   15, 0,    0,   1,  -350, 0, 15, -350, 0,
    1,  0,     0, 15, 0,     0, 1,  150,  0, 15, 150,  0,   1,  100,  0,   15, 100,  0,   1,  50,   0, 15, 50,   0,
    1,  -50,   0, 9,  -70,   0, 15, -70,  0, 1,  50,   0,   5,  10,   0,   9,  40,   0,   12, 30,   0, 15, 30,   -96,
    1,  50,    0, 15, 50,    0, 1,  0,    0, 15, 0,    0,   1,  0,    0,   15, 0,    0,   1,  0,    0, 15, 0,    0
};

u8 npc_1_keitai_talk10_tex_index[] = { 0, 1, 2, 2, 2, 2, 2, 1, 0, 0, 0, 0, 0, 0, 0 };

u8 npc_1_keitai_talk11_tex_index[] = { 0, 0, 0, 0, 0, 0, 0, 1, 2, 2, 2, 2, 2, 2, 2 };

aNPC_Animation_c cKF_ba_r_npc_1_keitai_talk1 = {
    { cKF_ckcb_r_npc_1_keitai_talk1_tbl, cKF_ds_npc_1_keitai_talk1_tbl, cKF_kn_npc_1_keitai_talk1_tbl,
      cKF_c_npc_1_keitai_talk1_tbl, -1, 15 },
    1.0f,
    15.0f,
    cKF_FRAMECONTROL_STOP,
    -5.0f,
    npc_1_keitai_talk10_tex_index,
    aNPC_EYE_TEX0,
    -1,
    npc_1_keitai_talk11_tex_index,
    aNPC_MOUTH_TEX0,
    -1,
    -1,
    -1,
    NULL,
    NULL,
};
