#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_landing2_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_landing2_tbl[] = { 2, 2, 2, 3, 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, 3, 5, 5, 2, 5, 9, 2, 2, 6, 2, 5, 9, 2, 2, 6, 2, 2, 2, 2, 5, 2, 2, 2, 2 };

s16 cKF_c_npc_1_landing2_tbl[] = { 3600, 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_landing2_tbl[] = {
    1,  0,    0,    17, 0,    0,     1,  1000, 0,    17, 1000, 0,     1,  0,    0,      17, 0,    0,
    1,  60,   0,    9,  -60,  0,     17, 60,   0,    1,  360,  0,     5,  440,  0,      9,  360,  0,
    13, 440,  0,    17, 360,  0,     1,  0,    764,  5,  80,   0,     13, -80,  0,      17, 0,    764,
    1,  -100, 0,    17, -100, 0,     1,  -300, 0,    17, -300, 0,     1,  180,  0,      17, 179,  0,
    1,  0,    0,    17, 0,    0,     1,  150,  0,    17, 150,  0,     1,  0,    0,      17, 0,    0,
    1,  0,    0,    17, 0,    0,     1,  50,   0,    17, 50,   0,     1,  0,    0,      17, 0,    0,
    1,  100,  0,    17, 100,  0,     1,  -300, 0,    17, -300, 0,     1,  -170, 0,      17, -170, 0,
    1,  0,    0,    17, 0,    0,     1,  150,  0,    17, 150,  0,     1,  0,    0,      17, 0,    0,
    1,  0,    0,    17, 0,    0,     1,  50,   0,    17, 50,   0,     1,  0,    0,      17, 0,    0,
    1,  0,    0,    17, 0,    0,     1,  60,   0,    17, 60,   0,     1,  0,    0,      17, 0,    0,
    1,  0,    0,    17, 0,    0,     1,  80,   0,    17, 80,   0,     1,  0,    0,      17, 0,    0,
    1,  -60,  0,    9,  50,   0,     17, -60,  0,    1,  -400, 0,     5,  -530, 0,      9,  -400, 0,
    13, -530, 0,    17, -400, 0,     1,  0,    -612, 5,  -90,  0,     9,  -10,  665,    13, 70,   0,
    17, 0,    -612, 1,  -100, 0,     17, -100, 0,    1,  100,  0,     5,  -100, 0,      9,  100,  0,
    13, -100, 0,    17, 100,  0,     1,  300,  0,    3,  -50,  -7497, 5,  -600, 0,      7,  -300, 6843,
    9,  300,  0,    11, -50,  -7497, 13, -600, 0,    15, -300, 6843,  17, 300,  0,      1,  0,    0,
    17, 0,    0,    1,  -58,  0,     17, -58,  0,    1,  150,  9981,  2,  600,  0,      7,  -300, 0,
    10, 600,  0,    15, -300, 0,     17, 150,  9981, 1,  100,  0,     17, 100,  0,      1,  100,  0,
    5,  -100, 0,    9,  100,  0,     13, -100, 0,    17, 100,  0,     1,  -300, 0,      3,  50,   6314,
    5,  600,  0,    7,  300,  -7363, 9,  -300, 0,    11, 50,   6314,  13, 600,  0,      15, 300,  -7363,
    17, -300, 0,    1,  0,    0,     17, 0,    0,    1,  -58,  0,     17, -58,  0,      1,  -150, -10301,
    2,  -600, 0,    7,  300,  0,     10, -600, 0,    15, 300,  0,     17, -150, -10301, 1,  0,    0,
    17, 0,    0,    1,  0,    0,     17, 0,    0,    1,  0,    0,     17, 0,    0,      1,  0,    0,
    17, 0,    0,    1,  -150, 0,     5,  -200, 0,    9,  -150, 0,     13, -200, 0,      17, -150, 0,
    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 other_se_chk_pat[] = { 1, 9 };

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

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_landing2 = {
    { cKF_ckcb_r_npc_1_landing2_tbl, cKF_ds_npc_1_landing2_tbl, cKF_kn_npc_1_landing2_tbl, cKF_c_npc_1_landing2_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,
};
