#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_sitdown_clap1_tbl[] = { 24, 2, 0, 7, 7, 7, 0, 7, 7, 7, 0, 7, 7,
                                            2,  0, 7, 7, 0, 7, 7, 7, 7, 0, 7, 0, 0 };

s16 cKF_kn_npc_1_sitdown_clap1_tbl[] = { 5,  5, 3, 2,  5, 5, 2, 5, 2, 2,  5, 2, 2, 5, 5, 2, 5, 2, 2, 5, 2, 2, 10, 6, 2,
                                         10, 6, 4, 17, 9, 9, 2, 2, 2, 17, 9, 9, 2, 2, 2, 2, 2, 2, 2, 5, 4, 2, 2,  2 };

s16 cKF_c_npc_1_sitdown_clap1_tbl[] = { 0, 0, 0, 900,  0, 0, 0,   0, 1800, 0, 0, 1800, 0, 900, 0, 0,
                                        0, 0, 0, -900, 0, 0, 900, 0, -900, 0, 0, 0,    0, 0,   0, -900 };

s16 cKF_ds_npc_1_sitdown_clap1_tbl[] = {
    1,  1000, 0,    9,  1050, 0,     17, 1000, 0,     25, 1050, 0,    33, 1000, 0,     1,  0,    0,     9,  60,   0,
    17, 40,   0,    25, 60,   0,     33, 0,    0,     1,  0,    0,    17, -40,  0,     33, 0,    0,     1,  -175, -109,
    33, -175, 0,    1,  -100, 0,     9,  0,    0,     17, -135, 0,    25, 0,    0,     33, -100, 0,     1,  25,   0,
    9,  0,    0,    17, 25,   0,     25, 0,    0,     33, 25,   0,    1,  0,    0,     33, 0,    0,     1,  200,  0,
    9,  0,    0,    17, 245,  0,     25, 0,    0,     33, 200,  0,    1,  0,    0,     33, 0,    0,     1,  0,    0,
    33, 0,    0,    1,  -100, 0,     9,  50,   0,     17, -145, 0,    25, 50,   0,     33, -100, 0,     1,  0,    0,
    33, 0,    0,    1,  175,  109,   33, 175,  0,     1,  -100, 0,    9,  0,    0,     17, -135, 0,     25, 0,    0,
    33, -100, 0,    1,  -25,  0,     9,  0,    0,     17, -25,  0,    25, 0,    0,     33, -25,  0,     1,  0,    0,
    33, 0,    0,    1,  200,  0,     9,  0,    0,     17, 245,  0,    25, 0,    0,     33, 200,  0,     1,  0,    0,
    33, 0,    0,    1,  0,    0,     33, 0,    0,     1,  -100, 0,    9,  50,   0,     17, -145, 0,     25, 50,   0,
    33, -100, 0,    1,  0,    0,     33, 0,    0,     1,  0,    0,    33, 0,    0,     1,  38,   621,   2,  50,   0,
    6,  -25,  0,    10, 50,   0,     14, -25,  0,     18, 50,   0,    22, -25,  0,     26, 50,   0,     30, -25,  0,
    33, 38,   621,  1,  8,    -187,  2,  0,    -263,  10, -25,  0,    18, 0,    250,   26, 25,   0,     33, 8,    -187,
    1,  0,    0,    33, 0,    0,     1,  -113, 2602,  4,  140,  0,    8,  -160, 0,     12, 140,  0,     16, -160, 0,
    20, 140,  0,    24, -160, 0,     28, 140,  0,     32, -160, 0,    33, -113, 2602,  1,  23,   -577,  2,  0,    -743,
    10, -75,  0,    18, 0,    750,   26, 75,   0,     33, 23,   -577, 1,  2,    -78,   2,  0,    0,     18, 125,  0,
    33, 2,    -78,  1,  -400, 0,     3,  -200, 7538,  5,  600,  0,    7,  400,  -7747, 9,  -400, 0,     11, -200, 7538,
    13, 600,  0,    15, 400,  -7747, 17, -400, 0,     19, -200, 7538, 21, 600,  0,     23, 400,  -7747, 25, -400, 0,
    27, -200, 7538, 29, 600,  0,     31, 400,  -7747, 33, -400, 0,    1,  -500, 0,     5,  -650, 0,     9,  -500, 0,
    13, -650, 0,    17, -500, 0,     21, -650, 0,     25, -500, 0,    29, -650, 0,     33, -500, 0,     1,  -450, 0,
    5,  -900, 0,    9,  -450, 0,     13, -900, 0,     17, -450, 0,    21, -900, 0,     25, -450, 0,     29, -900, 0,
    33, -450, 0,    1,  0,    0,     33, 0,    0,     1,  -500, 0,    33, -500, 0,     1,  0,    0,     33, 0,    0,
    1,  400,  0,    3,  200,  -7408, 5,  -600, 0,     7,  -400, 7456, 9,  400,  0,     11, 200,  -7408, 13, -600, 0,
    15, -400, 7456, 17, 400,  0,     19, 200,  -7408, 21, -600, 0,    23, -400, 7456,  25, 400,  0,     27, 200,  -7408,
    29, -600, 0,    31, -400, 7456,  33, 400,  0,     1,  -500, 0,    5,  -650, 0,     9,  -500, 0,     13, -650, 0,
    17, -500, 0,    21, -650, 0,     25, -500, 0,     29, -650, 0,    33, -500, 0,     1,  450,  0,     5,  900,  0,
    9,  450,  0,    13, 900,  0,     17, 450,  0,     21, 900,  0,    25, 450,  0,     29, 900,  0,     33, 450,  0,
    1,  0,    0,    33, 0,    0,     1,  -500, 0,     33, -500, 0,    1,  0,    0,     33, 0,    0,     1,  0,    0,
    33, 0,    0,    1,  0,    0,     33, 0,    0,     1,  0,    0,    33, 0,    0,     1,  0,    0,     33, 0,    0,
    1,  0,    0,    9,  75,   0,     17, 25,   0,     25, 75,   0,    33, 0,    0,     1,  0,    -273,  9,  -50,  0,
    25, 50,   0,    33, 0,    -273,  1,  0,    0,     33, 0,    0,    1,  0,    0,     33, 0,    0,     1,  0,    0,
    33, 0,    0
};

aNPC_Animation_c cKF_ba_r_npc_1_sitdown_clap1 = {
    { cKF_ckcb_r_npc_1_sitdown_clap1_tbl, cKF_ds_npc_1_sitdown_clap1_tbl, cKF_kn_npc_1_sitdown_clap1_tbl,
      cKF_c_npc_1_sitdown_clap1_tbl, -1, 33 },
    1.0f,
    33.0f,
    cKF_FRAMECONTROL_REPEAT,
    -5.0f,
    NULL,
    aNPC_EYE_TEX0,
    5,
    NULL,
    aNPC_MOUTH_TEX0,
    2,
    2,
    eEC_EFFECT_WARAU,
    NULL,
    NULL,
};
