#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_drink1_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_sitdown_drink1_tbl[] = { 5, 5, 5, 2, 5, 2,  3, 3, 3, 5, 5, 5, 5, 5, 5, 3, 3, 3,
                                          5, 5, 5, 5, 5, 5,  2, 7, 2, 2, 8, 2, 2, 7, 2, 2, 5, 5,
                                          2, 7, 2, 8, 9, 10, 2, 8, 2, 6, 8, 8, 8, 8, 8, 2, 5, 2 };

s16 cKF_c_npc_1_sitdown_drink1_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_sitdown_drink1_tbl[] = {
    1,  0,    0,    11, 0,    0,    43, 0,    0,    56, 0,    0,    61, 0,    0,    1,  1000, 0,    11, 950,  0,
    43, 1000, 0,    56, 975,  0,    61, 1000, 0,    1,  0,    0,    11, 125,  0,    43, 0,    0,    56, 50,   0,
    61, 0,    0,    1,  0,    0,    61, 0,    0,    1,  0,    0,    11, 25,   0,    25, 35,   0,    43, 45,   0,
    61, 0,    0,    1,  0,    0,    61, 0,    0,    1,  -175, 0,    43, -175, 0,    61, -175, 0,    1,  -100, 0,
    43, 0,    0,    61, -100, 0,    1,  25,   0,    43, 25,   0,    61, 25,   0,    1,  0,    0,    11, 0,    0,
    43, 0,    0,    56, 0,    0,    61, 0,    0,    1,  200,  0,    11, 450,  0,    43, 100,  0,    56, 300,  0,
    61, 200,  0,    1,  0,    0,    11, 0,    0,    43, 0,    0,    56, 0,    0,    61, 0,    0,    1,  0,    0,
    11, 0,    0,    43, 0,    0,    56, 0,    0,    61, 0,    0,    1,  -100, 0,    11, -300, 0,    43, -50,  0,
    56, -200, 0,    61, -100, 0,    1,  0,    0,    11, 0,    0,    43, 0,    0,    56, 0,    0,    61, 0,    0,
    1,  175,  0,    43, 175,  0,    61, 175,  0,    1,  -100, 0,    43, 0,    0,    61, -100, 0,    1,  -25,  0,
    43, -25,  0,    61, -25,  0,    1,  0,    0,    11, 0,    0,    43, 0,    0,    56, 0,    0,    61, 0,    0,
    1,  200,  0,    11, 450,  0,    43, 100,  0,    56, 300,  0,    61, 200,  0,    1,  0,    0,    11, 0,    0,
    43, 0,    0,    56, 0,    0,    61, 0,    0,    1,  0,    0,    11, 0,    0,    43, 0,    0,    56, 0,    0,
    61, 0,    0,    1,  -100, 0,    11, -300, 0,    43, -50,  0,    56, -200, 0,    61, -100, 0,    1,  0,    0,
    11, 0,    0,    43, 0,    0,    56, 0,    0,    61, 0,    0,    1,  0,    0,    61, 0,    0,    1,  -1,   82,
    15, 0,    -185, 27, -150, -257, 32, -150, 288,  44, -225, -190, 52, -175, 595,  61, -1,   82,   1,  0,    0,
    61, 0,    0,    1,  0,    0,    61, 0,    0,    1,  -110, 206,  13, -50,  424,  19, 50,   0,    25, -100, -336,
    30, -100, 322,  37, 0,    0,    44, -150, -381, 61, -110, 206,  1,  0,    0,    61, 0,    0,    1,  0,    0,
    61, 0,    0,    1,  2,    -67,  13, -143, 0,    25, 57,   248,  30, 82,   84,   43, 119,  93,   49, 119,  -94,
    61, 2,    -65,  1,  0,    0,    61, 0,    0,    1,  0,    0,    61, 0,    0,    1,  -100, 0,    26, -50,  162,
    44, 80,   167,  50, 80,   -292, 61, -100, 0,    1,  -650, 0,    26, -550, 190,  44, -450, 86,   50, -450, -157,
    61, -650, 0,    1,  0,    0,    61, 0,    0,    1,  -250, 0,    13, -200, 0,    27, -300, -251, 37, -350, 0,
    45, -300, 410,  51, -200, 0,    61, -250, 0,    1,  0,    0,    61, 0,    0,    1,  0,    0,    11, -50,  0,
    25, -70,  0,    30, -50,  0,    37, 118,  1492, 43, 405,  482,  49, 405,  -474, 61, 0,    0,    1,  -100, 0,
    11, -500, 0,    13, -500, 0,    25, -630, 0,    30, -650, -120, 43, -800, 0,    49, -800, 0,    55, -595, 2657,
    61, -100, 0,    1,  650,  0,    11, 500,  0,    13, 500,  0,    25, 480,  -182, 30, 450,  -172, 37, 305,  -1331,
    43, 35,   -576, 46, 5,    0,    49, 35,   584,  61, 650,  0,    1,  0,    0,    61, 0,    0,    1,  -250, 0,
    11, -450, 0,    13, -450, 0,    25, -200, 0,    30, -200, 0,    43, -58,  104,  49, -58,  0,    61, -250, 0,
    1,  0,    0,    61, 0,    0,    1,  233,  0,    11, 425,  0,    30, 425,  0,    43, 328,  0,    49, 328,  0,
    61, 233,  0,    1,  -505, 0,    11, 0,    0,    13, 0,    0,    25, -108, 0,    30, -108, 0,    43, -155, 0,
    49, -155, 0,    61, -505, 0,    1,  23,   0,    11, -75,  0,    13, -75,  0,    25, -60,  0,    30, -60,  0,
    43, -45,  0,    49, -45,  0,    61, 23,   0,    1,  0,    0,    13, -228, 0,    25, -200, 0,    30, -200, 0,
    43, -178, 0,    49, -178, 0,    55, -67,  0,    61, 0,    0,    1,  0,    0,    13, -75,  0,    25, -150, -158,
    30, -150, 153,  43, 50,   230,  49, 50,   -225, 55, -125, 0,    61, 0,    0,    1,  0,    0,    13, 75,   0,
    25, 0,    0,    30, 0,    0,    43, -75,  -62,  49, -75,  64,   55, -26,  0,    61, 0,    0,    1,  0,    0,
    61, 0,    0,    1,  0,    0,    47, 0,    0,    51, -100, 0,    56, -100, 0,    61, 0,    0,    1,  0,    0,
    61, 0,    0
};

u8 npc_1_sitdown_drink10_tex_index[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
                                         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
                                         0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0 };

u8 npc_1_sitdown_drink11_tex_index[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
                                         0, 0, 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, 2, 2, 2, 1, 0, 0 };

aNPC_Animation_c cKF_ba_r_npc_1_sitdown_drink1 = {
    { cKF_ckcb_r_npc_1_sitdown_drink1_tbl, cKF_ds_npc_1_sitdown_drink1_tbl, cKF_kn_npc_1_sitdown_drink1_tbl,
      cKF_c_npc_1_sitdown_drink1_tbl, -1, 61 },
    1.0f,
    61.0f,
    cKF_FRAMECONTROL_STOP,
    -5.0f,
    npc_1_sitdown_drink11_tex_index,
    aNPC_EYE_TEX0,
    -1,
    npc_1_sitdown_drink10_tex_index,
    aNPC_MOUTH_TEX0,
    0,
    -1,
    -1,
    NULL,
    NULL,
};
