#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_happy2_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_happy2_tbl[] = { 7, 7, 2, 6, 7, 7, 2, 7, 7, 2, 7, 2, 2, 7, 2, 2, 7, 7, 2, 7, 2, 2, 7, 2, 2, 6, 2,
                                  2, 6, 2, 6, 7, 6, 2, 4, 8, 2, 4, 8, 2, 4, 8, 2, 4, 8, 2, 2, 2, 2, 6, 2, 2, 3, 2 };

s16 cKF_c_npc_1_happy2_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_happy2_tbl[] = {
    1,  0,    -218, 11, -150, -333, 21, -150, 331,  31, 0,    200,  41, 150,  334,  51, 150,  -345, 61, 0,    -218,
    1,  900,  0,    12, 1100, 193,  20, 1100, -196, 31, 900,  0,    42, 1100, 201,  50, 1100, -199, 61, 900,  0,
    1,  0,    0,    61, 0,    0,    1,  0,    -172, 12, -50,  -67,  19, -50,  69,   43, 50,   72,   50, 50,   -67,
    61, 0,    -172, 1,  0,    0,    12, -80,  -155, 19, -80,  159,  31, 0,    0,    43, -80,  -152, 50, -80,  155,
    61, 0,    0,    1,  0,    0,    12, 50,   153,  19, 50,   -149, 31, 0,    0,    43, -50,  -155, 50, -50,  155,
    61, 0,    0,    1,  -175, 0,    61, -175, 0,    1,  -250, 0,    12, -100, 0,    19, -100, 0,    31, -250, 0,
    43, -100, 0,    50, -100, 0,    61, -250, 0,    1,  60,   0,    12, 85,   0,    19, 85,   0,    31, 60,   0,
    43, -20,  0,    50, -20,  0,    61, 60,   0,    1,  0,    0,    61, 0,    0,    1,  550,  0,    12, 0,    -387,
    19, 0,    393,  31, 550,  0,    43, 200,  -277, 50, 200,  283,  61, 550,  0,    1,  0,    0,    61, 0,    0,
    1,  0,    0,    61, 0,    0,    1,  -300, 0,    12, 175,  338,  19, 175,  -332, 31, -300, 0,    43, -100, 295,
    50, -100, -298, 61, -300, 0,    1,  0,    0,    61, 0,    0,    1,  175,  0,    61, 175,  0,    1,  -250, 0,
    12, -100, 118,  19, -100, -117, 31, -250, 0,    43, -100, 118,  50, -100, -117, 61, -250, 0,    1,  -60,  0,
    12, -20,  32,   19, -20,  -34,  31, -60,  0,    43, -85,  -35,  50, -85,  36,   61, -60,  0,    1,  0,    0,
    61, 0,    0,    1,  550,  0,    12, 200,  -277, 19, 200,  283,  31, 550,  0,    43, 0,    -387, 50, 0,    393,
    61, 550,  0,    1,  0,    0,    61, 0,    0,    1,  0,    0,    61, 0,    0,    1,  -300, 0,    12, -100, 295,
    19, -100, -298, 31, -300, 0,    43, 175,  338,  50, 175,  -332, 61, -300, 0,    1,  0,    0,    61, 0,    0,
    1,  0,    0,    61, 0,    0,    1,  45,   688,  4,  80,   0,    19, -250, 0,    34, 80,   0,    49, -250, 0,
    61, 45,   688,  1,  0,    0,    61, 0,    0,    1,  0,    0,    61, 0,    0,    1,  -43,  1054, 9,  150,  0,
    24, -200, 0,    39, 150,  0,    54, -200, 0,    61, -43,  1054, 1,  0,    0,    61, 0,    0,    1,  10,   -91,
    15, -30,  -43,  22, -30,  44,   46, 30,   43,   53, 30,   -43,  61, 10,   -91,  1,  -96,  -766, 15, 150,  267,
    22, 150,  -266, 34, -150, 0,    46, 150,  267,  53, 150,  -266, 61, -96,  -766, 1,  15,   -349, 15, -80,  -109,
    22, -80,  110,  46, 80,   108,  53, 80,   -109, 61, 15,   -349, 1,  0,    0,    61, 0,    0,    1,  30,   -235,
    19, -80,  0,    50, 80,   0,    61, 30,   -235, 1,  -590, -754, 5,  -650, 0,    15, -400, 226,  22, -400, -218,
    34, -650, 0,    46, -400, 221,  53, -400, -219, 61, -590, -754, 1,  0,    0,    61, 0,    0,    1,  -5,   -431,
    22, -250, 0,    53, 50,   0,    61, -5,   -431, 1,  8,    -841, 8,  -120, 0,    18, 100,  157,  25, 100,  -162,
    37, -120, 0,    49, 100,  151,  56, 100,  -157, 61, 8,    -841, 1,  0,    0,    61, 0,    0,    1,  -30,  217,
    19, 80,   0,    50, -80,  0,    61, -30,  217,  1,  590,  683,  5,  650,  0,    15, 400,  -214, 22, 400,  215,
    34, 650,  0,    46, 400,  -218, 53, 400,  214,  61, 590,  683,  1,  0,    0,    61, 0,    0,    1,  -194, 370,
    22, 50,   0,    53, -250, 0,    61, -194, 370,  1,  -8,   693,  8,  120,  0,    18, -100, -150, 25, -100, 149,
    37, 120,  0,    49, -100, -148, 56, -100, 149,  61, -8,   693,  1,  0,    0,    61, 0,    0,    1,  0,    0,
    61, 0,    0,    1,  0,    0,    61, 0,    0,    1,  5,    0,    61, 5,    0,    1,  -5,   325,  6,  50,   0,
    21, -60,  0,    37, 50,   0,    53, -60,  0,    61, -5,   325,  1,  0,    0,    61, 0,    0,    1,  0,    0,
    61, 0,    0,    1,  -200, 0,    31, -150, 0,    61, -200, 0,    1,  0,    0,    61, 0,    0
};

u8 npc_1_happy20_tex_index[] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
                                 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
                                 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 };

aNPC_Animation_c cKF_ba_r_npc_1_happy2 = {
    { cKF_ckcb_r_npc_1_happy2_tbl, cKF_ds_npc_1_happy2_tbl, cKF_kn_npc_1_happy2_tbl, cKF_c_npc_1_happy2_tbl, -1, 61 },
    1.0f,
    61.0f,
    cKF_FRAMECONTROL_REPEAT,
    0.0f,
    NULL,
    aNPC_EYE_TEX0,
    5,
    npc_1_happy20_tex_index,
    aNPC_MOUTH_TEX0,
    -1,
    -1,
    eEC_EFFECT_SIAWASE_HIKARI,
    NULL,
    NULL,
};
