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

s16 cKF_c_npc_1_tunahiki_aiko1_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_tunahiki_aiko1_tbl[] = {
    1,  0,    0, 33, 0,     0,    1,  500,   0,     17, 550,   0,    33, 500,  0,   1,  0,     0,   17, -100, 0,
    33, 0,    0, 1,  450,   0,    17, 300,   0,     33, 450,   0,    1,  -100, 0,   17, -50,   0,   33, -100, 0,
    1,  0,    0, 33, 0,     0,    1,  -700,  0,     17, -900,  0,    33, -700, 0,   1,  -650,  0,   17, -335, 0,
    33, -650, 0, 1,  700,   0,    17, 725,   0,     33, 700,   0,    1,  0,    0,   33, 0,     0,   1,  1200, 0,
    17, 1175, 0, 33, 1200,  0,    1,  0,     0,     33, 0,     0,    1,  0,    0,   33, 0,     0,   1,  -413, 0,
    17, -421, 0, 33, -413,  0,    1,  -145,  0,     17, 75,    0,    33, -145, 0,   1,  675,   0,   5,  709,  192,
    9,  720,  0, 17, 575,   0,    33, 675,   0,     1,  -600,  0,    5,  -600, -75, 9,  -610,  -75, 17, -665, 0,
    33, -600, 0, 1,  -1100, 0,    5,  -1088, 374,   9,  -1010, 775,  17, -825, 0,   33, -1100, 0,   1,  0,    0,
    33, 0,    0, 1,  850,   0,    5,  801,   -763,  9,  678,   -968, 17, 550,  0,   33, 850,   0,   1,  0,    0,
    33, 0,    0, 1,  0,     0,    33, 0,     0,     1,  45,    0,    7,  125,  753, 9,  175,   0,   17, 100,  0,
    33, 45,   0, 1,  375,   0,    7,  300,   -394,  17, 260,   0,    33, 375,  0,   1,  0,     0,   33, 0,    0,
    1,  60,   0, 9,  -300,  0,    17, -300,  0,     33, 60,    0,    1,  0,    0,   33, 0,     0,   1,  0,    0,
    33, 0,    0, 1,  0,     0,    33, 0,     0,     1,  0,     0,    33, 0,    0,   1,  300,   0,   2,  303,  0,
    3,  315,  0, 4,  323,   0,    5,  353,   0,     6,  363,   0,    7,  403,  0,   8,  413,   0,   9,  460,  0,
    10, 465,  0, 11, 518,   0,    12, 518,   0,     13, 565,   0,    14, 560,  0,   15, 600,   0,   16, 585,  0,
    17, 610,  0, 18, 588,   0,    19, 595,   0,     20, 565,   0,    21, 558,  0,   22, 525,   0,   23, 508,  0,
    24, 475,  0, 25, 450,   0,    26, 423,   -826,  33, 300,   0,    1,  -150, 0,   2,  -151,  0,   3,  -143, 0,
    4,  -146, 0, 5,  -129,  0,    6,  -134,  0,     7,  -111,  0,    8,  -119, 0,   9,  -90,   0,   10, -101, 0,
    11, -69,  0, 12, -83,   0,    13, -53,   0,     14, -69,   0,    15, -42,  0,   16, -61,   0,   17, -40,  0,
    18, -61,  0, 19, -47,   0,    20, -67,   0,     21, -61,   0,    22, -78,  0,   23, -79,   0,   24, -93,  0,
    25, -100, 0, 26, -109,  -273, 33, -150,  0,     1,  0,     0,    33, 0,    0,   1,  450,   0,   17, 500,  0,
    33, 450,  0, 1,  -300,  0,    33, -300,  0,     1,  -600,  0,    17, -650, 0,   33, -600,  0,   1,  0,    0,
    33, 0,    0, 1,  -700,  0,    17, -600,  0,     33, -700,  0,    1,  0,    0,   33, 0,     0,   1,  500,  0,
    17, 450,  0, 33, 500,   0,    1,  -450,  0,     17, -350,  0,    33, -450, 0,   1,  250,   0,   17, 300,  0,
    33, 250,  0, 1,  0,     0,    33, 0,     0,     1,  -300,  0,    17, 0,    0,   33, -300,  0,   1,  0,    0,
    33, 0,    0, 1,  0,     0,    33, 0,     0,     1,  0,     0,    33, 0,    0,   1,  0,     0,   33, 0,    0,
    1,  -550, 0, 6,  -475,  -196, 9,  -575,  -1866, 12, -675,  -195, 17, -600, 0,   33, -550,  0,   1,  50,   0,
    33, 50,   0, 1,  -50,   0,    33, -50,   0,     1,  0,     0,    33, 0,    0,   1,  0,     0,   33, 0,    0,
    1,  0,    0, 33, 0,     0
};

aNPC_Animation_c cKF_ba_r_npc_1_tunahiki_aiko1 = {
    { cKF_ckcb_r_npc_1_tunahiki_aiko1_tbl, cKF_ds_npc_1_tunahiki_aiko1_tbl, cKF_kn_npc_1_tunahiki_aiko1_tbl,
      cKF_c_npc_1_tunahiki_aiko1_tbl, -1, 33 },
    1.0f,
    33.0f,
    cKF_FRAMECONTROL_REPEAT,
    -5.0f,
    NULL,
    aNPC_EYE_TEX0,
    3,
    NULL,
    aNPC_MOUTH_TEX0,
    3,
    -1,
    -1,
    NULL,
    NULL,
};
