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

s16 cKF_c_npc_1_smile_f1_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_smile_f1_tbl[] = {
    1,  0,    0,     12, 0,    0,    1,  975,  0,     3,  925,  0,    8,  1000, 0,     12, 1000, 0,     1,  0,    0,
    12, 0,    0,     1,  0,    0,    12, 0,    0,     1,  60,   0,    3,  -50,  0,     7,  -30,  0,     12, -40,  0,
    1,  90,   0,     12, 0,    0,    1,  -185, 0,     3,  -185, 0,    5,  -181, 56,    8,  -175, 0,     9,  -179, -37,
    12, -180, 0,     1,  40,   0,    3,  -235, 0,     5,  -189, 1416, 7,  -101, 1191,  8,  -73,  0,     9,  -111, -690,
    12, -130, 0,     1,  -85,  0,    3,  -24,  285,   7,  -20,  0,    8,  -17,  249,   9,  5,    612,   12, 26,   0,
    1,  0,    0,     12, 0,    0,    1,  40,   0,     3,  409,  0,    5,  329,  -2571, 7,  156,  -2350, 8,  90,   0,
    9,  171,  1301,  12, 200,  0,    1,  0,    0,     12, 0,    0,    1,  0,    0,     12, 0,    0,     1,  -15,  0,
    3,  -211, 0,     5,  -170, 1360, 7,  -75,  1435,  8,  -43,  0,    9,  -85,  -643,  12, -104, 0,     1,  0,    0,
    8,  0,    0,     9,  1,    50,   12, 4,    0,     1,  180,  0,    3,  245,  0,     5,  219,  -437,  7,  190,  -433,
    9,  178,  -73,   12, 175,  0,    1,  -260, 0,     3,  -424, 0,    5,  -373, 1480,  9,  -260, 199,   12, -254, 0,
    1,  -145, 0,     3,  -189, 0,    5,  -140, 948,   9,  -45,  332,  12, -23,  0,     1,  0,    0,     12, 0,    0,
    1,  560,  0,     3,  685,  0,    7,  441,  -1636, 12, 333,  0,    1,  0,    0,     12, 0,    0,     1,  0,    0,
    12, 0,    0,     1,  -240, 0,    3,  -300, 0,     5,  -255, 1198, 7,  -175, 628,   12, -123, 0,     1,  -40,  0,
    3,  -49,  0,     5,  -49,  0,    9,  -41,  0,     12, -46,  0,    1,  0,    0,     12, 0,    0,     1,  60,   0,
    4,  100,  0,     8,  -300, 0,    12, -100, 0,     1,  0,    0,    12, 0,    -4182, 1,  0,    0,     12, 0,    0,
    1,  82,   0,     6,  100,  0,    9,  -100, 0,     12, 30,   1635, 1,  0,    0,     12, 253,  -2905, 1,  0,    0,
    9,  55,   0,     12, 23,   -658, 1,  100,  0,     4,  30,   0,    8,  170,  0,     12, 148,  -461,  1,  -50,  0,
    4,  0,    0,     12, 0,    0,    1,  -120, 0,     12, -560, 1210, 1,  -700, 0,     12, -720, 911,   1,  -450, 0,
    12, -40,  -1216, 1,  0,    0,    12, 0,    0,     1,  -50,  0,    12, -50,  0,     1,  0,    0,     12, 0,    0,
    1,  0,    0,     12, 0,    0,    1,  50,   0,     5,  -30,  0,    9,  150,  0,     12, 108,  0,     1,  300,  0,
    12, 300,  0,     1,  0,    0,    12, 0,    0,     1,  -57,  0,    5,  -600, 0,     8,  -400, 0,     12, -400, 0,
    1,  0,    0,     12, 0,    0,    1,  0,    0,     12, 300,  0,    1,  0,    0,     12, -50,  0,     1,  0,    0,
    12, 175,  0,     1,  0,    0,    9,  -50,  0,     12, -25,  597,  1,  -200, 0,     5,  -30,  0,     9,  80,   0,
    12, 53,   -725,  1,  -10,  0,    5,  0,    0,     12, 0,    0,    1,  0,    0,     12, 0,    0,     1,  0,    0,
    4,  0,    0,     8,  -450, 0,    12, -350, 0,     1,  0,    0,    12, 0,    0
};

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

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

aNPC_Animation_c cKF_ba_r_npc_1_smile_f1 = {
    { cKF_ckcb_r_npc_1_smile_f1_tbl, cKF_ds_npc_1_smile_f1_tbl, cKF_kn_npc_1_smile_f1_tbl, cKF_c_npc_1_smile_f1_tbl, -1,
      12 },
    1.0f,
    12.0f,
    cKF_FRAMECONTROL_STOP,
    -7.0f,
    npc_1_smile_f11_tex_index,
    aNPC_EYE_TEX0,
    -1,
    npc_1_smile_f10_tex_index,
    aNPC_MOUTH_TEX0,
    -1,
    1,
    eEC_EFFECT_WARAU,
    NULL,
    NULL,
};
