#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_smile1_tbl[] = { 16, 2, 0, 3, 2, 2, 0, 3, 2, 2, 0, 3, 3, 6, 0, 3, 2, 0, 2, 2, 0, 6, 0, 2, 0, 0 };

s16 cKF_kn_npc_1_smile1_tbl[] = { 7, 7, 9, 7, 10, 8, 9, 6, 10, 8, 10, 5, 10, 5, 4, 10, 10, 3, 8, 10, 8, 4, 10, 9 };

s16 cKF_c_npc_1_smile1_tbl[] = { 0, 0,   0, 0, 900, 0,   0, 0, 0, 1800, -175, 0, 0,    0, 0, 0, 0, 1800, 175,
                                 0, 0,   0, 0, 0,   900, 0, 0, 0, 0,    0,    0, -900, 0, 0, 0, 0, 0,    900,
                                 0, 564, 0, 0, 0,   0,   0, 0, 0, -900, 0,    0, 0,    0, 0, 0, 0, 0,    -900 };

s16 cKF_ds_npc_1_smile1_tbl[] = {
    1,  1000, -1125, 2,  963,  -1125, 3,  925,  -446,  4,  933,  396,   7,  992,  396,   10, 1000, 0,
    12, 1000, 0,     1,  0,    -750,  2,  -25,  -750,  3,  -50,  -328,  4,  -47,  150,   7,  -30,  31,
    11, -39,  -53,   12, -40,  -31,   1,  -100, -3000, 2,  -200, -3000, 3,  -300, -1078, 4,  -272, 1350,
    6,  -148, 1350,  7,  -120, 391,   8,  -122, -106,  11, -138, -106,  12, -140, -62,   1,  25,   750,
    2,  50,   750,   3,  75,   293,   4,  70,   -263,  6,  45,   -262,  9,  40,   0,     12, 40,   0,
    1,  200,  4500,  2,  350,  4500,  3,  500,  1704,  4,  464,  -1848, 6,  273,  -2856, 7,  186,  -1848,
    8,  150,  -429,  9,  158,  375,   11, 192,  375,   12, 200,  234,   1,  -100, -2250, 2,  -175, -2250,
    3,  -250, -903,  4,  -235, 778,   8,  -65,  778,   9,  -50,  28,    11, -87,  -556,  12, -100, -389,
    1,  -100, -3000, 2,  -200, -3000, 3,  -300, -1078, 4,  -272, 1350,  6,  -148, 1350,  7,  -120, 391,
    8,  -122, -106,  11, -138, -106,  12, -140, -62,   1,  -25,  -750,  2,  -50,  -750,  3,  -75,  -307,
    4,  -70,  225,   7,  -40,  195,   12, -25,  23,    1,  200,  4500,  2,  350,  4500,  3,  500,  1704,
    4,  464,  -1848, 6,  273,  -2856, 7,  186,  -1848, 8,  150,  -429,  9,  158,  375,   11, 192,  375,
    12, 200,  234,   1,  -100, -2250, 2,  -175, -2250, 3,  -250, -921,  4,  -236, 750,   8,  -65,  783,
    9,  -50,  29,    11, -87,  -556,  12, -100, -389,  1,  60,   311,   2,  70,   444,   3,  90,   444,
    4,  100,  -782,  5,  37,   -3000, 7,  -238, -3000, 8,  -300, -469,  9,  -269, 1500,  11, -131, 1500,
    12, -100, 938,   1,  0,    347,   2,  12,   624,   10, 187,  -1595, 11, 116,  -2808, 12, 0,    -3467,
    1,  82,   57,    3,  88,   148,   5,  98,   96,    6,  100,  -749,  7,  48,   -2222, 8,  -48,  -2222,
    9,  -100, -454,  10, -78,  1081,  11, -28,  1626,  12, 30,   1737,  1,  0,    417,   2,  14,   764,
    10, 361,  -501,  11, 328,  -1617, 12, 253,  -2228, 1,  0,    70,    3,  8,    222,   11, 40,   -411,
    12, 23,   -527,  1,  2,    -438,  2,  -13,  -584,  3,  -37,  -558,  4,  -50,  323,   5,  -16,  1650,
    7,  136,  1650,  8,  170,  506,   9,  169,  -52,   11, 160,  -281,  12, 148,  -361,  1,  58,   -411,
    2,  44,   -657,  4,  -16,  -657,  5,  -30,  217,   6,  -2,   1350,  8,  122,  1350,  9,  150,  257,
    10, 139,  -472,  11, 119,  -472,  12, 108,  -331,  1,  -564, 198,   5,  -551, -16,   12, -565, -21,
    1,  -57,  -2282, 2,  -133, -3956, 4,  -512, -4190, 5,  -600, -539,  7,  -452, 2222,  8,  -400, 778,
    9,  -400, 0,     12, -400, 0,     1,  58,   -411,  2,  44,   -657,  4,  -16,  -657,  5,  -30,  217,
    6,  -2,   1350,  8,  122,  1350,  9,  150,  257,   10, 139,  -472,  11, 119,  -472,  12, 108,  -331,
    1,  -57,  -2546, 2,  -142, -4073, 4,  -515, -4073, 5,  -600, -495,  7,  -452, 2222,  8,  -400, 778,
    9,  -400, 0,     12, -400, 0,     1,  0,    -67,   4,  -16,  -267,  11, -41,  367,   12, -25,  476,
    1,  0,    -141,  2,  -5,   -225,  4,  -25,  -225,  5,  -30,  187,   6,  -13,  825,   8,  63,   825,
    9,  80,   232,   10, 78,   -144,  11, 70,   -386,  12, 53,   -537,  1,  0,    0,     3,  0,    0,
    4,  0,    -1055, 5,  -70,  -3375, 7,  -380, -3375, 8,  -450, -820,  9,  -434, 750,   11, -366, 750,
    12, -350, 469
};

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

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

aNPC_Animation_c cKF_ba_r_npc_1_smile1 = {
    { cKF_ckcb_r_npc_1_smile1_tbl, cKF_ds_npc_1_smile1_tbl, cKF_kn_npc_1_smile1_tbl, cKF_c_npc_1_smile1_tbl, -1, 12 },
    1.0f,
    12.0f,
    cKF_FRAMECONTROL_STOP,
    -7.0f,
    npc_1_smile11_tex_index,
    aNPC_EYE_TEX0,
    -1,
    npc_1_smile10_tex_index,
    aNPC_MOUTH_TEX0,
    -1,
    1,
    eEC_EFFECT_WARAU,
    NULL,
    NULL,
};
