#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_wait_e1_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_wait_e1_tbl[] = { 2, 2, 2, 3, 3, 3, 2, 2, 2, 7, 3, 7, 4, 3, 4, 2, 2, 2, 3, 3, 3, 3, 3, 3, 2, 2, 2,
                                   2, 2, 2, 2, 4, 5, 3, 3, 2, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 3, 3, 3, 2, 2, 2 };

s16 cKF_c_npc_1_wait_e1_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_wait_e1_tbl[] = {
    1,  0,    0, 31, 0,    0,   1,  722,  0, 31, 722,  0,  1,  0,    0,   31, 0,    0,   1,  0,    0,   16, 0,    0,
    31, 0,    0, 1,  60,   0,   16, 70,   0, 31, 60,   0,  1,  50,   0,   16, 50,   0,   31, 50,   0,   1,  0,    0,
    31, 0,    0, 1,  -520, -13, 31, -520, 0, 1,  -100, 0,  31, -100, 0,   1,  0,    0,   6,  0,    0,   11, 0,    0,
    16, 0,    0, 21, 0,    0,   26, 0,    0, 31, 0,    0,  1,  450,  0,   16, 470,  0,   31, 450,  0,   1,  -100, 0,
    6,  -100, 0, 11, -100, 0,   16, -100, 0, 21, -100, 0,  26, -100, 0,   31, -100, 0,   1,  25,   0,   6,  25,   0,
    21, 25,   0, 31, 25,   0,   1,  135,  0, 16, 105,  0,  31, 135,  0,   1,  105,  0,   6,  105,  0,   21, 105,  0,
    31, 105,  0, 1,  0,    0,   31, 0,    0, 1,  -800, 0,  31, -800, 0,   1,  100,  0,   31, 100,  0,   1,  0,    -48,
    16, -50,  0, 31, 0,    0,   1,  0,    0, 16, 0,    0,  31, 0,    0,   1,  600,  0,   16, 600,  0,   31, 600,  0,
    1,  0,    0, 16, 0,    0,   31, 0,    0, 1,  0,    0,  16, 0,    0,   31, 0,    0,   1,  0,    0,   16, -50,  0,
    31, 0,    0, 1,  0,    0,   31, 0,    0, 1,  0,    0,  31, 0,    0,   1,  0,    0,   31, 0,    0,   1,  0,    0,
    31, 0,    0, 1,  0,    0,   31, 0,    0, 1,  0,    0,  31, 0,    0,   1,  0,    0,   31, 0,    0,   1,  -140, 0,
    2,  -140, 0, 17, -120, 0,   31, -140, 0, 1,  -100, 76, 8,  -90,  0,   16, -100, -75, 24, -110, 0,   31, -100, 75,
    1,  0,    0, 16, 30,   0,   31, 0,    0, 1,  -300, 0,  16, -300, 0,   31, -300, 0,   1,  -400, 0,   31, -400, 0,
    1,  -200, 0, 16, -200, 0,   31, -200, 0, 1,  -600, 0,  16, -570, 0,   31, -600, 0,   1,  50,   0,   16, 50,   0,
    31, 50,   0, 1,  0,    0,   16, -25,  0, 31, 0,    0,  1,  -200, 0,   16, -200, 0,   31, -200, 0,   1,  -350, 0,
    16, -350, 0, 31, -350, 0,   1,  -100, 0, 31, -100, 0,  1,  -600, 0,   31, -600, 0,   1,  0,    0,   31, 0,    0,
    1,  0,    0, 31, 0,    0,   1,  0,    0, 31, 0,    0,  1,  0,    0,   31, 0,    0,   1,  0,    0,   16, 0,    0,
    31, 0,    0, 1,  60,   0,   16, 80,   0, 31, 60,   0,  1,  -50,  -74, 16, -50,  73,  31, -50,  -73, 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_wait_e1 = {
    { cKF_ckcb_r_npc_1_wait_e1_tbl, cKF_ds_npc_1_wait_e1_tbl, cKF_kn_npc_1_wait_e1_tbl, cKF_c_npc_1_wait_e1_tbl, -1,
      31 },
    1.0f,
    31.0f,
    cKF_FRAMECONTROL_REPEAT,
    -5.0f,
    NULL,
    aNPC_EYE_TEX1,
    -1,
    NULL,
    aNPC_MOUTH_TEX1,
    0,
    -1,
    -1,
    NULL,
    NULL,
};
