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

s16 cKF_c_npc_1_smile_f2_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_f2_tbl[] = {
    1,  0,    0,    13, 0,    0,    1,  1000, 0,     13, 1000, 0,     1,  0,    0,    13, 0,    0,     1,  0,    0,
    13, 0,    0,    1,  -40,  0,    4,  -10,  0,     7,  -30,  0,     10, -20,  0,    13, -40,  0,     1,  0,    0,
    13, 0,    0,    1,  -180, 0,    13, -180, 0,     1,  -130, 0,     4,  -100, 0,    7,  -120, 0,     10, -110, 0,
    13, -130, 0,    1,  26,   0,    13, 26,   0,     1,  0,    0,     13, 0,    0,    1,  200,  0,     13, 200,  0,
    1,  0,    0,    13, 0,    0,    1,  0,    0,     13, 0,    0,     1,  -104, 0,    13, -104, 0,     1,  4,    0,
    4,  4,    0,    7,  1,    -24,  10, 0,    0,     13, 4,    0,     1,  175,  0,    4,  170,  0,     7,  171,  13,
    10, 173,  24,   13, 175,  0,    1,  -254, 0,     4,  -220, 0,     7,  -243, 0,    10, -228, 0,     13, -254, 0,
    1,  -23,  0,    4,  -20,  0,    7,  -23,  0,     10, -20,  0,     13, -23,  0,    1,  0,    0,     13, 0,    0,
    1,  333,  0,    4,  325,  0,    7,  330,  0,     10, 320,  0,     13, 333,  0,    1,  0,    0,     13, 0,    0,
    1,  0,    0,    13, 0,    0,    1,  -123, 0,     4,  -119, 0,     7,  -123, 0,    10, -121, 0,     13, -123, 0,
    1,  -46,  0,    4,  -39,  87,   7,  -35,  0,     10, -45,  -39,   13, -46,  0,    1,  0,    0,     13, 0,    0,
    1,  -100, 0,    7,  -250, 0,    13, -100, 0,     1,  0,    -4182, 4,  -300, 0,    10, 300,  0,     13, 0,    -4191,
    1,  0,    0,    13, 0,    0,    1,  30,   1635,  3,  100,  0,     9,  -150, 0,    13, 30,   1589,  1,  253,  -2905,
    6,  -300, 0,    12, 300,  0,    13, 253,  -2899, 1,  23,   -658,  5,  -50,  0,    11, 50,   0,     13, 23,   -657,
    1,  148,  -461, 2,  140,  0,    5,  180,  0,     8,  150,  0,     11, 170,  0,    13, 148,  -461,  1,  0,    0,
    13, 0,    0,    1,  -560, 1210, 5,  -430, 0,     11, -600, 0,     13, -560, 1212, 1,  -720, 911,   5,  -620, 0,
    11, -760, 0,    13, -720, 918,  1,  -40,  -1216, 5,  -160, 0,     11, 0,    0,    13, -40,  -1230, 1,  0,    0,
    13, 0,    0,    1,  -50,  0,    13, -50,  0,     1,  0,    0,     13, 0,    0,    1,  0,    0,     13, 0,    0,
    1,  108,  0,    4,  170,  0,    7,  108,  0,     10, 230,  0,     13, 108,  0,    1,  300,  0,     4,  335,  0,
    7,  300,  0,    10, 335,  0,    13, 300,  0,     1,  0,    0,     13, 0,    0,    1,  -400, 0,     13, -400, 0,
    1,  0,    0,    13, 0,    0,    1,  300,  0,     13, 300,  0,     1,  -50,  0,    13, -50,  0,     1,  175,  0,
    13, 175,  0,    1,  -25,  597,  5,  50,   0,     11, -50,  0,     13, -25,  600,  1,  53,   -725,  3,  10,   0,
    6,  80,   0,    9,  10,   0,    12, 70,   0,     13, 53,   -724,  1,  0,    0,    13, 0,    0,     1,  0,    0,
    13, 0,    0,    1,  -350, 0,    4,  -400, 0,     7,  -350, 0,     10, -380, 0,    13, -350, 0,     1,  0,    0,
    13, 0,    0
};

aNPC_Animation_c cKF_ba_r_npc_1_smile_f2 = {
    { cKF_ckcb_r_npc_1_smile_f2_tbl, cKF_ds_npc_1_smile_f2_tbl, cKF_kn_npc_1_smile_f2_tbl, cKF_c_npc_1_smile_f2_tbl, -1,
      13 },
    1.0f,
    13.0f,
    cKF_FRAMECONTROL_REPEAT,
    0.0f,
    NULL,
    aNPC_EYE_TEX0,
    5,
    NULL,
    aNPC_MOUTH_TEX1,
    2,
    -1,
    eEC_EFFECT_WARAU,
    NULL,
    NULL,
};
