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

s16 cKF_c_npc_1_hirameki1_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_hirameki1_tbl[] = {
    1,  0,    0,     19, 0,    0,     1,  1000, 0,    10, 1025, 0,     19, 1025, 0,     1,  0,    0,     19, 0,    0,
    1,  0,    0,     19, 0,    0,     1,  0,    0,    3,  -20,  0,     9,  30,   0,     19, 30,   0,     1,  0,    0,
    19, 0,    0,     1,  -175, 0,     19, -175, 0,    1,  -100, 0,     3,  -100, 0,     7,  -20,  1344,  11, 30,   0,
    19, 30,   0,     1,  25,   0,     11, 5,    0,    19, 5,    0,     1,  0,    0,     19, 0,    0,     1,  200,  0,
    11, 0,    0,     19, 0,    0,     1,  0,    0,    19, 0,    0,     1,  0,    0,     19, 0,    0,     1,  -100, 0,
    11, 0,    0,     19, 0,    0,     1,  0,    0,    19, 0,    0,     1,  175,  0,     19, 175,  0,     1,  -100, 0,
    3,  -100, 0,     7,  -20,  1344,  11, 30,   0,    19, 30,   0,     1,  -25,  0,     11, -5,   0,     19, -5,   0,
    1,  0,    0,     19, 0,    0,     1,  200,  0,    11, 0,    0,     19, 0,    0,     1,  0,    0,     19, 0,    0,
    1,  0,    0,     19, 0,    0,     1,  -100, 0,    11, 0,    0,     19, 0,    0,     1,  0,    0,     19, 0,    0,
    1,  0,    0,     19, 0,    0,     1,  60,   0,    5,  25,   -520,  11, -250, -506,  13, -268, 0,     16, -200, 1416,
    19, -200, 0,     1,  0,    0,     19, 0,    0,    1,  0,    0,     19, 0,    0,     1,  82,   0,     7,  200,  0,
    13, -150, 0,     17, 150,  0,     19, 0,    -942, 1,  0,    0,     19, 0,    0,     1,  0,    0,     19, 0,    0,
    1,  2,    -78,   5,  -30,  0,     10, 70,   0,    14, -50,  0,     19, 30,   227,   1,  0,    0,     19, 0,    0,
    1,  0,    0,     11, -170, 0,     13, -50,  5250, 15, 450,  0,     17, 200,  -3037, 19, 100,  0,     1,  58,   0,
    11, -500, 0,     13, -590, 0,     15, -550, 0,    17, -650, -2247, 19, -700, 0,     1,  -564, 240,   11, -300, 0,
    13, -450, -5203, 15, -900, 0,     17, -750, 1852, 19, -700, 0,     1,  0,    0,     19, 0,    0,     1,  -57,  468,
    11, -550, -1599, 15, -750, 0,     19, -550, 0,    1,  0,    0,     19, 0,    0,     1,  0,    0,     11, 170,  0,
    13, 60,   -5458, 15, -450, 0,     17, -190, 2927, 19, -100, 0,     1,  58,   0,     11, -500, 0,     13, -590, 0,
    15, -550, 0,     17, -650, -2234, 19, -700, 0,    1,  564,  -272,  11, 300,  0,     13, 450,  5333,  15, 900,  0,
    17, 750,  -1848, 19, 700,  0,     1,  0,    0,    19, 0,    0,     1,  -57,  468,   11, -550, -1602, 15, -750, 0,
    19, -550, 0,     1,  0,    0,     19, 0,    0,    1,  0,    0,     19, 0,    0,     1,  0,    0,     19, 0,    0,
    1,  0,    0,     19, 0,    0,     1,  0,    0,    19, 0,    0,     1,  0,    0,     5,  30,   0,     9,  -50,  0,
    14, 50,   0,     16, 30,   0,     19, 50,   -119, 1,  0,    0,     19, 0,    0,     1,  0,    0,     15, 0,    0,
    19, 0,    0,     1,  0,    0,     11, 0,    0,    15, -150, 0,     19, -150, 0,     1,  0,    0,     15, 0,    0,
    19, 0,    0
};

u8 npc_1_hirameki10_tex_index[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1 };

u8 npc_1_hirameki11_tex_index[] = { 0, 0, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 0, 6, 6, 6, 6, 6, 6 };

aNPC_Animation_c cKF_ba_r_npc_1_hirameki1 = {
    { cKF_ckcb_r_npc_1_hirameki1_tbl, cKF_ds_npc_1_hirameki1_tbl, cKF_kn_npc_1_hirameki1_tbl, cKF_c_npc_1_hirameki1_tbl,
      -1, 19 },
    1.0f,
    19.0f,
    cKF_FRAMECONTROL_STOP,
    -5.0f,
    npc_1_hirameki11_tex_index,
    aNPC_EYE_TEX0,
    -1,
    npc_1_hirameki10_tex_index,
    aNPC_MOUTH_TEX0,
    0,
    17,
    eEC_EFFECT_HIRAMEKI_DEN,
    NULL,
    NULL,
};
