#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_talk2_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_talk2_tbl[] = { 2, 2, 2, 2, 6, 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, 7,  2, 2, 8, 7,
                                        2, 2, 2, 2, 3, 7, 2, 7, 2, 2, 2, 2, 3, 11, 2, 2, 2, 2 };

s16 cKF_c_npc_1_keitai_talk2_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_talk2_tbl[] = {
    1,  -1000, 0, 91, -1000, 0,   1,  2000, 0, 91, 2000, 0,   1,  6000, 0,   91, 6000, 0,   1,  -450, 0,   91, -450, 0,
    1,  0,     0, 25, -10,   0,   46, -10,  0, 61, 0,    0,   76, -10,  0,   91, 0,    0,   1,  0,    0,   91, 0,    0,
    1,  -175,  0, 91, -175,  0,   1,  -100, 0, 91, -100, 0,   1,  25,   0,   91, 25,   0,   1,  0,    0,   91, 0,    0,
    1,  200,   0, 91, 200,   0,   1,  0,    0, 91, 0,    0,   1,  0,    0,   91, 0,    0,   1,  -100, 0,   91, -100, 0,
    1,  0,     0, 91, 0,     0,   1,  175,  0, 91, 175,  0,   1,  -100, 0,   91, -100, 0,   1,  -25,  0,   91, -25,  0,
    1,  0,     0, 91, 0,     0,   1,  200,  0, 91, 200,  0,   1,  0,    0,   91, 0,    0,   1,  0,    0,   91, 0,    0,
    1,  -100,  0, 91, -100,  0,   1,  0,    0, 91, 0,    0,   1,  0,    0,   91, 0,    0,   1,  60,   0,   91, 60,   0,
    1,  0,     0, 91, 0,     0,   1,  0,    0, 91, 0,    0,   1,  80,   0,   91, 80,   0,   1,  0,    0,   91, 0,    0,
    1,  -100,  0, 46, -200,  0,   91, -100, 0, 1,  40,   100, 6,  50,   0,   25, 25,   0,   46, 15,   0,   66, 40,   0,
    81, 25,    0, 91, 40,    100, 1,  -100, 0, 91, -100, 0,   1,  0,    0,   91, 0,    0,   1,  50,   132, 7,  70,   0,
    22, 20,    0, 37, 70,    0,   52, 20,   0, 67, 70,   0,   82, 20,   0,   91, 50,   132, 1,  -620, 0,   16, -600, 0,
    31, -620,  0, 46, -600,  0,   61, -620, 0, 76, -600, 0,   91, -620, 0,   1,  0,    0,   91, 0,    0,   1,  -250, 0,
    91, -250,  0, 1,  0,     0,   91, 0,    0, 1,  600,  0,   91, 600,  0,   1,  -200, 0,   46, -300, 0,   91, -200, 0,
    1,  -100,  0, 16, -70,   0,   31, -100, 0, 46, -70,  0,   61, -100, 0,   76, -70,  0,   91, -100, 0,   1,  0,    0,
    91, 0,     0, 1,  -350,  0,   16, -380, 0, 31, -350, 0,   46, -380, 0,   61, -350, 0,   76, -380, 0,   91, -350, 0,
    1,  0,     0, 91, 0,     0,   1,  150,  0, 91, 150,  0,   1,  100,  0,   91, 100,  0,   1,  50,   0,   91, 50,   0,
    1,  -70,   0, 46, 70,    0,   91, -70,  0, 1,  30,   -96, 10, 15,   0,   25, 30,   0,   30, -35,  0,   36, 25,   0,
    41, -40,   0, 47, 20,    0,   70, 15,   0, 75, -50,  0,   81, 15,   108, 91, 30,   -96, 1,  50,   0,   91, 50,   0,
    1,  0,     0, 91, 0,     0,   1,  0,    0, 91, 0,    0,   1,  0,    0,   91, 0,    0
};

aNPC_Animation_c cKF_ba_r_npc_1_keitai_talk2 = {
    { cKF_ckcb_r_npc_1_keitai_talk2_tbl, cKF_ds_npc_1_keitai_talk2_tbl, cKF_kn_npc_1_keitai_talk2_tbl,
      cKF_c_npc_1_keitai_talk2_tbl, -1, 91 },
    1.0f,
    91.0f,
    cKF_FRAMECONTROL_REPEAT,
    -5.0f,
    NULL,
    aNPC_EYE_TEX1,
    -1,
    NULL,
    aNPC_MOUTH_TEX1,
    0,
    -1,
    -1,
    NULL,
    NULL,
};
