#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_kuisinbo1_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_kuisinbo1_tbl[] = { 2, 5, 5, 7, 7, 7, 6, 8, 7, 2, 5, 2, 2,  7,  6, 7, 7,  7,
                                     2, 7, 2, 2, 8, 7, 2, 9, 2, 2, 9, 6, 10, 11, 8, 8, 8,  8,
                                     2, 8, 2, 9, 6, 9, 2, 7, 2, 2, 2, 2, 11, 14, 7, 2, 20, 2 };

s16 cKF_c_npc_1_kuisinbo1_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_kuisinbo1_tbl[] = {
    1,  0,    0,     61, 0,    0,    1,  1300, 0,     13, 1300, 0,     25, 1000, 0,     55, 1000, 0,    61, 1300, 0,
    1,  150,  0,     13, 150,  0,    25, 0,    0,     55, 0,    0,     61, 150,  0,     1,  100,  0,    9,  -100, 0,
    17, 100,  0,     25, 0,    0,    45, 0,    0,     55, 25,   244,   61, 100,  0,     1,  -200, 0,    13, -100, 0,
    25, 50,   0,     35, -50,  0,    45, -50,  0,     55, -75,  -253,  61, -200, 0,     1,  -100, 0,    9,  100,  0,
    17, -100, 0,     25, 0,    0,    45, 0,    0,     55, -25,  -251,  61, -100, 0,     1,  -70,  0,    9,  -215, 0,
    17, 0,    0,     25, -60,  0,    55, -60,  0,     61, -70,  0,     1,  -125, 0,     9,  -35,  0,    13, -35,  0,
    17, 20,   635,   25, 148,  0,    35, 45,   0,     55, 45,   0,     61, -125, 0,     1,  125,  0,    9,  -50,  0,
    17, 155,  0,     25, 53,   0,    35, 48,   0,     55, 48,   0,     61, 125,  0,     1,  0,    0,    61, 0,    0,
    1,  0,    0,     9,  0,    0,    13, 80,   0,     17, 0,    0,     61, 0,    0,     1,  0,    0,    61, 0,    0,
    1,  0,    0,     61, 0,    0,    1,  235,  0,     9,  320,  0,     13, 230,  -849,  17, 115,  -870, 25, -90,  0,
    55, -90,  0,     61, 235,  0,    1,  -65,  0,     9,  -60,  0,     25, -60,  0,     35, -55,  0,    55, -55,  0,
    61, -65,  0,     1,  150,  0,    9,  -15,  0,     17, 145,  0,     25, 35,   0,     35, 41,   0,    55, 41,   0,
    61, 150,  0,     1,  -200, 0,    9,  -205, 0,     13, -90,  929,   25, 53,   0,     35, -12,  0,    55, -12,  0,
    61, -200, 0,     1,  60,   0,    9,  -90,  0,     17, 90,   0,     25, -25,  0,     35, -21,  0,    55, -21,  0,
    61, 60,   0,     1,  0,    0,    61, 0,    0,     1,  100,  0,     9,  215,  0,     17, 0,    0,    25, 102,  0,
    35, 32,   0,     55, 32,   0,    61, 100,  0,     1,  0,    0,     61, 0,    0,     1,  0,    0,    61, 0,    0,
    1,  280,  0,     9,  160,  0,    13, 250,  0,     17, 200,  -764,  25, -101, 0,     35, -69,  0,    55, -69,  0,
    61, 280,  0,     1,  0,    0,    13, 0,    0,     17, 15,   0,     25, 15,   0,     35, 31,   0,    55, 31,   0,
    61, 0,    0,     1,  0,    0,    61, 0,    0,     1,  -140, -969,  2,  -150, 0,     14, 0,    0,    22, -150, 0,
    36, 150,  0,     41, 100,  -374, 51, 150,  492,   56, 150,  -479,  61, -140, -909,  1,  0,    0,    61, 0,    0,
    1,  0,    0,     61, 0,    0,    1,  -25,  -2028, 5,  -200, 0,     14, -50,  0,     22, -225, 0,    36, 250,  0,
    41, 200,  -386,  51, 300,  755,  56, 300,  -755,  61, -25,  -2028, 1,  23,   -275,  11, -150, 0,    19, 150,  0,
    27, -100, 0,     32, -50,  492,  61, 23,   -275,  1,  143,  436,   2,  150,  0,     10, -150, 0,    18, 150,  0,
    26, -100, 0,     36, 50,   0,    41, 100,  0,     51, 25,   0,     56, 50,   0,     61, 143,  436,  1,  140,  726,
    2,  150,  0,     14, 75,   0,    26, -75,  0,     31, 0,    0,     36, 50,   0,     41, 75,   0,    46, 50,   0,
    51, 50,   0,     56, 25,   0,    61, 140,  726,   1,  48,   136,   2,  50,   0,     10, -50,  0,    18, 50,   0,
    26, 0,    0,     46, 0,    0,    56, 25,   0,     61, 48,   136,   1,  -255, -956,  10, -900, 0,    18, -625, 0,
    26, -400, 0,     36, -625, 0,    41, -625, -8,    51, -150, 0,     61, -255, -956,  1,  -358, -400, 10, -450, 0,
    18, -550, 0,     26, -300, 0,    36, -550, 0,     41, -550, 0,     51, -300, 0,     61, -358, -400, 1,  -145, 1020,
    10, 500,  0,     18, 150,  0,    26, -50,  0,     36, 150,  0,     41, 150,  0,     51, -250, 0,    61, -145, 1020,
    1,  0,    0,     61, 0,    0,    1,  -730, 460,   3,  -700, 467,   11, -100, 0,     19, -800, 0,    27, -600, 0,
    37, -800, 0,     52, -800, 0,    61, -730, 460,   1,  0,    0,     61, 0,    0,     1,  938,  642,  2,  950,  0,
    10, 500,  0,     18, 950,  0,    26, 500,  0,     36, 350,  -761,  46, 200,  0,     51, 270,  1016, 61, 938,  642,
    1,  -375, -737,  10, -550, 0,    18, -400, 0,     26, -550, 0,     46, -100, 0,     61, -375, -737, 1,  -582, -1211,
    2,  -600, 0,     10, 0,    0,    18, -600, 0,     26, 0,    0,     36, 150,  979,   46, 500,  0,    51, 375,  -1854,
    61, -582, -1211, 1,  0,    0,    61, 0,    0,     1,  -140, 1331,  3,  -100, 0,     11, -750, 0,    19, -100, 0,
    27, -750, 0,     52, -550, 0,    61, -140, 1331,  1,  0,    0,     61, 0,    0,     1,  630,  0,    61, 630,  0,
    1,  -495, 0,     61, -495, 0,    1,  348,  0,     61, 348,  0,     1,  -283, -1479, 2,  -300, 0,    10, 100,  0,
    18, -200, 0,     26, -50,  0,    36, 100,  0,     41, 125,  0,     46, 75,   0,     51, 0,    0,    56, -75,  0,
    61, -283, -1479, 1,  88,   389,  6,  125,  0,     10, 50,   0,     14, 100,  0,     18, 75,   0,    22, 125,  0,
    26, 75,   0,     31, 125,  0,    36, 50,   0,     41, 100,  0,     46, 25,   0,     51, 75,   0,    56, 25,   0,
    61, 88,   389,   1,  -45,  -202, 2,  -50,  0,     10, -25,  0,     18, -50,  0,     26, 0,    0,    56, 0,    0,
    61, -45,  -202,  1,  0,    0,    61, 0,    0,     1,  0,    0,     3,  0,    0,     7,  -300, 0,    11, 0,    0,
    12, 0,    0,     16, -300, 0,    20, 0,    0,     21, 0,    0,     25, -300, 0,     29, 0,    0,    30, 0,    0,
    34, -300, 0,     38, 0,    0,    39, 0,    0,     43, -300, 0,     47, 0,    0,     48, 0,    0,    52, -150, 0,
    56, 0,    0,     61, 0,    0,    1,  0,    0,     61, 0,    0
};

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

aNPC_Animation_c cKF_ba_r_npc_1_kuisinbo1 = {
    { cKF_ckcb_r_npc_1_kuisinbo1_tbl, cKF_ds_npc_1_kuisinbo1_tbl, cKF_kn_npc_1_kuisinbo1_tbl, cKF_c_npc_1_kuisinbo1_tbl,
      -1, 61 },
    1.0f,
    61.0f,
    cKF_FRAMECONTROL_REPEAT,
    -5.0f,
    NULL,
    aNPC_EYE_TEX0,
    5,
    npc_1_kuisinbo10_tex_index,
    aNPC_MOUTH_TEX0,
    -1,
    -1,
    -1,
    NULL,
    NULL,
};
