#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_keirei1_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_keirei1_tbl[] = { 6, 5, 5, 2, 5, 4, 2, 6, 9, 2, 5, 2, 2, 2, 2, 4, 5, 5, 2, 5, 2, 2, 2, 2, 2, 8, 6,
                                   2, 8, 6, 4, 7, 7, 2, 5, 9, 2, 5, 4, 4, 7, 4, 2, 5, 2, 2, 2, 2, 4, 7, 7, 2, 2, 2 };

s16 cKF_c_npc_1_keirei1_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_keirei1_tbl[] = {
    1,  0,    0,     5,  -50,  0,     7,  -125,  -1014, 9,  -175,  0,     23, -175,  0,    31, 0,     0, 1,  1000, 0,
    5,  925,  0,     7,  1025, 0,     9,  1000,  0,     31, 1000,  0,     1,  0,     0,    5,  -200,  0, 9,  225,  0,
    23, 225,  0,     31, 0,    0,     1,  0,     0,     31, 0,     0,     1,  0,     0,    5,  100,   0, 9,  -100, 0,
    23, -100, 0,     31, 0,    0,     1,  0,     0,     5,  100,   0,     9,  0,     0,    31, 0,     0, 1,  -175, 0,
    31, -175, 0,     1,  -100, 0,     3,  -350,  0,     7,  250,   0,     9,  80,    0,    23, 80,    0, 31, -100, 0,
    1,  25,   0,     3,  275,  2551,  5,  350,   0,     7,  200,   -4050, 9,  -150,  0,    10, -100,  0, 11, -150, 0,
    23, -150, 0,     31, 25,   0,     1,  0,     0,     31, 0,     0,     1,  200,   0,    5,  200,   0, 9,  -100, 0,
    23, -100, 0,     31, 200,  0,     1,  0,     0,     31, 0,     0,     1,  0,     0,    31, 0,     0, 1,  -100, 0,
    31, -100, 0,     1,  0,    0,     31, 0,     0,     1,  175,   0,     5,  50,    0,    9,  175,   0, 31, 175,  0,
    1,  -100, 0,     5,  -350, 0,     9,  80,    0,     23, 80,    0,     31, -100,  0,    1,  -25,   0, 5,  -125, 0,
    9,  150,  0,     23, 150,  0,     31, -25,   0,     1,  0,     0,     31, 0,     0,    1,  200,   0, 5,  650,  0,
    9,  -100, 0,     23, -100, 0,     31, 200,   0,     1,  0,     0,     31, 0,     0,    1,  0,     0, 31, 0,    0,
    1,  -100, 0,     31, -100, 0,     1,  0,     0,     31, 0,     0,     1,  0,     0,    31, 0,     0, 1,  60,   0,
    5,  0,    -1530, 9,  -300, 0,     12, -150,  0,     15, -200,  0,     19, -175,  0,    24, -175,  0, 31, 60,   0,
    1,  0,    0,     7,  75,   0,     12, -25,   0,     19, 10,    0,     26, -5,    0,    31, 0,     0, 1,  0,    0,
    31, 0,    0,     1,  82,   0,     7,  250,   0,     11, -100,  0,     14, 75,    0,    17, 25,    0, 21, 63,   0,
    26, 38,   0,     31, 82,   0,     1,  0,     0,     5,  -150,  0,     10, 200,   0,    15, -100,  0, 22, 50,   0,
    31, 0,    0,     1,  0,    0,     5,  200,   0,     9,  0,     0,     31, 0,     0,    1,  0,     0, 5,  -150, 0,
    9,  260,  0,     10, 245,  0,     11, 250,   0,     23, 250,   0,     31, 0,     0,    1,  0,     0, 3,  -13,  -535,
    5,  -50,  0,     9,  5,    0,     10, -3,    0,     11, 0,     0,     31, 0,     0,    1,  0,     0, 31, 0,    0,
    1,  58,   0,     5,  -250, 0,     9,  0,     0,     23, 0,     0,     31, 58,    0,    1,  -564,  0, 3,  -375, 2642,
    5,  -300, 0,     7,  -400, -4471, 9,  -1050, 0,     10, -1000, 0,     11, -1050, 0,    23, -1050, 0, 31, -564, 240,
    1,  0,    0,     31, 0,    0,     1,  -57,   0,     5,  175,   1126,  9,  250,   0,    23, 250,   0, 31, -57,  0,
    1,  0,    0,     9,  100,  0,     23, 100,   0,     31, 0,     0,     1,  0,     0,    9,  650,   0, 23, 650,  0,
    31, 0,    0,     1,  58,   0,     3,  -300,  -4431, 5,  -450,  -375,  7,  -425,  1117, 9,  -350,  0, 23, -350, 0,
    31, 58,   0,     1,  564,  0,     9,  -500,  0,     23, -500,  0,     31, 564,   0,    1,  0,     0, 31, 0,    0,
    1,  -57,  0,     5,  300,  0,     9,  -450,  0,     23, -450,  0,     31, -57,   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,
    6,  -150, 0,     10, 0,    0,     31, 0,     0,     1,  0,     0,     6,  -200,  0,    10, 60,    0, 11, 45,   0,
    12, 50,   0,     23, 50,   0,     31, 0,     0,     1,  0,     0,     6,  -50,   0,    10, 10,    0, 11, -5,   0,
    12, 0,    0,     23, 0,    0,     31, 0,     -273,  1,  0,     0,     31, 0,     0,    1,  0,     0, 31, 0,    0,
    1,  0,    0,     31, 0,    0
};

u8 npc_1_keirei10_tex_index[] = { 3, 3, 3, 4, 5, 5, 5, 4, 3, 3, 3, 3, 3, 3, 3, 3,
                                  3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 };

u8 npc_1_keirei11_tex_index[] = { 0, 0, 1, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
                                  3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0 };

aNPC_Animation_c cKF_ba_r_npc_1_keirei1 = {
    { cKF_ckcb_r_npc_1_keirei1_tbl, cKF_ds_npc_1_keirei1_tbl, cKF_kn_npc_1_keirei1_tbl, cKF_c_npc_1_keirei1_tbl, -1,
      31 },
    1.0f,
    31.0f,
    cKF_FRAMECONTROL_STOP,
    -4.0f,
    npc_1_keirei11_tex_index,
    aNPC_EYE_TEX0,
    -1,
    npc_1_keirei10_tex_index,
    aNPC_MOUTH_TEX0,
    -1,
    -1,
    -1,
    NULL,
    NULL,
};
