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

s16 cKF_c_npc_1_go_ug1_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_go_ug1_tbl[] = {
    1,  0,    0,     16, 0,    0,      1,  0,     0,      3,  0,     0,      5,  -150,  0,     7,  200,   4478,
    9,  350,  0,     11, 100,  -7506,  13, -1250, -30331, 15, -3250, -29945, 16, -4000, 0,     1,  0,     0,
    12, 0,    0,     13, -200, -12170, 14, -1000, -26282, 16, -2000, 0,      1,  0,     0,     16, 0,     0,
    1,  50,   0,     4,  0,    0,      7,  75,    716,    10, 100,   0,      16, -325,  -4343, 1,  0,     0,
    4,  25,   0,     7,  0,    0,      16, 0,     0,      1,  0,     0,      16, 0,     0,     1,  0,     0,
    16, 0,    0,     1,  0,    0,      16, 0,     0,      1,  0,     0,      16, 0,     0,     1,  0,     0,
    16, 0,    0,     1,  0,    0,      16, 0,     0,      1,  0,     0,      16, 0,     0,     1,  0,     0,
    16, 0,    0,     1,  0,    0,      16, 0,     0,      1,  0,     0,      16, 0,     0,     1,  0,     0,
    16, 0,    0,     1,  0,    0,      16, 0,     0,      1,  0,     0,      16, 0,     0,     1,  0,     0,
    16, 0,    0,     1,  0,    0,      16, 0,     0,      1,  0,     0,      16, 0,     0,     1,  0,     0,
    16, 0,    0,     1,  0,    0,      16, 0,     0,      1,  0,     0,      16, 0,     0,     1,  0,     0,
    16, 0,    0,     1,  0,    0,      16, 0,     0,      1,  0,     0,      16, 0,     0,     1,  0,     0,
    16, 0,    0,     1,  0,    0,      16, 0,     0,      1,  0,     0,      4,  -12,   -2142, 6,  -100,  0,
    11, 75,   0,     15, 0,    0,      16, 0,     0,      1,  -50,   0,      3,  -175,  0,     4,  -149,  3047,
    11, 200,  0,     12, 150,  -3053,  16, -450,  -3727,  1,  0,     0,      4,  -13,   -2126, 6,  -100,  0,
    11, 75,   0,     15, 0,    0,      16, 0,     0,      1,  0,     0,      3,  -155,  0,     9,  0,     0,
    16, 0,    0,     1,  93,   0,      3,  50,    0,      5,  300,   0,      9,  100,   -2035, 13, 0,     0,
    16, 0,    0,     1,  -283, 0,      3,  -400,  0,      5,  0,     0,      9,  -600,  -2247, 11, -600,  2908,
    12, -300, 18178, 13, 650,  0,      16, 650,   0,      1,  0,     0,      16, 0,     0,     1,  -115,  331,
    3,  -300, 0,     9,  0,    0,      12, -100,  0,      16, -100,  0,      1,  0,     0,     16, 0,     0,
    1,  400,  0,     4,  -80,  0,      8,  350,   2641,   11, 325,   -2826,  14, 0,     0,     16, 0,     0,
    1,  -548, 0,     4,  -525, 639,    8,  -325,  1118,   11, -325,  -2652,  14, -1200, 0,     16, -1200, 0,
    1,  98,   0,     4,  100,  0,      8,  -350,  -1131,  11, -350,  1120,   14, 0,     0,     16, 0,     0,
    1,  0,    0,     16, 0,    0,      1,  -793,  0,      4,  -225,  0,      8,  0,     0,     11, 0,     0,
    16, -750, -3762, 1,  0,    0,      16, 0,     0,      1,  -545,  0,      2,  -350,  8777,  4,  -225,  -3863,
    6,  -5,   4095,  11, 245,  0,      12, 230,   -1281,  13, 70,    -8542,  14, -630,  0,     16, -630,  0,
    1,  293,  0,     4,  25,   -2812,  9,  -150,  0,      11, -80,   3309,   12, 100,   9030,  13, 535,   11066,
    14, 700,  0,     16, 700,  0,      1,  -500,  0,      3,  0,     16281,  4,  425,   0,     7,  400,   -1031,
    11, 85,   0,     12, 35,   -3329,  13, -385,  -20122, 14, -950,  0,      16, -950,  0,     1,  -10,   0,
    7,  -150, 0,     12, 100,  0,      16, 0,     0,      1,  -51,   0,      4,  -100,  0,     5,  -25,   3043,
    12, 300,  0,     13, 50,   -10689, 16, -720,  -3531,  1,  0,     0,      4,  12,    -2436, 7,  -150,  0,
    12, 100,  0,     16, 0,    0,      1,  0,     0,      16, 0,     0,      1,  0,     0,     3,  100,   0,
    6,  -100, -1531, 9,  -100, 1530,   13, 200,   0,      16, 0,     0,      1,  0,     0,     16, 0,     0
};

static int other_se_chk_pat[] = { 14 };

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

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_go_ug1 = {
    { cKF_ckcb_r_npc_1_go_ug1_tbl, cKF_ds_npc_1_go_ug1_tbl, cKF_kn_npc_1_go_ug1_tbl, cKF_c_npc_1_go_ug1_tbl, -1, 16 },
    1.0f,
    16.0f,
    cKF_FRAMECONTROL_STOP,
    -3.0f,
    NULL,
    aNPC_EYE_TEX0,
    0,
    NULL,
    aNPC_MOUTH_TEX0,
    0,
    -1,
    -1,
    NULL,
    se_dt_tbl,
};
