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

s16 cKF_c_npc_1_hirameki_d1_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_hirameki_d1_tbl[] = {
    1,  0,    0,    19, 0,    0,     1,  2400, 0,     19, 2400, 0,     1,  0,    0,   19, 0,    0,     1,  0,    0,
    19, 0,    0,    1,  80,   0,     3,  30,   0,     9,  80,   0,     19, 80,   0,   1,  0,    0,     19, 0,    0,
    1,  -750, 0,    6,  -850, 0,     11, -755, 0,     19, -750, 146,   1,  -500, 0,   6,  -600, 0,     11, -500, 0,
    19, -500, -149, 1,  300,  0,     6,  400,  0,     11, 295,  0,     19, 300,  148, 1,  0,    0,     19, 0,    0,
    1,  350,  0,    7,  250,  0,     10, 270,  456,   13, 350,  0,     19, 350,  296, 1,  0,    0,     19, 0,    0,
    1,  0,    0,    19, 0,    0,     1,  -100, 0,     19, -100, 0,     1,  0,    0,   19, 0,    0,     1,  750,  0,
    6,  850,  0,    11, 750,  0,     19, 750,  -149,  1,  -500, 0,     6,  -600, 0,   11, -500, 0,     19, -500, -148,
    1,  -300, 0,    6,  -400, 0,     11, -295, 0,     19, -300, -150,  1,  0,    0,   19, 0,    0,     1,  350,  0,
    7,  250,  0,    10, 270,  456,   13, 350,  0,     19, 350,  297,   1,  0,    0,   19, 0,    0,     1,  0,    0,
    19, 0,    0,    1,  -100, 0,     19, -100, 0,     1,  0,    0,     19, 0,    0,   1,  0,    0,     19, 0,    0,
    1,  -250, 0,    19, -250, 0,     1,  0,    0,     19, 0,    0,     1,  0,    0,   19, 0,    0,     1,  -100, 0,
    19, -100, 0,    1,  0,    0,     19, 0,    0,     1,  0,    0,     19, 0,    0,   1,  -100, -101,  5,  -110, 0,
    10, -10,  0,    14, -130, 0,     19, -50,  231,   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,  50,   0,   11, -500, 0,     13, -590, 0,
    15, -550, 0,    17, -650, -2247, 19, -700, 0,     1,  -650, 0,     11, -300, 0,   13, -450, -5203, 15, -900, 0,
    17, -750, 1852, 19, -700, 0,     1,  0,    0,     19, 0,    0,     1,  -250, 0,   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,  50,   0,     11, -500, 0,     13, -590, 0,   15, -550, 0,     17, -650, -2234,
    19, -700, 0,    1,  650,  0,     11, 300,  0,     13, 450,  5333,  15, 900,  0,   17, 750,  -1848, 19, 700,  0,
    1,  0,    0,    19, 0,    0,     1,  -250, 0,     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,  -50,  -304,  9,  -50,  294, 13, 30,   0,     16, -30,  0,
    19, 0,    -102, 1,  0,    0,     19, 0,    0,     1,  0,    0,     19, 0,    0,   1,  0,    0,     19, 0,    0,
    1,  0,    0,    19, 0,    0
};

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

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

aNPC_Animation_c cKF_ba_r_npc_1_hirameki_d1 = {
    { cKF_ckcb_r_npc_1_hirameki_d1_tbl, cKF_ds_npc_1_hirameki_d1_tbl, cKF_kn_npc_1_hirameki_d1_tbl,
      cKF_c_npc_1_hirameki_d1_tbl, -1, 19 },
    1.0f,
    19.0f,
    cKF_FRAMECONTROL_STOP,
    -5.0f,
    npc_1_hirameki_d10_tex_index,
    aNPC_EYE_TEX0,
    -1,
    npc_1_hirameki_d11_tex_index,
    aNPC_MOUTH_TEX0,
    -1,
    15,
    eEC_EFFECT_HIRAMEKI_DEN,
    NULL,
    NULL,
};
