#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_run1_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_run1_tbl[] = { 2, 6, 2, 4, 5, 2, 5, 5, 5, 2, 4, 2, 2, 4, 2, 5, 4, 5, 2, 4, 2, 2, 4, 2, 2, 6, 2,
                                2, 6, 2, 4, 6, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 4, 6, 2, 2, 2, 2 };

s16 cKF_c_npc_1_run1_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_run1_tbl[] = {
    1,  0,    0,     17, 0,    0,     1,  1027, -1504, 2,  1000, 0,     6,  1175, 0,     10, 1000, 0,
    14, 1175, 0,     17, 1027, -1504, 1,  0,    0,     17, 0,    0,     1,  -55,  1612,  6,  150,  0,
    14, -150, 0,     17, -55,  1612,  1,  -50,  0,     5,  0,    0,     9,  -50,  0,     13, 0,    0,
    17, -50,  0,     1,  0,    0,     17, 0,    0,     1,  -20,  1291,  2,  0,    0,     10, 0,    0,
    13, -200, 0,     17, -20,  1291,  1,  -143, 8000,  5,  500,  0,     10, -450, -4787, 13, -700, 0,
    17, -143, 8000,  1,  20,   -1258, 2,  0,    0,     10, 0,    0,     13, 200,  0,     17, 20,   -1258,
    1,  0,    0,     17, 0,    0,     1,  0,    0,     4,  0,    0,     9,  1000, 0,     17, 0,    0,
    1,  0,    0,     17, 0,    0,     1,  0,    0,     17, 0,    0,     1,  -65,  981,   7,  150,  0,
    15, -101, 0,     17, -65,  981,   1,  0,    0,     17, 0,    0,     1,  0,    0,     2,  0,    0,
    5,  200,  0,     10, 0,    0,     17, 0,    0,     1,  -265, -6415, 5,  -700, 0,     13, 500,  0,
    17, -265, -6415, 1,  0,    0,     2,  0,    0,     5,  -200, 0,     10, 0,    0,     17, 0,    0,
    1,  0,    0,     17, 0,    0,     1,  1000, 0,     9,  -1,   0,     12, 0,    0,     17, 1000, 0,
    1,  0,    0,     17, 0,    0,     1,  0,    0,     17, 0,    0,     1,  110,  -1153, 7,  -101, 0,
    15, 150,  0,     17, 110,  -1153, 1,  0,    0,     17, 0,    0,     1,  0,    0,     17, 0,    0,
    1,  -53,  3108,  3,  100,  0,     7,  -210, 0,     11, 100,  0,     15, -210, 0,     17, -53,  3108,
    1,  0,    0,     17, 0,    0,     1,  0,    0,     17, 0,    0,     1,  -275, 0,     2,  -205, 4974,
    5,  175,  0,     9,  -275, 0,     13, 175,  0,     17, -275, 0,     1,  0,    0,     17, 0,    0,
    1,  108,  -3118, 6,  -300, 0,     14, 300,  0,     17, 108,  -3118, 1,  50,   -1055, 3,  5,    0,
    7,  100,  0,     11, 6,    0,     15, 100,  0,     17, 50,   -1055, 1,  0,    0,     17, 0,    0,
    1,  0,    0,     17, 0,    0,     1,  -8,   -3260, 5,  -300, 0,     13, 300,  0,     17, -8,   -3260,
    1,  -450, 0,     17, -450, 0,     1,  0,    0,     17, 0,    0,     1,  -458, -2021, 6,  -730, 0,
    14, -330, 0,     17, -458, -2021, 1,  0,    0,     17, 0,    0,     1,  0,    0,     17, 0,    0,
    1,  8,    3447,  5,  300,  0,     13, -300, 0,     17, 8,    3447,  1,  450,  0,     17, 450,  0,
    1,  0,    0,     17, 0,    0,     1,  -603, 2230,  6,  -330, 0,     14, -730, 0,     17, -603, 2230,
    1,  0,    0,     17, 0,    0,     1,  0,    0,     17, 0,    0,     1,  158,  257,   8,  350,  0,
    16, 150,  0,     17, 158,  257,   1,  0,    0,     17, 0,    0,     1,  -58,  1641,  6,  150,  0,
    14, -150, 0,     17, -58,  1641,  1,  68,   851,   3,  100,  0,     7,  30,   0,     11, 100,  0,
    15, 30,   0,     17, 68,   851,   1,  0,    0,     17, 0,    0,     1,  0,    0,     17, 0,    0,
    1,  0,    0,     17, 0,    0,     1,  0,    0,     17, 0,    0
};

static int lfoot_se_chk_pat[] = { 1 };

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

static int rfoot_se_chk_pat[] = { 9 };

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_run1 = {
    { cKF_ckcb_r_npc_1_run1_tbl, cKF_ds_npc_1_run1_tbl, cKF_kn_npc_1_run1_tbl, cKF_c_npc_1_run1_tbl, -1, 17 },
    1.0f,
    17.0f,
    cKF_FRAMECONTROL_REPEAT,
    -5.0f,
    NULL,
    aNPC_EYE_TEX1,
    -1,
    NULL,
    aNPC_MOUTH_TEX0,
    0,
    -1,
    -1,
    NULL,
    se_dt_tbl,
};
