#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_kokkuri_d2_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_kokkuri_d2_tbl[] = { 2, 2,  2, 2, 7,  7,  2, 6,  2, 2, 2, 2, 2, 2,  2,  2, 6,  2,
                                      2, 2,  2, 2, 2,  2,  2, 2,  2, 2, 2, 2, 8, 12, 6,  8, 11, 11,
                                      2, 12, 7, 8, 11, 11, 2, 12, 7, 2, 2, 2, 8, 13, 13, 2, 2,  2 };

s16 cKF_c_npc_1_kokkuri_d2_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_kokkuri_d2_tbl[] = {
    1,   0,    0,    141, 0,    0,    1,   2400, 0,    141, 2400, 0,   1,   0,    0,    141, 0,    0,   1,   0,    0,
    141, 0,    0,    1,   150,  0,    45,  125,  -15,  71,  120,  0,   76,  100,  0,    84,  170,  0,   118, 170,  0,
    141, 150,  0,    1,   0,    0,    12,  5,    0,    34,  -5,   0,   71,  0,    0,    76,  5,    0,   91,  0,    0,
    141, 0,    0,    1,   0,    0,    141, 0,    0,    1,   -450, 0,   46,  -480, 0,    72,  -480, 0,   77,  -550, 0,
    91,  -450, 0,    141, -450, 0,    1,   0,    0,    141, 0,    0,   1,   0,    0,    141, 0,    0,   1,   0,    0,
    141, 0,    0,    1,   0,    0,    141, 0,    0,    1,   0,    0,   141, 0,    0,    1,   0,    0,   141, 0,    0,
    1,   0,    0,    141, 0,    0,    1,   0,    0,    141, 0,    0,   1,   -450, 0,    46,  -480, 0,   72,  -480, 0,
    77,  -550, 0,    91,  -450, 0,    141, -450, 0,    1,   0,    0,   141, 0,    0,    1,   0,    0,   141, 0,    0,
    1,   0,    0,    141, 0,    0,    1,   0,    0,    141, 0,    0,   1,   0,    0,    141, 0,    0,   1,   0,    0,
    141, 0,    0,    1,   0,    0,    141, 0,    0,    1,   0,    0,   141, 0,    0,    1,   0,    0,   141, 0,    0,
    1,   0,    0,    141, 0,    0,    1,   0,    0,    141, 0,    0,   1,   0,    0,    141, 0,    0,   1,   0,    0,
    141, 0,    0,    1,   0,    0,    95,  0,    0,    101, -80,  0,   104, -70,  302,  115, 80,   0,   118, 70,   -198,
    125, 0,    0,    141, 0,    0,    1,   -200, 0,    2,   -200, 0,   46,  -240, -26,  72,  -250, 0,   77,  -280, 0,
    85,  -155, 0,    95,  -170, 0,    104, -170, 0,    109, -200, 0,   115, -170, 0,    118, -170, 0,   141, -200, 0,
    1,   0,    0,    2,   0,    0,    72,  0,    37,   77,  10,   0,   91,  0,    0,    141, 0,    0,   1,   250,  0,
    76,  250,  0,    79,  180,  -552, 83,  150,  0,    91,  250,  0,   95,  250,  0,    125, 0,    0,   141, 250,  0,
    1,   -250, 0,    76,  -250, 0,    79,  -180, 480,  83,  -150, 0,   91,  -250, 0,    95,  -250, 0,   101, 30,   0,
    109, 60,   172,  115, 100,  0,    125, 58,   0,    141, -250, 0,   1,   -550, 0,    72,  -550, 0,   76,  -475, 296,
    83,  -450, 0,    91,  -550, 0,    95,  -550, 0,    101, -530, 0,   109, -560, 0,    115, -530, 0,   125, -564, 0,
    141, -550, 0,    1,   0,    0,    141, 0,    0,    1,   -600, 0,   72,  -600, 0,    76,  -700, 0,   79,  -520, 1147,
    83,  -450, 0,    91,  -600, 0,    95,  -600, 0,    103, -20,  0,   109, -60,  -243, 117, -100, 0,   125, -57,  0,
    141, -600, 0,    1,   0,    0,    95,  0,    0,    103, 30,   0,   109, 0,    0,    117, 30,   0,   125, 0,    0,
    141, 0,    0,    1,   -250, 0,    76,  -250, 0,    79,  -180, 491, 83,  -150, 0,    91,  -250, 0,   95,  -250, 0,
    125, 0,    0,    141, -250, 0,    1,   -250, 0,    76,  -250, 0,   79,  -180, 480,  83,  -150, 0,   91,  -250, 0,
    95,  -250, 0,    101, 90,   0,    109, 60,   -178, 115, 30,   0,   125, 58,   0,    141, -250, 0,   1,   550,  0,
    72,  550,  0,    76,  475,  -306, 83,  450,  0,    91,  550,  0,   95,  550,  0,    101, 530,  0,   109, 560,  0,
    115, 530,  0,    125, 564,  0,    141, 550,  0,    1,   0,    0,   141, 0,    0,    1,   -600, 0,   72,  -600, 0,
    76,  -700, 0,    79,  -520, 1147, 83,  -450, 0,    91,  -600, 0,   95,  -600, 0,    102, -100, 0,   109, -60,  279,
    116, -20,  0,    125, -57,  0,    141, -600, 0,    1,   0,    0,   95,  0,    0,    102, -30,  0,   109, 0,    0,
    116, -30,  0,    125, 0,    0,    141, 0,    0,    1,   0,    0,   141, 0,    0,    1,   0,    0,   141, 0,    0,
    1,   0,    0,    141, 0,    0,    1,   0,    0,    95,  0,    0,   99,  -320, 0,    104, -300, 0,   109, 0,    3177,
    113, 320,  0,    119, 300,  0,    141, 0,    0,    1,   -150, 0,   3,   -150, 0,    47,  -190, -23, 73,  -200, 0,
    78,  -220, 0,    86,  15,   0,    95,  0,    0,    104, 0,    0,   109, -20,  0,    113, 0,    137, 119, 10,   0,
    130, -30,  -283, 141, -150, 0,    1,   1,    -30,  3,   0,    0,   14,  15,   0,    47,  0,    0,   73,  0,    0,
    78,  15,   0,    91,  1,    -30,  95,  1,    -30,  99,  50,   0,   104, 50,   0,    113, -50,  0,   119, -50,  0,
    141, 1,    -30,  1,   0,    0,    141, 0,    0,    1,   0,    0,   141, 0,    0,    1,   0,    0,   141, 0,    0
};

u8 npc_1_kokkuri_d21_tex_index[] = { 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, 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, 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, 2, 2, 2, 2, 1, 1, 6, 6, 6, 6, 6, 6, 6, 2, 2, 0, 0, 0, 0, 0, 0,
                                     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
                                     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2 };

aNPC_Animation_c cKF_ba_r_npc_1_kokkuri_d2 = {
    { cKF_ckcb_r_npc_1_kokkuri_d2_tbl, cKF_ds_npc_1_kokkuri_d2_tbl, cKF_kn_npc_1_kokkuri_d2_tbl,
      cKF_c_npc_1_kokkuri_d2_tbl, -1, 141 },
    1.0f,
    141.0f,
    cKF_FRAMECONTROL_STOP,
    -5.0f,
    npc_1_kokkuri_d21_tex_index,
    aNPC_EYE_TEX0,
    -1,
    NULL,
    aNPC_MOUTH_TEX0,
    0,
    -1,
    -1,
    NULL,
    NULL,
};
