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

s16 cKF_c_npc_1_saisen1_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_saisen1_tbl[] = {
    1,  0,     0,    43, 0,     0,     1,  1000, 0,    43, 1000, 0,    1,  0,    0,     20, 0,     0,
    29, 150,   0,    33, 150,   0,     43, 0,    0,    1,  0,    0,    9,  -50,  0,     15, -50,   0,
    25, 0,     408,  33, 100,   0,     43, 0,    0,    1,  0,    0,    9,  100,  0,     12, 0,     0,
    15, 100,   0,    25, 0,     -302,  33, -75,  0,    43, 0,    0,    1,  0,    0,     25, 0,     0,
    33, -20,   0,    43, 0,     0,     1,  -175, 0,    9,  -223, 0,    12, -225, 0,     15, -223,  0,
    20, -213,  120,  27, -138,  531,   33, -73,  0,    43, -175, 0,    1,  -100, 0,     9,  35,    0,
    12, -80,   0,    15, 35,    0,     20, -10,  -454, 25, -35,  0,    27, -35,  0,     33, -108,  0,
    43, -100,  0,    1,  25,    0,     9,  15,   0,    12, 31,   0,    15, 15,   0,     20, 23,    0,
    27, 23,    0,    31, 28,    0,     33, 28,   0,    43, 25,   0,    1,  0,    0,     43, 0,     0,
    1,  200,   0,    9,  158,   0,     12, 195,  0,    15, 158,  0,    20, 170,  123,   25, 190,   0,
    29, 165,   0,    33, 195,   0,     43, 200,  0,    1,  0,    0,    43, 0,    0,     1,  0,     0,
    43, 0,     0,    1,  -100,  0,     9,  -93,  0,    12, -113, 0,    15, -93,  0,     20, -98,   -75,
    25, -150,  -292, 27, -160,  0,     29, -160, 0,    33, -165, 0,    43, -100, 0,     1,  0,     0,
    20, 0,     0,    25, -18,   -54,   29, -20,  0,    33, -18,  38,   43, 0,    0,     1,  175,   0,
    9,  120,   0,    12, 125,   0,     15, 120,  0,    20, 135,  215,  31, 260,  295,   33, 270,   0,
    38, 218,   -430, 43, 175,   0,     1,  -100, 0,    9,  -25,  0,    12, -125, 0,     15, -25,   0,
    20, -250,  0,    31, -175,  0,     33, -178, 0,    38, -145, 441,  43, -100, 0,     1,  -25,   0,
    9,  -25,   0,    12, -18,   0,     15, -25,  0,    20, -65,  -69,  33, -76,  0,     38, -43,   213,
    43, -25,   0,    1,  0,     0,     43, 0,    0,    1,  200,  0,    9,  215,  0,     15, 215,   0,
    25, 200,   -141, 31, 153,   -86,   33, 150,  0,    38, 0,    0,    43, 200,  0,     1,  0,     0,
    43, 0,     0,    1,  0,     0,     43, 0,    0,    1,  -100, 0,    9,  -95,  0,     12, -90,   0,
    15, -95,   0,    17, -105,  -140,  20, -100, 177,  31, -23,  0,    33, -23,  0,     38, 123,   0,
    43, -100,  0,    1,  0,     0,     15, 0,    0,    17, -25,  0,    20, 0,    182,   31, 28,    0,
    33, 33,    0,    38, 5,     -75,   43, 0,    0,    1,  0,    0,    43, 0,    0,     1,  60,    0,
    9,  50,    0,    12, 100,   0,     15, 50,   0,    18, 125,  935,  22, 175,  0,     26, 125,   -956,
    33, -100,  0,    38, -50,   768,   43, 60,   0,    1,  0,    0,    5,  -25,  0,     10, 25,    0,
    16, -25,   0,    20, 100,   1098,  24, 165,  0,    31, 50,   -746, 37, -50,  0,     43, 0,     0,
    1,  0,     0,    43, 0,     0,     1,  82,   0,    11, 100,  0,    14, -100, 0,     17, 100,   1593,
    22, 200,   0,    28, 100,   -1048, 35, -150, 0,    40, -50,  1402, 43, 82,   0,     1,  0,     0,
    7,  -25,   0,    12, 50,    0,     18, -50,  0,    22, 100,  1098, 26, 165,  0,     33, 50,    -746,
    39, -50,   0,    43, 0,     0,     1,  0,    0,    9,  -200, 0,    12, -150, 0,     15, -200,  0,
    21, -100,  653,  30, 100,   668,   34, 150,  0,    43, 0,    0,    1,  2,    0,     9,  -150,  0,
    12, 0,     0,    15, -150,  0,     21, 0,    0,    26, -110, -683, 30, -150, 0,     34, -100,  743,
    43, 2,     0,    1,  0,     0,     9,  75,   0,    12, 50,   0,    15, 75,   0,     21, 75,    0,
    26, 63,    -241, 34, -50,   0,     43, 0,    0,    1,  0,    0,    12, 950,  0,     15, 950,   0,
    26, 0,     0,    32, 30,    0,     43, 0,    0,    1,  58,   0,    12, -550, 0,     15, -550,  0,
    26, 50,    982,  34, 130,   -154,  43, 58,   0,    1,  -565, 0,    12, -700, 0,     15, -700,  0,
    26, -565,  617,  34, -469,  0,     43, -565, 0,    1,  0,    0,    43, 0,    0,     1,  -57,   0,
    12, -750,  0,    15, -750,  0,     26, -500, 1478, 34, -200, 1013, 43, -57,  0,     1,  0,     0,
    43, 0,     0,    1,  0,     0,     9,  -450, 0,    12, -250, 0,    15, -450, 0,     26, 150,   3426,
    34, 500,   -160, 38, 350,   -2275, 43, 0,    0,    1,  58,   0,    9,  250,  0,     12, 350,   0,
    15, 250,   0,    20, -50,   0,     26, 100,  0,    34, -350, 0,    38, -250, 1533,  43, 58,    0,
    1,  565,   0,    9,  400,   0,     12, 575,  0,    15, 400,  0,    26, 550,  0,     30, 500,   -1012,
    34, 350,   -382, 43, 565,   0,     1,  0,    0,    43, 0,    0,    1,  -500, 0,     9,  -1050, 0,
    12, -1000, 0,    15, -1050, 0,     26, -100, 1485, 30, 0,    0,    34, -350, -2008, 43, -500,  0,
    1,  0,     0,    43, 0,     0,     1,  630,  0,    43, 630,  0,    1,  -495, 0,     43, -495,  0,
    1,  348,   0,    43, 348,   0,     1,  0,    0,    9,  -50,  0,    12, -125, 0,     15, -50,   0,
    21, 50,    0,    30, -200,  -764,  34, -238, 200,  38, -113, 1374, 43, 0,    0,     1,  0,     0,
    9,  -200,  0,    15, -200,  0,     26, 0,    1482, 30, 100,  199,  36, 75,   -379,  43, 0,     0,
    1,  0,     0,    9,  0,     0,     12, 50,   0,    15, 0,    0,    21, -75,  -363,  30, -75,   356,
    43, 0,     0,    1,  0,     0,     43, 0,    0,    1,  0,    0,    43, 0,    0,     1,  0,     0,
    43, 0,     0
};

static int other_se_chk_pat[] = { 9 };

static aNPC_other_se_data_c other_se_dt[] = { { { ARRAY_COUNT(other_se_chk_pat), other_se_chk_pat }, 1125 } };

static aNPC_se_data_table_c se_dt_tbl[] = { { NULL, NULL, aNPC_OTHER_SE_TYPE1, other_se_dt } };

aNPC_Animation_c cKF_ba_r_npc_1_saisen1 = {
    { cKF_ckcb_r_npc_1_saisen1_tbl, cKF_ds_npc_1_saisen1_tbl, cKF_kn_npc_1_saisen1_tbl, cKF_c_npc_1_saisen1_tbl, -1,
      43 },
    1.0f,
    43.0f,
    cKF_FRAMECONTROL_STOP,
    -5.0f,
    NULL,
    aNPC_EYE_TEX0,
    0,
    NULL,
    aNPC_MOUTH_TEX0,
    0,
    -1,
    -1,
    NULL,
    se_dt_tbl,
};
