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

s16 cKF_kn_npc_1_sitdown_wait1_tbl[] = { 5, 5, 3, 2, 5, 5, 2, 5, 2, 2, 5, 2, 2, 5, 5, 2, 5, 2, 2, 5, 2, 5, 6,
                                         4, 2, 2, 3, 2, 3, 2, 2, 2, 3, 2, 3, 2, 3, 3, 3, 2, 5, 4, 2, 2, 2 };

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

s16 cKF_ds_npc_1_sitdown_wait1_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,   18, -40,  0, 35, 0,    0, 1,  -175, -105,
    35, -175, 0,   1,  -100, 0,    10, 0,    0,    18, -135, 0,   26, 0,    0, 35, -100, 0, 1,  25,   0,
    10, 0,    0,   18, 25,   0,    26, 0,    0,    35, 25,   0,   1,  0,    0, 35, 0,    0, 1,  200,  0,
    10, 0,    0,   18, 245,  0,    26, 0,    0,    35, 200,  0,   1,  0,    0, 35, 0,    0, 1,  0,    0,
    35, 0,    0,   1,  -100, 0,    10, 50,   0,    18, -145, 0,   26, 50,   0, 35, -100, 0, 1,  0,    0,
    35, 0,    0,   1,  175,  105,  35, 175,  0,    1,  -100, 0,   10, 0,    0, 18, -135, 0, 26, 0,    0,
    35, -100, 0,   1,  -25,  0,    10, 0,    0,    18, -25,  0,   26, 0,    0, 35, -25,  0, 1,  0,    0,
    35, 0,    0,   1,  200,  0,    10, 0,    0,    18, 245,  0,   26, 0,    0, 35, 200,  0, 1,  0,    0,
    35, 0,    0,   1,  0,    0,    35, 0,    0,    1,  -100, 0,   10, 50,   0, 18, -145, 0, 26, 50,   0,
    35, -100, 0,   1,  0,    0,    35, 0,    0,    1,  60,   0,   10, -60,  0, 18, 60,   0, 27, -60,  0,
    35, 60,   0,   1,  82,   1348, 4,  170,  0,    11, -170, 0,   19, 170,  0, 27, -170, 0, 33, 82,   1348,
    1,  2,    -78, 2,  0,    0,    19, 100,  0,    35, 2,    -78, 1,  0,    0, 31, 0,    0, 1,  -100, 0,
    31, -100, 0,   1,  -650, 0,    16, -620, 0,    31, -650, 0,   1,  0,    0, 31, 0,    0, 1,  -250, 0,
    16, -200, 0,   31, -250, 0,    1,  0,    0,    31, 0,    0,   1,  0,    0, 31, 0,    0, 1,  -100, 0,
    31, -100, 0,   1,  650,  0,    16, 620,  0,    31, 650,  0,   1,  0,    0, 31, 0,    0, 1,  -250, 0,
    16, -200, 0,   31, -250, 0,    1,  0,    0,    31, 0,    0,   1,  233,  0, 16, 233,  0, 31, 233,  0,
    1,  -505, 0,   16, -515, 0,    31, -505, 0,    1,  23,   0,   16, 55,   0, 31, 23,   0, 1,  0,    0,
    35, 0,    0,   1,  0,    0,    10, 50,   0,    18, 0,    0,   26, 50,   0, 35, 0,    0, 1,  0,    -273,
    10, -50,  0,   26, 50,   0,    35, 0,    -273, 1,  0,    0,   31, 0,    0, 1,  0,    0, 31, 0,    0,
    1,  0,    0,   31, 0,    0
};

aNPC_Animation_c cKF_ba_r_npc_1_sitdown_wait1 = {
    { cKF_ckcb_r_npc_1_sitdown_wait1_tbl, cKF_ds_npc_1_sitdown_wait1_tbl, cKF_kn_npc_1_sitdown_wait1_tbl,
      cKF_c_npc_1_sitdown_wait1_tbl, -1, 35 },
    1.0f,
    35.0f,
    cKF_FRAMECONTROL_REPEAT,
    -5.0f,
    NULL,
    aNPC_EYE_TEX0,
    0,
    NULL,
    aNPC_MOUTH_TEX1,
    0,
    -1,
    -1,
    NULL,
    NULL,
};
