#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_muka1_tbl[] = { 16, 2, 0, 3, 2, 3, 0, 3, 2, 3, 0, 2, 2, 3, 0, 7, 2, 0, 7, 2, 4, 3, 0, 2, 0, 0 };

s16 cKF_kn_npc_1_muka1_tbl[] = { 11, 9,  5, 9,  9,  12, 3, 5,  9,  9,  12, 3,  13, 13,
                                 14, 11, 7, 13, 10, 9,  7, 13, 10, 10, 9,  11, 11, 8 };

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

s16 cKF_ds_npc_1_muka1_tbl[] = {
    1,  1000, -703,  2,  977,  -1125, 4,  873,  -1125, 5,  850,  469,    6,  905,  2625,  8,  1145, 2625,
    9,  1200, -2180, 10, 1000, -1500, 11, 1100, 1500,  12, 1100, 0,      14, 1100, 0,     1,  0,    375,
    2,  13,   600,   4,  68,   600,   5,  80,   -937,  6,  5,    -3600,  8,  -325, -3600, 9,  -400, -1125,
    10, -400, 0,     14, -400, 0,     1,  -100, -332,  2,  -111, -595,   7,  -289, -595,  9,  -300, 0,
    14, -300, 0,     1,  25,   352,   2,  37,   563,   4,  88,   563,    5,  100,  -116,  6,  81,   -833,
    7,  44,   -833,  8,  25,   -292,  9,  25,   0,     14, 25,   0,      1,  200,  2578,  2,  286,  4125,
    4,  664,  4125,  5,  750,  -1628, 6,  556,  -8333, 7,  194,  -8333,  8,  0,    -2917, 9,  0,    0,
    14, 0,    0,     1,  -100, -1641, 2,  -155, -2625, 4,  -395, -2625,  5,  -450, 1029,  6,  -327, 5465,
    7,  -86,  6101,  8,  80,   2785,  9,  100,  -2325, 10, -75,  -1500,  11, 0,    1125,  12, 0,    0,
    14, 0,    0,     1,  0,    -23,   8,  -20,  -82,   14, -23,  -12,    1,  -100, -332,  2,  -111, -595,
    7,  -289, -595,  9,  -300, 0,     14, -300, 0,     1,  -25,  -352,   2,  -37,  -563,  4,  -88,  -563,
    5,  -100, 116,   6,  -81,  833,   7,  -44,  833,   8,  -25,  291,    9,  -25,  -2,    14, -25,  6,
    1,  200,  2578,  2,  286,  4125,  4,  664,  4125,  5,  750,  -1628,  6,  556,  -8333, 7,  194,  -8333,
    8,  0,    -2917, 9,  0,    0,     14, 0,    0,     1,  -100, -1641,  2,  -155, -2625, 4,  -395, -2625,
    5,  -450, 1029,  6,  -327, 5465,  7,  -86,  6101,  8,  80,   2785,   9,  100,  -2325, 10, -75,  -1500,
    11, 0,    1125,  12, 0,    0,     14, 0,    0,     1,  0,    23,     8,  20,   82,    14, 23,   12,
    1,  60,   2853,  2,  155,  2853,  3,  250,  -907,  4,  95,   -6667,  5,  -194, -6667, 6,  -350, -1475,
    7,  -293, 2904,  9,  7,    4488,  10, 143,  2904,  11, 200,  -2127,  12, 1,    -2235, 13, 51,   750,
    14, 51,   0,     1,  82,   -4228, 2,  -59,  -4228, 3,  -200, 1261,   4,  25,   6750,  5,  250,  2517,
    6,  193,  -2904, 8,  -106, -4488, 9,  -243, -2904, 10, -300, 5142,   11, 100,  3000,  12, -100, -750,
    13, 50,   1050,  14, -30,  -2400, 1,  2,    -3797, 2,  -125, -3777,  3,  -250, -206,  4,  -139, 4778,
    5,  69,   4778,  6,  180,  1478,  7,  167,  -556,  8,  143,  -556,   9,  130,  856,   10, 200,  450,
    11, 160,  -556,  12, 163,  105,   13, 167,  31,    14, 165,  -60,    1,  0,    311,   2,  10,   444,
    3,  30,   444,   4,  40,   -272,  5,  11,   -1222, 6,  -41,  -1222,  7,  -70,  -156,  9,  -18,  778,
    10, 0,    272,   11, 0,    0,     14, 0,    0,     1,  0,    -831,   2,  -28,  -1487, 5,  -303, -3061,
    7,  -472, -1487, 8,  -500, -415,  9,  -500, 0,     14, -500, 0,      1,  58,   -3551, 2,  -61,  -5682,
    4,  -582, -5682, 5,  -700, -1629, 6,  -690, 727,   7,  -652, 1803,   8,  -570, 4102,  9,  -378, 4950,
    10, -240, -329,  11, -400, -1200, 12, -320, 1200,  13, -320, 0,      14, -320, 0,     1,  -564, 2076,
    2,  -495, 3165,  4,  -213, 3045,  5,  -150, 948,   6,  -150, 0,      7,  -150, 0,     8,  -150, -3375,
    10, -600, -3375, 11, -600, 0,     14, -600, 0,     1,  -57,  -725,   2,  -81,  -1674, 4,  -295, -4004,
    7,  -662, -2008, 8,  -700, 4687,  9,  -350, 10500, 10, 0,    5250,   11, 0,    0,     14, 0,    0,
    1,  0,    831,   2,  28,   1487,  5,  303,  3061,  7,  472,  1487,   8,  500,  415,   9,  500,  0,
    14, 500,  0,     1,  58,   -3373, 2,  -55,  -5603, 4,  -580, -5761,  5,  -700, -1694, 6,  -693, 656,
    7,  -656, 1839,  8,  -570, 4212,  9,  -375, 4950,  10, -240, -368,   11, -400, -1200, 12, -320, 1200,
    13, -320, 0,     14, -320, 0,     1,  564,  -2094, 2,  494,  -3173,  4,  213,  -3037, 5,  150,  -945,
    6,  150,  0,     7,  150,  0,     8,  150,  3375,  10, 600,  3375,   11, 600,  0,     14, 600,  0,
    1,  -57,  -808,  2,  -84,  -1822, 4,  -314, -4310, 6,  -606, -3659,  7,  -710, -2156, 8,  -750, 5021,
    9,  -375, 11250, 10, 0,    5625,  11, 0,    0,     14, 0,    0,      1,  0,    2000,  2,  67,   3500,
    4,  450,  6500,  6,  833,  3500,  7,  900,  -5750, 8,  450,  -13500, 9,  0,    -6750, 10, 0,    0,
    14, 0,    0,     1,  0,    -3000, 2,  -100, -3000, 3,  -200, -475,   5,  3,    3475,  6,  100,  1848,
    7,  127,  475,   8,  132,  51,    9,  130,  -76,   11, 119,  -219,   13, 109,  45,    14, 115,  174,
    1,  0,    233,   2,  8,    333,   3,  22,   333,   4,  30,   -194,   5,  9,    -889,  6,  -29,  -889,
    7,  -50,  -117,  9,  -13,  556,   10, 0,    194,   11, 0,    0,      14, 0,    0,     1,  0,    0,
    6,  0,    0,     7,  0,    -352,  8,  -23,  -1125, 10, -127, -1125,  11, -150, -352,  12, -150, 0,
    14, -150, 0
};

static u8 npc_1_muka10_tex_index[] = { 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4 };

static u8 npc_1_muka11_tex_index[] = { 0, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3 };

aNPC_Animation_c cKF_ba_r_npc_1_muka1 = {
    { cKF_ckcb_r_npc_1_muka1_tbl, cKF_ds_npc_1_muka1_tbl, cKF_kn_npc_1_muka1_tbl, cKF_c_npc_1_muka1_tbl, -1, 14 },
    1.0f,
    14.0f,
    cKF_FRAMECONTROL_STOP,
    -4.0f,
    npc_1_muka11_tex_index,
    aNPC_EYE_TEX0,
    -1,
    npc_1_muka10_tex_index,
    aNPC_MOUTH_TEX0,
    -1,
    11,
    eEC_EFFECT_MUKA,
    NULL,
    NULL,
};
