#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_misin1_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_misin1_tbl[] = {
    2, 2, 2, 6, 5, 5, 8,  8, 8, 2, 2, 2,  2,  2, 2, 8,  8,  8,  2, 2, 2, 2, 2, 2, 9, 6, 9,
    7, 7, 7, 3, 3, 3, 11, 8, 9, 3, 7, 11, 11, 7, 7, 11, 11, 11, 2, 2, 2, 4, 5, 3, 2, 2, 2
};

s16 cKF_c_npc_1_misin1_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_misin1_tbl[] = {
    1,    0,    0,    70,    0,    0,    1,    600,  0,    70,   600,  0,    1,    0,    0,    70,   0,    0,    1,
    0,    0,    38,   0,     0,    48,   0,    0,    53,   0,    0,    70,   0,    0,    70,   0,    0,    1,    100,
    0,    38,   -85,  -56,   48,   -85,  67,   70,   100,  251,  70,   100,  251,  1,    0,    0,    38,   -10,  -5,
    48,   -8,   9,    70,    0,    11,   70,   0,    11,   1,    0,    0,    10,   0,    0,    26,   0,    0,    38,
    0,    0,    48,   0,     0,    61,   0,    0,    68,   0,    0,    70,   0,    0,    1,    94,   0,    10,   73,
    -156, 26,   -36,  -175,  38,   -91,  -75,  48,   -91,  76,   61,   4,    260,  68,   74,   303,  70,   94,   0,
    1,    -1,   0,    10,    2,    11,   26,   7,    9,    38,   10,   1,    48,   8,    -11,  61,   1,    -13,  68,
    -1,   -9,   70,   -1,    0,    1,    0,    0,    70,   0,    0,    1,    0,    0,    70,   0,    0,    1,    0,
    0,    70,   0,    0,     1,    0,    0,    70,   0,    0,    1,    0,    0,    70,   0,    0,    1,    0,    0,
    70,   0,    0,    1,     0,    0,    10,   0,    0,    26,   0,    0,    38,   0,    0,    48,   0,    0,    61,
    0,    0,    68,   0,     0,    70,   0,    0,    1,    94,   0,    10,   73,   -156, 26,   -36,  -175, 38,   -91,
    -75,  48,   -91,  131,   61,   9,    249,  68,   76,   297,  70,   94,   0,    1,    -1,   0,    10,   2,    10,
    26,   7,    9,    38,    10,   1,    48,   8,    -11,  61,   1,    -13,  68,   -1,   -9,   70,   -1,   0,    1,
    0,    0,    70,   0,     0,    1,    0,    0,    70,   0,    0,    1,    0,    0,    70,   0,    0,    1,    0,
    0,    70,   0,    0,     1,    0,    0,    70,   0,    0,    1,    0,    0,    70,   0,    0,    1,    0,    0,
    8,    0,    0,    20,    0,    0,    25,   0,    0,    30,   0,    0,    32,   0,    0,    40,   0,    0,    50,
    0,    0,    70,   0,     0,    1,    202,  0,    8,    267,  0,    32,   315,  -26,  40,   302,  -122, 53,   198,
    -85,  70,   202,  0,     1,    0,    0,    8,    0,    0,    20,   0,    0,    25,   0,    0,    30,   0,    0,
    32,   0,    0,    40,    0,    0,    50,   0,    0,    70,   0,    0,    1,    0,    0,    7,    0,    0,    20,
    0,    0,    30,   0,     0,    50,   0,    0,    60,   0,    0,    70,   0,    0,    1,    -44,  246,  246,  7,
    14,   314,  314,  14,    142,  810,  -92,  32,   96,   -57,  -57,  48,   88,   -17,  -17,  58,   1,    0,    0,
    7,    0,    0,    20,    0,    0,    30,   0,    0,    50,   0,    0,    60,   0,    0,    70,   0,    0,    1,
    0,    0,    45,   -30,   0,    70,   0,    0,    1,    -180, 0,    45,   31,   0,    70,   -180, 0,    1,    0,
    0,    45,   20,   0,     70,   0,    0,    1,    948,  0,    10,   946,  -7,   20,   944,  0,    30,   946,  35,
    40,   967,  93,   45,    990,  -1,   55,   990,  -1,   60,   950,  -176, 63,   943,  -39,  65,   943,  21,   70,
    948,  0,    1,    -402,  0,    30,   -471, -419, 40,   -625, -533, 45,   -693, -119, 55,   -725, -80,  60,   -564,
    1623, 62,   -474, 838,   70,   -402, 0,    1,    -769, 0,    11,   -583, 85,   19,   -558, 127,  30,   -507, 75,
    40,   -507, -59,  45,    -537, -2,   55,   -537, 0,    63,   -547, -127, 70,   -769, 0,    1,    0,    0,    56,
    0,    0,    70,   0,     0,    1,    -564, 0,    11,   -1,   0,    30,   0,    0,    55,   0,    0,    61,   131,
    -789, 66,   -290, -2318, 70,   -564, 0,    1,    1201, 0,    11,   738,  -197, 27,   643,  -384, 35,   441,  -617,
    45,   132,  -799, 47,    121,  -2,   54,   121,  0,    57,   131,  416,  60,   345,  2870, 61,   444,  2811, 70,
    1201, 0,    1,    -918,  0,    10,   -918, 3,    20,   -916, 3,    30,   -916, 1,    35,   -916, -3,   40,   -917,
    -3,   45,   -917, 2,     50,   -916, 1,    55,   -916, -4,   60,   -917, -4,   70,   -918, 0,    1,    -188, 0,
    30,   -398, -261, 35,    -433, -152, 40,   -449, 41,   45,   -420, 350,  60,   -234, 201,  70,   -188, 0,    1,
    583,  0,    27,   618,   125,  40,   684,  160,  45,   697,  -41,  50,   671,  -197, 59,   614,  -128, 70,   583,
    0,    1,    0,    0,     10,   0,    0,    20,   0,    0,    30,   0,    0,    35,   0,    0,    40,   0,    0,
    45,   0,    0,    50,    0,    0,    55,   0,    0,    60,   0,    0,    70,   0,    0,    1,    406,  1213, 6,
    493,  -26,  20,   81,    -572, 30,   0,    -162, 35,   0,    0,    40,   0,    0,    45,   0,    0,    50,   0,
    0,    55,   0,    -1,    63,   -1,   -3,   70,   406,  1246, 1,    -731, 873,  6,    -670, -120, 20,   -815, 120,
    30,   -694, 354,  35,    -638, 263,  40,   -606, -21,  45,   -645, -446, 50,   -755, -582, 55,   -839, -380, 63,
    -919, 0,    70,   -731,  871,  1,    0,    0,    70,   0,    0,    1,    0,    0,    70,   0,    0,    1,    0,
    0,    70,   0,    0,     1,    0,    0,    26,   0,    0,    45,   0,    0,    70,   0,    0,    1,    -100, 0,
    41,   -215, -66,  52,    -220, 59,   54,   -206, 274,  70,   -100, 0,    1,    0,    0,    47,   -40,  0,    70,
    0,    0,    1,    0,     0,    70,   0,    0,    1,    0,    0,    70,   0,    0,    1,    0,    0,    70,   0,
    0
};

aNPC_Animation_c cKF_ba_r_npc_1_misin1 = {
    { cKF_ckcb_r_npc_1_misin1_tbl, cKF_ds_npc_1_misin1_tbl, cKF_kn_npc_1_misin1_tbl, cKF_c_npc_1_misin1_tbl, -1, 70 },
    1.0f,
    70.0f,
    cKF_FRAMECONTROL_REPEAT,
    -5.0f,
    NULL,
    aNPC_EYE_TEX1,
    -1,
    NULL,
    aNPC_MOUTH_TEX0,
    0,
    -1,
    -1,
    NULL,
    NULL,
};
