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

s16 cKF_c_npc_1_banzai1_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_banzai1_tbl[] = {
    1,  0,    0,     28, 0,    0,     1,  1025, -2628, 4,  875,  -555,  9,  850,  0,     12, 950,  1769,
    17, 1550, 1512,  20, 1600, 0,     23, 1550, -1468, 28, 1025, -2628, 1,  0,    -1444, 4,  -100, 0,
    9,  -100, 0,     12, 25,   1590,  17, 325,  1140,  20, 375,  0,     23, 325,  -1152, 28, 0,    -1444,
    1,  0,    0,     28, 0,    0,     1,  0,    -115,  4,  -20,  -100,  9,  -20,  100,   12, -5,   148,
    20, 10,   0,     28, 0,    -115,  1,  0,    0,     28, 0,    0,     1,  -175, 0,     4,  -260, 0,
    10, -260, 0,     12, -175, 0,     28, -175, 0,     1,  -100, -1012, 4,  -365, -991,  10, -365, 962,
    12, -200, 2454,  18, 50,   0,     20, 50,   0,     28, -100, -1012, 1,  25,   0,     4,  130,  455,
    10, 130,  -455,  12, 70,   -450,  20, 80,   0,     28, 25,   0,     1,  0,    0,     28, 0,    0,
    1,  200,  0,     4,  640,  1345,  7,  700,  0,     12, 470,  -3595, 14, 250,  0,     18, 400,  1007,
    22, 450,  -229,  25, 380,  -1515, 28, 200,  0,     1,  0,    0,     28, 0,    0,     1,  0,    0,
    28, 0,    0,     1,  -100, -1563, 4,  -270, -455,  12, -260, 194,   14, 30,   1834,  20, 150,  0,
    28, -100, -1563, 1,  0,    0,     4,  20,   164,   10, 20,   -184,  12, -10,  0,     20, 0,    0,
    28, 0,    0,     1,  175,  0,     4,  260,  0,     10, 260,  0,     12, 175,  0,     28, 175,  0,
    1,  -100, -1015, 4,  -365, -991,  10, -365, 962,   12, -200, 2454,  18, 50,   0,     20, 50,   0,
    28, -100, -1015, 1,  -25,  0,     4,  -130, -458,  10, -130, 446,   12, -70,  527,   20, -80,  0,
    28, -25,  0,     1,  0,    0,     28, 0,    0,     1,  200,  0,     4,  640,  1350,  7,  700,  0,
    12, 470,  -3602, 14, 250,  0,     18, 400,  1007,  22, 450,  -230,  25, 380,  -1522, 28, 200,  0,
    1,  0,    0,     28, 0,    0,     1,  0,    0,     28, 0,    0,     1,  -100, -1563, 4,  -270, -450,
    12, -260, 202,   14, 30,   1834,  20, 150,  0,     28, -100, -1563, 1,  0,    0,     4,  -15,  -147,
    10, -15,  136,   12, 10,   0,     20, 0,    0,     28, 0,    0,     1,  0,    0,     28, 0,    0,
    1,  -44,  1310,  7,  200,  0,     14, -50,  -1409, 21, -200, 0,     28, -44,  1310,  1,  0,    0,
    28, 0,    0,     1,  0,    0,     28, 0,    0,     1,  -290, 389,   5,  -100, 2548,  12, 300,  0,
    19, -100, -2018, 26, -300, 0,     28, -290, 389,   1,  0,    0,     28, 0,    0,     1,  0,    0,
    28, 0,    0,     1,  10,   -2056, 4,  -200, -889,  9,  -200, 869,   12, 75,   1973,  18, 225,  73,
    20, 225,  -71,   28, 10,   -2056, 1,  0,    0,     28, 0,    0,     1,  -50,  2213,  9,  500,  0,
    12, 300,  -4120, 16, -500, -1446, 19, -550, 0,     22, -500, 1548,  28, -50,  2213,  1,  0,    3064,
    4,  200,  1003,  9,  200,  -1010, 12, -430, -1519, 14, -470, 0,     19, -340, 0,     22, -400, -1155,
    25, -500, 758,   28, 0,    3064,  1,  -550, 0,     4,  -550, 0,     9,  -500, 757,   12, -300, 4048,
    16, 400,  1508,  19, 450,  0,     22, 400,  -1580, 28, -550, 0,     1,  0,    0,     28, 0,    0,
    1,  -150, 0,     7,  -250, -290,  9,  -250, 309,   16, -150, 0,     28, -150, 0,     1,  0,    0,
    28, 0,    0,     1,  50,   -2236, 9,  -500, 0,     12, -300, 4058,  16, 500,  1502,  19, 550,  0,
    22, 500,  -1497, 28, 50,   -2236, 1,  0,    3064,  4,  200,  1003,  9,  200,  -1010, 12, -430, -1519,
    14, -470, 0,     19, -340, 0,     22, -400, -1170, 25, -500, 758,   28, 0,    3064,  1,  550,  0,
    4,  550,  0,     9,  500,  -759,  12, 300,  -3872, 16, -400, -1483, 19, -450, 0,     22, -400, 1450,
    28, 550,  0,     1,  0,    0,     28, 0,    0,     1,  -150, 0,     7,  -250, -310,  9,  -250, 311,
    16, -150, 0,     28, -150, 0,     1,  0,    0,     28, 0,    0,     1,  300,  0,     7,  700,  2979,
    14, 1500, 3935,  19, 1900, 0,     22, 1800, -3010, 28, 300,  0,     1,  -500, 0,     7,  -850, 0,
    19, -700, 0,     28, -500, 0,     1,  1000, 0,     7,  500,  -2288, 14, 100,  -3020, 19, -400, 0,
    22, -300, 2936,  28, 1000, 0,     1,  0,    0,     28, 0,    0,     1,  0,    0,     5,  25,   152,
    11, 25,   -151,  14, 0,    0,     20, 100,  104,   22, 100,  -96,   28, 0,    0,     1,  0,    0,
    28, 0,    0,     1,  0,    0,     28, 0,    0,     1,  0,    0,     10, 0,    0,     13, -300, 0,
    25, -300, 0,     28, 0,    0,     1,  0,    0,     28, 0,    0
};

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

static int lfoot_se_chk_pat[] = { 27 };

static aNPC_se_data_c lfoot_se_dt[] = { { ARRAY_COUNT(lfoot_se_chk_pat), lfoot_se_chk_pat } };

static int rfoot_se_chk_pat[] = { 27 };

static aNPC_se_data_c rfoot_se_dt[] = { { ARRAY_COUNT(rfoot_se_chk_pat), rfoot_se_chk_pat } };

static aNPC_se_data_table_c se_dt_tbl[] = { { lfoot_se_dt, rfoot_se_dt, aNPC_OTHER_SE_TYPE_NONE, NULL } };

aNPC_Animation_c cKF_ba_r_npc_1_banzai1 = {
    { cKF_ckcb_r_npc_1_banzai1_tbl, cKF_ds_npc_1_banzai1_tbl, cKF_kn_npc_1_banzai1_tbl, cKF_c_npc_1_banzai1_tbl, -1,
      28 },
    1.0f,
    28.0f,
    cKF_FRAMECONTROL_REPEAT,
    -5.0f,
    NULL,
    aNPC_EYE_TEX0,
    5,
    npc_1_banzai10_tex_index,
    aNPC_MOUTH_TEX0,
    0,
    15,
    eEC_EFFECT_KYOUSOU_ONPU,
    NULL,
    se_dt_tbl,
};
