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

s16 cKF_c_npc_1_aisatu4_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_aisatu4_tbl[] = {
    1,  0,    0,     31, 0,    0,    1,  1000, 0,     31, 1000, 0,    1,  0,    0,    12, -50,  -65,   20, -50,  66,
    31, 0,    0,     1,  0,    0,    31, 0,    0,     1,  0,    0,    12, -80,  -115, 20, -80,  116,   31, 0,    0,
    1,  0,    0,     16, -50,  0,    31, 0,    0,     1,  -175, 0,    9,  20,   657,  16, 75,   0,     31, -175, 0,
    1,  -100, 0,     9,  -375, -882, 16, -450, 0,     31, -100, 0,    1,  25,   0,    9,  65,   117,   16, 75,   0,
    31, 25,   0,     1,  0,    0,    31, 0,    0,     1,  200,  0,    9,  670,  1524, 16, 800,  0,     31, 200,  0,
    1,  0,    0,     31, 0,    0,    1,  0,    0,     31, 0,    0,    1,  -100, 0,    9,  -220, -344,  16, -250, 0,
    31, -100, 0,     1,  0,    0,    31, 0,    0,     1,  175,  0,    31, 175,  0,    1,  -100, 0,     12, -140, -91,
    20, -140, 57,    31, -100, 0,    1,  -25,  0,     16, 50,   0,    31, -25,  0,    1,  0,    0,     31, 0,    0,
    1,  200,  0,     12, 60,   -207, 20, 60,   207,   31, 200,  0,    1,  0,    0,    31, 0,    0,     1,  0,    0,
    31, 0,    0,     1,  -100, 0,    12, 0,    148,   20, 0,    -148, 31, -100, 0,    1,  0,    0,     31, 0,    0,
    1,  0,    0,     31, 0,    0,    1,  60,   0,     9,  -200, 0,    17, -50,  0,    24, -100, 0,     31, 60,   0,
    1,  0,    0,     31, 0,    0,    1,  0,    0,     31, 0,    0,    1,  82,   0,    6,  120,  -268,  13, -300, 0,
    20, 100,  0,     26, -50,  0,    31, 82,   0,     1,  0,    0,    31, 0,    0,    1,  0,    0,     16, 30,   0,
    31, 0,    0,     1,  2,    0,    12, -100, -322,  20, -100, 318,  31, 2,    0,    1,  0,    0,     16, 100,  0,
    31, 0,    0,     1,  0,    0,    10, -450, -1512, 13, -550, 502,  16, -450, 0,    19, -550, -498,  22, -450, 1525,
    31, 0,    0,     1,  58,   0,    10, -650, 0,     22, -650, 0,    31, 58,   0,    1,  -564, 0,     10, -400, 0,
    13, -500, 0,     16, -400, 0,    19, -500, 0,     22, -400, 0,    31, -564, 0,    1,  0,    0,     31, 0,    0,
    1,  -57,  0,     11, -900, 0,    21, -900, 0,     31, -57,  0,    1,  0,    0,    31, 0,    0,     1,  0,    0,
    11, -300, -1064, 21, -300, 1056, 31, 0,    0,     1,  58,   0,    11, 100,  0,    15, 50,   -382,  17, 50,   374,
    21, 100,  0,     31, 58,   0,    1,  564,  0,     11, 350,  -383, 21, 350,  379,  31, 564,  0,     1,  0,    0,
    13, -150, 0,     18, -150, 0,    25, -40,  618,   31, 0,    0,    1,  -57,  0,    13, -500, 0,     18, -500, 0,
    25, -200, 1468,  31, -57,  0,    1,  0,    0,     13, 800,  0,    18, 800,  0,    25, 300,  -2497, 31, 0,    0,
    1,  0,    0,     31, 0,    0,    1,  0,    0,     31, 0,    0,    1,  0,    0,    31, 0,    0,     1,  0,    0,
    16, -50,  0,     31, 0,    0,    1,  0,    0,     7,  130,  601,  15, 200,  0,    17, 200,  0,     31, 0,    0,
    1,  0,    0,     16, -160, 0,    31, 0,    0,     1,  0,    0,    31, 0,    0,    1,  0,    0,     10, 0,    0,
    13, -200, 0,     15, -200, 0,    17, -180, 618,   20, 0,    0,    31, 0,    0,    1,  0,    0,     31, 0,    0
};

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

u8 npc_1_aisatu41_tex_index[] = { 0, 1, 2, 2, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
                                  5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 2, 2, 1, 0 };

static int lfoot_se_chk_pat[] = { 30 };

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

static int rfoot_se_chk_pat[] = { 30 };

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_aisatu4 = {
    { cKF_ckcb_r_npc_1_aisatu4_tbl, cKF_ds_npc_1_aisatu4_tbl, cKF_kn_npc_1_aisatu4_tbl, cKF_c_npc_1_aisatu4_tbl, -1,
      31 },
    1.0f,
    31.0f,
    cKF_FRAMECONTROL_STOP,
    -5.0f,
    npc_1_aisatu41_tex_index,
    aNPC_EYE_TEX0,
    -1,
    npc_1_aisatu40_tex_index,
    aNPC_MOUTH_TEX0,
    -1,
    -1,
    -1,
    NULL,
    se_dt_tbl,
};
