#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_shituren_i1_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_shituren_i1_tbl[] = {
    2, 6, 7, 2, 5, 3, 3, 7, 5, 2, 7, 2, 2, 7, 2, 3, 7, 5, 2, 7, 2, 2, 7,  3, 2, 5, 2,
    2, 8, 2, 2, 7, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 6, 12, 7, 2, 4, 2
};

s16 cKF_c_npc_1_shituren_i1_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_shituren_i1_tbl[] = {
    1,  0,    0,   40, 0,    0,     1,  975,  0,     5,  1000, 0,     11, 1000, 0,     12, 988,  -708,
    14, 900,  0,   40, 900,  0,     1,  0,    0,     5,  0,    0,     9,  75,   0,     11, 75,   0,
    13, 100,  0,   14, 75,   0,     40, 75,   0,     1,  0,    0,     40, 0,    0,     1,  60,   0,
    5,  13,   0,   9,  50,   0,     13, -150, 0,     40, -150, 0,     1,  90,   0,     5,  0,    0,
    40, 0,    0,   1,  -185, 0,     5,  -175, 0,     40, -175, 0,     1,  40,   0,     5,  -85,  0,
    9,  70,   0,   10, 30,   -2282, 13, -240, -3425, 14, -350, 0,     40, -350, 0,     1,  -85,  0,
    5,  20,   -71, 11, 10,   0,     14, 80,   0,     40, 80,   0,     1,  0,    0,     40, 0,    0,
    1,  40,   0,   5,  200,  0,     9,  50,   0,     10, 55,   254,   13, 360,  7405,  14, 550,  0,
    40, 550,  0,   1,  0,    0,     40, 0,    0,     1,  0,    0,     40, 0,    0,     1,  -15,  0,
    5,  -100, 0,   10, -60,  0,     11, -65,  -342,  13, -265, -4492, 14, -350, 0,     40, -350, 0,
    1,  0,    0,   40, 0,    0,     1,  180,  0,     5,  175,  0,     40, 175,  0,     1,  -260, 0,
    5,  -85,  0,   9,  70,   0,     10, 30,   -2286, 13, -240, -3394, 14, -350, 0,     40, -350, 0,
    1,  -145, 0,   5,  -20,  72,    11, -10,  0,     14, -80,  0,     40, -80,  0,     1,  0,    0,
    40, 0,    0,   1,  560,  0,     5,  200,  0,     9,  50,   0,     10, 55,   254,   13, 360,  7405,
    14, 550,  0,   40, 550,  0,     1,  0,    0,     40, 0,    0,     1,  0,    0,     40, 0,    0,
    1,  -240, 0,   5,  -100, 0,     10, -60,  0,     11, -65,  -342,  13, -265, -4492, 14, -350, 0,
    40, -350, 0,   1,  -40,  0,     5,  0,    0,     40, 0,    0,     1,  0,    0,     40, 0,    0,
    1,  60,   0,   8,  0,    -943,  13, -100, 0,     21, 300,  0,     40, 300,  0,     1,  0,    0,
    40, 0,    0,   1,  0,    0,     40, 0,    0,     1,  82,   0,     6,  141,  695,   11, 250,  0,
    17, -160, 0,   21, 200,  0,     24, -100, 0,     27, 100,  0,     40, 100,  0,     1,  0,    0,
    40, 0,    0,   1,  0,    0,     40, 0,    0,     1,  100,  0,     5,  -10,  0,     12, 200,  0,
    17, -150, 0,   20, -60,  0,     23, -120, 0,     40, -120, 0,     1,  -90,  0,     5,  0,    0,
    40, 0,    0,   1,  0,    0,     40, 0,    0,     1,  -300, 0,     40, -300, 0,     1,  -500, 0,
    40, -500, 0,   1,  0,    0,     40, 0,    0,     1,  -600, 0,     40, -600, 0,     1,  0,    0,
    40, 0,    0,   1,  0,    0,     40, 0,    0,     1,  -300, 0,     40, -300, 0,     1,  503,  0,
    40, 503,  0,   1,  0,    0,     40, 0,    0,     1,  -600, 0,     40, -600, 0,     1,  0,    0,
    40, 0,    0,   1,  0,    0,     40, 0,    0,     1,  0,    0,     40, 0,    0,     1,  0,    0,
    40, 0,    0,   1,  0,    0,     27, 0,    0,     30, -20,  -560,  33, -120, 0,     37, -80,  0,
    40, -90,  0,   1,  -200, 0,     5,  -50,  0,     9,  -100, 0,     13, 220,  0,     17, 200,  0,
    20, 240,  0,   23, 220,  1,     28, 220,  0,     30, 200,  -579,  33, 80,   0,     37, 150,  0,
    40, 120,  0,   1,  -10,  0,     5,  0,    0,     27, 0,    0,     30, -50,  -1104, 33, -220, 0,
    37, -180, 0,   40, -200, 0,     1,  0,    0,     40, 0,    0,     1,  0,    0,     5,  0,    0,
    14, -100, 0,   40, -100, 0,     1,  0,    0,     40, 0,    0
};

u8 npc_1_shituren_i10_tex_index[] = { 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
                                      4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 };

u8 npc_1_shituren_i11_tex_index[] = { 0, 1, 2, 2, 2, 2, 1, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
                                      6, 6, 6, 6, 6, 6, 1, 2, 2, 2, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4 };

aNPC_Animation_c cKF_ba_r_npc_1_shituren_i1 = {
    { cKF_ckcb_r_npc_1_shituren_i1_tbl, cKF_ds_npc_1_shituren_i1_tbl, cKF_kn_npc_1_shituren_i1_tbl,
      cKF_c_npc_1_shituren_i1_tbl, -1, 40 },
    1.0f,
    40.0f,
    cKF_FRAMECONTROL_STOP,
    -5.0f,
    npc_1_shituren_i11_tex_index,
    aNPC_EYE_TEX0,
    -1,
    npc_1_shituren_i10_tex_index,
    aNPC_MOUTH_TEX0,
    -1,
    1,
    eEC_EFFECT_SITUREN,
    NULL,
    NULL,
};
