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

s16 cKF_c_npc_1_aisatu1_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_aisatu1_tbl[] = {
    1,  0,    0,    16, 0,    0,   31, 0,    0,     1,  1000, 0,     8,  950,  0,    14, 1000, 0,     17, 1000, 0,
    31, 1000, 0,    1,  0,    0,   8,  125,  0,     14, -25,  0,     17, -25,  0,    31, 0,    0,     1,  0,    0,
    16, 0,    0,    31, 0,    0,   1,  0,    0,     8,  -80,  -299,  14, -110, 0,    17, -110, 0,     31, 0,    0,
    1,  0,    0,    31, 0,    0,   1,  -175, 0,     16, -175, 0,     31, -175, 0,    1,  -100, 0,     8,  -200, 0,
    14, -190, 0,    17, -190, 0,   31, -100, 0,     1,  25,   0,     8,  50,   0,    14, 10,   0,     17, 10,   0,
    31, 25,   0,    1,  0,    0,   31, 0,    0,     1,  200,  0,     8,  450,  0,    14, 100,  0,     16, 100,  0,
    31, 200,  0,    1,  0,    0,   31, 0,    0,     1,  0,    0,     31, 0,    0,    1,  -100, 0,     8,  -310, 0,
    14, -20,  0,    16, -20,  0,   31, -100, 0,     1,  0,    0,     8,  0,    0,    13, 40,   0,     16, 40,   0,
    31, 0,    0,    1,  175,  0,   16, 175,  0,     31, 175,  0,     1,  -100, 0,    8,  -200, 0,     14, -190, 0,
    17, -190, 0,    31, -100, 0,   1,  -25,  0,     8,  -50,  0,     14, -10,  0,    17, -10,  0,     31, -25,  0,
    1,  0,    0,    31, 0,    0,   1,  200,  0,     8,  450,  0,     14, 100,  0,    16, 100,  0,     31, 200,  0,
    1,  0,    0,    31, 0,    0,   1,  0,    0,     31, 0,    0,     1,  -100, 0,    8,  -310, 0,     14, -20,  0,
    16, -20,  0,    31, -100, 0,   1,  0,    0,     8,  0,    0,     14, -40,  0,    16, -40,  0,     31, 0,    0,
    1,  0,    0,    31, 0,    0,   1,  60,   0,     10, -250, 0,     15, -100, 0,    19, -180, -292,  25, -100, 1013,
    31, 60,   0,    1,  0,    0,   7,  100,  -399,  12, -60,  -401,  17, 50,   0,    21, 0,    0,     31, 0,    0,
    1,  0,    0,    31, 0,    0,   1,  82,   0,     6,  120,  -197,  12, -100, 0,    17, 120,  0,     22, -60,  0,
    31, 82,   0,    1,  0,    0,   3,  -40,  0,     9,  100,  0,     14, -80,  0,    19, 80,   0,     24, -40,  0,
    27, 0,    253,  31, 0,    0,   1,  0,    0,     8,  -10,  -147,  16, -80,  0,    31, 0,    0,     1,  2,    -78,
    8,  120,  0,    14, 100,  -77, 18, 100,  -77,   31, 2,    -78,   1,  0,    0,    8,  10,   0,     16, -30,  0,
    31, 0,    0,    1,  0,    0,   10, -700, -1221, 16, -800, 0,     22, -700, 1222, 31, 0,    0,     1,  58,   0,
    10, -550, 0,    16, -550, 0,   22, -450, 1104,  31, 58,   0,     1,  -564, 0,    12, 100,  0,     16, 100,  0,
    20, 50,   -740, 31, -564, 0,   1,  0,    0,     31, 0,    0,     1,  -57,  0,    6,  -690, -3206, 10, -900, 0,
    13, -800, 2551, 17, -400, 0,   20, -550, -1304, 23, -600, 0,     26, -500, 2018, 31, -57,  0,     1,  0,    0,
    16, 0,    0,    31, 0,    0,   1,  0,    0,     17, 120,  0,     31, 0,    0,    1,  58,   0,     6,  0,    -258,
    12, 50,   758,  17, 150,  0,   31, 58,   0,     1,  564,  0,     17, 650,  0,    31, 564,  0,     1,  0,    0,
    17, 0,    0,    31, 0,    0,   1,  -57,  0,     7,  -350, -1128, 12, -390, 505,  17, -250, 0,     31, -57,  0,
    1,  0,    0,    17, 0,    0,   31, 0,    0,     1,  0,    0,     31, 0,    0,    1,  0,    0,     31, 0,    0,
    1,  0,    0,    31, 0,    0,   1,  0,    0,     8,  10,   149,   16, 80,   0,    31, 0,    0,     1,  0,    0,
    10, 80,   0,    15, 50,   0,   19, 60,   0,     31, 0,    0,     1,  0,    0,    8,  -10,  0,     16, 30,   0,
    31, 0,    0,    1,  0,    0,   17, 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,    17, 0,    0,     31, 0,    0
};

u8 npc_1_aisatu10_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_aisatu11_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 };

aNPC_Animation_c cKF_ba_r_npc_1_aisatu1 = {
    { cKF_ckcb_r_npc_1_aisatu1_tbl, cKF_ds_npc_1_aisatu1_tbl, cKF_kn_npc_1_aisatu1_tbl, cKF_c_npc_1_aisatu1_tbl, -1,
      31 },
    1.0f,
    31.0f,
    cKF_FRAMECONTROL_STOP,
    -5.0f,
    npc_1_aisatu11_tex_index,
    aNPC_EYE_TEX0,
    -1,
    npc_1_aisatu10_tex_index,
    aNPC_MOUTH_TEX0,
    -1,
    -1,
    -1,
    NULL,
    NULL,
};
