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

s16 cKF_c_npc_1_don1_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_don1_tbl[] = {
    1,  0,    0,    13, 0,    0,    1,  975,  0,    5,  925,  0, 13, 975,  0, 1,  0,    0,   13, 0,    0,
    1,  0,    0,    13, 0,    0,    1,  75,   0,    5,  175,  0, 13, 75,   0, 1,  -50,  0,   5,  -50,  0,
    13, -30,  0,    1,  -173, 0,    5,  -155, 0,    13, -173, 0, 1,  -133, 0, 5,  -103, 0,   13, -115, 0,
    1,  108,  0,    5,  123,  0,    13, 83,   0,    1,  0,    0, 13, 0,    0, 1,  435,  0,   5,  588,  0,
    13, 395,  0,    1,  0,    0,    13, 0,    0,    1,  0,    0, 13, 0,    0, 1,  -225, 0,   5,  -310, 0,
    13, -205, 0,    1,  8,    0,    5,  5,    0,    13, 8,    0, 1,  175,  0, 5,  185,  0,   13, 175,  0,
    1,  -25,  0,    5,  -40,  0,    13, -55,  0,    1,  25,   0, 5,  -14,  0, 13, -5,   0,   1,  0,    0,
    13, 0,    0,    1,  200,  0,    5,  458,  0,    13, 265,  0, 1,  0,    0, 13, 0,    0,   1,  0,    0,
    13, 0,    0,    1,  -105, 0,    5,  -235, 0,    13, -135, 0, 1,  -5,   0, 5,  -3,   0,   13, 0,    0,
    1,  0,    0,    5,  0,    0,    13, 0,    0,    1,  -250, 0, 5,  0,    0, 13, -200, 0,   1,  0,    0,
    7,  -25,  0,    13, 0,    0,    1,  0,    0,    5,  0,    0, 9,  0,    0, 13, 0,    0,   1,  0,    -513,
    5,  -250, 0,    9,  250,  0,    13, 80,   0,    1,  0,    0, 7,  100,  0, 13, 0,    0,   1,  100,  -101,
    2,  100,  0,    5,  150,  0,    13, 100,  0,    1,  100,  0, 2,  100,  0, 5,  -50,  0,   13, 30,   0,
    1,  -50,  -149, 2,  -50,  0,    5,  -200, 0,    13, -75,  0, 1,  250,  0, 2,  300,  0,   5,  250,  -746,
    13, 100,  0,    1,  -150, 0,    2,  -75,  1340, 5,  -30,  0, 13, -50,  0, 1,  -550, 0,   2,  -450, 3730,
    5,  -200, 0,    13, -450, 0,    1,  0,    0,    13, 0,    0, 1,  -500, 0, 5,  -600, 0,   13, -450, 0,
    1,  0,    0,    13, 0,    0,    1,  250,  0,    5,  575,  0, 13, 375,  0, 1,  -275, 0,   5,  25,   0,
    13, -150, 0,    1,  -300, -192, 2,  -325, 1095, 5,  -90,  0, 13, -125, 0, 1,  0,    0,   13, 0,    0,
    1,  0,    0,    5,  -450, 0,    13, -250, 0,    1,  0,    0, 13, 0,    0, 1,  750,  0,   4,  678,  -1377,
    8,  501,  0,    13, 625,  0,    1,  0,    0,    4,  0,    0, 8,  135,  0, 13, 100,  0,   1,  0,    0,
    4,  0,    0,    5,  -28,  -719, 8,  -50,  0,    13, 25,   0, 1,  0,    0, 2,  0,    0,   5,  -25,  0,
    9,  25,   0,    13, 25,   0,    1,  -175, 0,    13, -125, 0, 1,  -150, 0, 2,  -140, 599, 5,  50,   0,
    13, -75,  0,    1,  0,    0,    13, 0,    0,    1,  0,    0, 4,  0,    0, 7,  -200, 0,   13, 0,    0,
    1,  0,    0,    13, 0,    0
};

u8 npc_1_don10_tex_index[] = { 0, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4 };

u8 npc_1_don11_tex_index[] = { 0, 1, 7, 7, 7, 1, 0, 6, 6, 6, 6, 6, 6 };

aNPC_Animation_c cKF_ba_r_npc_1_don1 = {
    { cKF_ckcb_r_npc_1_don1_tbl, cKF_ds_npc_1_don1_tbl, cKF_kn_npc_1_don1_tbl, cKF_c_npc_1_don1_tbl, -1, 13 },
    1.0f,
    13.0f,
    cKF_FRAMECONTROL_STOP,
    -3.0f,
    npc_1_don11_tex_index,
    aNPC_EYE_TEX0,
    -1,
    npc_1_don10_tex_index,
    aNPC_MOUTH_TEX0,
    -1,
    -1,
    -1,
    NULL,
    NULL,
};
