#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_gekido_r2_tbl[] = { 56, 7, 0, 7, 7, 7, 0, 7, 7, 7, 0, 7, 7, 7, 0, 7, 7, 0, 7, 7, 7, 7, 0, 0, 0, 0 };

s16 cKF_kn_npc_1_gekido_r2_tbl[] = { 2, 2, 2, 5, 3,  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, 10, 12, 10, 7, 5, 6, 2, 2, 2, 2, 8, 7, 2, 2, 2, 7, 8, 2, 10, 11, 10 };

s16 cKF_c_npc_1_gekido_r2_tbl[] = { 0, 0, 900, 0, 0,    1800, 0, 0, 1800, 0, 900, 0, 0, 0, -900,
                                    0, 0, 900, 0, -900, 0,    0, 6, 0,    0, 0,   0, 0, 0, -900 };

s16 cKF_ds_npc_1_gekido_r2_tbl[] = {
    1,  0,    0,     31, 0,    0,    1,  0,    0,    31, 0,    0,    1,  0,    0,    31, 0,    0,    1,  0,    670,
    9,  0,    -684,  16, 0,    695,  24, 0,    -703, 31, 0,    706,  1,  -25,  -349, 16, -20,  346,  31, -25,  -354,
    1,  10,   0,     31, 10,   0,    1,  0,    0,    31, 0,    0,    1,  0,    0,    31, 0,    0,    1,  0,    0,
    31, 0,    0,     1,  0,    0,    31, 0,    0,    1,  0,    0,    31, 0,    0,    1,  0,    0,    31, 0,    0,
    1,  0,    0,     31, 0,    0,    1,  0,    0,    31, 0,    0,    1,  0,    0,    31, 0,    0,    1,  0,    0,
    31, 0,    0,     1,  0,    0,    31, 0,    0,    1,  0,    0,    31, 0,    0,    1,  0,    0,    31, 0,    0,
    1,  0,    0,     31, 0,    0,    1,  0,    0,    31, 0,    0,    1,  0,    0,    31, 0,    0,    1,  0,    0,
    31, 0,    0,     1,  0,    0,    31, 0,    0,    1,  0,    0,    31, 0,    0,    1,  0,    0,    31, 0,    0,
    1,  0,    0,     31, 0,    0,    1,  0,    0,    31, 0,    0,    1,  0,    0,    31, 0,    0,    1,  0,    0,
    31, 0,    0,     1,  50,   1491, 3,  100,  0,    9,  50,   -599, 15, -100, 0,    18, -50,  1278, 20, 100,  0,
    22, 55,   -1373, 25, -100, 0,    29, -50,  1124, 31, 50,   1911, 1,  200,  0,    4,  165,  -645, 9,  50,   0,
    14, 85,   597,   17, 200,  0,    19, 100,  0,    21, 175,  0,    23, 50,   0,    25, 150,  0,    28, 50,   0,
    29, 65,   781,   31, 200,  0,    1,  20,   1094, 3,  50,   0,    9,  25,   -330, 15, -50,  0,    18, -25,  722,
    20, 50,   0,     22, 25,   -752, 25, -50,  0,    29, -25,  505,  31, 20,   1077, 1,  -750, 0,    4,  -500, 0,
    9,  -750, 0,     17, -500, 0,    21, -750, 0,    25, -500, 0,    31, -750, 0,    1,  -600, 0,    4,  -900, 0,
    17, -300, 0,     25, -900, 0,    31, -600, 0,    1,  450,  0,    4,  450,  0,    10, 300,  0,    17, 200,  0,
    25, 300,  0,     31, 450,  0,    1,  0,    0,    31, 0,    0,    1,  0,    0,    31, 0,    0,    1,  0,    0,
    31, 0,    0,     1,  0,    0,    31, 0,    0,    1,  -100, 4680, 4,  200,  0,    9,  -500, 0,    17, 200,  0,
    21, -500, 0,     25, 200,  0,    28, -500, 0,    31, -100, 4546, 1,  -650, 0,    7,  -300, 0,    13, -650, 0,
    19, -300, 0,     23, -650, 0,    27, -300, 0,    31, -650, 0,    1,  0,    0,    31, 0,    0,    1,  0,    0,
    31, 0,    0,     1,  0,    0,    31, 0,    0,    1,  145,  0,    7,  350,  0,    14, 150,  0,    19, 350,  0,
    23, 150,  0,     27, 350,  0,    31, 150,  0,    1,  -500, 0,    9,  -350, 510,  13, -350, -518, 17, -450, 0,
    21, -350, 0,     25, -450, 0,    29, -350, 0,    31, -500, 0,    1,  400,  0,    31, 400,  0,    1,  50,   1479,
    3,  100,  0,     9,  50,   -592, 15, -100, 0,    18, -50,  1127, 20, 100,  0,    22, 55,   -833, 25, -100, 0,
    29, -50,  1121,  31, 50,   1935, 1,  150,  0,    4,  115,  -848, 9,  0,    0,    14, 35,   825,  17, 150,  0,
    19, 50,   0,     21, 125,  0,    23, 0,    0,    25, 100,  0,    28, 50,   0,    31, 150,  0,    1,  -20,  -1108,
    3,  -70,  0,     9,  -35,  448,  15, 70,   0,    18, 40,   -882, 20, -70,  0,    22, -35,  1061, 25, 70,   0,
    29, 40,   -606,  31, -20,  -1076
};

u8 npc_1_gekido_r21_tex_index[] = { 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 5,
                                    5, 6, 6, 6, 5, 5, 6, 6, 5, 5, 6, 6, 6, 6, 5 };

aNPC_Animation_c cKF_ba_r_npc_1_gekido_r2 = {
    { cKF_ckcb_r_npc_1_gekido_r2_tbl, cKF_ds_npc_1_gekido_r2_tbl, cKF_kn_npc_1_gekido_r2_tbl, cKF_c_npc_1_gekido_r2_tbl,
      -1, 31 },
    1.0f,
    31.0f,
    cKF_FRAMECONTROL_REPEAT,
    0.0f,
    npc_1_gekido_r21_tex_index,
    aNPC_EYE_TEX0,
    -1,
    NULL,
    aNPC_MOUTH_TEX2,
    5,
    -1,
    -1,
    NULL,
    NULL,
};
